Energy-aware vehicle edge computing collaborative resource allocation and task unloading method

Through the energy-aware vehicle edge computing collaborative resource allocation and task unloading method, the ant colony system and Lagrangian multiplication method are used to optimize resource allocation, which solves the problems of insufficient resource utilization and high energy consumption in vehicle edge computing, and realizes the Task delay constraints and energy consumption optimization.

CN119110347AInactive Publication Date: 2024-12-10NINGBO UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411046151.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing vehicle edge computing collaborative resource allocation and task offloading methods have problems such as insufficient resource utilization, single optimization variables and high energy consumption, especially in the face of heterogeneous tasks and vehicle mobility changes, which are difficult to effectively reduce system energy consumption.

Method used

The energy-aware vehicle edge computing collaborative resource allocation and task unloading methods are adopted. Through task scheduling, task allocation and computing resource allocation, the ant colony system algorithm and the Lagrangian multiplication method are used to optimize the selection decision, unload ratio and computing resource allocation. Achieve multiple resource utilization and energy consumption optimization.

Benefits of technology

Under the conditions of ensuring task delay constraints, system resources are maximized, system energy consumption is reduced, task completion rate and resource utilization are improved, especially when task data is large and vehicle mobility is complex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119110347A_ABST
    Figure CN119110347A_ABST
Patent Text Reader

Abstract

The invention discloses an energy-aware vehicle edge computing collaborative resource allocation and task unloading method, which constructs an optimization problem based on an unloading task selection decision, namely task scheduling, a task unloading proportion, namely task allocation, computing resources allocated to an unloading task by a computing entity, and computing resources allocated to a local task by an initiating vehicle. An optimization problem is decomposed into four sub-problems, a selection decision problem is converted into a traveling salesman problem, and then an ant colony system algorithm is used for solving; the unloading proportion problem is decomposed into sub-problems about each task, and the sub-problems are solved independently; aiming at a computing resource allocation problem, based on a Lagrangian dual problem, solving by using a dichotomy; the method has the advantages that a plurality of variables are realized and optimized on the basis of task scheduling, task allocation and computing resource allocation, so that resources in the system can be utilized to the greatest extent, and the energy consumption of the system can be further reduced under the condition of ensuring that each task meets the delay constraint.
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, and in particular to an energy-aware vehicle edge computing collaborative resource allocation and task offloading method. Background Art

[0002] In recent years, with the promotion and application of 5G technology, the fields of Internet of Things (IoT) and Artificial Intelligence (AI) have achieved remarkable development and entered a new era of Internet of Everything. As a branch of the Internet of Things, the Internet of Vehicles (IoV) has increasingly rich application scenarios in response to the growing demand for intelligent transportation construction and vehicle intelligence, generating a large number of computing tasks related to IoV applications. These computing tasks can be divided into two categories according to their sensitivity to processing delay: delay-sensitive tasks (such as map navigation, path planning, driving decision-making, etc.) and non-delay-sensitive tasks (such as virtual reality, video processing, etc.). Due to the limitations of vehicle storage and computing power, vehicle computing tasks with huge amounts of data are difficult to process effectively locally. The traditional cloud computing model has high processing delays due to factors such as the long distance between the cloud server and the user's vehicle and network congestion, making it difficult to meet the low-latency requirements of IoV applications. Vehicle Edge Computing (VEC) is an emerging paradigm that has attracted much attention in recent years. It extends computing power to the edge of the network and utilizes vehicle-to-infrastructure (V2I) and vehicle-to-vehicle (V2V) communication methods to effectively offload vehicle computing tasks, providing flexible computing resources for user vehicles, shortening the transmission distance of vehicle computing tasks, and accelerating response speed.

[0003] Although VEC has shown great potential in solving vehicle computing task processing problems, it is necessary to formulate effective vehicle edge computing collaborative resource allocation and task offloading strategies to improve the efficiency of the VEC system when faced with multiple heterogeneous tasks with different data volumes and latency requirements generated by a single user vehicle, and when considering the reality of dynamic changes in network topology caused by vehicle mobility.

[0004] At present, there are works devoted to studying the solutions for collaborative resource allocation (computing resources) and task offloading of vehicle edge computing in VEC systems, but their limitations are: 1) The computing resources used are in a single form. Many studies are limited to offloading tasks to roadside infrastructure equipped with servers for computing and processing in V2I communication links, or to offloading tasks to idle vehicles with computing resources in V2V communication links for computing and processing, which leads to the ineffective utilization of resources in the VEC system; 2) When performing task offloading (including offloading decisions and task allocation) and resource management, some only use idle vehicles with computing resources or only use the computing resources of RSU (Road Side Unit), which limits the further utilization of system resources, and there is also the limitation of a single optimization variable, such as only optimizing the offloading decision or only optimizing the task allocation ratio. The single optimization variable will affect the performance of the optimization target; 3) The limited service time caused by the mobility of the vehicle is not considered, and the optimization target is mostly delay or utility functions related to it, which cannot effectively reduce energy. In the process of collaborative resource allocation and task offloading of vehicle edge computing, both sending tasks and computing tasks will consume corresponding energy. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide an energy-aware vehicle edge computing collaborative resource allocation and task offloading method, which is implemented based on task scheduling, task allocation and computing resource allocation, and optimizes multiple variables. It can not only maximize the use of resources within the system, but also further reduce the system energy consumption while ensuring that each task meets the delay constraints.

[0006] The technical solution adopted by the present invention to solve the above technical problems is: an energy-aware vehicle edge computing collaborative resource allocation and task offloading method, which is characterized by comprising the following steps:

[0007] Step 1: Consider a two-way highway system scenario, in which there is an RSU set up next to the highway and equipped with an edge server, and multiple mobile vehicles traveling along the highway in both directions and equipped with VEC computing capabilities. A mobile vehicle that generates several delay-sensitive heterogeneous tasks with different task amounts, computing complexities, and delay constraints in a very short period of time is defined as an initiating vehicle, and several mobile vehicles that provide computing services are defined as idle vehicles. The RSU and idle vehicles are collectively referred to as computing entities. The initiating vehicle splits each delay-sensitive heterogeneous task into two parts, namely, a local task and an offload task. The local task is calculated locally by the initiating vehicle, and the offload task is calculated by the computing entity through a V2I communication link or unloaded through a V2V communication link, that is, the offload task is calculated by the RSU through a V2I communication link or unloaded through a V2V communication link;

[0008] Assume that the initiating vehicle u generates N delay-sensitive heterogeneous tasks, and the i-th delay-sensitive heterogeneous task h generated by the initiating vehicle u is i Expressed as Where N≥1, d i Indicates h i The task volume, in KB, Indicates h i The maximum acceptable task processing delay, in seconds, c i Indicates h i The computational complexity is defined as d i The amount of computation required, in cycles / byte;

[0009] Assume that there are M idle vehicles within the V2V communication range of the initiating vehicle u, and the number of computing entities is M+1. Define h i The decision variable for selecting the jth computational entity is a ij ∈{0, 1}, defined for h i The offloading ratio of selecting the jth computing entity for task offloading is β ij ∈[0, 1], defines the jth computational entity assigned to h i The computing resources of the offload task are f ij , define the initiating vehicle to be assigned to h i The computational resources of the local task are f iu , defined for h i When selecting the jth computing entity for task offloading, h i The amount of unloading tasks is β ij d i 、h i The amount of local tasks is (1-β ij )d i ; where M≥1, 0 represents the computing entity as RSU, 1 to M represent the computing entity as idle vehicle, a ij =1 means for h i Select the jth computing entity for task offloading, a ij =0 means for h i The jth computing entity is not selected for task offloading;

[0010] definition The selection decision variable vector for selecting computational entities for latency-sensitive heterogeneous tasks is defined as The offloading ratio vector for selecting computing entities for task offloading for latency-sensitive heterogeneous tasks is defined as is the computing resource vector allocated to the offload task by the computing entity, and defines is the computing resource vector allocated to the local task by the initiating vehicle u, and defines the initiating vehicle u to process h i The energy consumption of the local task is (1-β) ij kf iu 2 c i d i , define the jth computing entity to process h i The energy consumed by the offloading task is kf ij 2 β ij c i d i , define the time when the jth computing entity performs task offloading h i The energy consumption of the offload task transmission is Where k represents the energy consumption coefficient of the processor chip in the computing entity, k is a constant, P i Indicates the initiation of vehicle u transmission h i The transmit power of the offload task, R ij Indicates the initiation of vehicle u transmission h i The transmission rate of the offloaded task to the jth computing entity;

[0011] Step 2: Based on step 1, construct an optimization problem Described as:

[0012]

[0013] in, represents the energy consumption of all latency-sensitive heterogeneous tasks, E i (a ij , β ij , f ij , f iu ) means h i The energy consumption generated, Indicates the initiation of vehicle u processing h i The computational latency required for local tasks, Indicates that the initiating vehicle u uses the V2I communication link to i When the offload task is offloaded to RSU, the offload h i The latency of the offloading task, represents the duration of the V2I communication link between the initiating vehicle u and the RSU, represents the duration of the V2V communication link between the initiating vehicle u and the jth computing entity, Indicates that the initiating vehicle u uses the V2V communication link to i When the offload task is offloaded to the jth computing entity, h is offloaded.i The latency of the offloading task, represents the duration of the V2I communication link between the jth computing entity and the RSU, represents the maximum computing resource of the initiating vehicle u, represents the maximum computing resource of the jth computing entity, Indicates that j belongs to the set consisting of all elements in v except 0;

[0014] Step 3: Optimization problem Decomposed into four sub-problems, namely, selection decision problem Uninstall ratio problem Computational resource allocation problem for computing entities The problem of computing resource allocation for the initiating vehicle

[0015] In fixed In this case, the decision problem will be selected Described as:

[0016]

[0017] In fixed In this case, the uninstall ratio problem Described as:

[0018]

[0019] In fixed In this case, the computing resource allocation problem of the computing entity Described as:

[0020]

[0021] In fixed In this case, the vehicle computing resource allocation problem will be initiated Described as:

[0022]

[0023] in, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization;

[0024] Step 4: Choose a decision problem It is a generalized assignment problem. We transform the generalized assignment problem into a traveling salesman problem, and then use the ant colony system algorithm to solve the traveling salesman problem. We get The optimal value of

[0025] Step 5: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. ij The first-order derivative of β ij The optimal value of The optimal value of

[0026] Step 6: Obtain the computing resource allocation problem of the computing entity The Lagrangian dual problem of the Lagrangian function; then based on the Lagrangian dual problem, the computing resource allocation problem of the computing entity Find the Lagrangian function of f ij The first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f ij The optimal value of f ij After the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of

[0027] Step 7: Obtain the computing resource allocation problem of the initiating vehicle The Lagrangian dual problem of the Lagrangian function of the initiating vehicle is solved. Then, based on the Lagrangian dual problem, the computing resource allocation problem of the initiating vehicle is solved. Find the Lagrangian function of f iu The first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f iu The optimal value of f iu After the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of .

[0028] In step 4, the process of converting the generalized assignment problem into the traveling salesman problem is as follows: one form of the traveling salesman problem is a bipartite graph, and the generalized assignment problem is converted into a bipartite graph. in, Represents N latency-sensitive heterogeneous tasks as a set of nodes numbered from 1 to N in the bipartite graph. It means that M+1 computing entities are sequentially a set of nodes numbered from N+1 to N+M+1 in the bipartite graph. The nodes in are defined as task nodes. The nodes in are defined as computational entity nodes, ∪ is the union operator, there are edges connecting two different nodes, ψ represents the edge weight set, Indicates Node to The edge weight of the edge from the task node to the computing entity node is set to the energy consumption consumed by the computing entity to process the offloaded task, the edge weight of the edge from the computing entity node to the task node is set to 0, and the edge weight of the edge from one task node to another task node and the edge weight of one computing entity node to another computing entity node are both set to a very large constant.

[0029] In step 4, the process of solving the traveling salesman problem using the ant colony system algorithm is as follows:

[0030] Step 4.1: Set the maximum number of iterations to iterMax, let iter represent the iteration counter, and the initial value of iter is 1; let Indicates Node to The pheromone strength of the edge of the node is Indicates Node to The heuristic information of the edge of the node, let the parameters in the ant colony system algorithm be γ∈(0,1), the pheromone volatility coefficient be ρ, the initial pheromone intensity be τ0, the pheromone influence factor be α, the heuristic information influence factor be β, the number of ants be m, and let q0 represent the probability parameter given by the ant colony system algorithm; where m>1;

[0031] Step 4.2: Randomly place the initial nodes of the m ants on the task nodes in the bipartite graph, and the ant colony system algorithm generates a loop node list for each of the m ants, which only contains the initial nodes; the computing resources of each computing entity are initialized to their respective maximum computing resources;

[0032] Step 4.3: Let Ω denote the The set of nodes currently accessible to the ants is the initial value of Ω. Remove the The set of all nodes after the initial node in the loop node list of the ant; among them,

[0033] Step 4.4: Setup It is in The first ant in the loop node list The serial number of the node where the ant is currently located; then traverse each node in Ω and set the serial number of the currently traversed node to when At this time, if The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks If the value is still greater than or equal to 0, there are several cases: 1) If represents the node of RSU, and satisfies the constraints C1 and C2 at the same time, then The value remains unchanged, otherwise, Take a very small constant; 2) If represents the node of an idle vehicle and satisfies the constraints C1, C2 and C4 at the same time. The value remains unchanged, otherwise, Take a very small constant; if the The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks If the value is less than 0, then Take a very small constant; when or or hour, The value remains unchanged; after traversing all nodes in Ω, execute step 4.5;

[0034] Step 4.5: Let q represent a random number uniformly distributed between [0, 1], and let express Remove the The set of nodes after all nodes in the loop node list of the ant; if q≤q0, then according to the formula To determine the The next node of the ant is stored in the In the loop node list of only ants; if q>q0, traverse For each node in , assuming that the sequence number of the currently traversed node is Then according to the formula To determine the The probability of nodes, after traversing After all the nodes in the The next node of the ant is stored in the The loop node list of only ants; among them, Indicates The pheromone strength of the edge from the node to the sth node, Indicates The heuristic information of the edge from the node to the sth node;

[0035] Step 4.6: Traverse each node in Ω and set the sequence number of the currently traversed node to if Use Update the pheromone strength and calculate the The remaining computing resources of the computing entities equal Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks Go to step 4.7; if Then remove the sequence number in Ω Node, execute step 4.7; where, The "=" in is the assignment symbol;

[0036] Step 4.7: Repeat steps 4.4 to 4.6 until there are no task nodes in Ω, then execute step 4.8;

[0037] Step 4.8: Order The value of is increased by 1, and then the process returns to step 4.3 and continues until all ants are processed, and then executes step 4.9;

[0038] Step 4.9: Find the optimal ant and its circuit node list for the iter-th iteration, and obtain the iter-th iteration Optimal value E iterbest ; Then compare E iterbest Corresponding to the global optimal circuit node list Optimal value E goblebest , update E using the minimum value of the two goblebest and use Update the pheromone intensity; then set iter = iter + 1. If iter is less than or equal to iterMax, return to step 4.2 to continue execution; if iter is greater than iterMax, output E. goblebest The corresponding global optimal circuit node list is obtained by conversion The optimal value of goblebest The initial value of is the first iteration Optimal value Eiterbest , The "=" in is the assignment symbol.

[0039] The specific process of step 5 is as follows:

[0040] Step 5.1: Uninstall the scaling issue The constraints C1, C2 and C4 in the transformation synthesis Among them, when hour, When j∈{0},

[0041] Step 5.2: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. The i-th sub-problem is described as: Among them, E i (β ij ) means that at a fixed ij 、f ij 、f iu β ij Energy consumption during variable optimization;

[0042] Step 5.3: Find the objective function in the i-th subproblem with respect to β ij The first-order derivative of β ij The first-order derivative of is expressed as

[0043] Step 5.4: According to the ij The monotonicity and feasible domain of the first-order derivative of , we get β ij The optimal value of in, Indicates h i When the offload task is offloaded to the j-th computing entity, the energy consumption required for the offload calculation of the j-th computing entity is, Indicates h i The local task is initiated by the vehicle u, which calculates the energy required locally.

[0044] The specific process of step 5.1 is: given β ij The value of h i When the offload task is offloaded to the jth computing entity, the time required for the offload calculation of the jth computing entity is satisfy Derived h i The time required for the local task to be calculated locally by the initiating vehicle u is satisfy Derived Then merge and get

[0045] The specific process of step 6 is as follows:

[0046] Step 6.1: Allocate computing resources to computing entities The Lagrangian function of is expressed as:

[0047]

[0048] in, represents the Lagrangian function, ζ, ξ and λ are Lagrangian multipliers, ζ j represents the jth element in ζ, ξ ij represents the i-th row and j-th column element in ξ, λ ij represents the i-th row and j-th column element in λ;

[0049] Step 6.2: Computational resource allocation problem based on computational entities The Lagrangian function The Lagrangian dual problem is obtained, which is described as:

[0050] Step 6.3: Based on the Lagrangian dual problem, allocate computing resources to computing entities The Lagrangian function Ask about f ij The first-order derivative of f ij The first-order derivative of is expressed as: Let f ij The first-order derivative of is 0, and the following equation is obtained:

[0051] Step 6.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the jth computing entity Initialize ζ, ξ, and λ, and denote the initial value of ζ as ζ(0), the initial value of ξ as ξ(0), and the initial value of λ as λ(0);

[0052] Step 6.5: Combine ξ(t), ξ(t) and λ(t) and use the bisection method to solve the equation obtained in step 6.3 to obtain f at the iteration ij The optimal value of ; where ζ(t) is ζ(0), ξ(t) is ξ(0), and λ(t) is λ(0) when t=0; and ζ(t) represents the value of ζ at the t-th iteration, ξ(t) represents the value of ξ at the t-th iteration, and λ(t) represents the value of λ at the t-th iteration when t≠0;

[0053] Step 6.6: When the tth iteration is obtained, f ij After obtaining the optimal value, the gradient method is used to update ζ, ξ and λ to obtain the respective values ​​of ζ, ξ and λ at the t+1th iteration, which are recorded as ξ(t+1), ξ(t+1) and λ(t+1) respectively;

[0054] Step 6.7: Calculate the system energy consumption Θ(t) at the tth iteration, Then determine whether the absolute value of the difference between Θ(t) and Θ(t-1) is less than 0.01. If so, set f at the tth iteration to ij The optimal value of f ij The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 6.5 to continue execution; where E i (f ij ) means that at a fixed ij , β ij 、f iu In the case of f ij Energy consumption during variable optimization: when t=0, it is not determined whether the absolute value of the difference between θ(t) and θ(t-1) is less than 0.01, and the process directly returns to step 6.5 to continue execution. When t≠0, θ(t-1) represents the system energy consumption at the t-1th iteration, and the "=" in t=t+1 is an assignment symbol.

[0055] The specific process of step 6.5 is as follows:

[0056] Step 6.5.1: Order represents f ij The upper bound of make represents f ij The lower bound of

[0057] Step 6.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3 yields the following result: Indicates that Substitute ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3;

[0058] Step 6.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 6.5.2 to continue execution; otherwise, output f at the tth iteration ij The optimal value of

[0059] In step 6.6, the jth element in ζ(t+1) is ζ j (t+1), in,[·] + represents max(0,·),ζ j (t) represents the jth element in ζ(t), s1 is the step size, and s1 is a preset positive number. is the Lagrange multiplier gradient,

[0060] The element in row i and column j of ξ(t+1) is ξ ij (t+1), Among them, ξ ij (t) represents the element in row i and column j in ξ(t), s2 is the step size, and s2 is a preset positive number. is the Lagrange multiplier gradient,

[0061] The element in row i and column j of λ(t+1) is λ ij (t+1), Among them, λ ij (t) represents the i-th row and j-th column element in λ(t), s3 is the step size, and s3 is a preset positive number. is the Lagrange multiplier gradient, when hour, When j∈{0},

[0062] The specific process of step 7 is as follows:

[0063] Step 7.1: Allocate computing resources to the initiating vehicle The Lagrangian function of is expressed as:

[0064]

[0065] in, represents the Lagrangian function, ω, χ and μ are Lagrangian multipliers, χ i represents the i-th element in χ, μ i represents the i-th element in μ;

[0066] Step 7.2: Computational resource allocation problem based on the initiating vehicle The Lagrangian function The Lagrangian dual problem is obtained, which is described as:

[0067] Step 7.3: Based on the Lagrangian dual problem, allocate computing resources to the initiating vehicle The Lagrangian function Ask about f iu The first-order derivative of f iu The first-order derivative of is expressed as: Let f iu The first-order derivative of is 0, and the following equation is obtained:

[0068] Step 7.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the initiating vehicle u Initialize ω, χ, and μ, and denote the initial value of ω as ω(0), the initial value of χ as χ(0), and the initial value of μ as μ(0);

[0069] Step 7.5: Combine ω(t), χ(t), and μ(t) and use the bisection method to solve the equation obtained in step 7.3 to obtain f at the tth iteration iu The optimal value of ; where t = 0, ω(t) is ω(0), χ(t) is χ(0), and μ(t) is μ(0); when t ≠ 0, ω(t) represents the value of ω at the tth iteration, χ(t) represents the value of χ at the tth iteration, and μ(t) represents the value of μ at the tth iteration;

[0070] Step 7.6: When the tth iteration is obtained, f iu After obtaining the optimal value, the gradient method is used to update ω, χ and μ to obtain the respective values ​​of ω, χ and μ at the t+1th iteration, which are recorded as ω(t+1), χ(t+1) and μ(t+1) respectively;

[0071] Step 7.7: Calculate the system energy consumption at the tth iteration Then judge and Is the absolute value of the difference less than 0.01? If so, set f at the tth iteration iu The optimal value of f iu The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 7.5 to continue execution; where E i (f iu ) means that at a fixed ij , β ij 、f ij In the case of f iu Energy consumption during variable optimization, no judgment when t=0 and If the absolute value of the difference is less than 0.01, return to step 7.5 and continue. When t≠0 It represents the system energy consumption at the t-1th iteration, and the “=” in t=t+1 is an assignment symbol.

[0072] The specific process of step 7.5 is as follows:

[0073] Step 7.5.1: Order represents f iu The upper bound of make represents f iu The lower bound of

[0074] Step 7.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ω(t), χ(t) and μ(t) into the equation obtained in step 7.3 yields the following result: Indicates that Substitute ω(t), χ(t), and μ(t) into the equation obtained in step 7.3 to obtain the result;

[0075] Step 7.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 7.5.2 to continue execution; otherwise, output f at the tth iteration iu The optimal value of

[0076] In step 7.6, in,[·] + represents max(0,·), s4 is the step size, s4 is a preset positive number, is the Lagrange multiplier gradient,

[0077] The i-th element in χ(t+1) is χ i (t+1), Among them, χ i (t) represents the i-th element in χ(t), s5 is the step size, and s5 is a preset positive number. is the Lagrange multiplier gradient,

[0078] The i-th element in μ(t+1) is μ i (t+1), Among them, μ i(t) represents the i-th element in μ(t), s6 is the step size, and s6 is a preset positive number. is the Lagrange multiplier gradient,

[0079] Based on steps 4 to 7, iterative optimization The specific process is:

[0080] 1) Initialization make represents the number of iterations, The initial value of is 0; Indicates the maximum number of iterations;

[0081] 2) Optimize based on step 4 Get the first At iteration The optimal value of; based on step 5 optimization Get the first At iteration The optimal value of; based on step 6 optimization Get the first At iteration The optimal value of; based on step 7 optimization Get the first At iteration The optimal value of

[0082] 3) Calculate the System energy consumption at iteration judge Whether it is achieved If yes, then output At iteration The optimal value of The optimal value of The optimal value of The optimal value of ; otherwise, let Then return to step 2) to continue execution; wherein, The “=” in is the assignment symbol.

[0083] Compared with the prior art, the advantages of the present invention are:

[0084] 1) The method of the present invention utilizes both V2V communication links and V2I communication links to achieve effective utilization of resource-constrained vehicles and roadside infrastructure resources.

[0085] 2) The method of the present invention simultaneously manages the offloading selection decision, task allocation, i.e., offloading ratio, and computing resource allocation, optimizes multiple variables, further utilizes system resources, and can improve the performance of the optimization target.

[0086] 3) The method of the present invention takes into account both the mobility of the vehicle and the delay limit of the task, and optimizes the energy consumption of the system to reduce energy consumption.

[0087] 4) Through simulation, it is found that when the amount of task data generated by the method of the present invention is generally large, as many tasks as possible can still meet the delay requirements, and the system energy consumption is minimized; when the proportion of delay-sensitive tasks in the total tasks is small, the method of the present invention can not only make as many tasks as possible meet the delay requirements, but also maintain the system energy consumption at a low level; when the idle vehicle is moving at a high speed, the method of the present invention can make more tasks meet the delay requirements, and the system energy consumption can be maintained at a low level; when the computing resources of the idle vehicle are relatively scarce, the method of the present invention can make as many tasks as possible meet the delay requirements, and the system energy consumption can be maintained at a low level; when the computing resources are relatively scarce, the method of the present invention can make more tasks meet the delay requirements as much as possible, and the system energy consumption can be maintained at a low level; when the computing resources are relatively abundant, more tasks can meet the delay requirements and the energy consumption will not increase significantly. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 A model diagram of a two-way highway system in the method of the present invention;

[0089] Figure 2a This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON, and FCR on system energy consumption as the task data size increases;

[0090] Figure 2b This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON, and FCR on the task incomplete rate (Incomplete Rate) as the task data size (Data Size) increases;

[0091] Figure 3a This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON, and FCR on system energy consumption when the proportion of delay-sensitive tasks in the total tasks is different;

[0092] Figure 3b This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON, and FCR on the task incomplete rate (Incomplete Rate) when the proportion of delay-sensitive tasks in the total tasks is different;

[0093] Figure 4a It is a comparison chart of the influence of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON and FCR on system energy consumption when the number of high-speed vehicles accounts for different proportions of the total number of idle vehicles;

[0094] Figure 4b This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes of COO, RCO, EON, and FCR on the task incomplete rate (Incomplete Rate) when the number of high-speed vehicles accounts for different proportions of the total number of idle vehicles;

[0095] Figure 5a This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and three benchmark schemes of COO, EON and FCR on system energy consumption under different idle vehicle computing resources;

[0096] Figure 5b This is a comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and three benchmark solutions of COO, EON, and FCR on the task incomplete rate (Incomplete Rate) under different idle vehicle computing resources. DETAILED DESCRIPTION

[0097] The present invention is further described in detail below with reference to the accompanying drawings.

[0098] The present invention proposes an energy-aware vehicle edge computing collaborative resource allocation and task offloading method, which includes the following steps:

