Unloading strategy and resource scheduling combination method based on Internet of Vehicles
By building a communication and computing model of the vehicle edge computing system, combining chaotic mapping and differential mutations with the gray wolf optimization algorithm and the delay balance resource allocation algorithm, the problem of low task success rate in multi-server environments is solved, the balance of delay, energy consumption and task success rate is achieved, and the real-time performance and energy efficiency of the system are improved.
Patent Information
- Application Number
- CN202510446734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In multi-server environments, the prior art is difficult to improve task success rate while ensuring low latency and energy saving, and single-target optimization in dynamic environments is difficult to meet real-time and energy efficiency requirements at the same time.
A communication and computing model based on vehicle edge computing system is built, a gray wolf optimization algorithm based on chaotic mapping and differential mutation is combined with a resource allocation algorithm based on delay balance is designed, and a joint optimization problem model is designed, and the delay, energy consumption and task success rate are balanced through task offloading strategies and resource allocation strategy sets.
The balance between delay and energy consumption in a dynamic environment is achieved, the task success rate is improved, the algorithm's global search ability is enhanced, local optimal solutions are avoided, and the system's real-time performance and energy efficiency are improved.
Smart Images

Figure CN120264352A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle edge computing, and specifically relates to a joint method for offloading strategies and resource scheduling based on the vehicle-to-everything (V2X) network. Background Art
[0002] Currently, the research goals of task offloading and resource allocation in the V2X network can generally be divided into three aspects: minimizing latency, minimizing energy consumption, and balancing latency and energy consumption. If a computationally intensive task is executed locally, the latency is only caused by the processing task on the local device. Otherwise, when a computationally intensive task is offloaded to an edge server, the latency includes the transmission time of the data transmitted to the edge server, the processing time of the edge server, and the transmission time of the result returned by the edge server. Therefore, the latency caused by offloading computationally intensive tasks to the edge server directly affects the user's QoS (Quality of Service). In order to minimize latency while ensuring QoS, a large amount of research has been carried out.
[0003] Minimizing latency is mainly to improve the response speed and real-time performance of the system, ensuring that tasks are completed in the shortest possible time. Applications sensitive to latency (such as autonomous driving, telemedicine, etc.) often require lower latency. Energy consumption optimization focuses on reducing the energy consumption of devices, and minimizing energy consumption is particularly important in battery-powered terminal devices and resource-constrained environments. Reducing energy consumption can not only extend the battery life of devices but also reduce the overall operating cost, which is in line with the concept of green computing and sustainable development. Since simply pursuing low latency may lead to a significant increase in energy consumption, and strictly restricting energy consumption may sacrifice the response speed, many studies have begun to focus on the trade-off and balance between the two.
[0004] With the continuous growth of actual application requirements, the problem of task offloading and resource allocation between vehicles has become increasingly complex. How to improve the task success rate while ensuring low latency and energy conservation and emission reduction has become an important bottleneck restricting system performance. Existing traditional methods are difficult to cope with real-world challenges such as high-speed vehicle movement, dynamic network changes, and limited coverage of edge servers. Therefore, there is an urgent need to design targeted optimization algorithms and scheduling mechanisms for multi-server collaborative scenarios. Summary of the Invention
[0005] The purpose of the present invention is to provide a joint method for offloading strategies and resource scheduling based on the V2X network, which solves the problems of low task success rate caused by uneven resource allocation in a multi-server environment and the difficulty of single-objective optimization in a dynamic environment to simultaneously meet real-time and energy efficiency requirements in the prior art.
[0006] The technical solution adopted by the present invention is a joint method for offloading strategies and resource scheduling based on the V2X network, which specifically includes the following steps: Step 1: Construct a vehicle edge computing system based on multiple servers and multiple users; Step 2: Construct a communication model according to the vehicle edge computing system; Step 3: Construct a computing model; Step 4: Establish a joint optimization problem model with the goal of balancing delay, energy consumption, and maximizing the task success rate; Step 5: Use the gray wolf optimization algorithm based on chaotic mapping and differential mutation and the resource allocation algorithm based on delay balance to solve the joint optimization problem model, and obtain a task offloading strategy set and a resource allocation strategy set.
[0007] The features of the present invention also lie in: In Step 1, the vehicle edge computing system includes a controller, vehicles, RSUs, and MEC servers; the controller is located in the edge cloud; the RSUs are randomly distributed around the road, with a total of m, and each RSU is equipped with an MEC server. Define the RSU set as M={1,2,...,m}, and the coverage radius of the RSU is RA; assume that at a certain moment, there are n vehicles traveling at a speed v , define the vehicle set as N={1,2,...n}, and each vehicle carries a computing task Q i ={ D i , C i , }, where D i represents the size of the input data volume, C i represents the number of CPU cycles required for the computing task, represents the maximum tolerable waiting time of the task.
[0008] The communication model in Step 2 is: (1) In the formula, represents the transmission rate of the uplink, B represents the size of the bandwidth between the edge server and the vehicle, P i represents the transmission power of the vehicle, is the transmission noise of the wireless channel, , ; represents the channel gain between the vehicle and the RSU, which is expressed as: (2) In the formula, u represents the path loss, which is expressed as: (3) Wherein, represents the distance between the vehicle and the MEC server.
[0009] Step 3 constructs a calculation model, which specifically includes the following steps: Step 3.1: Establish a local calculation model; The latency of the local computing task , is expressed as: (4) Wherein, represents the computing power of the vehicle; The energy consumption of the local computing task , is expressed as: (5) Wherein, represents the energy consumption of executing one CPU cycle, depends on the effective switching capacitance of the vehicle user chip and represents the computing power of the on-vehicle terminal; Step 3.2: Establish an MEC calculation model; The vehicle unloads the task to the MEC server on the RSU through wireless access. The total latency of a computing task mainly includes the time for the vehicle i to move from the current position to within the communication range of the target RSU, the offloading and uploading latency, and the MEC computing latency; The time for vehicle i to move from the current position to within the communication range of the target RSU is: (6) Wherein, is the abscissa of the RSU position; is the radius of the RSU coverage; is the abscissa of the vehicle position; The offloading and uploading latency and the MEC computing latency are respectively expressed as follows: (7) (8) Wherein, represents the computing resources obtained by the vehicle from the MEC server. Defining the maximum computing resources of the MEC server as , then there is: (9); The total latency for the task to be executed on the MEC is: (10); The energy consumption during vehicle unloading mainly comes from the wireless transmission process, that is, the energy consumption during the process of the vehicle unloading data to the edge server. , and the formula is as follows: (11); Step 3.3: Establish a calculation model for the total vehicle delay and energy consumption; Since each task is executed locally or on the MEC server, the total vehicle i total delay and energy consumption are expressed as follows: (12) (13) In the formula, x i is the offloading decision variable for each task, x i ∈ {0, 1}; when x i = 0, it means that the computing task is calculated locally; when x i = 1, it means that the computing task is offloaded to the MEC server.
[0010] Step 4 is specifically as follows: Introduce a normalization factor to represent user preference, achieve a unitless combination of the running delay and energy consumption, and design a utility function U1, which is expressed as follows: (14) In the formula, represents the maximum total delay of the vehicle i , represents the maximum energy consumption of the vehicle i ; Introduce a penalty function U2, which is expressed as follows: (15) In the formula, s represents the task success rate; Combine the utility function U1 and the penalty function U2, and establish a joint optimization problem model with the goal of balancing the delay, energy consumption, and maximizing the task success rate, which is expressed as follows: (16) In the formula, is the regularization parameter, which is used to control the intensity of the penalty term; the constraint C1 means that each task can be assigned to at most one MEC server for computing; the constraint C2 means that the task is computed locally or offloaded to the MEC server for computing; C3 means that the vehicle itself has a certain computing ability; C4 means that the computing resources allocated by the server cannot exceed the total resources it owns at the current moment, represents the maximum computing resources of the MEC server; C5 means that the user preference value ranges between 0 and 1; C6 means that the task must complete the computing within the communication time between the vehicle and the RSU, and the maximum communication time between the vehicle and the target RSU is expressed as: (17).
[0011] Step 5 solves the joint optimization problem model, which specifically includes the following steps: Step 5.1: Decompose the joint optimization problem model into two interrelated sub-problems, that is, solve the task offloading strategy set X and the resource allocation strategy set F respectively; Step 5.2: Use the grey wolf optimization algorithm based on chaotic mapping and differential mutation to solve the task offloading strategy set X, and use the resource allocation algorithm based on delay balance to solve the resource allocation strategy set F; Define the task offloading strategy set X as an n×1 vector, that is , where , 0 means local execution, and 1~m means offloading the task to different MEC servers; define the resource allocation strategy set F as an m×1 vector, that is , where , represents the computing resource size allocated to the vehicle i .
[0012] First, according to the RSU location, vehicle location, vehicle speed, and the communication range of the MEC server, preliminarily screen the set of available RSUs for each task to obtain a feasible offloading set; the vehicle can choose the RSUs within the current communication range or within the coverage range on the subsequent driving path for task offloading; Specifically, it includes the following steps: Step 5.2.1: Set the population size, maximum number of iterations, and the initial values of parameters a , A, and C, decode the continuous variables into integer variables from the feasible offloading set, and add the Logistics mapping to optimize the initial distribution quality of the population. The Logistics formula is: (18) In the formula, is the chaotic sequence; Step 5.2.2: Calculate the fitness of each grey wolf individual; Step 5.2.3: Update the positions of grey wolves using differential mutation. The specific formula is as follows: (19) In the formula, is the position of the grey wolf individual updated using the standard grey wolf optimization algorithm; the differential mutation vector V is expressed as follows: (20) In the formula, H is the mutation factor; , and are three non-repeating individuals randomly selected from the population, and all are different from the current individual; Step 5.2.4: Update , A and C using the following formula, and change from linear attenuation to non-linear attenuation; (21) (22) (23) In the formula, a is the convergence factor, A and C are coefficients, is the current iteration number, is the maximum iteration number; r1 and r2 are random numbers in the range of [0, 1]; Step 5.2.5: Solve the resource allocation strategy set F according to the resource allocation algorithm based on delay balance; Step 5.2.6: Determine whether the maximum iteration number is reached. If not, return to Step 5.2.2 for execution; Step 5.2.7: Output the optimal offloading strategy set X and the resource allocation strategy set F.
[0013] In Step 5.2.5, solving the resource allocation strategy set F according to the resource allocation algorithm based on delay balance specifically includes the following steps: Step 5.2.5.1: At the beginning of the algorithm, the resource allocation method based on delay balance will allocate the available capacity of each RSU to each task calculated at that RSU at the ratio of the following formula: (24); Step 5.2.5.2: In each iteration process, the resource allocation algorithm based on delay balance first evaluates the current completion status, normalized delay, and energy consumption of all tasks; Step 5.2.5.3: Separate unfinished and completed tasks; Calculate the comprehensive index according to the priority and performance metrics of the tasks S 𝑖 , sort the unfinished tasks in descending order and the completed tasks in ascending order; (25); Step 5.2.5.4: Transfer resources from completed tasks to unfinished tasks. To avoid over - concentrating too many resources on a single task, set an upper limit on the resource ratio in each transfer; at the same time, introduce a mutation operation with a mutation rate P m Randomly adjust the resource allocation ratios of some tasks, evaluate the mutated scheme, and retain the better scheme; Step 5.2.5.5: Determine whether the maximum number of iterations has been reached. If not, return to Step 5.2.5.3 and execute again; Step 5.2.5.6: When the preset number of iterations is reached, the algorithm stops and outputs the final resource allocation strategy F.
[0014] The beneficial effects of the present invention are as follows: Based on the joint method of offloading strategy and resource scheduling for the vehicle - to - everything network, the present invention designs a system utility function with the goal of balancing delay and energy consumption and maximizing the task success rate, realizes a dimensionless combination of operation delay and energy consumption, and takes into account the joint task offloading and resource allocation method for real - time performance, energy consumption, and task success rate. At the same time, when solving the task offloading strategy set, the grey wolf optimization algorithm based on chaotic mapping and differential mutation is applied to accelerate convergence and improve the global search ability. The differential mutation mechanism enhances the diversity of the population, overcomes premature convergence, and increases the possibility of discovering potential global optimal solutions; when solving the resource allocation strategy set, the resource allocation algorithm based on delay balance is applied, and a mutation operation is introduced during the resource transfer process to enhance the global search ability of the algorithm and effectively avoid falling into local optimal solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is the system model diagram of the joint method of offloading strategy and resource scheduling for the vehicle - to - everything network of the present invention; Figure 2 is the overall flowchart of the CMGWO - DBRA algorithm in the joint method of offloading strategy and resource scheduling for the vehicle - to - everything network of the present invention; Figure 3 is the comparison diagram of the convergence factors of the grey wolf optimization algorithm before and after improvement in the joint method of offloading strategy and resource scheduling for the vehicle - to - everything network of the present invention; Figure 4 is the change diagram of the system utility value with the increase of the number of iterations in the joint method of offloading strategy and resource scheduling for the vehicle - to - everything network of the present invention; Figure 5(a) is a graph showing the change in the system utility value with the increase in the number of vehicles in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 5(b) is a comparison graph showing the change in the task success rate with the increase in the number of vehicles in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 5(c) is a comparison graph showing the change in the algorithm running time with the increase in the number of vehicles in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 6(a) is a graph showing the change in the system utility value with the increase in the number of CPU cycles required for the computing task in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 6(b) is a comparison graph showing the change in the task success rate with the increase in the number of CPU cycles required for the computing task in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 6(c) is a comparison graph showing the change in the algorithm running time with the increase in the number of CPU cycles required for the computing task in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 7(a) is a graph showing the change in the system utility value with the increase in the task tolerable delay in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 7(b) is a comparison graph showing the change in the task success rate with the increase in the task tolerable delay in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention; Figure 7(c) is a comparison graph showing the change in the algorithm running time with the increase in the task tolerable delay in the joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention. Detailed implementation manners
[0016] The present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0017] The joint method of offloading strategy and resource scheduling based on the Internet of Vehicles of the present invention specifically includes the following steps: 1. The joint method of offloading strategy and resource scheduling based on the Internet of Vehicles specifically includes the following steps: Step 1: Construct a vehicle edge computing system based on multiple servers and multiple users.
[0018] The vehicle edge computing system, as Figure 1 shown, specifically includes a controller, vehicles, RSUs, and MEC servers; the controller is located in the edge cloud and can control global information; the RSUs are randomly distributed around the road, with a total of m, and each RSU is equipped with an MEC server. Define the RSU set as M = {1, 2,..., m}, and the coverage radius of the RSU is RA; assume that at a certain moment, there are n vehicles with a speed of vTravel. Define the vehicle set as N = {1, 2,... n}, and each vehicle carries a computing task Q i ={ D i , C i , }, where D i represents the size of the input data volume, with the unit of bit, C i represents the number of CPU cycles required for the computing task, with the unit of cycles, represents the maximum tolerable waiting time of the task, with the unit of s.
[0019] Step 2: Construct a communication model according to the vehicle edge computing system.
[0020] The communication between the vehicle and the roadside unit (RSU) is only affected by the large-scale path loss and conforms to the free space propagation model or the log-distance path loss model. According to Shannon's formula, the transmission rate of the uplink, that is, the communication model, is: (1) In the formula, represents the transmission rate of the uplink, B represents the size of the bandwidth between the edge server and the vehicle, P i represents the transmission power of the vehicle, is the transmission noise of the wireless channel, , ; represents the channel gain between the vehicle and the RSU, expressed as: (2) In the formula, u represents the path loss, expressed as: (3) In the formula, represents the distance between the vehicle and the MEC server.
[0021] Step 3: Construct a computing model. Specifically, it includes the following steps: Step 3.1: Establish a local computing model; The delay of the local computing task , expressed as: (4) In the formula, represents the computing power of the vehicle; To calculate the energy consumption of a computing task unloaded at a vehicle terminal, the energy consumption of the local computing task is obtained using the widely adopted energy consumption model for each computing cycle. , which is expressed as: (5) In the formula, represents the energy consumption of executing one CPU cycle, depends on the effective switching capacitance of the vehicle user's chip and represents the computing power of the vehicle terminal; Step 3.2: Establish an MEC computing model; The vehicle unloads the task to the MEC server on the RSU through wireless access. The total delay of a computing task mainly includes the time for the vehicle i to move from the current position to within the communication range of the target RSU, the unloading and uploading delay, and the MEC computing delay; The time for vehicle i to move from the current position to within the communication range of the target RSU is: (6) In the formula, is the abscissa of the RSU position; is the radius of the RSU coverage; is the abscissa of the vehicle position; during one-way driving, the vehicle can unload its computing task to the RSU within the current communication range or the subsequent RSU along its traveling direction.
[0022] The unloading and uploading delay and the MEC computing delay are respectively expressed as follows: (7) (8) In the formula, represents the computing resources obtained by the vehicle from the MEC server. Defining the maximum computing resources of the MEC server as , then there is: (9); The total delay for the task to be executed on the MEC is: The energy consumption during vehicle unloading mainly comes from the wireless transmission process, that is, the energy consumption during the process of the vehicle unloading data to the edge server , and the formula is as follows: (11); Step 3.3: Establish a vehicle total delay and energy consumption calculation model; Since each task can be executed locally or on the MEC server, the vehicle i total delay and energy consumption , are expressed as follows: (12) (13) In the formula, x i is the offloading decision variable for each task, x i ∈ {0, 1}; when x i = 0, it means the computing task is computed locally; when x i = 1, it means the computing task is offloaded to the MEC server.
[0023] Step 4: Establish a joint optimization problem model with the goal of balancing delay, energy consumption, and maximizing the task success rate.
[0024] To balance the task running delay and system energy consumption, while reducing the task running delay, minimize the energy consumption as much as possible, and further improve the task success rate. Introduce a normalization factor to represent user preference, achieve a unitless combination of running delay and energy consumption, and design a utility function U1, which is expressed as follows: (14) In the formula, represents the maximum total delay of the vehicle i , represents the maximum energy consumption of the vehicle i ; To further ensure the success rate of the system, introduce a penalty function U2, which is expressed as follows: (15) In the formula, s represents the task success rate; The design of the penalty function aims to punish the situation of low task success rate, so as to guide the algorithm to develop towards the trend of improving the task success rate, and then ensure the overall improvement of system performance.
[0025] Combine the utility function U1 and the penalty function U2, and establish a joint optimization problem model with the goal of balancing delay, energy consumption, and maximizing the task success rate, which is expressed as follows: (16) In the formula, is the regularization parameter used to control the strength of the penalty term; constraint C1 means that each task can be assigned to at most one MEC server for computing; constraint C2 means that the task is computed locally or offloaded to the MEC server; C3 means that the vehicle itself has a certain computing ability; C4 means that the computing resources allocated by the server cannot exceed the total resources it owns at the current moment, represents the maximum computing resources of the MEC server; C5 means that the user preference value ranges between 0 and 1; C6 means that the task must complete the computing within the communication time between the vehicle and the RSU, and the maximum communication time between the vehicle and the target RSU is expressed as: (17).
[0026] Step 5: Use the Grey Wolf Optimization Algorithm based on chaotic mapping and differential mutation and the resource allocation algorithm based on delay balance to solve the joint optimization problem model, and obtain the task offloading strategy set and the resource allocation strategy set. The specific steps are as follows: Step 5.1: Decompose the joint optimization problem model into two interrelated sub-problems, that is, solve the task offloading strategy set X and the resource allocation strategy set F respectively; Step 5.2: Use the Grey Wolf Optimization Algorithm based on chaotic mapping and differential mutation (CMGWO) to solve the task offloading strategy set X, and use the resource allocation algorithm based on delay balance (DBRA) to solve the resource allocation strategy set F. The CMGWO-DBRA algorithm is as Figure 2 shown, and the specific steps are as follows: Define the task offloading strategy set X as an n×1 vector, that is where 0 means local execution, and 1~m means offloading the task to different MEC servers; First, according to the RSU location, vehicle location, vehicle speed, and the communication range of the MEC server, preliminarily screen the set of available RSUs for each task to obtain a feasible offloading set; the vehicle can choose the RSUs within the current communication range or within the coverage range of the subsequent driving path for task offloading; Step 5.2.1: Set the population size, maximum number of iterations, and the initial values of the parameters a 、A and C, decode the continuous variables into integer variables from the feasible offloading set, and add the Logistics mapping to optimize the initial distribution quality of the population. The Logistics formula is: (18) In the formula, is the chaotic sequence; Introduce the Logistics mapping in the chaotic mapping into the initialization process of the Grey Wolf Optimization (GWO) algorithm to optimize the initial distribution quality of the population, thereby accelerating convergence and improving the global search ability.
[0027] Step 5.2.2: Calculate the fitness of each grey wolf individual; Step 5.2.3: Introduce the differential mutation mechanism to enhance species diversity, and use differential mutation to update the positions of grey wolves. The specific formula is as follows: (19) In the formula, is the position of the grey wolf individual after updating using the standard Grey Wolf Optimization algorithm; The differential mutation vector V is expressed as follows: (20) In the formula, H is the mutation factor; , and are three non-repeating individuals randomly selected from the population, and all are different from the current individual. Introducing the differential mutation mechanism not only overcomes the premature convergence of the algorithm but also increases the possibility of discovering potential global optimal solutions.
[0028] Step 5.2.4: Update , A and C using the following formula, change from linear attenuation to non-linear attenuation to improve the deficiency of local search ability; The attenuation method of the improved coefficient is as shown in Figure 3 .
[0029] (21) (22) (23) In the formula, a is the convergence factor, A and C are coefficients, is the current iteration number, is the maximum iteration number; r1 and r2 are random numbers in the range of [0, 1]; Step 5.2.5: Solve the resource allocation strategy set F according to the resource allocation algorithm based on delay balance; It specifically includes the following steps: Define the resource allocation strategy set F as an m×1 vector, that is , where , represents the computing resource size allocated to vehicle i .
[0030] For the solution of the resource allocation strategy set F of the present invention, a resource allocation algorithm based on delay balance (DBRA) is designed. It is optimized for specific requirements of resource allocation. By introducing an adaptive mutation operation, the global search ability of the algorithm is enhanced, and the risk of falling into local optimum is reduced. At the same time, through the delay balance mechanism, DBRA can effectively coordinate the delay and energy consumption of tasks, and significantly reduce the overall utility of the system.
[0031] Step 5.2.5.1: At the beginning of the algorithm, for each RSU, the resource allocation method based on delay balance allocates its available capacity to each task calculated at the RSU at the ratio of the following formula: (24); Step 5.2.5.2: In each iteration process, the resource allocation algorithm based on delay balance first evaluates the current completion status, normalized delay and energy consumption of all tasks; Step 5.2.5.3: Separate unfinished and completed tasks; specifically: Calculate the comprehensive index according to the priority and performance index of the task S 𝑖 , sort the unfinished tasks in descending order and the completed tasks in ascending order; (25); Step 5.2.5.4: Transfer resources from completed tasks to unfinished tasks. To avoid over-concentrating too many resources on a single task, set an upper limit on the resource ratio in each transfer; at the same time, introduce a mutation operation, with a mutation rate P m randomly adjust the resource allocation ratio of some tasks, evaluate the mutated scheme, and retain the better scheme; the mutation rate P of the present invention m takes a value of 5%, and the mutation range is 2%. This enables the algorithm to effectively avoid falling into local optimum solutions and explore a wider solution space.
[0032] Step 5.2.5.5: Judge whether the maximum number of iterations is reached. If not, return to Step 5.2.5.3 to execute again; Step 5.2.5.6: When the preset number of iterations is reached, the algorithm stops and outputs the final resource allocation strategy F.
[0033] Step 5.2.6: Judge whether the maximum number of iterations is reached. If not, return to Step 5.2.2 to execute; Step 5.2.7: Output the optimal offloading strategy set X and the resource allocation strategy set F.
[0034] Example 1 This embodiment provides a joint method for offloading strategies and resource scheduling based on the vehicle network, which specifically includes the following steps: Step 1: Construct a vehicle edge computing system based on multiple servers and multiple users; Step 2: Construct a communication model according to the vehicle edge computing system; Step 3: Construct a computing model; Step 4: Establish a joint optimization problem model with the goal of balancing latency, energy consumption, and maximizing the task success rate; Step 5: Use the grey wolf optimization algorithm based on chaotic mapping and differential mutation and the resource allocation algorithm based on latency balance to solve the joint optimization problem model, and obtain the task offloading strategy set and the resource allocation strategy set.
[0035] Embodiment 2 Based on Embodiment 1, in Step 1, the vehicle edge computing system, as Figure 1 shown, includes a controller, vehicles, RSUs, and MEC servers; the controller is located in the edge cloud; the RSUs are randomly distributed around the road, with a total of m, and each RSU is equipped with an MEC server. Define the RSU set as M = {1, 2,..., m}, and the coverage radius of the RSU is RA; assume that at a certain moment, n vehicles are traveling at a speed v , define the vehicle set as N = {1, 2,... n}, and each vehicle carries a computing task Q i ={ D i , C i , }, where D i represents the size of the input data volume, C i represents the number of CPU cycles required for the computing task, represents the maximum tolerable waiting time for this task.
[0036] Embodiment 3 Based on Embodiment 2, in Step 2, the communication model is: (1) In the formula, represents the transmission rate of the uplink, B represents the size of the bandwidth between the edge server and the vehicle, P i represents the transmission power of the vehicle, is the transmission noise of the wireless channel, , ; represents the channel gain between the vehicle and the RSU, which is expressed as: (2) Wherein, u represents path loss and is expressed as: (3) Wherein, represents the distance between the vehicle and the MEC server.
[0037] Embodiment 4 On the basis of Embodiment 3, in step 3, a calculation model is constructed, which specifically includes the following steps: Step 3.1: Establish a local calculation model; The latency of the local calculation task , is expressed as: (4) Wherein, represents the computing power of the vehicle; The energy consumption of the local calculation task , is expressed as: (5) Wherein, represents the energy consumption of executing one CPU cycle, depends on the effective switching capacitance of the vehicle user chip and represents the computing power of the on-vehicle terminal; Step 3.2: Establish an MEC calculation model; The vehicle unloads the task to the MEC server on the RSU through wireless access. The total latency of a calculation task mainly includes the time for the vehicle i to move from the current position to within the communication range of the target RSU, the offloading upload latency, and the MEC calculation latency; The time for vehicle i to move from the current position to within the communication range of the target RSU is: (6) Wherein, is the abscissa of the RSU position; is the radius of the RSU coverage; is the abscissa of the vehicle position; The offloading upload latency and the MEC calculation latency are respectively expressed as follows: (7) (8) Wherein, represents the computing resources obtained by the vehicle from the MEC server. Defining the maximum computing resources of the MEC server as , then there is: (9); The total delay for the task to be executed on the MEC is: (10); The energy consumption during vehicle offloading mainly comes from the wireless transmission process, that is, the energy consumption during the process of the vehicle offloading data to the edge server , and the formula is as follows: (11); Step 3.3: Establish a calculation model for the total vehicle delay and energy consumption; Since each task is executed locally or on the MEC server, the vehicle i total delay and energy consumption are expressed as follows: (12) (13) In the formula, x i is the offloading decision variable for each task, x i ∈ {0, 1}; when x i = 0, it means that the computing task is computed locally; when x i = 1, it means that the computing task is offloaded to the MEC server.
[0038] Example 5 Based on Example 4, Step 4 is specifically: Introduce a normalization factor to represent user preference, achieve a unitless combination of the running delay and energy consumption, and design a utility function U1, which is expressed as follows: (14) In the formula, represents the maximum total delay of the vehicle i , represents the maximum energy consumption of the vehicle i ; Introduce a penalty function U2, which is expressed as follows: (15) In the formula, s represents the task success rate; Combine the utility function U1 and the penalty function U2, and establish a joint optimization problem model with the goal of balancing the delay, energy consumption, and maximizing the task success rate, which is expressed as follows: (16) In the formula, is the regularization parameter, which is used to control the strength of the penalty term; the constraint C1 means that each task can be assigned to at most one MEC server for computing; the constraint C2 means that the task is computed locally or offloaded to the MEC server; C3 means that the vehicle itself has a certain computing ability; C4 means that the computing resources allocated by the server cannot exceed the total resources it owns at the current moment, represents the maximum computing resources of the MEC server; C5 means that the user preference value ranges between 0 and 1; C6 means that the task must complete the computing within the communication time between the vehicle and the RSU, and the maximum communication time between the vehicle and the target RSU is expressed as: (17).
[0039] Embodiment 6 Based on Embodiment 5, Step 5 solves the joint optimization problem model, which specifically includes the following steps: Step 5.1: Decompose the joint optimization problem model into two interrelated sub-problems, that is, solve the task offloading strategy set X and the resource allocation strategy set F respectively; Step 5.2: Use the grey wolf optimization algorithm based on chaotic mapping and differential mutation to solve the task offloading strategy set X, and use the resource allocation algorithm based on delay balance to solve the resource allocation strategy set F; Define the task offloading strategy set X as an n×1 vector, that is , where , 0 means local execution, and 1~m means offloading the task to different MEC servers; First, according to the RSU location, vehicle location, vehicle speed, and the communication range of the MEC server, preliminarily screen the set of available RSUs for each task to obtain a feasible offloading set; the vehicle can choose the RSUs within the current communication range or within the coverage range of the subsequent driving path for task offloading; Specifically, it includes the following steps: Step 5.2.1: Set the population size, the maximum number of iterations, and the initial values of the parameters a , A, and C, decode the continuous variables into integer variables from the feasible offloading set, and add the Logistics mapping to optimize the initial distribution quality of the population. The Logistics formula is: (18) In the formula, is the chaotic sequence; Step 5.2.2: Calculate the fitness of each grey wolf individual; Step 5.2.3: Update the position of the grey wolf using differential mutation. The specific formula is as follows: (19) In the formula, is the position of the grey wolf individual updated using the standard grey wolf optimization algorithm; The differential mutation vector V is expressed as follows: (20) In the formula, H is the mutation factor; , and are three non-repeating individuals randomly selected from the population, and all are different from the current individual; Step 5.2.4: Update , A and C using the following formula, and change from linear attenuation to non-linear attenuation; (21) (22) (23) In the formula, a is the convergence factor, A and C are coefficients, is the current iteration number, is the maximum iteration number; r1 and r2 are random numbers in the range of [0, 1]; Step 5.2.5: Solve the resource allocation strategy set F according to the resource allocation algorithm based on delay balance; Define the resource allocation strategy set F as an m×1 vector, that is , where , represents the computing resource size allocated to vehicle i .
[0040] Step 5.2.5.1: At the beginning of the algorithm, the resource allocation method based on delay balance will allocate its available capacity to each task calculated at the RSU at the ratio of the following formula for each RSU: (24); Step 5.2.5.2: In each iteration process, the resource allocation algorithm based on delay balance first evaluates the current completion status, normalized delay and energy consumption of all tasks; Step 5.2.5.3: Separate uncompleted and completed tasks; Calculate the comprehensive index according to the priority and performance indicators of the tasksS 𝑖 Sort the unfinished tasks in descending order and the completed tasks in ascending order; (25); Step 5.2.5.4: Transfer resources from completed tasks to unfinished tasks. To avoid over - concentrating too many resources on a single task, set an upper limit on the resource ratio in each transfer; meanwhile, introduce a mutation operation with a mutation rate P m Randomly adjust the resource allocation ratios of some tasks, evaluate the mutated solution, and retain the better solution; Step 5.2.5.5: Determine whether the maximum number of iterations has been reached. If not, return to Step 5.2.5.3 and execute again; Step 5.2.5.6: When the preset number of iterations is reached, the algorithm stops and outputs the final resource allocation strategy F.
[0041] Step 5.2.6: Determine whether the maximum number of iterations has been reached. If not, return to Step 5.2.2 and execute; Step 5.2.7: Output the optimal offloading strategy set X and the resource allocation strategy set F.
[0042] Simulation experiment In the experiment, a one - way highway with a length of 1000 meters is selected as the research scenario. m base stations are deployed along one side of the road, and each base station is equipped with a server. There are n vehicles generating tasks simultaneously in the area. The simulation parameters for vehicles and servers are shown in Table 1: Table 1 Parameter settings
[0043] To verify the effectiveness of the algorithm proposed in this paper, we compared the following several benchmark schemes: GWO - GWO scheme: Use the original Grey Wolf Optimization algorithm to solve both the task offloading and resource allocation problems simultaneously.
[0044] PSO - AFSA scheme: Use the Particle Swarm Optimization (PSO) algorithm to determine the task offloading strategy set and combine it with the Artificial Fish Swarm Algorithm (AFSA) to optimize the resource allocation strategy set.
[0045] GWO - ACO scheme: Use the original Grey Wolf Optimization algorithm to generate the task offloading strategy set and combine it with the Ant Colony Optimization (ACO) algorithm to optimize the resource allocation strategy set.
[0046] GWO-SA solution: The original Grey Wolf Optimization algorithm is used to obtain the task offloading strategy set, and the Simulated Annealing (SA) algorithm is combined to optimize the resource allocation strategy set.
[0047] Based on the above simulation conditions, the following simulations are carried out: Experiment 1: There are 60 task-generating vehicles and 5 roadside units (RSUs) on the road. The vehicle speed is a random value within [25, 30] m / s, and other parameters are set according to Table 1. Figure 4 For this experimental condition, the variation of the utility function value of the task with the number of iterations reflects the convergence of the algorithm. From Figure 4 it can be seen that CMGWO-DBRA shows a faster convergence rate. As the iteration process progresses, although the fitness values of each comparison algorithm gradually approach that of CMGWO-DBRA, they never exceed its optimization performance. This shows that the CMGWO-DBRA algorithm has significant advantages in both convergence speed and solution accuracy.
[0048] Experiment 2: The number of task vehicles on the road increases from 10 to 100. The vehicle speed is a random value within [25, 30] m / s, and other parameters are set according to Table 1. Figures 5(a) - 5(c) show the variation diagrams of the utility function value, task success rate, and algorithm running time with the increase in the number of vehicles under this experimental condition. From Figures 5(a) - 5(c), it can be seen that CMGWO-DBRA can still maintain a relatively good utility function value in most cases, the task success rate is generally higher than that of other comparison algorithms, and the algorithm running time is always the lowest. This reflects its better optimization efficiency and stability, stronger robustness and adaptability, and higher computational efficiency.
[0049] Experiment 3: There are 60 task-generating vehicles on the road. The number of CPU cycles required for the task increases from 1×10 10 cycles to 2×10 10 cycles. The vehicle speed is a random value within [25, 30] m / s, and other parameters are set according to Table 1. Figures 6(a) - 6(c) show the variation diagrams of the utility function value, task success rate, and algorithm running time with the increase in the number of CPU cycles required for the task under this experimental condition.
[0050] As can be seen from Figs. 6(a) to 6(c), the optimal utility value of the CMGWO-DBRA algorithm always remains at a low level within different CPU cycle ranges, and the overall fluctuation is small; it maintains a higher task success rate in most intervals and can still maintain relatively better performance under high load; under different conditions of the number of CPU cycles of tasks, the change range of the algorithm running time is small, and the running time of CMGWO-DBRA is still the shortest. The experimental results show that CMGWO-DBRA has strong robustness and adaptability.
[0051] Experiment 4: There are 60 vehicles generating tasks on the road, and the maximum tolerable task delay increases from a random value in [2, 4] s to a random value in [6, 8] s. The vehicle speed is a random value within [25, 30] m / s, and other parameters are set according to Table 1. Figs. 7(a) to 7(c) are the graphs of the utility function value, task success rate, and algorithm running time varying with the increase of task tolerable delay under this experimental condition.
[0052] As can be seen from Figs. 7(a) to 7(c), overall, CMGWO-DBRA always maintains a low or nearly minimum system utility; it always maintains a higher success rate throughout the delay range, especially with a more obvious leading advantage in the intervals with smaller delays; the algorithm running time is always the lowest. The experimental results show that CMGWO-DBRA has strong optimization ability and computational efficiency, and the resource transfer mechanism therein is part of the reason for improving the task success rate.
Claims
1. A joint method for offloading strategy and resource scheduling based on the vehicle network, characterized in that, Specifically, it includes the following steps: Step 1: Construct a vehicle edge computing system based on multiple servers and multiple users; Step 2: Construct a communication model according to the vehicle edge computing system; Step 3: Construct a computing model; Step 4: Establish a joint optimization problem model with the goal of balancing latency, energy consumption, and maximizing the task success rate; Step 5: Use the Grey Wolf Optimization Algorithm based on chaotic mapping and differential mutation and the resource allocation algorithm based on delay balance to solve the joint optimization problem model, and obtain the task offloading strategy set and the resource allocation strategy set.
2. The joint method for offloading strategy and resource scheduling based on vehicle-to-everything network according to claim 1, wherein The vehicle edge computing system described in Step 1 includes a controller, vehicles, RSUs, and MEC servers; the controller is located in the edge cloud; the RSUs are randomly distributed around the road, with a total of m RSUs, and each RSU is equipped with an MEC server. Define the set of RSUs as M = {1, 2,..., m}, and the coverage radius of the RSUs is RA; assume that at a certain moment, there are n vehicles traveling at a speed v Define the set of vehicles as N = {1, 2,... n}, and each vehicle carries a computing task Q i ={ D i , C i , }, where D i represents the size of the input data volume, C i represents the number of CPU cycles required for the computing task, represents the maximum tolerable waiting time for this task.
3. The joint method for offloading strategy and resource scheduling based on vehicle-to-everything network according to claim 2, wherein The communication model described in Step 2 is: (1) Wherein, represents the uplink transmission rate, B represents the magnitude of the bandwidth between the edge server and the vehicle, P i represents the transmission power of the vehicle, is the transmission noise of the wireless channel, , ; represents the channel gain between the vehicle and the RSU, expressed as: (2) Wherein, u represents path loss, expressed as: (3) In the formula, represents the distance between the vehicle and the MEC server.
4. The joint method for offloading strategy and resource scheduling based on vehicle-to-everything network according to claim 3, wherein Step 3 constructs a computing model, specifically including the following steps: Step 3.1: Establish a local computing model; Latency of local computing tasks , expressed as: (4) In the formula, represents the computing power of the vehicle; Energy consumption of local computing tasks , expressed as: (5) Wherein, represents the energy consumption for executing one CPU cycle, which depends on the effective switching capacitance of the vehicle user chip and represents the computing power of the in-vehicle terminal; Step 3.2: Establish a MEC computing model; The vehicle offloads tasks to the MEC server on the RSU through wireless access. The total delay of a computing task mainly includes the time for the vehicle i to move from the current location to within the communication range of the target RSU, the offloading and uploading delay, and the MEC computing delay; The time for vehicle i to move from the current position to within the communication range of the target RSU is as follows: (6) Wherein, is the abscissa of the RSU position; is the radius of the RSU coverage; is the abscissa of the vehicle position; Unloading upload delay and MEC computing delay are respectively expressed as follows: (7) (8) Wherein, represents the computing resources obtained by the vehicle from the MEC server, and defines the maximum computing resources of the MEC server as , then there is: (9); Total latency of task execution on MEC is as follows: (10); The energy consumption during vehicle unloading mainly comes from the wireless transmission process, that is, the energy consumption during the process of the vehicle unloading data to the edge server , and the formula is as follows: (11); Step 3.3: Establish a vehicle total latency and energy consumption computing model; Since each task is executed locally or on the MEC server, the vehicle i Total delay and energy consumption , are expressed as follows: (12) (13) wherein, x i is the offloading decision variable for each task, x i ∈ {0, 1}; When x i = 0, it indicates that the computing task is computed locally; when x i = 1, it indicates that the computing task is offloaded to the MEC server.
5. The joint method for offloading strategy and resource scheduling based on vehicle networking according to claim 4, wherein Step 4 is specifically: Introduce a normalization factor To represent user preferences and achieve a unitless combination of running delay and energy consumption, a utility function U1 is designed and expressed as follows: (14) In the formula, represents the maximum total time delay of the vehicle i , and represents the maximum energy consumption of the vehicle i . Introduce a penalty function U2, expressed as follows: (15) In the formula, s represents the task success rate; Combine the utility function U1 and the penalty function U2, and establish a joint optimization problem model with the goal of balancing latency, energy consumption, and maximizing the task success rate, expressed as follows: (16) In the formula, is a regularization parameter used to control the intensity of the penalty term; Constraint C1 means that for each task, it can be assigned to at most one MEC server for computing; Constraint C2 means that the task is computed locally or offloaded to the MEC server; C3 means that the vehicle itself has a certain computing power; C4 means that the computing resources allocated by the server cannot exceed the total resources it owns at the current moment, represents the maximum computing resources of the MEC server; C5 means that the user preference value ranges between 0 and 1; C6 means that the task must complete the computing within the communication time between the vehicle and the RSU, and the maximum communication time between the vehicle and the target RSU is expressed as: (17)。 6. The joint method for offloading strategy and resource scheduling based on vehicle-to-everything network according to claim 5, wherein Step 5 solves the joint optimization problem model, specifically including the following steps: Step 5.1: Decompose the joint optimization problem model into two interrelated sub-problems, that is, solve the task offloading strategy set X and the resource allocation strategy set F respectively; Step 5.2: Use the Grey Wolf Optimization Algorithm based on chaotic mapping and differential mutation to solve the task offloading strategy set X, and use the resource allocation algorithm based on delay balance to solve the resource allocation strategy set F; Define the task offloading policy set \(X\) as an \(n\times1\) vector, i.e., , where , \(0\) represents local execution, and \(1\) to \(m\) represent offloading the task to different MEC servers; define the resource allocation policy set \(F\) as an \(m\times1\) vector, i.e., , where , represents the amount of computing resources allocated to vehicle i .
7. The joint method for offloading strategy and resource scheduling based on vehicle networking according to claim 6, characterized in that, First, according to the RSU location, vehicle location, vehicle speed, and the communication range of the MEC server, conduct a preliminary screening of the set of available RSUs for each task to obtain a feasible offloading set; the vehicle can choose to offload tasks to the RSUs within the current communication range or within the coverage range of the subsequent driving path; Specifically, it includes the following steps: Step 5.2.1: Set the population size, maximum number of iterations, and the initial values of parameters a , A, and C. Decode the continuous variables into integer variables from the feasible offloading set, and add the Logistics mapping to optimize the initial distribution quality of the population. The Logistics formula is: (18) In the formula, is a chaotic sequence; Step 5.2.2: Calculate the fitness of each Grey Wolf individual; Step 5.2.3: Update the position of the Grey Wolf using differential mutation, and the specific formula is as follows: (19) In the formula, is the position after the update of the gray wolf individual using the standard gray wolf optimization algorithm; the differential mutation vector V is expressed as follows: (20) where H is the mutation factor; , and are three non-repeating individuals randomly selected from the population and are all different from the current individual; Step 5.2.4: Update using the following formula , A and C , and change from linear attenuation to non-linear attenuation; (21) (22) (23) Wherein, a is a convergence factor, A and C are coefficients, is the current iteration number, is the maximum iteration number; r1 and r2 are random numbers within the range of [0, 1]; Step 5.2.5: Solve the resource allocation strategy set F according to the resource allocation algorithm based on delay balance; Step 5.2.6: Determine whether the maximum number of iterations is reached. If not, return to Step 5.2.2 for execution; Step 5.2.7: Output the optimal offloading strategy set X and the resource allocation strategy set F.
8. The joint method for offloading strategy and resource scheduling based on vehicle networking according to claim 7, characterized in that, In Step 5.2.5, solving the resource allocation strategy set F according to the resource allocation algorithm based on delay balance specifically includes the following steps: Step 5.2.5.1: At the beginning of the algorithm, the resource allocation algorithm based on delay balance will allocate the available capacity of each RSU to each task calculated at that RSU at the ratio of the following formula: (24); Step 5.2.5.2: In each iteration process, the resource allocation algorithm based on delay balance first evaluates the current completion status, normalized latency, and energy consumption of all tasks; Step 5.2.5.3: Separate the unfinished and completed tasks; Calculate the comprehensive index based on the priority and performance metrics of the tasks S 𝑖 , sort the unfinished tasks in descending order and the completed tasks in ascending order; (25); Step 5.2.5.4: Transfer resources from the completed tasks to the unfinished tasks. To avoid over-concentrating too many resources on a single task, set an upper limit on the resource ratio in each transfer. Meanwhile, introduce a mutation operation with a mutation rate of P m Randomly adjust the resource allocation ratios of some tasks, evaluate the mutated solutions, and retain the better solutions; Step 5.2.5.5: Determine whether the maximum number of iterations is reached. If not, return to Step 5.2.5.3 and execute again; Step 5.2.5.6: When the preset number of iterations is reached, the algorithm stops and outputs the final resource allocation strategy F.
Citation Information
Cited By
Internet of vehicles computing task unloading method based on mantis shrimp optimization and safety protection
CN120723337A
Optimization method for edge computing task unloading and resource scheduling of Internet of Vehicles
CN120916201A
Task unloading method, system and equipment oriented to long-term dependence and multi-user competition
CN122248472A
Task offloading method, system and device oriented to long-term dependence and multi-user competition
CN122248472B