A vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance
By optimizing task offloading and resource allocation through network controllers and deep reinforcement learning algorithms, combined with mobile and parked vehicle resources, the problem of limited edge server resources is solved, and the task processing efficiency and user experience of the vehicle edge computing system are improved.
Patent Information
- Application Number
- CN202411581779.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In existing vehicle edge computing systems, edge server resources are limited and mobile vehicle resources are not fully utilized, resulting in limited task offloading decision-making and resource allocation performance, making it difficult to achieve load balancing and improve user experience.
The network controller perceives the status of devices and vehicles, uses deep reinforcement learning algorithms to optimize task offloading decisions and resource allocation, combines mobile and parked vehicle resources, realizes dynamic scheduling of tasks between edge servers and vehicles, and optimizes the computing and transmission processes.
It improves task processing efficiency, reduces the workload of edge servers, minimizes task delays and energy consumption, and improves the overall system performance and user experience.
Smart Images

Figure CN119485214B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle networking and mobile edge computing technologies, and in particular to a vehicle-edge collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance. Background Art
[0002] Vehicle edge computing, an emerging technology, represents an innovative fusion of mobile edge computing and connected vehicle (IoV) technologies. By delegating onboard tasks to the edge of the network, it effectively addresses the limited computing power of onboard terminals. Furthermore, by leveraging network edge resources for computing and data processing, it can rapidly respond to the needs of onboard terminals, improving the responsiveness and efficiency of the IoV and providing advanced support for the realization of intelligent and automated vehicles.
[0003] As a crucial component of in-vehicle edge computing, edge servers not only meet the computing needs of the vehicle itself, such as collision warning, autonomous driving, and intelligent transportation, but also provide computing power and storage resources for other smart devices connected to the edge computing network, such as smartphones and laptops. Mobilizing the computing power of edge servers and expanding their service scope can significantly enhance the application value and development potential of vehicle edge computing.
[0004] When an edge server is overloaded with tasks, its computing resources may be unable to meet the needs of all tasks, leading to server overload and reduced task service quality. This presents a conflict between the computing power limitations of edge servers and the computing power requirements of user devices. To expand the computing resources of the vehicle edge computing system, we can consider introducing external resources from other entities. For example, these tasks can be further transferred from the edge server to a cloud server or other connected edge servers. However, heterogeneous resource computing is underutilized in in-vehicle edge computing scenarios, especially in vehicles. Vehicles have built-in chips and are equipped to handle applications such as autonomous driving and smart cars. By leveraging the underutilized resources of nearby vehicles, edge computing resources can be expanded.
[0005] Considering the influence of complex factors such as vehicle mobility characteristics, vehicle service mission intentions, and the distribution of multiple users in multiple cells, existing resource management methods in the field of in-vehicle edge computing are difficult to adapt to the needs of multi-edge intelligent collaborative systems, and further improvement and innovation are urgently needed in terms of reliability, efficiency, and scalability. To this end, it is necessary to explore and establish in-vehicle resource management strategies and methods that are suitable for multi-edge collaborative scenarios from a systematic and holistic perspective to achieve efficient resource scheduling and utilization, improve overall system performance and user experience.
[0006] In vehicle-based edge computing applications, fully leveraging the computing power of vehicles can not only improve task processing efficiency but also significantly reduce the workload on edge servers. Vehicle-to-infrastructure communication, vehicle-to-vehicle communication, and vehicle-to-device communication can alleviate the pressure on edge servers. However, many studies focus solely on how to fully utilize parking resources, ignoring the resources available to mobile vehicles. Furthermore, the scope of application is relatively limited, not considering a wide range of issues (such as uneven edge computing load and uneven spatial and temporal distribution of vehicles), but only considering the situation at a single edge node. Furthermore, vehicles are private and do not disclose their private information (such as the number of idle resources) nor do they provide computing resources unconditionally. Consider leasing vehicle computing resources based on the willingness of the device to purchase them at the highest acceptable price.
[0007] Mobile vehicles account for a significant portion of daily urban life. Leveraging the computing power of these mobile vehicles to assist in task offloading to devices can significantly improve the overall performance of mobile edge computing systems. This assisted mobile vehicle approach helps increase overall computing resources, thereby improving the overall performance of mobile edge computing systems and providing strong support for parked vehicle-assisted mobile edge computing solutions. Furthermore, devices can offload tasks to any edge server and any vehicle serving that edge server to achieve load balancing. When a device's task is transferred to an edge server covering that device, the task can be further transferred from the edge server to vehicles within the edge server's coverage area. These shortcomings significantly limit the performance of task offloading decisions and resource allocation. Summary of the Invention
[0008] (1) Technical issues to be resolved
[0009] In order to overcome the deficiencies of the above-mentioned prior art, the present invention is aimed at tasks based on vehicle edge computing. Taking into account the problems of limited edge server resources and underutilized idle resources in vehicles, we use mobile and parked vehicles to expand the resources of edge servers. Each device can offload its tasks to the edge server of the base station, or further offload them from the base station to moving and parked vehicles. Under the maximum cost constraint of purchasing vehicle resources, the task offloading decision and resource allocation strategy are determined to minimize the total task processing delay and energy consumption of all devices. The present invention is inherited to the network controller deployment module and resource configuration module of the edge server layer, combined with the network status perception and acquisition module, to realize dynamic optimization of task offloading decisions and resource allocation strategies, and accelerate the neural network training process and optimization process on the basis of considering practicality, thereby improving user experience.
[0010] (2) Technical solution
[0011] To solve the above technical problems, the present invention proposes a vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance, comprising the following steps:
[0012] S1: The network controller senses all current device task information and the system's current wireless environment information. It also senses the computing resources of all base stations and vehicles, the transmission rates between base stations, and the status of all vehicles. It then uploads this information to the network controller via wireless and wired connections.
[0013] S2: Input the current task information and the current wireless environment information of the system described in step S1 into the trained optimization model deployed in the network controller, and calculate the device task offloading decision based on the current state, the transmission power allocation during the task transmission, the computing resource allocation to be used during the task calculation, and the task transmission rate distribution between base stations;
[0014] S3: Extract the device task offloading decision information obtained in step S2. If the information indicates that the task is executed on the edge server of the base station, process the vehicle task according to the task offloading decision. If the task is planned to be offloaded to the edge server of the base station, the processing delay of the task includes the uplink transmission delay from the device to the edge server of the attached base station, the transmission delay between the base stations, and the calculation delay on the edge server.
[0015] S4: Extract the device task offloading decision information obtained in step S2. If the information indicates that the task is executed on a vehicle under the base station, the network controller sends a corresponding task offloading decision instruction to the corresponding vehicle through a wired connection, and processes the device task according to the task offloading decision. If the task is planned to be offloaded to the vehicle under the base station, the processing delay of the task includes the uplink transmission delay from the device to the attached base station edge server, the transmission delay between base stations, the downlink transmission delay from the base station to the vehicle, and the calculation delay on the vehicle. If the unloaded vehicle is a mobile vehicle, the vehicle's residence time in the corresponding base station must be greater than the task processing delay, otherwise the task offloading service provided by the vehicle may be interrupted, resulting in the failure of task offloading.
[0016] Furthermore, the step S1 is specifically as follows:
[0017] The network architecture of this method is characterized as follows: a parking and moving vehicle assisted mobile edge computing scenario is considered, in which there are M edge servers, all of which can communicate through local area network interconnection. We represent the set of edge servers as Assume that there is I in the mth edge server m devices, Parked vehicles and Mobile vehicles. Equipment collection Indicates that the sets of parked vehicles and moving vehicles are We use a collection To include these two sets. In addition, a network controller is placed at the edge layer to control the operation of the entire method. We use "vehicle nm" (vehicle n under the coverage of edge server m) to represent parked vehicles or moving vehicles. is the duration that vehicle nm maintains communication with the affiliated edge server m before leaving the coverage of edge server m.
[0018] The algorithm is deployed on a network controller to work. The network controller perceives all current device task information and the current wireless environment information of the system. Among them, we name the task of device im under the coverage of edge server m as task im. The task im information includes: (1) c im (Based on the CPU's operating cycle) represents the computing resources required for task processing; (2)d im (unit: bits) represents the amount of data required for task transmission; (3) (unit: s) represents the maximum task processing delay that the device im can bear; the current wireless environment characteristics are composed of the channel gain from the device to the base station and the channel gain from the base station to the vehicle. At the same time, the network controller perceives the computing resources of all base stations and vehicles, the transmission rate between base stations, and the status information of all vehicles.
[0019] During the working process, the network controller will upload the above information to the network controller through wireless and wired connections.
[0020] Furthermore, the step S2 is specifically as follows:
[0021] The current task calculation amount obtained in step S1 Task data volume The information of the wireless environment G is input into the trained optimization model deployed on the network controller, and the calculation is based on the device task offloading decision A, B in the current state, the transmission power allocation P during the task transmission process, and the computing resource allocation F to be used during the task calculation process. es ,F vec , and the task transmission rate distribution R between base stations. If A, B, F es ,F vec and R, the transmission power control sub-problem of each device can be naturally decomposed from P0, and the device transmission power The solution of is decoupled from other variables.
[0022] The task scheduling feature of this method is that, for each task im, each task can be offloaded and processed in the following ways: first, offloading the task to an edge server and then performing computation there; second, offloading the task to a mobile vehicle for processing; and third, offloading the task to a parked vehicle for processing. All of these methods require that the task be offloaded to an edge server before being transferred to the corresponding computing node for computation. Once the task is completed, its results are returned to the relevant device via the reverse route. Task processing latency factors include task transmission latency, task computation latency, and task result transmission latency. Given the relatively short task transmission latency, this paper decides not to consider it.
[0023] We use α imj To indicate whether the task is processed on the edge server, α imj =1 means that task im is processed on edge server j. imnj To indicate whether the task is processed on the vehicle, β imnj = 1 means that task im is processed on vehicle nj under edge server j. We adopted and Two sets of task offloading indicators, which cover all task offloading strategies.
[0024] At the same time, regarding the computing resources used in the task calculation process and the distribution of wired transmission rates between base stations, we will Denotes the total computing resources of edge server j. Let Representatives from The computing resources allocated to the computing task im, we will Denotes the total computing resources of vehicle nj. express The computing resources allocated to the computing task im, We use Represents the total wired transmission rate from edge server m to other edge servers. yes The transmission rate assigned to the connection from edge server m to edge server j, The above optimization variables are designed based on the deep reinforcement learning technology to design the optimization algorithm and establish the Markov decision process. The state space of this method is set to s = {C, D, G} and the action space is set to a = {A, B, F es ,F vec ,R}. Finally, according to the algorithm output, the optimization result is obtained.
[0025] Furthermore, the step S3 is specifically as follows:
[0026] Extract the offloading decision information obtained in step S2. If the information indicates that the device task is executed by the edge server on the base station, the network controller sends the task offloading decision instructions A and B to the device and sends the computing resource allocation instruction F to the edge server on the base station. es The device generates a transmission rate allocation instruction R between the device and the base station, and generates a transmit power allocation instruction P. The instructions are executed as described in step S3, and the result is transmitted back to the device. After the corresponding instructions are executed, the task processing cost of the vehicle device task is obtained, which is the weighted sum of task processing delay and energy consumption.
[0027] Furthermore, the step S4 is specifically as follows:
[0028] Extract the offloading decision information obtained in step S2. If the information indicates that the task is executed on the vehicle under the base station, the network controller sends the task offloading decision instructions A and B to the device and sends the computing resource allocation instruction F to the vehicle under the base station. vec The device then sends a transmission rate allocation instruction R between base stations to the edge server on the base station. The device then generates a transmit power allocation instruction P and executes the instruction as described in step S4. After the task calculation and transmission processes are complete, the result is returned to the device. After the corresponding instructions are executed, the task processing cost of the vehicle task is obtained, which is the weighted sum of task processing delay and energy consumption.
[0029] (3) Beneficial effects
[0030] Compared with the prior art, the present invention adopts the above technical solution and has the following beneficial effects:
[0031] 1. When making task offloading decisions and allocating resources, this paper proposes a task offloading and resource allocation strategy that combines mobile and parked vehicles to address the issue of low vehicle resource utilization, based on analysis of real-world scenarios. By jointly scheduling task offloading requests, allocating computing resources across all vehicles under the maximum cost constraint of purchasing vehicle resources, allocating computing resources across edge servers, allocating transmission rates between edge servers, and allocating transmission power across devices, this technology proposes an optimization problem that minimizes the total task processing latency and energy consumption across all devices, making it more practical.
[0032] 2. When making task offloading decisions and resource allocation, a deep reinforcement learning algorithm with double-delayed deep deterministic policy gradient was designed. This algorithm uses neural networks to solve complex optimization problems, making it more practical.
[0033] 3. By analyzing the optimization target structure, we embedded an optimization subroutine to numerically solve the device transmit power allocation subproblem. The algorithm then uses the double-delayed deep deterministic policy gradient (DDPG) algorithm to handle the remaining optimization issues. This reduces the search space for the DDPG model, significantly easing the learning complexity of deep reinforcement learning and significantly improving computational speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of a system model of an embodiment;
[0035] Figure 2 It is a schematic diagram of the training process of task offloading decision and resource allocation;
[0036] Figure 3 It is a schematic diagram of the application process of task offloading decision and resource allocation;
[0037] Figure 4 This is a diagram comparing the rewards of this scheme with other schemes as the number of devices increases;
[0038] Figure 5 This is a schematic diagram comparing the rewards of this scheme with other schemes as the number of mobile vehicles increases;
[0039] Figure 6 This is a diagram comparing the rewards of this scheme and other schemes as the number of parked vehicles increases. DETAILED DESCRIPTION
[0040] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0041] The present invention proposes a vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance. The embodiment includes the following steps:
[0042] Step 1: The network controller senses all current device task information and the system's current wireless environment information. It also senses the computing resources of all base stations and vehicles, the transmission rates between base stations, and the status of all vehicles. It then uploads this information to the network controller via wireless and wired connections.
[0043] Step 2: Input the current task information and the system's current wireless environment information described in Step 1 into the trained optimization model deployed in the network controller. Calculation is based on the device task offloading decision under the current state, the transmission power allocation during task transmission, the allocation of computing resources to be used during task calculation, and the transmission rate distribution of tasks between base stations.
[0044] Step 3: Extract the device task offloading decision information obtained in step 2. If the information indicates that the task is executed by the edge server on the base station, process the vehicle task according to the task offloading decision. If the task is planned to be offloaded to the edge server on the base station, the processing delay of the task includes the uplink transmission delay from the device to the edge server of the attached base station, the transmission delay between the base stations, and the computation delay on the edge server.
[0045] Step 4: Extract the device task offloading decision information obtained in step 2. If the information indicates that the task is executed on a vehicle under the base station, the network controller sends the corresponding task offloading decision instruction to the corresponding vehicle via a wired connection, and processes the device task according to the task offloading decision. If the task is planned to be offloaded to a vehicle under the base station, the processing delay of the task includes the uplink transmission delay from the device to the attached base station edge server, the transmission delay between base stations, the downlink transmission delay from the base station to the vehicle, and the calculation delay on the vehicle. If the offloading vehicle is a mobile vehicle, the vehicle's residence time in the corresponding base station must be greater than the task processing delay, otherwise the task offloading service provided by the vehicle may be interrupted, resulting in the failure of task offloading.
[0046] Furthermore, the step 1 includes:
[0047] The network architecture of this method is characterized as follows: a parking and moving vehicle assisted mobile edge computing scenario is considered, in which there are M edge servers, all of which can communicate through local area network interconnection. We represent the set of edge servers as Assume that there is I in the mth edge server m devices, Parked vehicles and Mobile vehicles. Equipment collection Indicates that the sets of parked vehicles and moving vehicles are We use a collection To include these two sets. In addition, a network controller is placed at the edge layer to control the operation of the entire method. We use "vehicle nm" (vehicle n under the coverage of edge server m) to represent parked vehicles or moving vehicles. is the duration that vehicle nm maintains communication with the affiliated edge server m before leaving the coverage of edge server m.
[0048] The algorithm is deployed on a network controller to work. The network controller perceives all current device task information and the current wireless environment information of the system. Among them, we name the task of device im under the coverage of edge server m as task im. The task im information includes: (1) c im (Based on the CPU's operating cycle) represents the computing resources required for task processing; (2)d im (unit: bits) represents the amount of data required for task transmission; (3) (unit: s) represents the maximum task processing delay that the device im can bear; the current wireless environment characteristics are composed of the channel gain from the device to the base station and the channel gain from the base station to the vehicle. At the same time, the network controller perceives the computing resources of all base stations and vehicles, the transmission rate between base stations, and the status information of all vehicles.
[0049] During the working process, the network controller will upload the above information to the network controller through wireless and wired connections.
[0050] Furthermore, the step 2 includes:
[0051] The current task calculation amount obtained in step 1 Task data volume The information of the wireless environment G is input into the trained optimization model deployed on the network controller, and the calculation is based on the device task offloading decision A, B in the current state, the transmission power allocation P during the task transmission process, and the computing resource allocation F to be used during the task calculation process. es ,F vec , and the transmission rate distribution R of tasks among base stations.
[0052] The objective function of P0 can be expanded as:
[0053]
[0054] Study u im The structure of , we find that if A, B, F are given es ,F vec and R, the transmission power control subproblem of each device can be naturally decomposed from P0. If the device im offloads its task im(α imj =1 or β imnj =1), then the sub-problem corresponding to the device is:
[0055]
[0056] It can be seen that P1 is a quasi-convex optimization problem, because the objective function is determined by The problem consists of a linear numerator and a concave denominator, and the constraints are linear. Therefore, fractional programming methods such as the Dinkelbach algorithm can be used for optimal solution.
[0057] The task scheduling feature of this method is that, for each task im, each task can be offloaded and processed in the following ways: first, offloading the task to an edge server and then performing computation there; second, offloading the task to a mobile vehicle for processing; and third, offloading the task to a parked vehicle for processing. All of these methods require that the task be offloaded to an edge server before being transferred to the corresponding computing node for computation. Once the task is completed, its results are returned to the relevant device via the reverse route. Task processing latency factors include task transmission latency, task computation latency, and task result transmission latency. Given the relatively short task transmission latency, this paper decides not to consider it.
[0058] We use α imj To indicate whether the task is processed on the edge server, α imj =1 means that task im is processed on edge server j. imnj To indicate whether the task is processed on the vehicle, β imnj = 1 means that task im is processed on vehicle nj under edge server j. We adopted and Two sets of task offloading indicators, these two sets of indicators cover all task offloading strategies. Therefore, we have:
[0059]
[0060] We assume that the task of each device should not be further subdivided into subtasks. Therefore, when processing any task im, its task offloading goal must be unique, namely:
[0061]
[0062] The unit price of computing resources for different tasks for each vehicle is different. Assume that for task im, the unit price of vehicle nj under edge server j is ω imnj , for task im, the unit price index of all vehicle computing resources is The highest price that task im can accept is
[0063] At the same time, regarding the computing resources used in the task calculation process and the distribution of wired transmission rates between base stations, we will Denotes the total computing resources of edge server j. Let Representatives from The computing resources allocated to the computing task im, we will Denotes the total computing resources of vehicle nj. express The computing resources allocated to the computing task im, We use Represents the total wired transmission rate from edge server m to other edge servers. yes The transmission rate assigned to the connection from edge server m to edge server j, The above optimization variables are designed based on the deep reinforcement learning technology to design the optimization algorithm and establish the Markov decision process. The state space of this method is set to s = {C, D, G} and the action space is set to a = {A, B, F es ,F vec ,R}. Finally, according to the algorithm output, the optimization result is obtained.
[0064] Furthermore, the step three includes:
[0065] Extract the device task offloading decision information obtained in step 2. If the information indicates that the task is executed on the edge server of the base station, process the vehicle task according to the task offloading decision. If the task is planned to be offloaded to the edge server of the base station, the processing delay of the task includes the uplink transmission delay from the device to the edge server of the attached base station, the transmission delay between base stations, and the calculation delay on the edge server.
[0066] The computation delay of task im on edge server j is expressed as:
[0067]
[0068] We calculate the channel signal interference plus noise ratio (SINR) for the uplink transmission from device im to edge server m. The calculation formula is:
[0069]
[0070] is the transmit power of device im for uplink transmission, and its maximum value is Not exceed g im is the channel gain between device im and edge server m. The channel bandwidth is B, and the additive white Gaussian noise power spectral density is defined as N0, so BN0 is the additive white Gaussian noise power of the channel. We express the co-channel interference when device im transmits to edge server m as Therefore, the uplink transmission rate can be expressed as:
[0071]
[0072] Therefore, the uplink transmission delay from device im to edge server m is:
[0073]
[0074] We use Represents the total wired transmission rate from edge server m to other edge servers. yes The transmission rate assigned to the connection from edge server m to edge server j. The transmission delay of task im from edge server m to edge server j is:
[0075]
[0076] The total task processing delay is:
[0077]
[0078] For device im, the energy consumption of task offloading only includes the energy consumed during uplink transmission. It is expressed as:
[0079]
[0080] Furthermore, the step 4 includes:
[0081] Extract the device task offloading decision information obtained in step 2. If the information indicates that the task is executed on a vehicle under the base station, the network controller sends the corresponding task offloading decision instruction to the corresponding vehicle through a wired connection, and processes the device task according to the task offloading decision. If the task is planned to be offloaded to the vehicle under the base station, the processing delay of the task includes the uplink transmission delay from the device to the attached base station edge server, the transmission delay between base stations, the downlink transmission delay from the base station to the vehicle, and the calculation delay on the vehicle. If the unloaded vehicle is a mobile vehicle, then the vehicle's residence time in the corresponding base station must be greater than the task processing delay, otherwise the task offloading service provided by the vehicle may be interrupted, resulting in the failure of task offloading.
[0082] The computational delay of task im on vehicle nj is expressed as:
[0083]
[0084] Task im is offloaded to N j For vehicle nj in the channel, we get the channel signal interference plus noise ratio of the downlink transmission from edge server j to vehicle nj. Its value is:
[0085]
[0086] in, is the transmission power of edge server i sending tasks to vehicle j, g ij is the channel gain, BN0 is the additive white Gaussian noise power of the channel, is the co-channel interference. Therefore, we can calculate the downlink transmission rate from edge server i to vehicle j as:
[0087]
[0088] Therefore, the downlink transmission delay from edge server i to vehicle j is:
[0089]
[0090] We use Represents the total wired transmission rate from edge server m to other edge servers. yes The transmission rate assigned to the connection from edge server m to edge server j. The transmission delay of task im from edge server m to edge server j is:
[0091]
[0092] The total task processing delay is:
[0093]
[0094] If the unloading vehicle nj is a mobile vehicle and the residence time of vehicle nj in edge server j is less than the processing delay of task im, the task offloading service provided by the vehicle may be interrupted, resulting in the failure of task offloading. That is:
[0095]
[0096] The processing delay of task im is:
[0097]
[0098] The task processing delay cannot exceed the task processing delay tolerance:
[0099]
[0100] The total price of the vehicle resources purchased by the equipment im needs to be within the maximum price range acceptable to the task im:
[0101]
[0102] Therefore, we have the task processing cost:
[0103]
[0104] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the claims of the present invention.
Claims
1. A vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance, characterized in that: The following steps are involved: S1: The network controller senses all current device task information and the system's current wireless environment information. It also senses the computing resources of all base stations and vehicles, the transmission rates between base stations, and the status of all vehicles. It then uploads this information to the network controller via wireless and wired connections. S2: Input all current device task information and the system's current wireless environment information described in step S1 into a trained optimization model deployed in the network controller. Calculation is based on the device task offloading decision under the current state, the transmit power allocation during task transmission, the computing resource allocation to be used during task calculation, and the task transmission rate distribution between base stations. S3: Extract the device task offloading decision information obtained in step S2. If the information indicates that the task is executed by the edge server on the base station, process the vehicle task according to the task offloading decision. If the task is planned to be offloaded to the edge server on the base station, the processing delay of the task includes the uplink transmission delay from the device to the edge server of the attached base station, the transmission delay between the base stations, and the computation delay on the edge server. S4: Extract the device task offloading decision information obtained in step S2. If the information indicates that the task is executed on a vehicle under the base station, the network controller sends a corresponding task offloading decision instruction to the corresponding vehicle through a wired connection, and processes the device task according to the task offloading decision. If the task is planned to be offloaded to the vehicle under the base station, the processing delay of the task includes the uplink transmission delay from the device to the attached base station edge server, the transmission delay between base stations, the downlink transmission delay from the base station to the vehicle, and the calculation delay on the vehicle. If the unloaded vehicle is a mobile vehicle, the vehicle's residence time in the corresponding base station must be greater than the task processing delay, otherwise the task offloading service provided by the vehicle may be interrupted, resulting in the failure of task offloading.
2. The vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance according to claim 1 is characterized in that: The step S1 includes: the network architecture is characterized by considering a parking and moving vehicle assisted mobile edge computing scenario, in which M edge servers are included, all of which can communicate through local area network interconnection, and the set of edge servers is represented as Assume that there is I in the mth edge server m devices, Parked vehicles and Mobile vehicles; equipment collection Indicates that the sets of parked vehicles and moving vehicles are Use a collection To include these two sets; in addition, a network controller is placed at the edge layer to control the operation of the entire method; "vehicle nm", that is, vehicle n under the coverage of edge server m, is used to represent parked vehicles or moving vehicles; is the duration that vehicle nm maintains communication with the affiliated edge server m before leaving the coverage of edge server m; The algorithm is deployed on a network controller to work. The network controller perceives all current device task information and the current wireless environment information of the system. The task of device im under the coverage of edge server m is named task im. The task im information includes: (1) c im It is based on the CPU operating cycle and represents the computing resources required for task processing; (2)d im The unit is bit, which represents the amount of data required for task transmission; (3) The unit is s, which represents the maximum task processing delay that the device im can bear; the current wireless environment characteristics are composed of the channel gain from the device to the base station and the channel gain from the base station to the vehicle. At the same time, the network controller perceives the computing resources of all base stations and vehicles, the transmission rate between base stations, and the status information of all vehicles; During the working process, the network controller will upload the above information to the network controller through wireless and wired connections.
3. The vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance according to claim 1 is characterized in that: The step S2 includes: calculating the current task calculation amount obtained in step S1 Task data volume The information of the wireless environment G is input into the trained optimization model deployed on the network controller, and the calculation is based on the device task offloading decision A, B in the current state, the transmission power allocation P during the task transmission process, and the computing resource allocation F to be used during the task calculation process. es ,F vec , and the task transmission rate distribution R between base stations; if A, B, F are given es ,F vec and R, the transmission power control sub-problem of each device can be naturally decomposed from P0, and the device transmission power The solution of is decoupled from other variables; The characteristics of task scheduling are as follows: for task im, each task can be offloaded and processed in the following ways: the first way is to offload the task to the edge server and then perform calculations on the edge server; the second way is to offload the task to a mobile vehicle for processing; the third way is to offload the task to a parked vehicle for processing; all of these ways require that the task be offloaded to the edge server first, and then transferred to the corresponding computing node for task calculation; once the task is completed, its result will be returned to the relevant device along the opposite route; the delay factors of task processing include the transmission delay of the task, the calculation delay of the task, and the transmission delay of the task results; considering that the transmission delay of the task is relatively short, it is decided not to be considered; Use α imj To indicate whether the task is processed on the edge server, α imj =1 means that task im is processed on edge server j; imnj To indicate whether the task is processed on the vehicle, β imnj =1 means that task im is processed on vehicle nj under edge server j; and Two sets of task offloading indicators, which cover all task offloading strategies; At the same time, regarding the computing resources used in the task calculation process and the distribution of wired transmission rates between base stations, represents the total computing resources of edge server j; Representatives from The computing resources allocated to the computing task im, represents the total computing resources of vehicle nj; express The computing resources allocated to the computing task im, represents the total wired transmission rate from edge server m to other edge servers; yes The transmission rate assigned to the connection from edge server m to edge server j, An optimization algorithm is designed based on deep reinforcement learning technology, and a Markov decision process is established, in which the state space is set to s = {C, D, G} and the action space is set to a = {A, B, F es ,F vec ,R}; Finally, the optimization result is obtained according to the algorithm output.
4. The vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance according to claim 1 is characterized in that: The step S3 includes: extracting the offloading decision information obtained in step S2, and if the information indicates that the device task is executed by the edge server on the base station, the network controller sends the task offloading decision instructions A and B to the device, and sends the computing resource allocation instruction F to the edge server on the base station. es and a transmission rate allocation instruction R between the vehicle and the base station, the device itself generates a transmission power allocation instruction P, executes the instruction according to step S3 of claim 1, and transmits the result back to the device; after the execution of the corresponding instruction is completed, obtains the task processing cost of the vehicle device task, that is, the weighted sum of the task processing delay and energy consumption; The computation delay of task im on edge server j is expressed as: Calculate the channel signal interference plus noise ratio (SINR) of the uplink transmission from device im to edge server m; the calculation formula is: is the transmit power of device im for uplink transmission, and its maximum value is Not exceed g im is the channel gain between device im and edge server m; the channel bandwidth is B, the additive white Gaussian noise power spectral density is defined as N0, so BN0 is the additive white Gaussian noise power of the channel; the co-channel interference when device im transmits to edge server m is expressed as Therefore, the uplink transmission rate can be expressed as: Therefore, the uplink transmission delay from device im to edge server m is: use represents the total wired transmission rate from edge server m to other edge servers; yes The transmission rate assigned to the connection from edge server m to edge server j; the transmission delay of task im from edge server m to edge server j is: The total task processing delay is: For device im, the energy consumption of task offloading only includes the energy consumed during uplink transmission, which can be expressed as:
5. The vehicle-side collaborative task offloading and resource allocation method based on mobile and parked vehicle assistance according to claim 1 is characterized in that: The step S4 includes: extracting the offloading decision information obtained in step S2, and if the information indicates that the task is executed on the vehicle under the base station, the network controller sends the task offloading decision instructions A and B to the device, and sends the computing resource allocation instruction F to the vehicle under the base station. vec , sending a transmission rate allocation instruction R between base stations to the edge server on the base station, the device itself makes a transmission power allocation instruction P, and executes the instruction according to step S4 of claim 1, and after the task calculation process and the transmission process are all completed, the result is returned to the device; after the corresponding instruction is executed, the task processing cost of the vehicle task is obtained, that is, the weighted sum of the task processing delay and energy consumption; The computational delay of task im on vehicle nj is expressed as: Task im uninstalled to For vehicle nj in the channel, the channel signal interference plus noise ratio of the downlink transmission from edge server j to vehicle nj is obtained; its value is: in, is the transmission power of edge server i sending tasks to vehicle j, g ij is the channel gain, BN0 is the additive white Gaussian noise power of the channel, is the co-channel interference; therefore, the downlink transmission rate from edge server i to vehicle j can be calculated as: Therefore, the downlink transmission delay from edge server i to vehicle j is: use represents the total wired transmission rate from edge server m to other edge servers; yes The transmission rate assigned to the connection from edge server m to edge server j; the transmission delay of task im from edge server m to edge server j is: The total task processing delay is: For device im, the energy consumption of task offloading only includes the energy consumed during uplink transmission, which is expressed as: The processing delay of task im is: Therefore, the task processing cost is: