Internet of vehicles edge computing task unloading method

The MATD3 deep reinforcement learning algorithm is used to optimize the offloading of edge computing tasks in the Internet of Vehicles, which solves the problem of increased delay and energy consumption caused by dynamic changes in the Internet of Vehicles network, and improves the efficiency of edge computing in the Internet of Vehicles.

CN118612795AInactive Publication Date: 2024-09-06CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202410888611.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The network topology of the Internet of Vehicles is prone to highly dynamic changes, which leads to increased communication delays and energy consumption between vehicles and edge servers, affecting the performance of offloading edge computing tasks in the Internet of Vehicles.

Method used

The deep reinforcement learning computing offloading method based on multi-agent participation based on MATD3 is used to build the Internet of Vehicles edge computing scenario model, combined with the joint optimization objective function of task offloading delay and energy consumption, and converts it into a Markov decision-making process, using deep reinforcement Learning algorithms optimize offloading decisions.

Benefits of technology

It effectively reduces the total system cost, improves the efficiency of offloading tasks in the Internet of Vehicles, achieves joint optimization of delay and energy consumption, and improves the performance of edge computing in the Internet of Vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612795A
    Figure CN118612795A
Patent Text Reader

Abstract

The invention belongs to the technical field of mobile communication, and particularly relates to an Internet of Vehicles edge computing task unloading method, which comprises the following steps of: obtaining an unloading task of a moving vehicle in an Internet of Vehicles edge computing environment, and optimizing a task unloading decision by adopting MATD3; according to the method, a three-layer Internet of Vehicles edge calculation scene model is constructed to obtain an unloading task of a moving vehicle; the total time delay and the total energy consumption cost in the task unloading process are set as weighted total cost; defining the total cost of the system as a joint optimization problem of task unloading time delay and energy consumption; converting the problem model into a Markov decision process; and an MATD3 is adopted to solve the joint optimization problem of task unloading time delay and energy consumption, and an optimal car networking task unloading decision is obtained. According to the method, the total cost of the system is effectively reduced, and the effectiveness of task unloading of the Internet of Vehicles is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communication technologies, and in particular to a method for offloading edge computing tasks in an Internet of Vehicles (IoV). Background Art

[0002] As the number of cars continues to rise, computing needs are increasing. Mobile edge computing can calculate, process, and transmit the large number of task computing and processing requirements generated by the Internet of Vehicles through edge terminals such as base stations and roadside units. Task offloading transfers computing tasks from the vehicle itself to edge nodes adjacent to the vehicle for processing, making data processing more efficient and reducing the computing burden of the vehicle itself. At the same time, computing resources at the edge can also be used to process data more quickly and respond. Task offloading decisions are affected by the allocation of computing resources, and computing, storage, and communication resources must be effectively allocated to meet the needs of different vehicles.

[0003] However, the network topology of the Internet of Vehicles is prone to highly dynamic changes, which can easily lead to increased communication latency and energy consumption between vehicles and edge servers, seriously affecting the offloading performance. Given the dynamic resource requirements, diverse task characteristics and complex communication environment of vehicles in the Internet of Vehicles, the joint optimization of the latency and energy consumption of Internet of Vehicles edge computing task offloading is still an important topic that needs to be studied. Therefore, we propose a method for Internet of Vehicles edge computing task offloading to solve the above problems. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the deficiencies in the prior art, the present invention provides a method for offloading edge computing in an Internet of Vehicles, which solves the problems raised in the above-mentioned background technology.

[0006] (II) Technical solution

[0007] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:

[0008] A method for offloading edge computing tasks in the Internet of Vehicles, a deep reinforcement learning computing offloading method based on MATD3 with multi-agent participation, from the perspective of Internet of Vehicles task offloading decision-making, introduces a deep reinforcement learning computing offloading method based on MATD3 to solve the joint optimization problem of task offloading delay and energy consumption, thereby solving the computing task offloading problem.

