Fine-grained model-level twinborn migration method for digital twinborn traffic system
By constructing a digital twin migration decision model and optimizing the migration strategy using coupling graphs and reinforcement learning, the problems of redundant data transmission and system function fragmentation in existing digital twin migration technologies are solved, achieving more efficient migration and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing digital twin migration technologies treat digital twins as an indivisible whole for migration, resulting in redundant data transmission, increased migration latency, and fragmented system functions. Furthermore, they cannot effectively manage the coupling relationships between heterogeneous sub-models, increasing communication burden and migration complexity.
A twin transfer decision model is constructed, including a coupling graph construction module, a transfer mode selection module, a subgraph embedding module, and a model-level transfer strategy optimization module. The coupling relationship between sub-models is captured by reinforcement learning and explicit-implicit fusion coupling graph, and the transfer strategy is optimized to reduce transfer cost and latency.
It achieves a more reasonable migration strategy, reduces redundant data transmission, lowers network bandwidth consumption, improves system response latency, and enhances the robustness and resource utilization efficiency of intelligent transportation systems in complex scenarios.
Smart Images

Figure CN121835382A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation technology, and more specifically, relates to a fine-grained model-level twin transfer method for digital twin transportation systems. Background Technology
[0002] Digital twins, as an emerging digital transformation tool, are bringing profound changes to the transportation sector. By integrating key technologies such as the Internet of Things, artificial intelligence, and edge computing, digital twins can create virtual twins that are synchronized in real time and accurately mapped to each entity in the physical transportation system, significantly improving the monitoring accuracy and predictive analysis capabilities of the transportation system. Currently, this technology has been widely applied in areas such as traffic light control, traffic flow management, and autonomous driving, providing strong support for the real-time response capabilities and scheduling efficiency of transportation systems.
[0003] In practical applications, due to the high-speed mobility of vehicles and the uneven network load, digital twins need to frequently migrate across different edge servers to ensure service continuity. Existing digital twin migration research typically treats the digital twin as an indivisible whole for migration. However, a complete digital twin usually consists of multiple functionally heterogeneous sub-models, such as perception, decision-making, and dynamics. These sub-models have different requirements, and overall migration leads to the repeated transmission of a large amount of redundant data that does not need to be updated, and forces the migration of sub-models that do not need to be migrated, increasing communication burden and migration latency. In addition, there are complex coupling relationships between the sub-models within the digital twin (such as the perception module influencing the decision-making module), and this relationship changes dynamically with traffic scenarios. Blindly splitting or migrating can easily lead to the fragmentation of system functions and the breakage of the inference chain. At the same time, there is a dual heterogeneity between the "sub-model-vehicle," that is, the sub-models are highly heterogeneous in terms of data volume and computational overhead, and the resource distribution of edge nodes is also uneven, making migration optimization extremely complex. Therefore, there is an urgent need for a fine-grained model-level migration method that can accurately capture the coupling relationships between sub-models, reduce migration costs, and adapt to dynamic environments. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a fine-grained model-level twin migration method in intelligent transportation systems. By constructing a coupling graph of the models in the twin, the invention enables refined management and scheduling of heterogeneous sub-models, thereby improving the real-time performance, stability and resource utilization efficiency of the digital twin transportation system.
[0005] To achieve the above-mentioned objectives, the fine-grained model-level twin transfer method in the intelligent transportation system of the present invention includes the following steps:
[0006] S1: Construct a digital twin transportation system, including physical space and twin space, where the physical space includes... A high-speed moving intelligent transportation entity , Each entity corresponds to a twin in the twin space. Each twin include Individual model, recording twins The first in The sub-model is , Sub-model The task requirement vector is , , , Representing sub-models respectively Computing resource requirements, storage requirements, and communication bandwidth requirements;
[0007] Deployment in digital twin transportation systems Heterogeneous edge servers It is responsible for receiving, deploying, and executing various sub-model tasks from the twin; the server records... The resource vector is ,in , , They represent servers respectively. Maximum computing resources, storage capacity, and communication bandwidth limits;
[0008] Deployment location variables Submodel Whether it is deployed to a heterogeneous edge server , Submodel Deployed on the server superior, Submodel Not deployed on the server superior;
[0009] S2: Construct a twin migration decision model, including a coupling graph construction module, a migration mode selection module, a subgraph embedding module, and a model-level migration strategy optimization module, wherein:
[0010] The coupling graph construction module is used to construct twins based on the decision-making time. Feature data generation Sub-model Coupling relationship diagram ,in Indicates twins The first in Sub-models and the first The coupling relationship of each sub-model;
[0011] The migration mode selection module is used to select the migration mode based on each twin. Coupling relationship diagram right Each sub-model is partitioned into subgraphs to obtain... A migration pattern subgraph , Send all migration pattern subgraphs to the subgraph embedding module;
[0012] The subgraph embedding module is used to perform graph embedding on the subgraphs corresponding to all twins. The initial features of each sub-model node are based on the twin at the time of decision. Feature data generation, and embedded features obtained through graph embedding. ,in, , Then embed the features Send to the model-level migration strategy optimization module;
[0013] The model-level transfer strategy optimization module is used to employ reinforcement learning based on the transfer pattern subgraph of all twins. and all servers Remaining resource vector Generate the deployment location variable matrix at the moment of decision. ,in, They represent servers respectively. The remaining computing resources, remaining storage capacity, and remaining communication bandwidth are used to deploy the location variable matrix. elements in Indicates the first Sub-models in the migration pattern subgraph are deployed to the server. , Indicates the first The sub-models in the migration pattern subgraph are not deployed to the server. , The reinforcement learning parameters are set as follows:
[0014] State space set to ;
[0015] Action space set , That is, the deployment location variable ;
[0016] The formula for calculating the reward function is as follows:
[0017] ,
[0018] in, , , These represent the preset weights. Indicates resource matching degree. This represents the latency overhead of migration and execution. Denotes the cost of breaking the subgraph cooperative structure, where:
[0019] Resource matching degree The calculation formula is as follows:
[0020] ,
[0021] in, This indicates the server after this migration. Changes in computational resources This indicates the server after this migration. The amount of change in storage space, This indicates the server after this migration. The change in communication bandwidth;
[0022] Delay overhead The calculation formula is as follows:
[0023] ,
[0024] in, Indicates transmission delay. Indicates computation delay;
[0025] Cost of destruction The calculation formula is as follows:
[0026] ,
[0027] in, Indicates the first The number of servers where each subgraph is deployed. Indicates the number of servers The average coupling strength is used to control the split tolerance.
[0028] S3: Set up a training sample set according to actual needs to train the twin transfer decision model and obtain a trained twin transfer decision model;
[0029] S4: When twin migration decisions are required, collect data for each twin. Each sub-model The characteristic data, and each server Remaining resource vector Then, the trained twin migration decision sub-model is input to obtain the deployment location variable matrix. And based on this, each sub-model is obtained. Corresponding deployment location variable This completes the transfer of the twin sub-model.
[0030] This invention discloses a fine-grained model-level twin migration method in intelligent transportation systems. It constructs a digital twin transportation system, including intelligent transportation entities in physical space, twins in twin space, and heterogeneous edge servers. Then, it constructs a twin migration decision model, including a coupling graph construction module, a migration mode selection module, a subgraph embedding module, and a model-level migration strategy optimization module. The twin migration decision model is trained using a training sample set according to actual needs, resulting in a trained twin migration decision model. When twin migration decisions are required, feature data of each sub-model in each twin and the remaining resource vector of each server are collected and input into the trained twin migration decision model to obtain deployment location variables, which are then used to migrate each sub-model.
[0031] The present invention has the following beneficial effects:
[0032] 1) This invention combines coupling graphs and reinforcement learning to effectively capture the cooperative relationships between sub-models in twins, thereby providing a more reasonable transfer strategy;
[0033] 2) In this invention, the coupling graph adopts an explicit-implicit fusion coupling graph, which accurately captures the dynamic changes of explicit dependencies and implicit cooperative relationships between heterogeneous sub-models, effectively preventing functional fragmentation and inference chain breakage caused by blind splitting, and ensuring the correct operation of the twin in a distributed environment.
[0034] 3) The migration mode selection module of this invention identifies closely related subgraphs through a skew perception mechanism, breaking the limitations of traditional whole migration, significantly reducing the repeated transmission of redundant data, and reducing network bandwidth consumption and migration costs.
[0035] 4) This invention, through a model-level migration strategy optimization module, can flexibly utilize unevenly distributed edge resources while ensuring the co-located deployment of highly coupled subgraphs. Experiments show that it significantly reduces the average response latency of the system.
[0036] 5) This invention combines deep reinforcement learning with soft constraint co-location mechanism, enabling the system to adaptively adjust migration and splitting strategies based on real-time network fluctuations, vehicle movement status, and server load, thereby enhancing the robustness of the intelligent transportation system in complex scenarios. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating a specific implementation of the fine-grained model-level twin transfer method in the intelligent transportation system of the present invention.
[0038] Figure 2 This is a structural diagram of the twin migration decision model in this invention;
[0039] Figure 3 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 20 vehicles in this embodiment;
[0040] Figure 4 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 40 vehicles in this embodiment;
[0041] Figure 5 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 60 vehicles in this embodiment. Detailed Implementation
[0042] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0043] Example
[0044] Figure 1 This is a flowchart illustrating a specific implementation of the fine-grained model-level twin transfer method in the intelligent transportation system of this invention. (See attached flowchart.) Figure 1 As shown, the specific steps of the fine-grained model-level twin transfer method in the intelligent transportation system of the present invention include:
[0045] S101: Building a digital twin transportation system:
[0046] In this invention, a digital twin transportation system is first constructed, comprising a physical space and a twin space, wherein the physical space includes... A high-speed moving intelligent transportation entity (such as intelligent vehicles). Each entity corresponds to a twin in the twin space. Each twin include Each sub-model can include perception, prediction, and behavioral decision-making sub-models, depending on actual needs. (This is related to the concept of a twin.) The first in The sub-model is , Sub-model The task requirement vector is , , , Representing sub-models respectively Computing resource requirements, storage requirements, and communication bandwidth requirements.
[0047] Deployment in digital twin transportation systems Heterogeneous edge servers It is responsible for receiving, deploying, and executing various sub-model tasks from the twin; the server records... The resource vector is ,in , , They represent servers respectively. Maximum computing resources, storage capacity, and communication bandwidth limits.
[0048] In this invention, deployment location variables are used. Submodel Whether it is deployed to a heterogeneous edge server , Submodel Deployed on the server superior, Submodel Not deployed on the server superior.
[0049] As described above, the digital twin transportation system of the present invention includes... The problem involves several sub-models. Since each sub-model has significant functional differences, and there are usually strong causal dependencies and data interactions between sub-models within the same twin, and different twins may also have cooperative relationships due to traffic behavior coupling, this invention refines the twin migration problem into a model-level migration problem. It formalizes this problem as a multi-objective integer programming problem with resource constraints, delay optimization, sub-model cooperation, and migration costs. The objective is to minimize the system's average delay, coupling costs, and migration costs.
[0050] S102: Constructing a twin migration decision model:
[0051] To achieve twin migration decision-making, this invention constructs a twin migration decision-making model. Figure 2 This is a structural diagram of the twin migration decision model in this invention. (As shown...) Figure 2 As shown, the twin migration decision model in this invention includes a coupling graph construction module, a migration mode selection module, and a model-level migration strategy optimization module, wherein:
[0052] The coupling graph construction module is used to construct twins based on the decision-making time. Feature data generation Sub-model Coupling relationship diagram ,in Indicates twins The first in Sub-models and the first The coupling relationship of each sub-model.
[0053] In this embodiment, the feature data of the twin includes a feature matrix. and characteristic matrix The generation method is as follows: based on the twin body at the time of decision-making. Each sub-model generates a feature vector from its input and output data. Each feature vector includes the sub-model type code, sub-model deployment location variable, resource requirement vector, and original data features. The input and output feature vectors of each sub-model are then combined to form a... eigenmatrix Represent the dimension of the feature vector, and then... The feature matrix is obtained by concatenating the feature matrices of the sub-models. ; each sub-model The input data feature vector and the output data feature vector are concatenated to form a... The feature vector, then The feature matrix is obtained by concatenating the feature vectors of the sub-models. .
[0054] In digital twin transportation systems, the inputs and outputs of different twin sub-models not only exhibit explicit dependencies (such as data transfer and sub-model-level calls) but also implicit statistical associations (such as shared environmental factors or similar task scenarios). To more comprehensively characterize this interaction, this embodiment proposes a coupling graph construction module that integrates explicit and implicit dependencies. Figure 2 As shown, the coupled graph construction module in this embodiment includes a self-attention module, a graph autoencoder module, a decoding module, and a fusion module, wherein:
[0055] The self-attention module is used to apply a self-attention mechanism to the feature matrix. The process is performed to obtain the initial attention matrix. Then according to The window will initialize the attention matrix. Divided into Each submatrix is used to calculate the mean of the four attention values in each submatrix, thus obtaining the attention matrix. , attention matrix The adjacency matrix, representing the explicit coupling relationship graph between sub-models, is sent to the graph autoencoder module and the fusion module. In the attention matrix... Each element Representative sub-model right The degree of dependence between inputs and outputs can accurately reflect the explicit structural relationships between sub-models.
[0056] The graph autoencoder module is used to process the feature matrix. Each row vector in the matrix serves as the feature vector of the sub-model, and the attention matrix is used as the feature vector. The adjacency matrix of the sub-model is used for graph embedding to obtain the embedding feature matrix. , This represents the dimension of the graph embedding features, and then the embedding feature matrix is... Send to the decoding module.
[0057] Despite attention matrix While it can effectively model explicit interaction paths, in real-world systems, numerous implicit coupling relationships arise due to external environment, physical adjacency, or historical behavior patterns. For example, although the vehicle trajectory sub-model and the environment perception sub-model have different inputs, their outputs are both constrained by the same traffic light cycle, and their results may exhibit synchronous temporal changes. Introducing a graph autoencoder module to model the feature matrix... In graph structure Convolutional propagation is performed to learn higher-level contextual representations and uncover hidden statistical commonalities. The graph coding module's processing can be represented by the following formula:
[0058] ,
[0059] in, For graph adjacency matrices with self-loops, It is its degree matrix. For learnable weights, This represents the activation function. This process integrates explicit graph structure information and the original feature semantics to obtain the embedded feature matrix. It contains a deep context representation for each sub-model.
[0060] The decoding module is used to determine the embedded feature matrix. Adjacency matrix of the implicit coupling graph between the generated sub-models ,in The activation function is represented by the superscript T, which indicates transpose. Then, the adjacency matrix is... The data is sent to the fusion module. The decoding module can learn the latent coupling structure between sub-models from the representation space, thereby further constructing the implicit coupling relationships between them. The Sigmoid function can be used to normalize values to the [0,1] interval.
[0061] The fusion module is used to process the adjacency matrix of explicit coupling graphs. Adjacency matrix of implicit coupling graph Weighted fusion is performed to obtain the coupling relationship graph. :
[0062] ,
[0063] in, The weights are used to balance the influence of explicit structural information and implicit statistical associations.
[0064] By using weighted fusion, we can avoid relying solely on explicit structures and ignoring potential synergies, or relying solely on implicit statistical relationships and lacking clear interpretability. This results in a coupling graph that includes both explicit physical / logical dependencies in the system and reflects deep environment-driven statistical associations. This forms the basis for subsequent migration mode selection and sub-model migration strategy optimization, effectively supporting the collaborative scheduling and resource allocation between twin sub-models in complex systems.
[0065] The migration mode selection module is used to select the migration mode based on each twin. Coupling relationship diagram right Each sub-model is partitioned into subgraphs to obtain... A migration pattern subgraph , All migration pattern subgraphs are sent to the subgraph embedding module.
[0066] In digital twin transportation systems, the coupling relationships between sub-models often exhibit significant unbalanced characteristics—a few core sub-models bear a large amount of interactive load, while most sub-models only have weak coupling relationships. This "heavy-tailed distribution" characteristic makes it difficult to achieve efficient collaborative scheduling using traditional uniform partitioning strategies. Based on the coupling relationship graph... The revealed heterogeneous association structure is addressed in this embodiment by proposing a migration mode selection module based on skew perception. This module quantifies the pivotal characteristics of nodes in the globally coupled network, transforming the naturally formed core-edge structure into an executable migration grouping strategy. The specific method of the migration mode selection module is as follows:
[0067] For coupling relationship diagram For each sub-model node, its weighted metric is calculated using the following formula. :
[0068] ,
[0069] in, Representing the coupling relationship diagram The Middle The number of sub-model nodes and the first The coupling relationship of each sub-model node.
[0070] To quantify the degree of deviation of a node from the overall coupling distribution, a skew-aware score is introduced. :
[0071] ,
[0072] in, , Representing the coupling relationship diagram The mean and standard deviation of the weighted measures of all sub-model nodes.
[0073] Scoring based on skew perception , the coupling relationship diagram All sub-models are divided into three sets:
[0074] (Head, strongly coupled core sub-model)
[0075] (Mid, moderately coupled sub-model)
[0076] (Tail, weakly coupled or independent sub-models)
[0077] in, This represents a preset threshold, which is generally set based on experience. In this embodiment... .
[0078] Set Each sub-model in the algorithm is used as the core. A greedy mechanism is employed to connect the strongly correlated sub-models in the remaining sub-models to the core sub-model to construct a subgraph. If any sub-model in the remaining sub-models cannot be connected to the core sub-model, it is treated as a separate subgraph. All the resulting subgraphs are used as a coupling relationship graph. The corresponding migration pattern subgraph.
[0079] In this embodiment, to further improve the rationality of migration mode selection, a comprehensive optimization objective function is introduced. Based on the subgraph fine-tuning, this function considers the coupling strength within the subgraph, the interaction cost across subgraphs, and the skew balance within the subgraph, as detailed below:
[0080] ,
[0081] in and These are adjustable balancing parameters that control the weights of intra-group aggregation intensity and cross-group interaction cost, respectively.
[0082] The specific methods for subgraph fine-tuning optimization are as follows:
[0083] Choose one sub-model from each of the two current subgraphs and swap them. Calculate the optimization objective function before and after the swap. If the optimization objective function is smaller after the swap, the swapped subgraph is retained; otherwise, the original subgraph is restored. This process is repeated until the preset maximum number of iterations is reached.
[0084] The above method can evaluate the impact of cross-group node swaps on the overall partitioning quality, and accept swap operations that reduce the optimization objective function during iteration, while retaining a certain degree of randomness to escape local optima. After multiple rounds of iteration and convergence, the final migration pattern maintains high coupling within the subgraph and effectively reduces the interaction overhead across subgraphs, thus achieving a balance between structural equilibrium and scheduling efficiency overall.
[0085] The subgraph embedding module is used to perform graph embedding on the subgraphs corresponding to all twins. The initial features of each sub-model node are based on the twin at the time of decision. Feature data generation, and embedded features obtained through graph embedding. ,in, , Then embed the features The data is sent to the model-level transfer strategy optimization module. In this embodiment, the subgraph embedding module uses a graph convolutional network (GCN), with the initial features being a feature matrix. The feature vectors of the neutron model nodes.
[0086] The model-level transfer strategy optimization module is used to employ reinforcement learning to embed features based on subgraphs of all twins. and all servers Remaining resource vector Generate the deployment location variable matrix at the moment of decision. ,in, They represent servers respectively. The remaining computing resources, remaining storage capacity, and remaining communication bandwidth are used to deploy the location variable matrix. elements in Indicates the first Sub-models in the migration pattern subgraph are deployed to the server. , Indicates the first The sub-models in the migration pattern subgraph are not deployed to the server. , The reinforcement learning parameters are set as follows:
[0087] State space set to ;
[0088] Action space set , That is, the deployment location variable ;
[0089] The reward function is set as follows: Traditionally, to ensure the collaborative efficiency between subgraph sub-models, a "whole-scale co-location" strategy is often adopted, which involves migrating all subgraphs within a subgraph to the same server. While this strategy is intuitive and can maintain sub-model coupling to the greatest extent, in edge computing scenarios, due to server heterogeneity and frequent resource load changes, it often fails to meet the resource requirements for unified deployment of the entire graph, resulting in a limited feasible solution space and reduced system scalability and stability. Therefore, this invention proposes a soft-constraint co-location migration mechanism. When server resources are sufficient, the overall co-location of subgraph sub-models is prioritized; when resources are insufficient to accommodate the entire graph, limited structural splitting of the subgraph is allowed, supplemented by coupling loss penalties, to balance the contradiction between collaborative maintenance and resource feasibility. Therefore, the reward function is calculated as follows:
[0090] ,
[0091] in, , , These represent the preset weights. Indicates resource matching degree. This represents the latency overhead of migration and execution. Denotes the cost of breaking the subgraph cooperative structure, where:
[0092] Resource matching degree The formula used to measure the proportion of computing, storage, and bandwidth usage is as follows:
[0093] ,
[0094] in, This indicates the server after this migration. Changes in computational resources This indicates the server after this migration. The amount of change in storage space, This indicates the server after this migration. The change in communication bandwidth.
[0095] Delay overhead The formula for calculating the transfer and computation time required to characterize sub-model migration is as follows:
[0096] ,
[0097] in, Indicates transmission delay. This indicates the computation delay.
[0098] Cost of destruction The formula used to measure the degree to which sub-models in a subgraph are deployed separately is as follows:
[0099] ,
[0100] in, Indicates the first The number of servers where each subgraph is deployed. Indicates the number of servers The average coupling strength is used to control the split tolerance.
[0101] S103: Training the twin transfer decision model:
[0102] The twin transfer decision model is trained by setting up a training sample set according to actual needs, and a well-trained twin transfer decision model is obtained.
[0103] This embodiment employs a near-end policy optimization algorithm for training. Within this framework, a parameterized policy network is constructed. Based on the current system status Output subgraph transition actions The probability distribution. The environment returns an immediate reward after the action is performed. Based on this, the strategy network parameters are continuously optimized. Maximize cumulative expected return:
[0104] ,
[0105] To improve training stability, the PPO pruning objective function form was adopted:
[0106] ,
[0107] in, For strategy ratio, This represents the advantage value of the current action. Through continuous interaction with the environment and policy updates, the agent can gradually learn the optimal scheduling strategy for subgraph migration under resource-constrained conditions, achieving a comprehensive optimization of collaborative efficiency and resource utilization.
[0108] S104: Twin migration:
[0109] When twin migration decisions are required, the current data for each twin is collected. Each sub-model The characteristic data, and each server Remaining resource vector Then, the trained twin migration decision sub-model is input to obtain the deployment location variable matrix. And based on this, each sub-model is obtained. Corresponding deployment location variable This completes the transfer of the twin sub-model.
[0110] To better illustrate the technical effects of this invention, specific examples are used to experimentally verify it. This embodiment includes multiple sets of experiments and comparisons with various baseline methods, focusing primarily on performance in areas such as latency, computation, storage, bandwidth resource matching, and migration costs. Furthermore, ablation experiments are conducted to deeply analyze the contributions of each module, further validating the effectiveness and adaptability of this invention.
[0111] The hardware configuration in this embodiment is as follows: an NVIDIA GeForce RTX 5070 Ti GPU (driver version 576.88, supporting CUDA 12.9), paired with an Intel Core Ultra 7 265K processor (20 cores, 20 threads, base frequency 3.90GHz), and equipped with 64GB of high-speed memory (6000MHz). This configuration provides strong computing power and sufficient storage capacity for large-scale traffic scene simulation and deep learning model training, ensuring the efficiency and stability of the experiment.
[0112] The software setup for this embodiment is as follows: the experiment runs on a Windows 10 Professional system, using Python 3.12.7 as the development environment. Core dependencies include PyTorch (compatible with CUDA 12.9) and NumPy 2.0.2 to ensure efficient numerical computation and parallel training.
[0113] This embodiment utilizes the CARLA simulation platform (v0.10.0) to generate traffic data. This version supports complex urban road network modeling and high-fidelity data acquisition from multiple sensors, providing a realistic and reliable experimental environment for the research. The specific configuration is as follows: the simulation step size is set to 0.1s (corresponding to a 10Hz sampling frequency), each experimental scenario lasts for 1 hour, generating approximately 36,000 time-series data samples. The sensor configuration includes an onboard RGB camera (resolution 320×240, FOV 60°), a lidar (32 lines, detection range 30m, point cloud density 25,000 points / second), a millimeter-wave radar (detection frequency 1000 points / second, horizontal field of view 30°), and basic information such as the vehicle's coordinates, speed, and turning angle.
[0114] The traffic data generated in this embodiment covers three representative urban traffic scenarios: Town03, Town04, and Town06. Town03, with an area of approximately 643×629m, is an urbanized area with a road network consisting of large roundabouts and multi-directional intersections, exhibiting complex urban traffic characteristics and highly dynamic traffic flow. Town04, with an area of approximately 980×882m, is a nested town with mountainous features, containing a unique figure-eight-shaped infinite loop highway system, combining complex terrain with highway characteristics. Town06, with an area of approximately 1089×611m, is a multi-lane highway scenario, containing numerous ramps and extensions, and supporting the "Michiganleft" design, thus simulating high traffic volume and complex lane-changing behavior in a real highway environment. To simulate the edge computing environment, different numbers of edge servers were deployed based on the map area and road network characteristics: 4 servers were deployed in Town03, 9 servers in Town04, and 8 servers in Town06, with the servers evenly distributed across the map area. Each scenario involved 20, 40, and 60 vehicles, with multimodal data collected in real-time at a frequency of 0.1 seconds. This data included point clouds, images, radar data, coordinates, speed, and turning angles, lasting for one hour to create a high spatiotemporal resolution digital twin dataset. To ensure the stability and integrity of the data acquisition, an anomaly handling mechanism was further introduced, including vehicle jam detection (speed threshold 0.1 m / s, lasting 60 seconds), periodic data saving (every 1000 frames), and simulation crash recovery functionality to avoid data loss or anomalies. After collecting the raw data, it was standardized to eliminate scale differences between features.
[0115] In this embodiment, four baseline methods were selected as comparison methods, namely:
[0116] 1) Fixed location method: The twin of each vehicle remains fixed on the initially randomly selected server and does not migrate throughout the process;
[0117] 2) Distance-first method: Each time a vehicle selects the nearest server for its twin, the position is dynamically adjusted based on the real-time distance;
[0118] 3) AC-MARL method: Each vehicle twin is equipped with an independent Actor network to generate placement strategies, and a global Critic network is used for strategy evaluation;
[0119] 4) Pre-PPO method: First, the map is divided into regions. Then, the candidate server set for the region is determined by predicting the vehicle's location. Finally, the final migration location is selected from the candidate set based on the PPO algorithm.
[0120] In this embodiment, the following five evaluation metrics are used to measure system performance: computational resource matching degree, storage resource matching degree, bandwidth resource matching degree, average latency, average splitting degree, and average migration cost. Computational resource matching degree, storage resource matching degree, and bandwidth resource matching degree reflect the degree of matching between the resources required by the vehicle and the remaining resources of the server, respectively; average latency includes propagation latency, transmission latency, and computation latency, and is the average value of all vehicles; average splitting degree represents the proportion of migration modes that are split through the soft-constraint co-location mechanism; average migration cost represents the data overhead during twin migration, which is approximated by the storage data size during migration in this embodiment.
[0121] Figure 3 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 20 vehicles in this embodiment. From Figure 3 It can be seen that: (i) In the Town03 scenario, when the number of vehicles is 20, the matching degree of each resource is less than 1, and the present invention performs best. Its advantage stems from the migration optimization oriented towards the sub-model level, which is more flexible than the complete migration, can reduce the risk of server overload and improve resource utilization efficiency. Similar trends also appear in Town04 and Town06. (ii) The present invention consistently has the lowest average latency, reducing it by approximately [0.0555, 1.1775]s compared to the baseline method in the Town03 scenario. This is due to its accurate analysis of the coupling relationship of sub-models and the combination of dual-network PPO optimized migration, which reduces cross-server interaction while adapting to resource status, thereby reducing communication and computation latency. (iii) The migration cost of the present invention (0.21796GB) is higher than that of the fixed location and distance-first strategies. The former has a migration cost of 0 due to the fixed binding of twins, while the latter will not generate migration when the vehicle does not cross the server boundary, but will trigger migration and bring additional overhead once the vehicle moves into the coverage area of other servers. However, such simple rule strategies are significantly inferior to the present invention in terms of latency performance.
[0122] Figure 4 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 40 vehicles in this embodiment. From Figure 4 It can be seen that: (i) in the Town03 scenario, when the number of vehicles increases to 40, Figure 4 (c) Bandwidth resources are becoming increasingly scarce, and the resource matching degree exceeds 1, but the growth rate of this invention is significantly lower than other methods. This is because this invention can comprehensively consider the resource requirements of sub-models during the migration process and combine coupling graphs and skew-aware mechanisms to achieve differentiated migration, thereby making resource utilization more balanced. (ii) In Figure 4 In (e), with Figure 3(e) Unlike the previous approach, the average migration cost of the distance-first strategy no longer reaches zero. This is because as the number of vehicles increases, vehicles cross the server boundary at every moment, causing continuous sub-model migrations and incurring storage overhead. Similar trends are consistently observed in other scenarios and with varying vehicle sizes.
[0123] Figure 5 This is a comparison chart of the resource matching degree and overall system performance of the present invention and the comparison method in the Town03 scenario for 60 vehicles in this embodiment. From Figure 5 (d) It can be seen that the present invention consistently outperforms the four baseline methods in terms of average latency. Its advantages are mainly reflected in the following aspects: Traditional fixed-location methods cannot dynamically migrate twins according to vehicle location and demand, resulting in high overall latency; distance-first methods only consider geometric distance, ignoring server load, and are prone to bottlenecks on popular servers; in AC-MARL, each actor makes independent decisions, and although a Critic provides global information, it is still difficult to avoid multiple twins competing for the same server resources, causing congestion; Pre-PPO is limited by fixed area division, resulting in insufficient scheduling capability when resources are unevenly distributed across areas. In contrast, the present invention can break through area boundaries and dynamically allocate resources through a subgraph-level migration mechanism, thereby significantly reducing latency. This improvement is particularly crucial in vehicle-to-everything (V2X) scenarios, because latency directly affects the real-time performance of vehicle perception, decision-making, and control, and thus relates to the safety and stability of the system. Figure 5 (e) It can be seen that among the three intelligent optimization algorithms, the average migration cost of the present invention is second best. Specifically, Pre-PPO limits the migration range by dividing the region, making the migration action only related to the number of local servers, thereby significantly reducing the migration frequency. The average migration cost is about 0.019GB lower than that of the present invention, but its average latency is significantly higher than that of the present invention. In AC-MARL, each vehicle makes independent decisions, which is prone to frequently triggering migration jitter under resource boundary conditions. At the same time, due to the use of overall twin migration and the lack of fine modeling, once migration occurs, a large amount of storage data needs to be moved, resulting in an average migration cost that is about 0.0048GB higher than that of the present invention and an average latency that is about 0.25s higher. In contrast, the present invention effectively avoids unnecessary overall migration while ensuring latency optimization and resource balance through explicit-implicit fusion sub-model mapping and skew perception mode selection. Although its cost is slightly higher than that of Pre-PPO, the difference is small, and the improvement in latency performance far outweighs this overhead, fully demonstrating the application value of the present invention in real-time vehicle networking systems. This conclusion has also been consistently verified in other scenarios and under different vehicle scales.
[0124] The above analysis focuses primarily on the Town03 scenario. The experimental results for Town04 and Town06 are consistent with these conclusions and will not be repeated here. Overall, the experimental results show that, under different scenarios and vehicle scales, this invention achieves optimal resource matching while maintaining a low average migration cost (0.2376GB). In the three scenarios, the average latency is reduced by approximately [0.0555, 1.1775]s, [0.0301, 1.3527]s, and [0.0581, 1.2553]s, respectively. Specifically, compared to fixed location, distance-first, AC-MARL, and Pre-PPO strategies, the average latency is reduced by approximately 0.8165s, 0.1236s, 0.1385s, and 0.2746s, respectively.
[0125] To verify the role of each module in the overall model, five ablation experiments were designed in this embodiment: using only the explicit coupling graph (without Implicit), using only the implicit coupling graph (without Explicit), removing the migration mode selection module (without Migration Selector), removing the soft constraint co-location mechanism (without Co-location), and using DQN to replace PPO for optimization (DQN-based). Table 1 shows the ablation experiment results of each module of the migration decision model of this invention in the Town03 scenario in this embodiment. Table 2 shows the ablation experiment results of each module of the migration decision model of this invention in the Town04 scenario in this embodiment. Table 3 shows the ablation experiment results of each module of the migration decision model of this invention in the Town06 scenario in this embodiment.
[0126]
[0127] Table 1
[0128]
[0129] Table 2
[0130]
[0131] Table 3
[0132] As shown in Tables 1 to 3, regarding the impact of explicit versus implicit coupling graphs, the performance of all metrics is inferior to the full version, regardless of whether only explicit or implicit coupling graphs are used. (i) As shown in Table 1, the average latency increases by approximately 0.022 seconds in the Town03 scenario when only implicit coupling graphs are used. (ii) As shown in Table 23, in the Town04 scenario with 60 vehicles, the average latency increases by 0.0850 seconds when only explicit coupling graphs are used. (iii) Under all scenario and vehicle number settings, the average latency increases by 0.0447 seconds when using explicit coupling graphs alone, and by approximately 0.0497 seconds when using implicit coupling graphs alone. The fundamental reason is that explicit coupling graphs can depict the direct functional dependencies between sub-models, while implicit coupling graphs reflect potential interaction relationships, such as the synergistic effects between multiple vehicles. The absence of either graph will lead to inaccurate resource demand modeling, resulting in suboptimal resource allocation, decreased resource matching, and increased latency.
[0133] Regarding the impact of the migration mode selection module, experimental results show that removing the migration mode selection module leads to a certain performance decrease in the present invention. (i) As shown in Table 2, in the Town04 scenario, the splitting degree increases by a maximum of approximately 0.0129; (ii) Considering all scenarios and vehicle scales, the average latency increases by approximately 0.0434 seconds. The fundamental reason for this phenomenon is that the migration mode selection module can adaptively select between overall migration and partial migration based on the vehicle's movement mode and server status: when a large number of vehicles migrate out of a certain area, overall migration can better ensure state consistency; while in the case of local adjustments, partial migration can significantly reduce data transmission volume. Without this module, the system is forced to adopt a single migration strategy, which may result in excessively high migration overhead in some scenarios and prolonged latency in others, lacking flexibility and adaptability. This non-adaptive migration strategy directly weakens the stability of the present invention in dynamic environments.
[0134] Regarding the impact of the soft-constraint co-location mechanism, experimental results show that the performance of this invention in all indicators is reduced after removing the soft-constraint co-location mechanism. (i) As shown in Table 2, in the Town04 scenario, the average latency increases by approximately [0.011, 0.057] s; (ii) As shown in Table 3, in the Town06 scenario, the average latency increases by approximately [0.0115, 0.0997] s; (iii) Under different scenarios and vehicle scales, the average bandwidth matching degree decreases by approximately 0.0144, and the average latency increases by approximately 0.04626 s. The fundamental reason is that the soft-constraint co-location mechanism guides highly interactive sub-models to be deployed co-located as much as possible, reducing the additional bandwidth consumption and transmission latency caused by cross-server communication. Without this mechanism, frequently interacting sub-models may be deployed separately on different servers, leading to longer communication links, increased bandwidth consumption, and further increased overall latency. The results show that the soft-constraint co-location mechanism not only optimizes bandwidth utilization but also indirectly improves the real-time performance of the system by shortening the communication path.
[0135] To evaluate the impact of the optimization algorithm on the performance of this invention, PPO was replaced with DQN for experiments. The results show that: (i) as shown in Table 1, in the Town03 scenario, using DQN reduced the average latency by approximately 1.456 s, but increased the average splitting degree by approximately 0.177; when the number of vehicles was 60, the storage resource matching degree improved by approximately 0.0519; (ii) as shown in Table 2, in the Town04 scenario, the average latency increased by approximately 1.549 s, and the average splitting degree increased by approximately 0.1856; (iii) considering all scenarios and vehicle sizes, the average splitting degree increased by approximately 0.1803, and the average latency increased by approximately 1.4725 s. The main reasons for the performance degradation are twofold: firstly, DQN is more suitable for discrete action spaces, while in this task, resource allocation and migration patterns are continuous decisions, making it difficult for DQN to efficiently approximate and generalize; secondly, PPO introduces a truncation update mechanism, maintaining a better balance between exploration and exploitation, making policy learning more stable. Therefore, it is evident that the advantages of PPO in continuous space optimization problems are crucial for the efficient operation of this invention.
[0136] In addition to scenario-specific analysis of single-module ablation, this embodiment further statistically analyzes the average performance of all ablation methods across various scenarios and vehicle counts from a global perspective. Compared to all ablation versions, the present invention achieves a maximum reduction in average latency of approximately 2.8331 seconds, a maximum reduction in average splitting degree of 0.4659, and a maximum reduction in average migration cost of approximately 0.0127 GB. Overall, the present invention demonstrates significant advantages in latency-sensitive connected vehicle environments.
[0137] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A method for fine-grained model-level twin migration in an intelligent transportation system, the method comprising: The method comprises the following steps: S1: Construct a digital twin transportation system, including physical space and twin space, where the physical space includes... A high-speed moving intelligent transportation entity , Each entity corresponds to a twin in the twin space. Each twin include Individual model, recording twin bodies The first in The sub-model is , Sub-model The task requirement vector is , , , Representing sub-models respectively Computing resource requirements, storage requirements, and communication bandwidth requirements; Deploying in digital twin transportation system heterogeneous edge servers , responsible for receiving, deploying and executing various sub-model tasks from the twin; the server 's resource vector is , where , , respectively represent the maximum computing resources, storage capacity and communication bandwidth of the server ; Deployment location variable Representative sub-model Whether deployed to a heterogeneous edge server , Representative sub-model Deployed on a server , Representative sub-model Not deployed on a server ; S2: constructing a twin migration decision model, comprising a coupled graph construction module, a migration mode selection module, a subgraph embedding module, and a model-level migration strategy optimization module, wherein: The coupling graph construction module is configured to generate a coupling graph of the sub-models according to feature data of the twin at the time instant to be decided The migration mode selection module is configured to perform subgraph division on the coupling relationship graph of each twin body to obtain sub-models migration mode subgraphs , and send all the migration mode subgraphs to the subgraph embedding module; The subgraph embedding module is configured to perform graph embedding on the subgraphs corresponding to all the twins respectively, and the initial features of the nodes of each submodel are generated according to the feature data of the twins at the time point to be decided, and the embedding features are obtained through the graph embedding. , wherein, , The embedding features are then sent to the model-level migration strategy optimization module. The model-level migration strategy optimization module is configured to employ reinforcement learning to determine the migration pattern subgraph for all twins and the remaining resource vectors of all servers to generate a deployment location variable matrix for the time instant to be decided wherein, , represent the remaining computing resources, the remaining storage capacity and the remaining communication bandwidth of the servers , respectively, and the elements in the deployment location variable matrix represent the deployment of a sub-model in the th migration pattern subgraph to the th server , represent the non-deployment of a sub-model in the th migration pattern subgraph to the th server ; the reinforcement learning parameters are set as follows: The state space is set to ; The action space is set to , i.e. the deployment location variable ; The calculation formula of the reward function is as follows: , wherein, , , respectively represent preset weights, represents resource matching degree, represents migration and execution delay overhead, represents subgraph collaborative structure destruction cost, wherein: Resource matching degree The calculation formula is as follows: , wherein, represents the change of the computing resource of the server after this migration, represents the change of the storage space of the server after this migration, represents the change of the communication bandwidth of the server after this migration; Delay overhead The formula for calculating the delay overhead is as follows: , wherein, denotes a transmission delay, denotes a computation delay; Cost of disruption The formula for calculating the cost of disruption is as follows: , wherein, represents the number of servers on which the represents the average coupling strength of the number of servers for controlling the split tolerance; S3: setting a training sample set according to actual needs to train the twin migration decision model, and obtaining a trained twin migration decision model; S4: When twin migration decisions are required, collect data for each twin. Each sub-model The characteristic data, and each server Remaining resource vector Then, the trained twin migration decision sub-model is input to obtain the deployment location variable matrix. And based on this, each sub-model is obtained. Corresponding deployment location variable This completes the transfer of the twin sub-model.
2. The fine-grained model-level twin migration method of claim 1, wherein, The feature data includes a feature matrix and a feature matrix , and the generation method is as follows: generating a feature vector according to the input data and the output data of each sub-model in the twin body at the time to be decided, and each feature vector includes a sub-model type code, a sub-model deployment location variable, a resource demand vector, and original data features; The input data feature vector and output data feature vector of each sub-model are combined to form a... eigenmatrix Represent the dimension of the feature vector, and then... The feature matrix is obtained by concatenating the feature matrices of the sub-models. ; each sub-model The input data feature vector and the output data feature vector are concatenated to form a... The feature vector, then The feature matrix is obtained by concatenating the feature vectors of the sub-models. .
3. The fine-grained model-level twin migration method of claim 2, wherein, The coupled graph construction module comprises a self-attention module, a graph embedding module, a decoding module, and a fusion module, wherein: The self-attention module is used to apply a self-attention mechanism to the feature matrix. The process is performed to obtain the initial attention matrix. Then according to The window will initialize the attention matrix. Divided into Each submatrix is used to calculate the mean of the four attention values in each submatrix, thus obtaining the attention matrix. , attention matrix The adjacency matrix is used as the explicit coupling relationship graph between sub-models and sent to the graph embedding module and the fusion module; The graph auto-encoding module is configured to encode a feature matrix into a feature vector for each row vector as a sub-model, and an attention matrix The graph embedding is performed as a sub-model of the adjacency matrix to obtain an embedding feature matrix , represents the dimension of the graph embedding feature, and then the embedding feature matrix is sent to the decoding module; The decoding module is configured to generate an adjacency matrix of an implicit coupling relationship graph among the sub-models according to the embedding feature matrix The decoding module is configured to generate an adjacency matrix of an implicit coupling relationship graph among the sub-models according to the embedding feature matrix wherein represents an activation function, and a superscript T represents a transpose, and then the adjacency matrix is sent to the fusion module; A fusion module for fusing an adjacency matrix of an explicit coupling graph and an adjacency matrix of an implicit coupling graph to obtain a weighted fused coupling graph : , wherein, is a fusion weight.
4. The fine-grained model-level twin migration method of claim 1, wherein, The specific method of the migration mode selection module is as follows: For the coupling relationship graph For each sub-model node, its weighted metric is calculated using the following formula : , wherein, represents a coupling relationship graph the coupling relationship between the first sub-model node and the second sub-model node; The skewness-aware score of each sub-model node is calculated using the following formula : , wherein, , represents a coupling relationship graph the mean and standard deviation of the weighted metrics of all sub-model nodes in the coupling relationship graph According to the skewness perception score The coupling relationship graph All sub-models in the middle are divided into three sets: (Head, strong-coupling core submodel), (Mid, mid-coupling sub-model), (Tail, weakly coupled or independent sub-models) wherein, represents a preset threshold value; record set Each sub-model in the set is a core, and a greedy mechanism is used to connect the sub-models in the remaining sub-models that are strongly associated with the core sub-model to the core sub-model to obtain a sub-graph. If there is a sub-model in the remaining sub-models that cannot be connected to the core sub-model, it is separately taken as a sub-graph. All the obtained sub-graphs are taken as the coupling relationship graph The corresponding migration mode sub-graph.
5. The fine-grained model-level twin migration method of claim 4, wherein, The migration mode subgraph is optimized by using the following method: selecting one sub-model from each of the current two sub-graphs to exchange, calculating the optimization objective function before and after the exchange : , wherein and are adjustable balancing parameters; If the optimized objective function after the exchange is smaller, the subgraph after the exchange is retained, otherwise the subgraph before the exchange is restored; the above process is repeated until a preset maximum number of iterations is reached.