Cooperative meta-universe-digital twin system for traffic perception, reasoning and resource scheduling
By constructing a three-layer collaborative architecture and using MTMoE analysis, combined with a multi-agent system, the fragmentation of resource status perception and the generalization of scheduling in intelligent transportation by digital twin systems were solved, achieving efficient resource scheduling and situational awareness, and improving the intelligence and adaptability of the system in high-concurrency scenarios.
Patent Information
- Application Number
- CN202511101937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
Digital twin systems in intelligent transportation systems suffer from fragmented multi-level resource status perception, lack of semantic-policy linkage, and poor generalization of cross-domain scheduling. This limits the improvement of intelligence in high-concurrency scenarios, and the metaverse domain lacks practical, systematic design methods.
A three-layer collaborative architecture consisting of an infrastructure layer, a virtualized twin resource layer, and a situational awareness layer is constructed. Multi-level semantic analysis is performed using MTMoE, and combined with structure-aware transfer algorithms and multi-agent systems, a unified embedded representation and scheduling optimization of resource scheduling strategies are achieved.
It improves the efficiency and intelligence of resource scheduling in the traffic environment, realizes global resource situation awareness and regional traffic collaborative awareness, supports semantic-policy linkage and dynamic closed-loop optimization of heterogeneous resources, and enhances the system's adaptability and collaborative capabilities in high-concurrency scenarios.
Smart Images

