A digital twin migration method and terminal in a vehicle edge computing network

By establishing a delay model in the vehicle edge computing network and optimizing the digital twin migration strategy, the problem of digital twin service delay and difficulty in maintaining quality is solved, stable and efficient migration in vehicle mobility scenarios is achieved, and network performance is improved.

CN118510054BActive Publication Date: 2024-10-11BEIJING NORMAL UNIV AT ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410949004.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-10-11
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

In the existing technology, the service delay and service quality of digital twins in vehicle edge computing networks are difficult to maintain stable. Especially in large-scale mobile communication scenarios, the lack of effective migration strategies leads to service delays and quality degradation.

Method used

By establishing a delay model of the vehicle edge computing network, including communication delay, resource competition delay and migration delay model, a digital twin migration strategy is generated, and the strategy gradient method is used to optimize the migration strategy to ensure the dynamic migration of digital twins between edge vehicle roadside units. , reduce latency.

Benefits of technology

It effectively reduces the overall digital twin migration time, improves the latency performance of the vehicle edge computing network, and ensures the stability and real-time quality of service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118510054B_ABST
    Figure CN118510054B_ABST
Patent Text Reader

Abstract

The present invention discloses a digital twin migration method and terminal in a vehicle edge computing network, the method comprising: obtaining a vehicle edge computing network composed of multiple physical vehicles, digital twins and edge vehicle roadside units, and establishing a delay model in the vehicle edge computing network according to the vehicle edge computing network; according to the delay model, establishing a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the digital twin to migrate between the edge vehicle roadside units; according to the digital twin migration strategy, controlling the digital twin to migrate between the edge vehicle roadside units. The present invention obtains a digital twin migration strategy for reducing the delay of the vehicle edge computing network through a delay model, effectively reducing the overall migration time of the digital twin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital twin technology, and in particular to a digital twin migration method, terminal and readable storage medium in a vehicle edge computing network. Background Art

[0002] Vehicle edge computing and networking can be embedded in network edge infrastructure, such as roadside units, to support the storage, computing, and sharing of massive vehicle data. However, limited by limited resource capacity and large-scale vehicle mobile communications, the capabilities of current vehicle edge computing networks cannot effectively meet the growing resource requirements of such large-scale applications, especially those with intensive computing and strict latency requirements in large-scale mobile communication scenarios. To this end, in order to achieve real-time services under large-scale communications, existing technologies perform separate predictions and processing through specific virtual spaces, such as digital twins. Digital twin technology helps create digital maps based on real-world physical objects, and multiple digital twins can be interconnected and share data and insights, all of which can be deployed in vehicle edge computing and networks.

[0003] Existing digital twins are built using data collected from various sources such as sensors, IoT devices, and other data sources. This enables virtual reality relationships and real-time interactions between physical objects and their virtual counterparts. By abstracting and modeling real-world objects, digital twins establish relationships, facilitate two-way data exchange, optimize operational efficiency, and enhance decision-making through automation.

[0004] Most of the existing research on the combination of digital twins and edge vehicle networks is based on digital twin-assisted algorithm models, and studies how to improve the performance of edge networks, including network service improvements, collaborative driving decisions, task scheduling, and resource utilization.

[0005] However, in the existing technology, how to solve the complex communication and strict delay characteristics of digital twins in vehicle edge computing and networks is still an open problem. Taking advantage of the high-speed vehicle mobility in dynamic vehicle edge computing networks, effectively migrating digital twins to follow mobile vehicles can reduce service delays and maintain their service quality. Due to the lack of migration strategies for digital twins in the existing technology, it is difficult to maintain stable service delays and service quality of digital twins. Summary of the invention

[0006] The purpose of the present invention is to provide a digital twin migration method, terminal and readable storage medium in a vehicle edge computing network, aiming to solve the problem in the prior art that the service delay and service quality of the digital twin are difficult to maintain stable as the vehicle moves.

[0007] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0008] The present invention provides a digital twin migration method in a vehicle edge computing network, and the digital twin migration method in the vehicle edge computing network includes:

[0009] Obtain a vehicle edge computing network consisting of multiple physical vehicles, digital twins, and edge vehicle roadside units, and establish a delay model in the vehicle edge computing network based on the vehicle edge computing network;

[0010] According to the delay model, establishing a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the migration of the digital twin between the edge vehicle roadside units;

[0011] According to the digital twin migration strategy, the digital twin is controlled to migrate between the edge vehicle roadside units.

[0012] Further, establishing a delay model in the vehicle edge computing network according to the vehicle edge computing network specifically includes:

[0013] Establishing a communication delay model of the vehicle edge computing network;

[0014] Establishing a digital twin overall resource competition delay model for resource competition between the digital twins;

[0015] Establishing a migration delay model for the digital twin to migrate between the edge vehicle roadside units;

[0016] Establishing the delay model according to the communication delay model, the digital twin overall resource competition delay model and the migration delay model;

[0017] Establish physical constraints and digital twin operational constraints for the delay model.

[0018] Furthermore, the establishing of the communication delay model of the vehicle edge computing network specifically includes:

[0019] Calculate the collaborative communication delay between digital twins :

[0020] ;

