Digital twinning-based car networking task migration unloading method

Optimizing the migration and offloading of Internet of Vehicles tasks through digital twin technology and deep reinforcement learning algorithms solves the problem of uneven distribution of computing resources in the Internet of Vehicles and achieves more efficient resource utilization and better service quality.

CN118540744APending Publication Date: 2024-08-23GUANGXI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410638913.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Unbalanced distribution of computing resources in the Internet of Vehicles results in MEC servers running under high load and unable to continue serving, and servers far away from users being idle. Traditional methods cannot effectively solve the problems of insufficient utilization of computing resources and unreasonable resource allocation.

Method used

Adopt a digital twin-based Internet of Vehicles task migration and offloading method, and optimize the migration and offloading strategy of computing tasks through the Markov decision model and the deep reinforcement learning QDPG algorithm that hybridizes the DDPG algorithm and the D3QN algorithm to ensure that the cost of migration and offloading is minimized and maximized MEC server resource utilization.

Benefits of technology

It achieves lower migration and offloading costs, higher MEC resource utilization and task efficiency, improves the quality of Internet of Vehicles communication services, and overcomes the problems of insufficient resource utilization and unreasonable allocation in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540744A
    Figure CN118540744A
Patent Text Reader

Abstract

The invention discloses an Internet of Vehicles task migration unloading method based on digital twinning, and relates to the technical field of Internet of Vehicles computing unloading, comprising the following steps: acquiring a computing task migration unloading demand of an intelligent vehicle; setting constraint conditions according to whether the calculation task is migrated to the RSU or not and whether the MEC server is unloaded or not; based on the constraint conditions, establishing a Markov decision model aiming at the problems of minimizing migration unloading cost and maximizing MEC server resource utilization rate and task benefit; using a deep reinforcement learning QDPG algorithm mixed with a DDPG algorithm and a D3QN algorithm to solve an optimal migration unloading strategy; and S500, unloading is completed. According to the method provided by the invention, lower migration unloading cost and higher MEC resource utilization rate and task benefit can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Vehicles computing offloading technology, and in particular to an Internet of Vehicles task migration offloading method based on digital twins. Background Art

[0002] The development of the Internet of Vehicles (IoV) has brought about a massive amount of low-latency, high-density computing tasks. The traditional IoV architecture is difficult to alleviate the service needs of vehicle users. Task migration or computing offloading is a key concept in the IoV. In the IoV, many applications, such as autonomous driving, real-time traffic information processing, and advanced driver assistance systems (ADAS), require a lot of computing power. However, the vehicle's own computing resources are limited and cannot handle all these tasks. The advent of the digital twin Cybertwin technology provides a unified interface for each communication node of the intelligent IoV. At the same time, deploying NIB in the vehicle gives the vehicle higher computing power. Combined with the powerful computing power of the MEC server of the mobile edge computing (MEC), it is expected to solve the contradiction between the increasing computing power demand and insufficient computing resources in the current IoV.

[0003] However, the imbalance in computing resource allocation remains a thorny challenge. This problem is particularly prominent in the Internet of Vehicles environment with a large number of users. As vehicles compete for the computing power of nearby MEC servers when executing task offloading plans, these servers quickly become overloaded and unable to provide continuous services to users, while MEC servers far away from users are often idle at this time. Fig.15 shown. Summary of the invention

[0004] In response to the problems existing in the prior art, the present invention provides a method for migrating and offloading Internet of Vehicles tasks based on digital twins, which can overcome the problems of insufficient utilization of Internet of Vehicles computing resources and unreasonable resource allocation in traditional methods, and achieve lower migration and offloading costs, higher MEC resource utilization and task benefits.

[0005] To achieve the above-mentioned object of the invention, the technical solution of the present invention is as follows:

[0006] The present invention provides a method for migrating and unloading Internet of Vehicles tasks based on digital twins. The method is applied to the digital twin layer and comprises the following steps:

[0007] S100, obtaining the computing task migration and offloading requirements of the intelligent vehicle;

[0008] S200, setting constraints according to whether the computing task is migrated to the RSU and whether the MEC server is unloaded;

[0009] S300, based on the constraints, establishing a Markov decision model for minimizing migration offloading costs and maximizing MEC server resource utilization and task benefits;

[0010] S400 uses the deep reinforcement learning QDPG algorithm that mixes the DDPG algorithm and the D3QN algorithm to solve the optimal migration and unloading strategy.

[0011] Wherein: according to the DDPG algorithm, each of the intelligent vehicles has a vehicle actor network, each of the RSUs has a roadside unit actor network, and the vehicle actor network and the roadside unit actor network share a critic network; the D3QN algorithm optimizes the Q value function of the critic network, and determines the optimal migration unloading strategy according to the maximum value of the Q value function;

[0012] S500, uninstallation is completed.

[0013] Furthermore, before step S200, the Mini Batch K-Means algorithm is used to classify the computing tasks into high priority, medium priority and low priority according to priority, and into large category, medium category and small category according to data volume.

[0014] Furthermore, in S200, the queuing process of the computing tasks arriving at the MEC server is modeled as an M / M / 1 queuing model.

[0015] Further, in S200, the method for setting the constraint condition is as follows:

[0016] S210, establishing a migration model of the computing task from the intelligent vehicle to the RSU;

[0017] The current position of the smart vehicle is within the coverage of the RSU, that is, in: represents the distance between the current position of the g-th intelligent vehicle and the a-th RSU, and R represents the coverage radius of the RSU;

[0018] The transmission delay of the computing task from the smart vehicle to the RSU is less than the driving time of the smart vehicle within the coverage of the RSU, that is,

[0019]

[0020] in: is the driving time of the intelligent vehicle in the ath RSU, is the transmission delay from the computing task k of the g-th intelligent vehicle to the a-th RSU, D g,k represents the data size of the computing task k of the g-th intelligent vehicle, represents the data transmission rate between the g-th intelligent vehicle and the a-th RSU;

[0021] S220, establishing the computing task offloading model, including the following model:

[0022] S221, the smart vehicle local unloading model includes:

[0023]

[0024]

[0025] in: represents the local offloading delay of the computing task k of the g-th intelligent vehicle, F NIB represents the computing power of the smart vehicle, represents the local offloading energy consumption of computing task k of the g-th intelligent vehicle, Indicates the power consumption coefficient of the local offloading of the computing task k of the g-th intelligent vehicle; S222, the MEC server offloading model includes:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031] in:

[0032] represents the transmission rate between the b-th MEC server and the a-th RSU, represents the transmission delay of the computing task k of the g-th intelligent vehicle from the a-th RSU to the b-th MEC server, F MEC represents the initial computing power of the MEC server, ω g,k Indicates the average arrival rate of the current tasks of the MEC server, Indicates that N computing tasks arrive at the MEC server during this time slot. represents the processing delay of the MEC server for the computing task k of the g-th smart vehicle, W represents the power transmitted between the smart vehicle and the RSU, or between the MEC server and the RSU in the model, represents the energy consumption of MEC server unloading for computing task k of the g-th smart vehicle, RU bIndicates the resource utilization of the b-th MEC server,