[0009] Step 1: Build an IoV edge computing scenario model: It consists of a MEC server, R roadside units, and K mobile cars. The K mobile cars are traveling on a road with a total length of L. Each RSU has the same coverage and is located along the road. The MEC server is connected to the RSU via a wired optical fiber link to receive and transmit relevant data information for IoV computing task processing. The RSU is connected to the mobile car via wireless communication to forward task-related data information between the MEC server and the vehicle.

[0010] Furthermore, moving vehicle n within time t generates D tasks that need to be executed, and each task d consists of two parts, denoted as {s d , μ d};s d represents the expected data size of task d, μ d Indicates the number of CPU cycles required to be allocated; the total computing resources of the MEC server are represented as F; the Internet of Vehicles task needs to be within the maximum delay The task is completed within a certain period of time, and the computing task is regarded as an indivisible computing-intensive task.

[0011] Furthermore, considering the realization of overall computing offloading, there are two ways to execute computing tasks: completing the calculation locally or offloading it to the MEC server for processing and calculation; n = 0 means that the computing task d is executed locally, x n =1 means that the computing task d is offloaded to the MEC server for execution.

[0012] Step 2: Mathematically model the constructed scenario based on the current state: When car n performs computing tasks locally, that is, x n = 0, the local execution time of the Internet of Vehicles task The formula is as follows:

[0013]

[0014] where f l Indicates the computing power of the vehicle to perform tasks; when car n uses local computing resources for processing, there is no need to consider the energy consumption caused by data transmission; the energy consumed by the Internet of Vehicles task to perform tasks locally is as follows:

[0015]

[0016] where ω l represents the energy consumption coefficient of vehicle n.

[0017] Furthermore, when the mobile vehicle decides to offload the IoV task to the MEC server, that is, x n=1, the mobile vehicle will transmit data to the MEC server through the RSU; the uplink transmission rate of the wireless communication transmission link between any mobile vehicle n and its roadside unit m can be expressed as r nm :

[0018]

[0019] Furthermore, the link transmission time between car n and roadside unit m can be calculated as follows:

[0020]

[0021] where x n =1 indicates uninstall decision, s d represents the data size of the computing task; when car n offloads the Internet of Vehicles computing task to the MEC server for execution, that is, x n =1, the execution time of the Internet of Vehicles computing task offloaded to the MEC server is as follows:

[0022]

[0023] where f e It represents the computing capacity allocated by MEC to RSU-m. The total delay of the offloading process includes the task execution delay and data transmission delay. The total delay of the offloading process can be expressed as follows:

[0024]

[0025] Furthermore, when car n uses MEC resources to perform computing tasks, the energy consumed by the Internet of Vehicles tasks to perform tasks through RSU-m connected to MEC is as follows:

[0026]

[0027] where ω e represents the energy consumption coefficient of RSU-m connected to MEC; at the same time, the energy consumption generated during task transmission is as follows:

[0028]

[0029] Furthermore, the total energy consumption of offloading to the RSU-m connected to the MEC for processing can be expressed as follows:

[0030]

[0031] Furthermore, the total delay and total energy consumption of task calculation are the sum of the execution and transmission delays and energy consumption of all mobile vehicles at each stage, so the total delay and total energy consumption are expressed as follows:

[0032]

[0033] Step 3: Combine the task offloading delay and energy consumption to jointly optimize and establish the objective function, which can be expressed as follows:

[0034] Cost(t)=η1·Cost t (t)+η2·Cost e (t) (12)

[0035] Among them, η1∈[0,1] and η2∈[0,1] represent the time delay and energy consumption parameters for completing task d within time slot t respectively; through the above calculation, it can be obtained that the total system cost of computing tasks within time t is Cost(t). With this as the goal, the minimization problem P can be expressed as follows:

[0036]

