A lightweight digital twin migration method and system in a vehicle networking scene

By constructing a vehicle-to-everything (V2X) digital twin system and a lightweight migration method, the problem of digital twin synchronization delay caused by limited edge server resources and vehicle mobility was solved, realizing efficient and flexible digital twin migration and improving the reliability and efficiency of urban traffic management.

CN121433819BActive Publication Date: 2026-07-03GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511439391.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-07-03
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

In urban vehicle-to-everything (V2X) systems, the conflict between limited edge server resources and vehicle mobility makes it difficult to build and update digital twins in parallel and in real time. This results in insufficient integration of multi-source heterogeneous data, imperfect cross-domain collaborative management, and increased synchronization latency, which affects the reliability and efficiency of traffic management.

Method used

A lightweight digital twin migration method is adopted to construct a vehicle-to-everything (V2X) digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model. A digital twin migration utility function is defined, and optimization decisions are made using a weighted matching algorithm and a multi-agent proximal optimization algorithm (MAPPO) to achieve stable matching and efficient migration of the digital twin.

Benefits of technology

It reduces the latency of digital twin migration, improves the flexibility and resource utilization of migration, ensures the timely updating and data synchronization of vehicle twins, and enhances the reliability and efficiency of traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121433819B_ABST
    Figure CN121433819B_ABST
Patent Text Reader

Abstract

This invention provides a lightweight digital twin migration method and system for vehicle-to-everything (V2X) scenarios, relating to the field of urban V2X digital twins. The invention first constructs a V2X digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model. Based on the migration model, a digital twin migration utility function is defined. Based on the digital twin migration utility function, the communication model, the synchronization delay model, and the caching model, an optimization problem and its constraints for the V2X digital twin system are established. The optimization problem of the V2X digital twin system is solved to obtain the caching server and the optimal migration strategy. The digital twin is then migrated according to the optimal migration strategy, achieving digital twin migration. This invention utilizes a caching mechanism to effectively address the lag in vehicle twin migration and improve migration flexibility. Simultaneously, the use of Tiny MLP ensures effective feature representation capabilities while adapting to resource-constrained or low-latency scenarios, completing the transformation from environmental observation to action decision-making, and achieving digital twin migration while reducing migration time and energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital twins for urban vehicle-to-everything (V2X) networks, and relates to a lightweight digital twin migration method and system in V2X scenarios. Background Technology

[0002] As the core nervous system of smart cities, the Internet of Vehicles (IoV) provides underlying support for the precise governance and efficient operation of urban transportation systems by realizing the digital interconnection and collaborative interaction of all elements across the "people-vehicle-road-cloud" domain. In the smart city architecture, a distributed sensing network composed of roadside sensing units, intelligent vehicle terminals, and edge computing nodes continuously generates high-spatiotemporal-precision multimodal traffic data streams. This real-time dynamic data, encompassing vehicle operating status, road environment information, and traffic participation behavior, not only provides crucial information for intelligent driving decisions but also deeply empowers traffic scheduling, signal optimization, and municipal management, driving the evolution of urban operations towards intelligence and collaboration. Digital Twin technology, as the core implementation method of IoV in smart cities, focuses on constructing a high-fidelity dynamic mapping of the physical transportation system in virtual space. Relying on urban information model platforms and high-precision geographic information systems, a dynamic twin model is established by integrating real-time vehicle sensor data, roadside equipment data streams, and historical traffic patterns, enabling synchronous mapping of traffic system state changes with millisecond-level response speeds. This technology not only utilizes 3D rendering and visualization interfaces to achieve a global presentation of traffic operation status, but more importantly, it constructs a data-driven intelligent decision-making mechanism, enabling traffic management centers to optimize signals, respond to events, and coordinate scheduling through virtual models. It should be noted that in the actual deployment of urban vehicle-to-everything (V2X) networks, the deployment of edge digital twins of vehicles still faces significant challenges: First, there is an inherent contradiction between the limited resources of edge servers and the mobility of vehicles. The limited computing and storage resources of edge servers make it difficult to support the parallel construction and real-time updates of large-scale vehicle digital twins, especially in densely trafficked areas where resource congestion is likely to occur. Second, the high-speed movement of vehicles exacerbates the synchronization delay between the digital twin and the physical entity. As vehicles continuously change geographical locations, their digital twins need to frequently switch between different edge servers, and the resulting communication overhead and state synchronization delay reduce the timeliness and accuracy of the twin data. Third, there is insufficient fusion of multi-source heterogeneous data and cross-domain collaboration. Existing systems often struggle to achieve seamless integration when processing data from sensing devices from different vendors due to inconsistent standards, and the collaborative management mechanism across edge nodes is still imperfect, restricting the reliability of large-scale vehicle-road cooperative applications.

[0003] To address the aforementioned issues, digital twin migration strategies are considered a key approach to overcoming existing bottlenecks. Digital twin migration refers to the process of migrating a digital twin model and its related data and services from one environment to another. In the field of urban connected vehicles, vehicle digital twin models built based on existing conditions are migrated and adapted, utilizing big data analytics and machine learning algorithms to provide vehicles with more timely services. In the construction of the intelligent management and control platform for underground roads in Qianhai, Shenzhen, dynamic twin migration technology has enabled precise control of the underground transportation system. When vehicles move at high speeds in the underground road network, the system seamlessly migrates the vehicle's digital twin between edge computing nodes in different areas based on real-time positioning data. This migration mechanism not only solves the problem of fusion of multi-source heterogeneous data in the underground environment but also reduces the computational load on edge servers through incremental update strategies, achieving centimeter-level accuracy in accident response positioning and shortening emergency response time by nearly 40%. At the technological research level, the EU's inter-agency digital twin project on transportation has achieved collaborative migration of twin models from multiple research institutions through standardized interfaces (such as RynnRCP). Its latest patent proposes a migration decision framework based on multi-objective optimization. By establishing a comprehensive evaluation model of communication latency, resource contention, and migration overhead, and employing a policy gradient algorithm to dynamically optimize migration timing, experimental data shows that this method can reduce the synchronization latency between the twin and the physical vehicle to less than 20 milliseconds. These practices demonstrate that digital twin migration is transforming from a technological concept into a core supporting capability for intelligent urban transportation.

[0004] Digital twin migration has stringent latency requirements, especially for migrating twins of vehicles operating in urban areas. Therefore, reducing migration latency is an indispensable focus of digital twin migration strategies. Introducing a caching mechanism into the digital twin migration scenario allows the digital twin to be pre-cached on edge servers, reducing migration time. In urban vehicle-to-everything (V2X) networks, the caching decision problem is established as a matching problem, and by setting appropriate weights, a stable matching relationship between the vehicle, the twin, and the edge server can be achieved. This digital twin migration strategy, which utilizes a caching mechanism and a matching algorithm, achieves high cache utilization and improves migration flexibility.

[0005] Besides achieving low-latency digital twin transfer, the impact of limited resources and environmental dynamism on dynamic transfer must also be considered. Reinforcement learning, a machine learning method, learns optimal behavioral policies through agent-environment interaction. In the field of urban vehicle-to-everything (V2X) communication, different vehicles often need to interact not only with the environment but also with other vehicles to improve the driving experience. Therefore, the mutual influence between agents needs further consideration. Multi-Agent Proximal Policy Optimization (MAPPO), a type of multi-agent reinforcement learning algorithm, uses a centralized training method. It treats all agents as a whole, constructing and training a holistic policy with joint observations as input and joint actions as output, effectively addressing the non-stationary nature of the environment. Furthermore, lightweight neural network models significantly reduce the number of parameters and computational complexity while maintaining performance, making them more suitable for resource-constrained or low-latency scenarios. Therefore, lightweight neural network models can improve the efficiency and quality of vehicle twin transfer while meeting computational resource and capacity constraints. Summary of the Invention