[0099] Step 1: If Figure 1 As shown in the figure, consider a two-way highway system scenario, such as a two-way urban expressway system scenario. In the scenario, there is an RSU (Road Side RSU (Roadside Unit) and multiple mobile vehicles that travel along the highway in both directions and have VEC (Vehicle Edge Computing) computing capabilities. In order to better reflect the actual application, a mobile vehicle that generates several delay-sensitive heterogeneous tasks with different task amounts, computational complexities and delay constraints in a very short period of time is defined as the initiating vehicle, and several mobile vehicles that provide computing services are defined as idle vehicles. RSU and idle vehicles are collectively referred to as computing entities. The task type unloaded by each delay-sensitive heterogeneous task is various Internet of Vehicles applications, including image or video recognition, navigation replication, collision and obstacle detection, and autonomous driving. The initiating vehicle splits each delay-sensitive heterogeneous task into two parts, namely, a local task and an unloaded task. The local task is calculated locally by the initiating vehicle, and the local task can be zero. The unloaded task is calculated by the computing entity through the V2I communication link or through the V2V communication link, that is, the unloaded task is calculated by the RSU through the V2I communication link or by the idle vehicle through the V2V communication link, and the unloaded task can be zero.

[0100] Assume that the initiating vehicle u generates N delay-sensitive heterogeneous tasks, and the i-th delay-sensitive heterogeneous task h generated by the initiating vehicle u is i Expressed as Where N≥1, d i Indicates h i The amount of tasks, in KB (Kilo Byte), Indicates h i The maximum acceptable task processing delay, in seconds, c i Indicates h i The computational complexity is defined as d i The amount of computation required, in cycles / byte.

[0101] Assume that there are M idle vehicles within the V2V communication range of the initiating vehicle u, and the number of computing entities is M+1. Define h i The decision variable for selecting the jth computational entity is a ij ∈{0, 1}, defined for h i The offloading ratio of selecting the jth computing entity for task offloading is β ij ∈[0, 1], defines the jth computational entity assigned to h i The computing resources of the offload task are f ij , define the initiating vehicle to be assigned to h i The computational resources of the local task are f iu , defined for h i When selecting the jth computing entity for task offloading, h i The amount of unloading tasks is β ij d i 、h i The amount of local tasks is (1-β ij )d i ; where M≥1, 0 represents the computing entity as RSU, 1 to M represent the computing entity as idle vehicle, a ij =1 means for h i Select the jth computing entity for task offloading, a ij =0 means for h i The jth computing entity is not selected for task offloading.

[0102] definition The selection decision variable vector for selecting computational entities for latency-sensitive heterogeneous tasks is defined as The offloading ratio vector for selecting computing entities for task offloading for latency-sensitive heterogeneous tasks is defined as is the computing resource vector allocated to the offload task by the computing entity, and defines is the computing resource vector allocated to the local task by the initiating vehicle u, and defines the initiating vehicle u to process h i The energy consumption of the local task is (1-β ij )kf iu 2 c i d i , define the jth computing entity to process h i The energy consumed by the offloading task is kf ij 2 β ij c i d i , define the time when the jth computing entity performs task offloading h i The energy consumption of the offload task transmission is Where k represents the energy consumption coefficient of the processor chip in the computing entity (RSU or idle vehicle), k is a constant, P i Indicates the initiation of vehicle u transmission h i The transmit power of the offload task, R ij Indicates the initiation of vehicle u transmission h i The transmission rate of offloading tasks to the jth computing entity.

[0103] Step 2: Based on step 1, construct an optimization problem Described as:

[0104]

[0105] Among them, min is the minimum function, max is the maximum function, and st means "subject to...". represents the energy consumption of all latency-sensitive heterogeneous tasks, E i (a ij , β ij , f ij , f iu ) means h i The energy consumption generated, Indicates the initiation of vehicle u processing h i The computational latency required for local tasks, Indicates that the initiating vehicle u uses the V2I communication link to i When the offload task is offloaded to RSU, the offload h i The latency of the offloading task, represents the duration of the V2I communication link between the initiating vehicle u and the RSU, represents the duration of the V2V communication link between the initiating vehicle u and the jth computing entity (the computing entity is an idle vehicle at this time), Indicates that the initiating vehicle u uses the V2V communication link toi When the unloading task is unloaded to the jth computing entity (the computing entity is an idle vehicle at this time), h is unloaded. i The latency of the offloading task, represents the duration of the V2I communication link between the jth computing entity (the computing entity is an idle vehicle at this time) and the RSU, represents the maximum computing resource of the initiating vehicle u, represents the maximum computing resource of the jth computing entity, Indicates that j belongs to The set consisting of all elements except 0.

[0106] Above, constraint C1 means Need to meet h i The maximum acceptable task processing delay Requirements; Constraint C2 means Need to satisfy both as well as Constraint C3 means that when h i When offloading to idle vehicles using V2V communication links, the transmission delay must be guaranteed to meet Constraint C4 means that after the idle vehicles have processed h i After the unloading task is completed, the calculation results can be transmitted back through two communication links, namely, the V2V communication link is transmitted back along the original route or the V2I communication link is relayed through the RSU to return the results. The latter needs to ensure that the initiating vehicle and the idle vehicle are within the communication range of the RSU. Needs to be satisfied At the same time, the duration of the V2I relay link between the initiating vehicle and the idle vehicle should also be met and duration of the V2V communication link Constraint C5 ensures that the offloading task will select only one and only one computing entity; constraint C6 sets the binary variable a ij Constraint C7 indicates that the unloading ratio ranges from 0 to 1; Constraint C8 ensures that the total computing resources allocated by the initiating vehicle for the task does not exceed its maximum computing resources Constraint C10 ensures that the total computing resources allocated by the computing entity for the task does not exceed its maximum computing resources Constraints C9 and C11 respectively indicate that the allocated computing resources will not be negative.

[0107] Step 3: Due to optimization issues It is a mixed-integer nonlinear programming problem (MINLP), so the optimization problem It is decomposed into four sub-problems, namely, the selection decision problem about task scheduling Regarding the offloading ratio of task allocation Computational resource allocation problem for computing entities The problem of computing resource allocation for the initiating vehicle For the above decision-making problem The original problem can be converted into a traveling salesman problem (TSP) and solved using the ant colony system (ACS) algorithm; for the unloading ratio problem Directly derive the corresponding closed-form expression; for the problem of computing resource allocation for computing entities and the computational resource allocation problem of the initiating vehicle It has the property of a convex problem and is solved by using Lagrange multipliers and the gradient method.

[0108] In fixed In this case, the decision problem will be selected Described as:

[0109]

[0110] In fixed In this case, the uninstall ratio problem Described as:

[0111]

[0112] In fixed In this case, the computing resource allocation problem of the computing entity Described as:

[0113]

[0114] In fixed In this case, the vehicle computing resource allocation problem will be initiated Described as:

[0115]

[0116] in, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization, Indicates that the fixed Under the circumstances Energy consumption during variable optimization.

[0117] Step 4: Choose a decision problem It is a generalized assignment problem (Generalized Assignment Problem, GAP), which can be converted into a traveling salesman problem, and then the traveling salesman problem is solved using the Ant Colony System (Ant Colony System, ACS) algorithm, and we get The optimal value of .

[0118] In order to use the ACS algorithm to solve GAP, we need to first convert GAP into a traveling salesman problem that can be solved by the ACS algorithm. In step 4, the process of converting the generalized assignment problem into the traveling salesman problem is as follows: One form of the traveling salesman problem is a bipartite graph. Convert the generalized assignment problem into a bipartite graph. in, Represents N latency-sensitive heterogeneous tasks as a set of nodes numbered from 1 to N in the bipartite graph. It means that M+1 computing entities are sequentially a set of nodes numbered from N+1 to N+M+1 in the bipartite graph. The nodes in are defined as task nodes. The nodes in are defined as computational entity nodes, ∪ is the union operator, there are edges connecting two different nodes, ψ represents the edge weight set, Indicates Node to The edge weight of the edge from the task node to the computing entity node is set to the energy consumption of the computing entity processing the offloaded task (i.e., kf ij 2 β ij c i d i ), the edge weight of the edge from the computing entity node to the task node is set to 0 (to induce the algorithm to increase the selection probability of such a situation), the edge weight of the edge from one task node to another task node, and the edge weight of the edge from one computing entity node to another computing entity node are all set to a very large constant (to induce the algorithm to reduce the selection probability of such a situation).

[0119] In this embodiment, in step 4, the process of solving the traveling salesman problem using the ant colony system algorithm is as follows:

[0120] Step 4.1: Set the maximum number of iterations to iterMax, let iter represent the iteration counter, and the initial value of iter is 1; let Indicates Node to The pheromone strength of the edge of the node is Indicates Node to The heuristic information of the edges of the nodes is taken, and the parameters in the ant colony system algorithm are γ∈(0,1), the pheromone volatility coefficient is ρ, the initial pheromone intensity is τ0, the pheromone influence factor is α, the heuristic information influence factor is β, the number of ants is m, and q0 represents the probability parameter given by the ant colony system algorithm; wherein, in this embodiment, γ is taken as 0.5, and m>1.

[0121] Step 4.2: Randomly place the initial nodes of the m ants on the task nodes in the bipartite graph. The ant colony system algorithm generates a loop node list for each of the m ants. The generated loop node list only contains the initial nodes. The computing resources of each computing entity are initialized to their respective maximum computing resources.

[0122] Step 4.3: Let Ω denote the The set of nodes currently accessible to the ants is the initial value of Ω. Remove the The set of all nodes after the initial node in the loop node list of the ant; among them,

[0123] Step 4.4: Setup It is in The first ant in the loop node list The serial number of the node where the ant is currently located; then traverse each node in Ω and set the serial number of the currently traversed node to when At this time, if The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks If the value is still greater than or equal to 0, there are several cases: 1) If represents the node of RSU, and satisfies the constraints C1 and C2 at the same time, then The value remains unchanged, otherwise, Take a very small constant, such as 2) If represents the node of an idle vehicle and satisfies the constraints C1, C3 and C4 at the same time. The value remains unchanged, otherwise, Take a very small constant; if the The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks If the value is less than 0, then Take a very small constant; in other cases, that is, when or or hour, The value remains unchanged; after traversing all nodes in Ω, execute step 4.5.

[0124] Step 4.5: Let q represent a random number uniformly distributed between [0, 1], and let express Remove the The set of nodes after all nodes in the loop node list of the ant; if q≤q0, then according to the formula To determine the The next node of the ant is stored in the In the loop node list of only ants; if q>q0, traverse For each node in , assuming that the sequence number of the currently traversed node is Then according to the formula To determine the The probability of nodes, after traversing After all the nodes in the The next node of the ant is stored in the The loop node list of only ants; among them, Indicates The pheromone strength of the edge from the node to the sth node, Indicates The heuristic information of the edge from the sth node to the sth node.

[0125] Step 4.6: Traverse each node in Ω and set the sequence number of the currently traversed node to if Use Update the pheromone strength and calculate the The remaining computing resources of the computing entities equal Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks Go to step 4.7; if Then remove the sequence number in Ω Node (the node is the task node), execute step 4.7; where, The “=” in is the assignment symbol.

[0126] Step 4.7: Repeat steps 4.4 to 4.6 until there are no task nodes in Ω, then proceed to step 4.8.

[0127] Step 4.8: Order The value of is increased by 1, and then the process returns to step 4.3 and continues until all ants are processed, and then executes step 4.9.

[0128] Step 4.9: Find the optimal ant and its circuit node list for the iter-th iteration, and obtain the iter-th iteration Optimal value E iterbest ; Then compare E iterbest Corresponding to the global optimal circuit node list Optimal value E goblebest , update E using the minimum value of the two goblebest and use Update the pheromone intensity; then set iter = iter + 1. If iter is less than or equal to iterMax, return to step 4.2 to continue execution; if iter is greater than iterMax, output E. goblebest The corresponding global optimal circuit node list is obtained by conversion The optimal value of goblebest The initial value of is the first iteration Optimal value E iterbest , The "=" in iter=iter+1 is an assignment symbol.