[0037] Where C1 and C2 respectively represent the computing resources required for the computing task, which are non-negative and cannot exceed the maximum computing capacity of the MEC server F e , the maximum computing power of the vehicle F l ; C3 indicates that the communication bandwidth resource bw required for the computing task cannot exceed the maximum communication bandwidth BW; C4 indicates that the Internet of Vehicles task offloading strategy must meet the constraints of the binary offloading decision.

[0038] Step 4: Use MATD3 to optimize the objective function and convert it into a Markov decision process. State space: any agent state in time slot t is defined as four corresponding time-varying variables; including: task data size s d , the vehicle’s computing resources f l , the computing resources allocated by MEC f e , the communication resources bw allocated by MEC; therefore, the t-time slot state space can be expressed as:

[0039]

[0040] Furthermore, the action space is considered as the IoV task offloading decision; car n needs to decide whether to process the IoV task generated in time slot t locally or offload it to the MEC server for processing; if the IoV task is offloaded to the MEC server for execution, the computing resources are allocated; it is defined as:

[0041]

[0042] Furthermore, the reward function is the system objective function. All agents are assumed to be cars with the same functions, so all agents share the same reward function. Each agent selects its corresponding action according to the reward to obtain the maximum global reward, which is defined as:

[0043]

[0044] Where φ is a hyperparameter. In order to achieve the best system utility, the value of φ is set to a negative value. φ∈[-1,0] is to ensure that the punishment for improper behavior is smaller than the reward for correct behavior.

[0045] Furthermore, in time slot t, the average reward function of all agents can be expressed as:

[0046]

[0047] Furthermore, the MATD3 algorithm is used to solve the joint optimization problem of task offloading delay and energy consumption, which can be summarized as follows: it is divided into initialization stage, interaction stage and update stage; in the initialization stage, the experience pool B and four deep neural networks are initialized. In the interaction stage, random noise is introduced when making action decisions to solve the problem of insufficient exploration of the environment by the output action, and the added noise is cut to keep the target closest to the original action; then the action interacts with the environment and obtains the corresponding reward and next step state; according to observation, all collected samples are stored in the experience pool B; in the update stage, a small batch of Z samples are randomly selected from the experience pool B for training, and the policy network, value network, target policy network and target value network of each agent are updated in turn; each training round is executed repeatedly until the end of the algorithm; in the update process, the value network passes the minimum loss function L(θ Q ) to update, where y i It is the prediction of the next action in the target policy network, followed by a delayed update of the target policy. The purpose is to provide a more stable target action, reduce the impact of over-estimation, and improve the stability and performance of the algorithm. The policy network is updated by sampling the policy gradient, and then the target network parameters of each agent are soft-updated.

[0048] (III) Beneficial effects

[0049] Compared with the prior art, the present invention provides a method for offloading edge computing tasks in an Internet of Vehicles, which solves the joint optimization problem of latency and energy consumption in edge computing in an Internet of Vehicles and has the following beneficial effects:

[0050] The present invention obtains the unloading tasks of mobile vehicles by constructing a three-layer Internet of Vehicles edge computing scenario model; and sets the total delay and total energy consumption cost in the task unloading process as the weighted total cost; defines the total system cost as the joint optimization problem of task unloading delay and energy consumption; converts this problem model into a Markov decision process; and solves the joint optimization problem of task unloading delay and energy consumption through a deep reinforcement learning calculation unloading method involving multiple agents based on MATD3, thereby effectively reducing the total system cost and realizing the effectiveness of Internet of Vehicles task unloading. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A flowchart of a method for offloading edge computing tasks in an Internet of Vehicles provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a structure for establishing a scene model provided by an embodiment of the present invention;

[0053] Figure 3 A flowchart of optimizing an objective function using MATD3 provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Example

[0056] like Figure 1-3 As shown, a method for offloading edge computing tasks in an Internet of Vehicles (IoV) according to an embodiment of the present invention includes the following steps:

[0057] Step 1: Build a three-layer IoV edge computing scenario model, which consists of a MEC server, R roadside units (RSUs), and K mobile vehicles. Obtain the unloading tasks of mobile vehicles by building this model.