[0033] S230, determining the total cost of migration and offloading of the computing task:

[0034]

[0035]

[0036]

[0037] is the indicator function, when the computing task k of the g-th intelligent vehicle chooses to be locally unloaded is 1, otherwise it is 0. is an indicator function, when the computing task k of the g-th intelligent vehicle chooses to unload the MEC server, is 1, otherwise it is 0. represents the total latency cost of all computing tasks,

[0038] represents the total energy cost of all computing tasks,

[0039] U g,k represents the total cost of offloading the computing task k of the g-th intelligent vehicle, p and q represent the balance coefficients of latency and energy consumption, respectively, p+q=1;

[0040] A represents the total number of the intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles;

[0041] S240, determine the overall mission benefits of the Internet of Vehicles:

[0042]

[0043] Where: HPT represents a high priority task, F(HPT) represents a penalty value to constrain the algorithm, T g,k represents the computing task k of the g-th intelligent vehicle, Indicates execution of T g,k Migrate the unloading action and complete the required delay, Indicates T g,k The maximum tolerable delay threshold, ζ and η are both key network parameters and ζ<1, η>0, ζ+η=1, is the number of all computing tasks with priority level HPT, Indicates T g,k is the benefit function of HPT;

[0044]

[0045] Where: NPT represents the medium priority task, F(NPT) is the benefit value of the medium priority task, represents the number of all computing tasks with priority NPT, μ is the coefficient, Indicates T g,k is the benefit function of NPT;

[0046]

[0047] Where: LPT represents the medium priority task, F(LPT) is the benefit value of the low priority task, Indicates the number of TDL tasks with priority LPT, Indicates T g,k is the benefit function of LPT;

[0048]

[0049] in: represents the total task benefit of the computing task k of the g-th intelligent vehicle, E g,k represents the energy consumption of computing task k of the g-th intelligent vehicle, C g,k represents the number of CPU cycles required for the computing task k of the g-th intelligent vehicle,

[0050] is the indicator function, Indicates that the processing priority is 1 when the computing task is HPT, otherwise it is 0. Indicates that the processing priority is NPT, which is 1; otherwise, it is 0. Indicates that the processing priority is LPT, which is 1, otherwise it is 0, A represents the total number of intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles;

[0051] S250, determining the constraint condition:

[0052]

[0053]

[0054]

[0055]

[0056]

[0057] Where: RU represents the resource utilization of the MEC server, RU brepresents the resource utilization of the bth MEC server. C1 constrains the task processing delay in local offloading and migration offloading to not exceed the maximum tolerated task delay. C2 indicates that the smart vehicle must be within the coverage of the RSU before and after the migration action. C3 indicates that the arrival rate of computing tasks in any of the MEC servers cannot exceed the initial computing power of the MEC server. g,k represents the action of computing task k of the g-th intelligent vehicle. C4 indicates that there are only two types of task actions: 0 indicates local offloading and 1 indicates migration offloading. S a represents migration to the ath RSU, G b represents offloading to the b-th MEC server, and G represents the total number of MEC servers.

[0058] Furthermore, in S300, the steps of establishing the Markov decision model are as follows:

[0059] S310, defining a state, defining a state S(ΔT) of the intelligent vehicle in a time slot ΔT;

[0060] S320, designing an action, the action function of the computing task k of the g-th intelligent vehicle in the time slot ΔT is:

[0061] a g,k (ΔT) = {Task g,k (ΔT),Z g,k (ΔT)},

[0062] Among them: Task g,k (ΔT) represents the priority of the computing task k of the g-th intelligent vehicle in the time slot ΔT; Z g,k (ΔT) represents the action of the computing task k of the g-th smart vehicle in the time slot ΔT, including unloading at the local smart vehicle, migration from the smart vehicle to the RSU, and migration from the RSU to the MEC server;

[0063] S330, design reward function:

[0064]

[0065] in: Indicates that the calculation task is 1 when the time slot ΔT is completed, otherwise it is 0, If the computing task is not completed, it is 1, if it is completed, it is 0. g,k (ΔT) represents the additional penalty for task failure, U g,k (ΔT) represents the total unloading cost of the computing task k of the g-th intelligent vehicle in the time slot ΔT, RU(ΔT) represents the resource utilization of the MEC server in the time slot ΔT, Represents the total task benefit of the computing task k of the g-th intelligent vehicle in the time slot ΔT.

[0066] Further, in S400, the maximum value of the Q value function is calculated as follows:

[0067]

[0068]

[0069]

[0070]

[0071]

[0072] S={S1,S2,…S k};

[0073] in:

[0074] θ represents the critic network parameters, β represents the actor network parameters, β1 represents the vehicle actor network parameters, β2 represents the roadside unit actor network parameters, Task g,k represents the priority of the computing task k of the g-th intelligent vehicle, represents the action of migrating the kth computing task of the gth intelligent vehicle to the ath RSU, Indicates the action of migrating the kth computing task of the gth intelligent vehicle from the ath RSU to the bth MEC server;

[0075] a vehicle actor network function representing the smart vehicle;

[0076] A roadside unit actor network function representing the RSU;

[0077] The vehicle actor network function represented by A collection of;

[0078] Represents the continuous actions of the roadside unit actor network function A collection of;

[0079] S stands for status;

[0080] Z g,k Indicates T g,k task actions.

[0081] Furthermore, in S200, when the computing power of all MEC servers cannot support offloading, the digital twin layer sends a local offloading command to the vehicle, and the computing task will be locally offloaded.

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

[0083] 1. The method for migrating and unloading Internet of Vehicles tasks based on digital twins provided by the present invention sets RSU between the MEC server and the smart vehicle, and sets constraints based on whether the computing task is migrated to the RSU and whether the MEC server is unloaded. Based on the constraints, a Markov decision model is established to minimize the migration and unloading cost and maximize the MEC server resource utilization and task benefits. The deep reinforcement learning QDPG algorithm of the hybrid DDPG algorithm and the D3QN algorithm is used to solve the optimal migration and unloading strategy. The method provided by the present invention can overcome the problems of insufficient utilization of Internet of Vehicles computing resources and unreasonable resource allocation in traditional methods, achieve lower migration and unloading costs, higher MEC resource utilization and task benefits, and thus improve the communication service quality of the Internet of Vehicles.

[0084] 2. Design for mixed action space: Traditional DRL algorithms are either designed for continuous action space (such as DDPG) or discrete action space (such as DQN). The method of fusing DDPG and D3QN innovatively solves the problem of coexistence of continuous and discrete action spaces in the Internet of Vehicles, providing a new solution. Optimizing decision quality: By combining DDPG's continuous action processing capabilities and D3QN's optimization in processing discrete actions, this fusion algorithm can provide higher quality and more accurate decisions.

