A method and system for offloading edge vehicle networking tasks
By building a task unloading scheme model and using deep enhancement learning, combining the information of trucks and roadside RSUs, selecting trucks and roadside RSUs to simultaneously unload tasks, solving the problem of a single vehicle network task unloading mode in the existing technology and failing to effectively consider the edge. The problem of network congestion achieves efficient and accurate task offloading and computing requirements.
Patent Information
- Application Number
- CN202210860914.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-07-21
AI Technical Summary
The existing Internet of Vehicle task offload mode is relatively single in consideration, and it fails to effectively consider the congestion of edge networks and cannot meet the computing needs of vehicles, especially in highway scenarios.
By building a task unloading scheme model, combining the information of trucks and roadside RSUs, we analyze the delay, energy consumption and money costs of the three task unloading schemes, determine the optimization objective function, and use deep enhancement learning to solve the joint optimization problem, select trucks and The roadside RSU performs task unloading at the same time.
It improves the efficiency and accuracy of task unloading, saves capital costs and energy consumption, and can effectively meet the computing needs of vehicles in highway scenarios.
Smart Images

Figure CN115913949B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Vehicles and edge computing, and more specifically, to a method and system for offloading edge Internet of Vehicles tasks. Background Art
[0002] Nowadays, with the development of technology, the Internet of Vehicles has begun to rise. The Internet of Vehicles consists of vehicle identification systems, vehicle and on-board systems, roadside equipment systems and information communication network systems, and is an important part of realizing autonomous driving technology.
[0003] The Internet of Vehicles uses sensor technology to perceive the status information of vehicles, and uses wireless communication networks and modern intelligent information processing technology to achieve intelligent management of traffic, intelligent decision-making of traffic information services and intelligent control of vehicles. Through the new generation of information and communication technology, the Internet of Vehicles realizes all-round network connections between vehicles and cloud platforms, vehicles and vehicles, vehicles and roads, vehicles and people, and vehicles.
[0004] For mobile edge computing (MEC), it can first provide computing services closer to users, which has incomparable advantages over cloud computing. Applying edge computing technology to the Internet of Vehicles, user vehicles can effectively improve computing capabilities and give full play to their own characteristics by offloading tasks to edge servers. However, existing technical applications show that the task offloading mode of the Internet of Vehicles considers relatively single aspects, such as vehicle-to-roadside unit communication (V2R) or vehicle-to-vehicle communication (V2V), and rarely considers the congestion of the edge network. When the edge computing server providing the service is congested, different edge devices can be selected to cooperate, and the edge server can be used as a relay node to re-offload the task to the new edge server. At this time, the efficiency of task offloading will be significantly improved. In the highway scenario, trucks have many differentiated features from other vehicles on the road. For example, trucks have their own driving routes, and the characteristics of trucks are strong computing capabilities and slow driving speeds.
[0005] The prior art discloses a D2D-based multi-access edge computing task offloading method in a connected vehicle environment. The method models the task offloading strategy, transmission power, and channel resource allocation mode as a mixed integer nonlinear programming problem. The optimization problem is to maximize the sum of the latency and energy efficiency of all terminals CUE in the connected vehicle system that perform cellular communications with base stations. The method has low time complexity and can effectively utilize the channel resources of the connected vehicle system to ensure the latency reliability of the terminal DUE that performs local V2V data exchange in the form of D2D communication. At the same time, the latency and energy consumption of CUE are close to the minimum, which meets the low latency and high reliability requirements of the connected vehicle. This solution does not consider trucks for task offloading and cannot meet the computing needs of vehicles. Summary of the invention
[0006] The primary purpose of the present invention is to provide an edge vehicle networking task unloading method, which selects trucks and roadside RSUs to simultaneously unload tasks to meet the computing needs of the vehicles.
[0007] A further object of the present invention is to provide an edge vehicle networking task unloading system.
[0008] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0009] A method for offloading edge vehicle networking tasks, comprising the following steps:
[0010] S1: Build a task unloading solution model based on the task vehicle, roadside unit RSU and truck information traveling on the highway;
[0011] S2: Analyze the delay, energy consumption and monetary cost of the three task offloading schemes of the task offloading scheme model respectively, determine the optimization objective function, and obtain the joint optimization problem;
[0012] S3: Solve the joint optimization problem and obtain a task offloading solution.
[0013] First, a task unloading solution model is built based on the location information, computing power, energy consumption, and monetary expenditure of the task vehicle, roadside unit RSU, and truck vehicle. When unloading tasks, the task vehicle has three task unloading solutions, namely, unloading the task to the roadside RSU, unloading to surrounding trucks, or local processing. In this patent, the vehicle needs to analyze the delay, energy consumption, and monetary cost of the three unloading methods of the model separately, and combine the three to determine the optimization objective function, and finally use deep reinforcement learning to solve the obtained joint optimization problem.
[0014] An edge vehicle networking task offloading system, comprising:
[0015] A model building module, wherein the model building module builds a task unloading solution model according to information of task vehicles, roadside units RSU and trucks traveling on the highway;
[0016] An objective function module, wherein the objective function module analyzes the delay, energy consumption and monetary cost of three task offloading schemes of the task offloading scheme model respectively, determines an optimized objective function, and obtains a joint optimization problem;
[0017] A solution module is used to solve the joint optimization problem and obtain a task offloading solution.
[0018] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0019] 1) Today's task offloading solutions lack consideration of the effective communication range of edge computing devices and the relationship between the computing speed and the size of the task at the edge. Allocating computing resources based on the task occupancy of task vehicles and trucks can save capital costs and energy consumption. At the same time, judging the spatial position relationship between the task vehicle, RSU, and truck vehicles, it is determined whether the local task can be effectively and reasonably offloaded to the edge computing device. For example, when the local area is busy or the RSU is too far away, you can choose to offload the task to the nearest truck vehicle.
[0020] 2) Comprehensive consideration of the three modes of V2I, V2V and local processing to improve the accuracy of unloading selection, improve the overall vehicle utilization rate based on the best global deployment plan, and obtain the optimal unloading plan.
[0021] 3) Existing Internet of Vehicles task offloading solutions lack consideration of data volume and do not consider the selection of different task offloading solutions based on the task occupancy. This solution takes into account the decrease in computing frequency caused by large task occupancy, and can update the offloading strategy with cooperative vehicles as relays, which can reduce the offloading cost in the actual task offloading process. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the method flow of the present invention.
[0023] Figure 2 It is a schematic diagram of the task offloading solution model of the present invention.
[0024] Figure 3 It is a schematic diagram of the system module of the present invention. DETAILED DESCRIPTION
[0025] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0026] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;
[0027] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0028] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0029] Example 1
[0030] This embodiment provides a method for offloading edge vehicle networking tasks, such as Figure 1 As shown, the following steps are included:
[0031] S1: Build a task unloading solution model based on the task vehicle, roadside unit RSU and truck information traveling on the highway;
[0032] S2: Analyze the delay, energy consumption and monetary cost of the three task offloading schemes of the task offloading scheme model respectively, determine the optimization objective function, and obtain the joint optimization problem;
[0033] S3: Solve the joint optimization problem and obtain a task offloading solution.
[0034] Example 2
[0035] This embodiment further discloses the following contents based on the embodiment 1:
[0036] The task offloading solution model in step S1 is as follows: Figure 2 As shown, specifically:
[0037] Let the set of roadside units RSU be R, where each roadside unit RSU r i ∈R; trucks are a set M, where each truck m i ∈M; there are i roadside units RSU, with coordinates (r1,20), (r2,20), (r3,20), …, (r i ,20); there are j trucks with coordinates (m1,10), (m2,10), (m3,10)…, (m j ,10), and the initial coordinates of the task vehicle a are (a,0);
[0038] The transmission rates between the task vehicle a and the roadside unit RSU and the truck are v a,R and v a,M , the task vehicle a travels at a constant speed on a section of highway from west to east, generating a task every x meters on average (L a ,C a ,x a ,D a,i or j , ), L a is the size of the task unloaded by task vehicle a, C a The number of CPU cycles required for vehicle a to process this task, x a The relative position of the task vehicle a relative to the starting point when the task is generated; D a,i or j The relative distance from the unloading object when generating the task for task vehicle a; The maximum processing delay of the task generated by task vehicle a;
[0039] Task vehicle a can only unload tasks with the two roadside units RSU that are closest to each other, or with multiple trucks that are relatively close to each other.
[0040] There are several steps in the task offloading solution model: Node discovery: Find available computing nodes for subsequent calculation of the offloading program. These nodes can be located on the roadside RSU or surrounding trucks. Task offloading: The offloading decision is the most core link in the calculation offloading. This link mainly solves two major problems: offloading decision-determine whether the decision is local calculation or offloaded to the edge calculation; program transmission-hand over the divided calculation program to the edge for execution. Execute calculation: After the mobile terminal offloads the calculation task to the edge, the task will be executed in the offloaded edge, and the user end will not feel any changes. Return of calculation results: The results of the calculation processing by the computing node are transmitted back to the vehicle.
[0041] The task offloading scheme model in step S1 also considers the fading effect:
[0042] Small-scale fading will not distort the received signal, specifically:
[0043] Maximum Doppler spread:
[0044]
[0045] Where s is the speed of the task vehicle, λ is the wavelength of the transmission channel, and θ is the angle between the vehicle's driving direction and the task transmission direction. So there is the coherence time:
[0046]
[0047] Known symbol period The symbol period is much smaller than the inverse of the Doppler spread bandwidth, i.e. the coherence time. During this time, the phase change of the received signal envelope is still small, and the amplitude change of the signal is also small, resulting in slow fading. The channel fading coefficient basically does not change within multiple symbol periods, and the received signal will not be distorted.
[0048] The large-scale fading is:
[0049] First, while the mission vehicle is traveling, the time is divided into multiple time slots. Assume that the current time slot is t, t∈{1,2,…,n};
[0050] Mission vehicle a to roadside unit RSUr i The distance D a,i for:
[0051]
[0052] According to the Friis transmission formula, the roadside unit RSUr is obtained i The received power from mission vehicle a is:
[0053]
[0054] Where P a is the transmission power of the antenna of mission vehicle a, G a is the transmission gain of the antenna, is the receiving gain of the i-th roadside unit RSU, λ is the channel wavelength;
[0055] According to Shannon's theorem, we can get the distance from task vehicle a to roadside unit RSUr i Data transfer speed:
[0056]
[0057] Where N is the interference between multiple transmissions, σ 2 is white noise, is the bandwidth allocated to vehicle a by RSU, is the received power.
[0058] In the task offloading solution model, there are four task processing methods:
[0059] 1) The task is transmitted to the roadside unit (RSU). Compared with local computing, the fixed facility characteristics of RSU basically do not cause congestion problems and produce lower energy consumption. However, this unloading method has the highest monetary cost and is also greatly affected by the distance between the two. There may not be a suitable RSU to provide unloading services within a certain range.
[0060] 2) The task vehicle handles the task by itself. If you want to avoid spending a lot of money on task unloading, the vehicle can also consider handling the task by itself, but the vehicle's own processing capacity is limited, and it is easy to be congested and reduce the processing speed. If the number of tasks processed at the same time exceeds the threshold of the total number of CPU cycles, this method cannot cope with a large number of task calculations. At this time, the task should be unloaded again to a nearby truck or a feasible RSU;
[0061] 3) Task unloading to trucks. The feature of unloading tasks to trucks is that there are many trucks. By taking advantage of the number of trucks on the highway and the unidirectionality of the paths, reliable task unloading can be provided when RSU cannot provide task unloading services. At the same time, the monetary cost is lower than that of RSU. The disadvantage is that the computing speed is not as good as RSU, and it is easy to get congested and reduce the speed when processing multiple tasks. In addition, the additional energy consumption generated by task relay must be considered.
[0062] 4) The tasks are balanced between unloading to the roadside units RSU and truck vehicles, making full use of the task processing characteristics of RSU and truck vehicles, reducing transmission and computing delays as much as possible, and reducing monetary costs and energy consumption.
[0063] The offloading task to the roadside unit RSU is specifically:
[0064] 1) First, find a roadside unit (RSU) that can offload tasks;
[0065] Task vehicle a to the surrounding roadside units RSUr i Evaluation is performed based on the distance D a,i and the CPU frequency f of the roadside unit RSU R The two factors are used to optimize the selection of the candidate roadside unit RSU, and the best roadside unit RSU is selected as the roadside unit RSU for auxiliary calculation. The comprehensive cost-effectiveness formula of the roadside unit RSU is:
[0066]
[0067] Among them, α+β=1, and α,β∈(0,1), representing the discount factor;
[0068] 2) Considering the overall overhead of task transmission to the roadside unit RSU:
[0069] When the task vehicle a chooses to transmit the task to the roadside unit RSUr i , assuming that the speed s of the task vehicle a remains unchanged, there is an upper limit τ on the transmission delay before the next new task is generated:
[0070]
[0071] Where D a,i When generating a task for task vehicle a, the relative roadside unit RSUr i At this time, the overall bandwidth is Get the task offloading transfer time for:
[0072]
[0073] Where, L a The size of the task unloaded by task vehicle a, is the data transmission speed from task vehicle a to the roadside unit RSU, and the internal task calculation time of the roadside unit RSU is known
[0074]
[0075] Among them C a The total number of CPUs that vehicle a needs to pass through to process the task for the roadside unit RSU, f RThe CPU frequency provided by the roadside unit RSU when processing the task, considering that the task vehicle a will still generate a new task within the next τ time, if the task unloading transmission time If it is greater than the time interval τ between each new task generation, the task unloading cannot be completed before the next task is generated. In this case, other task unloading schemes are used.
[0076] The computation rate of a task is expressed as:
[0077]
[0078] The total delay is the transmission delay plus the task calculation delay:
[0079]
[0080] The local processing solution in step S2 is specifically:
[0081] Tasks are calculated locally, so there is no need to experience task offloading delays; when the number of tasks is 1 and there is no congestion, the task calculation time is equal to the total task processing time
[0082]
[0083] In the formula, f l is the CPU frequency when vehicle a handles the task by itself. The task calculation rate is:
[0084]
[0085] When the number of local computing tasks exceeds 1, the system will process multiple tasks at the same time, which will cause task congestion and the CPU frequency of each task will decrease. Assuming that the CPU frequency becomes ζ for every t tasks added, t f l , the task calculation time is:
[0086]
[0087] The task calculation speed at this time is still:
[0088]
[0089] If the tasks processed simultaneously exceed the threshold of the total number of CPU cycles of task vehicle a, other task offloading solutions are adopted. If the task offloading solution of transmitting to RSU is adopted, additional monetary costs will be incurred. If the task offloading solution of transmitting to surrounding truck vehicles is adopted, the additional energy consumption generated by MEC task processing needs to be considered.
[0090] The task of unloading to the truck vehicle is specifically:
[0091] 1) First, determine a truck vehicle for task unloading:
[0092] For all trucks, define a truck vehicle set M, and a task vehicle a is based on the computing capacity C that can be allocated M , distance D a,j , task occupancy G three factors to select the surrounding trucks, optimize the candidate vehicles, and select an alternative truck; for the task occupancy g j ∈G,g j ∈{0,1,2,3}, when g=0, the truck has no task occupied; when g=1, the truck has one task being processed; when g=2, the truck will face two tasks to be processed at the same time, which will cause task congestion, similar to local task unloading, and the frequency of the CPU that can be allocated to each independent task will decrease; if a third task is still unloaded to the truck while two tasks are being unloaded, then g=3, and the tasks being processed simultaneously exceed the threshold of the total number of CPU cycles of the truck. The task will not be calculated, but the truck will be used as a relay node to be transferred to other adjacent roadside units RSU or other trucks; the transmission model of other trucks is the same as that of the truck. The task transmission delay can be obtained by referring to the following method And the transmission speed
[0093] The formula for comprehensive cost performance of trucks:
[0094] In the formula, α+β+γ=1, and α,β,γ∈(0,1), representing three discount factors. Among them, the larger the computing capacity of the truck, the better, the closer the driving distance to the task vehicle, the better, and the less task occupancy, the better. After selecting the optimal vehicle, the task vehicle a will be j Form a vehicle combination for task offloading;
[0095] 3) Total task delay
[0096] Mission vehicle a to truck m j The distance is:
[0097]
[0098] Truck j To Roadside Unit RSUr i The distance is:
[0099]
[0100] Truck j1 To the truck m j2 The distance is:
[0101]
[0102] According to the Friis transmission formula, we get the truck m j The received power from task vehicle a is obtained as:
[0103]
[0104] And the roadside unit RSU gets the information from the truck m j The received power is:
[0105]
[0106] And another truck M j2 Get from this truck M j1 The received power is:
[0107]
[0108] Among them, P M is the transmission power of the antenna of truck M, G M is the transmission gain of the antennas of the two trucks M, G R is the receiving gain of RSU, λ is the channel wavelength, D j,i is the relative distance from the truck M to the roadside unit RSU;
[0109] According to Shannon's theorem, the mission vehicle a and the truck m j The V2V link transmission speed is:
[0110]
[0111] and truck m j The transmission speed of the V2I link with the roadside unit RSU is:
[0112]
[0113] and truck m j The V2V link transmission speed with other trucks is:
[0114]
[0115] Where N is the interference between multiple transmissions, σ 2 is white noise, The bandwidth allocated to task vehicle a by the truck, is the bandwidth allocated by RSU to trucks, is the transmission bandwidth between different trucks, is the received power;
[0116] The task calculation rates are expressed as:
[0117]
[0118]
[0119]
[0120] For the calculation delay of the truck, it should be divided into g j = {0,1,2,3}, when g = 0,1, the CPU frequency of the truck is f M Not affected; when g ≥ 2, it is limited by the CPU cycle threshold, and the CPU frequency of the truck becomes ξf M , the system will process multiple tasks at the same time, resulting in task congestion; assuming that when g = 3, it exceeds the maximum threshold that the truck CPU can bear, and the truck will not perform calculations, but will act as a relay node to transfer the task to the nearest RSU or other trucks. At this time, there are three cases for discussion:
[0121] (a) If the truck is calculated directly, the truck m j The transmission delay is expressed as:
[0122]
[0123] Truck j The computational delay is expressed as:
[0124]
[0125] Then when the task is directly calculated in the truck, the total delay of task processing is expressed as:
[0126]
[0127] (b) If the truck m j As a relay node, the task is transferred to the adjacent roadside unit RSU. The transmission delay of the first segment of the task is:
[0128]
[0129] The transmission delay of the second segment is:
[0130]
[0131] The task calculates the delay as:
[0132]
[0133] Then when the task is transferred to the roadside unit RSU to complete the calculation, the total delay of task processing is expressed as:
[0134]
[0135] (c) If the truck M j1 Acting as a relay node, it transfers the task to another truck M. j2 , then the transmission delay of the first segment of the task is:
[0136]
[0137] The transmission delay of the second segment is:
[0138]
[0139] The task calculates the delay as:
[0140]
[0141] Then when the task is transferred to M j2 When the computation is completed within , the total delay of task processing is expressed as:
[0142]
[0143] The joint optimization problem in step S2 is specifically:
[0144] 1) The utility of task transmission should be the agent's network access cost minus the spectrum resource rental fee, and the utility at time t is:
[0145]
[0146] in, The tasks are transmitted to the roadside unit RSU and the tasks are transmitted to the truck m. j and the task was taken from the truck m j The transmission cost of relaying to the roadside unit RSU or other trucks, in units of per Hertz; λ1,λ2,λ3={0,1} are the selection or not of the three schemes respectively; are the bandwidths occupied by the task vehicle transmitting to the RSU, the task vehicle transmitting to the truck, and the truck transmitting to other edge terminals; a is the unit network access cost of the agent; The transmission speeds are as follows: the transmission speed from the task vehicle to the RSU, the transmission speed from the task vehicle to the truck, and the transmission speed from the truck to other equipment;
[0147] 2) The utility of task computing should be the cost of processing the task at the edge minus the cost of computing resources. The utility at time t is:
[0148]
[0149] where η a,R ,ηa,local ,η a,M ,η M,R or M are the task computation costs of each transmission type in the four types of task transmission, in units of joules; β is the energy consumed per CPU cycle when the task is processed at the edge; λ1, λ2, λ3, λ4 = {0, 1} are the selection or not of the four schemes respectively; There are four calculation rates respectively; f R ,f l ,f M are the CPU frequencies of three different computing methods; b represents the task computing resource fee charged by the agent;
[0150] 3) The total utility formula of vehicles and roadside units RSU in the system within a time slot should be:
[0151] U(t)=U comm (t)+U comp (t)
[0152] 4) So the total utility of the system should be the sum of the costs of each time slot:
[0153]
[0154] 5) Define the objective function as:
[0155] R
[0156] 6) The constraint function is:
[0157] 6-1) Decision constraints: Choose one of the three decisions:
[0158] λ1, λ2, λ3={0, 1}, and λ1+λ2+λ3=1
[0159] 6-2) Spectrum constraint: The spectrum occupied by task offloading shall not exceed its threshold:
[0160]
[0161]
[0162] 6-3) Task calculation constraint: The CPU cycles occupied by the calculation of each task cannot exceed the threshold of the total number of CPU cycles of the device:
[0163] f l ≤F L
[0164] f v ≤F v
[0165] 6-4) Task delay constraint: The delay of each task unloading cannot exceed the next task generation node:
[0166]
[0167]
[0168]
[0169]
[0170] In step S3, a deep reinforcement learning algorithm is used to solve the joint optimization problem.
[0171] Example 3
[0172] This embodiment provides an edge vehicle networking task offloading system, such as Figure 3 As shown, including:
[0173] A model building module, wherein the model building module builds a task unloading solution model according to information of task vehicles, roadside units RSU and trucks traveling on the highway;
[0174] An objective function module, wherein the objective function module analyzes the delay, energy consumption and monetary cost of three task offloading schemes of the task offloading scheme model respectively, determines an optimized objective function, and obtains a joint optimization problem;
[0175] A solution module is used to solve the joint optimization problem and obtain a task offloading solution.
[0176] The same or similar reference numerals correspond to the same or similar components;
[0177] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;
[0178] 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 present 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. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A method for offloading tasks in edge vehicle networking, characterized in that: The following steps are involved: S1: Build a task unloading solution model based on the task vehicle, roadside unit RSU and truck information traveling on the highway; S2: Analyze the delay, energy consumption and monetary cost of three task offloading schemes in the task offloading scheme model respectively, determine the optimization objective function, and obtain the joint optimization problem. The three task offloading schemes include transmitting the task to the roadside unit RSU, the task vehicle processing the task by itself, and the task offloading to the truck vehicle; S3: Solve the joint optimization problem to obtain a task offloading solution; The task offloading solution model in step S1 is specifically: Let the set of roadside units RSU be R, where each roadside unit RSU r i ∈R; trucks are a set M, where each truck m i ∈M; there are i roadside units RSU, with coordinates (r1, 20), (r2, 20), (r3, 20), ..., (r i , 20); there are j trucks with coordinates (m1, 10), (m2, 10), (m3, 10)..., (m j , 10), and the initial coordinates of the task vehicle a are (a, 0); The transmission rates between the task vehicle a and the roadside unit RSU and the truck are V a,R and v a,M , the task vehicle a travels at a constant speed on a section of highway from west to east, generating a task every x meters on average L a is the size of the task unloaded by task vehicle a, C a The total number of CPUs that vehicle a needs to pass through to process the task for the roadside unit RSU, x a The relative position of the task vehicle a relative to the starting point when the task is generated; D a,i or j The relative distance from the unloading object when generating the task for task vehicle a; The maximum processing delay of the task generated by task vehicle a; Task vehicle a can only unload tasks with the two nearest roadside units RSU, or with multiple trucks that are relatively close to each other; The task offloading scheme model in step S1 also considers the fading effect: Small-scale fading will not distort the received signal; The large-scale fading is: First, while the task vehicle is traveling, the time is divided into multiple time slots. Assume that the current time slot is t, t∈{1, 2, …, n}; Mission vehicle a to roadside unit RSU r i The distance D a,i for: According to the Friis transmission formula, the roadside unit RSU r is obtained i The received power from mission vehicle a is: Where P a is the transmission power of the antenna of mission vehicle a, G a is the transmission gain of the antenna, is the receiving gain of the i-th roadside unit RSU, λ is the channel wavelength; According to Shannon's theorem, we can get the distance from task vehicle a to roadside unit RSU r i Data transfer speed: Where N is the interference between multiple transmissions, σ 2 is white noise, is the bandwidth allocated to vehicle a by RSU, is the received power; In the task offloading solution model, there are four task processing methods: 1) The task is transmitted to the roadside unit RSU; 2) The mission vehicle handles the mission itself; 3) Unloading the task to the truck vehicle; 4) The task is balanced between unloading to the roadside unit RSU and truck vehicles; The task is transmitted to the roadside unit RSU, specifically: 1) First, find a roadside unit (RSU) that can offload tasks; Task vehicle a to the surrounding roadside units RSU r i Evaluation is performed based on the distance D a,i and the CPU frequency f of the roadside unit RSU R The two factors are used to optimize the selection of the candidate roadside unit RSU, and the best roadside unit RSU is selected as the roadside unit RSU for auxiliary calculation. The comprehensive cost-effectiveness formula of the roadside unit RSU is: Among them, α+β=1, and α, β∈(0,1), representing the discount factor; 2) Considering the overall overhead of task transmission to the roadside unit RSU: When the task vehicle a chooses to transmit the task to the roadside unit RSU r i , assuming that the speed s of the task vehicle a remains unchanged, there is an upper limit τ on the transmission delay before the next new task is generated: Where D a,i When generating a task for task vehicle a, the relative roadside unit RSU r i At this time, the overall bandwidth is Get the task offloading transfer time for: Where, L a The size of the task unloaded by task vehicle a, is the data transmission speed from task vehicle a to the roadside unit RSU, and the internal task calculation time of the roadside unit RSU is known Among them C a The total number of CPUs that vehicle a needs to pass through to process the task for the roadside unit RSU, f R The CPU frequency provided by the roadside unit RSU when processing the task, considering that the task vehicle a will still generate a new task within the next τ time, if the task unloading transmission time If it is greater than the time interval τ between each new task generation, the task unloading cannot be completed before the next task is generated. In this case, other task unloading schemes are used. The computation rate of a task is expressed as: The total delay is the transmission delay plus the task calculation delay: In step S2, the task vehicle processes the task by itself, specifically: Tasks are calculated locally, so there is no need to experience task offloading delays; when the number of tasks is 1 and there is no congestion, the task calculation time is equal to the total task processing time In the formula, f l is the CPU frequency when vehicle a handles the task by itself. The task calculation rate is: When the number of local computing tasks exceeds 1, the system will process multiple tasks at the same time, which will cause task congestion and the CPU frequency of each task will decrease. Assuming that the CPU frequency becomes ζ for every t tasks added, t f l , the task calculation time is: The task calculation speed at this time is still: If the number of tasks processed simultaneously exceeds the threshold of the total number of CPU cycles of task vehicle a, other task offloading schemes are adopted; The task of unloading to the truck vehicle is specifically: 1) First, determine a truck vehicle for task unloading: For all trucks, define a truck vehicle set M, and a task vehicle a is based on the computing capacity C that can be allocated M , distance D a,j , task occupancy G three factors to select the surrounding trucks, optimize the candidate vehicles, and select an alternative truck; for the task occupancy g j ∈G,g j ∈{0, 1, 2, 3}, when g=0, the truck has no task occupied; when g=1, the truck has one task being processed; when g=2, the truck will face two tasks to be processed at the same time, which will cause task congestion, similar to local unloading of tasks, and the frequency of the CPU that can be allocated to each independent task will decrease; if a third task is still unloaded to the truck while two tasks are being unloaded, then g=3, and the tasks being processed simultaneously exceed the threshold of the total number of CPU cycles of the truck, and the task will not be calculated, but the truck will be used as a relay node and transferred to other adjacent roadside units RSU or other trucks; the transmission model of other trucks is the same as that of the truck; the task transmission delay can be obtained by referring to the following method And the transmission speed The formula for comprehensive cost performance of trucks: In the formula, α+β+γ=1, and α, β, γ∈(0,1), representing three discount factors. Among them, the larger the computing capacity of the truck, the better, the closer the driving distance to the task vehicle, the better, and the less task occupancy, the better. After selecting the optimal vehicle, the task vehicle a will be j Form a vehicle combination for task offloading; 2) Total task delay Mission vehicle a to truck m j The distance is: Truck j To Roadside Unit RSU i The distance is: Truck j1 To the truck m j2 The distance is: According to the Friis transmission formula, we get the truck m j The received power from task vehicle a is obtained as: And the roadside unit RSU receives the information from the truck m j The received power is: And another truck M j2 Get from this truck M j1 The received power is: Among them, G M Indicates truck m j The transmission gain of the antenna, Represented as truck M j1 The transmit power of the antenna, For truck M j1 The transmission gain of the antenna, For truck M j2 The transmission gain of the antenna, G R is the receiving gain of RSU, λ is the channel wavelength, D j,i is the relative distance from the truck M to the roadside unit RSU; According to Shannon's theorem, the mission vehicle a and the truck m j The V2V link transmission speed is: and truck m j The transmission speed of the V2I link with the roadside unit RSU is: and truck m j The V2V link transmission speed with other trucks is: Where N is the interference between multiple transmissions, σ 2 is white noise, The bandwidth allocated to task vehicle a by the truck, The bandwidth allocated by RSU to trucks, is the transmission bandwidth between different trucks, is the received power; The task calculation rates are expressed as: For the calculation delay of the truck, it should be divided into g j = {0, 1, 2, 3}, when g = 0, 1, the CPU frequency of the truck is f M Not affected; when g ≥ 2, it is limited by the CPU cycle threshold, and the CPU frequency of the truck becomes ξf M , the system will process multiple tasks at the same time, resulting in task congestion; assuming that when g = 3, it exceeds the maximum threshold that the truck CPU can bear, and the truck will not perform calculations, but will act as a relay node to transfer the task to the nearest RSU or other trucks. At this time, there are three cases for discussion: (a) If the truck is calculated directly, the truck m j The transmission delay is expressed as: Truck j The computational delay of is expressed as: Then when the task is directly calculated in the truck, the total delay of task processing is expressed as: (b) If the truck m j As a relay node, the task is transferred to the adjacent roadside unit RSU. The transmission delay of the first segment of the task is: The transmission delay of the second segment is: The task calculates the delay as: Then when the task is transferred to the roadside unit RSU to complete the calculation, the total delay of task processing is expressed as: (c) If the truck M j1 Acting as a relay node, it transfers the task to another truck M. j2 , then the transmission delay of the first segment of the task is: The transmission delay of the second segment is: The task calculates the delay as: Then when the task is transferred to M j2 When the computation is completed within , the total delay of task processing is expressed as: The joint optimization problem in step S2 is specifically: 1) The utility of task transmission should be the agent's network access cost minus the spectrum resource rental fee, and the utility at time t is: in, The tasks are transmitted to the roadside unit RSU and the tasks are transmitted to the truck m. j and the task was taken from the truck m j The transmission cost of relaying to the roadside unit RSU or other trucks; λ1, λ2, λ3 = {0, 1} are the selection or not of the three schemes respectively; are the bandwidths occupied by the task vehicle transmitting to the RSU, the task vehicle transmitting to the truck, and the truck transmitting to other edge terminals; c is the unit network access cost of the agent; The transmission speeds are as follows: the transmission speed from the task vehicle to the RSU, the transmission speed from the task vehicle to the truck, and the transmission speed from the truck to other equipment; 2) The utility of task computing should be the cost of processing the task at the edge minus the cost of computing resources. The utility at time t is: where η a,R , η a,local , η a,M , η M,R or M are the task computation costs of each transmission type in the four types of task transmission; β is the energy consumed per CPU cycle when the task is processed at the edge; λ1, λ2, λ3, λ4 = {0, 1} are the selection or not of the four schemes respectively; There are four calculation rates respectively; f R , f l , f M are the CPU frequencies of three different computing methods; b represents the task computing resource fee charged by the agent; 3) The total utility formula of vehicles and roadside units RSU in the system within a time slot should be: U(t)=U comm (t)+U comp (t) 4) So the total utility of the system should be the sum of the costs of each time slot: 5) Define the objective function as: R 6) The constraint function is: 6-1) Decision constraints: Choose one of the three decisions: λ1, λ2, λ3={0,1}, and λ1+λ2+λ3=1 6-2) Spectrum constraint: The spectrum occupied by task offloading shall not exceed its threshold: 6-3) Task calculation constraint: The CPU cycles occupied by the calculation of each task cannot exceed the threshold of the total number of CPU cycles of the device: f l ≤F L f v ≤F v 6-4) Task delay constraint: The delay of each task unloading cannot exceed the next task generation node:
2. The edge vehicle networking task offloading method according to claim 1 is characterized in that: In step S3, a deep reinforcement learning algorithm is used to solve the joint optimization problem.
3. An edge vehicle networking task offloading system, characterized in that: The system is applied to the method described in claim 1 or 2, comprising: A model building module, wherein the model building module builds a task unloading solution model according to information of task vehicles, roadside units RSU and trucks traveling on the highway; An objective function module, wherein the objective function module analyzes the delay, energy consumption and monetary cost of three task offloading schemes of the task offloading scheme model respectively, determines an optimized objective function, and obtains a joint optimization problem; A solution module is used to solve the joint optimization problem and obtain a task offloading solution.
Citation Information
Patent Citations
Edge Internet-of-vehicles task unloading method suitable for RSU coverage switching
CN112055329A
Internet of Vehicles mobile edge computing task unloading method and system based on learning pruning
CN112512013A