The invention relates to the technical field of intelligent Internet of Vehicles, in particular to a task unloading method in a vehicle-mounted
edge computing environment based on deep
reinforcement learning, which comprises the following steps: acquiring a task vehicle to generate a to-be-executed task, uploading the task to an RSU, generating a scheduling decision according to the current state of the task and available resources, and sending the scheduling decision to the RSU. The task is allocated to a service vehicle or locally executed; performing priority division on the tasks by utilizing an
analytic hierarchy process, and obtaining the current state of each to-be-executed task; obtaining service vehicle numbers and task vehicle numbers of the tasks based on task states and priority level utilization model scheduling, and calculating unloading and scheduling strategies; obtaining available computing resources of the current service vehicle; and training the sequence to the
sequence model by using an Actor-Cr-it ic
algorithm to obtain an optimal task part unloading and scheduling strategy. The computing resources of the service vehicle and the
edge server can be fully utilized, the
execution time delay of all tasks in the whole time period is smaller, and the task execution success rate is higher.