[0058] Step 2: Mathematically model the constructed scenario based on the current state. There are two models for executing Internet of Vehicles tasks: one is the local execution model that completes the computing tasks locally, and the other is the model that offloads the computing tasks to the MEC server for processing;

[0059] Step 3: Combine the task offloading delay and energy consumption to jointly optimize and establish the objective function. Set the total delay and total energy consumption cost of the Internet of Vehicles task as the weighted total cost. In order to obtain the lowest total system cost, the time cost and energy consumption cost of the Internet of Vehicles task are reasonably selected to achieve the optimization goal of minimizing the total system cost.

[0060] Step 4: Use MATD3 to optimize the objective function. First, convert the problem model into a Markov decision process. Then, use deep reinforcement learning MATD3 to deal with the problem of offloading edge computing tasks in the Internet of Vehicles and make the final offloading decision.

[0061] like Figure 2 As shown, the structural schematic diagram of establishing a scenario model proposed in an embodiment of the present invention includes the following process: the constructed IoV edge computing scenario model is composed of an MEC server, R roadside units and K mobile cars. Among them, K mobile cars are traveling on a road with a total length of L, each RSU has the same coverage and is located along the road, the MEC server is connected to the RSU through a wired optical fiber link, which is used to receive and transmit relevant data information for IoV computing task processing, and the RSU is connected to the mobile car through wireless communication, and forwards task-related data information between the MEC server and the vehicle. Within time t, mobile vehicle n generates D tasks that need to be executed. The total computing resources of the MEC server are represented by F. IoV tasks need to be completed within the maximum delay time period, and the computing tasks are regarded as indivisible computing-intensive tasks. There are two ways to execute computing tasks: completing the calculation locally or offloading to the MEC server for processing and calculation. xn=0 means that the computing task d is executed locally, and xn=1 means that the computing task d is offloaded to the MEC server for execution.

[0062] There are two ways to execute Internet of Vehicles tasks: completing the computing tasks locally or processing the computing tasks on the MEC server.

[0063] (1) Local execution model:

[0064] When car n performs computing tasks locally, that is, x n = 0, the local execution time of the Internet of Vehicles task The formula is as follows:

[0065]

[0066] where f l Indicates the computing power of the vehicle to perform tasks. When car n uses local computing resources for processing, there is no need to consider the energy consumption caused by data transmission. The energy consumed by the Internet of Vehicles task to perform tasks locally is as follows:

[0067]

[0068] where ω l represents the energy consumption coefficient of vehicle n.

[0069] (2) Offloading to MEC server processing model:

[0070] When a mobile vehicle decides to offload the IoV task to the MEC server, the mobile vehicle will transmit data to the MEC server through the RSU. Usually, the propagation time of the wired optical fiber transmission between the RSU and the MEC server can be ignored. The uplink transmission rate of the wireless communication transmission link between any mobile vehicle n and its roadside unit m can be expressed as r nm , calculated as follows:

[0071]

[0072] Where bw represents the bandwidth between RSU-m and mobile vehicle n, |h nm | 2 represents the channel gain from mobile vehicle n to roadside unit m, P nm represents the transmission power from mobile vehicle n to roadside unit m, σ 2 represents the received noise power at the edge node. Based on the above situation, the link transmission time between car n and the roadside unit m connected to the MEC server can be calculated as follows:

[0073]

[0074] where x n =1 indicates uninstall decision, s d Indicates the data size of the computing task. When car n offloads the Internet of Vehicles computing task to the MEC server for execution, that is, x n =1, the execution time of the Internet of Vehicles computing task offloaded to the MEC server is as follows:

[0075]

[0076] where f e Represents the computing capacity allocated by MEC to RSU-m. The total delay of the offloading process includes the task execution delay and data transmission delay. The total delay of the offloading process can be expressed as follows:

[0077]

[0078] When car n uses MEC resources to perform computing tasks, the energy consumed by the Internet of Vehicles tasks to perform tasks through RSU-m connected to MEC is as follows:

[0079]

[0080] where ω e It represents the energy consumption coefficient of RSU-m connected to MEC. At the same time, the energy consumption generated during task transmission is as follows:

[0081]

[0082] Therefore, the total energy consumption offloaded to the RSU-m connected to the MEC for processing can be expressed as follows:

[0083]

[0084] Based on the above analysis, the total delay and total energy consumption of task calculation are the sum of the execution and transmission delays and energy consumption of all mobile vehicles at each stage, so the total delay and total energy consumption are expressed as follows:

[0085]

[0086] Joint optimization problem modeling: The joint optimization problem considers the optimization goal of minimizing the total system cost by reasonably selecting the time cost and energy cost of the Internet of Vehicles task. The total system cost of the task can be expressed as follows:

[0087]

[0088] Among them, η1∈[0,1] and η2∈[0,1] represent the time delay and energy consumption parameters for completing task d within time slot t, respectively. The value of the weight parameter will change according to the dynamic vehicle scenario, for example, the weight parameters of delay-sensitive and energy-sensitive tasks are different.

[0089] The task offloading strategy problem of the Internet of Vehicles is constructed as a joint optimization problem of latency and energy consumption, with the goal of minimizing the total system cost. Through the above calculation, we can get the total system cost of the computing task within time t as Cost(t), with this as the goal:

[0090]

[0091] Where C1 and C2 respectively represent the computing resources required for the computing task, which are non-negative and cannot exceed the maximum computing capacity of the MEC server F e , the maximum computing power of the vehicle F l . C3 indicates that the communication bandwidth resource bw required for the computing task cannot exceed the maximum communication bandwidth BW. C4 indicates that the vehicle networking task offloading strategy must satisfy the constraints of the binary offloading decision. The total system cost function in the above problem involves the latency and energy consumption of the vehicle networking task, which is related to the task data size s required for the computing task. d , the vehicle’s computing resources f l , the computing resources allocated by MEC f eIt is related to the communication resources bw allocated by MEC.

[0092] like Figure 3 As shown, the flowchart of using MATD3 to optimize the objective function proposed in the embodiment of the present invention includes the following process: first, the optimization problem is converted into a Markov decision process:

[0093] State space: The state of any agent in time slot t is defined as four corresponding time-varying variables. Including: Task data size s d , the vehicle’s computing resources f l , the computing resources allocated by MEC f e , the communication resource bw allocated by MEC. Therefore, the t-time slot state space can be expressed as:

[0094]

[0095] Action Space: The action space is considered as the IoV task offloading decision. Car n needs to decide whether to process the IoV task generated in time slot t locally or offload it to the MEC server for processing. If the IoV task is offloaded to the MEC server for execution, computing resources are allocated. Therefore, the action in time slot t is determined by the binary offloading decision x n and computing resources allocated by MEC servers Composition, defined as:

[0096]

[0097] Reward function: All agents are assumed to be cars with the same functions, so all agents share the same reward function. Each agent selects its corresponding action based on the reward to obtain the maximum global reward. The system unloading delay and energy consumption are jointly optimized as the reward function, which is defined as:

[0098]

[0099] Where φ is a hyperparameter. In order to achieve the best system utility, the value of φ is set to a negative value. φ∈[-1,0] is to ensure that the punishment for improper behavior is smaller than the reward for correct behavior.

[0100] At time slot t, the average reward function of all agents can be expressed as:

[0101]