[0085] 3. Structure of independent actors and shared critics: In a multi-agent environment, there are usually challenges, such as how to coordinate the behavior of different agents. In the application method, each agent (vehicle and RSU) has its own actor network to make individual decisions, and shares a critic network to evaluate the effectiveness of these decisions. This structure effectively balances independence and collaboration.

[0086] 4. Use D3QN to optimize the critic network: In traditional DDPG, the critic network may affect the learning effect due to overestimation. By integrating D3QN's dual Q-learning and dueling architecture into the critic network, this problem can be effectively reduced and the stability and reliability of the overall network can be improved.

[0087] The role of dual Q-learning: By introducing dual Q-learning, the algorithm uses two independent networks when estimating Q values. One network is used to select the best action, and the other network is used to evaluate the Q value of the action. This separation reduces the risk of overestimation. The actor network and the critic network each have a target network, one network is used to select the best action, and the other network is used to evaluate the Q value of the action, reducing the problem of overestimation.

[0088] Integration of dueling architecture: Dueling Network Architecture: Another key feature in D3QN is the dueling network architecture. In this architecture, the network is divided into two parts: one part estimates the state value and the other part estimates the advantage value of each action as shown in formula (40). The state value function provides the overall value at a given state, while the action advantage value function evaluates the additional value of each action at the current state relative to the average action. This approach ensures that the action advantage value is not overemphasized when estimating the value of each action, making the offloading decision fed back by the critic network more accurate and stable. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 This is a flow chart of a method for migrating and offloading Internet of Vehicles tasks according to an embodiment of the present invention.

[0090] Figure 2 This is a schematic diagram of the imbalanced allocation of MEC server computing resources in the background technology of the Internet of Vehicles task migration and offloading system architecture diagram according to an embodiment of the present invention.

[0091] Figure 3 Schematic diagram of the relationship between the smart vehicle and the RSU according to an embodiment of the present invention.

[0092] Figure 4 This is a network structure diagram of the QDPG algorithm according to an embodiment of the present invention.

[0093] Figure 5 This is a framework diagram of the DDPG D3QN fusion algorithm according to an embodiment of the present invention.

[0094] Figure 6 This is a comparison chart of the convergence of each algorithm.

[0095] Figure 7 The delay comparison chart of each algorithm.

[0096] Figure 8 This is a comparison chart of energy consumption of each algorithm.

[0097] Fig. 9 This is a comparison chart of migration offloading costs for each algorithm.

[0098] Fig.10 This is the resource utilization diagram of the QDPG algorithm for MEC servers.

[0099] Fig.11 This is the resource utilization diagram of the D3QN algorithm for MEC servers.

[0100] Fig.12 This is the resource utilization diagram of the DDPG algorithm for MEC servers.

[0101] Fig.13 This is the resource utilization diagram of the DQN algorithm for MEC servers.

[0102] Fig.14 This is a comparison chart of the benefits of each algorithm task.

[0103] Fig.15 Schematic diagram of the imbalanced allocation of computing resources in MEC servers in the background technology. DETAILED DESCRIPTION

[0104] The present invention is further described in detail below in conjunction with embodiments so that those skilled in the art can implement the invention with reference to the description.

[0105] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is a description of the embodiments in conjunction with the accompanying drawings.

[0106] like Figure 2 As shown, a system architecture diagram of Internet of Vehicles task migration and unloading based on digital twins, where Internet of Vehicles computing resources include cloud servers, roadside units RSU (RSU, Road Side Unit), mobile edge computing (MEC, Mobile Edge Computing) servers, and smart vehicles. Smart vehicles (deployment of Network in Box (NIB)) use wireless communication with each node, optical fiber communication is used between RSU nodes and MEC server nodes, and wireless communication is used between cloud servers and each node. The DRL algorithm QDPG proposed in this application is deployed in the digital twin (Cybertwin) layer.

[0107] like Figure 1 As shown, a method for migrating and unloading Internet of Vehicles tasks based on digital twins is applied to the digital twin layer and includes the following steps:

[0108] S100, obtaining the computing task migration and offloading requirements of the intelligent vehicle;

[0109] The Cybertwin layer obtains the computing task migration and offloading requirements sent by the smart vehicle through the NIB.

[0110] Furthermore, after the Cybertwin layer obtains the computing task migration and unloading requirements sent by the smart vehicle through the NIB, the Mini Batch K-Means algorithm is used to classify the computing tasks, dividing them into high priority (High Priority Task, HPT), medium priority (NPT) and low priority (LPT) according to priority, and into large category (TaskData Large, TDL), medium category (TDN) and small category (TDS) according to data volume.

[0111] S200, setting constraints according to whether the computing task is migrated to the RSU and whether the MEC server is unloaded;

[0112] Specifically, the method for setting the constraint condition is as follows:

[0113] S210, establishing a migration model of the computing task from the intelligent vehicle to the RSU;

[0114] The current position of the smart vehicle is within the coverage of the RSU, that is, in: represents the distance between the current position of the g-th intelligent vehicle and the a-th RSU, and R represents the coverage radius of the RSU;

[0115] The transmission delay of the computing task from the smart vehicle to the RSU is less than the driving time of the smart vehicle within the coverage of the RSU, that is,

[0116]

[0117] in: is the driving time of the intelligent vehicle in the ath RSU, is the transmission delay from the computing task k in the g-th intelligent vehicle to the a-th RSU, D g,k represents the data size of the computing task k of the g-th intelligent vehicle, represents the data transmission rate between the g-th intelligent vehicle and the a-th RSU;

[0118] The following example illustrates this: Figure 3 As shown, smart vehicle A g From top to bottom, V g The speed is constant, in the figure A g At point (X, Y), a task migration unloading demand is generated. Intelligent vehicle A g Not within the coverage of RSU1 and RSU3, RSU1 and RSU3 will not be considered by the Cybertwin layer, and we need to further calculate A gDriving time in RSU2 and RSU4

[0119] by For example, A g The initial position (X, Y) of 1 is known, and the position of RSU4 (X4, Y4) is also known. If we want to get Must get an A g 1Leave the critical point A of RSU4 g 1”(X”, Y”), first calculate A g The distance from position 1 to RSU4:

[0120]

[0121] if only Then T g,k Can be migrated to RSU4:

[0122]

[0123] Because A g Moving downward at a constant speed, we have:

[0124] X″=X

[0125]

[0126] The problem is further transformed into how to find the position of "Y", and we get:

[0127]

[0128]

[0129] Given that Y>Y”,

[0130]

