A dual dependency-based edge offloading method for Internet of Vehicles

By adopting an edge computing task unloading method based on the dual dependence of timing and data in the Internet of Vehicles scenario, combined with the improved scatter group algorithm, the problems of high task unloading costs and poor real-time performance in the Internet of Vehicles are solved, and efficient resource utilization and operational cost reduction are achieved.

CN119364433BActive Publication Date: 2025-04-04EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411896334.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-04
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In the scenario of Internet of Vehicles, the task unloading method of intelligent connected vehicles is difficult to effectively minimize the total processing cost of all unloading tasks, especially to adapt to the real-time requirements of sensitive services while ensuring the minimum resource consumption.

Method used

Adopting an edge computing task offload method based on the dual dependence of timing and data, by dividing the computing tasks of intelligent connected vehicles into multiple subtasks, and constructing a subtask calculation delay model, combining the communication model and the computing cost model, a constraint problem is established for generating the optimal unloading strategy, and the improved squid group algorithm is used for optimization.

Benefits of technology

It effectively minimizes the task offload cost in the edge network of the Internet of Vehicles, improves the real-time task processing and resource utilization rate, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364433B_ABST
    Figure CN119364433B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of vehicle network edge computing unloading technology, and specifically to a vehicle network edge unloading method based on dual dependency relationships, firstly dividing the computing tasks of intelligent networked vehicles into multiple subtasks with dependencies according to the dual dependency relationships of timing and data, and constructing a subtask computing delay model; constructing a communication model between a scheduling base station and a vehicle user, a scheduling base station and an idle vehicle, and a scheduling base station and an edge server according to the subtask computing delay model, then constructing a computing cost model according to the communication model, and establishing a constraint problem for generating an optimal unloading strategy; then modeling the constraint problem as an unloading optimization model, using an improved Salp Sea Squid swarm algorithm to solve the unloading optimization model to obtain an optimal unloading strategy, and unloading the subtasks that the vehicle user needs to unload to an idle vehicle or an edge server according to the optimal unloading strategy. The method can ensure the optimal task computing unloading strategy under limited resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Vehicles edge computing offloading technology, and is a task offloading method based on mobile edge computing and dual dependency in an Internet of Vehicles scenario. Background Art

[0002] The rapid development of the Internet of Vehicles has triggered an unprecedented surge in intelligent vehicle applications, and more on-board sensors are needed to provide intelligent in-vehicle services for cars. Many emerging in-vehicle services, including autonomous driving, intelligent transportation, interactive games, etc., require highly intensive data processing, network communication resources and low-latency communication capabilities. As the demand for intelligent in-vehicle services becomes more and more vigorous, how to use the real-time information of multiple sensors for effective data processing is a research direction with great potential.

[0003] When it comes to vehicle services, two key issues need to be considered: service completion time and energy consumption. In high-security applications such as navigation and unmanned driving, how to shorten the system's operating time is particularly important. At the same time, due to the vehicle's own energy constraints, the intelligent in-vehicle services provided by multiple sensors require high computing power, which in turn generates high energy consumption. The key point for new energy vehicles is how to reduce energy consumption by optimizing the computing efficiency of in-vehicle services, thereby extending the endurance and battery life of new energy vehicles.

[0004] Intelligent vehicles (i.e., smart connected vehicles) divide the task processing requirements generated by several sensors into several computing subtasks, and distribute some or all of the computing subtasks among multiple computing units (such as edge servers, cloud servers, etc.) to jointly complete data processing and transmission. This method shortens the task completion time and achieves a higher resource utilization rate. However, the data dependency problem between subtasks has always been a difficult problem that plagues the task offloading strategy of smart connected vehicles. To this end, it is necessary to further study the task offloading algorithm so that it can better adapt to the real-time requirements of sensitive services while ensuring the minimum resource consumption.

[0005] At the same time, wireless network operators are particularly concerned about cost-effectiveness. In the process of intelligent connected vehicle task offloading, the task will be offloaded to different computing units for processing and calculation and returned to the task vehicle. In the collaboration between different computing entities, the operating costs generated may vary greatly. In addition, although the advantage of subtasks is that they have lower computing difficulty and less transmission data volume compared with the initial tasks generated by the vehicle, in actual applications, the computing tasks of intelligent connected vehicles are undertaken by edge servers or idle vehicles, and users need to pay for their data transmission, energy consumption and task execution costs. The existing intelligent connected vehicle task offloading methods mainly consider the overall latency and energy consumption of the calculation, and do not consider the waste of resources generated when completing the offloaded tasks, such as the imbalanced allocation of resources of local vehicles or edge servers, the waste of computing time allocation, the waste caused by the idle time of computing resources of edge servers or idle vehicles, etc., which will increase the operating costs of network operators. Therefore, the optimal task offloading strategy needs to minimize the coordination cost between tasks. Summary of the invention

[0006] The object of the present invention is to provide an edge computing task offloading method based on dual dependencies of timing and data in an edge network environment, which can effectively minimize the total processing cost of all offloaded tasks.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0008] The present invention discloses a vehicle networking edge unloading method based on dual dependency, comprising the following steps:

[0009] Step (1) divides the computing task of the intelligent connected vehicle into multiple subtasks with dependencies based on the dual dependencies of timing and data, and constructs a subtask computing delay model. The specific steps include:

[0010] Step (11), the Internet of Vehicles task offloading system includes multiple vehicle users who need to offload computing tasks, a scheduling base station that provides task scheduling, and an edge server. Within the edge server range where each vehicle user is located, there are multiple idle vehicles that can provide computing offloading. All intelligent connected vehicles (including vehicle users and idle vehicles) have the same local computing power, and each vehicle user has at least one splittable computing-intensive task that needs to be offloaded. The computing-intensive task can be split into several subtasks with dual dependencies on timing and data.

[0011] Step (12), the vehicle user Computationally intensive tasks The subtasks are divided into subtasks, for any subtask Modeled as ,in, Represents a subtask The number of , Represents a subtask The amount of tasks, For subtask The amount of output data, Indicates the location where the subtask will be unloaded. , where 0 means local unloading, 1 means unloading to the edge server, and 2 means unloading to an idle vehicle; Indicates the computational intensity of the task; Among the subtasks, the initial subtask and the ending subtask It should be executed on the local device, and the remaining subtasks should be offloaded as needed;

[0012] Step (13), modeling and analyzing the three situations where the vehicle user places the subtask for local processing, offloads it to the edge server for processing, and offloads it to an idle vehicle for processing, constructs a subtask calculation delay model, and calculates the start time and completion time of each subtask;

[0013] Step (2), constructing communication models between the dispatching base station and vehicle users, between the dispatching base station and idle vehicles, and between the dispatching base station and edge servers respectively according to the subtask calculation delay model, and then constructing a calculation cost model according to the communication model, and establishing a constraint problem for generating an optimal unloading strategy according to the communication model, the subtask calculation delay model, and the calculation cost model;

[0014] Step (3), modeling the constraint problem as an improved salp swarm unloading optimization model, using the improved salp swarm algorithm to solve the unloading optimization model, obtaining the optimal unloading strategy, and unloading the subtasks that the vehicle user needs to unload to the idle vehicle or edge server according to the optimal unloading strategy.

[0015] Furthermore, in step (11), the set of intelligent connected vehicles that need to offload computing tasks on multi-lane urban roads is represented as , represents any vehicle user in the task offloading system, represents the total number of vehicle users who need task offloading services in the current road section. The local computing capacity of all intelligent connected vehicles is ; The set of computationally intensive tasks is represented as ; represents any computationally intensive task in the task offloading system, Indicates the total number of computationally intensive tasks that require task offloading services in the current road section; a directed acyclic graph is used to represent the dual dependencies of subtasks in terms of timing and data. Each node in the directed acyclic graph represents a subtask that can be calculated independently. , each edge in the directed acyclic graph represents the dependency relationship between subtasks, with weights To describe the subtask The amount of output data, , is the output result coefficient; there is a scheduling base station in the task offloading system to perform task scheduling, and the scheduling base station set is expressed as , r represents any scheduling base station that provides task scheduling in the task offloading system, Indicates the total number of scheduling base stations that provide task scheduling in the current road section; there are idle vehicles within the edge server range that can provide computing offloading, and the idle vehicle set is defined as , represents any idle vehicle in the task offloading system, represents the total number of idle vehicles that can provide task offloading services in the current road section; the edge server set is represented by , represents any edge server in the task offloading system, represents the total number of edge servers that can provide task offloading services in the current road segment; assuming that the total computing resources of all edge servers are expressed as , each edge server All have independent computing capabilities. The computing capabilities of edge servers are recorded as , the edge server is assigned to the vehicle user The computing resources are ; The total computing power provided by all idle vehicles is recorded as , idle vehicles are allocated to vehicle users The computing resources are .