[0021] Where t represents the time, E represents the set of all edge vehicle roadside units e, and D represents the set of all digital twins d. is a binary function. If the digital twin d runs on the edge vehicle roadside unit e, then is 1, otherwise is 0, Represents the i-th digital twin and the jth digital twin The frequency of interaction between Representing digital twins The i-th edge vehicle roadside unit and digital twins The jth edge vehicle roadside unit Communication delay between

[0022] Calculating the interactive communication delay between the digital twin and the edge vehicle roadside unit :

[0023] ;

[0024] in, , representing digital twins and edge vehicle roadside units The communication frequency, Representing digital twins The edge vehicle roadside unit and edge vehicle roadside units Communication delays;

[0025] Calculating pairwise communication delays between the digital twin and the physical vehicle :

[0026] ;

[0027] Among them, U represents the set of all physical vehicles u, represents the communication frequency between the digital twin d and the physical vehicle u, represents the communication delay between the physical vehicle u and the digital twin d, represents the communication delay between the digital twin d and the physical vehicle u;

[0028] According to the digital twin collaborative communication delay , the interactive communication delay and the pairwise communication delay Establish the communication delay model:

[0029] ;

[0030] in, Represents the communication delay of the vehicle edge computing network.

[0031] Calculate the workload of each edge vehicle roadside unit e :

[0032] ;

[0033] in, Indicates the CPU resources required by the digital twin d;

[0034] According to the workload of each edge vehicle roadside unit e Calculate the resource competition delay of each digital twin d :

[0035] ;

[0036] in, Indicates the remaining CPU resources of the roadside unit;

[0037] Delay according to resource competition of each digital twin Establish the overall resource competition delay model of the digital twin:

[0038] ;

[0039] in, Represents the overall resource contention delay of the digital twin.

[0040] Furthermore, the establishment of a migration delay model for the digital twin to migrate between the edge vehicle roadside units specifically includes:

[0041] Calculate the transmission delay of each digital twin migration d :

[0042] ;

[0043] in, Indicates the data transmission rate. represents the data size of the digital twin d;

[0044] Calculate the propagation delay of each digital twin migration d :

[0045] ;

[0046] in, is a positive coefficient of the propagation delay, Refers to the i-th edge vehicle roadside before migration Unit to the jth edge vehicle roadside unit after migration The shortest path;

[0047] According to the transmission delay and the propagation delay Calculate the migration delay of each digital twin d :

[0048] ;

[0049] According to the migration delay of each digital twin d Establish the migration delay model:

[0050] ;

[0051] in, Represents the migration delay of the vehicle edge computing network.

[0052] Furthermore, according to the delay model, establishing a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the migration of digital twins between the edge vehicle roadside units specifically includes:

[0053] generating an initial migration strategy for controlling the migration of digital twins between the edge vehicle roadside units according to the delay model;

[0054] The initial migration strategy is iteratively optimized to obtain the digital twin migration strategy.

[0055] Furthermore, the generating of the initial migration strategy for controlling the migration of the digital twin between the edge vehicle roadside units specifically includes:

[0056] Obtain an expert strategy for reducing the latency of the vehicle edge computing network by controlling the migration of digital twins between the edge vehicle roadside units; extract features of the vehicle edge computing network and the expert strategy to generate an initial migration strategy;

[0057] The iterative optimization of the initial migration strategy to obtain the digital twin migration strategy is, specifically, according to the delay model, using the policy gradient method based on the expert strategy to iteratively optimize the initial migration strategy to obtain the digital twin migration strategy.

[0058] Furthermore, the loss of the policy gradient method based on the expert strategy is for:

[0059] ;

[0060] in, The policy network loss for the optimization policy is:

[0061] ;

[0062] in, represents the policy parameters, Indicates that in a given strategy Downsampling trajectory expectations, Indicates a given state Select action The logarithm of the probability of is the advantage function, which means that under a given strategy Status Next action Relative strength compared to the average performance of the strategy;

[0063] The value network loss for the optimization strategy is:

[0064] ;

[0065] in, is the immediate reward at time t, is a discount factor used to control the relative importance of future rewards, Is a given strategy Next, status The value of the estimated parameters The specific form used to determine the value estimate; In a given strategy Next, status Estimated value of;

[0066] The policy gradient of the policy gradient method based on the expert strategy for:

[0067] ;

[0068] in, is the weight parameter, is the policy gradient of the policy network:

[0069] ;

[0070] in, is the gradient operator, Indicates that in a given strategy Next, through the state distribution Sampling status , and then according to the strategy Sampling Action Expectations after that, represents the gradient of the log-likelihood, which is in the state About strategy parameters The rate of change, is the advantage function, which means that under a given strategy Status Next action Relative strength compared to the average performance of the strategy;

[0071] is the policy gradient of the expert policy:

[0072] ;

[0073] in, is the importance parameter of the expert strategy, is the advantage function, which means that in the expert strategy Status Next action Relative strength compared to the average performance of the strategy.

[0074] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, which includes: a memory, a processor, and a digital twin migration program in a vehicle edge computing network stored in the memory and run on the processor. When the digital twin migration program in the vehicle edge computing network is executed by the processor, the terminal is controlled to implement the steps of the digital twin migration method in the vehicle edge computing network as described above.

[0075] In addition, to achieve the above-mentioned purpose, the present invention also provides a readable storage medium, which stores a digital twin migration program in a vehicle edge computing network. When the digital twin migration program in the vehicle edge computing network is executed by a processor, the steps of the digital twin migration method in the vehicle edge computing network as described above are implemented.