[0006] To overcome the problems of time lag and resource constraints in digital twin migration, this invention provides a lightweight digital twin migration method and system for vehicle-to-everything (V2X) scenarios.

[0007] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0008] This invention provides a lightweight digital twin migration method for vehicle-to-everything (V2X) scenarios, comprising:

[0009] Construct a digital twin system for the Internet of Vehicles, including a communication model, a synchronization delay model, a caching model, and a migration model;

[0010] Based on the aforementioned migration model, a digital twin migration utility function is defined;

[0011] Based on the aforementioned digital twin migration utility function, communication model, synchronization delay model, and caching model, an optimization problem and its constraints for a vehicle-to-everything (V2X) digital twin system are established.

[0012] The optimization problem and its constraints of the networked digital twin system are decoupled into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints.

[0013] The weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy.

[0014] The final target server is selected based on the optimal migration decision; when the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle.

[0015] When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0016] Preferably, a vehicle-to-everything (V2X) digital twin system is constructed, including a communication model, a synchronization delay model, a caching model, and a migration model, comprising:

[0017] The communication model is used to calculate the communication rate between the vehicle and the current server, including:

[0018] Get vehicle location and current server location Calculate the Euclidean distance between the vehicle and the current server:

[0019]

[0020] Where t is the time slot;

[0021] Based on the Euclidean distance between the vehicle and the current server, construct a channel model for the vehicle and the current server:

[0022]

[0023] in, This is the path fading coefficient, and its value range is... , Rayleigh fading coefficient;

[0024] Based on the channel model, calculate the uplink communication power from the vehicle to the current server and the downlink communication power from the current server to the vehicle:

[0025]

[0026] in, This represents the uplink power from the vehicle to the current server. For vehicles To the current server The transmission power, For environmental noise, Channel bandwidth;

[0027]

[0028] in, This represents the current downlink power from the server to the vehicle. This represents the current transmission power from the server to the vehicle. For environmental noise, Channel bandwidth;

[0029] The synchronization delay model is used to calculate the synchronization delay of the digital twin, including:

[0030] Obtain the size of the synchronized data uploaded by the vehicle, and calculate the upload communication latency from the vehicle to the first server:

[0031]

[0032] in, The size of the synchronized data uploaded by the vehicle;

[0033] Obtain the current server's computing capacity to obtain the computing capacity allocated to a single digital twin:

[0034]

[0035] in, This represents the current computing capacity of the server. Binary associative variables;

[0036] Obtain the number of CPU cycles required to update the digital twin, and calculate the computation latency for updating the vehicle's digital twin based on the computing capacity allocated to the individual digital twin:

[0037]

[0038] in, The number of CPU cycles required to update the digital twin;

[0039] Obtain the amount of computation feedback data from the current server, and calculate the downlink communication latency from the current server to the vehicle:

[0040]

[0041] in, The amount of data representing the computational feedback results from the current server;

[0042] Calculate the synchronization delay of the digital twin based on the upload communication delay, computation delay, and downlink communication delay:

[0043]

[0044] in, The upload communication latency from the vehicle to the current server. To update the computational latency of the vehicle's digital twin, This represents the current downlink communication latency from the server to the vehicle.

[0045] The caching model is used to calculate the sum of wired transmission energy consumption and the size of the digital twin received by the server, including:

[0046] Obtain the server cache space occupied by the digital twin, the server cache space, the server's wired transmission energy consumption, and the time required to transmit a unit of data per unit distance, and calculate the wired transmission energy consumption:

[0047]

[0048] in, For wired transmission power consumption, The size of the server cache space occupied by the digital twin. For binary associative variables, This represents the transmission distance between the current server and the target server.

[0049] Based on the size of the server's cache space occupied by the digital twin The total size of the digital twin copies received by the server is calculated, including:

[0050]

[0051] in, The amount of cache space occupied by the digital twin on the server;

[0052] The migration model is used to calculate migration latency and migration energy loss, including:

[0053] Based on the current server location, the target server location, the time required to transmit a unit of data per unit distance, and the average wired transmission power of the servers, calculate the migration energy loss, including:

[0054] Compute the migration latency of the vehicle digital twin between the current server and the target server:

[0055]

[0056] in, For migration delay;

[0057] Calculate the migration energy loss based on the migration latency and the server's average wired transmission power:

[0058]

[0059] in, This is to mitigate energy loss during migration.

[0060] Preferably, based on the migration model, a digital twin migration utility function is defined, including:

[0061] The digital twin transfer utility function is expressed as follows:

[0062]

[0063] in, The preset maximum migration delay, For migration delay, For migration loss weighting coefficients, This is to mitigate energy loss during migration.

[0064] Preferably, based on the digital twin transfer utility function, communication model, synchronization delay model, and caching model, an optimization problem and its constraints for the vehicle-to-everything (V2X) digital twin system are established, including:

[0065] The optimization problem of the vehicle-to-everything (V2X) digital twin system is expressed as follows:

[0066]

[0067] in, For digital twin transfer utility function, Energy consumption coefficient This is a coefficient for cache space size;

[0068] The constraints of the optimization problem of the vehicle-to-everything (V2X) digital twin system are expressed as follows:

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075]

[0076]

[0077]

[0078] Among them, constraint C1 states that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; constraint C2 states that the computing requirements of the digital twin cannot exceed the maximum computing resources of the edge server; constraint C3 states that the space occupied by the digital twin in the edge server cannot exceed the maximum capacity provided by the edge server; constraint C4 states that the synchronization latency during the migration process cannot exceed the maximum threshold; constraint C5 states that an edge server can only receive one copy of the digital twin in the same time slot; constraint C6 states that the number of digital twin copies received in the same time slot cannot exceed the maximum cache space provided by the edge server; constraint C7 states the binary value range of the migration decision variable; constraint C8 states the binary value range of the cache decision variable; and constraint C9 states the binary range of the digital twin cache variable.

[0079] Preferably, the optimization problem and its constraints of the networked digital twin system are decoupled into a digital twin caching decision problem and its constraints.

[0080] The digital twin caching decision problem is expressed as:

[0081]

[0082] in, Energy consumption coefficient This is a coefficient for cache space size;

[0083] The constraints of the digital twin caching decision problem are expressed as follows:

[0084]

[0085]

[0086]

[0087]

[0088] Among them, constraint C5 means that an edge server can only receive one digital twin copy in the same time slot; constraint C6 means that the number of digital twin copies received in the same time slot shall not exceed the maximum cache space provided by the edge server; constraint C7 means the binary value range of the migration decision variable; constraint C8 means the binary value range of the cache decision variable; and constraint C9 means the binary range of the digital twin cache variable.

[0089] Preferably, the optimization problem and its constraints of the networked digital twin system are decoupled into a digital twin migration decision problem and its constraints, including:

[0090] The digital twin migration decision problem is expressed as:

[0091]

[0092] in, For transfer utility function;