[0102] The MATD3 algorithm process can be divided into three stages: initialization stage, interaction stage and update stage. In the initialization stage, the experience pool B and four deep neural networks are initialized. In the interaction stage, random noise is introduced when making action decisions to solve the problem of insufficient exploration of the environment by the output action, and the added noise is cut to keep the target closest to the original action. The action then interacts with the environment and obtains the corresponding reward and next step state. Based on observation, all collected samples are stored in the experience pool B. In the update stage, a small batch of Z samples is randomly selected from the experience pool B for training, and the policy network, value network, target policy network and target value network of each agent are updated in turn. Each training round is executed in a loop until the algorithm ends. During the update process, the value network is updated by the minimum loss function, where y i It is the prediction of the next action in the target policy network, followed by a delayed update of the target policy, with the aim of providing a more stable target action, reducing the impact of overestimation, and improving algorithm stability and performance. The policy network is updated by sampling policy gradients, and then the target network parameters of each agent are soft-updated. The algorithm pseudo code is as follows:

[0103] Step 1: Input the state space of each agent in the system: task data size sd, vehicle computing resources f l , the computing resources allocated by MEC f e , the communication resources bw allocated by MEC;

[0104] Step 2: Output the optimal action space for each agent: binary unloading decision xn;

[0105] Step 3: Initialize the value network Q1, Q2 and the policy network μ with random parameters

[0106] Step 4: Initialize the target network

[0107] Step 5: Initialize experience pool B;

[0108] Step 6: training round k = 1, 2, ..., K do;

[0109] Step 7: Randomly initialize the Internet of Vehicles edge computing scenario simulation environment;

[0110] Step 8: Agent i=1, 2, ..., N do;

[0111] Step 9: Observe and obtain the initial state S of each agent, and reset the reward value to 0;

[0112] Step 10: Time slot t=1, 2, ..., T do;

[0113] Step 11: Choose an action based on the current strategy That is, the task offloading decision of the vehicle;

[0114] Step 12: Execute action a i(t) , and observe the corresponding reward r in the edge computing simulation environment of the Internet of Vehicles i(t) and the state s of the agent in the next time slot i(t+1) ;

[0115] Step 13: All collected samples (s i(t) ,a i(t) ,r i(t) ,s i(t+1) ) is put into the experience pool B for sample training of the strategy network and the value network;

[0116] Step 14: Collect a sufficient number of samples and randomly extract a small batch of samples of Z from the experience pool B to train the policy network and value network of each agent;

[0117] Step 15: Setup

[0118] Step 16: Select the minimum loss function to update the value network:

[0119] Step 17: if t mod d then;

[0120] Step 18: Update the network using sampled policy gradients:

[0121] Step 19: end if;

[0122] Step 20: Update the target value network and policy network parameters of each agent in turn

[0123] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for offloading edge computing tasks in an Internet of Vehicles, characterized in that: The following steps are involved: Step 1: Build a three-layer IoV edge computing scenario model, which consists of a MEC server, R roadside units (RSUs), and K mobile vehicles. Step 2: Mathematically model the constructed scenario based on the current state; the specific process is as follows: There are two ways to execute Internet of Vehicles tasks, namely, completing the computing tasks locally or processing the computing tasks on the MEC server; Step 3: Combine the task offloading delay and energy consumption to jointly optimize and establish the objective function; the specific process is: by reasonably selecting the time cost and energy consumption cost of the Internet of Vehicles task, the optimization goal of minimizing the total system cost is achieved; Step 4: Use MATD3 to optimize the objective function and get the final unloading decision; the specific process is: convert the established objective function into a Markov decision process, and then use deep reinforcement learning MATD3 to deal with the Internet of Vehicles edge computing unloading problem and get the final unloading decision.

2. A method for offloading edge computing tasks in an Internet of Vehicles according to claim 1, characterized in that: The step 1 of constructing the IoV edge computing scenario model also includes: K mobile cars are traveling on a road with a total length of L. Each RSU has the same coverage and is located along the road. The MEC server is connected to the RSU via a wired optical fiber link to receive and transmit relevant data information for the processing of the Internet of Vehicles computing tasks. The RSU is connected to the mobile car via wireless communication to forward task-related data information between the MEC server and the vehicle. Within time t, the mobile vehicle n generates D tasks that need to be executed. The total computing resources of the MEC server are represented as F. The Internet of Vehicles task needs to be completed within the maximum delay period, and the computing task is regarded as an indivisible computing-intensive task. There are two ways to execute the computing task: completing the calculation locally or offloading it to the MEC server for processing and calculation. n = 0 means that the computing task d is executed locally, x n =1 means that the computing task d is offloaded to the MEC server for execution.