[0016] Furthermore, the specific steps of step (13) are as follows: for the three situations of local processing, edge server processing, and idle vehicle processing, the vehicle user Subtasks The start time of local processing is expressed as , the start time of processing on the edge server is expressed as , the start time of processing on an idle vehicle is expressed as ; Vehicle users Subtasks The completion time of local processing is expressed as , the completion time of processing on the edge server is expressed as , the completion time of processing on the idle vehicle is expressed as ;

[0017] Step (131), when the vehicle user Subtasks When processing locally, vehicle users can Subtasks The local processing starts at:

[0018] ,

[0019] in, Idle time of local processing computing resources; subtask The start time is to take the predecessor subtask set The maximum value between the completion time of the subtask with the longest medium latency and the idle time of the local processing computing resources; Indicates that the previous subtask is the last predecessor subtask Completion time of local processing, , Indicates the last predecessor subtask The completion time of processing at the edge server, Indicates the last predecessor subtask At the completion time of idle vehicle processing, represents the transmission delay of offloading the total amount of data required for the computational subtask to the local vehicle for processing;

[0020] Subtasks The completion time of the local processing for the subtask The start time of local processing, the task processing time calculated by the local processor, and the time when the local processor transfers the subtask The amount of output data The sum of the time for successfully uploading to the scheduling base station, subtask The completion time for local processing is defined as follows:

[0021] ,

[0022] in, Represents a subtask Task processing time calculated on the local processor, Indicates that the local processor will subtask The amount of output data The time of successful upload to the scheduling base station;

[0023] Step (132), if the vehicle user Subtasks The dispatched base station is unloaded to the idle vehicle for processing, then the subtask The prerequisite for processing on idle vehicles is the subtask Successfully uploaded to an idle vehicle, and the idle vehicle has free computing resources and subtasks The predecessor subtask has been completed; the vehicle user Subtasks The start time of processing on an idle vehicle is expressed as follows:

[0024] ,

[0025] in, is the idle time of computing resources of idle vehicles, represents the transmission delay of offloading the total amount of data required for the computational subtask to the idle vehicle;

[0026] When the subtask is satisfied The start execution condition on the idle vehicle, then the subtask The completion time of idle vehicle processing is the subtask Start time, subtasks processed on idle vehicles The computation time on the idle vehicle and the idle vehicle will be subtask The amount of output data The sum of the time it takes to upload to the scheduling base station; therefore, the subtask The completion time for processing on an idle vehicle is defined as follows:

[0027] ,

[0028] in, Represents a subtask Computation time on idle vehicles, Indicates that idle vehicles will be subtasks The amount of output data Time of uploading to the scheduling base station;

[0029] Step (133), if the vehicle user Subtasks The scheduled base station is unloaded to the edge server for processing, then the subtask The prerequisite for processing on the edge server is that the subtask Successfully uploaded to the edge server, and the edge server has idle computing resources and subtasks The predecessor subtasks of have been completed; The start time of processing on the edge server is expressed as follows:

[0030] ,

[0031] in, is the idle time of computing resources of edge servers, represents the transmission delay of offloading the subtask to the edge server;

[0032] When the subtask is satisfied The start execution condition of the subtask The completion time of the subtask processed on the edge server Start time, subtask processed on edge server The computation time on the edge server and the time it takes to process the subtasks The amount of output data The sum of the time it takes to successfully upload to the scheduling base station; therefore, the subtask The completion time for processing on the edge server is defined as follows:

[0033] ,

[0034] in, Represents a subtask Computation time on edge servers, Indicates that the edge server will subtask The amount of output data The time when the data is successfully uploaded to the scheduling base station.

[0035] Furthermore, in step (2), the specific steps of constructing the communication model are as follows: in order to reduce the collaborative processing delay, the communication channel models between the scheduling base station and the vehicle user, the scheduling base station and the edge server, and the scheduling base station and the idle vehicle uniformly adopt the Rayleigh channel model, and the calculation formula for the data transmission rate between the scheduling base station and the vehicle user is:

[0036] ,

[0037] in, Represents a moving vehicle user The transmission power, represents the channel gain between the scheduling base station and the user vehicle that needs to offload the computing task, represents the channel bandwidth, represents the Gaussian white noise power;

[0038] The calculation formula for the data transmission rate between the dispatching base station and the idle vehicles is:

[0039] ,

[0040] in, represents the transmission power of the moving idle vehicle z, represents the channel gain between the scheduling base station that needs to offload the computing task and the idle vehicle;

[0041] The calculation formula for the data transmission rate between the scheduling base station and the edge computing server is:

[0042] ,

[0043] in, represents the transmit power of the edge server, Indicates the channel gain between the scheduling base station and the edge server where the computing task needs to be offloaded.

[0044] Furthermore, in step (2), the computing cost model includes a local computing cost model, an idle vehicle computing cost model, and an edge server computing cost model. The specific steps for constructing the computing cost model are:

[0045] Step (221), construct a local computation cost model:

[0046] Local computing subtasks The amount of tasks is , then the execution delay of the local calculation is the subtask The task processing time calculated on the local processor is , the local energy consumption is , computationally intensive tasks In the local calculation of the vehicle user, there is no need to download tasks, only local calculation and output result data upload or download are needed. The local calculation energy consumption cost is defined as , then the energy consumption cost is calculated locally The calculation formula is as follows:

[0047] ,

[0048] ,

[0049] E ( i , j ) loc = P i × [ t ( i , j ) back . loc + t ( i , j ) loc . exe ] ,

[0050] ,

[0051] in, represents the local computing power of the vehicle user, Indicates vehicle user The power of local computing devices, a minimum charge to cover vehicle unloading costs;

[0052] Step (222), construct an idle vehicle calculation cost model:

[0053] Computationally intensive tasks Subtask of offloading to idle vehicles The amount of tasks is , define the set of predecessor subtasks The last predecessor task in The output data volume is , according to the idle vehicle execution unloading task delay, that is, subtask Computation time on idle vehicle , offloading the total amount of data required for the computational subtask to the transmission delay of the idle vehicle , and the data transmission time of idle vehicles, that is, idle vehicles will be subtasks The amount of output data Time uploaded to the scheduling base station Calculate the total energy consumption of idle vehicles , the energy consumption cost of idle vehicles is defined as , then the energy consumption cost of idle vehicles is calculated as The calculation formula is as follows:

[0054] ,

[0055] ,

[0056] ,

[0057] ,

[0058] ,

[0059] in, is the power of the data transmission equipment of the idle vehicle, Indicates the equipment power of the idle vehicle, a minimum charge to cover vehicle unloading costs;

[0060] Step (223), constructing edge server computing cost model:

[0061] According to subtask Computation time on edge servers , the transmission delay of offloading subtasks to edge servers , and the data transmission time of the edge server, that is, the edge server transfers the subtask The amount of output data Time when the data is successfully uploaded to the dispatch base station Calculate the total energy consumption of edge servers , where when the edge server is not computing, it will enter low-power standby mode, and the energy consumption in low-power standby mode is negligible; users need to pay the corresponding fees to the edge server operator, and the edge computing unloading energy consumption cost of the edge server is defined as , then the energy consumption cost of edge computing offloading on edge servers is The calculation formula is as follows:

[0062] ,

[0063] ,

[0064] ,

[0065] ,

[0066] ,

[0067] in, is the device power of the edge server, The power of data transmission for edge servers, Minimum charges for offloading costs to edge servers.

[0068] Furthermore, in step (2), the specific steps of establishing the constraint problem for generating the optimal offloading strategy according to the communication model, the subtask calculation delay model, and the calculation cost model are as follows:

[0069] In the Internet of Vehicles, the issue that vehicle users need to consider when offloading task computation is the economic cost. The optimal offloading strategy is to maximize the delay in task processing. Under the constraints, the energy consumption cost of task offloading service is minimized by optimizing the offloading decision; based on offloading part of the computing tasks of multiple vehicle users to idle vehicles or edge servers to obtain the required computing resources to assist in data processing, the multi-constraint task offloading service energy consumption cost minimization problem is modeled; comprehensive communication model, subtask computing delay model, and computing cost model, the total task offloading service energy consumption cost in the task offloading system of intelligent connected vehicles is the sum of the local computing energy consumption costs of all vehicle users, the computing energy consumption costs of all idle vehicles, and the edge computing offloading energy consumption costs of all edge servers; the total task offloading service energy consumption cost in the task offloading system It is expressed as:

[0070] ,