[0129] Step 5: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. ij The first-order derivative of β ij The optimal value of The optimal value of .

[0130] In this embodiment, the specific process of step 5 is:

[0131] Step 5.1: Uninstall the scaling issue The constraints C1, C2 and C4 in the transformation synthesis Among them, when hour, When j∈{0},

[0132] Here, the specific process of step 5.1 is: given β ij The value of h iWhen the offload task is offloaded to the jth computing entity, the time required for the offload calculation of the jth computing entity is satisfy Derived h i The time required for the local task to be calculated locally by the initiating vehicle u is satisfy Derived Then merge and get

[0133] Step 5.2: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. The i-th sub-problem is described as: Among them, E i (β ij ) means that at a fixed ij 、f ij 、f iu β ij Energy consumption during variable optimization.

[0134] Step 5.3: Find the objective function in the i-th subproblem with respect to β ij The first-order derivative of β ij The first-order derivative of is expressed as From the first-order derivative formula, we can see that the objective function in the i-th sub-problem monotonically increases / decreases according to the positive / negative sign of the first-order derivative.

[0135] Step 5.4: According to the ij The monotonicity and feasible domain of the first-order derivative of , we get β ij The optimal value of in, Indicates h i When the offload task is offloaded to the j-th computing entity, the energy consumption required for the offload calculation of the j-th computing entity is, Indicates h i The local task is initiated by the vehicle u, which calculates the energy required locally.

[0136] Step 6: Due to the computing resource allocation problem of the computing entity is a convex problem, so the computational resource allocation problem of obtaining the computational entity is The Lagrangian dual problem of the Lagrangian function; then based on the Lagrangian dual problem, the computing resource allocation problem of the computing entity Find the Lagrangian function of f ijThe first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f ij The optimal value of f ij After the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of .

[0137] In this embodiment, the specific process of step 6 is:

[0138] Step 6.1: Allocate computing resources to computing entities The Lagrangian function of is expressed as:

[0139]

[0140] in, represents the Lagrangian function, ζ, ξ and λ are Lagrangian multipliers, ζ j represents the jth element in ζ, ξ ij represents the i-th row and j-th column element in ξ, λ ij represents the element in row i and column j in λ.

[0141] Step 6.2: Computational resource allocation problem based on computational entities The Lagrangian function The Lagrangian dual problem is obtained, which is described as: Among them, max is the maximum value function, and ζ, ξ, λ ≥ 0 means that the elements in the vector or matrix are greater than or equal to 0.

[0142] Step 6.3: Based on the Lagrangian dual problem, allocate computing resources to computing entities The Lagrangian function Ask about f ij The first-order derivative of f ij The first-order derivative of is expressed as: Since we obtain information about f ij The closed-form solution of the first-order derivative of is difficult, so let ij The first-order derivative of is 0, and the following equation is obtained:

[0143] Step 6.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the jth computing entity Initialize ζ, ξ, and λ, and denote the initial value of ζ as ζ(0), the initial value of ξ as ξ(0), and the initial value of λ as λ(t).

[0144] Step 6.5: Combine ξ(t), ξ(t) and λ(t) and use the bisection method to solve the equation obtained in step 6.3 to obtain f at the iteration ij ; where ξ(t) is ξ(0), ξ(t) is ξ(0), and λ(t) is λ(0) when t=0; and t≠0 when ζ(t) represents the value of ζ at the t-th iteration, ξ(t) represents the value of ξ at the t-th iteration, and λ(t) represents the value of λ at the t-th iteration.

[0145] Here, the specific process of step 6.5 is:

[0146] Step 6.5.1: Order represents f ij The upper bound of make represents f ij The lower bound of

[0147] Step 6.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3 yields the following result: Indicates that Substitute ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3 to obtain the result.

[0148] Step 6.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 6.5.2 to continue execution; otherwise, output f at the tth iteration ij The optimal value of .

[0149] Step 6.6: When the tth iteration is obtained, f ij After obtaining the optimal value, the gradient method is used to update ζ, ξ and λ to obtain the respective values ​​of ζ, ξ and λ at the t+1th iteration, which are recorded as ζ(t+1), ξ(t+1) and λ(t+1) respectively.

[0150] Here, in step 6.6, the jth element in ζ(t+1) is ζ j (t+1), in,[·] + represents max(0,·),ζ j (t) represents the jth element in ζ(t), s1 is the step size, and s1 is a preset positive number. is the Lagrange multiplier gradient, The element in row i and column j of ξ(t+1) is ξ ij (t+1), Among them, ξ ij (t) represents the element in row i and column j in ξ(t), s2 is the step size, and s2 is a preset positive number. is the Lagrange multiplier gradient, The element in row i and column j of λ(t+1) is λ ij (t+1), Among them, λ ij (t) represents the i-th row and j-th column element in λ(t), s3 is the step size, and s3 is a preset positive number. is the Lagrange multiplier gradient, when hour, When i∈{0},

[0151] Step 6.7: Calculate the system energy consumption Θ(t) at the tth iteration, Then determine whether the absolute value of the difference between Θ(t) and Θ(t-1) is less than 0.01. If so, set f at the tth iteration to ij The optimal value of f ij The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 6.5 to continue execution; where E i (f ij ) means that at a fixed ij , β ij 、f iu In the case of f ij Energy consumption during variable optimization: when t=0, it is not determined whether the absolute value of the difference between Θ(t) and Θ(t-1) is less than 0.01, and the process directly returns to step 6.5 to continue execution. When t≠0, Θ(t-1) represents the system energy consumption at the t-1th iteration, and the "=" in t=t+1 is an assignment symbol.

[0152] Step 7: Due to the computing resource allocation problem of the initiating vehicle is a convex problem, so the computational resource allocation problem of the initiating vehicle is obtained The Lagrangian dual problem of the Lagrangian function of the initiating vehicle is solved. Then, based on the Lagrangian dual problem, the computing resource allocation problem of the initiating vehicle is solved. Find the Lagrangian function of f iu The first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f iu The optimal value of f iuAfter the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of .

[0153] In this embodiment, the specific process of step 7 is:

[0154] Step 7.1: Allocate computing resources to the initiating vehicle The Lagrangian function of is expressed as:

[0155]

[0156] in, represents the Lagrangian function, ω, χ and μ are Lagrangian multipliers, χ i represents the i-th element in X, μ i represents the i-th element in μ.

[0157] Step 7.2: Computational resource allocation problem based on the initiating vehicle The Lagrangian function The Lagrangian dual problem is obtained, which is described as: Among them, ω,X,μ≥0 means that the elements in the vector or matrix are greater than or equal to 0.

[0158] Step 7.3: Based on the Lagrangian dual problem, allocate computing resources to the initiating vehicle The Lagrangian function Ask about f iu The first-order derivative of f iu The first-order derivative of is expressed as: Since we obtain the information about f iu The closed-form solution of the first-order derivative of is difficult, so let iu The first-order derivative of is 0, and the following equation is obtained:

[0159] Step 7.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the initiating vehicle u Initialize ω, χ, and μ, and denote the initial value of ω as ω(0), the initial value of χ as χ(0), and the initial value of μ as μ(0).

[0160] Step 7.5: Combine ω(t), χ(t), and μ(t) and use the bisection method to solve the equation obtained in step 7.3 to obtain f at the tth iteration iuwhere ω(t) is ω(0), χ(t) is χ(0), and μ(t) is μ(0) when t=0; and t≠0 is the value of ω at the tth iteration, χ(t) is the value of χ at the tth iteration, and μ(t) is the value of μ at the tth iteration.

[0161] Here, the specific process of step 7.5 is:

[0162] Step 7.5.1: Order represents f iu The upper bound of make represents f iu The lower bound of

[0163] Step 7.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ω(t), χ(t) and μ(t) into the equation obtained in step 7.3 yields the following result: Indicates that Substitute ω(t), χ(t), and μ(t) into the equation obtained in step 7.3 to obtain the result.

[0164] Step 7.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 7.5.2 to continue execution; otherwise, output f at the tth iteration iu The optimal value of .

[0165] Step 7.6: When the tth iteration is obtained, f iu After obtaining the optimal value, the gradient method is used to update ω, χ and μ to obtain the respective values ​​of ω, χ and μ at the t+1th iteration, which are recorded as ω(t+1), χ(t+1) and μ(t+1) respectively.

[0166] Here, in step 7.6, in,[·] + represents max(0,·), s4 is the step size, s4 is a preset positive number, is the Lagrange multiplier gradient, The i-th element in χ(t+1) is χ i (t+1), Among them, χ i (t) represents the i-th element in χ(t), s5 is the step size, and s5 is a preset positive number. is the Lagrange multiplier gradient, The i-th element in μ(t+1) is μ i (t+1), Among them, μ i (t) represents the i-th element in μ(t), s6 is the step size, and s6 is a preset positive number. is the Lagrange multiplier gradient,

[0167] Step 7.7: Calculate the system energy consumption at the tth iteration Then judge and Is the absolute value of the difference less than 0.01? If so, set f at the tth iteration iu The optimal value of f iu The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 7.5 to continue execution; where E i (f iu ) means that at a fixed ij , β ij 、f ij In the case of f iu Energy consumption during variable optimization, no judgment when t=0 and If the absolute value of the difference is less than 0.01, return to step 7.5 and continue. When t≠0 It represents the system energy consumption at the t-1th iteration, and the “=” in t=t+1 is an assignment symbol.

[0168] The preferred solution is to iteratively optimize based on steps 4 to 7. The specific process is:

[0169] 1) Initialization make represents the number of iterations, The initial value of is 0; Indicates the maximum number of iterations.

[0170] 2) Optimize based on step 4 Get the first At iteration The optimal value of; based on step 5 optimization Get the first At iteration The optimal value of; based on step 6 optimization Get the first At iteration The optimal value of; based on step 7 optimization Get the first At iteration The optimal value of .

[0171] 3) Calculate the System energy consumption at iteration judge Whether it is achieved If yes, then output At iteration The optimal value of The optimal value of The optimal value of The optimal value of ; otherwise, let Then return to step 2) to continue execution; wherein, The “=” in is the assignment symbol.

[0172] In order to further illustrate the feasibility and effectiveness of the method of the present invention, a simulation experiment was carried out on the method of the present invention.

[0173] In the simulation experiment, the method of the present invention (abbreviated as EJSOC) is compared with the following four benchmark schemes. The first benchmark scheme is COO (Computation Offloading Optimization), which optimizes the offloading ratio of computing resources and tasks, and the selection of the number of RSU / idle vehicles is random; the second benchmark scheme is RCO (RSU-assisted Computation Only), which only uses V2I to offload computing to RSU and optimizes the offloading ratio of computing resources and tasks; the third benchmark scheme is EON (Entire Offloading or Not), which calculates the entire task locally or offloads it to the computing entity without task division; the fourth benchmark scheme is FCR (Fixed Computing Resource), which optimizes the offloading ratio and computing entity selection, fixes the computing resources used, and does not optimize.

[0174] In order to comprehensively evaluate the performance of the method of the present invention and the four benchmark solutions, the task incomplete rate is defined as the proportion of unfinished tasks within a specified task time, which together with the system energy consumption reflects the system performance.

[0175] Figure 2a A comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes, COO, RCO, EON, and FCR, on system energy consumption as the task data size increases is given. Figure 2bA comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes, COO, RCO, EON, and FCR, on the task incomplete rate (Incomplete Rate) as the task data size (Data Size) increases is given. Figure 2a and Figure 2b In the figure, the percentage on the horizontal axis represents the ratio of the current task data volume range to the default data volume range. Here, the default data volume range is set to [60, 240] kB. Figure 2a and Figure 2b It can be clearly observed that as the amount of task data gradually increases, the energy consumption and task incomplete rate of all solutions show an upward trend. The main reason for this phenomenon is that the increase in the amount of task data directly leads to the need for more CPU processing cycles in the calculation process, resulting in an increase in computing energy consumption and an increase in data transmission energy consumption. At the same time, it will also lead to corresponding longer task processing time and data transmission delays, which makes the task more likely to time out and further push up the task incomplete rate. For compute-intensive and time-sensitive Internet of Vehicles applications, it is of vital importance to ensure that tasks are completed on time. Although the EJSOC solution is not optimal in terms of overall energy consumption, as the amount of task data increases, it can always maintain the lowest task incomplete rate and effectively reduce the energy consumption of the system on this basis. Compared with the COO solution, the EJSOC solution has shown significant advantages in task incomplete rate control and energy consumption management by virtue of its optimized selection decision mechanism; in other comparison schemes, when the task data volume interval is above 120% of the default data volume interval, although their energy consumption is generally lower than that of the EJSOC solution, their task incomplete rate is several times higher than that of the EJSOC solution. The EJSOC solution ensures efficient completion of tasks by collaboratively optimizing selection decisions, computing resource allocation, and adjusting task offloading ratios. Especially within 120% of the default data volume interval, the EJSOC method can achieve zero task incomplete rate while maintaining a comparable energy consumption control level with other comparison schemes.

[0176] Figure 3a A comparison chart of the impact of the proposed method (EJSOC for short) and four benchmark schemes, COO, RCO, EON, and FCR, on system energy consumption when the proportion of delay-sensitive tasks in the total tasks is different is given. Figure 3b The influence of the proposed method (abbreviated as EJSOC) and four benchmark schemes, COO, RCO, EON, and FCR, on the task incomplete rate (Incomplete Rate) is compared when the proportion of delay-sensitive tasks in the total tasks is different. Tasks with a maximum tolerable delay of less than 0.5 seconds are defined as delay-sensitive tasks. Figure 3a and Figure 3b In the figure, the horizontal axis represents the proportion of delay-sensitive tasks in the total tasks. Figure 3a and Figure 3b It can be clearly seen that as the proportion of delay-sensitive tasks decreases, the energy consumption and task incomplete rate of all solutions decrease, and the EJSOC solution has always maintained the lowest task incomplete rate in this process. When the proportion of delay-sensitive tasks reaches 100%, although the energy consumption of the EJSOC solution is the highest, its task incomplete rate is much lower than other comparison solutions, about 4 to 10 times lower than other comparison solutions. When the proportion of delay-sensitive tasks drops to 80%, the EJSOC solution still maintains a lower task incomplete rate than other comparison solutions, and its energy consumption begins to be better than the EON solution. When the proportion of delay-sensitive tasks is 60% and 40%, the energy consumption performance of the EJSOC solution is almost the same as that of the FCR solution, but the superiority of the EJSOC solution in task incomplete rate is more significant. When the proportion of delay-sensitive tasks is reduced to 20%, the energy consumption performance of the EJSOC solution is comparable to that of the COO solution and the RCO solution. However, compared with the non-negligible task incompletion rate problem of the COO solution and the RCO solution, the task incompletion rate of the EJSOC solution can be reduced to almost zero. This phenomenon is attributed to the fact that as the proportion of delay-sensitive tasks decreases, the delay requirements for task execution become more relaxed, thereby reducing the number of processing cycles required and reducing computing energy consumption. The EJSOC solution not only ensures the best task incompletion rate, but also achieves relatively low system energy consumption, showing the best balance between performance.

[0177] Figure 4a A comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and four benchmark schemes, COO, RCO, EON, and FCR, on system energy consumption under different conditions of the number of high-speed vehicles accounting for the total number of idle vehicles is given. Figure 4b A comparison chart of the impact of the proposed method (abbreviated as EJSOC) and four benchmark schemes, COO, RCO, EON, and FCR, on the task incomplete rate (Incomplete Rate) under different conditions of the number of high-speed vehicles to the total number of idle vehicles is given. Figure 4a and Figure 4b In the simulation, idle vehicles with speeds higher than 23 m / s are defined as high-speed vehicles, and the percentage of high-speed vehicles to the total number of idle vehicles is used as the horizontal axis. The simulation scenario is set to the extreme case where the initiating vehicle is about to leave the RSU coverage area. Figure 4a and Figure 4bIt can be seen that since the RCO scheme does not involve the use of idle vehicles, its energy consumption and task incomplete rate remain constant. As the proportion of high-speed vehicles gradually decreases, the task incomplete rate of all schemes shows a downward trend, and the EJSOC scheme always maintains the lowest task incomplete rate; in terms of energy consumption, the EJSOC scheme and the COO scheme show a significant reduction, while the energy consumption of the EON scheme and the FCR scheme only shows a slight fluctuation, and the optimization effect is not obvious. When the proportion of high-speed vehicles is high, the waiting time of high-speed vehicles within the communication range of the initiating vehicle and the communication range of the RSU is significantly reduced, resulting in a decrease in the proportion of tasks assigned to specific vehicles, and the amount of tasks undertaken by the initiating vehicle will increase accordingly. Limited by the limited computing resources of the initiating vehicle, some tasks fail to execute and higher system energy consumption. As the proportion of high-speed vehicles decreases, more non-high-speed vehicles will have sufficient time to be within the communication range of the initiating vehicle and the RSU. At this time, the maximum tolerable delay of the task becomes a key factor. Therefore, by assigning tasks to these non-high-speed vehicles, they will have more time to complete the task, thereby reducing the task incomplete rate. And because the delay limit on task execution becomes more relaxed, the number of required computing cycles is reduced, further reducing the energy consumption of the system. However, each scheme has different optimizations for energy consumption and task incomplete rate. The EJSOC scheme has better energy consumption optimization capabilities than the COO scheme through collaborative optimization of selection decisions, computing resource allocation, and adjusting task offloading ratios. The incomplete rate of tasks is always kept at the lowest, while the energy consumption optimization capabilities of the EON and FCR schemes are not significant. Overall, the EJSOC scheme has the best comprehensive performance. For example, when the proportion of high-speed vehicles is 50%, the energy consumption has dropped to 550J, and the incomplete rate of tasks is at least 66.7% lower than other comparison schemes.

[0178] Figure 5a A comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and three benchmark schemes, COO, EON, and FCR, on system energy consumption under different idle vehicle computing resources is given. Figure 5b A comparison chart of the impact of the method of the present invention (abbreviated as EJSOC) and three benchmark schemes, COO, EON, and FCR, on the task incomplete rate (Incomplete Rate) under different idle vehicle computing resources is given. Figure 5a and Figure 5b In the example, percentage is used as the horizontal axis unit, which represents the ratio of the current idle vehicle computing resource interval to the default interval, which is [3, 8] GHz. As the idle vehicle computing resources gradually increase, the task incomplete rate of each solution gradually decreases, and the system energy consumption gradually increases. Figure 5a and Figure 5bIt can be observed that when the computing resources of idle vehicles are small, some tasks may be offloaded to RSU computing in V2I mode, and the limited computing resources of RSU will lead to insufficient computing resources when facing multiple tasks. As the computing resources of idle vehicles increase, more and more tasks will be offloaded in V2V mode, and the task incompletion rate of each solution will also decrease. The increase in computing resources ensures that there are enough computing resources to meet the latency requirements of more tasks, but this requires more computing cycles, which leads to the phenomenon that the system energy consumption of each solution gradually increases with the increase of idle vehicle computing resources. Under different idle vehicle computing resources in the system, the EJSOC solution can always achieve a lower task incompletion rate than other comparison solutions, and it is still better than some comparison solutions in terms of energy consumption.