[0093] The constraints of the digital twin migration decision problem are expressed as follows:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099] Among them, constraint C1 means that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; constraint C2 means that the computing requirements of the digital twin cannot exceed the maximum computing resources of the edge server; constraint C3 means that the space capacity occupied by the digital twin in the edge server cannot exceed the maximum capacity provided by the edge server; constraint C4 means that the synchronization latency during the migration process cannot exceed the maximum threshold; and constraint C7 means the binary value range of the migration decision variables.

[0100] Preferably, a weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy, including:

[0101] The weights of the servers are calculated using a weighted matching algorithm.

[0102] The server with the highest weight coefficient score and that meets the resource constraints will be selected as the cache target server.

[0103] Preferably, the MAPPO algorithm based on Tiny MLP is used to solve the digital twin transfer decision problem and its constraints to obtain the optimal transfer decision, including:

[0104] The transfer process is modeled as a Dec-POMDP, which includes a set of agents, a state space, an observation space, an action space, transition probabilities, a reward function, and a discount factor.

[0105] The Dec-POMDP is parsed using the Tiny MLP-based MAPPO algorithm, where the MAPPO algorithm uses a centralized value network Critic to estimate the global state value and a shared policy network Actor to calculate the action probability.

[0106] Set the probability of actions that cause edge server resource overload to 0;

[0107] Train and update the Critic and Actor until convergence, and obtain the optimal transfer strategy.

[0108] Preferably, selecting the final target server based on the optimal migration decision includes:

[0109] The optimal migration decision integrates synchronization latency, the maximum capacity of the edge server, and the maximum computing resources of the edge server to calculate the weight of the edge server.

[0110] The server with the highest weighting coefficient score and that meets the resource constraints will be the final target server for migration.

[0111] This invention also provides a lightweight digital twin migration system for vehicle-to-everything (V2X) scenarios, comprising:

[0112] The system construction module is used to build a vehicle-to-everything (V2X) digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model.

[0113] A migration utility function construction module is used to set the digital twin migration utility function based on the migration model;

[0114] The system optimization problem construction module is used to establish the optimization problem and its constraints of the vehicle-to-everything (V2X) digital twin system based on the digital twin migration utility function, communication model, synchronization delay model, and caching model.

[0115] The decoupling module is used to decouple the optimization problem and its constraints of the networked digital twin system into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints.

[0116] The cache decision problem solving module is used to solve the digital twin cache decision problem and its constraints using a weighted matching algorithm to determine the cache target server for the cache copy;

[0117] The migration decision problem solving module is used to solve the digital twin migration decision problem and its constraints using the Tiny MLP-based MAPPO algorithm to obtain the optimal migration decision.

[0118] The digital twin migration module is used to select the final target server based on the optimal migration decision. When the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0119] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0120] This invention first constructs a vehicle-to-everything (V2X) digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model. Based on the migration model, a digital twin migration utility function is defined. Based on the digital twin migration utility function, the communication model, the synchronization delay model, and the caching model, an optimization problem and its constraints for the V2X digital twin system are established. The optimization problem and its constraints for the V2X digital twin system are decoupled into a digital twin caching decision problem and its constraints, and a digital twin migration decision problem and its constraints. A weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the caching target server for the cached copy. The final target server is selected based on the optimal migration decision. When the final target server is the caching target server, a digital twin is generated on the final target server based on the cached copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not the caching target server, the final target server receives the digital twin from the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0121] The caching mechanism of this invention can effectively solve the lag in vehicle twin migration and improve the flexibility of migration. At the same time, the use of Tiny MLP takes into account the premise of ensuring effective feature representation capabilities, adapts to resource-constrained or low-latency scenarios, completes the transformation from environmental observation to action decision basis, and realizes digital twin migration while reducing migration time and energy consumption. Attached Figure Description

[0122] Figure 1 This is a flowchart illustrating a lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario, as shown in Example 1.

[0123] Figure 2 This is a schematic diagram of a vehicle twin migration scenario based on a caching mechanism in Example 2;

[0124] Figure 3 This is a schematic diagram of the MAPPO digital twin transfer decision algorithm based on Tiny MLP in Example 2;

[0125] Figure 4 This is a schematic diagram of an Actor network based on Tiny MLP in Example 3;

[0126] Figure 5 This is a schematic diagram of the structure of a lightweight digital twin migration system in a vehicle-to-everything (V2X) scenario, as shown in Example 3. Detailed Implementation

[0127] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.

[0128] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;

[0129] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

[0130] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0131] Example 1

[0132] This embodiment provides a lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario, such as... Figure 1 As shown, it includes:

[0133] Construct a digital twin system for the Internet of Vehicles, including a communication model, a synchronization delay model, a caching model, and a migration model;

[0134] Based on the aforementioned migration model, a digital twin migration utility function is defined;

[0135] Based on the aforementioned digital twin migration utility function, communication model, synchronization delay model, and caching model, an optimization problem and its constraints for a vehicle-to-everything (V2X) digital twin system are established.

[0136] The optimization problem and its constraints of the networked digital twin system are decoupled into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints.

[0137] The weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy.

[0138] The final target server is selected based on the optimal migration decision; when the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle.

[0139] When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0140] In the specific implementation process, a vehicle-to-everything (V2X) digital twin system is first constructed, including a communication model, a synchronization delay model, a caching model, and a migration model. Then, based on the migration model, a digital twin migration utility function is defined. Next, based on the digital twin migration utility function, the communication model, the synchronization delay model, and the caching model, an optimization problem and its constraints for the V2X digital twin system are established. The optimization problem and its constraints are decoupled into a digital twin caching decision problem and its constraints, and a digital twin migration decision problem and its constraints. A weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy. Finally, the final target server is selected based on the optimal migration decision. When the final target server is a caching target server, a digital twin is generated on the final target server based on the cached copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not a caching target server, the final target server receives the digital twin from the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0141] The caching mechanism of this invention can effectively solve the lag in vehicle twin migration and improve the flexibility of migration. At the same time, the use of Tiny MLP takes into account the premise of ensuring effective feature representation capabilities, adapts to resource-constrained or low-latency scenarios, completes the transformation from environmental observation to action decision basis, and realizes digital twin migration while reducing migration time and energy consumption.

[0142] Example 2

[0143] This embodiment provides a lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario, including:

[0144] Construct a digital twin system for the Internet of Vehicles, including a communication model, a synchronization delay model, a caching model, and a migration model;

[0145] It should be noted that, in this embodiment, the communication model is used to calculate the communication rate between the vehicle and the current server, including:

[0146] In each time slot t, the vehicle uploads its operational data to the edge server. (This involves obtaining the vehicle's location.) and current server location Calculate the Euclidean distance between the vehicle and the current server:

[0147]

[0148] Where t is the time slot;

[0149] Considering that buildings and other obstacles in urban environments can cause severe Rayleigh fading, a Rayleigh fading channel model is adopted. Based on the Euclidean distance between the vehicle and the current server, a channel model for the vehicle and the current server is constructed:

[0150]

[0151] in, This is the path fading coefficient, and its value range is... , Let be the Rayleigh fading coefficient, whose value follows a Gaussian distribution. ;

[0152] Based on the channel model, calculate the uplink communication power from the vehicle to the current server and the downlink communication power from the current server to the vehicle:

[0153]

[0154] in, This represents the uplink power from the vehicle to the current server. For vehicles To the current server The transmission power, For environmental noise, Channel bandwidth;

[0155]

[0156] in, This represents the current downlink power from the server to the vehicle. This represents the current transmission power from the server to the vehicle. For environmental noise, Channel bandwidth;

[0157] The synchronization delay model is used to calculate the synchronization delay of the digital twin, including:

[0158] Digital twin synchronization includes three steps: uploading synchronization data, updating the digital twin, and providing feedback on the results of computational tasks. The process involves obtaining the size of the synchronization data uploaded by the vehicle and calculating the upload communication latency from the vehicle to the first server.

[0159]

[0160] in, The size of the synchronized data uploaded by the vehicle;

[0161] After collecting operational data, the edge server updates the state of the digital twin to ensure consistency between the digital twin and the vehicle's operational status. The edge server allocates computing resources to each digital twin it maintains using an average distribution method, obtains the current server's computing capacity, and calculates the allocated computing capacity for a single digital twin in time slot t.

[0162]

[0163] in, This represents the current computing capacity of the server. This is a binary association variable representing the deployment relationship between the vehicle digital twin and the edge server.

[0164] Define vehicle Digital twins for If t-slot digital twin Deployed on edge servers Above, then ,otherwise .therefore This indicates that time slot t is deployed on the edge server. The number of digital twins on the time slot. Therefore, the digital twin is updated in time slot t. The computational latency consumed is defined as:

[0165]

[0166] in, The number of CPU cycles required to update the digital twin for time slot t. The update computation of the digital twin not only includes updating the mapping of physical entities, but sometimes also requires performing additional computational tasks based on the needs of vehicle operation, such as image recognition and path prediction. Define the amount of computational feedback data from the edge server. Therefore, edge servers Feedback results to the vehicle The downlink communication latency is defined as:

[0167]

[0168] Therefore, digital twin The synchronization delay in time slot t is calculated by the following formula:

[0169]

[0170] in, The upload communication latency from the vehicle to the current server. To update the computational latency of the vehicle's digital twin, This represents the downlink communication latency from the server to the vehicle.

[0171] Migrating a digital twin is time-consuming, adding complexity to migration decisions. First, there's a transmission time between initiating the migration action and its completion, indicating a lag in migration decisions. During this transmission time, the vehicle must endure the continuously increasing synchronization latency of the digital twin. Furthermore, migration decisions are based on the current state of the edge and terminal layers, which may change in the next instant. If a new migration action is performed before the previous one is complete, the time resources consumed by the old migration and the resulting migration losses become unnecessary waste. To mitigate the lag in digital twin migration as much as possible, a digital twin caching mechanism is introduced.

[0172] Each edge server is allocated a cache space V. Assume that in time slot t, the edge server... Digital twins need to be cached The digital twin is deployed on an edge server. The time required to cache this digital twin is calculated using the following formula:

[0173]

[0174] After caching is complete, the edge server You will have a digital twin A copy, denoted as Furthermore, as long as the edge server caches or deploys a digital twin... Then, this edge server can transmit digital twins to other edge servers. A copy of the digital twin is sent. When sending the copy, the edge server first loads the digital twin back into ROM space, so the transmission process will not be interrupted if the edge server stops maintaining the digital twin. After receiving the copy, the digital twin copy is loaded into the cache space in RAM so that vehicles can quickly switch to the cached digital twin copy. If a time slot needs to be changed due to environmental changes, the digital twin will be sent to the cached copy. Migrate to edge server Up, then edge servers You can directly use cached digital twin copies. This eliminates the need to retransmit the digital twin. At this point, the edge server... Digital twins The cache is effective, making the migration latency of the digital twin zero, meaning the migration decision is not lagging. However, if the cached copy on the server... If a cache is never used, it is invalid and cannot reduce migration latency.

[0175] The caching of digital twins is also limited by edge server resources, particularly wired transmission power consumption and cache space. Therefore, the wired transmission power consumption of the edge server in time slot t is defined as:

[0176]

[0177] in, For wired transmission power consumption, The size of the server cache space occupied by the digital twin. For binary associative variables, when When, it indicates an edge server. To edge servers Provide cached digital twin It requires occupying an edge server. The cache size is , This represents the transmission distance between the current server and the target server.

[0178] The storage space for digital twins on edge servers is also limited. Properly caching digital twins can reduce energy consumption and improve efficiency. This is based on the amount of cache space occupied by the digital twins on the server. The total size of the digital twin copies received by the server is calculated, including:

[0179]

[0180] in, The size of the server cache space occupied by the digital twin. It is a binary associative variable, when At that time, it indicates a digital twin. Cache on edge server superior.

[0181] Migrating a digital twin across different edge servers is subject to several limitations. Firstly, migrating a digital twin from one edge server to another is time-consuming. Assuming that in time slot t, due to environmental changes, the digital twin... Need to be from the edge server To edge servers migrate.

[0182] The migration model is used to calculate migration latency and migration energy loss, including:

[0183] Based on the current server location, the target server location, the time required to transmit a unit of data per unit distance, and the average wired transmission power of the servers, calculate the migration energy loss, including:

[0184] Compute the migration latency of the vehicle digital twin between the current server and the target server:

[0185]

[0186] in, For migration delay, The time required to transmit a unit of data per unit distance. Represents edge server and edge servers The Euclidean distance between them, therefore Digital twin From edge server Migrate to edge server The distance. Among them, when and This indicates that digital twins Located at the edge server in time slot t-1 Meanwhile, in time slot t, the edge server is located. Digital twin Need to be from the edge server Migrate to edge server In particular, when At that time, digital twins No migration occurred, so the migration latency is 0 at this point.

[0187] Furthermore, transmitting digital twins between edge servers consumes energy, and energy loss during migration needs to be considered. Here, we assume that all edge servers have similar hardware parameters, so their wired data transmission power is nearly equal; we define the average wired transmission power of the edge servers as... Based on the migration latency and the server's average wired transmission power, calculate the migration energy loss:

[0188]

[0189] in, This is to mitigate energy loss during migration.

[0190] Digital twins are highly sensitive to latency, and latency fluctuations affect their performance. The main purpose of digital twin migration is to reduce synchronization latency and improve service stability. However, frequent migrations can accumulate migration losses, leading to a decline in the service quality of the digital twin. Therefore, migration decisions need to minimize migration losses and reduce unnecessary migrations. Based on the migration model described above, a digital twin migration utility function is defined.

[0191] It should be noted that, in this embodiment, the digital twin transfer utility function is expressed as follows:

[0192]

[0193] in, The preset maximum migration delay, For migration delay, The migration loss weighting coefficient represents the importance of migration loss for digital twins. This is to mitigate energy loss during migration.

[0194] Based on the aforementioned digital twin migration utility function, communication model, synchronization delay model, and caching model, an optimization problem and its constraints for a vehicle-to-everything (V2X) digital twin system are established.

[0195] In addition, optimizing transmission energy consumption and storage space during the caching process of digital twins can also improve the efficiency of digital twin migration.

[0196] It should be noted that, in this embodiment, the optimization problem of the vehicle-to-everything (V2X) digital twin system is expressed as follows:

[0197]

[0198] in, For digital twin transfer utility function, Energy consumption coefficient This is a coefficient for cache space size;

[0199] The constraints of the optimization problem of the vehicle-to-everything (V2X) digital twin system are expressed as follows:

[0200]

[0201]

[0202]

[0203]

[0204]

[0205]

[0206]

[0207]

[0208]

[0209] Among them, constraint C1 states that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; constraint C2 states that the computing requirements of the digital twin cannot exceed the maximum computing resources of the edge server; constraint C3 states that the space occupied by the digital twin in the edge server cannot exceed the maximum capacity provided by the edge server; constraint C4 states that the synchronization latency during the migration process cannot exceed the maximum threshold; constraint C5 states that an edge server can only receive one copy of the digital twin in the same time slot; constraint C6 states that the number of digital twin copies received in the same time slot cannot exceed the maximum cache space provided by the edge server; constraint C7 states the binary value range of the migration decision variable; constraint C8 states the binary value range of the cache decision variable; and constraint C9 states the binary range of the digital twin cache variable.

[0210] The vehicle twin migration process based on a caching mechanism mainly consists of two parts: a caching decision problem for the digital twin, completed at time t-1, and a migration decision problem, completed at time t. First, the caching decision problem needs to be solved, i.e., which edge server the digital twin should cache its copy on. Since the caching and migration decisions are not made at the same time, they can be decoupled in solving the optimization problem.

[0211] The optimization problem and its constraints of the networked digital twin system are decoupled into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints.

[0212] It should be noted that, in this embodiment, the digital twin caching decision problem is expressed as:

[0213]

[0214] in, Energy consumption coefficient This is a coefficient for cache space size;

[0215] The constraints of the digital twin caching decision problem are expressed as follows:

[0216]

[0217]

[0218]

[0219]

[0220] Among them, constraint C5 means that an edge server can only receive one digital twin copy in the same time slot; constraint C6 means that the number of digital twin copies received in the same time slot shall not exceed the maximum cache space provided by the edge server; constraint C7 means the binary value range of the migration decision variable; constraint C8 means the binary value range of the cache decision variable; and constraint C9 means the binary range of the digital twin cache variable.

[0221] The digital twin migration decision problem is expressed as:

[0222]

[0223] in, For transfer utility function;

[0224] The constraints of the digital twin migration decision problem are expressed as follows:

[0225]

[0226]

[0227]

[0228]

[0229]

[0230] Among them, constraint C1 means that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; constraint C2 means that the computing requirements of the digital twin cannot exceed the maximum computing resources of the edge server; constraint C3 means that the space capacity occupied by the digital twin in the edge server cannot exceed the maximum capacity provided by the edge server; constraint C4 means that the synchronization latency during the migration process cannot exceed the maximum threshold; and constraint C7 means the binary value range of the migration decision variables.

[0231] The weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy.

[0232] It should be noted that in this embodiment, the weight of the server is calculated using a weight matching algorithm;

[0233] The caching process of a digital twin can be viewed as a twin. With edge servers The matching relationship is used to obtain twins. With edge servers Correlation variables at time t-1 Therefore, it is necessary to consider the twins. With edge servers A many-to-many sequential matching process is required between them, and the specific sequential matching process is described below.

[0234] Considering the wide coverage of edge servers with base stations, and that each migration of the vehicle twin is generally completed between adjacent edge servers, the caching decision for each moment of the digital twin is to cache a copy of the digital twin on an adjacent edge server. Furthermore, the Euclidean distance between the vehicle and the edge server has a negative correlation with wireless communication; therefore, considering the vehicle... With all edge servers Distance between Using this as one of the matching weights is reasonable. Considering that caching decisions affect the migration decision at the next time slot t, and that effective caching can greatly improve the migration utility of the digital twin, estimating the distance between the vehicle and the edge server at time t can improve caching effectiveness. In real life, most vehicles travel at relatively constant speeds on the road, so we can assume that the vehicle speed remains constant over several consecutive time slots, meaning that the distance traveled in adjacent time slots is equal. Therefore, using vehicles... At times t-2 and t-1 respectively, with the edge server To estimate the distance of the vehicle Near or far from the edge server To determine the vehicle Corresponding twin Should the cache be sent to an edge server? The final distance matching weights are:

[0235]

[0236] The weights are composed of the distance between the vehicle and the edge server at time t-1 and the difference between the distances between the vehicle and the edge server at times t-1 and t-2. The first term represents the distance between the vehicle and the edge server, and the second term represents their proximity. In addition to considering distance matching weights, transmission energy consumption matching weights during the caching process also need to be considered. Specifically, based on the formula for edge server transmission energy consumption defined above, caching a single digital twin... The formula for calculating the matching weight of wired transmission energy consumption and buffer space is as follows:

[0237]

[0238] The matching weight obtained by combining the distance matching weight and the energy consumption cache matching weight is:

[0239]

[0240] Sort by weight. Vehicles It calculates the weight coefficients of all edge servers, and the corresponding digital twins. The edge servers are sorted according to the calculated weight coefficients, and the edge servers with the highest weights are selected. As an edge server performing digital twin caching, the caching decision-related variables at this time... In addition Represents digital twins It has been cached on the edge server at time t. Above. It should be noted that when the selected edge server is the original server, i.e. That is to prove digital twins No caching is needed at this time. .

[0241] Cache capacity limitations. Considering the limited capacity and computing resources of edge servers, if the space for the cached digital twin replicas on the edge server is already close to its maximum capacity, then… At this time, the digital twin If this edge server cannot be selected as the cache object, the next edge server should be matched according to the weight sorting and cache operation should be performed.

[0242] Digital twin sequential cache matching. Each cache matching operation is performed on a single digital twin, requiring proper sorting of the digital twins. Considering the synchronization quality of twin migration, twins with larger data volumes typically require more time and energy to migrate. Therefore, pre-caching twins with larger data volumes can significantly improve the synchronization quality of twin migration. Thus, twins with larger data volumes are prioritized for cache edge server matching. Based on the above description of cache matching, Algorithm 1 provides the pseudocode for the digital twin cache matching algorithm.

[0243] Algorithm 1: Pseudocode for Digital Twin Cache Matching Algorithm

[0244] enter:

[0245] Digital twin data of vehicles

[0246] Distance between vehicle and edge server

[0247] Distance between edge servers

[0248] Output:

[0249] Caching decision-related variables

[0250] Algorithm main body:

[0251] 1: The digital twin is sorted from largest to smallest based on the amount of data to obtain the order.

[0252] 2: fort-1 =2, 3, 4, ..., T-1do:

[0253] 3:

[0254] 4: for do:

[0255] 5: Calculate the matching weight G, and obtain the edge servers in descending order of weight.

[0256] 6: for do:

[0257] 7:if Corresponding edge server Cache capacity

[0258] 8: continue;

[0259] 9: else if edge server Not a source edge server

[0260] 10: ;

[0261] 11: ;

[0262] 12: Calculation ,Record ;

[0263] 13: else

[0264] 14: ;

[0265] 15:endfor

[0266] 16:endfor

[0267] 17: endfor

[0268] The server with the highest weight coefficient score and that meets the resource constraints will be selected as the cache target server.

[0269] The MAPPO algorithm based on Tiny MLP is used to solve the digital twin migration decision problem and its constraints, and the optimal migration decision is obtained.

[0270] For the migration decision optimization problem, the migration process is modeled as Dec-POMDP, and MAPPO is introduced for solution. The MAPPO algorithm is an extension of the PPO algorithm in multi-agent scenarios. Its core idea is to use a centralized value network to learn the value function of the global state, while each agent uses an independent policy network. During training, all agents evaluate the quality of their actions through the global state value provided by the central value network, achieving collaborative optimization among agents and reducing the non-stationarity present in multi-agent scenarios.

[0271] It should be noted that in this embodiment, in the migration scenario, each digital twin is a migration decision-maker, and their decisions influence each other. Considering that digital twins need to coordinate their migration actions and cooperate to maximize the optimization objective, the migration decision problem is modeled as a Dec-POMDP with shared rewards. The Dec-POMDP consists of tuples... Definition. V represents the set of intelligent agents, and we intend to use digital twins as intelligent agents, with agent v representing the digital twin. In time slot t, Represents the global state of the environment. Indicates the global state of agent v. Local observation below, This represents the local action taken by agent v. The local actions of all agents together form the joint action. , After execution, the environment is determined by the transition probability. The process transitions to the next state, and all agents receive the same reward. . , where is the discount factor. The Dec-POMDP modeling of the migration decision optimization problem is described in detail below.

[0272] ①State and Observation: Digital Twin The observation consists of three parts. The first part is the state of vehicle v, including the amount of data uploaded by the vehicle. , computational requirements for synchronization And the data fed back to the vehicle from the edge server The second part is the observation of all edge servers, defined as... ,in For edge servers The observation, . It is an edge server Cached digital twin related variables, and Edge servers The computational resource utilization ratio and capacity space utilization ratio are calculated as follows:

[0273]

[0274] The third part is the state information between vehicle v and each edge server, defined as follows: ,in It is vehicle v and edge server The state information between them includes Euclidean distance, communication upload delay, communication download delay, and migration time. Digital twin The observation in time slot t is represented as follows:

[0275]

[0276] The global state is defined as the aggregation of all digital twin observations, expressed as:

[0277] .

[0278] ② Action: In each time slot, the digital twin needs to select which edge server to migrate to based on current local observations (i.e., the digital twin selects the edge server to be deployed in the next time slot). Therefore, the digital twin... The action in time slot t is represented as:

[0279]

[0280] The above actions are represented as digital twins Migrate to edge server in time slot t That is, to deploy in the next time slot superior, In particular, to reduce migration latency and energy consumption, if twins... If a replica has already been cached on another edge server in time slot t, then the twin will be migrated to that edge server first. In this case, the migration latency and energy consumption should be zero. For example, a twin... The replica has been cached on the edge server in time slot t. So, at this point, the digital twin... The action in time slot t is (like ,but ).

[0281] ③ Reward: During vehicle migration, the migration latency and energy consumption of the digital twin are mainly considered. While minimizing the synchronization latency of the digital twin, it is also necessary to ensure that the migration loss is within an acceptable range, preventing the digital twin from migrating too frequently between edge servers. Considering the optimization problem of migration decisions and the possibility of network loss non-convergence during reinforcement learning training, the reward for agent v is set as follows:

[0282]

[0283] Additionally, if the results of the digital twin migration are consistent with the results of the cache, that is, the digital twin... Cached on the edge server at time t At time t, the digital twin This also led to the decision to migrate to edge servers. Above, at this time Edge server You can directly call the cached version. The copy serves as a digital twin after the migration, and the migration energy consumption at this point... Combining the migration decision optimization problem, the cache reward for agent v in this case is represented as:

[0284]

[0285] In addition, if If this results in the constraint not being met, then a penalty needs to be imposed, as shown below:

[0286]

[0287] Therefore, the final reward for agent v is represented as:

[0288]

[0289] That is, the reward space consisting of all intelligent agents is:

[0290]

[0291] The Dec-POMDP is analyzed using the MAPPO algorithm based on Tiny MLP. The MAPPO algorithm employs a centralized training and distributed execution approach. It uses two neural networks: a centralized value network (Critic) to estimate the value of each global state, and a policy network (Actor) shared by all agents to calculate the probability distribution of different actions under different local observations. Critic and Actor are defined as follows: and Their network parameters are defined as follows: and .

[0292] Traditional Actor networks often rely on global pooling or simple fully connected layers to integrate features when processing observations. This makes it difficult to accurately capture the spatial relationships of key regions in the observations and lacks sensitivity to sparsely distributed important information (such as target location and state changes), resulting in a lack of specificity in feature representation and affecting the accuracy and efficiency of policy decisions. Therefore, an Actor network integrating a lightweight neural network, Tiny MLP (Tiny Multi-Layer Perceptron), is proposed. In the design of MLPs, ordinary MLPs typically employ a two- to three-layer fully connected structure, with each layer containing a large number of hidden units (such as 64, 128, or 256), and introducing nonlinear activation functions (such as ReLU or Tanh) between layers to enhance the network's nonlinear modeling capabilities. This structure has strong expressive power and can effectively characterize complex feature relationships, but its parameter scale and computational cost are relatively large, limiting its application in resource-constrained environments. In contrast, Tiny MLP is a lightweight variant of MLP, characterized by a reduction in the number of layers and neurons per layer (e.g., 1–2 layers, 16–64 units), often combined with normalization (e.g., LayerNorm) or residual structures to ensure training stability and convergence. The core advantage of Tiny MLP lies in its significantly reduced parameter count and computational complexity, making it more suitable for resource-constrained or low-latency scenarios while maintaining a certain level of representational capability. Compared to traditional Actor networks, Tiny MLP's lightweight design significantly reduces parameters and computational costs when processing observations, and also enhances the features of the input observations. Furthermore, LayerNorm normalizes the vectors input to the first-layer Actor backbone network, making the feature distribution more consistent across different time steps and agents, reducing gradient explosion (or vanishing gradients), and contributing to faster convergence.

[0293] The agent receives Actors from the central server. Since all agents share the same policy, all agents receive the same Actors. The agent collects local observations of the current environment and inputs them into the Actor, selecting an action based on the output probability distribution. However, edge servers have computational resource and capacity constraints. If all agents act simultaneously, multiple digital twins may simultaneously choose to migrate to the same edge server, causing resource overload. Therefore, actions that cause edge server resource overload are masked, even if the output probability of that action is set to 0.

[0294] After selecting an action, the agent executes it. The state of the environment changes due to the agent's actions, and the agent receives a reward. The agent records the actions and rewards for each time slot. Each time slot is considered a round. After each round, the agent sends the round's records to the central server for training. The Actor's training method is the same as the PPO algorithm, updating network parameters by calculating the advantage function. The advantage function represents the degree of superiority or inferiority of the action. This indicates that the action is superior, therefore the output probability of that action is increased; the larger the advantage value, the greater the increase. Therefore, it is necessary to reduce its output probability. Thus, the advantage function is defined as:

[0295]

[0296] in, This is the reward discount factor, representing the level of expectation for long-term rewards. The single-step time error can be expressed as:

[0297]

[0298] in, It is the global state value, given by the Critic network, i.e. The strategy is continuously iterated and updated during training. The data used for training in this process is sampled from the old strategy. If the differences between the old and new strategies are significant, reusing this old data will lead to large policy updates and oscillations. To reuse sampled data and improve data utilization, the PPO algorithm employs a pruning function to limit the variation between the old and new strategies. The Actor's loss function is defined as:

[0299]

[0300] in, This represents the difference in strategy before and after the update. (Pruning function) Indicates will Limited to Between, where parameters , where is the pruning factor, used to limit the update magnitude of the policy, thus achieving small-step updates. The Critic input is the global state of the environment, and the output is an estimate of the value of the current state, which should ideally equal the actual reward. Therefore, the Critic loss function is defined as:

[0301]

[0302] After the central server completes the training of the Actors and Critics, it sends the Actors to all agents. The agents then use the new Actors to select actions, and each time... Each time slot uploads the data for that round to the central server for training. After training is complete, it receives new Actors until the optimal policy parameters are obtained. Algorithm 2 provides pseudocode for the MAPPO digital twin transfer decision algorithm based on Tiny MLP.

[0303] Algorithm 2: Pseudocode for the MAPPO digital twin transfer decision algorithm based on Tiny MLP

[0304] 1: Initialize Actor network parameters and Critic network parameters

[0305] 2: for episode=0, 1, 2, ..., MAX_EPISODE do:

[0306] 3: for do:

[0307] 4: for do:

[0308] 5: Obtain local observations Input it into the Actor network and output the action.

[0309] 6: Execution of actions Calculate and update and The value of is used to obtain the local observation at the next time step.

[0310] 7: Calculate Rewards and record , , ,

[0311] 8: endfor

[0312] 9:endfor

[0313] 10: All agents will switch to time slot 0~ Y Recorded , , , Uploaded to the central server

[0314] 11: The central server will aggregate observations to obtain the global state.

[0315] 12: According to the definition and Calculate and update and

[0316] 13: endfor

[0317] Select the final target server based on the optimal migration decision;

[0318] It should be noted that, in this embodiment, the optimal migration decision comprehensively considers the synchronization latency, the maximum capacity of the edge server, and the maximum computing resources of the edge server to calculate the weight corresponding to the edge server;

[0319] The server with the highest weighting coefficient score and that meets the resource constraints will be the final target server for migration.

[0320] When the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle.

[0321] When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0322] In practical implementation, a schematic diagram of a vehicle twin migration scenario based on a caching mechanism is shown below. Figure 2 As shown, the Internet of Vehicles (IoV) is an indispensable part of intelligent transportation and a crucial component of building smart cities. IoV is a highly interconnected system enabling vehicles to coordinate and make decisions, placing high demands on network and communication capabilities. Digital twin technology has brought groundbreaking application scenarios to IoV. Its core lies in achieving dynamic optimization and intelligent decision-making for vehicles, traffic flow, and urban road networks through real-time interaction between high-fidelity virtual models and physical entities. Due to the rapid movement of vehicles and the limited computing resources of edge servers, how to quickly and efficiently migrate vehicle twins is a problem worthy of research. In time slot t-1, car V1 is driving on the road, and its twin DT1 is deployed on edge server ES1. In time slot t, V1 disconnects from ES1 and wirelessly communicates with ES2. At this time, the twin deployed on ES1 has cached a copy of DT1 in the RAM of ES2. When V1 communicates with ES2, this copy is loaded from RAM into ROM, serving as V1's twin, thus achieving efficient migration of the vehicle twin using the caching mechanism. In the above process, two processes need to be considered: the caching process of the vehicle twin in time slot t-1 and the decision-making process for twin migration in time slot t.