Figure CN120998023A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin system technology, specifically to a collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling. Background Technology
[0002] Digital twins, as a key technology in current intelligent transportation systems, achieve virtual mirror representations of real-world traffic objects through high-fidelity modeling and synchronous mapping of physical traffic elements, providing a solid foundation for resource status assessment, operational situation prediction, and operational strategy simulation. The metaverse emphasizes semantic modeling, interactive immersion, and multi-agent behavior simulation in virtual space, exhibiting unique advantages in immersive visualization, human social attribute modeling, and multi-agent interaction. Although digital twins have made progress in areas such as edge computing offloading and multi-agent optimization, they still face three major bottlenecks: fragmented multi-level resource status perception, lack of semantic-policy linkage, and poor generalization of cross-domain scheduling, which restrict the improvement of system intelligence in high-concurrency scenarios. Furthermore, most current research in the metaverse field remains at the level of theoretical integration with traffic scenarios or conceptual models, lacking systematic design methods geared towards practical applications. Summary of the Invention
[0003] Purpose of the invention: To address the above-mentioned shortcomings, a traffic situation perception and multi-agent resource scheduling model that integrates digital twin and metaverse semantic modeling is proposed, aiming to solve the problem of efficient perception and scheduling in complex and ever-changing intelligent transportation environments.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling includes the following steps:
[0006] S1: Construct a three-layer collaborative architecture consisting of an infrastructure layer, a virtualized twin resource layer, and a situational awareness layer;
[0007] S2: The virtualized twin resource layer uses digital twin technology to map transportation facilities and cloud, edge, and terminal resources in the infrastructure layer into a virtual network;
[0008] S3: The situational awareness layer performs multi-level semantic analysis on traffic data in the virtual network through the Metaverse Mixture of Experts (MTMoE) system, which is driven by the metaverse, and then outputs situational information on global resources, regional traffic and local terminal devices.
[0009] S4: Use the existing structure-aware transfer algorithm to process the heterogeneous resources in the virtual network, obtain a unified embedded representation, and then provide it to the multi-agent system;
[0010] S5: The multi-agent system outputs a resource scheduling strategy based on the situational information provided by MTMoE and the unified embedded representation provided by the structure-aware transfer algorithm.
[0011] S6: The virtualized twin resource layer performs resource scheduling on the virtual network according to the resource scheduling policy;
[0012] S7: Existing mainstream traffic resource scheduling methods are compared and evaluated based on key indicators such as task acceptance rate, long-term average revenue, long-term revenue-cost ratio, and marginal congestion index.
[0013] In step S1, a three-layer collaborative architecture is constructed, which forms a closed-loop system centered on perception, reasoning, and scheduling. The infrastructure layer is responsible for collecting raw data from the traffic environment, including physical entities such as road infrastructure, vehicles, pedestrians, and traffic signal equipment, as well as computing resources at the cloud, edge, and terminal levels.
[0014] In step S2, the virtual network consists of virtual nodes and virtual links. The virtual nodes are obtained by mapping transportation facilities and cloud, edge and terminal resources using digital twin technology. The virtual links are obtained by mapping the network communication links of various transportation facilities using digital twin technology.
[0015] In step S3, MTMoE processes cloud, edge, and terminal resources and traffic scene semantics in the virtual network separately through a unified encoder, and then fuses them into the traffic state vector T at the current moment. input The formula is as follows:
[0016] T input =φ(w f ·[X c ;X e ;X l ;X s ]+b f (1)
[0017] Among them, X c ,X e ,X l and X s These represent the cloud, edge, and terminal resource vectors and the scene semantic vector, respectively, after being processed by the encoder. f and b f These represent the weights and bias terms of the fusion layer, respectively, and φ is the ReLU activation function.
[0018] For the traffic state vector T at each time step input The gating network of MTMoE calculates the expert activation weights through an attention mechanism and selects the corresponding expert to be responsible for situation feature extraction according to the top-k principle.
[0019] The cloud expert outputs global load and resource reservation information through the Transformer, the edge expert outputs regional congestion and traffic flow information through the Graph Attention Network, the terminal expert outputs terminal device status information through the LSTM, and finally the fusion module generates the final situation vector y. MoE The formula is as follows:
[0020]
[0021] Among them, g i and y i These represent the expert activation weights and the situational information output by the experts, respectively.
[0022] In step S4, the structure-aware transfer algorithm first models the virtual resources in the cloud, edge, and terminal as a multi-relationship heterogeneous resource topology graph, denoted as:
[0023] G t =(ν,ε,R) (3)
[0024] Where ν represents the set of cloud, edge, and terminal nodes, ε represents the set of edges formed by nodes with task dependencies, R represents the edge type, including cloud-to-edge and edge-to-local semantic annotations; and the state vector of each node at time t. This includes resource capacity, resource utilization, requested task attributes, and virtual network status information, and can be represented as:
[0025]
[0026] For the state vector of each node Dimension alignment and preliminary feature transformation are performed using an MLP to obtain... Then, resource topological features are aggregated using a graph attention network, as shown in the following formula:
[0027]
[0028] in, W represents the feature representation of node i at layer l. (l) Let N be the learnable feature transformation matrix, σ be the ReLU activation function, and N be the N+10 ... i Let i be the set of neighbors of node i. It is the normalized coefficient of the influence of neighbor j on node i, calculated through the attention mechanism. It can be calculated using the following formula:
[0029]
[0030] Among them, gu The semantic attention weights provided for the MTMoE perception system, β controls g u The extent of influence in graph attention aggregation;
[0031] Finally, the representation of each node in round L. The topological feature matrix H(t) of all nodes at this time is obtained by collecting data row by row, and a unified embedding representation S of the current state is generated by using a Set Transformer structure. emb .
[0032] In step S5, the multi-agent system combines the real-time situational information provided by MTMoE with the unified embedded representation S generated by the structure-aware transfer algorithm. emb As a global state, following the CTDE training paradigm, a global Critic network and independent Actor-Critic structures within cloud, edge, and terminal agents output a scenario-adaptive resource scheduling strategy.
[0033] In step S6, resource scheduling involves scheduling the computing and storage resources of virtual nodes in the virtual network, updating the scheduled virtual network, and then mapping the updated virtual network to the infrastructure layer.
[0034] In step S7, the method is compared and evaluated with existing mainstream traffic resource scheduling methods on key indicators such as task acceptance rate, long-term average revenue, long-term revenue-cost ratio, and edge congestion index. Task acceptance rate is an important indicator in network resource scheduling, representing the proportion of successfully embedded virtual network requests out of the total requests. Its calculation formula is as follows:
[0035]
[0036] in, This represents the number of VNRs successfully embedded into the physical network during the entire scheduling process, while It is the sum of all VNRs throughout the entire process;
[0037] Long-term average returns reflect the algorithm's ability to optimize resource allocation and scheduling over a long period, as well as the resulting economic benefits. The calculation formula is as follows:
[0038]
[0039] in, This represents the virtual node n. v The resource demand, p c This represents the unit price of the computational resource. This represents the demand for virtual link resources, p b Indicates the unit price of bandwidth link resources;
[0040] The long-term benefit-cost ratio (R / C) is used to measure the economic benefits of resource allocation, and its calculation formula is as follows:
[0041]
[0042] in, This represents the total resource cost consumed in embedding a VNR within a time range T, and the corresponding formula is as follows:
[0043]
[0044] The edge congestion index focuses on the overall congestion level of a traffic area. A higher congestion index indicates severe congestion in the area where the edge node is located. The calculation formula is as follows:
[0045]
[0046] Among them, c i Let c be the congestion score for the i-th region. i The calculation formula is as follows:
[0047]
[0048] Among them, w1 and w2 are the speed weight and flow weight, respectively; Let be the average speed of all vehicles in the i-th region. Let q be the free-flow velocity in the i-th region when there is no congestion; i Let be the traffic volume carried by the i-th region. This represents the theoretical maximum service capacity of the i-th region under given conditions.
[0049] This invention targets intelligent transportation application scenarios, integrates the concepts of metaverse and digital twins, and proposes a three-layer collaborative architecture comprising a physical infrastructure layer, a virtual twin resource layer, and a traffic situation awareness layer. This forms a closed-loop system with "perception-reasoning-scheduling" as its core logic. Based on layered modeling and semantic decoupling, this architecture combines a cloud-edge-device distributed computing environment to design a differentiated perception and linkage control mechanism for heterogeneous resources, realizing semantic-level task scheduling, virtual-physical collaborative perception, and collaborative operation support under multi-level computing platforms.
[0050] This invention constructs MTMoE, which integrates metaverse semantic modeling capabilities with a hybrid expert structure. It proposes a context-driven expert selection and routing scheduling mechanism to achieve semantic fusion perception of multi-level and multi-factor behaviors. This scheduling mechanism can distinguish between three types of perception needs: global trends, regional flows, and local anomalies, and match them with corresponding level expert models for collaborative perception. It has scene adaptability and behavior prediction capabilities.
[0051] This invention proposes a multi-agent adaptive scheduling mechanism that integrates semantic awareness and digital twin mapping. Based on virtualized resource topology and contextual situational awareness information, a multi-agent cloud-edge-device hierarchical scheduling framework is designed to realize perception-driven and policy linkage of heterogeneous computing resources. At the same time, a structure transfer algorithm is introduced to deal with the policy generalization problem under inconsistent resource structures, support dynamic closed-loop optimization of semantics-policy-resources, and improve the global coordination capability and scenario adaptability of scheduling. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating the system of the present invention;
[0053] Figure 2 This is a framework diagram of the system of the present invention;
[0054] Figure 3 This is a diagram of the MTMoE architecture of the system of the present invention.
[0055] Figure 4 This is a cloud expert model diagram of the system of the present invention;
[0056] Figure 5 This is a diagram of the edge expert model of the system of the present invention;
[0057] Figure 6 This is a diagram of the terminal expert model of the system of the present invention;
[0058] Figure 7 This is a diagram of the multi-agent resource scheduling framework of the system of the present invention; Detailed Implementation
[0059] Step 1: Construct a three-layer intelligent transportation collaborative architecture, including an infrastructure layer, a virtualized twin resource layer, and a situational awareness layer. These layers together form a closed-loop system centered on perception, reasoning, and scheduling. The infrastructure layer is responsible for collecting raw data from the traffic environment, including physical entities such as road infrastructure, vehicles, pedestrians, and traffic signal equipment, as well as computing resources at the cloud, edge, and terminal levels. The virtualized twin resource layer maps traffic facilities and cloud, edge, and terminal resources into a virtual network using digital twin technology. Subsequently, the situational awareness layer outputs real-time traffic scenario situational information through MTMoE. Finally, the multi-agent system of the virtualized twin resource layer outputs resource scheduling strategies based on the situational information provided by MTMoE and the unified embedding representation provided by the structure-aware transfer algorithm.
[0060] Step 2: The virtual network consists of virtual nodes and virtual links. The virtual nodes are obtained by mapping transportation facilities and cloud, edge and terminal resources using digital twin technology. The virtual links are obtained by mapping the network communication links of various transportation facilities using digital twin technology.
[0061] Step 3: The process of MTMoE outputting situational information mainly includes generating the traffic state vector T. input and output the final situation vector y MoE Two parts.
[0062] Generate traffic state vector T input The specific steps are as follows:
[0063] 1. The semantics of cloud, edge, terminal resources, and traffic scenarios in the virtual network resource topology diagram are denoted as:
[0064] X in ={X cloud ,X edge ,X local C scene} (1)
[0065] The unified encoder encodes the four sub-vectors separately. The cloud resource encoding calculation formula is as follows:
[0066] X c =σ(W c X cloud +b c (2)
[0067] Among them W c and b c These represent the weights and biases, respectively.
[0068] The formula for calculating edge resource coding is as follows:
[0069] X e =GNN-pool(X edge A e (3)
[0070] Where A e This is an adjacency matrix between regions, such as those belonging to the same administrative region or those that are closest to each other.
[0071] The formula for calculating the terminal device code is as follows:
[0072]
[0073] Where α i Attention weights;
[0074] The formula for calculating scene semantic encoding is as follows:
[0075] x s =Embed(C scene (5)
[0076] 2. Merge the encoded resource vectors into the traffic state vector T for the current moment.input The formula is as follows:
[0077] T input =φ(w f ·[X c ;X e ;X l ;X s ]+b f (6)
[0078] Among them, X c ,X e ,X l and X s These represent the cloud, edge, and terminal resource vectors and the scene semantic vector, respectively, after being processed by the encoder. f and b f These represent the weights and bias terms of the fusion layer, respectively, and φ is the ReLU activation function.
[0079] Output the final situation vector y MoE The specific steps are as follows:
[0080] 1. For the traffic state vector T at each time step input The gated network of MTMoE calculates expert activation weights through an attention mechanism, using the following formula:
[0081]
[0082] Among them, w i Let be the weight of the i-th expert in the gating space; ò i Standard Gaussian noise is used to prevent expert collapse and enhance the model's robustness to input perturbations; g i This represents the weight of each expert's assessment of the current input. Then, the top-k experts are selected to form an expert set S. topk =topk(g1,g2,...g M ), the activated expert E i ∈S topk The reasoning for specific task submodules will be performed. Each expert uses a shared unified traffic state vector T. input As input, a specific mapping function is executed, and abstract representations are formed by experts learning different levels of situational information:
[0083] 2. Cloud expert network for input vector T input Injecting absolute temporal information yields the position encoding vector, calculated using the following formula:
[0084]
[0085]
[0086]
[0087] Where d is the input vector T input The dimension;
[0088] The cloud expert network extracts hierarchical temporal features from positional encoding vectors using multiple Transformer Encoders, and aggregates the temporal sequences into a global vector h using pre-defined aggregation tags. G ;
[0089] Finally, two sets of feedforward networks were used to extract h... G Extracting regional load information and resource reservation information, and then splicing them together, yields cloud status information y1.
[0090] 3. Edge expert networks for input vector T input Edge state, scene state vector x e and x s Perform feature fusion:
[0091] x f =LayerNorm(W f [x e ;x s ]+b f (11)
[0092] Construct a road network graph G = {V, E}, where the node set V = {v1, ..., v} N} represents N road segment regions; edge set It consists of actual road adjacency relationships; then, a self-loop normalized adjacency matrix is constructed:
[0093]
[0094] Where A is the original adjacency matrix and D is the degree matrix. Each node v i The initial eigenvector at the current time t From the fusion vector x f The initial vectors of all nodes are mapped and stacked row-wise to obtain the initial node feature matrix:
[0095]
[0096] Where l represents the number of network layers, This represents the feature vector of the i-th node at time t in the 0th layer of the graph neural network;
[0097] A graph attention network is used to iteratively update node representations. For each layer l = 0, ..., L-1, the input is X. (t,l) The output is X (t,l+1) The specific calculation process is as follows:
[0098] For each pair of adjacent nodes (v i ,v j Linear mapping is performed on the eigenvectors of ).
[0099]
[0100] Then, the features are aggregated and normalized:
[0101]
[0102] After multiple iterations until the L-level update is completed, the final node representation is obtained:
[0103]
[0104] Where, d out The dimension of the feature vector output by each node in the last layer of the graph attention network;
[0105] Finally, a linear mapping is used to obtain h i Extract regional congestion and traffic flow prediction information, and then stitch them together to obtain edge situation information y2.
[0106] 4. Terminal expert network on input vector T input terminal state vector x l Linear projection and dimensionality reduction are performed to obtain a low-dimensional vector x. Then, LSTM is used to update each device j in vector x at each time t. Finally, the hidden state output h is obtained. t,j ;
[0107] Finally, a linear mapping is used to obtain h t,j Extract device status information and device location information, and then concatenate them to obtain terminal situation information y3.
[0108] 5. The final stage of the MTMoE model is to fuse the outputs of multiple activation experts according to gating weights to form a global situational awareness. The calculation method is as follows:
[0109]
[0110] Step 4: Use the structure-aware transfer algorithm to process heterogeneous resources in the virtual network. This mainly includes two parts: modeling cloud, edge, and terminal virtual resources as a multi-relationship heterogeneous resource topology graph and generating a unified embedded representation.
[0111] The specific steps for modeling a multi-relationship heterogeneous resource topology graph are as follows:
[0112] 1. The structure-aware transfer algorithm first models the virtual resources in the cloud, edge, and terminal as a multi-relationship heterogeneous resource topology graph, denoted as:
[0113] G t =(v,ε,R) (18)
[0114] Where ν represents the set of cloud, edge, and terminal nodes, ε represents the set of edges formed by nodes with task dependencies, R represents the edge type, including cloud-to-edge and edge-to-local semantic annotations; and the state vector of each node at time t. Information including resource capacity, resource utilization, requested task attributes, and virtual network status can be represented as:
[0115]
[0116] The specific steps for generating a unified embedding representation are as follows:
[0117] 1. The state vector of each node Dimension alignment and preliminary feature transformation are performed using an MLP to obtain...
[0118] 2. Aggregate resource topology features using a graph attention network, as shown in the following formula:
[0119]
[0120] in, W represents the feature representation of node i at layer l. (l) Let N be the learnable feature transformation matrix, σ be the ReLU activation function, and N be the N+10 ... i Let i be the set of neighbors of node i. It is the normalized coefficient of the influence of neighbor j on node i, calculated through the attention mechanism. It can be calculated using the following formula:
[0121]
[0122] Among them, g u The semantic attention weights provided for MTMoE, β controls g u The extent of influence in graph attention aggregation;
[0123] 3. After completing the graph encoding, the representation of each node in the Lth round is obtained. It includes node i's own state, neighbor topological relationships, and traffic semantic information. Then, it collects the topological feature matrix of all nodes at that time row by row:
[0124]
[0125] 4. Generate a unified embedded representation S from H(t) using a Set Transformer structure.emb .
[0126] Step 5: Multi-agent reinforcement learning mainly includes four parts: constructing the global state space, designing the reward function, designing the action space, and designing the multi-agent policy learning algorithm and training mechanism.
[0127] The specific steps for constructing the global state space are as follows:
[0128] 1. Combine the real-time situational information provided by MTMoE with the unified embedding representation S generated by the structure-aware transfer algorithm. emb As a global state, it is denoted as:
[0129] S(t)={C(t),U(t),Task(t),E(t),P(t),H(t)} (23)
[0130] Where C(t) and U(t) represent the resource capacity and usage of all nodes at time t, respectively; Task(t) represents the request task attributes of all nodes at time t (required resources, maximum tolerable delay, priority weight, etc.); E(t) represents the virtual network state of all nodes at time t; P(t) represents the traffic situation information provided by MTMoE to the agents at time t; and H(t) represents the topological characteristics of all nodes. In the multi-agent framework, each agent determines its topological characteristics based on its local observations. i In conjunction with the global state S(t), resource scheduling is carried out in coordination;
[0131] The specific steps for designing the reward function are as follows:
[0132] 1. To guide efficient collaboration among cloud, edge, and terminal intelligent agents and solve cross-layer optimization challenges, a differentiated individual reward mechanism is proposed, designed as follows:
[0133] The individual reward function for the cloud intelligent agent is designed as follows:
[0134] r cloud =B cross +U preres -D cloud -E cloud (twenty four)
[0135] Among them, U preres D represents the reserved resource utilization rate. cloud B is penalized for delays in cloud tasks. cross E represents cross-domain equilibrium. cloud Energy consumption for cloud resources;
[0136] The individual reward function for the edge agent is designed as follows:
[0137] r edge =S term -Bload -L edge -E edge (25)
[0138] Among them, S term L represents the satisfaction rate of downstream terminal requests. edge and E edge B represents edge task latency penalty and edge power consumption penalty, respectively. load This indicates the edge load balance and encourages edge agents to achieve lower edge load.
[0139] The individual reward function for the terminal intelligent agent is designed as follows:
[0140] r local =T efficiency +R social -L local -E local (26)
[0141] Among them, T efficiency For task completion efficiency, L local and E local R represents terminal task latency penalty and terminal resource energy consumption, respectively. social The social attribute reward is used to enable the terminal intelligent agent to make emergency decisions based on social attributes, and is set as follows:
[0142] R social =S·η·e -t / T (27)
[0143] Among them, e (-t / T) The time decay term is defined as follows: t represents the delay time from event occurrence to response, T represents the decay constant, S represents the event severity score, and η represents the impact range coefficient. It is set as follows:
[0144]
[0145] Where, N effected Represents the number of affected nodes (the statistical range of affected nodes includes all terminal nodes within a circular area with a radius of 3 units centered at the location of the event), N local Let λ be the total number of terminal nodes, and λ be the sparsity penalty factor, set to 1.5.
[0146] 2. To effectively avoid local optima and policy conflicts caused by the "selfish" strategies of various agents, a global reward function is set to incentivize cooperation among the agents, as follows:
[0147] r total =η ce +η el +U total -Ltotal -E total (29)
[0148] Among them U total For total resource utilization rate, L total and E total η represents the total latency and total resource energy consumption of the cloud, edge, and terminal, respectively. ce and η el These are cloud-edge collaboration efficiency and edge-device collaboration efficiency, respectively.
[0149] The specific steps for motion space design are as follows:
[0150] 1. Cloud, edge, and terminal intelligent agents have their own actions based on task requirements. The tasks of the cloud intelligent agent are cloud and edge resource coordination and scheduling, edge task processing, and long-term resource reservation; the tasks of the edge intelligent agent are edge and terminal resource coordination and scheduling and terminal task processing; the tasks of the terminal intelligent agent are task segmentation, event detection, and task priority determination. Action space a t It consists of actions from three types of intelligent agents: cloud, edge, and terminal, and is configured as follows:
[0151] a t ={a 1,t ,a 2,t ,a 3,t} (30)
[0152] 2. Where a i,t The action sampled by each agent at time t is defined by the following formula:
[0153] a i,t ={u i (t),v i (t),p i (t),f i (t)} (31)
[0154] Among them, u i (t) represents the task matching type or scheduling priority decision, v i (t) represents the task allocation ratio, p i (t) represents the transmission power or channel scheduling parameter, f i (t) represents the allocation of computational resources. Each action is mapped to a specific scheduling behavior. The resource and task scheduling of the control node, and the overall state transition and scheduling are jointly completed by multiple agents. The action information is shown in the table below.
[0155] The specific steps for designing multi-agent policy learning algorithms and training mechanisms are as follows:
[0156] 1. The resource scheduling process follows the CTDE paradigm and is divided into two stages: centralized training and distributed execution. During training, a global Critic evaluates the joint actions; during execution, each agent autonomously generates a strategy using its independent Actor-Critic structure.
[0157] 2. Data Acquisition: First, each agent i collects data according to the current policy π. θi (a i,t |s t Sampling local action a i,t and action group a t =(a 1,t ,a 2,t ,a 3,t ) are sent to the environment together, executed, and then return to the next state s. t+1 Real-time rewards for each agent i,t Then record the transition tuple (s) t ,a t ,r t ,s t+1 ) to experience replay pool D;
[0158] 3. Critic Network Update: During training, the Critic network needs to accurately evaluate the value of a given state-action pair. To achieve this, mean squared error loss is used to minimize the gap between the Critic prediction and the soft Bellman objective.
[0159]
[0160]
[0161] Where Q(s,a; φ) is the Critic network's estimate of the state-action pair (s,a); y is the soft Bellman objective value calculated using the target network, and the specific calculation formula is as follows:
[0162]
[0163]
[0164] Where γ∈(0,1) represents the discount factor, which discounts future rewards; and The parameter vector representing the target network is the Critic parameter φ for agent i. i and the global Critic parameter φ G A delayed copy; r i,t r represents the reward obtained by agent i at present. tThe global reward is minimized by gradient descent, allowing Critic to asymptotically approximate the true action value distribution, thus providing a reliable benchmark for subsequent advantage estimation.
[0165] 4. The Generalized Advantage Estimation (GAE) framework is used to calculate the multi-step advantage function. Local advantage and global advantage estimation are defined as follows:
[0166]
[0167] Where l represents the step index, L represents the length of the multi-step expansion (i.e., L steps are calculated from the current time t), and δ is the TD error, calculated using the following formula:
[0168]
[0169] Again and The weighted fusion is calculated using the following formula:
[0170]
[0171] Advantage value The data is passed to the Actor network for policy optimization.
[0172] 5. Actor network update. The PPO-Clip objective function is used with weighted advantage. Guiding policy gradient:
[0173]
[0174] The clip operation prevents the probability ratio r(θ) from changing too much, ensuring the robustness of the update by adjusting θ. i Gradient ascent is used to maximize this objective, thereby increasing the sampling probability of high-dominance actions. Here, r(θ) is the probability ratio, defined as:
[0175]
[0176] 6. Soft Target Update: Soft updates are performed on the target network parameters to avoid drastic fluctuations in target values, making the updates of Critic and Actor smoother and more stable. The formula is as follows:
[0177]
[0178]
[0179]
[0180] Where τ represents the smoothing parameter for soft updates, The Actor parameter represents agent i;
[0181] 7. Distributed Execution: The trained policy is distributed to corresponding cloud, edge, and terminal agents. Each agent operates based on local observations. i Each entity invokes its own policy network to select an action. If a sudden change in a key metric is detected, a local "resampling" mechanism is triggered, which resamples the current state. The policy network is invoked again to generate a new action.
[0182] Step Six: The digital twin system of the virtualized twin resource layer performs resource scheduling on the virtual network according to the scheduling strategy output by the multi-agent system, and updates the scheduled virtual network; then, the updated virtual network is mapped to the infrastructure layer; finally, the digital twin system remaps the transportation facilities and cloud, edge and terminal resources of the infrastructure layer into a new virtual network, thus forming a closed-loop system of "perception-reasoning-scheduling".
[0183] Step 7: Compare and evaluate key indicators such as task acceptance rate, long-term average revenue, long-term revenue-cost ratio, and edge congestion index with existing mainstream traffic resource scheduling methods. Task acceptance rate is an important indicator in network resource scheduling, representing the proportion of successfully embedded virtual network requests out of the total requests. Its calculation formula is as follows:
[0184]
[0185] in, This represents the number of VNRs successfully embedded into the physical network during the entire scheduling process, while It is the sum of all VNRs throughout the entire process;
[0186] Long-term average returns reflect the algorithm's ability to optimize resource allocation and scheduling over a long period, as well as the resulting economic benefits. The calculation formula is as follows:
[0187]
[0188] in, This represents the virtual node n. v The resource demand, p c This represents the unit price of the computational resource. This represents the demand for virtual link resources, p b Indicates the unit price of bandwidth link resources;
[0189] The long-term benefit-cost ratio (R / C) is used to measure the economic benefits of resource allocation, and its calculation formula is as follows:
[0190]
[0191] in, This represents the total resource cost consumed in embedding a VNR within a time range T, and the corresponding formula is as follows:
[0192]
[0193] The edge congestion index focuses on the overall congestion level of a traffic area. A higher congestion index indicates severe congestion in the area where the edge node is located. The calculation formula is as follows:
[0194]
[0195] Among them, c i Let c be the congestion score for the i-th region. i The calculation formula is as follows:
[0196]
[0197] Among them, w1 and w2 are the speed weight and flow weight, respectively; Let be the average speed of all vehicles in the i-th region. Let q be the free-flow velocity in the i-th region when there is no congestion; i Let be the traffic volume carried by the i-th region. This represents the theoretical maximum service capacity of the i-th region under given conditions.
[0198] The above description, in conjunction with the accompanying drawings, provides a detailed account of the embodiments of the present invention. The specific implementation methods described herein are merely illustrative of the system of the present invention. Those skilled in the art will recognize that, based on the principles of the present invention, various changes and modifications can be made to the specific implementation methods and applications. Therefore, this document should not be construed as a limitation of the present invention.
Claims
1. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling, characterized in that: Includes the following steps: S1: Construct a three-layer collaborative architecture consisting of an infrastructure layer, a virtualized twin resource layer, and a situational awareness layer; S2: The virtualized twin resource layer uses digital twin technology to map transportation facilities and cloud, edge, and terminal resources in the infrastructure layer into a virtual network; S3: The situational awareness layer performs multi-level semantic analysis on traffic data in the virtual network through the Metaverse Mixture of Experts (MTMoE) system driven by the metaverse, and then outputs situational information on global resources, regional traffic and local terminal devices. S4: Use the existing structure-aware transfer algorithm to process the heterogeneous resources in the virtual network, obtain a unified embedded representation, and then provide it to the multi-agent system; S5: The multi-agent system outputs a resource scheduling strategy based on the situational information provided by MTMoE and the unified embedded representation provided by the structure-aware transfer algorithm. S6: The virtualized twin resource layer performs resource scheduling on the virtual network according to the resource scheduling policy; S7: Compare and evaluate with existing mainstream traffic resource scheduling methods on key indicators such as task acceptance rate, long-term average revenue, long-term revenue-cost ratio, and marginal congestion index.
2. The collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S1, a three-layer collaborative architecture is constructed, which forms a closed-loop system centered on perception, reasoning, and scheduling. The infrastructure layer is responsible for collecting raw data from the traffic environment, including physical entities such as road infrastructure, vehicles, pedestrians, and traffic signal equipment, as well as computing resources at the cloud, edge, and terminal levels.
3. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S2, the virtual network consists of virtual nodes and virtual links. The virtual nodes are obtained by mapping transportation facilities and cloud, edge and terminal resources using digital twin technology. The virtual links are obtained by mapping the network communication links of various transportation facilities using digital twin technology.
4. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S3, MTMoE processes cloud, edge, and terminal resources and traffic scene semantics in the virtual network separately through a unified encoder, and then fuses them into the traffic state vector T at the current moment. input The formula is as follows: T input =φ(w f ·[X c ;X e ;X l ;X s ]+b f ) (1) Among them, X c ,X e ,X l and X s These represent the cloud, edge, and terminal resource vectors and the scene semantic vector, respectively, after being processed by the encoder. f and b f These represent the weights and bias terms of the fusion layer, respectively, and φ is the ReLU activation function. For the traffic state vector T at each time step input The gated network of MTMoE calculates expert activation weights through an attention mechanism and selects the corresponding experts to be responsible for situation feature extraction according to the top-k principle. Among them, cloud experts output global load and resource reservation information through Transformer, edge experts output regional congestion information and traffic flow information through graph attention network, and terminal experts output terminal device status information through LSTM. Finally, the fusion module generates the final situation vector y. MoE The formula is as follows: Among them, g i y i These represent the expert activation weights and the situational information output by the experts, respectively.
5. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S4, the structure-aware transfer algorithm first models the virtual resources in the cloud, edge, and terminal as a multi-relationship heterogeneous resource topology graph, denoted as: G t =(ν,ε,R) (3) Where ν represents the set of cloud, edge, and terminal nodes, ε represents the set of edges formed by nodes with task dependencies, R represents the edge type, including cloud-to-edge and edge-to-local semantic annotations; and the state vector of each node at time t. This includes resource capacity, resource utilization, requested task attributes, and virtual network status information, and can be represented as: For the state vector of each node Dimension alignment and preliminary feature transformation are performed using an MLP to obtain... Then, resource topological features are aggregated using a graph attention network, as shown in the following formula: in, W represents the feature representation of node i at layer l. (l) Let N be the learnable feature transformation matrix, σ be the ReLU activation function, and N be the N+10 ... i Let i be the set of neighbors of node i. It is the normalized coefficient of the influence of neighbor j on node i, calculated through the attention mechanism. It can be calculated using the following formula: Among them, g u The semantic attention weights provided for MTMoE, β controls g u The extent of influence in graph attention aggregation; Finally, the representation of each node in round L. The topological feature matrix H(t) of all nodes at this time is obtained by collecting data row by row, and a unified embedding representation S of the current state is generated by using a Set Transformer structure. emb .
6. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S5, the multi-agent system combines the real-time situational information provided by MTMoE with the unified embedded representation S generated by the structure-aware transfer algorithm. emb As a global state, following the CTDE training paradigm, a global Critic network and independent Actor-Critic structures within cloud, edge, and terminal agents output a scenario-adaptive resource scheduling strategy.
7. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S6, resource scheduling involves scheduling the computing and storage resources of virtual nodes in the virtual network, updating the scheduled virtual network, and then mapping the updated virtual network to the infrastructure layer.
8. A collaborative metaverse-digital twin system for traffic perception, reasoning, and resource scheduling as described in claim 1, characterized in that: In step S7, the method is compared and evaluated with existing mainstream traffic resource scheduling methods on key indicators such as task acceptance rate, long-term average revenue, long-term revenue-cost ratio, and edge congestion index. Task acceptance rate is an important indicator in network resource scheduling, representing the proportion of successfully embedded virtual network requests out of the total requests. Its calculation formula is as follows: in, This represents the number of VNRs successfully embedded into the physical network during the entire scheduling process, while It is the sum of all VNRs throughout the entire process; Long-term average returns reflect the algorithm's ability to optimize resource allocation and scheduling over a long period, as well as the resulting economic benefits. The calculation formula is as follows: in, This represents the virtual node n. v The resource demand, p c This represents the unit price of the computational resource. This represents the demand for virtual link resources, p b Indicates the unit price of bandwidth link resources; The long-term benefit-cost ratio (R / C) is used to measure the economic benefits of resource allocation, and its calculation formula is as follows: in, This represents the total resource cost consumed in embedding a VNR within a time range T, and the corresponding formula is as follows: The edge congestion index focuses on the overall congestion level of a traffic area. A higher congestion index indicates severe congestion in the area where the edge node is located. The calculation formula is as follows: Among them, c i Let c be the congestion score for the i-th region. i The calculation formula is as follows: Among them, w1 and w2 are the speed weight and flow weight, respectively; Let be the average speed of all vehicles in the i-th region. Let q be the free-flow velocity in the i-th region when there is no congestion; i Let be the traffic volume carried by the i-th region. This represents the theoretical maximum service capacity of the i-th region under given conditions.
Citation Information
Cited By
Multi-agent reinforcement learning Internet of Vehicles resource allocation method, device and system, and storage medium
CN121888210A