Claims

1. An energy-aware vehicle edge computing collaborative resource allocation and task offloading method, Features The following steps are involved: Step 1: Consider a two-way highway system scenario, in which there is an RSU set up next to the highway and equipped with an edge server, and multiple mobile vehicles traveling along the highway in both directions and equipped with VEC computing capabilities. A mobile vehicle that generates several delay-sensitive heterogeneous tasks with different task amounts, computing complexities, and delay constraints in a very short period of time is defined as an initiating vehicle, and several mobile vehicles that provide computing services are defined as idle vehicles. The RSU and idle vehicles are collectively referred to as computing entities. The initiating vehicle splits each delay-sensitive heterogeneous task into two parts, namely, a local task and an offload task. The local task is calculated locally by the initiating vehicle, and the offload task is calculated by the computing entity through a V2I communication link or unloaded through a V2V communication link, that is, the offload task is calculated by the RSU through a V2I communication link or unloaded through a V2V communication link; Assume that the initiating vehicle u generates N delay-sensitive heterogeneous tasks, and the i-th delay-sensitive heterogeneous task h generated by the initiating vehicle u is i Expressed as Where N≥1, d i Indicates h i The task volume, in KB, Indicates h i The maximum acceptable task processing delay, in seconds, c i Indicates h i The computational complexity is defined as d i The amount of computation required, in cycles / byte; Assume that there are M idle vehicles within the V2V communication range of the initiating vehicle u, and the number of computing entities is M+1. Define h i The decision variable for selecting the jth computational entity is a ij ∈{0,1}, defined for h i The offloading ratio of selecting the jth computing entity for task offloading is β ij ∈[0, 1], defines the jth computational entity assigned to h i The computing resources of the offload task are f ij , define the initiating vehicle to be assigned to h i The computational resources of the local task are f iu , defined for h i When selecting the jth computing entity for task offloading, h i The amount of unloading tasks is β ij d i 、h i The amount of local tasks is (1-β ij )d i ; where M≥1, , , 0 represents the computing entity is RSU, 1 to M represent the computing entity is an idle vehicle, a ij =1 means for h i Select the jth computing entity for task offloading, a ij =0 means for h i The jth computing entity is not selected for task offloading; definition The selection decision variable vector for selecting computational entities for latency-sensitive heterogeneous tasks is defined as The offloading ratio vector for selecting computing entities for task offloading for latency-sensitive heterogeneous tasks is defined as is the computing resource vector allocated to the offload task by the computing entity, and defines is the computing resource vector allocated to the local task by the initiating vehicle u, and defines the initiating vehicle u to process h i The energy consumption of the local task is Define the jth computing entity to process h i The energy consumption of the offloading task is Define the time when the jth computing entity performs task offloading h i The energy consumption of the offload task transmission is Where k represents the energy consumption coefficient of the processor chip in the computing entity, k is a constant, P i Indicates the initiation of vehicle u transmission h i The transmit power of the offload task, Indicates the initiation of vehicle u transmission h i The transmission rate of the offloaded task to the jth computing entity; Step 2: Based on step 1, construct an optimization problem Described as: in, represents the energy consumption of all latency-sensitive heterogeneous tasks, E i (a ij , β ij , f ij , f iu ) means h i The energy consumption generated, Indicates the initiation of vehicle u processing h i The computational latency required for local tasks, Indicates that the initiating vehicle u uses the V2I communication link to i When the offload task is offloaded to RSU, the offload h i The latency of the offloading task, represents the duration of the V2I communication link between the initiating vehicle u and the RSU, represents the duration of the V2V communication link between the initiating vehicle u and the jth computing entity, Indicates that the initiating vehicle u uses the V2V communication link to i When the offload task is offloaded to the jth computing entity, h is offloaded. i The latency of the offloading task, represents the duration of the V2I communication link between the jth computing entity and the RSU, represents the maximum computing resource of the initiating vehicle u, represents the maximum computing resource of the jth computing entity, Indicates that j belongs to The set of all elements except 0; Step 3: Optimization problem Decomposed into four sub-problems, namely, selection decision problem Uninstall ratio problem Computational resource allocation problem for computing entities The problem of computing resource allocation for the initiating vehicle In fixed , In this case, the decision problem will be selected Described as: In fixed In this case, the uninstall ratio problem Described as: In fixed In this case, the computing resource allocation problem of the computing entity Described as: In fixed In this case, the vehicle computing resource allocation problem will be initiated Described as: in, Indicates that the Under the circumstances Energy consumption during variable optimization, Indicates that the Under the circumstances Energy consumption during variable optimization, Indicates that the Under the circumstances Energy consumption during variable optimization, Indicates that the Under the circumstances Energy consumption during variable optimization; Step 4: Choose a decision problem It is a generalized assignment problem. We transform the generalized assignment problem into a traveling salesman problem, and then use the ant colony system algorithm to solve the traveling salesman problem. We get The optimal value of Step 5: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. ij The first-order derivative of β ij The optimal value of The optimal value of Step 6: Obtain the computing resource allocation problem of the computing entity The Lagrangian dual problem of the Lagrangian function; then based on the Lagrangian dual problem, the computing resource allocation problem of the computing entity Find the Lagrangian function of f ij The first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f ij The optimal value of f ij After the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of Step 7: Obtain the computing resource allocation problem of the initiating vehicle The Lagrangian dual problem of the Lagrangian function of the initiating vehicle is solved. Then, based on the Lagrangian dual problem, the computing resource allocation problem of the initiating vehicle is solved. Find the Lagrangian function of f iu The first-order derivative of and set it to 0, we get the equation; then combine the value of the Lagrange multiplier and use the bisection method to solve the equation to get f iu The optimal value of f iu After the optimal value is obtained, the gradient method is used to update the value of the Lagrange multiplier. After iteration, the absolute value of the system energy consumption difference obtained between the previous and next two iterations is output. The optimal value of .

2. According to the energy-aware vehicle edge computing collaborative resource allocation and task offloading method of claim 1, Features In step 4, the process of converting the generalized assignment problem into the traveling salesman problem is as follows: one form of the traveling salesman problem is a bipartite graph, and the generalized assignment problem is converted into a bipartite graph. in, Represents N latency-sensitive heterogeneous tasks as a set of nodes numbered from 1 to N in the bipartite graph. It means that M+1 computing entities are sequentially a set of nodes numbered from N+1 to N+M+1 in the bipartite graph. The nodes in are defined as task nodes. The nodes in are defined as computational entity nodes, ∪ is the union operator, there are edges connecting two different nodes, ψ represents the edge weight set, Indicates Node to The edge weight of the edge from the task node to the computing entity node is set to the energy consumption consumed by the computing entity to process the offloaded task, the edge weight of the edge from the computing entity node to the task node is set to 0, and the edge weight of the edge from one task node to another task node and the edge weight of one computing entity node to another computing entity node are both set to a very large constant.

3. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 2, Features In step 4, the process of solving the traveling salesman problem using the ant colony system algorithm is as follows: Step 4.1: Set the maximum number of iterations to iterMax, let iter represent the iteration counter, and the initial value of iter is 1; let Indicates Node to The pheromone strength of the edge of the node is Indicates Node to The heuristic information of the edge of the node is set as follows: the parameter γ∈(0,1) in the ant colony system algorithm, the pheromone volatility coefficient is ρ, and the initial pheromone intensity is τ 0 , the pheromone influence factor is α, the heuristic information influence factor is β, the number of ants is m, let q 0 represents the probability parameter given by the ant colony system algorithm; where m>1; Step 4.2: Randomly place the initial nodes of the m ants on the task nodes in the bipartite graph, and the ant colony system algorithm generates a loop node list for each of the m ants, which only contains the initial nodes; the computing resources of each computing entity are initialized to their respective maximum computing resources; Step 4.3: Let Ω denote the The set of nodes currently accessible to the ants is the initial value of Ω. Remove the The set of all nodes after the initial node in the loop node list of the ant; among them, Step 4.4: Setup It is in The first ant in the loop node list The serial number of the node where the ant is currently located; then traverse each node in Ω and set the serial number of the currently traversed node to when At this time, if The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks If the value is still greater than or equal to 0, there are several cases: 1) If Represents the node of RSU and satisfies the constraints at the same time and ,but The value remains unchanged, otherwise, Take a very small constant; 2) If represents the nodes of idle vehicles and satisfies the constraints and but The value remains unchanged, otherwise, Take a very small constant; if the The remaining computing resources of the computing entities Subtract the The computational entity is assigned to The computing resources of the offloaded tasks If the value is less than 0, then Take a very small constant; when or or hour, The value remains unchanged; after traversing all nodes in Ω, execute step 4.5; Step 4.5: Let q represent a random number uniformly distributed between [0, 1], and let express Remove the The set of nodes after all nodes in the ant's loop node list; if q≤q 0 , then according to the formula To determine the The next node of the ant is stored in the The loop node list of only ants; if q>q 0 , then traverse For each node in , assuming that the sequence number of the currently traversed node is Then according to the formula To determine the The probability of nodes, after traversing After all the nodes in the The next node of the ant is stored in the The loop node list of only ants; among them, Indicates The pheromone strength of the edge from the node to the sth node, Indicates The heuristic information of the edge from the node to the sth node; Step 4.6: Traverse each node in Ω and set the sequence number of the currently traversed node to if Use Update the pheromone strength and calculate the The remaining computing resources of the computing entities equal Subtract the The computational entity is assigned to The computing resources of the offloaded tasks of latency-sensitive heterogeneous tasks Go to step 4.7; if Then remove the sequence number in Ω Node, execute step 4.7; where, The "=" in is the assignment symbol; Step 4.7: Repeat steps 4.4 to 4.6 until there are no task nodes in Ω, then execute step 4.8; Step 4.8: Order The value of is increased by 1, and then the process returns to step 4.3 and continues until all ants are processed, and then executes step 4.9; Step 4.9: Find the optimal ant and its circuit node list for the iter-th iteration, and obtain the iter-th iteration Optimal value E iterbest ; Then compare E iterbest Corresponding to the global optimal circuit node list Optimal value E goblebest , update E using the minimum value of the two goblebest and use Update the pheromone intensity; then set iter = iter + 1. If iter is less than or equal to iterMax, return to step 4.2 to continue execution; if iter is greater than iterMax, output E. goblebest The corresponding global optimal circuit node list is obtained by conversion The optimal value of goblebest The initial value of is the first iteration Optimal value E iterbest , The "=" in iter=iter+1 is an assignment symbol.

4. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 1, Features The specific process of step 5 is as follows: Step 5.1: Uninstall the scaling issue The constraints in and Transformation Synthesis Among them, when hour, When j∈{0}, Step 5.2: Uninstall the scaling issue Decompose it into N independently optimized sub-problems, each of which is a sub-problem about a delay-sensitive heterogeneous task. The i-th sub-problem is described as: Among them, E i (β ij ) means that at a fixed ij 、f ij 、f iu β ij Energy consumption during variable optimization; Step 5.3: Find the objective function in the i-th subproblem with respect to β ij The first-order derivative of β ij The first-order derivative of is expressed as Step 5.4: According to the ij The monotonicity and feasible domain of the first-order derivative of , we get β ij The optimal value of in, Indicates h i When the offload task is offloaded to the j-th computing entity, the energy consumption required for the offload calculation of the j-th computing entity is, Indicates h i The local task is initiated by the vehicle u and the required energy consumption is calculated locally.

5. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 4, Features The specific process of step 5.1 is: given β ij The value of h i When the offload task is offloaded to the jth computing entity, the time required for the offload calculation of the jth computing entity is satisfy Derived h i The time required for the local task to be calculated locally by the initiating vehicle u is satisfy Derived Then merge and get 6. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 1, Features The specific process of step 6 is as follows: Step 6.1: Allocate computing resources to computing entities The Lagrangian function of is expressed as: in, represents the Lagrangian function, ζ, ξ and λ are Lagrangian multipliers, ζ j represents the jth element in ζ, ξ ij represents the i-th row and j-th column element in ξ, λ ij represents the i-th row and j-th column element in λ; Step 6.2: Computational resource allocation problem based on computational entities The Lagrangian function The Lagrangian dual problem is obtained, which is described as: Step 6.3: Based on the Lagrangian dual problem, allocate computing resources to computing entities The Lagrangian function Ask about f ij The first-order derivative of f ij The first-order derivative of is expressed as: Let f ij The first-order derivative of is 0, and the following equation is obtained: Step 6.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the jth computing entity Initialize ζ, ξ, and λ, and denote the initial value of ζ as ζ(0), the initial value of ξ as ξ(0), and the initial value of λ as λ(0); Step 6.5: Combine ζ(t), ξ(t) and λ(t) and use the bisection method to solve the equation obtained in step 6.3 to obtain f at the iteration ij The optimal value of ; where ζ(t) is ζ(0), ξ(t) is ξ(0), and λ(t) is λ(0) when t=0; and ζ(t) represents the value of ζ at the t-th iteration, ξ(t) represents the value of ξ at the t-th iteration, and λ(t) represents the value of λ at the t-th iteration when t≠0; Step 6.6: When the tth iteration is obtained, f ij After obtaining the optimal value, the gradient method is used to update ζ, ξ and λ to obtain the respective values ​​of ζ, ξ and λ at the t+1th iteration, which are recorded as ζ(t+1), ξ(t+1) and λ(t+1) respectively; Step 6.7: Calculate the system energy consumption Θ(t) at the tth iteration, Then determine whether the absolute value of the difference between Θ(t) and Θ(t-1) is less than 0.

01. If so, set f at the tth iteration to ij The optimal value of f ij The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 6.5 to continue execution; where E i (f ij ) means that at a fixed ij , β ij 、f iu In the case of f ij Energy consumption during variable optimization: when t=0, it is not determined whether the absolute value of the difference between Θ(t) and Θ(t-1) is less than 0.01, and the process directly returns to step 6.5 to continue execution. When t≠0, Θ(t-1) represents the system energy consumption at the t-1th iteration, and the "=" in t=t+1 is an assignment symbol.

7. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 6, Features The specific process of step 6.5 is as follows: Step 6.5.1: Order represents f ij The upper bound of make represents f ij The lower bound of Step 6.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3 yields the following result: Indicates that Substitute ζ(t), ξ(t) and λ(t) into the equation obtained in step 6.3; Step 6.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 6.5.2 to continue execution; otherwise, output f at the tth iteration ij The optimal value of In step 6.6, the jth element in ζ(t+1) is ζ j (t+1), in,[·] + represents max(0,·),ζ j (t) represents the jth element in ζ(t), s1 is the step size, and s1 is a preset positive number. is the Lagrange multiplier gradient, The element in row i and column j of ζ(t+1) is ζ ij (t+1), Among them, ij (t) represents the element in row i and column j in ξ(t), s2 is the step size, and s2 is a preset positive number. is the Lagrange multiplier gradient, The element in row i and column j of λ(t+1) is λ ij (t+1), Among them, λ ij (t) represents the element in row i and column j in λ(t), s3 is the step size, and s3 is a preset positive number. is the Lagrange multiplier gradient, when hour, When j∈{0}, 8. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 1, Features The specific process of step 7 is as follows: Step 7.1: Allocate computing resources to the initiating vehicle The Lagrangian function of is expressed as: in, represents the Lagrangian function, ω, χ and μ are Lagrangian multipliers, χ i represents the i-th element in χ, μ i represents the i-th element in μ; Step 7.2: Computational resource allocation problem based on the initiating vehicle The Lagrangian function The Lagrangian dual problem is obtained, which is described as: Step 7.3: Based on the Lagrangian dual problem, allocate computing resources to the initiating vehicle The Lagrangian function Ask about f iu The first-order derivative of f iu The first-order derivative of is expressed as: Let f iu The first-order derivative of is 0, and the following equation is obtained: Step 7.4: Let t represent the number of iterations, and the initial value of t is 0; set the maximum computing resource of the initiating vehicle u Initialize ω, χ, and μ, and denote the initial value of ω as ω(0), the initial value of χ as χ(0), and the initial value of μ as μ(0); Step 7.5: Combine ω(0), χ(t), and μ(t) and use the bisection method to solve the equation obtained in step 7.3 to obtain f at the tth iteration iu The optimal value of ; where ω(t) is ω(0), χ(t) is χ(0), and μ(t) is μ(0) when t=0; when t≠0, ω(t) represents the value of ω at the tth iteration, χ(t) represents the value of X at the tth iteration, and μ(t) represents the value of μ at the tth iteration; Step 7.6: When the tth iteration is obtained, f iu After obtaining the optimal value, the gradient method is used to update ω, χ and μ to obtain the respective values ​​of ω, χ and μ at the t+1th iteration, which are recorded as ω(t+1), χ(t+1) and μ(t+1) respectively; Step 7.7: Calculate the system energy consumption at the tth iteration Then judge and Is the absolute value of the difference less than 0.01? If so, set f at the tth iteration iu The optimal value of f iu The final optimal value of The optimal value of; otherwise, set t = t + 1, and then return to step 7.5 to continue execution; where E i (f iu ) means that at a fixed ij , β ij 、f ij In the case of f iu Energy consumption during variable optimization, no judgment when t=0 and If the absolute value of the difference is less than 0.01, return to step 7.5 and continue. When t≠0 It represents the system energy consumption at the t-1th iteration, and the "=" in t=t+1 is an assignment symbol.

9. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 8, Features The specific process of step 7.5 is as follows: Step 7.5.1: Order represents f iu The upper bound of make represents f iu The lower bound of Step 7.5.2: Calculation and midpoint if Then Otherwise, let in, Indicates that Substituting ω(t), χ(t) and μ(t) into the equation obtained in step 7.3 yields the following result: Indicates that Substitute ω(t), χ(t), and μ(t) into the equation obtained in step 7.3 to obtain the result; Step 7.5.3: If and If the absolute value of the difference is greater than 0.001, return to step 7.5.2 to continue execution; otherwise, output f at the tth iteration iu The optimal value of In step 7.6, in,[·] + represents max(0,·), s4 is the step size, s4 is a preset positive number, is the Lagrange multiplier gradient, The i-th element in χ(t+1) is χ i (t-1), Among them, χ i (t) represents the i-th element in χi(t), s5 is the step size, and s5 is a preset positive number. is the Lagrange multiplier gradient, The i-th element in μ(t+1) is μ i (t+1), Among them, μ i (t) represents the i-th element in μ(t), s6 is the step size, and s6 is a preset positive number. is the Lagrange multiplier gradient, 10. The energy-aware vehicle edge computing collaborative resource allocation and task offloading method according to claim 1, Features Based on steps 4 to 7, iterative optimization The specific process is: 1) Initialization make represents the number of iterations, The initial value of is 0; Indicates the maximum number of iterations; 2) Optimize based on step 4 Get the first At iteration The optimal value of; based on step 5 optimization Get the first At iteration The optimal value of; based on step 6 optimization Get the first At iteration The optimal value of Optimize based on step 7 Get the first At iteration The optimal value of 3) Calculate the System energy consumption at iteration judge Whether it is achieved If yes, then output At iteration The optimal value of The optimal value of The optimal value of The optimal value of ; otherwise, let Then return to step 2) to continue execution; wherein, The "=" in is the assignment symbol.