[0323] A schematic diagram of the MAPPO digital twin transfer decision algorithm based on Tiny MLP is shown below. Figure 3 As shown, the MAPPO algorithm employs a centralized training and distributed execution approach. This algorithm uses two neural networks: a centralized value network (Critic) to estimate the value of each global state, and a policy network (Actor) shared by all agents to calculate the probability distribution of different actions under different local observations. Critic and Actor are defined as follows: and Their network parameters are defined as follows: and During training, a central edge server is selected. This central server collects observations, actions, and rewards from all agents and uses this data to train the Actor. All agent observations are aggregated into a global state, which, combined with rewards, is used to train the Critic. After training, the central server sends the trained Actor to other edge servers. These digital twins of the agents can then make migration decisions using the Actor based on their local observations, without needing to communicate with the central server.

[0324] Actor networks based on Tiny MLP, such as Figure 4 As shown, the observations are first input into the Tiny MLP + LayerNorm module. Tiny MLP, as a lightweight variant of the multilayer perceptron, significantly reduces the number of parameters and computational complexity with a simplified layer of 1–2 layers and a neuron scale of 16–64 units. At the same time, LayerNorm normalizes the input feature vector, making the feature distribution of different time steps and different agents more consistent, alleviating the gradient explosion or vanishing problem, promoting convergence and enhancing the quality of feature representation. The features processed by this module are then further mapped and adjusted in dimension by fully connected layers, and then the policy output layer generates and outputs the action probability distribution. Thus, while ensuring effective feature representation capabilities, it adapts to resource-constrained or low-latency scenarios, completing the transformation from environmental observation to action decision-making basis.