[0076] The present invention adopts the above technical solution to achieve the following effects:

[0077] The present invention models the digital twin from the perspective of communication relationships, fully considers the three communication relationships among physical vehicles, digital twins and edge vehicle roadside units in the vehicle edge computing network, and establishes a delay model that reflects the vehicle edge computing network. Through the delay model, the digital twin migration strategy that reduces the delay of the vehicle edge computing network is obtained, effectively reducing the overall migration time of the digital twin. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 It is a flowchart of the steps of a digital twin migration method in a vehicle edge computing network in a preferred embodiment of the present invention;

[0079] Figure 2 It is a system schematic diagram of digital twin migration in a vehicle edge computing network in a preferred embodiment of the present invention;

[0080] Figure 3 is a flow chart of establishing a digital twin migration strategy in a preferred embodiment of the present invention;

[0081] Figure 4 It is a schematic diagram of the convergence of different algorithms;

[0082] Figure 5It is a schematic diagram of the performance of algorithms in vehicle edge computing and networks under different migration coefficients of different algorithms;

[0083] Figure 6 It is a schematic diagram of the performance of different algorithms in vehicle edge computing and network under different numbers of mobile vehicles;

[0084] Figure 7 It is a schematic diagram of the performance of different algorithms in vehicle edge computing and network under different vehicle arrival rates;

[0085] Figure 8 It is a schematic diagram of the average digital twin migration frequency of different algorithms;

[0086] Fig. 9 It is a schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0088] Embodiment 1

[0089] See also Figure 1 , Embodiment 1 of the present application is a digital twin migration method in a vehicle edge computing network, specifically comprising the steps of:

[0090] S1. Obtain a vehicle edge computing network consisting of multiple physical vehicles, digital twins, and edge vehicle roadside units, and establish a delay model in the vehicle edge computing network based on the vehicle edge computing network.

[0091] Please refer to Figure 2 In edge computing tasks, users generate different tasks and request different containers. Each container requires an image file to run. Each image file requires several layer files, which can be shared by different image files.

[0092] Achieving adaptive digital twin migration decisions requires addressing the following two challenges. First, the latency of digital twin communication during the migration process needs to be considered. The communication relationship within a digital twin consists of three main parts: the interaction between physical objects and digital twins, between digital twins and other digital twins, and the information flow between digital twins and user applications. Existing technologies ignore the impact of maintaining complex communications during digital twin migration. Since the state and data of digital twins are frequently synchronized, additional communication interactions and data transmission must be considered. This inevitably leads to increased system complexity and increased communication costs. In addition, the simultaneous exchange of information between multiple digital twins significantly expands the scale of the communication network. The extensive interconnectivity between digital twins further increases the complexity and computing requirements of the system.

[0093] The second challenge is to make adaptive migration decisions for digital twins in dynamic vehicle edge computing networks. This part involves the joint optimization of digital twin migration latency and communication cost to achieve long-term benefits. Traditional heuristic algorithms often have difficulty effectively solving problems in vehicle edge computing networks with high dimensions and dynamic sparse states, mainly due to traditional static strategies and the inability to consider long-term benefits. Although reinforcement learning can be used to optimize strategies and find the best solution, it still faces the challenge of exploring sparse state space. This is due to the high-speed movement of vehicles and changes in digital twin communication connections, and the interaction between the agent and the environment changes frequently. Due to insufficient state data, it is a challenging problem for reinforcement learning agents to make effective decisions from finite states to unknown states.

[0094] Based on this, for the first challenge, the present invention first needs to model the migration problem of digital twins with large-scale complex communications in vehicle edge computing and networks. Among them, the optimization goal of the overall model system modeled is to minimize the total migration cost, including communication delay, hosting cost and migration delay, to maintain real-time communication of digital twins.

[0095] In this embodiment, for large-scale complex communication digital twin modeling, the communication delay, digital twin resource competition delay and migration delay of the digital twin during the migration process are considered.

[0096] use Represents a collection of moving physical vehicles, a physical vehicle The properties are expressed as ,in represents the running time of the physical vehicle, Indicates the state of the physical vehicle after update, represents the CPU resources required by the physical vehicle, Memory resources required to represent the physical vehicle, Represents the position of the physical vehicle at a certain moment.

[0097] use Represents a set of heterogeneously distributed edge vehicle roadside units, which are a series of devices with computing and communication functions. These devices are distributed in different geographical locations and have different hardware configurations, network connection performance and processing capabilities, which can achieve real-time traffic management, accident detection and response. Any edge vehicle roadside unit The properties are expressed as ,in represents the bandwidth resources on the vehicle roadside unit, Represents the CPU resources on the roadside unit, Indicates the remaining CPU resources of the roadside unit. Indicates the remaining memory resources of the roadside unit. Represents the storage resources of the roadside unit, Represents the location of a roadside unit.

[0098] The collection of digital twins is represented in the modeling system as , where each digital twin The property is defined as . The properties include Represents the physical entity corresponding to the digital twin, Indicates the CPU computing resources required by the digital twin, Indicates the memory resources occupied by the digital twin, represents the size of the digital twin, Indicates the data size when the digital twin performs data synchronization. represents the position at time t.