3. The method for offloading edge computing tasks in an Internet of Vehicles according to claim 1, characterized in that: The step 2 of mathematically modeling the constructed scene according to the current state also includes: There are two ways to execute Internet of Vehicles tasks: one is to complete the computing tasks locally, and the other is to process the computing tasks on the MEC server; (1) Local execution model: When car n performs computing tasks locally, that is, x n = 0, the local execution time of the Internet of Vehicles task The formula is as follows: where f l Indicates the computing power of the vehicle to perform tasks; when car n uses local computing resources for processing, there is no need to consider the energy consumption caused by data transmission; the energy consumed by the Internet of Vehicles task to perform tasks locally is as follows: where ω l represents the energy consumption coefficient of vehicle n; (2) Offloading to MEC server processing model: When a mobile vehicle decides to offload the Internet of Vehicles task to the MEC server, the mobile vehicle will transmit data to the MEC server through the RSU. Usually, the propagation time of the wired optical fiber transmission between the RSU and the MEC server can be ignored. The uplink transmission rate of the wireless communication transmission link between any mobile car n and its roadside unit m can be expressed as r nm , calculated as follows: Where bw represents the bandwidth between RSU-m and mobile vehicle n, |h nm | 2 represents the channel gain from mobile vehicle n to roadside unit m, P nm represents the transmission power from mobile vehicle n to roadside unit m, σ 2 represents the received noise power at the edge node; Based on the above situation, the link transmission time between car n and the roadside unit m connected to the MEC server can be calculated as follows: where x n =1 indicates uninstall decision, s d represents the data size of the computing task; when car n offloads the Internet of Vehicles computing task to the MEC server for execution, that is, x n =1, the execution time of the Internet of Vehicles computing task offloaded to the MEC server is as follows: where f e represents the computing capacity allocated by MEC to RSU-m; therefore, the total delay of the offloading process includes the task execution delay and the data transmission delay; the total delay of the offloading process can be expressed as follows: When car n uses MEC resources to perform computing tasks, the energy consumed by the Internet of Vehicles tasks to perform tasks through RSU-m connected to MEC is as follows: where ω e represents the energy consumption coefficient of RSU-m connected to MEC; at the same time, the energy consumption generated during task transmission is as follows: Therefore, the total energy consumption offloaded to the RSU-m connected to the MEC for processing can be expressed as follows: Based on the above analysis, the total delay and total energy consumption of task calculation are the sum of the execution and transmission delays and energy consumption of all mobile vehicles at each stage, so the total delay and total energy consumption are expressed as follows:

4. The method for offloading edge computing tasks in an Internet of Vehicles according to claim 1, characterized in that: The objective function established by combining task offloading delay and energy consumption for joint optimization in step 3 also includes: Joint optimization problem modeling: The joint optimization problem considers the optimization goal of minimizing the total system cost by reasonably selecting the time cost and energy cost of the Internet of Vehicles task; the total system cost of the task can be expressed as follows: Cost(t)=η1·Cost t (t)+η2·Cost e (t) (12) Among them, η1∈[0,1] and η2∈[0,1] represent the time delay and energy consumption parameters for completing task d within time slot t, respectively; the value of the weight parameter will change according to the dynamic vehicle scenario, for example, the weight parameters of delay-sensitive and energy-sensitive tasks are different; The task offloading strategy problem of the Internet of Vehicles is constructed as a joint optimization problem of latency and energy consumption, with the goal of minimizing the total system cost. Through the above calculation, it can be obtained that the total system cost of the computing task within time t is Cos t(t), with this as the goal: Where C1 and C2 respectively represent the computing resources required for the computing task, which are non-negative and cannot exceed the maximum computing capacity of the MEC server F e , the maximum computing power of the vehicle F l ; C3 indicates that the communication bandwidth resource bw required for the computing task cannot exceed the maximum communication bandwidth BW; C4 indicates that the Internet of Vehicles task offloading strategy must satisfy the constraints of the binary offloading decision; The total cost function of the system in the above problem involves the latency and energy consumption of the Internet of Vehicles task, which is related to the task data size s required for the computing task d , the vehicle’s computing resources f l , the computing resources allocated by MEC f e It is related to the communication resources bw allocated by MEC.