[0325] Example 3

[0326] This embodiment provides a lightweight digital twin migration system for a vehicle-to-everything (V2X) scenario, used to implement the lightweight digital twin migration method for a V2X scenario described in Embodiment 1 or 2, such as... Figure 5 As shown, it includes:

[0327] The system construction module is used to build a vehicle-to-everything (V2X) digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model.

[0328] A migration utility function construction module is used to set the digital twin migration utility function based on the migration model;

[0329] The system optimization problem construction module is used to establish the optimization problem and its constraints of the vehicle-to-everything (V2X) digital twin system based on the digital twin migration utility function, communication model, synchronization delay model, and caching model.

[0330] The decoupling module is used to decouple the optimization problem and its constraints of the networked digital twin system into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints.

[0331] The cache decision problem solving module is used to solve the digital twin cache decision problem and its constraints using a weighted matching algorithm to determine the cache target server for the cache copy;

[0332] The migration decision problem solving module is used to solve the digital twin migration decision problem and its constraints using the Tiny MLP-based MAPPO algorithm to obtain the optimal migration decision.

[0333] The digital twin migration module is used to select the final target server based on the optimal migration decision. When the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

[0334] The same or similar labels correspond to the same or similar parts;

[0335] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0336] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A lightweight digital twin migration method for vehicle-to-everything (V2X) scenarios, characterized in that, include: Construct a digital twin system for the Internet of Vehicles, including a communication model, a synchronization delay model, a caching model, and a migration model; Based on the aforementioned migration model, a digital twin migration utility function is defined; Based on the aforementioned digital twin migration utility function, communication model, synchronization delay model, and caching model, an optimization problem and its constraints for a vehicle-to-everything (V2X) digital twin system are established. This optimization problem and its constraints are decoupled into a digital twin caching decision problem and its constraints, and a digital twin migration decision problem and its constraints, including: The optimization problem of the vehicle-to-everything (V2X) digital twin system is expressed as follows: in, For digital twin transfer utility function, Energy consumption coefficient This is a coefficient for cache space size. For wired transmission power consumption, The total size of the digital twin copies received by the server; The constraints of the optimization problem of the vehicle-to-everything (V2X) digital twin system are expressed as follows: in, To migrate decision variables, constraint C1 states that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; To ensure that the number of CPU cycles required to update the digital twin is sufficient, constraint C2 states that the computational requirements of the digital twin cannot exceed the maximum computational resources of the edge server. Regarding the cache space occupied by the digital twin on the server, constraint C3 indicates that the space occupied by the digital twin on the edge server cannot exceed the maximum capacity provided by the edge server; For the synchronization delay of digital twins, The maximum digital twin synchronization delay is preset, and constraint C4 indicates that the synchronization delay during the migration process cannot exceed the maximum threshold. To cache decision variables, constraint C5 states that an edge server can only receive one digital twin copy in the same time slot; For the digital twin cache variables, constraint C6 indicates that the number of digital twin replicas received in the same time slot shall not exceed the maximum cache space provided by the edge server; constraint C7 indicates the binary value range of the migration decision variable; constraint C8 indicates the binary value range of the cache decision variable; constraint C9 indicates the binary range of the digital twin cache variables. The optimization problem and its constraints are decoupled into a digital twin cache decision problem and its constraints. The digital twin caching decision problem is expressed as: in, Energy consumption coefficient This is a coefficient for cache space size. For wired transmission power consumption, The total size of the digital twin copies received by the server; The constraints of the digital twin caching decision problem are expressed as follows: Among them, constraint C5 indicates that an edge server can only receive one digital twin copy in the same time slot; constraint C6 indicates that the number of digital twin copies received in the same time slot shall not exceed the maximum cache space provided by the edge server; constraint C7 indicates the binary value range of the migration decision variable; constraint C8 indicates the binary value range of the cache decision variable; constraint C9 indicates the binary range of the digital twin cache variable. The optimization problem and its constraints are decoupled into a digital twin migration decision problem and its constraints. The digital twin migration decision problem is expressed as: in, For transfer utility function; The constraints of the digital twin migration decision problem are expressed as follows: Among them, constraint C1 means that the digital twin of each vehicle can only be deployed on one edge server in the same time slot; constraint C2 means that the computing requirements of the digital twin cannot exceed the maximum computing resources of the edge server; constraint C3 means that the space capacity occupied by the digital twin in the edge server cannot exceed the maximum capacity provided by the edge server; constraint C4 means that the synchronization latency during the migration process cannot exceed the maximum threshold; constraint C7 means the binary value range of the migration decision variables. The weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints to determine the target server for the cached copy. The MAPPO algorithm based on Tiny MLP is used to solve the digital twin migration decision problem and its constraints, and the optimal migration decision is obtained. The final target server is selected based on the optimal migration decision; when the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.