[0099] In order to ensure satisfactory service quality, the digital twin should be dynamically migrated between roadside units as the vehicle moves, and the communication delay, digital twin resource competition delay and migration delay should be comprehensively considered. Therefore, the main overhead of digital twin migration is modeled and analyzed in this paper.

[0100] Among them, the communication delay in this embodiment consists of three parts: digital twin collaborative communication, which is used to represent data synchronization between digital twins; interactive communication between digital twins and edge vehicle roadside units; and paired communication of the overall system, which is used to represent data exchange between digital twins and corresponding physical vehicles.

[0101] In order to represent the communication delay of digital twins, a binary variable is introduced , to indicate whether the digital twin is on the roadside unit server. If the digital twin d exists on the roadside unit e at time t, then ,otherwise .

[0102] So the first part is the delay in digital twin collaboration communication It can be expressed as:

[0103] ;

[0104] in, Representing digital twins and digital twins The frequency of interaction between Representing digital twins The edge vehicle roadside unit and digital twins The edge vehicle roadside unit The communication delay between them.

[0105] Part 2: Interactive communication delay between digital twin and edge vehicle roadside unit It can be expressed as:

[0106] ;

[0107] in, , representing digital twins and edge vehicle roadside units The communication frequency, Representing digital twins The edge vehicle roadside unit and edge vehicle roadside units communication delay.

[0108] Part 3: Digital Twins Depending on the data exchange frequency With the corresponding physical vehicle Communications, the wireless transmission rate of the vehicle to its digital twin Defined as:

[0109] ;

[0110] in, is the bandwidth allocated for digital twin d communication at time t, is the transmission power of the physical vehicle u, is the channel gain between vehicle u and its corresponding digital twin d, is the spectral density of the power white Gaussian noise.

[0111] Communication delay between vehicle u and digital twin d It is expressed as:

[0112] ;

[0113] in, Indicates the size of data transmitted by the physical vehicle u.

[0114] Since the communication between the digital twin and its corresponding vehicle is bidirectional, the downlink communication between the digital twin and the physical vehicle is mainly determined by the number of hops on the shortest path and the data size when the digital twin and the vehicle are synchronized, so the downlink communication delay of the digital twin is It can be defined as:

[0115] ;

[0116] in is a positive coefficient of downlink communication delay, is the number of hops between vehicle u and the roadside unit e where the corresponding digital twin is located. Therefore, the pairwise communication delay of the overall system is Defined as:

[0117] ;

[0118] in, represents the communication frequency between the digital twin d and the physical vehicle u.

[0119] In the system, various digital twin instances are generated concurrently and communicate independently. The three parts of communication occur simultaneously in the entire system. Therefore, at time t, the communication delay in the vehicle edge network can be defined as:

[0120] .

[0121] Digital twin resource contention delay is related to the resources required for digital twin computing and operation. When migrating digital twins, resource contention delays may occur between digital twins on a roadside unit server due to CPU, memory, or network usage. The CPU required for the digital twin is defined as ,in Indicates the processing density of the digital twin processing task when using the CPU.

[0122] The workload of the edge vehicle roadside unit e can be expressed as:

[0123] .

[0124] The actual resource contention delay for the digital twin d can be expressed as:

[0125] ;

[0126] Therefore, at time t, the overall resource competition delay of the digital twin in the vehicle edge network is defined as:

[0127] .

[0128] Low migration latency of digital twins is crucial to ensure seamless migration of digital twins between different roadside units. When digital twins need to be migrated, real-time processing modules and calculations must be transferred to the target roadside unit. This requires optimizing the network latency of digital twins during migration, including digital twin transmission latency, propagation latency, processing latency, and queuing latency.

[0129] Since there is sufficient and available bandwidth in the network environment of the modeling system, the processing delay and queuing delay are relatively small, so they are ignored in the modeling of this embodiment. The transmission delay of the digital twin is defined as:

[0130] ;

[0131] in, Indicates the data transmission rate.

[0132] For roadside units from vehicles Migrate to vehicle roadside units For digital twins, the propagation delay is measured by the distance of the number of hops. The propagation delay can be expressed as:

[0133] ;

[0134] in, is a positive coefficient of the propagation delay, Refers to the shortest path from the edge vehicle roadside unit before migration to the edge vehicle roadside unit after migration.

[0135] Therefore, the migration delay of the digital twin can be expressed as:

[0136] ;

[0137] At time t, the migration delay in the vehicle edge network can be expressed as:

[0138] ;

[0139] With the above overhead, we can finally model the migration problem of digital twins in a complex communication environment. The problem modeling is as follows:

[0140] ;

[0141] ;

[0142] .

[0143] Wherein, T represents the set of time instants t.

[0144] In addition, there are some restrictions when migrating digital twins, that is, the above modeling problems need to meet some conditional constraints.

[0145] First, in the vehicle edge network, due to the high mobility and frequent switching of communications between vehicles and digital twins, the network environment changes dynamically. Therefore, the digital twin must meet the delay requirements to achieve real-time data processing. Therefore, the actual pairwise communication delay must be within the delay constraint at each time t:

[0146] ;

[0147] in Represents the latency constraints of the digital twin.

[0148] Next, define a binary variable , to indicate whether the vehicle roadside unit e is selected by the digital twin at time t. If the vehicle roadside unit e is selected, then ,otherwise .