[0131] Similarly, calculate A g 1 to the critical point A that leaves the coverage position of RSU2 g The time spent on 1'(X',Y') is D g,k Can detect, It is also known that these are existing technologies and will not be described in detail. Then T g,k (The computing task k of the g-th smart vehicle) can also complete the task migration with RSU2, then the further migration selection will be globally optimized by the QDPG algorithm of the Cyberwin layer. When calculating the relationship between the intelligent vehicle and the RSU, a simplified model is adopted. In practical applications, the length of the road within the coverage range of each RSU can be obtained according to the intersection of the coverage radius of each RSU and the road, as well as the curvature of the road. These length data are pre-stored in the database, and then the task migration options are obtained according to the speed of the current position of the intelligent vehicle. Further migration selection will be globally optimized by the QDPG algorithm of the Cybertwin layer.

[0132] S220, establishing the computing task offloading model, including the following model:

[0133] S221, the smart vehicle local unloading model includes:

[0134]

[0135]

[0136] in: represents the local offloading delay of the computing task k of the g-th intelligent vehicle, D g,k represents the data size of the computing task k of the g-th intelligent vehicle, F NIB Indicates the computing power of the smart vehicle, which is a set value. represents the local offloading energy consumption of computing task k of the g-th intelligent vehicle, represents the power consumption coefficient of the local offloading of the computing task k of the g-th intelligent vehicle, which is a set value;

[0137] S222, the MEC server uninstalls the model,

[0138] Furthermore, the queuing process of the computing tasks arriving at the MEC server is modeled as an M / M / 1 queuing model.

[0139] The latency of MEC server unloading includes three parts: the latency of smart vehicles transmitting computing tasks to RSUs The latency of RSU transmitting computing tasks to MEC servers and the processing delay of tasks in the MEC server. The processing delay of the MEC server conforms to the M / M / 1 queuing theory. We assume that the computing task migration offloading request arrives according to each time slot ΔT. The M / M / 1 queuing theory is more in line with the task data flow in the actual IoV. Each MEC has a task queue, in which the migration offloading demand of the first request is given priority to the service support of the MEC server.

[0140] The MEC server offloading model includes:

[0141]

[0142]

[0143]

[0144]

[0145]

[0146] in: represents the transmission rate between the g-th intelligent vehicle and the a-th RSU, represents the transmission delay from the computing task k of the g-th intelligent vehicle to the RSU,

[0147] represents the transmission rate between the b-th MEC server and the a-th RSU, represents the transmission delay of the computing task k of the g-th intelligent vehicle from the a-th RSU to the b-th MEC server,

[0148] F MEC represents the initial computing power of the MEC server, ω g,k The average arrival rate of tasks on the MEC server at present, Indicates that K tasks arrive at the MEC server in this time slot, Represents the processing delay of the MEC server for the computing task k of the g-th intelligent vehicle.

[0149] W represents the power transmitted between the smart vehicle and the RSU, or between the MEC server and the RSU in the model,

[0150] represents the energy consumption of MEC server offloading for computing task k of the g-th smart vehicle,

[0151] RU b Indicates the resource utilization of the b-th MEC server,

[0152] S230, determining the total cost of migration and offloading of the computing task:

[0153]

[0154]

[0155]

[0156] is the indicator function, when the computing task k of the g-th intelligent vehicle chooses to be locally unloaded is 1, otherwise it is 0. is an indicator function, when the computing task k of the g-th intelligent vehicle chooses to unload the MEC server, is 1, otherwise it is 0. represents the total latency cost of all computing tasks,

[0157] represents the total energy cost of all computing tasks,

[0158] U g, k represents the total unloading cost of computing task k of the g-th intelligent vehicle, p and q represent the balance coefficients of latency and energy consumption, respectively, p+q=1;

[0159] A represents the total number of the intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles;

[0160] S240, determine the overall mission benefits of the Internet of Vehicles:

[0161] According to the task classification, it is divided into large (Task Data Large, TDL), medium (TDN), small (TDS) tasks, high (High Priority Task, HPT), medium (NPT), and low (LPT) priorities. High priority tasks are mostly urgent small tasks, such as safety tips, navigation reminders, etc., which are directly unloaded using local NIB technology. Low priority tasks are generally large tasks with no real-time requirements, such as APP downloads, video downloads and uploads, etc., which are directly unloaded using cloud computing resources. The other medium priority task types are negatively correlated with the development of time. In addition, large tasks of medium priority are cut into small and medium tasks and added to the task data stream. The present invention proposes a task benefit evaluation function for the algorithm to learn.

[0162] Specifically, in addition to priority, the evaluation of the quality of vehicle network service is the key point we consider first, which has a certain relationship with the coreness of the network. The coreness of the network refers to the quality of the current network status. The intelligent vehicle network in the city center often faces challenges such as channel blocking, reduced throughput, and reduced bandwidth due to the intensive task requirements of intelligent vehicles, which have a profound impact on the coreness of the network. Therefore, this application introduces network key parameters ζ, η (ζ<1, η>0, ζ+η=1) to measure the task performance of our algorithm in a bad network environment. The network status at this time can be affected by adjusting the key network parameters. The two parameters are used to replicate a network in a real environment to maintain or avoid coreness to some extent. A network will never be so smooth that it is not adversely affected by any external factors, nor can it reach a state where it cannot operate normally due to external interference. Therefore, the coreness of the network always tends to maintain a balance, even if it experiences more interference at some point, it can still operate normally. Usually, we expect the core of the network to be ζ>η. When η>ζ, it means that the current smart vehicle network environment is relatively poor, which may cause problems such as reduced bandwidth and thus a decrease in task transmission speed. This also means that the interaction difficulty between smart vehicles and RSU nodes and MEC server nodes increases, increasing latency and energy consumption.

[0163] The task efficiency in the Internet of Vehicles is closely related to the delay threshold. Among them, the HPT task has the most stringent requirements. Once the delay of the task is Threshold exceeded The task migration is considered to have failed and lost its value, and a negative value is given to the reward in the algorithm as a penalty. The benefit function for:

[0164]

[0165] Where: HPT represents a high priority task, F(HPT) represents a penalty value to constrain the algorithm, T g,k represents the computing task k of the g-th intelligent vehicle, Indicates execution of T g,k Migrate the unloading action and complete the required delay, Indicates T g, k is the maximum tolerable delay threshold, ζ and η are both key network parameters and ζ<1, η>0, ζ+η=1, is the number of all computing tasks with priority level HPT, Indicates T g,k is the benefit function of HPT.

[0166] Further considering the medium-priority NPT tasks, the number of tasks in this priority is the largest, including TDS, TDN, and TDL, which is also the key to considering the benefits of IoV tasks. Consider decomposing TDL tasks and migrating and unloading them in parallel, making full use of MEC server resources to ensure the minimum latency. In particular, the task latency threshold of NPT tasks is relatively high, but the benefits will decrease exponentially as the latency increases. The benefit function for:

[0167]