5. The method for offloading edge computing tasks in an Internet of Vehicles according to claim 1, characterized in that: In step 4, the objective function is optimized by using MATD3 to obtain the optimal unloading decision, which also includes: (1) Converting the optimization problem into a Markov decision process includes: the delay and state are determined by the task characteristics of the mobile vehicles in the IoV, these states will be updated as the time slot changes, and the state of the next time slot is related to the state of the current time slot; therefore, the minimization problem listed in formula (13) can be converted into a Markov decision process model; the state space should be designed to adapt to the proposed IoV environment, and each car is considered as an intelligent agent in the environment; the proposed model is defined as follows: State space: The state of any agent in time slot t is defined as four corresponding time-varying variables; including: task data size s d , the vehicle’s computing resources f l , the computing resources allocated by MEC f e , the communication resources bw allocated by MEC; therefore, the t-time slot state space can be expressed as: Action Space: The action space is considered as the IoV task offloading decision. Car n needs to decide whether to process the IoV task generated in time slot t locally or offload it to the MEC server for processing. If the IoV task is offloaded to the MEC server for execution, computing resources are allocated. Therefore, the action in time slot t is determined by the binary offloading decision x n and computing resources allocated by MEC servers Composition, defined as: Reward function: All agents are assumed to be cars with the same functions, so all agents share the same reward function; each agent selects its corresponding action according to the reward to obtain the maximum global reward; the system unloading delay and energy consumption are jointly optimized as the reward function, which is defined as: Where φ is a hyperparameter. In order to achieve the best system utility, the value of φ is set to a negative value. φ∈[-1,0] is to ensure that the punishment for improper behavior is less than the reward for correct behavior. At time slot t, the average reward function of all agents can be expressed as: (2) The use of deep reinforcement learning MATD3 to address the problem of edge computing offloading in the Internet of Vehicles includes the following processes: it is divided into an initialization phase, an interaction phase, and an update phase; in the initialization phase, the experience pool B and four deep neural networks are initialized; in the interaction phase, random noise is introduced when making action decisions to solve the problem of insufficient exploration of the environment by the output action, and the added noise is cut to keep the target closest to the original action; then the action interacts with the environment and obtains the corresponding reward and next step state; based on observation, all collected samples are stored in the experience pool B; in the update phase, a small batch of Z samples is randomly selected from the experience pool B for training, and the policy network, value network, target policy network, and target value network of each agent are updated in turn; each training round is executed in a loop until the algorithm ends; during the update process, the value network is updated by the minimum loss function, where y i It is the prediction of the next action in the target policy network, followed by a delayed update of the target policy. The purpose is to provide a more stable target action, reduce the impact of over-estimation, and improve the stability and performance of the algorithm. The policy network is updated by sampling the policy gradient, and then the target network parameters of each agent are soft-updated.

Citation Information

Cited By

  • Dynamic task unloading method based on non-orthogonal multiple access and unmanned aerial vehicle assistance

    CN119212001A

  • RSU-assisted Internet of Vehicles multi-hop task unloading optimization method based on deep reinforcement learning

    CN119854871A

  • Task unloading method for electric vehicle

    CN120343028A

  • Optimization method for edge computing task unloading and resource scheduling of Internet of Vehicles

    CN120916201A

  • Task unloading and resource allocation method and system combined with data security in Internet of Vehicles

    CN121397490A