[0149] Therefore, it must be guaranteed that at least one vehicle roadside unit is assigned to the digital twin, so the constraint formula is expressed as:

[0150] ;

[0151] And, at any time t, a digital twin must be running on a vehicle roadside unit, which can be expressed as:

[0152] ;

[0153] To ensure the performance of the VRU, the number of digital twins running on each VRU is limited and is defined as:

[0154] ;

[0155] in Represents the maximum number of runs of the digital twin of a vehicle roadside unit.

[0156] Finally, the migration of the digital twin is affected by the available resources on the vehicle roadside unit. The storage and memory resources of each vehicle roadside unit are limited to:

[0157] ;

[0158] .

[0159] After establishing the above model and constraints, the model construction is completed.

[0160] S2. Based on the delay model, establish a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the migration of digital twins between the edge vehicle roadside units.

[0161] Specifically, after establishing the above model and constraints, the migration strategy with the lowest delay after migration can be solved according to the above model.

[0162] .

[0163] For details, please refer to Figure 3 In response to the second challenge, the present invention extracts features from the digital twin states in large-scale and complex edge vehicle networking systems. Afterwards, based on the off-policy actor-critic reinforcement learning algorithm, an adaptive digital twin migration algorithm is proposed. The algorithm uses expert demonstrations as prior knowledge to perform hot start initialization on the reinforcement learning agent. By extracting and combining the features of the vehicle edge computing network and the expert strategy, it is input into a strategy network. After passing through the vector embedding layer, linear layer, bootstrap mask layer, output layer and other layers, a random strategy is finally obtained as the initial migration strategy.

[0164] Subsequently, during the training process of the algorithm, with the assistance of expert knowledge, the reinforcement learning agent is guided to gradually converge to the expert area quickly, achieve long-term benefits of the overall system, make online digital twin migration decisions, and use the policy gradient method based on the expert strategy to iteratively optimize the initial migration strategy to obtain the digital twin migration strategy.

[0165] Specifically, after modeling the above problem, this embodiment first extracts the characteristics of the digital twin migration state, and then solves the problem based on the off-policy actor-critic algorithm. Reinforcement learning mainly includes state space, action space, reward function, strategy and other aspects.

[0166] First, for the state space, since the state of the digital twin and the resources of the roadside unit are very relevant to the digital twin migration, these two aspects are taken into account in the state space. represents the state space of the vehicle roadside unit, Represents the state space of the digital twin.

[0167] Among them, for each vehicle roadside unit, the state space is expressed as:

[0168] ;

[0169] in, represents the location of the vehicle's roadside unit, represents the latency of collaborative communication between the vehicle roadside unit and other digital twins, Indicates the CPU frequency of the vehicle's roadside unit, Indicates the remaining storage space of the vehicle's roadside unit, Represents the memory of the vehicle's roadside unit.

[0170] In addition, for the digital twin that needs to be migrated at each moment, the state of the digital twin itself is very important information. The state space of the digital twin is expressed as:

[0171] ;

[0172] in, represents the location of the digital twin, Indicates the distance from the digital twin to each roadside unit at the current moment, represents the size of the digital twin, CPU resources requested by the digital twin, Represents the memory requested by the digital twin.

[0173] Finally, the state space of the task can be expressed as:

[0174] ;

[0175] in, Represents the state space of the task A collection of .

[0176] After that, for the definition of action space, the action space is defined as the set of all roadside units, which can be expressed as:

[0177] ;

[0178] Finally, for the reward function, the reward in the reward function It can be defined as:

[0179] .

[0180] The goal of reinforcement learning is to maximize long-term benefits. In this example, the long-term discounted benefit It can be defined as:

[0181] ;

[0182] This formula represents the strategy expected returns. Represents the expected value of state and action, state distribution It is in strategy The steady-state distribution of states under this strategy is Probability distribution after long-term adoption. is the sum of the cumulative rewards, the reward for each state-action pair Multiply by the discount factor , to control the relative weight of the rewards.

[0183] In order to train reinforcement learning to obtain an optimal strategy, a strategy optimization algorithm is required. In this embodiment, a strategy gradient algorithm is specifically used as the strategy optimization algorithm for optimization.

[0184] For the policy gradient algorithm, an advantage function is very important. The advantage algorithm of this embodiment can be defined as:

[0185] ;

[0186] in is the value function, is the state-action function, Representation strategy and status Next, characteristic action Advantages.

[0187] The value function is defined as:

[0188] ;

[0189] It means in strategy and status All possible actions The expected sum of the state action functions, i.e., the strategy and status The expected value of the next state-action function.

[0190] The state action function is defined as:

[0191] ;

[0192] This means that in a given strategy The action value function of a specific state-action pair, that is, the specific state Next action The action value function is adjusted using the expected return as a benchmark. Indicates in status Next action Instant rewards when you Representation strategy expected benefits; Indicates in status Next action Then, transfer to the next state The discount of expected future returns.

[0193] Assume that there is an expert strategy , can bring high reward returns, among which, Represents the parameters of the expert strategy, subject to the following constraints:

[0194] .

[0195] This constraint formula compares the expected returns of two strategies under specific states and actions, helping the algorithm improve the effectiveness of the strategy. The expert expected value must be greater than or equal to the benchmark strategy. The corresponding expected value of . Indicates from the state The expected cumulative reward for all possible paths starting from .