[0168] Where: NPT represents the medium priority task, F(NPT) is the benefit value of the medium priority task, represents the number of all computing tasks with priority NPT, μ is the coefficient, Indicates T g,k is the benefit function of NPT.

[0169] According to the actual situation in IoV, most of the tasks with priority LPT are large data tasks (smart apps, video images, etc.). The task completion requires a long delay and does not require immediate completion. Therefore, the task is migrated to the cloud to complete the offloading. However, when the network criticality deteriorates or sudden network problems occur, it may still cause the task migration to terminate or the task offloading to fail. In this case, the task efficiency is is 0;

[0170]

[0171] Where: LPT represents the medium priority task, F(LPT) is the benefit value of the low priority task, Indicates the number of TDL tasks with priority LPT, Indicates T g,k is the benefit function of LPT;

[0172] Finally, the overall task benefit in IoV is given:

[0173]

[0174] in: represents the total task benefit of the computing task k of the g-th intelligent vehicle, E g,k represents the energy consumption of computing task k of the g-th intelligent vehicle, C g,k represents the number of CPU cycles required for the computing task k of the g-th intelligent vehicle,

[0175] is the indicator function, Indicates that the processing priority is 1 when the computing task is HPT, otherwise it is 0. Indicates that the processing priority is NPT, which is 1; otherwise, it is 0. Indicates that the processing priority is LPT, which is 1, otherwise it is 0, A represents the total number of intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles;

[0176] S250, determining the constraint conditions, specifically:

[0177]

[0178]

[0179]

[0180]

[0181]

[0182] Where: RU represents the resource utilization of the MEC server, RU b represents the resource utilization of the bth MEC server. C1 constrains the task processing delay in local offloading and migration offloading to not exceed the maximum tolerated task delay. C2 indicates that the smart vehicle must be within the coverage of the RSU before and after the migration action. C3 indicates that the arrival rate of computing tasks in any of the MEC servers cannot exceed the initial computing power of the MEC server. g,k represents the action of computing task k of the g-th intelligent vehicle. C4 indicates that there are only two types of task actions: 0 indicates local offloading and 1 indicates migration offloading. S a represents migration to the ath RSU, G b represents offloading to the b-th MEC server, and G represents the total number of MEC servers.

[0183] In S200, when the computing power of all MEC servers cannot support offloading, the digital twin layer sends a local offloading command to the vehicle, and the computing task will be offloaded locally.

[0184] S300, based on the constraints, establishing a Markov decision model for minimizing migration offloading costs and maximizing MEC server resource utilization and task benefits;

[0185] Specifically, in S300, the steps of establishing the Markov decision model are as follows:

[0186] S310, defining a state, defining a state S(ΔT) of the intelligent vehicle in a time slot ΔT;

[0187] The smart vehicle A shown in the gth station gThe state in the time slot ΔT includes the position PA g (ΔT), vehicle speed V g (ΔT), the distance between the smart vehicle and the ath RSU Task transfer rate And the k computing tasks T carried g,k (ΔT), which includes the data size D of the g-car computing task k g,k (ΔT), the number of CPU cycles required C g,k (ΔT), Task priority g,k (ΔT) and other states, state definition S g (ΔT) = {PA g (ΔT), V g (ΔT), T g,k (ΔT)…}, S g (ΔT)∈S IOV .

[0188] S320, designing an action, the action function of the computing task k of the g-th intelligent vehicle in the time slot ΔT is:

[0189] a g,k (ΔT) = {Task g,k (ΔT),Z g,k (ΔT)},

[0190] Among them: Task g,k (ΔT) represents the priority of the computing task k of the g-th smart vehicle in the time slot, which determines the processing order of the tasks in the action space; Zg,k(ΔT) represents the action of the computing task of the g-th smart vehicle in the time slot k, including the continuous action of the smart vehicle unloading locally, the continuous action of migrating from the smart vehicle to the RSU, and the discrete action of migrating from the RSU to the MEC server;

[0191] S330, design reward function;

[0192] The reward of this model consists of three parts, which are to minimize the migration offloading cost and maximize the MEC server resource utilization and task benefit as the time slot ΔT develops. The reward function γ in the time slot ΔT can be expressed as:

[0193]

[0194] in: and is an indicator function, representing whether the computing task is completed or failed in this time slot. Indicates that the calculation task is 1 when the time slot ΔT is completed, otherwise it is 0, If the computing task is not completed, it is 1, if it is completed, it is 0. g,k (ΔT) represents the additional penalty for task migration offloading failure, which is related to the task processing delay exceeding the maximum tolerance delay or task transmission failure. g,k (ΔT) represents the total unloading cost of the computing task k of the g-th intelligent vehicle in the time slot ΔT, RU(ΔT) represents the resource utilization of the MEC server in the time slot ΔT, Represents the total task benefit of the computing task k of the g-th intelligent vehicle in the time slot ΔT.

[0195] In the process of building the Markov model, each intelligent vehicle and RSU deployed with NIB is an intelligent agent. In the Markov model, they can be defined by three key elements: 1. state; 2. action; 3. reward. The Cybertwin layer takes corresponding actions according to the IOV environment state S(ΔT). g,k (ΔT), evaluate the result of the behavior and get a reward r(ΔT), and return the reward to the IOV environment to obtain the next state S(ΔT+1).

[0196] S400 uses the deep reinforcement learning QDPG algorithm that mixes the DDPG algorithm and the D3QN algorithm to solve the optimal migration and unloading strategy.

[0197] Wherein: according to the DDPG algorithm, each of the intelligent vehicles has a vehicle actor network, each of the RSUs has a roadside unit actor network, and the vehicle actor network and the roadside unit actor network share a critic network; the D3QN algorithm optimizes the Q value function of the critic network, and determines the optimal migration unloading strategy according to the maximum value of the Q value function;

[0198] Specifically, the maximum value of the Q value function is calculated as follows:

[0199]

[0200]

[0201]

[0202]

[0203]

[0204] S={S1,S2,…S k},

[0205] in:

[0206] θ represents the critic network parameters, β represents the actor network parameters, β1 represents the vehicle actor network parameters, β2 represents the roadside unit actor network parameters, Task g,k represents the priority of the computing task k of the g-th intelligent vehicle, represents the action of migrating the kth computing task of the gth intelligent vehicle to the ath RSU, Indicates the action of migrating the kth computing task of the gth intelligent vehicle from the ath RSU to the bth MEC server;

[0207] a vehicle actor network function representing the smart vehicle;

[0208] A roadside unit actor network function representing the RSU;

[0209] The vehicle actor network function represented by A collection of;

[0210] Represents the continuous actions of the roadside unit actor network function A collection of;

[0211] S stands for status;

[0212] Z g,k Indicates T g,k task actions.