2. The lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario according to claim 1, characterized in that, Constructing a vehicle-to-everything (V2X) digital twin system, including communication models, synchronization delay models, caching models, and migration models, including: The communication model is used to calculate the communication rate between the vehicle and the current server, including: Get vehicle location and current server location Calculate the Euclidean distance between the vehicle and the current server: Where t is the time slot; Based on the Euclidean distance between the vehicle and the current server, construct a channel model for the vehicle and the current server: in, This is the path fading coefficient, and its value range is... , Rayleigh fading coefficient; Based on the channel model, calculate the uplink communication power from the vehicle to the current server and the downlink communication power from the current server to the vehicle: in, This represents the uplink power from the vehicle to the current server. For vehicles To the current server The transmission power, For environmental noise, Channel bandwidth; in, This represents the current downlink power from the server to the vehicle. This represents the current transmission power from the server to the vehicle. For environmental noise, Channel bandwidth; The synchronization delay model is used to calculate the synchronization delay of the digital twin, including: Obtain the size of the synchronized data uploaded by the vehicle, and calculate the upload communication latency from the vehicle to the first server: in, The size of the synchronized data uploaded by the vehicle; Obtain the current server's computing capacity to obtain the computing capacity allocated to a single digital twin: in, This represents the current computing capacity of the server. Binary associative variables; Obtain the number of CPU cycles required to update the digital twin, and calculate the computation latency for updating the vehicle's digital twin based on the computing capacity allocated to the individual digital twin: in, The number of CPU cycles required to update the digital twin; Obtain the amount of computation feedback data from the current server, and calculate the downlink communication latency from the current server to the vehicle: in, The amount of data representing the computational feedback results from the current server; Calculate the synchronization delay of the digital twin based on the upload communication delay, computation delay, and downlink communication delay: in, The upload communication latency from the vehicle to the current server. To update the computational latency of the vehicle's digital twin, This represents the current downlink communication latency from the server to the vehicle. The caching model is used to calculate the sum of wired transmission energy consumption and the size of the digital twin received by the server, including: Obtain the server cache space occupied by the digital twin, the server cache space, the server's wired transmission energy consumption, and the time required to transmit a unit of data per unit distance, and calculate the wired transmission energy consumption: in, For wired transmission power consumption, The size of the server cache space occupied by the digital twin. For binary associative variables, This represents the transmission distance between the current server and the target server. Based on the size of the server's cache space occupied by the digital twin The total size of the digital twin copies received by the server is calculated, including: in, The amount of cache space occupied by the digital twin on the server; The migration model is used to calculate migration latency and migration energy loss, including: Based on the current server location, the target server location, the time required to transmit a unit of data per unit distance, and the average wired transmission power of the servers, calculate the migration energy loss, including: Compute the migration latency of the vehicle digital twin between the current server and the target server: in, For migration delay; Calculate the migration energy loss based on the migration latency and the server's average wired transmission power: in, This is to mitigate energy loss during migration.