[0071] The execution delay of dependent tasks of vehicle user u It is expressed as:

[0072] ,

[0073] in, Indicates the completion time of the final subtask. Indicates the completion time of the initial subtask;

[0074] It is represented by the sum of the computing energy consumption of all vehicle users’ local computing, idle vehicles, and edge servers. The calculation formula is as follows:

[0075] ;

[0076] The constraint problem of minimizing the energy consumption cost of task offloading service is described as:

[0077] ,

[0078] s . t . { Q ( i , j ) ∈ { 0 , 1 , 2 } 0 ≤ f m mec ≤ f mec , ∀ i ∈ [ 1 , I ] ∑ i = 1 I f m mec ≤ f mec all , ∀ i ∈ [ 1 , I ] f z lei ≤ f lei , ∀ i ∈ [ 1 , I ] ST ( i , j ) > FT ( i , j ) FT ( i , J ) local − FT ( i , 1 ) local ≤ T i max ,

[0079] in, represents the minimization of the energy consumption cost of the task offloading service, represents the total task offloading service cost in the task offloading system. The first constraint Indicates that in the subtask The calculation is performed under the condition that the calculation is offloaded to one of the three: local, idle vehicle, and edge server; the second constraint 0 ≤ f m mec ≤ f mec , ∀ i ∈ [ 1 , I ] Indicates that the computing resources of the edge server allocated to each task do not exceed the upper limit of the computing resources of the edge server processing the corresponding task; the third constraint ∑ i = 1 I f m mec ≤ f mec all , ∀ i ∈ [ 1 , I ] Indicates that the sum of resources allocated to all tasks does not exceed the total computing resources of all edge servers; the fourth constraint f z lei ≤ f lei , ∀ i ∈ [ 1 , I ] Indicates that the idle vehicle computing resources allocated to each task do not exceed the total computing capacity of all idle vehicles; the fifth constraint It means that the subtasks need to be calculated strictly according to the timing and data dependency, that is, the next subtask can only be processed after the predecessor subtask is completed; the sixth constraint Indicates that the task processing delay cannot be greater than the maximum delay constraint.

[0080] Furthermore, in step (3), the specific steps of using the improved salp swarm algorithm to solve the unloading optimization model are as follows:

[0081] Step (31), initialize the parent population, and set the index set of the salps individuals in the population to be , represents any individual salp in the population, L represents the total number of salps; set the maximum number of iterations T and set the current number of iterations t=0;

[0082] Step (32), construct the fitness function of the individual salps in the parent population. The fitness function of the individual salps is defined as: ,in, Indicates individual salps The fitness function of represents the total task offloading service cost; Indicates the moment when the task processing delay does not exceed the maximum delay constraint value, otherwise a penalty will be imposed. is the task processing delay penalty coefficient, Indicates that the amount of data for the subtask does not exceed the sum of all computing resources, otherwise a penalty will be imposed. Indicates the penalty coefficient for exceeding the task data volume; determines whether the current number of iterations is greater than the maximum number of iterations of the salp swarm algorithm. If the current number of iterations is less than the maximum number of iterations, executes the next step (33); otherwise, outputs the fitness value of the best salp individual in the current population;

[0083] Step (33), the salps in the salp group are divided into leaders and followers. The leader leads the group to find the best food, while the followers follow the salps that are closest to them and use the individual aggregation following strategy to update the leader's position. The specific operation process is as follows:

[0084] First, calculate the fitness values ​​of all salps in the population. According to the size of the fitness value, the position of the salp with the best fitness value (i.e., the smallest fitness value) is regarded as the location of the food source, denoted as F (the optimal solution before the update). Each update of the leader's position is moving towards the food source, and the first salp in the population is regarded as the leader, and the leader's position is denoted as , and then update the leader's position. The leader's position update formula is as follows:

[0085] ,

[0086] ,

[0087] in, represents the spatial distribution measure, Indicates the measurement Individual salps and the center of the population The spatial distance between It means that the vector has G dimensions, g means the g-th dimension of the vector, Represents the position of leader, is the position of the food source in the gth dimension (the optimal solution before updating); Indicates The salp individuals are The coordinate values ​​in the dimension, represents the average value of the coordinates of all salps in the gth dimension, representing the center position of the population, is the lower bound vector of the search space, is the upper limit vector of the search space; It is an important control parameter used to balance exploration and exploitation in the iterative optimization process through the improved salp swarm algorithm. and For [ 0 , 1 ] The random number in is used to enhance the leader's random exploration of the search space. Used to control the direction of movement. Used to control the step size of movement;

[0088] Among them, the control parameters Defined as , Represents the cosine similarity between two vectors, vector Indicates that the current salp individual at the tth iteration is The position relationship between the individual salps and the individual salps with the smallest fitness value, vector Indicates the positional relationship between any other salp individual in the population and the salp individual with the smallest fitness value at the tth iteration;

[0089] vector and vector Defined as: ,

[0090] in, Indicates that at the tth iteration, The location of each salp individual, represents the position of any other salp individual in the population at the tth iteration, is the position of the best salp individual in the population at the tth iteration;

[0091] Step (34), using cosine similarity to explore the transition strategy to adjust the control parameters of the leader position update, the specific process is: by measuring the distribution of the position of the optimal salp individual and the positions of the surrounding salps, constructing the vector between the current salp individual position and the optimal salp individual position, calculating the cosine similarity between the two vectors, and obtaining the control parameters of the leader position update; defining the cosine similarity between the two vectors The value range is [ − 1 , 1 ] ,in, When the value is 1, it means the angle between the two vectors is , there is an overlap, which means that the two vectors are highly similar or basically the same; When the value is -1, it means that the two vectors are in opposite directions;

[0092] The cosine similarity between two vectors represents the cosine similarity between the positions of two salps. The calculation formula for the cosine similarity between the positions of two salps is:

[0093] ,

[0094] Among them, the molecule For vector and vector The inner product of For vector and vector The higher the cosine similarity, the easier it is for the position of the current salp individual to coincide with the position of any other salp individual in the population. The cosine similarity between the position of a salp individual and the positions of all other salps in the population works together with the threshold P to enhance the algorithm's ability to jump out of extreme values; the calculation formula of the threshold P is as follows:

[0095] ,

[0096] Among them, P represents the average distance between all salps individuals, which is used as the threshold;

[0097] Step (35), using the leader-follower adaptive adjustment strategy to update the follower position, the specific steps are:

[0098] The movement of the follower is guided by the leader, and the follower will follow the salp individual closest to it. The position update formula of the follower is as follows:

[0099] ,

[0100] in, Indicates The first iteration The number of followers of a salp individual Dimensional location, Indicates the tth iteration The first Dimensional location, Indicates the tth iteration The first Dimensional location;

[0101] Step (36), after the position update of the follower is completed, the fitness value of each salp individual needs to be recalculated, and the fitness value of the best salp individual in the population is compared with the fitness value of the food source, and the position of the salp individual corresponding to the best fitness value between the two is updated to the position of the new food source;

[0102] Step (37), increase the number of iterations by 1, and repeat the above steps (33) to (36), so as to perform the next leader position update and follower position update, until the termination condition is reached, that is, the number of iterations reaches the maximum number of iterations T, then stop the iteration and output the location of the current food source, that is, obtain the location of the global optimal salp individual;

[0103] Step (38), determining the unloading strategy according to the output position of the global optimal salp individual, and executing the task unloading of the vehicle user according to the unloading strategy, restoring the position of the global optimal salp individual into the form of the original optimization parameter solution, and according to the obtained solution, executing the allocation of task computing resources of the task vehicle, judging whether the subtask needs to be unloaded to an idle vehicle or an edge server, determining the execution order of all subtasks and executing them.

[0104] Compared with the prior art, the present invention has the following beneficial effects:

[0105] (1) The dependent task unloading method in the vehicle networking scenario disclosed in the present invention takes into account the different dependencies between each subtask, proposes the concept of dependent tasks, and divides the vehicle-mounted task into multiple subtasks with time sequence and data before task unloading, and has different unloading methods for the subtasks, thereby reducing the time for vehicle task unloading. On this basis, the present invention constructs a constraint problem according to the conditions and characteristics between vehicle users, idle vehicles, edge servers and subtasks, and uses an improved salp swarm algorithm to optimize the unloading strategy, further reducing the cost required for task unloading.

[0106] (2) The present invention uses an improved salp swarm algorithm for search and introduces an individual clustering following strategy and a cosine similarity exploration conversion strategy, which greatly improves the performance of the method of the present invention and can well achieve the goal of minimizing the vehicle task computation offloading cost.

[0107] (3) Establishment and solution of multi-objective optimization model. The present invention establishes a multi-constraint optimization problem for generating the optimal offloading strategy by constructing a communication model, a computational cost model, etc. The improved salp swarm algorithm is used to solve the optimization problem, which not only considers the maximum delay constraint of task processing, but also comprehensively considers the economic cost of task offloading. This multi-objective optimization model can effectively strike a balance between processing delay and economic cost, ensuring the optimal computational offloading strategy under limited resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] Figure 1 The present invention is a general flow chart of a vehicle networking edge unloading method based on dual dependency relationships;