[0213] like Figure 4 As shown, each of the smart vehicles and RSUs has an actor network, but shares a critic network, so that during the training and learning process of Cybertwin, each virtual smart vehicle and RSU can share continuous action decisions and coordinate and cooperate to complete continuous and discrete action decisions. D3QN is an improved algorithm of DQN to solve the problem of traditional DQN overestimation, where overestimation may cause excessive migration offloading costs or cause a certain MEC server to overload quickly. This application uses D3QN to improve the critic network part of DDPG, where the Cybertwin layer forms a digital virtual IOV, each smart vehicle will be digitized into an intelligent body, and each RSU will also be digitized into an intelligent body. The intelligent vehicle intelligent body uses its own vehicle actor network function Forming a continuous set of actions RSU agent according to Information and its own roadside unit actor network function Generate a continuous set of actions Then the critic network shared by the agents collects the action sets of all agents and the state set S at this time S = {S1, S2, ... S k} as a network function The network function will output the Q value of all intelligent vehicle computing tasks. The final action of computing task k should be to migrate to MEC. b Complete uninstallation or local uninstallation can be done through the maximum Q g,k Function obtained.

[0214] The optimization process of the Q value function is as follows:

[0215] At the beginning, the digital virtual IoV in Cybertwin performs the action to get r g,k (ΔT) (i.e., the reward of the computing task k of the g-th intelligent vehicle), and the next IOV state S′={S′1,S′2…S′ k}, and then collect the information in the current virtual IOV into a tuple And put it in the experience replay pool for training.

[0216] 1. Update of vehicle actor network and roadside unit actor network: The corresponding continuous actions X of each intelligent vehicle agent and RSU agent one (ΔT), X two (ΔT):

[0217]

[0218]

[0219] The gradient is updated by the actor function as:

[0220]

[0221] 2. Critic network update: Based on the Dueing architecture of the D3QN algorithm, the state value function V and the action advantage value function Λ are divided into two independent functions, and finally the combination module is completed using the average advantage method, which can improve the efficiency and performance of the algorithm:

[0222]

[0223] Figure 5The combination of DDPG and D3QN algorithms is described to solve the problem that the action space contains both discrete action processes and continuous action processes. Traditional DRL algorithms are either for continuous action space (such as DDPG) or for discrete action space (such as DQN). The method of fusing DDPG and D3QN innovatively solves the problem of the coexistence of continuous and discrete action spaces in the Internet of Vehicles, providing a new solution. Optimize decision quality: By combining the continuous action processing capability of DDPG and the optimization of D3QN in processing discrete actions, this fusion algorithm can provide higher quality and more accurate decisions. This application will select RSU for task migration for mobile intelligent vehicles. As a continuous action domain, and RSU selects the action of MEC The final decision to offload to the b MEC servers As a discrete action domain, the vehicle actor network function Explore the optimal migration strategy based on Forming an action set RSUs are based on Information and its own roadside unit actor network function Actor Generate a continuous set of actions Then the critic network shared by the agents collects the action exploration sets of all agents And the state S set S = {S1, S2, ... Sk} at this time is used as the network function The network function will output the Q value of all intelligent vehicle tasks. The Q value of the kth computing task of the gth intelligent vehicle will be output. The final action of the computing task should be to migrate to MEC b Complete uninstallation or local uninstallation can be done through the maximum Q g,k Function obtained.

[0224] In traditional multi-agent environments, there are usually challenges, such as how to coordinate the behavior of different agents. In this solution, each agent (intelligent vehicle and RSU) has its own actor network function to make individual decisions, and shares a critic network to evaluate the effects of these decisions. This structure effectively balances independence and collaboration.

[0225] like Figure 5 As shown, the critic network is based on the dueling architecture of D3QN and is used to update the predicted Q value. It embodies the duel network idea of ​​​​the integration of D3QN. In this architecture, the network is divided into two parts: one part estimates the state value, and the other part estimates the advantage value of each action, as shown in the formula The state value function provides the overall value at a given state, while the action advantage value function evaluates the additional value of each action at the current state relative to the average action. This approach ensures that the action advantage value is not overemphasized when estimating the value of each action. This makes the unloading decisions fed back by the critic network more accurate and stable.

[0226] where θ1, θ2, and θ3 represent parameters of different parts of the neural network. Specifically: θ1: This is a shared parameter of the network, θ1 is responsible for processing the input state S and the available actions X one X two , providing a basic representation for the state value function V and the action advantage value function Λ. θ2: This parameter is specifically used for the state value function V(S, Task, U... / θ1, θ2), which includes the calculation of the state value such as the migration offloading cost caused by the calculation of the task according to the priority, the task benefit, etc. The state value function attempts to evaluate the expected total reward in a given state, independent of any specific action. The θ2 parameter helps the model understand and estimate this global value. θ3: This parameter is used for the action advantage value function The purpose of the action advantage value function is to evaluate the advantage of each action relative to the average action. The θ3 parameter helps the model estimate the relative value of each action. In the dueling architecture of D3QN, θ1, θ2, and θ3 represent different parts of the network, each responsible for handling a specific task. The dueling architecture allows the network to learn and estimate state value and action advantage simultaneously, and then combine this information to estimate the overall Q value of the state-action pair. By separating these parameters, the model can more effectively learn how to evaluate states and actions, thereby improving the accuracy and performance of overall predictions.

[0227] The target critic network is used to update the calculation and evaluation of the predicted Q value, where θ is the critic network parameter, θ - are the target critic network parameters, r represents the reward function, γ represents the discount factor, and q g,k Represents the goal of the algorithm iteration and defines the target Q value q that the target critic network should achieve in each iteration g,k This value is the reference point used to update the critic network. After calculating the target Q value, the next step is to update the critic network so that its predicted Q value is closer to this target. The method of updating the critic network is to calculate the gradient of the loss function and perform gradient descent. The loss function is usually the square of the difference between the predicted Q value and the target Q value (mean square error). By minimizing this loss function, the parameters of the critic network are gradually adjusted to more accurately predict future reward values, and the target critic network uses the soft update method to copy parameters from the critic network. After a round of learning, all the information is formed into tuples and put into the experience replay pool, and iterates continuously to find the optimal unloading solution.

[0228] The critic network and target critic network designed above embody the role of dual Q-learning in D3QN: by introducing dual Q-learning, the algorithm uses two independent networks when estimating Q values. One network is used to select the best action, and the other network is used to evaluate the Q value of the action. This separation reduces the risk of overestimation. The actor network and the critic network each have a target network, one network is used to select the best action, and the other network is used to evaluate the Q value of the action, reducing the problem of overestimation.

[0229] S500, the offloading is completed, and finally the critic network feeds back the optimal action to the action network to complete the task migration and offloading.