[0196] The goal of this invention is to find the difference between the optimization strategy to reduce the minimum return and the expert strategy fixed return, which can be defined as: ,in, represents the minimum and maximum performance gap among a set of strategies, Representation strategy parameter The upper limit value of represents the action value function of the expert strategy. Similarly, the goal of this invention is to satisfy The algorithm seeks the optimal solution ,in Represents the optimal strategy The action value function represents the cumulative reward that can be obtained by following the optimal strategy starting from a specific state-action pair. It is always a non-positive number. As long as this constraint is met, it means that the optimal strategy obtained is better than the expert strategy.

[0197] Intuitively, for a certain expert strategy Actions sampled in the state , which is expected to be better than the strategy Producing a higher return, in this example defined as:

[0198] ;

[0199] This formula means that in a given state Next, follow the expert strategy Choose an action and follow the strategy The expected state value of the action. To obtain the optimal strategy, the strategy is optimized to converge to the optimal value. When the algorithm is combined with the expert strategy, the target is estimated. Sampling expert strategy required The estimated advantage function , can be derived as follows:

[0200] .

[0201] in Is the optimal strategy The resulting state distribution, from which the state is sampled, is calculated in the strategy and strategies The difference in value function between . Expanding this equation into the immediate reward , discounted future expected value , and the expected value of the current state , to represent the difference between the reward and the future discounted value. Then use the advantage function Measure the value and sample under the optimal strategy. Finally, calculate the advantage function time-step by time-step on the state distribution of the optimal strategy.

[0202] With these definitions, it can be concluded that the difference in policy performance can be decomposed into the sum of the value estimation functions at each moment. The optimal policy can guide the policy to converge to a more favorable value. Therefore, the training phase learns the value function demonstrated by the expert that conforms to the Bellman equation, and once the agent begins to interact with the environment, it can be updated through differential learning.

[0203] The loss function of the policy network is expressed as:

[0204] ;

[0205] This formula is used to guide the strategy parameters The update of , realizes the purpose of optimization strategy. Indicates that in a given strategy Downsampling trajectory expectations, Indicates a given state Select action The logarithm of the probability of . is the advantage function, which means that in the state Next action The advantage function measures the benefit of choosing a particular action relative to other possible actions, relative to the average performance of the policy.

[0206] The loss function of the value network is The parameterized representation is:

[0207] ;

[0208] in, Indicated in strategy Downsampled Trajectory Calculate the expectation on is the immediate reward at time t; is a discount factor that controls the relative importance of future rewards; Is a given strategy Next, status The value of the estimated parameters Determine the specific form of this estimate; In a given strategy Next, status The value of is estimated. Therefore, the overall loss function is: , where the coefficients in the loss function are , used to balance the impact of strategy optimization and value estimation.

[0209] The gradient of the policy network can be expressed as:

[0210] ;

[0211] This formula represents the use of advantage function to guide the optimization of strategy. is the gradient operator, Indicates that in a given strategy Next, through the state distribution Sampling status , and then according to the strategy Sampling Action Expectations afterwards. represents the gradient of the log-likelihood, which is in the state About strategy parameters Combined with expert demonstration, importance sampling is required , used to improve the target strategy based on expert trajectories . Therefore, the policy gradient of the off-policy actor-critic algorithm using the expert strategy is:

[0212] ;

[0213] in, is the conversion factor.

[0214] This formula is the gradient estimation formula used to adjust the policy parameters , optimization requires the strategy Benefits and the advantage difference of expert strategy returns.

[0215] At the beginning, strategy It is randomly initialized. In order to make the algorithm agent obtain a better estimated policy gradient, it is necessary to add an expert strategy , expressed as: ,in is a constant representing the weight parameter.

[0216] S3. Control the migration of the digital twin between the edge vehicle roadside units according to the digital twin migration strategy.

[0217] The present invention proposes a digital twin migration algorithm and an adaptive agent update algorithm, which are applied to the network of digital twin-assisted vehicle edge computing. In order to verify that the adaptive digital twin migration algorithm proposed in the present invention can help the communication between autonomous driving vehicles and other vehicles and roadside units to be more reliable and efficient, the present invention uses a real urban traffic movement data set to simulate the actual traffic network conditions of high-speed vehicle movement and large-scale communication.

[0218] In order to better compare the algorithm effects, the present invention selects the NM (Nelder-Mead, simplex) algorithm and the RR (Round-Robin, cyclic migration) algorithm which do not adopt the delayed magic core proposed by the present invention as references. The ring migration algorithm RR is a load balancing algorithm, which migrates the digital twin to each node in turn. When the physical object moves, the algorithm NM does not migrate the digital twin, and the digital twin is always maintained on the initialized roadside unit.

[0219] In addition, a baseline algorithm that takes delay into consideration based on the delay model proposed in the present invention is also used as a reference, including: Greedy, a greedy algorithm that comprehensively considers the total cost of digital twin migration, will select the roadside unit with the smallest total delay of communication delay, resource competition delay and migration delay during the digital twin migration process for migration. Genetic algorithm GA (Genetic Algorithm) is a heuristic algorithm that selects migration nodes by optimizing the comprehensive migration cost during the digital twin migration process. Algorithm DRL (deep reinforcement learning) is a reinforcement learning algorithm based on traditional actor-critic. Algorithm DRL-PT (deep reinforcement learning-PT) is a DRL algorithm combined with expert demonstration for pre-training to initialize the reinforcement learning agent.