[0109] Figure 2 is a flow chart of an improved salp swarm algorithm in the method of the present invention;

[0110] Figure 3 This is a simulation verification diagram of the improved salp swarm algorithm in the method of the present invention. DETAILED DESCRIPTION

[0111] The specific implementation modes of the present invention will be described in further detail below with reference to the accompanying drawings.

[0112] like Figure 1 A vehicle network edge unloading method based on dual dependency relationship is shown, comprising the following steps:

[0113] Step (1) divides the computing task of the intelligent connected vehicle into multiple subtasks with dependencies based on the dual dependencies of timing and data, and constructs a subtask computing delay model. The specific steps include:

[0114] Step (11), the set of intelligent connected vehicles that need to offload computing tasks on multi-lane urban roads is represented as , represents any vehicle user in the task offloading system, Represents the total number of vehicle users who need task offloading services in the current road segment. Assume that all intelligent connected vehicles have the same local computing power , and each intelligent connected car has a computationally intensive task to be offloaded. The set of computationally intensive tasks is expressed as . represents any computationally intensive task in the task offloading system, Indicates the total number of computationally intensive tasks that require task offloading services in the current road segment. It is a splittable task, which includes several subtasks with dual dependencies of timing and data. The dual dependencies of timing and data of subtasks are represented by a directed acyclic graph (DAG graph). Each node in the directed acyclic graph represents a subtask that can be calculated independently. , each edge in the directed acyclic graph represents the dependency relationship between subtasks, with weights To describe the subtask The amount of output result data. In the task offloading system, there is a scheduling base station to schedule tasks. The set of scheduling base stations is represented as , r represents any scheduling base station that provides task scheduling in the task offloading system, Indicates the total number of dispatching base stations that provide task scheduling in the current road section. There are idle vehicles within the edge server where each smart connected car is located that can provide computing offload. The idle vehicle set is defined as , represents any idle vehicle in the task offloading system, represents the total number of idle vehicles that can provide task offloading services in the current road section. The edge server (i.e., MEC server) set is represented as , represents any edge server in the task offloading system, represents the total number of edge servers that can provide task offloading services in the current road segment. Assume that the total computing resources of all edge servers are expressed as , each edge server All have independent computing capabilities. The computing capabilities of edge servers are recorded as , the edge server is assigned to the vehicle user The computing resources are ; The total computing power provided by all idle vehicles around is recorded as , idle vehicles are allocated to vehicle users The computing resources are .

[0115] Step (12), the vehicle user Corresponding computationally intensive tasks The subtasks are divided into subtasks, for any subtask Modeled as ,in, Represents a subtask The number of , Represents a subtask The amount of tasks, For subtask The amount of output data, , is the output result coefficient, Indicates the location where the subtask will be unloaded. , where 0 means local offloading, 1 means offloading to the edge server, and 2 means offloading to an idle vehicle. Some of the subtasks, such as user interaction tasks and device input / output (I / O) tasks, can be processed locally. Indicates the computational intensity of the task. The other part, especially the computational tasks involving a large amount of data, can be offloaded to edge servers or idle vehicles. Whether to offload subtasks to edge servers or idle vehicles is determined by the offloading strategy. and Should be executed on the local device, the task is the initial subtask, The last subtask before the task is processed is the ending subtask. The remaining subtasks can be offloaded as needed. Although there are often data dependencies between different subtasks in the same task, these subtasks can still be processed on different devices, so that fine-grained offloading decisions can be achieved.

[0116] Step (13), construct a subtask calculation delay model to calculate the start time and completion time of each subtask: During the onboard dependent task calculation process, the vehicle user can place the subtask for local processing, or assign it to the edge server for processing, or assign it to the surrounding idle vehicles for processing. For this purpose, modeling and analysis are performed for the three situations of local processing, edge server processing, and idle vehicle processing. Subtasks The start time of local processing is expressed as , the start time of processing on the edge server is expressed as , the start time of processing on an idle vehicle is expressed as ; Vehicle users Subtasks The completion time of local processing is expressed as , the completion time of processing on the edge server is expressed as , the completion time of processing on the idle vehicle is expressed as .

[0117] Step (131), when the vehicle user Subtasks When processing locally, vehicle users can Subtasks The local processing starts at:

[0118] ,

[0119] in, Idle time of local processing computing resources; subtask The start time is to take the predecessor subtask set The maximum value between the completion time of the subtask with the longest delay and the idle time of the local processing computing resources; Indicates that the previous subtask is the last predecessor subtask Completion time of local processing, , Indicates the last predecessor subtask The completion time of processing at the edge server, Indicates the last predecessor subtask At the completion time of idle vehicle processing, It represents the transmission delay of offloading the total amount of data required for the computational subtask to the local vehicle for processing.

[0120] Subtasks The completion time of the local processing for the subtask The start time of local processing, the task processing time calculated by the local processor, and the time when the local processor transfers the subtask The amount of output data The sum of the time for successfully uploading to the scheduling base station, subtask The completion time for local processing is defined as follows:

[0121] ,

[0122] in, Represents a subtask Task processing time calculated on the local processor, Indicates that the local processor will subtask The amount of output data The time when the data is successfully uploaded to the scheduling base station.

[0123] Step (132), if the vehicle user Subtasks The dispatched base station is unloaded to the idle vehicle for processing, then the subtask The prerequisite for processing on idle vehicles is the subtask Successfully uploaded to an idle vehicle, and the idle vehicle has free computing resources and subtasks The predecessor subtask has been completed. Vehicle User Subtasks The start time of processing on an idle vehicle is expressed as follows:

[0124] ,

[0125] in, is the idle time of computing resources of idle vehicles, Represents the transmission delay of offloading the total amount of data required for computing subtasks to idle vehicles.

[0126] When the subtask is satisfied The start execution condition on the idle vehicle, then the subtask The completion time of idle vehicle processing is the subtask Start time, subtasks processed on idle vehicles The computation time on the idle vehicle and the idle vehicle will be subtask The amount of output data The sum of the time it takes to upload to the scheduling base station. Therefore, the subtask The completion time for processing on an idle vehicle is defined as follows:

[0127] ,

[0128] in, Represents a subtask Computation time on idle vehicles, Indicates that idle vehicles will be subtasks The amount of output data The time to upload to the scheduling base station.

[0129] Step (133), if the vehicle user Subtasks The scheduled base station is unloaded to the edge server for processing, then the subtask The prerequisite for processing on the edge server is that the subtask Successfully uploaded to the edge server, and the edge server has idle computing resources and subtasks The predecessor subtasks of have been completed. The start time of processing on the edge server is expressed as follows:

[0130] ,

[0131] in, is the idle time of computing resources of edge servers, Indicates the transmission delay of offloading the subtask to the edge server.

[0132] When the subtask is satisfied The start execution condition of the subtask The completion time of the subtask processed on the edge server Start time, subtask processed on edge server The computation time on the edge server and the time it takes to process the subtasks The amount of output data The sum of the time it takes to successfully upload to the scheduling base station. The completion time for processing on the edge server is defined as follows:

[0133] ,

[0134] in, Represents a subtask Computation time on edge servers, Indicates that the edge server will subtask The amount of output data The time when the data is successfully uploaded to the scheduling base station.

[0135] Step (2) constructs the communication models between the scheduling base station and the vehicle users who need to offload the computing tasks, the scheduling base station and the idle vehicles, and the scheduling base station and the edge server according to the subtask computing delay model, and then constructs the computing cost model according to the communication model. In addition, the constraint problem for generating the optimal offloading strategy is established according to the communication model, the subtask computing delay model, and the computing cost model.

[0136] Step (21), constructing a communication model: In order to reduce the collaborative processing delay, the communication channel model between the scheduling base station and the vehicle user, the scheduling base station and the edge server, and the scheduling base station and the idle vehicle uniformly adopts the Rayleigh channel model.

[0137] The calculation formula of the data transmission rate between the scheduling base station and the vehicle user is expressed as:

[0138] ,

[0139] in, Represents a moving vehicle user The transmission power, represents the channel gain between the scheduling base station and the user vehicle that needs to offload the computing task, represents the channel bandwidth, represents the Gaussian white noise power.