3. The lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario according to claim 2, characterized in that, Based on the aforementioned migration model, a digital twin migration utility function is defined, including: The digital twin transfer utility function is expressed as follows: in, The preset maximum migration delay, For migration delay, For migration loss weighting coefficients, This is to mitigate energy loss during migration.

4. A lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario according to claim 3, characterized in that, The weighted matching algorithm is used to solve the digital twin caching decision problem and its constraints, determining the target server for the cache replica, including: The weights of the servers are calculated using a weighted matching algorithm. The server with the highest weight coefficient score and that meets the resource constraints will be selected as the cache target server.

5. A lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario according to claim 4, characterized in that, The MAPPO algorithm based on Tiny MLP is used to solve the digital twin transfer decision problem and its constraints, obtaining the optimal transfer decision, including: The transfer process is modeled as a Dec-POMDP, which includes a set of agents, a state space, an observation space, an action space, transition probabilities, a reward function, and a discount factor. The Dec-POMDP is parsed using the Tiny MLP-based MAPPO algorithm, where the MAPPO algorithm uses a centralized value network Critic to estimate the global state value and a shared policy network Actor to calculate the action probability. Set the probability of actions that cause edge server resource overload to 0; Train and update the Critic and Actor until convergence, and obtain the optimal transfer strategy.

6. A lightweight digital twin migration method in a vehicle-to-everything (V2X) scenario according to claim 5, characterized in that, The final target server is selected based on the optimal migration decision, including: The optimal migration decision integrates synchronization latency, the maximum capacity of the edge server, and the maximum computing resources of the edge server to calculate the weight of the edge server. The server with the highest weighting coefficient score and that meets the resource constraints will be the final target server for migration.

7. A lightweight digital twin migration system for a vehicle-to-everything (V2X) scenario, used to implement the lightweight digital twin migration method for a V2X scenario as described in claims 1-6, characterized in that, include: The system construction module is used to build a vehicle-to-everything (V2X) digital twin system, including a communication model, a synchronization delay model, a caching model, and a migration model. A migration utility function construction module is used to set the digital twin migration utility function based on the migration model; The optimization problem establishment and decoupling module is used to establish the optimization problem and its constraints of the vehicle-to-everything (V2X) digital twin system based on the digital twin migration utility function, communication model, synchronization delay model, and caching model, and decouple the optimization problem and its constraints into the digital twin caching decision problem and its constraints and the digital twin migration decision problem and its constraints. The cache decision problem solving module is used to solve the digital twin cache decision problem and its constraints using a weighted matching algorithm to determine the cache target server for the cache copy; The migration decision problem solving module is used to solve the digital twin migration decision problem and its constraints using the Tiny MLP-based MAPPO algorithm to obtain the optimal migration decision. The digital twin migration module is used to select the final target server based on the optimal migration decision. When the final target server is a cache target server, a digital twin is generated on the final target server based on the cache copy, and the generated digital twin is updated in conjunction with the data uploaded by the vehicle. When the final target server is not a cache target server, the final target server receives the digital twin of the current server and updates the received digital twin in conjunction with the data uploaded by the vehicle.