[0230] In order to verify the effectiveness and working performance of the vehicle network task migration and offloading method based on digital twins provided by the embodiment of the present invention, simulation tests were carried out for the above-mentioned model and algorithm, and compared with the existing D3QN method, DDPG method, and DQN method under the same number of vehicles, number of tasks, RSU, MEC, and RSU benchmarks. During training, we set the learning rates of the Actor network and the Critic network to 0.0001 and 0.001, respectively. The soft target update rate we used was σ = 0.001, the discount factor was set to γ ​​= 0.99, and the ε-greedy strategy (ε = 0.9) was used. The ε-greedy strategy is a strategy commonly used in reinforcement learning and other optimization problems to find a balance between exploration and utilization. In addition, the sample size of each extraction is set to 64, and the size of the replay memory library is set to 9999. In order to explore the optimal strategy more comprehensively, we added noise that follows the Gaussian distribution ~ N (0,1) to each action to improve the diversity and exploration performance of the model.

[0231] Convergence comparison of algorithms, such as Figure 6 As shown in the figure, we first verified the feasibility of using the QDPG algorithm for this model, and compared the convergence of the DDPG, D3QN, and DQN algorithms. We set the number of learning episodes to 800, and it can be seen that the algorithms eventually converge. This shows that these four algorithms can be used in the vehicle network task migration and offloading model. It is worth mentioning that the reward obtained by our proposed algorithm is the highest.

[0232] Algorithm delay comparison, such as Figure 7As shown in the figure, it shows the delay change diagram when the number of smart vehicles increases and the Internet of Vehicles model becomes more and more crowded. As the number of vehicles increases, the total delay of the required computing tasks also increases, and the growth rate also increases. This shows that as the number of smart vehicle computing tasks increases, it is inevitable that there will be a shortage of computing resources. As the distance of task migration increases, the transmission delay becomes larger and larger, or the service capacity of the MEC server reaches the threshold, local task offloading actions are inevitable. However, it can be seen that the total task delay caused by the QDPG algorithm we proposed is always better than other algorithms.

[0233] Algorithm energy consumption comparison, such as Figure 8 As shown in the figure, the total energy consumption changes caused by the increase in the number of intelligent vehicles in the task migration offloading model we proposed. It can be seen that energy consumption increases with the increase in the number of vehicle tasks. Compared with the comparison algorithm, the QDPG we proposed still has a good advantage. In fact, the energy consumption index is highly correlated with the delay index. The higher the delay, the greater the energy consumption.

[0234] Comparison chart of algorithm migration offloading costs, such as Fig. 9 As shown in the figure, the weighted cost of task migration offloading of various algorithms is shown. We considered a weighted scheme that is more biased towards latency consumption costs, so the DRL algorithm is more inclined to choose a latency-first scheme. We took into account that in the future 6G Internet of Vehicles, compared to energy consumption indicators, smart vehicle users are more likely to want a low-latency service experience and more effective task response. In addition, the composition of latency is mainly composed of task migration transmission delay, task processing delay and local offloading delay. The more local offloading actions and the higher the local offloading delay, the greater the energy consumption. This setting is to make better use of MEC computing resources in the IoV environment. It is worth mentioning that the QDPG algorithm is still the best option among multiple algorithms.

[0235] Comparison of resource utilization of MEC servers by algorithm, such as Fig.10 , Fig.11 , Fig.12 and Fig.13As shown in the figure, this experimental model simulates the resource utilization results of MEC servers for each migration and unloading algorithm. The RU value means the resource utilization of the MEC server during the MEC unloading action after the migration action of each time slot task is completed. This experimental model deploys 5 RSUs and 5 MECs. We hope that the RU value is as high as possible without exceeding 1, and the resource utilization of the 5 MECs is as close as possible, which means the best utilization of MEC. As the number of vehicle computing tasks increases, the RU value is constantly increasing and it is difficult to maintain a balance. The proposed QDPG algorithm maintains a good RU of each MEC while the RU of each MEC is relatively close. It can be seen that our improved QDPG algorithm has more stable performance and higher resource utilization.

[0236] Comparison of algorithm task benefits, such as Fig.14 As shown in the figure, the task benefit is mainly related to whether the computing task is successfully completed within the constraints. If the computing task is successfully completed, a certain reward will be obtained, and if the computing task fails, there will be a certain penalty. The higher the task benefit, the better, which is also one of our optimization tasks. With the increase of task vehicles, the overall benefit value of the DRL algorithm is also increasing, indicating that the DRL algorithm can provide a good task migration unloading strategy for IoV and ensure the completion of the task. The QDPG algorithm we proposed is under the premise of good network conditions (ζ=0.7, η =0.3) has a task benefit value that is always better than other algorithms.

[0237] In summary, the method provided by the present invention sets RSU between the MEC server and the smart vehicle, and sets constraints based on whether the computing task is migrated to the RSU and whether the MEC server is unloaded. Based on the constraints, a Markov decision model is established to minimize the migration and unloading cost and maximize the MEC server resource utilization and task efficiency. The deep reinforcement learning QDPG algorithm that mixes the DDPG algorithm and the D3QN algorithm is used to solve the optimal migration and unloading strategy. The method provided by the present invention can overcome the problems of insufficient utilization of Internet of Vehicles computing resources and unreasonable resource allocation in traditional methods, achieve lower migration and unloading costs, higher MEC resource utilization and task efficiency, and thus improve the communication service quality of the Internet of Vehicles.

[0238] Although the present invention has been described in detail above with specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A method for task migration and offloading of Internet of Vehicles based on digital twins, the method is applied to the digital twin layer, characterized in that: The following steps are involved: S100, obtaining the computing task migration and offloading requirements of the intelligent vehicle; S200, setting constraints according to whether the computing task is migrated to the RSU and whether the MEC server is unloaded; S300, based on the constraints, establishing a Markov decision model for minimizing migration offloading costs and maximizing MEC server resource utilization and task benefits; S400 uses the deep reinforcement learning QDPG algorithm that mixes the DDPG algorithm and the D3QN algorithm to solve the optimal migration and unloading strategy. Wherein: according to the DDPG algorithm, each of the intelligent vehicles has a vehicle actor network, each of the RSUs has a roadside unit actor network, and the vehicle actor network and the roadside unit actor network share a critic network; the D3QN algorithm optimizes the Q value function of the critic network, and determines the optimal migration unloading strategy according to the maximum value of the Q value function; S500, uninstallation is completed.

2. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 1 is characterized in that: Before step S200, the Mini Batch K-Means algorithm is used to classify the computing tasks into high priority, medium priority and low priority according to priority, and into large category, medium category and small category according to data volume.

3. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 2 is characterized in that: In S200, the queuing process of the computing tasks arriving at the MEC server is modeled as an M / M / 1 queuing model.

4. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 3 is characterized in that: In S200, the method for setting the constraint condition is as follows: S210, establishing a migration model of the computing task from the intelligent vehicle to the RSU; The current position of the smart vehicle is within the coverage of the RSU, that is, in: represents the distance between the current position of the g-th intelligent vehicle and the a-th RSU, and R represents the coverage radius of the RSU; The transmission delay of the computing task from the smart vehicle to the RSU is less than the driving time of the smart vehicle within the coverage of the RSU, that is, in: is the driving time of the intelligent vehicle in the ath RSU, is the transmission delay from the computing task k of the g-th intelligent vehicle to the a-th RSU, D g,k represents the data size of the computing task k of the g-th intelligent vehicle, represents the data transmission rate between the g-th intelligent vehicle and the a-th RSU; S220, establishing the computing task offloading model, including the following model: S221, the smart vehicle local unloading model includes: in: represents the local offloading delay of the computing task k of the g-th intelligent vehicle, F NIB represents the computing power of the smart vehicle, represents the local offloading energy consumption of computing task k of the g-th intelligent vehicle, represents the power consumption coefficient of the local offloading of the computing task k of the g-th intelligent vehicle; S222, the MEC server unloading model includes: in: represents the transmission rate between the b-th MEC server and the a-th RSU, represents the transmission delay of the computing task k of the g-th intelligent vehicle from the a-th RSU to the b-th MEC server, F MEC represents the initial computing power of the MEC server, ω g,k Indicates the average arrival rate of the current tasks of the MEC server, Indicates that N computing tasks arrive at the MEC server during this time slot. represents the processing delay of the MEC server for the computing task k of the g-th smart vehicle, W represents the power transmitted between the smart vehicle and the RSU, or between the MEC server and the RSU in the model, represents the energy consumption of MEC server unloading for computing task k of the g-th smart vehicle, RU b represents the resource utilization of the b-th MEC server, S230, determining the total cost of migration and offloading of the computing task: is the indicator function, when the computing task k of the g-th intelligent vehicle chooses to be offloaded locally is 1, otherwise it is 0. is an indicator function, when the computing task k of the g-th intelligent vehicle chooses to unload the MEC server, is 1, otherwise it is 0. represents the total latency cost of all computing tasks, represents the total energy cost of all computing tasks, U g,k represents the total cost of offloading the computing task k of the g-th intelligent vehicle, p and q represent the balance coefficients of latency and energy consumption, respectively, p+q=1; A represents the total number of the intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles; S240, determine the overall mission benefits of the Internet of Vehicles: Among them: HPT represents the high priority task, F(HPT) represents a penalty value to constrain the algorithm, T g,k represents the computing task k of the g-th intelligent vehicle, Indicates execution of T g,k Migrate the unloading action and complete the required delay, Indicates T g,k The maximum tolerable delay threshold, ζ and η are both key network parameters and ζ<1, η>0, ζ+η=1, is the number of all computing tasks with priority level HPT, Indicates T g,k is the benefit function of HPT; Where: NPT represents the medium priority task, F(NPT) is the benefit value of the medium priority task, represents the number of all computing tasks with priority NPT, μ is the coefficient, Indicates T g,k is the benefit function of NPT; Where: LPT represents the medium priority task, F(LPT) is the benefit value of the low priority task, Indicates the number of TDL tasks with priority LPT, Indicates T g,k is the benefit function of LPT; in: represents the total task benefit of the computing task k of the g-th intelligent vehicle, E g,k represents the energy consumption of computing task k of the g-th intelligent vehicle, C g,k represents the number of CPU cycles required for the computing task k of the g-th intelligent vehicle, is the indicator function, Indicates that the processing priority is 1 when the computing task is HPT, otherwise it is 0. Indicates that the processing priority is NPT, which is 1; otherwise, it is 0. Indicates that the processing priority is LPT, which is 1, otherwise it is 0, A represents the total number of intelligent vehicles, and K represents the total number of computing tasks of the intelligent vehicles; S250, determining the constraint condition: Where: RU represents the resource utilization of the MEC server, RU b represents the resource utilization of the bth MEC server. C1 constrains the task processing delay in local offloading and migration offloading to not exceed the maximum tolerated task delay. C2 indicates that the smart vehicle must be within the coverage of the RSU before and after the migration action. C3 indicates that the arrival rate of computing tasks in any of the MEC servers cannot exceed the initial computing power of the MEC server. g,k represents the action of computing task k of the g-th intelligent vehicle. C4 indicates that there are only two types of task actions: 0 indicates local offloading and 1 indicates migration offloading. S a represents migration to the ath RSU, G b represents offloading to the b-th MEC server, and G represents the total number of MEC servers.

5. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 4 is characterized in that: In S300, the steps of establishing the Markov decision model are as follows: S310, defining a state, defining a state S(ΔT) of the intelligent vehicle in a time slot ΔT; S320, designing an action, the action function of the computing task k of the g-th intelligent vehicle in the time slot ΔT is: a g,k (ΔT)={Task g,k (ΔT),Z g,k (ΔT)}, Among them: Task g,k (ΔT) represents the priority of the computing task k of the g-th intelligent vehicle in the time slot ΔT; Z g,k (ΔT) represents the action of the computing task k of the g-th smart vehicle in the time slot ΔT, including unloading at the local smart vehicle, migration from the smart vehicle to the RSU, and migration from the RSU to the MEC server; S330, design reward function: in: Indicates that the calculation task is 1 when the time slot ΔT is completed, otherwise it is 0, If the computing task is not completed, it is 1, if it is completed, it is 0. g,k (ΔT) represents the additional penalty for task failure, U g,k (ΔT) represents the total unloading cost of the computing task k of the g-th intelligent vehicle in the time slot ΔT, RU(ΔT) represents the resource utilization of the MEC server in the time slot ΔT, Represents the total task benefit of the computing task k of the g-th intelligent vehicle in the time slot ΔT.

6. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 5 is characterized in that: In S400, the method for calculating the maximum value of the Q value function is as follows: S={S1,S2,…S k }; in: θ represents the critic network parameters, β represents the actor network parameters, β1 represents the vehicle actor network parameters, β2 represents the roadside unit actor network parameters, Task g,k represents the priority of the computing task k of the g-th intelligent vehicle, represents the action of migrating the kth computing task of the gth intelligent vehicle to the ath RSU, Indicates the action of migrating the kth computing task of the gth intelligent vehicle from the ath RSU to the bth MEC server; a vehicle actor network function representing the smart vehicle; A roadside unit actor network function representing the RSU; The vehicle actor network function represented by A collection of; Represents the continuous actions of the roadside unit actor network function A collection of; S stands for status; Z g,k Indicates T g,k task actions.

7. The method for migrating and unloading Internet of Vehicles tasks based on digital twins according to claim 1 is characterized in that: In S200, when the computing power of all MEC servers cannot support offloading, the digital twin layer sends a local offloading command to the vehicle, and the computing task will be offloaded locally.

Citation Information

Cited By

  • Digital twin assisted vehicle task unloading and computing resource allocation optimization method

    CN120111575A