With the swift advancement of 5G communication technology and the widespread prevalence of intelligent connected vehicles, a multitude of applications for the Internet of Vehicles (IoV) have been steadily burgeoning. Nevertheless, owing to vehicular mobility and the variety of tasks generated by IoV applications competing for restricted edge resources, the task of assigning users to edge nodes, in addition to appropriating edge node resources to hybrid tasks within edge environments, persists as a formidable challenge. In addressing this predicament, we establish a model delineating the execution duration of hybrid tasks engendered by IoV applications, and introduce a joint mechanism for user assignment and edge resource allocation. Within this mechanism, we architect an optimal strategy for edge resource allocation, predicated upon given user assignment outcomes. In order to ascertain the user assignment strategy, we employ an enhanced genetic algorithm in scenarios of a large user base, and utilize the branch-and-bound algorithm when dealing with a small user base. Finally, we design and implement an experimental setup for joint user assignment and edge resource allocation. The comprehensive simulation results provide robust verification of the effectiveness of our proposed mechanism.