[0140] The calculation formula for the data transmission rate between the dispatching base station and the idle vehicles is:

[0141] ,

[0142] in, represents the transmission power of the moving idle vehicle z, represents the channel gain between the scheduling base station and the idle vehicle that needs to offload the computing task, represents the channel bandwidth, represents the Gaussian white noise power.

[0143] The calculation formula for the data transmission rate between the scheduling base station and the edge computing server is:

[0144] ,

[0145] in, represents the transmit power of the edge server, represents the channel gain between the scheduling base station and the edge server where the computing task needs to be offloaded, represents the channel bandwidth, represents the Gaussian white noise power.

[0146] Step (22), construct a computing cost model, which includes a local computing cost model, an idle vehicle computing cost model, and an edge server computing cost model:

[0147] Step (221), construct a local computation cost model:

[0148] Local computing subtasks The amount of tasks is , then the execution delay of the local calculation is the subtask The task processing time calculated on the local processor is , the local energy consumption is , computationally intensive tasks In the local calculation of the vehicle user, there is no need to download tasks, only local calculation and output result data upload or download are needed. The local calculation energy consumption cost is defined as (Unit: Yuan), then the local energy consumption cost is calculated The calculation formula is as follows:

[0149] ,

[0150] ,

[0151] E ( i , j ) loc = P i × [ t ( i , j ) back . loc + t ( i , j ) loc . exe ] ,

[0152] ,

[0153] in, represents the computational intensity of the task, represents the local computing power of the vehicle user, Represents the output result coefficient, Indicates vehicle user The power of local computing devices, A minimum charge to cover the cost of unloading the vehicle.

[0154] Step (222), construct an idle vehicle calculation cost model:

[0155] Computationally intensive tasks Subtasks of offloading to idle vehicles The amount of tasks is , the set of predecessor subtasks The last predecessor task in The output data volume is , the idle vehicle performs the unloading task delay, that is, the subtask The calculation time on an idle vehicle is , the transmission delay of offloading the total amount of data required for the computational subtask to the idle vehicle is , the data transmission time of the idle vehicle is the idle vehicle subtask The amount of output data The time to upload to the scheduling base station is , the total energy consumption of idle vehicles is , the energy consumption cost of idle vehicles is defined as (Unit: Yuan), then the energy consumption cost of idle vehicles is calculated as The calculation formula is as follows:

[0156] ,

[0157] ,

[0158] ,

[0159] ,

[0160] ,

[0161] in, represents the computational intensity of the task, Indicates the last predecessor subtask The amount of output data, is the power of the data transmission equipment of the idle vehicle, Indicates the equipment power of the idle vehicle, A minimum charge to cover the cost of unloading the vehicle.

[0162] Step (223), constructing edge server computing cost model:

[0163] Computationally intensive tasks Offloading subtasks to edge servers The amount of tasks is , the set of predecessor subtasks The last predecessor task in The output data volume is , Represents a subtask The computation time on the edge server and the transmission delay of offloading the subtask to the edge server are , the data transmission time of the edge server is the time for the edge server to transmit the subtask The amount of output data The time for successful upload to the scheduling base station is , the total energy consumption of the edge server is , where when the edge server is not computing, it will enter low-power standby mode, and the energy consumption in low-power standby mode can be ignored. Users need to pay the corresponding fees to the edge server operator, and the edge computing unloading energy consumption cost of the edge server is defined as (Unit: RMB), then the energy consumption cost of edge computing offloading of edge servers The calculation formula is as follows:

[0164] ,

[0165] ,

[0166] ,

[0167] ,

[0168] ,

[0169] in, is the device power of the edge server, The power of data transmission for edge servers, Minimum charges for offloading costs to edge servers.

[0170] Step (23), based on the communication model, subtask calculation delay model, and calculation cost model, establish the constraint problem of minimizing the energy consumption cost of task offloading service:

[0171] In the Internet of Vehicles, the issue that vehicle users must consider when offloading task computation is the size of the economic cost. The goal of this invention is to reduce the maximum latency of task processing. Under the constraints, minimize the service energy consumption cost required for task processing. Therefore, the service energy consumption cost can be minimized by optimizing the offloading decision. In the present invention, it is based on offloading part of the computing tasks of multiple vehicle users to idle vehicles or edge servers to obtain the required computing resources to assist in data processing, and this is modeled as a multi-constraint task offloading service energy consumption cost minimization problem. Comprehensive communication model, subtask computing delay model, and computing cost model, then the total task offloading service energy consumption cost in the task offloading system of the intelligent connected vehicle is the sum of the local computing energy consumption costs of all vehicle users, the computing energy consumption costs of all idle vehicles, and the edge computing offloading energy consumption costs of all edge servers; then the total task offloading service energy consumption cost in the task offloading system It is expressed as:

[0172] ,

[0173] The execution delay of dependent tasks of vehicle user u It is expressed as:

[0174] ,

[0175] in, Indicates the completion time of the final subtask. Indicates the completion time of the initial subtask;

[0176] It is represented by the sum of the computing energy consumption of all vehicle users’ local computing, idle vehicles, and edge servers. The calculation formula is as follows:

[0177] ;

[0178] The constraint problem of minimizing the energy consumption cost of task offloading service is described as:

[0179] ,