[0220] The present invention compares and verifies the migration strategies obtained by the above algorithms to verify the effect of the algorithm proposed by the present invention (called ADM algorithm) compared with the existing baseline algorithm.

[0221] Using Python for programming, the edge vehicle roadside units, vehicles, digital twins, schedulers and other classes in the vehicle edge computing and network are simulated. Based on these classes, a simulated edge vehicle network computing environment is implemented. On this basis, the functions required by the learning algorithm such as parameter initialization hot start, state acquisition, action selection, environment update, policy network training, policy gradient calculation, and value function update are realized. The policy network mainly includes vector embedding layer, linear layer, and bootstrap mask layer.

[0222] The vehicle motion data in the experimental data comes from the large-scale urban vehicle movement trajectory generated by real data cleaning. The distribution coordinates of each vehicle roadside unit network are obtained from the real city edge node distribution website through technology. In addition, some of the main parameters of the experiment are set as follows. Each edge vehicle roadside unit is equipped with an edge node, which consists of multiple CPUs, and the frequency is randomly set to 128GHz, 256GHz, and 512GHz (that is, a server with different numbers of 16-core CPUs, each core has a frequency of 2GHz). The coverage range of each edge node can reach a radius of 500 meters. The distance between two digital twins is calculated based on their geographic coordinates by the semi-positive distance.

[0223] Please refer to Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8 , Figure 4 The convergence of different algorithms is shown. Figure 5 The performance of the algorithm in vehicle edge computing and network under different migration coefficients is shown. Figure 6 The performance of the algorithm in vehicle edge computing and network under different numbers of mobile vehicles is shown. Figure 7 The performance of the algorithm in vehicle edge computing and network under different vehicle arrival rates is shown. Figure 8 shows the average digital twin migration frequency, where Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8 The same algorithms use the same notation.

[0224] pass Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8It can be concluded from the result graph that in urban road scenarios with large-scale vehicles and tasks, the method of the present invention can reduce the communication delay and migration delay between the digital twin and the vehicle, and significantly improve the communication and data processing of the vehicle roadside unit in the actual scenario. It can be seen that the application of this method in the fields of intelligent transportation, autonomous driving and smart cities provides important support for improving the real-time performance and reliability of the system.

[0225] Embodiment 2

[0226] See also Fig. 9 Based on the above method, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Fig. 9 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0227] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, the digital twin migration program 40 in the vehicle edge computing network is stored on the memory 20, and the digital twin migration program 40 in the vehicle edge computing network can be executed by the processor 10, thereby realizing the digital twin migration method platform in the vehicle edge computing network in the present application.

[0228] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 20, such as executing programs related to the digital twin migration method in the vehicle edge computing network.

[0229] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0230] In one embodiment, when the processor 10 executes the digital twin migration program 40 in the vehicle edge computing network in the memory 20, the steps of the digital twin migration method in the vehicle edge computing network as described above are implemented.

[0231] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, the digital twin migration program in the vehicle edge computing network is stored on the memory 20, and the digital twin migration program in the vehicle edge computing network can be executed by the processor 10, thereby realizing the digital twin migration method in the vehicle edge computing network in the present application.

[0232] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the digital twin migration method in the vehicle edge computing network.

[0233] Embodiment 3

[0234] This embodiment provides a storage medium, which stores a digital twin migration program in a vehicle edge computing network. When the digital twin migration program in the vehicle edge computing network is executed by a processor, the steps of the digital twin migration method in the vehicle edge computing network as described above are implemented.

[0235] To summarize, the present invention models the digital twin from the perspective of communication relationships, fully considers the three communication relationships among physical vehicles, digital twins, and edge vehicle roadside units in the vehicle edge computing network, and establishes a delay model that reflects the vehicle edge computing network. Through the delay model, the digital twin migration strategy that reduces the delay of the vehicle edge computing network is obtained, thereby effectively reducing the overall migration time of the digital twin.

[0236] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0237] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, an optical disk, etc.