[0180] s . t . { Q ( i , j ) ∈ { 0 , 1 , 2 } 0 ≤ f m mec ≤ f mec , ∀ i ∈ [ 1 , I ] ∑ i = 1 I f m mec ≤ f mec all , ∀ i ∈ [ 1 , I ] f z lei ≤ f lei , ∀ i ∈ [ 1 , I ] ST ( i , j ) > FT ( i , j ) FT ( i , J ) local − FT ( i , 1 ) local ≤ T i max ,

[0181] in, represents the minimization of the energy consumption cost of the task offloading service, represents the total task offloading service cost in the task offloading system. The first constraint Indicates that in the subtask The calculation is performed under the condition that the calculation is offloaded to one of the three: local, idle vehicle, and edge server; the second constraint 0 ≤ f m mec ≤ f mec , ∀ i ∈ [ 1 , I ] Indicates that the computing resources of the edge server allocated to each task do not exceed the upper limit of the computing resources of the edge server processing the corresponding task; the third constraint ∑ i = 1 I f m mec ≤ f mec all , ∀ i ∈ [ 1 , I ] Indicates that the sum of resources allocated to all tasks does not exceed the total computing resources of all edge servers; the fourth constraint f z lei ≤ f lei , ∀ i ∈ [ 1 , I ] Indicates that the idle vehicle computing resources allocated to each task do not exceed the total computing capacity of all idle vehicles; the fifth constraint It means that the subtasks need to be calculated strictly according to the timing and data dependency, that is, the next subtask can only be processed after the predecessor subtask is completed; the sixth constraint Indicates that the task processing delay cannot be greater than the maximum delay constraint.

[0182] Step (3), modeling the constraint problem as an improved salp swarm unloading optimization model, using the improved salp swarm algorithm to solve the unloading optimization model, obtaining the optimal unloading strategy, and unloading the subtasks that the vehicle user needs to unload to the idle vehicle or edge server according to the optimal unloading strategy.

[0183] The specific steps of modeling the constraint problem as an improved salp swarm unloading optimization model are as follows: the improved salp swarm algorithm generates L salp individuals, that is, L vectors, by initializing the population. The dimensions of these vectors are the dimensions of the optimization problem, that is, the number of unknown variables in the objective function of the problem to be optimized. The subtask of calculating the unloading task uses five elements to represent the dimension of the optimization vector: ,in Indicates the amount of work for the subtask; For the task The completion time, End subtask completion time; is the maximum delay of task processing, Represents the total task offloading service cost in the task offloading system.

[0184] The process of solving the unloading optimization model using the improved salp swarm algorithm includes: initializing the parent population, defining the fitness function, using the individual aggregation following strategy to update the leader position, using the cosine similarity exploration conversion strategy to adjust the control parameters of the leader position update, and using the leader-follower adaptive adjustment strategy to update the follower position. The specific steps are as follows:

[0185] Step (31), initialize the parent population, and set the index set of the salps individuals in the population to be , represents any salp individual in the population, L represents the total number of salps individuals; any salp individual in the population represents one of the solutions to the problem to be optimized, sets the maximum number of iterations T and sets the current number of iterations t=0;

[0186] Step (32), construct the fitness function of the individual salps in the parent population. The fitness function of the individual salps is defined as: ,in, Indicates individual salps The fitness function of represents the total task offloading service cost; Indicates the moment when the task processing delay does not exceed the maximum delay constraint value, otherwise a penalty will be imposed. is the task processing delay penalty coefficient, Indicates that the amount of data for the subtask does not exceed the sum of all computing resources, otherwise a penalty will be imposed. Indicates the penalty coefficient for exceeding the task data volume. Determine whether the current number of iterations is greater than the maximum number of iterations of the salp swarm algorithm. If the current number of iterations is less than the maximum number of iterations, execute the next step (33). Otherwise, output the fitness function value of the best salp individual in the current population.

[0187] Step (33), the salps in the salp group are divided into leaders and followers. Usually, the first salp in the salp chain is the leader, and the remaining salps are followers. The leader leads the group to find the best food, while the followers follow the salps closest to it. Due to the interaction between the salps, the salps will not easily tend to a local feasible solution, and can avoid local optimality to a large extent. The specific operation process of using the individual aggregation following strategy to update the leader position is:

[0188] First, calculate the fitness values ​​of all salps in the population. According to the size of the fitness value, the position of the salp with the best fitness value (i.e., the smallest fitness value) is regarded as the location of the food source, denoted as F (the optimal solution before the update). Each update of the leader's position is moving towards the food source, and the first salp in the population is regarded as the leader, and the leader's position is denoted as , and then update the leader's position. The leader's position update formula is as follows:

[0189] ,

[0190] ,

[0191] in, represents the spatial distribution measure, Indicates the measurement Individual salps and the center of the population The spatial distance between It means that the vector has G dimensions, g means the g-th dimension of the vector, Represents the position of leader, is the position of the food source in the gth dimension (the optimal solution before updating); Indicates The salp individuals are The coordinate values ​​in the dimension, represents the average value of the coordinates of all salps in the gth dimension, representing the center position of the population, is the lower bound vector of the search space, is the upper limit vector of the search space; It is an important control parameter used to balance exploration and exploitation in the iterative optimization process through the improved salp swarm algorithm. and For [ 0 , 1 ] The random number in is used to enhance the leader's random exploration of the search space. Used to control the direction of movement. Used to control the step size of movement.

[0192] Among them, the control parameters It can be defined as: ,

[0193] Represents the cosine similarity between two vectors, vector Indicates that the current salp individual at the tth iteration is The position relationship between the individual salps and the individual salps with the smallest fitness value, vector Indicates the positional relationship between any other salp individual in the population and the salp individual with the smallest fitness value at the tth iteration;

[0194] vector and vector Defined as:

[0195] ,

[0196] in, Indicates that at the tth iteration, The location of each salp individual, represents the position of any other salp individual in the population at the tth iteration, is the position of the best salp individual in the population at the tth iteration.

[0197] Step (34), use the cosine similarity exploration conversion strategy to adjust the control parameters of the leader position update. The cosine similarity exploration conversion strategy measures the distribution of the position of the optimal salp individual and the positions of the surrounding salps, constructs a vector between the current salp individual position and the optimal salp individual position, calculates the cosine similarity between the two vectors, and obtains the control parameters of the leader position update, thereby guiding the adjustment and optimization of the population; cosine similarity is an indicator of distribution. When the cosine similarity is high, the algorithm focuses on updating the position and avoiding local optimality. When the cosine similarity is low, the algorithm focuses on maintaining diversity and exploring new areas. This strategy helps the algorithm maintain efficiency and stability during the search process, thereby finding the global optimal solution; updating the positions of salps with high cosine similarity and poor fitness not only speeds up the convergence of the algorithm, but also maintains the diversity of the population. The specific process is: define the cosine similarity between two vectors The value range is [ − 1 , 1 ] ,in, When the value is 1, it means the angle between the two vectors is , there is an overlap, which means that the two vectors are highly similar or basically the same; When the value is -1, it means that the two vectors are in opposite directions;

[0198] The cosine similarity between two vectors represents the cosine similarity between the positions of two salps. The calculation formula for the cosine similarity between the positions of two salps is:

[0199] ,

[0200] Among them, the molecule For vector and vector The inner product of For vector and vector The higher the cosine similarity, the easier it is for the position of the current salp individual to coincide with the position of any other salp individual in the population. The cosine similarity between the position of a salp individual and the positions of all other salps in the population, and the threshold P, work together to enhance the algorithm's ability to jump out of extreme values. Specifically:

[0201] When the cosine similarity exceeds the threshold P, it means that the position relationship or movement direction of the current salp individual is greatly different from that of other salps. In this case, the random number in the leader's position update formula can be increased. and The weight of The value of , so that the individual salps can explore new areas more extensively in the search space, or by increasing the random number The value of is adjusted, and the step size of position update is appropriately increased, so that the salp individuals can move to the new position faster, thereby accelerating the convergence of the algorithm;

[0202] When the cosine similarity is lower than the threshold P, it means that the position relationship or movement direction of the current salp individual is close to that of other salps. At this time, the random number in the leader's position update formula can be reduced. and The weight of The value of enables the salp individuals to move to the target position more accurately in the search space, thereby maintaining the stability of the population, or by reducing the random number The value of is appropriately reduced to appropriately reduce the step size of the position update, so that the individual salps can search the current area more carefully to avoid missing the optimal solution.

[0203] The calculation formula of the threshold value P is as follows:

[0204] ,

[0205] Where P represents the average distance between all salps individuals, which is used as the threshold.

[0206] Step (35), using the leader-follower adaptive adjustment strategy to update the follower position, the specific steps are:

[0207] The movement of the follower is guided by the leader, and the follower will follow the salp individual closest to it. The position update principle of the follower comes from Newton's laws of motion. The position update formula of the follower is as follows:

[0208] ,

[0209] in, Indicates The iteration The number of followers of a salp individual Dimensional location, Indicates the tth iteration The first Dimensional location, Indicates the tth iteration The first dimensional position, t is the current iteration number;

[0210] Step (36), after the position update of the follower is completed, the fitness value of each salp individual needs to be recalculated, and the fitness value of the best salp individual in the population is compared with the fitness value of the food source, that is, the position of the salp individual with the best fitness value in the previous iteration is regarded as the position of the historical food source, and the position of the salp individual corresponding to the best fitness value between the two is updated to the position of the new food source;

[0211] Step (37), increase the number of iterations by 1, and repeat the above steps (33) to (36) to perform the next leader position update and follower position update until the termination condition is reached, that is, the number of iterations reaches the maximum number of iterations T, then stop the iteration and output the current food source position (that is, the position of the global optimal salp individual) and the current minimum fitness value.

[0212] Step (38), determining the unloading strategy according to the output position of the global optimal salp individual, and executing the task unloading of the vehicle user according to the unloading strategy, restoring the position of the global optimal salp individual into the form of the original optimization parameter solution, and according to the obtained solution, executing the allocation of task computing resources of the task vehicle, judging whether the subtask needs to be unloaded to an idle vehicle or an edge server, determining the execution order of all subtasks and executing them.

[0213] The effect of the present invention is further illustrated by simulation below:

[0214] (1) Simulation conditions:

[0215] In the simulation scenario, the present invention deploys 20 idle vehicles in the vehicle networking scenario, and the number of vehicles that need to offload computing tasks is 10; the task data volume of the vehicle may be 10KB, 20KB, 30KB, 40KB, 50KB; the bandwidth of the idle vehicle may be 0.4~1*10 4 Hz, the population size of the algorithm is 30; the total computing resources provided by 20 idle vehicles is 3.2*10 5 cycles / s.

[0216] (2) Simulation content and results:

[0217] Figure 3 This is a simulation verification diagram of the improved salp swarm algorithm of the present invention. Figure 3 The convergence diagrams of the improved salp swarm algorithm of the method of the present invention and the existing salp swarm method are compared. Through the individual aggregation following strategy, cosine similarity exploration conversion strategy, and leader-follower adaptive adjustment strategy, the improved salp swarm algorithm can obtain a better fitness value function and find a better target than the existing salp swarm algorithm.

[0218] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A vehicle network edge unloading method based on dual dependency, characterized in that: The following steps are involved: Step (1) divides the computing task of the intelligent connected vehicle into multiple subtasks with dependencies based on the dual dependencies of timing and data, and constructs a subtask computing delay model. The specific steps include: Step (11), the Internet of Vehicles task offloading system includes multiple vehicle users who need to offload computing tasks, a scheduling base station that provides task scheduling, and an edge server. Within the edge server range where each vehicle user is located, there are multiple idle vehicles that can provide computing offloading. The vehicle users and the idle vehicles have the same local computing power, and each vehicle user has at least one splittable computing-intensive task that needs to be offloaded. The computing-intensive task can be split into a number of subtasks with dual dependencies on timing and data. Step (12) converts the vehicle user's computationally intensive tasks The subtasks are divided into subtasks, for any subtask Modeled as ,in, Represents a subtask The number of , Represents a subtask The amount of tasks, For subtask The amount of output data, Indicates the location where the subtask will be unloaded. , where 0 means local unloading, 1 means unloading to the edge server, and 2 means unloading to an idle vehicle; Indicates the computational intensity of the task; Among the subtasks, the initial subtask and the ending subtask It should be executed on the local device, and the remaining subtasks should be offloaded as needed; Step (13), modeling and analyzing the three situations where the vehicle user places the subtask for local processing, offloads it to the edge server for processing, and offloads it to an idle vehicle for processing, constructs a subtask calculation delay model, and calculates the start time and completion time of each subtask; Step (2), constructing communication models between the dispatching base station and vehicle users, between the dispatching base station and idle vehicles, and between the dispatching base station and edge servers respectively according to the subtask calculation delay model, and then constructing a calculation cost model according to the communication model, and establishing a constraint problem for generating an optimal unloading strategy according to the communication model, the subtask calculation delay model, and the calculation cost model; Step (3), modeling the constraint problem as an improved salp swarm unloading optimization model, using an improved salp swarm algorithm to solve the unloading optimization model, obtaining an optimal unloading strategy, and unloading the subtasks that the vehicle user needs to unload to an idle vehicle or an edge server according to the optimal unloading strategy; In step (11), the set of intelligent connected vehicles that need to offload computing tasks on multi-lane urban roads is represented as , represents any vehicle user in the task offloading system, represents the total number of vehicle users who need task offloading services in the current road section. The local computing capacity of all intelligent connected vehicles is ; The set of computationally intensive tasks is represented as ; represents any computationally intensive task in the task offloading system, Indicates the total number of computationally intensive tasks that require task offloading services in the current road section; a directed acyclic graph is used to represent the dual dependencies of subtasks in terms of timing and data. Each node in the directed acyclic graph represents a subtask that can be calculated independently. , each edge in the directed acyclic graph represents the dependency relationship between subtasks, with weights To describe the amount of output data of the subtask, , is the output result coefficient; there is a scheduling base station in the task offloading system to perform task scheduling, and the scheduling base station set is expressed as , r represents any scheduling base station that provides task scheduling in the task offloading system, Indicates the total number of scheduling base stations that provide task scheduling in the current road section; there are idle vehicles within the edge server range that can provide computing offloading, and the idle vehicle set is defined as , represents any idle vehicle in the task offloading system, represents the total number of idle vehicles that can provide task offloading services in the current road section; the edge server set is represented by , represents any edge server in the task offloading system, represents the total number of edge servers that can provide task offloading services in the current road segment; assuming that the total computing resources of all edge servers are expressed as , each edge server All have independent computing capabilities. The computing capabilities of edge servers are recorded as , the edge server is assigned to the vehicle user The computing resources are ; The total computing power provided by all idle vehicles is recorded as , idle vehicles are allocated to vehicle users The computing resources are .

2. The Internet of Vehicles edge unloading method based on dual dependency according to claim 1, characterized in that: The specific steps of step (13) are as follows: for the three situations of local processing, edge server processing, and idle vehicle processing, the vehicle user Subtasks The start time of local processing is expressed as , the start time of processing on the edge server is expressed as , the start time of processing on an idle vehicle is expressed as ; Vehicle users Subtasks The completion time of local processing is expressed as , the completion time of processing on the edge server is expressed as , the completion time of processing on the idle vehicle is expressed as ; Step (131), when the vehicle user Subtasks When processing locally, vehicle users can Subtasks The local processing starts at: , in, Idle time of local processing computing resources; subtask The start time is to take the predecessor subtask set The maximum value between the completion time of the subtask with the longest delay and the idle time of the local processing computing resources; Indicates that the previous subtask is the last predecessor subtask Completion time of local processing, , Indicates the last predecessor subtask The completion time of processing at the edge server, Indicates the last predecessor subtask At the completion time of idle vehicle processing, represents the transmission delay of offloading the total amount of data required for the computational subtask to the local vehicle for processing; Subtasks The completion time of the local processing for the subtask The start time of local processing, the task processing time calculated by the local processor, and the time when the local processor transfers the subtask The amount of output data The sum of the time for successfully uploading to the scheduling base station, subtask The completion time for local processing is defined as follows: , in, Represents a subtask Task processing time calculated on the local processor, Indicates that the local processor will subtask The amount of output data The time of successful upload to the scheduling base station; Step (132), if the vehicle user Subtasks The dispatched base station is unloaded to the idle vehicle for processing, then the subtask The prerequisite for processing on idle vehicles is the subtask Successfully uploaded to an idle vehicle, and the idle vehicle has free computing resources and subtasks The predecessor subtask has been completed; the vehicle user Subtasks The start time of processing on an idle vehicle is expressed as follows: , in, is the idle time of computing resources of idle vehicles, represents the transmission delay of offloading the total amount of data required for the computational subtask to the idle vehicle; When the subtask is satisfied The start execution condition on the idle vehicle, then the subtask The completion time of idle vehicle processing is the subtask Start time, subtasks processed on idle vehicles The computation time on the idle vehicle and the idle vehicle will be subtask The amount of output data The sum of the time it takes to upload to the scheduling base station; therefore, the subtask The completion time for processing on an idle vehicle is defined as follows: , in, Represents a subtask Computation time on idle vehicles, Indicates that idle vehicles will be subtasks The amount of output data Time of uploading to the scheduling base station; Step (133), if the vehicle user Subtasks The scheduled base station is unloaded to the edge server for processing, then the subtask The prerequisite for processing on the edge server is that the subtask Successfully uploaded to the edge server, and the edge server has idle computing resources and subtasks The predecessor subtasks of have been completed; The start time of processing on the edge server is expressed as follows: , in, is the idle time of computing resources of edge servers, represents the transmission delay of offloading the subtask to the edge server; When the subtask is satisfied The start execution condition of the subtask The completion time of the subtask processed on the edge server Start time, subtask processed on edge server The computation time on the edge server and the time it takes to process the subtasks The amount of output data The sum of the time it takes to successfully upload to the scheduling base station; therefore, the subtask The completion time for processing on the edge server is defined as follows: , in, Represents a subtask Computation time on edge servers, Indicates that the edge server will subtask The amount of output data The time of successful upload to the scheduling base station; In step (2), the specific steps of constructing the communication model are as follows: In order to reduce the collaborative processing delay, the communication channel model between the dispatching base station and the vehicle user, the dispatching base station and the edge server, and the dispatching base station and the idle vehicle uniformly adopts the Rayleigh channel model. The calculation formula for the data transmission rate between the scheduling base station and the vehicle user is: , in, Represents a moving vehicle user The transmission power, represents the channel gain between the scheduling base station and the user vehicle that needs to offload the computing task, represents the channel bandwidth, represents the Gaussian white noise power; The calculation formula for the data transmission rate between the dispatching base station and the idle vehicles is: , in, represents the transmission power of the moving idle vehicle z, represents the channel gain between the scheduling base station that needs to offload the computing task and the idle vehicle; The calculation formula for the data transmission rate between the scheduling base station and the edge computing server is: , in, represents the transmit power of the edge server, represents the channel gain between the scheduling base station and the edge server where the computing task needs to be offloaded; In step (2), the computing cost model includes a local computing cost model, an idle vehicle computing cost model, and an edge server computing cost model. The specific steps for constructing the computing cost model are: Step (221), construct a local computation cost model: Local computing subtasks The amount of tasks is , then the execution delay of the local calculation is the subtask The task processing time calculated on the local processor is , the local energy consumption is , computationally intensive tasks In the local calculation of the vehicle user, there is no need to download tasks, only local calculation and output result data upload or download are needed. The local calculation energy consumption cost is defined as , then the energy consumption cost is calculated locally The calculation formula is as follows: , , , , in, represents the local computing capability of the vehicle user, Indicates vehicle user The power of local computing devices, a minimum charge to cover vehicle unloading costs; Step (222), construct an idle vehicle calculation cost model: Computationally intensive tasks Subtask of offloading to idle vehicles The amount of tasks is , define the set of predecessor subtasks The last predecessor task in The output data volume is , according to the idle vehicle execution unloading task delay, that is, subtask Computation time on idle vehicle , offloading the total amount of data required for the computational subtask to the transmission delay of the idle vehicle , and the data transmission time of idle vehicles, that is, idle vehicles will be subtasks The amount of output data Time uploaded to the scheduling base station Calculate the total energy consumption of idle vehicles , the energy consumption cost of idle vehicles is defined as , then the energy consumption cost of idle vehicles is calculated as The calculation formula is as follows: , , , , , in, is the power of the data transmission equipment of the idle vehicle, Indicates the equipment power of the idle vehicle, a minimum charge to cover vehicle unloading costs; Step (223), constructing edge server computing cost model: According to subtask Computation time on edge servers , the transmission delay of offloading subtasks to edge servers , and the data transmission time of the edge server, that is, the edge server transfers the subtask The amount of output data Time when the data is successfully uploaded to the dispatch base station Calculate the total energy consumption of edge servers , where when the edge server is not computing, it will enter low-power standby mode, and the energy consumption in low-power standby mode is negligible; users need to pay the corresponding fees to the edge server operator, and the edge computing unloading energy consumption cost of the edge server is defined as , then the energy consumption cost of edge computing offloading on edge servers is The calculation formula is as follows: , , , , , in, is the device power of the edge server, The power of data transmission for edge servers, Minimum charges for offloading costs to edge servers; In step (2), the specific steps of establishing the constraint problem for generating the optimal offloading strategy based on the communication model, the subtask calculation delay model, and the calculation cost model are as follows: In the Internet of Vehicles, the issue that vehicle users need to consider when offloading task computation is the economic cost. The optimal offloading strategy is to maximize the delay in task processing. Under the constraints, the energy consumption cost of task offloading service is minimized by optimizing the offloading decision; based on offloading part of the computing tasks of multiple vehicle users to idle vehicles or edge servers to obtain the required computing resources to assist in data processing, the multi-constraint task offloading service energy consumption cost minimization problem is modeled; comprehensive communication model, subtask computing delay model, and computing cost model, the total task offloading service energy consumption cost in the task offloading system of intelligent connected vehicles is the sum of the local computing energy consumption costs of all vehicle users, the computing energy consumption costs of all idle vehicles, and the edge computing offloading energy consumption costs of all edge servers; the total task offloading service energy consumption cost in the task offloading system It is expressed as: , The execution delay of dependent tasks of vehicle user u It is expressed as: , in, Indicates the completion time of the final subtask. Indicates the completion time of the initial subtask; It is represented by the sum of the computing energy consumption of all vehicle users’ local computing, idle vehicles, and edge servers. The calculation formula is as follows: ; The constraint problem of minimizing the energy consumption cost of task offloading service is described as: , , in, represents the minimization of the energy consumption cost of the task offloading service, represents the total task offloading service cost in the task offloading system. The first constraint Indicates that in the subtask The calculation is performed under the condition that the calculation is offloaded to one of the three: local, idle vehicle, and edge server; the second constraint Indicates that the computing resources of the edge server allocated to each task do not exceed the upper limit of the computing resources of the edge server processing the corresponding task; the third constraint Indicates that the sum of resources allocated to all tasks does not exceed the total computing resources of all edge servers; the fourth constraint Indicates that the idle vehicle computing resources allocated to each task do not exceed the total computing capacity of all idle vehicles; the fifth constraint It means that the subtasks need to be calculated strictly according to the timing and data dependency, that is, the next subtask can only be processed after the predecessor subtask is completed; the sixth constraint Indicates that the task processing delay cannot be greater than the maximum delay constraint; In step (3), the specific steps of using the improved salp swarm algorithm to solve the unloading optimization model are as follows: Step (31), initialize the parent population, and set the index set of the salps individuals in the population as , represents any individual salp in the population, L represents the total number of salps; set the maximum number of iterations T and set the current number of iterations t=0; Step (32), construct the fitness function of the individual salps in the parent population. The fitness function of the individual salps is defined as: ,in, Indicates individual salps The fitness function of represents the total task offloading service cost; Indicates the moment when the task processing delay does not exceed the maximum delay constraint value, otherwise a penalty will be imposed. is the task processing delay penalty coefficient, Indicates that the amount of data for the subtask does not exceed the sum of all computing resources, otherwise a penalty will be imposed. Indicates the penalty coefficient for exceeding the task data volume; determines whether the current number of iterations is greater than the maximum number of iterations of the salp swarm algorithm. If the current number of iterations is less than the maximum number of iterations, executes the next step (33); otherwise, outputs the fitness value of the best salp individual in the current population; Step (33), the salps in the salp group are divided into leaders and followers. The leader leads the group to find the best food, while the followers follow the salps that are closest to them and use the individual aggregation following strategy to update the leader's position. The specific operation process is as follows: First, calculate the fitness values ​​of all salps in the population. According to the size of the fitness value, the position of the salp with the best fitness value, that is, the smallest fitness value, is regarded as the position of the food source, denoted as F. Each update of the leader's position is moving towards the food source, and the first salp in the population is regarded as the leader, and the position of the leader is denoted as , and then update the leader's position. The leader's position update formula is as follows: , , in, represents the spatial distribution measure, Indicates the measurement Individual salps and the center of the population The spatial distance between It means that the vector has G dimensions, g means the g-th dimension of the vector, Represents the position of leader, is the location of the food source in the gth dimension, which is the optimal solution before updating; Indicates The salp individuals are The coordinate values ​​in the dimension, represents the average value of the coordinates of all salps in the gth dimension, representing the center position of the population, is the lower bound vector of the search space, is the upper limit vector of the search space; It is an important control parameter used to balance exploration and exploitation in the iterative optimization process through the improved salp swarm algorithm. and For The random number in is used to enhance the leader's random exploration of the search space. Used to control the direction of movement. Used to control the step size of movement; Among them, the control parameters Defined as , Represents the cosine similarity between two vectors, vector Indicates that the current salp individual at the tth iteration is The position relationship between the individual salps and the individual salps with the smallest fitness value, vector Indicates the positional relationship between any other salp individual in the population and the salp individual with the smallest fitness value at the tth iteration; vector and vector Defined as: , in, Indicates that at the tth iteration, The location of each salp individual, represents the position of any other salp individual in the population at the tth iteration, is the position of the best salp individual in the population at the tth iteration; Step (34), using cosine similarity to explore the transition strategy to adjust the control parameters of the leader position update, the specific process is: by measuring the distribution of the position of the optimal salp individual and the positions of the surrounding salps, constructing the vector between the current salp individual position and the optimal salp individual position, calculating the cosine similarity between the two vectors, and obtaining the control parameters of the leader position update; defining the cosine similarity between the two vectors The value range is ,in, When the value is 1, it means the angle between the two vectors is , there is an overlap, which means that the two vectors are highly similar or basically the same; When the value is -1, it means that the two vectors are in opposite directions; The cosine similarity between two vectors represents the cosine similarity between the positions of two salps. The calculation formula for the cosine similarity between the positions of two salps is: , Among them, the molecule For vector and vector The inner product of For vector and vector The higher the cosine similarity, the easier it is for the position of the current salp individual to coincide with the position of any other salp individual in the population. The cosine similarity between the position of a salp individual and the positions of all other salps in the population works together with the threshold P to enhance the algorithm's ability to jump out of extreme values; the calculation formula of the threshold P is as follows: , Among them, P represents the average distance between all salp individuals, which is used as the threshold; Step (35), using the leader-follower adaptive adjustment strategy to update the follower position, the specific steps are: The movement of the follower is guided by the leader, and the follower will follow the salp individual closest to it. The position update formula of the follower is as follows: , in, Indicates The first iteration The number of followers of a salp individual Dimensional location, Indicates the tth iteration The first Dimensional location, Indicates the tth iteration The first Dimensional location; Step (36), after the position update of the follower is completed, the fitness value of each salp individual needs to be recalculated, and the fitness value of the best salp individual in the population is compared with the fitness value of the food source, and the position of the salp individual corresponding to the best fitness value between the two is updated to the position of the new food source; Step (37), increase the number of iterations by 1, and repeat the above steps (33) to (36), so as to perform the next leader position update and follower position update, until the termination condition is reached, that is, the number of iterations reaches the maximum number of iterations T, then stop the iteration and output the location of the current food source, that is, obtain the location of the global optimal salp individual; Step (38), determining the unloading strategy according to the output position of the global optimal salp individual, and executing the task unloading of the vehicle user according to the unloading strategy, restoring the position of the global optimal salp individual into the form of the original optimization parameter solution, and according to the obtained solution, executing the allocation of task computing resources of the task vehicle, judging whether the subtask needs to be unloaded to an idle vehicle or an edge server, determining the execution order of all subtasks and executing them.

Citation Information

Patent Citations

  • Internet of vehicles multi-target computing task unloading scheduling method based on non-dominated sorting genetic strategy

    CN112995289A

  • Internet of vehicles multi-task multi-layer cooperation security distribution method based on smart contract

    CN117793096A