[0238] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A digital twin migration method in a vehicle edge computing network, characterized in that: The digital twin migration method in the vehicle edge computing network includes: Obtain a vehicle edge computing network consisting of multiple physical vehicles, digital twins, and edge vehicle roadside units, and establish a delay model in the vehicle edge computing network based on the vehicle edge computing network; According to the delay model, establishing a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the migration of the digital twin between the edge vehicle roadside units; According to the digital twin migration strategy, controlling the migration of the digital twin between the edge vehicle roadside units; The establishing, according to the delay model, of a digital twin migration strategy for reducing the delay of the vehicle edge computing network by controlling the migration of digital twins between the edge vehicle roadside units specifically includes: generating an initial migration strategy for controlling the migration of digital twins between the edge vehicle roadside units according to the delay model; Iteratively optimizing the initial migration strategy to obtain the digital twin migration strategy; The generating and controlling the initial migration strategy of the digital twin between the edge vehicle roadside units specifically includes: Obtain an expert strategy for reducing the latency of the vehicle edge computing network by controlling the migration of digital twins between the edge vehicle roadside units; extract features of the vehicle edge computing network and the expert strategy to generate an initial migration strategy; The iterative optimization of the initial migration strategy to obtain the digital twin migration strategy is specifically, according to the delay model, using the policy gradient method based on the expert strategy to iteratively optimize the initial migration strategy to obtain the digital twin migration strategy; The loss of the policy gradient method based on the expert strategy for: ; in, The policy network loss for the optimization policy is: ; in, represents the policy parameters, Indicates that in a given strategy Downsampling trajectory expectations, Indicates a given state Select action The logarithm of the probability of is the advantage function, which means that under a given strategy Status Next action Relative strength relative to the strategy’s average performance; The value network loss for the optimization strategy is: ; in, is the immediate reward at time t, is a discount factor used to control the relative importance of future rewards, Is a given strategy Next, status The value of the estimated parameters The specific form used to determine the value estimate; In a given strategy Next, status Estimated value of; The policy gradient of the policy gradient method based on the expert strategy for: ; in, is the weight parameter, is the policy gradient of the policy network: ; in, is the gradient operator, Indicates that in a given strategy Next, through the state distribution Sampling status , and then according to the strategy Sampling Action Expectations after that, represents the gradient of the log-likelihood, which is in the state About strategy parameters The rate of change, is the advantage function, which means that under a given strategy Status Next action Relative strength relative to the strategy’s average performance; is the policy gradient of the expert policy: ; in, is the importance parameter of the expert strategy, is the advantage function, which means that in the expert strategy Status Next action Relative strength compared to the average performance of the strategy.

2. The digital twin migration method in a vehicle edge computing network according to claim 1, characterized in that: The establishing of a delay model in the vehicle edge computing network according to the vehicle edge computing network specifically includes: Establishing a communication delay model of the vehicle edge computing network; Establishing a digital twin overall resource competition delay model for resource competition between the digital twins; Establishing a migration delay model for the digital twin to migrate between the edge vehicle roadside units; Establishing the delay model according to the communication delay model, the digital twin overall resource competition delay model and the migration delay model; Establish physical constraints and digital twin operational constraints for the delay model.

3. The digital twin migration method in a vehicle edge computing network according to claim 2, characterized in that: The establishing of the communication delay model of the vehicle edge computing network specifically includes: Calculate the collaborative communication delay between digital twins : ; Where t represents the time, E represents the set of all edge vehicle roadside units e, and D represents the set of all digital twins d. is a binary function. If the digital twin d runs on the edge vehicle roadside unit e, then is 1, otherwise is 0, Represents the i-th digital twin and the jth digital twin The frequency of interaction between Representing digital twins The i-th edge vehicle roadside unit and digital twins The jth edge vehicle roadside unit Communication delay between Calculating the interactive communication delay between the digital twin and the edge vehicle roadside unit : ; in, , representing digital twins and edge vehicle roadside units The communication frequency, Representing digital twins The edge vehicle roadside unit and edge vehicle roadside units Communication delays; Calculating pairwise communication delays between the digital twin and the physical vehicle : ; Among them, U represents the set of all physical vehicles u, represents the communication frequency between the digital twin d and the physical vehicle u, represents the communication delay between the physical vehicle u and the digital twin d, represents the communication delay between the digital twin d and the physical vehicle u; According to the digital twin collaborative communication delay , the interactive communication delay and the pairwise communication delay Establish the communication delay model: ; in, Represents the communication delay of the vehicle edge computing network.

4. The digital twin migration method in a vehicle edge computing network according to claim 3 is characterized in that: The establishment of the digital twin overall resource competition delay model for resource competition between the digital twins specifically includes: Calculate the workload of each edge vehicle roadside unit e : ; in, Indicates the CPU resources required by the digital twin d; According to the workload of each edge vehicle roadside unit e Calculate the resource competition delay of each digital twin d : ; in, Indicates the remaining CPU resources of the roadside unit; Delay according to resource competition of each digital twin Establish the overall resource competition delay model of the digital twin: ; in, Represents the overall resource contention delay of the digital twin.

5. The digital twin migration method in a vehicle edge computing network according to claim 3, characterized in that: The step of establishing a migration delay model for migrating the digital twin between the edge vehicle roadside units specifically includes: Calculate the transmission delay of each digital twin migration d : ; in, Indicates the data transmission rate. represents the data size of the digital twin d; Calculate the propagation delay of each digital twin migration d : ; in, is a positive coefficient of propagation delay, Refers to the i-th edge vehicle roadside before migration Unit to the jth edge vehicle roadside unit after migration The shortest path; According to the transmission delay and the propagation delay Calculate the migration delay of each digital twin d : ; According to the migration delay of each digital twin d Establish the migration delay model: ; in, Represents the migration delay of the vehicle edge computing network.

6. A terminal, characterized in that: The terminal includes: a memory, a processor, and a digital twin migration program in a vehicle edge computing network stored in the memory and executable on the processor. When the digital twin migration program in the vehicle edge computing network is executed by the processor, the terminal is controlled to implement the steps of the digital twin migration method in a vehicle edge computing network as described in any one of claims 1 to 5.

7. A readable storage medium, characterized in that: The readable storage medium stores a digital twin migration program in a vehicle edge computing network. When the digital twin migration program in the vehicle edge computing network is executed by a processor, the steps of the digital twin migration method in the vehicle edge computing network as described in any one of claims 1 to 5 are implemented.