Traffic distribution and automatic optimization method and system based on generative AI

By employing a generative AI-based traffic distribution and automatic optimization method, and utilizing generative world models and reinforcement learning agents, the problems of concept drift and insufficient robustness of existing AI models in non-stationary environments are solved. This achieves high-fidelity simulation and policy optimization, thereby improving the system's adaptability and robustness.

CN121483041BActive Publication Date: 2026-07-21BEIJING XINGLIAN ZHIYING TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XINGLIAN ZHIYING TECHNOLOGY CO LTD
Filing Date
2025-11-26
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing AI models suffer from concept drift and insufficient robustness when facing non-stationary dynamic changes in urban traffic or network systems. They struggle to effectively cope with sudden events and complex emergent behaviors caused by multi-agent interactions, resulting in large discrepancies between simulation results and reality, and poor performance in the worst-case scenario.

Method used

We employ a generative AI approach for traffic distribution and automatic optimization. We train a generative world model (GWM) for high-fidelity modeling, simulate multiple policies in parallel, optimize policies using reinforcement learning agents, and adapt to dynamic changes through an online update mechanism to form a closed-loop feedback and proactively respond to the worst-case scenario.

Benefits of technology

It achieves high-fidelity simulation of complex system dynamics, improves the robustness and adaptability of the strategy, enables continuous optimization in non-stationary environments, solves the problems of concept drift and system crash in the worst case, and realizes end-to-end automatic optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121483041B_ABST
    Figure CN121483041B_ABST
Patent Text Reader

Abstract

The application provides a traffic distribution and automatic optimization method and system based on generative AI, and relates to the field of intelligent decision and control system, wherein the method comprises: (a) training a generative world model GWM, which is used for modeling the dynamic running state of a target traffic network containing multi-dimensional traffic data; (b) using the GWM, running counterfactual simulation on at least N candidate traffic distribution strategies in parallel to generate simulation deduction results corresponding to each of the N candidate traffic distribution strategies; (c) determining an optimal traffic distribution strategy from the N candidate traffic distribution strategies based on the simulation deduction results, and deploying the optimal traffic distribution strategy in the target traffic network; and (d) updating the GWM online in response to actual running data obtained from the target traffic network, so that the GWM adapts to the non-stationary dynamic changes of the target traffic network, thereby forming a closed-loop optimization feedback. The application realizes high-fidelity and counterfactual simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent decision and control systems, and in particular to a method and system for traffic distribution and automatic optimization based on generative AI. Background Technology

[0002] Currently, traffic distribution and optimization face increasingly severe challenges in areas such as urban traffic management and communication network resource allocation. Traditional traffic engineering techniques, such as traffic light timing schemes based on static rules or long-term statistical patterns, or traffic engineering techniques based on traditional MPLS, often suffer from complex configurations and a lack of flexibility. These systems cannot effectively cope with real-time, nonlinear network dynamics caused by sudden events, multi-agent interactions, or demand fluctuations.

[0003] To overcome these limitations, the field has begun to explore the introduction of artificial intelligence (AI) and digital twin technologies. For example, AI algorithms are used to analyze camera data to adaptively adjust traffic light timings or to build virtual models of traffic environments for simulated testing of autonomous driving. While these AI-based simulation systems have made some progress, they still face two fundamental technological gaps that remain unresolved:

[0004] 1. Adaptability Challenges (Concept Drift Problem): Existing AI models (such as digital twins) typically have static parameters once trained. However, real-world transportation or network systems are highly non-stationary. Whether it's the evolution of cyberattack methods or changes in traffic patterns in urban transportation due to construction, weather, holidays, or slow population growth, concept drift can occur. This continuous change in data distribution can cause AI model predictions to quickly become inaccurate, meaning a significant discrepancy arises between the simulation results and actual operational data. Current technologies generally lack an effective closed-loop update framework to intelligently manage the model's stability-plasticity tradeoff—that is, how to quickly adapt to new changes (plasticity) while preventing catastrophic forgetting of learned old knowledge (stability).

[0005] 2. Robustness Challenges (Vulnerability to Worst-Case Events): Existing AI training methods (such as standard reinforcement learning) typically aim to optimize the average performance of policies (e.g., reduce average latency). However, they are severely inadequate in terms of robustness to worst-case scenarios. Complex network systems, especially transportation systems, are rife with nonlinear emergent behaviors dynamically triggered by multi-agent interactions. While existing simulation techniques can test some edge cases, they often rely on random sampling, making it virtually impossible (i.e., extremely low sampling probability) to proactively and systematically discover physically possible but extremely rare emergent worst-case scenarios. Examples include ghost congestion caused by the cascading amplification of small perturbations in multiple vehicles, or network deadlock caused by specific queue overflows. Therefore, AI policies that perform well in the average case may lead to catastrophic system failures when deployed in the real world, especially when encountering such low-probability, high-impact events.

[0006] Therefore, there is an urgent need in this field for a new technical solution that can not only simulate the dynamics of complex systems with high fidelity, but also actively train to cope with the emergence of worst-case scenarios, significantly improve robustness, and intelligently update online to adapt to non-stationary dynamic changes and solve the concept drift problem. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for traffic distribution and automatic optimization based on generative AI, so as to solve the problems pointed out in the background art.

[0008] In a first aspect, the traffic distribution and automatic optimization method based on generative AI provided in the embodiments of the present invention includes:

[0009] (a) Train a generative world model (GWM) to model the dynamic operating state of a target traffic network containing multidimensional traffic data;

[0010] (b) Using the GWM, counterfactual simulations of at least N candidate traffic distribution strategies are run in parallel to generate simulation results for each of the N candidate traffic distribution strategies, where N is an integer greater than 1;

[0011] (c) Based on the simulation results, determine an optimal traffic distribution strategy from the N candidate traffic distribution strategies, and deploy the optimal traffic distribution strategy in the target traffic network; and

[0012] (d) In response to the actual operation data obtained from the target traffic network, the GWM is updated online so that the GWM adapts to the non-stationary dynamic changes of the target traffic network, thereby forming a closed-loop optimization feedback.

[0013] Optionally, the generative world model includes: a conditional diffusion model or a generative adversarial network.

[0014] Optionally, running the counterfactual simulation in step (b) includes:

[0015] In the simulated environment constructed by the GWM, predict the impact of the N candidate traffic distribution strategies on the multi-agent interaction dynamics in the target traffic network.

[0016] Optionally, determining the optimal traffic distribution strategy in step (c) includes:

[0017] The GWM is used as a simulated training environment for a reinforcement learning (RL) agent. The RL agent is trained through interaction with the simulated training environment, and the output strategy of the RL agent is used as the optimal traffic distribution strategy.

[0018] Optionally, the optimal traffic distribution strategy includes at least one selected from the group consisting of:

[0019] Adjustments to traffic signal timing schemes, generation of dynamic route planning suggestions for multiple vehicles, or strategies for allocating network computing and bandwidth resources.

[0020] Optionally, the online update of the GWM in step (d) includes:

[0021] Detect the deviation between the actual operating data and the simulation results of the GWM for the optimal traffic distribution strategy; and

[0022] The model parameters of the GWM are adjusted based on the deviation to minimize the conceptual drift between the actual dynamics of the target traffic network and the modeling dynamics of the GWM.

[0023] Optionally, the RL agent is trained to achieve a multi-objective optimization, which includes at least two of maximizing traffic throughput, minimizing average delay, and minimizing carbon emissions.

[0024] Optionally, training the RL agent includes performing a two-layer adversarial optimization step, which specifically includes:

[0025] In the probabilistic latent space learned by the generative world model to represent the dynamic compression representation of the target traffic network, an adversarial optimizer is established and configured to perform a non-random and gradient-based optimization search to locate a specific vector in the probabilistic latent space.

[0026] Define an adversarial objective function, and the adversarial optimizer performs the gradient-based optimization search through the adversarial objective function to actively identify the adversarial potential space vector that can maximize the probability of policy failure of the RL agent in subsequent scenarios or minimize the expected return of the current policy of the RL agent.

[0027] The decoder of the generative world model is driven by the adversarial latent space vector to generate physically consistent but adversarial simulation results. The physical consistency means that the simulation results are located on the data manifold that the generative world model has learned to ensure the realism of the scene. The adversarial means that the simulation results represent the worst-case emergent scenario. The worst-case emergent scenario includes at least a network deadlock mode or a ghost blockage mode caused by the dynamic interaction of multiple agents.

[0028] The adversarial simulation results are used as key training samples and iteratively incorporated into the training dataset of the RL agent to form an adversarial curriculum.

[0029] Optionally, the online update of the generative world model in step (d) includes running a bifurcation adaptive framework, which is used to collaboratively manage the stability and plasticity tradeoffs of the generative world model. The bifurcation adaptive framework specifically includes:

[0030] Set up a drift type classifier, configure the drift type classifier to continuously monitor the deviation between the actual running data and the simulation results, and classify the concept drift faced by the generative world model in real time as gradual drift or sudden impact by analyzing the statistical characteristics of the deviation. The statistical characteristics include at least the prediction error magnitude, data distribution shift rate and change time scale.

[0031] In response to the drift type classifier continuously detecting and classifying the progressive drift, a regularization-based continuous learning update mechanism is triggered. This mechanism calculates the importance of the model parameters of the generative world model to previously learned tasks and imposes a flexible regularization constraint on the model parameters that is proportional to the importance, thereby preventing catastrophic forgetting while slowly adapting to new data to minimize the progressive drift.

[0032] In response to the drift type classifier detecting and classifying the sudden impact as such, a meta-learning adaptation mechanism is triggered. This mechanism freezes the core parameters of the generative world model and treats newly acquired actual operational data related to the sudden impact as a few-sample task. It then uses a model-independent meta-learning algorithm to quickly train a policy adapter specific to the impact task.

[0033] Secondly, an embodiment of the present invention provides a traffic distribution and automatic optimization system based on generative AI, comprising:

[0034] One or more processors; and

[0035] A memory that stores instructions executable by the one or more processors.

[0036] The characteristic is that, when the instruction is executed by the one or more processors, it causes the system to perform the method described in any one of the first aspects above.

[0037] The present invention has achieved the following beneficial effects:

[0038] Achieving High-Fidelity and Counterfactual Simulation: By training a generative world model (GWM), this invention constructs a high-fidelity digital twin of a target network. Unlike the general simulations described in the background art, the GWM of this invention (e.g., a conditional diffusion model or GAN) is able to capture complex emergent behaviors arising from the dynamics of multi-agent interactions. More importantly, it allows the system to run counterfactual simulations in parallel, i.e., to explore what would happen if policy A were adopted, thereby exploring the possible consequences of different policies in greater depth.

[0039] Enhancing Policy Robustness: Addressing the robustness challenges in the background art, this invention proposes a two-layer adversarial optimization training step. Instead of passively waiting for edge cases to occur, it actively searches the probabilistic latent space of the GWM through an adversarial optimizer for vectors that could lead to policy failure, generating physically consistent but adversarial worst-case emergent scenarios (e.g., spectral congestion or network deadlock). By incorporating these key training samples into the adversarial curriculum, this invention forces the reinforcement learning agent to learn to cope with these low-probability, high-impact events, significantly improving the worst-case robustness of the policy when deployed in the real world.

[0040] Stability-Plasticity of Intelligent Management Models: Addressing the adaptive challenges (concept drift) in the background technologies, this invention establishes a closed-loop optimization feedback mechanism through online updates. Furthermore, this invention proposes a bifurcated adaptive framework to collaboratively manage the stability-plasticity trade-off of GWM. This framework intelligently distinguishes between gradual drift and sudden shocks through a drift type classifier. For gradual drift, the system employs regularization-based continuous learning to prevent catastrophic forgetting; for sudden shocks, the system uses a meta-learning adaptive mechanism to achieve instantaneous plasticity. This dual-channel mechanism ensures that GWM can operate stably and respond quickly in dynamic environments, solving the core challenges raised in the background technologies.

[0041] Achieving end-to-end automated optimization: This invention uses GWM as the training environment for reinforcement learning agents, realizing closed-loop automation of the entire process from simulation, training, deployment to online updates. It can continuously improve itself based on multi-objective optimization (e.g., balancing throughput, latency and carbon emissions), providing truly intelligent traffic distribution strategies for complex physical and digital networks.

[0042] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0043] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0044] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0045] Figure 1 This is a schematic diagram of the traffic distribution and automatic optimization method based on generative AI in an embodiment of the present invention;

[0046] Figure 2 This is a schematic diagram of a traffic distribution and automatic optimization system based on generative AI in an embodiment of the present invention. Detailed Implementation

[0047] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0048] Example 1: Figure 1 A flowchart of a traffic distribution and automatic optimization method based on generative AI is provided for embodiments of this application, such as... Figure 1 As shown, the method includes:

[0049] (a) Train a generative world model (GWM) to model the dynamic operating state of a target traffic network containing multidimensional traffic data;

[0050] (b) Using the GWM, counterfactual simulations of at least N candidate traffic distribution strategies are run in parallel to generate simulation results for each of the N candidate traffic distribution strategies, where N is an integer greater than 1;

[0051] (c) Based on the simulation results, determine an optimal traffic distribution strategy from the N candidate traffic distribution strategies, and deploy the optimal traffic distribution strategy in the target traffic network; and

[0052] (d) In response to the actual operation data obtained from the target traffic network, the GWM is updated online so that the GWM adapts to the non-stationary dynamic changes of the target traffic network, thereby forming a closed-loop optimization feedback.

[0053] The method provided in this embodiment works by establishing a four-stage closed-loop optimization feedback. First, in stage (a), the system trains a generative world model (GWM).

[0054] This training process utilizes massive amounts of historical, multidimensional traffic data collected from the target traffic network (e.g., an urban area containing hundreds of intersections and thousands of sensors). This data includes not only vehicle flow, speed, and density, but also weather conditions, time of day, holiday information, and known accident records. The GWM (e.g., a deep neural network model) learns from this data to build a deep probabilistic model capable of faithfully reproducing the dynamic operation of the network.

[0055] After training, the method proceeds to phase (b), which utilizes the GWM to run counterfactual simulations of at least N candidate traffic distribution strategies in parallel. In this phase, the system uses the GWM as a high-fidelity virtual environment (i.e., a digital twin) to run simulations in parallel (e.g., on a cloud platform) of N (e.g., N equals 100) different candidate traffic distribution strategies (e.g., N different traffic light timing schemes). The GWM generates corresponding simulation results for each of these N strategies, such as predicting the average network latency, throughput, and queue length at critical intersections within one hour after adopting that strategy. Next, in stage (c), which determines an optimal traffic distribution strategy, the system automatically evaluates and compares the N simulation results (e.g., through a predefined multi-objective utility function) to determine an optimal traffic distribution strategy (e.g., the one that can reduce the average delay the most during peak hours without significantly increasing carbon emissions), and actually deploys the optimal traffic distribution strategy in the target traffic network (e.g., by distributing new timing parameters to each traffic light controller in the urban area).

[0056] Finally, the method performs phase (d), namely online updates. After the optimal strategy is deployed, the system continuously acquires new real-world operational data from the target traffic network (e.g., real traffic flow data returned by intersection sensors). The system compares this real-world data with the simulated predictions of the GWM to check for discrepancies. In response to detected discrepancies, the system uses this new data to update or fine-tune the GWM online, enabling it to capture non-stationary dynamic changes occurring in the traffic network (e.g., a sudden change in traffic flow patterns at an intersection due to a sudden accident). This process, from (a) training, (b) simulation, (c) deployment to (d) updates and back to (a) or (d), forms a continuous closed-loop optimization feedback loop, allowing the system to continuously improve itself and adapt to changes in the real world.

[0057] Example 2: In one example, the generative world model includes: a conditional diffusion model or a generative adversarial network.

[0058] In one specific embodiment, the generative world model (GWM) can be embodied as a conditional diffusion model. The model operates based on a forward noise-adding process and a reverse noise-reducing process. During training (i.e., phase (a) of Implementation 1), the system acquires snapshots of real traffic conditions (e.g., graphical matrix or graph-structured data representing vehicle positions and speeds across the entire city) and gradually adds Gaussian noise to them at multiple time steps until the original data becomes completely meaningless pure noise.

[0059] Then, the model (usually a deep neural network, such as the U-Net architecture) is trained to perform the opposite task: given a noisy input and a set of conditions (e.g., the current time, the weather, and a candidate traffic distribution strategy to be tested), the model learns how to denoise step by step and eventually reconstruct a clear, high-fidelity snapshot of the traffic state that matches the conditions.

[0060] During inference (i.e., when running the counterfactual simulation in phase (b) of Example 1), the system provides the trained model with random noise and a set of specific conditions (e.g., policy B and the current network state). The model will generate a new, statistically realistic, and physically consistent future traffic state as the simulation result of the policy through its learned denoising process.

[0061] Alternatively, in another embodiment, the GWM can be embodied as a Generative Adversarial Network (GAN). This network consists of two competing neural networks: a generator and a discriminator. The generator's job is to attempt to fabricate realistic traffic flow data (e.g., given policy A, generate a sequence of future traffic dynamics that appears realistic), while the discriminator acts as an expert, striving to distinguish between real historical traffic data (retrieved from a database) and the generator's fabricated data. The two are trained adversarially through a mini-maximum game. The generator continuously evolves to deceive the discriminator, while the discriminator continuously evolves to detect the generator. When training reaches a Nash equilibrium, the generator becomes so powerful that the traffic dynamics it generates under specific policy conditions are statistically indistinguishable from real-world dynamics (including complex multi-agent interaction patterns), thus becoming a qualified GWM suitable for counterfactual simulation.

[0062] Example 3: In one embodiment, running the counterfactual simulation in step (b) includes:

[0063] In the simulated environment constructed by the GWM, predict the impact of the N candidate traffic distribution strategies on the multi-agent interaction dynamics in the target traffic network.

[0064] This embodiment details the core technical features of running the counterfactual simulation in step (b). Its working principle is to utilize the micro-dynamic capabilities learned during training by the GWM (such as the diffusion model or GAN described in Embodiment 2) to predict the impact of the N candidate traffic distribution strategies on the multi-agent interaction dynamics in the target traffic network within the simulation environment constructed by the GWM. This is significantly different from traditional simulators that are based solely on macroscopic fluid models.

[0065] During training, GWM implicitly captures micro-level vehicle behavior patterns by learning from massive amounts of data. This means how each agent (e.g., a driver, an autonomous vehicle, or a routing node in a data network) makes decisions (e.g., accelerate, decelerate, change lanes, reroute) based on its local environment (e.g., the speed of the vehicle in front, vehicles on the side, traffic light status, network congestion) and its own goals (e.g., path, quality of service requirements).

[0066] Therefore, when GWM simulates a counterfactual policy (e.g., extending the green light time on a main road by 20%), it doesn't simply increase the road's capacity on a macro level; instead, it simulates how thousands of individual agents respond to this new policy. For example, more vehicles (agents) might be drawn to the main road by this better policy, causing downstream secondary intersections to quickly become saturated due to the sudden increase in traffic.

[0067] Meanwhile, other parallel roads may become unusually congested due to reduced traffic. GWM can capture these non-linear ripple effects and emergent behaviors across the entire network caused by policy changes. It predicts system-level dynamics that emerge from multi-agent interactions, which is crucial for evaluating whether a policy is truly optimal. This is because many policies that seem locally optimal from an isolated, macroscopic perspective (e.g., extending the green light at intersection A) often lead to globally worst outcomes in real-world multi-agent interactions (e.g., causing a cascading deadlock at intersections B and C).

[0068] Example 4: In one embodiment, determining the optimal traffic distribution strategy in step (c) includes:

[0069] The GWM is used as a simulated training environment for a reinforcement learning (RL) agent. The RL agent is trained through interaction with the simulated training environment, and the output strategy of the RL agent is used as the optimal traffic distribution strategy.

[0070] In a preferred embodiment, the process of determining the optimal traffic distribution strategy in step (c) is implemented as a reinforcement learning problem. In this process, the GWM (described in embodiments 1, 2, and 3) is used as a simulated training environment for a reinforcement learning RL agent. This RL agent is itself a deep neural network (e.g., a policy network or value network) whose goal is to learn a policy that maximizes long-term cumulative rewards. Its working principle is as follows:

[0071] The GWM is first initialized to an initial traffic state (e.g., sampling the initial state of a morning rush hour from historical data). The RL agent (i.e., the policy) observes the state provided by the GWM and outputs an action that is a complete candidate traffic distribution policy (e.g., a traffic light timing scheme for all controlled intersections over the next five minutes).

[0072] The GWM receives this action and uses it as a simulation training environment to advance one step forward (e.g., the GWM uses its generative capabilities in Implementation 2 to simulate the traffic dynamics for the next five minutes).

[0073] After the simulation is completed, GWM returns two pieces of information to the RL agent: a new state (i.e., the traffic situation five minutes later) and a feedback signal (e.g., a numerical score calculated based on the reduction in average delay or the increase in throughput over those five minutes).

[0074] The RL agent receives this reward and uses algorithms such as policy gradient, deep Q-network (DQN) or Actor-Critic to update the parameters of its internal neural network, with the goal of making it more likely to choose the action that brings higher reward when it encounters a similar state again.

[0075] The RL agent is trained through a high-speed, parallel interactive trial-and-error process involving numerous iterations with the simulated training environment (GWM). This high-speed training process in the virtual environment (GWM) is feasible entirely because GWM is a differentiable, high-speed generative model, avoiding the high costs and risks of trial and error in the real world.

[0076] Finally, training is complete when the RL agent's policy converges (i.e., it finds the method to obtain the highest cumulative reward in the GWM environment). At this point, the final output policy of the RL agent is determined as the optimal traffic distribution policy to be deployed in the real world.

[0077] Example 5: In one embodiment, the optimal traffic distribution strategy includes at least one selected from the group consisting of:

[0078] Adjustments to traffic signal timing schemes, generation of dynamic route planning suggestions for multiple vehicles, or strategies for allocating network computing and bandwidth resources.

[0079] This embodiment clarifies several specific physical or digital representations of the optimal traffic distribution strategy (i.e., the strategy ultimately learned and determined by the RL agent in Embodiment 4), depending on the nature of the target traffic network.

[0080] In one embodiment (e.g., applied to urban traffic management), the optimal traffic flow distribution strategy includes adjusting traffic signal timing schemes. In this case, the output of the RL agent is a dynamic time series or a set of parameters that specifies the length of the traffic light cycle, the green ratio (i.e., the proportion of green time to the total cycle), and the phase difference (i.e., the coordination of green light start times at adjacent intersections) for each key intersection in the network over the next (e.g.) hour.

[0081] This dynamic adjustment is real-time and is designed to respond to impending congestion predicted by GWM, rather than based on fixed historical statistics.

[0082] In another embodiment (e.g., applied to connected vehicles, ride-sharing platforms, or logistics fleet management), the optimal strategy may include the generation of dynamic route planning suggestions for multiple vehicles. In this case, instead of adjusting infrastructure (traffic lights), the output of the RL agent sends personalized, dynamically updated route suggestions to thousands of individual vehicles (agents).

[0083] These recommendations aim to proactively guide traffic to avoid future congestion areas predicted by GWM, or to collaboratively utilize idle capacity in the network, thereby smoothing traffic flow at the system level and achieving global optimization. In another embodiment (e.g., applied to vehicle-to-everything (V2X) communication, 5G / 6G network slicing, or mobile edge computing scenarios), the term "traffic" refers to data packets, computing tasks, or bandwidth requests, and the optimal strategy is expressed as the allocation strategy of network computing and bandwidth resources.

[0084] In this context, the output of the RL agent is a dynamic resource scheduling decision. It determines how to dynamically allocate limited upload bandwidth or edge server computing power within the coverage area of ​​a base station to prioritize (e.g.) critical safety communications (low latency, high reliability) for autonomous vehicles, while balancing the needs of other non-critical tasks (such as high-bandwidth downloads for in-vehicle entertainment systems). In all these cases, the core principle remains the same: using GWM for high-fidelity simulation and RL for intelligent optimization to dynamically manage limited traffic resources.

[0085] Example 6: In one embodiment, the online update of the GWM in step (d) includes:

[0086] Detect the deviation between the actual operating data and the simulation results of the GWM for the optimal traffic distribution strategy; and

[0087] The model parameters of the GWM are adjusted based on the deviation to minimize the conceptual drift between the actual dynamics of the target traffic network and the modeling dynamics of the GWM.

[0088] This embodiment details the working principle of the online update of the GWM in step (d), which is designed to address the concept drift problem mentioned in the background art. Its working principle includes two consecutive sub-steps.

[0089] First, the deviation between the actual operational data and the simulation results of the GWM for the optimal traffic distribution strategy is detected. After the system (according to Embodiment 4) determines and deploys an optimal strategy (e.g., named strategy P), the system performs two parallel operations: on the one hand, the GWM simultaneously generates a simulation result for strategy P (i.e., what the world should look like under strategy P, for example, predicting an average delay of 30 seconds at intersection A); on the other hand, the target traffic network with strategy P deployed generates actual operational data (e.g., the sensor-measured actual average delay at intersection A is 60 seconds). The system continuously calculates the deviation or residual between these two (in this example, a prediction error of 30 seconds).

[0090] Then, the system performs a second sub-step: adjusting the model parameters of the GWM based on the deviation. When the system (e.g., through a statistical process control module) detects that this deviation consistently and systematically (rather than randomly) exceeds a certain preset threshold, it indicates that the GWM's understanding of the real world is outdated, i.e., concept drift has occurred.

[0091] At this point, the system will trigger a retraining or fine-tuning mechanism. For example, the system will use newly collected actual running data from GWM that failed to predict (i.e., the real data that caused the bias) as a new training batch to update the model parameters of GWM (e.g., to adjust its neural network weights through backpropagation and gradient descent).

[0092] The goal of this adjustment is to minimize the conceptual drift between the actual dynamics of the target traffic network and the modeled dynamics of the GWM, ensuring that the GWM digital twin always accurately reflects the latest state of the real world, thereby providing a high-fidelity, reliable training environment for the RL agent in Example 4.

[0093] Example 7: In one embodiment, the RL agent is trained to achieve a multi-objective optimization, which includes at least two of maximizing traffic throughput, minimizing average delay, and minimizing carbon emissions.

[0094] In the RL agent training process described in Example 4, a more advanced implementation is to train the RL agent to achieve a multi-objective optimization. In real-world traffic management or network resource allocation, decision-makers often face not a single objective (e.g., maximizing traffic throughput at all costs), but a set of conflicting objectives. For example, an aggressive strategy aimed at maximizing traffic throughput (e.g., all main roads with green lights throughout) might lead to extremely high average vehicle speeds, thus minimizing average delay, but this could also result in extremely high carbon emissions (because vehicles need to accelerate and brake frequently) and potentially sacrifice pedestrian right-of-way. Conversely, a strategy aimed at minimizing carbon emissions (e.g., encouraging slow and smooth driving) might significantly increase average delay.

[0095] The working principle of this embodiment is to expand the reward signal defined in Embodiment 4 from a single scalar value (a score) into a multi-dimensional reward vector. For example, after one step of deduction, GWM will simultaneously return three reward values: one representing traffic throughput (the higher the better), one representing average delay (the lower the better, i.e., the reward is the negative of the delay), and one representing carbon emissions (the lower the better, i.e., the reward is the negative of the emissions). The training objective of the RL agent (e.g., using a multi-objective RL algorithm, such as Pareto Q learning or a utility function-based method) is no longer to maximize a single score, but to learn a set of policies that can cover the Pareto front. The Pareto front represents the set of all non-dominated solutions (i.e., the set of solutions that cannot optimize any other objective without worsening any of the objectives). After training, the system operator (or a higher-level decision AI) can select the optimal traffic distribution strategy that best meets the current needs from this Pareto front based on current policy preferences (e.g., increasing the weight of minimizing carbon emissions on days with poor air quality; increasing the weight of maximizing traffic throughput during major event evacuations).

[0096] This embodiment requires that the multi-objective optimization includes at least two of the following: maximizing traffic throughput, minimizing average delay, and minimizing carbon emissions.

[0097] Example 8: In one embodiment, training the RL agent includes a two-layer adversarial optimization step, which includes:

[0098] An adversarial optimizer is established in the learned probabilistic latent space of the GWM, the probabilistic latent space representing a compressed representation of the target traffic network dynamics; the adversarial optimizer is configured to perform a non-random, gradient-based optimization search to locate a specific vector in the latent space.

[0099] Define an adversarial objective function through which the adversarial optimizer performs the gradient-based search. Its objective is to proactively identify a latent space vector that maximizes the probability of the RL agent's policy failure in subsequent scenarios, or equivalently, minimizes the expected return of the RL agent's current policy in the simulation results generated by decoding the latent space vector.

[0100] Using the identified adversarial latent space vectors, the GWM decoder is driven to generate a physically consistent but adversarial simulation result. Physical consistency means that the simulation result always lies on the data manifold already learned by the GWM, ensuring the realism of the scenario. Adversarial nature means that the simulation result represents a worst-case emergent scenario, including at least network deadlock or spectral blocking patterns caused by multi-agent interactions and with extremely low sampling probability in regular simulations.

[0101] The adversarial simulation results are used as a key training sample and iteratively incorporated into the training dataset of the RL agent to form an adversarial curriculum. This forces the agent to update its policy to deal with such low-probability, high-impact events and significantly improves the worst-case robustness of the optimal traffic distribution policy when deployed on the target traffic network.

[0102] To address the significant drawback of standard reinforcement learning training (such as Examples 4 and 7) as mentioned in the background art, which can only optimize average performance but lacks robustness to worst-case scenarios, this embodiment introduces an improved two-layer adversarial optimization step during the training of the RL agent.

[0103] The fundamental goal of this step is to proactively and systematically uncover emergent worst-case scenarios from the almost infinite simulation possibilities represented by GWM, which, although extremely low in probability, would lead to catastrophic failure of the RL policy if they occurred. These uncovered extreme failure scenarios are then used as key training samples to force the RL agent to learn how to cope, thereby forming an adversarial curriculum that ultimately significantly improves its worst-case robustness when deployed in the real world.

[0104] The working principle of this step can be broken down into a two-layer nested loop. In the first layer (outer layer), there is the standard training loop for the RL agent: the RL agent (called the master policy model or defender) interacts with the GWM environment, attempting to learn an optimal policy, as described in Example 4, with the goal of maximizing the average expected return (in the GWM environment). In the second layer (inner layer), the core of this embodiment is the adversarial scenario generation loop: the goal of this loop is to generate the most difficult training sample for the master policy model, which acts as either an attacker or an adversarial optimizer. The specific working principle of this inner loop is as follows:

[0105] First, the system establishes an adversarial optimizer within the learned probabilistic latent space of the GWM. The GWM (e.g., a variational autoencoder (VAE) or a generative adversarial network (GAN), as described in Example 2), during training, has learned how to compress high-dimensional, extremely complex traffic states (e.g., a complete network snapshot containing the positions, speeds, accelerations, target paths, and all traffic light states of millions of vehicles in a city) into a low-dimensional mathematical vector (e.g., a vector with only 512 dimensions). This vector is the compressed representation or essence of the complex state. The mathematical space comprising all these possible compressed representations is the probabilistic latent space. Each point (i.e., each vector) in this space corresponds to a complete, high-fidelity traffic scene generated by the GWM's decoder. This latent space is the complete knowledge base or data manifold about traffic dynamics understood by the GWM. The adversarial optimizer is the tool for searching within this knowledge base. It is configured to perform non-random, gradient-based optimization searches. This is completely different from the inefficient approach of testing edge cases through random collisions or random sampling in the background art. This optimizer performs an efficient, guided search in this compressed representation space.

[0106] Secondly, the system defines an adversarial objective function. This objective function is the exact opposite of the objective of the RL agent (primary policy model). While the RL agent aims to maximize expected returns, this adversarial objective function aims to proactively identify a latent space vector that, if decoded by the GWM decoder into a simulated scenario, will maximize the probability of the primary policy model's policy failure in subsequent scenarios, or equivalently, minimize the expected returns of the primary policy model's current policy in that scenario. In other words, this adversarial optimizer is an attacker whose sole objective is to find the scenario blueprint (i.e., the latent space vector) in the GWM knowledge base that minimizes the expected returns of the primary policy model. The adversarial optimizer achieves this objective by performing a gradient-based search within this latent space. To achieve this objective, the adversarial optimizer is configured to perform an iterative, incremental adjustment process, the steps of which are as follows:

[0107] The process begins with an initial vector in the latent space (representing a typical scenario). The system then checks how quickly the expected reward (i.e., policy performance) of the RL agent will decrease if this vector is slightly modified along a certain direction. The direction of the fastest decrease is the gradient.

[0108] The system then makes a small adjustment to the vector along the direction of the fastest descent, resulting in a new vector that is more adversarial.

[0109] However, this new vector may have deviated from the real-world range learned by GWM, i.e., outside the required data manifold, resulting in an unrealistic or physically impossible scenario after decoding.

[0110] Immediately after adjustment, the system performs a correction or projection step. This step forces the new, deviated vector back to the closest, physically consistent point on the GWM data manifold (i.e., the real-world knowledge base).

[0111] By repeatedly performing this adjustment-correction iterative process (e.g., dozens of times), the system can eventually locate a worst-case vector that is both physically consistent and minimizes the expected return of the RL agent.

[0112] Furthermore, the system utilizes this identified adversarial latent space vector to drive the GWM decoder to generate a physically consistent but adversarial simulation. This adversarial vector is itself searched from the probabilistic latent space learned by the GWM, which lies on the data manifold already learned by the GWM. When the GWM decoder decodes it into a complete traffic scenario, this scenario is necessarily physically consistent, adhering to all traffic dynamics rules learned by the GWM (e.g., vehicle acceleration / deceleration limits, driver reaction time, and the inability for vehicles to teleport or penetrate), ensuring the scenario's plausibility. However, this scenario is simultaneously adversarial, representing a worst-case scenario. For example, this scenario might not be a simple, random accident (such scenarios are easily sampled during normal training), but rather an extremely subtle systemic collapse pattern dynamically triggered by multi-agent interactions. One possible scenario, for example, is the formation of a phantom congestion: on a medium-density expressway, an RL agent (the master policy model) is executing a (average-optimal) ramp merging control policy. At this point, the adversarial optimizer (the attacker) searches the latent space of the GWM and finds a specific combination of initial vehicle layout and tiny speed perturbations. This combination (i.e., the adversarial vector), once decoded, causes the first car in the traffic flow (a perfectly rule-abiding agent) to produce a (physically perfectly reasonable) slight deceleration. This deceleration is amplified by the following car (the second agent) through the driver's reaction delay (also modeled by the GWM), and then passed on to the car after that (the third agent). This tiny perturbation is amplified step by step and propagates in the opposite direction to the traffic flow (i.e., as a wave), eventually evolving into a ghostly traffic jam of several kilometers in just a few minutes, without any accidents or bottlenecks.

[0113] When faced with this emerging ghost congestion pattern that it had never seen in its regular training, the traffic throughput used to calculate the reward of the main strategy model (ramp controller) instantly dropped to zero, and its expected reward instantly dropped to negative infinity (i.e., the strategy failed).

[0114] Another possible scenario is network deadlock: the adversarial optimizer discovers a specific vehicle arrival pattern (i.e., a specific latent space vector) involving (for example) three adjacent intersections, which causes the (seemingly optimal) traffic light timing scheme of the master policy model to cause left-turning vehicles at intersection A to spill back and block the straight lane at intersection B upstream, while vehicles at intersection B spill back and block intersection C.

[0115] These scenarios share a common characteristic: they have an extremely low sampling probability in conventional simulations because they require very precise initial conditions and extreme conditions involving multi-agent interactions and multi-factor coupling, but they are physically possible and have serious consequences.

[0116] Finally, the system iteratively incorporates this (or these) adversarial simulation results generated by the GWM decoder as a key training sample into the training dataset of the RL agent. This forms an adversarial course.

[0117] The master policy model (RL agent) is now driven to be retrained in specific scenarios where its performance is substandard. It must update its policy to address such low-probability, high-impact events. For example, it might learn a new, more complex rule: when the ramp controller observes a specific traffic flow pattern (a precursor to phantom congestion), it must immediately implement (seemingly suboptimal) defensive ramp control (e.g., briefly closing the ramp) to proactively break the congestion. Through iterative adversarial training of the master policy model between the learning (outer layer) and adversarial optimizer attacks (inner layer) (i.e., bi-layer optimization), its weaknesses are continuously discovered and exposed by the attacker, and then repaired and compensated for by the master policy model.

[0118] This process significantly improves the worst-case robustness of the final optimal traffic distribution strategy when deployed on the target traffic network, ensuring that the system remains stable and effective in the face of unpredictable and rare sparse anomalies in the real world, rather than easily collapsing like AI in the background art.

[0119] Example 9: In one embodiment, the online update of the GWM includes a bifurcated adaptive framework for collaboratively managing the stability-plasticity tradeoffs of the GWM, the framework comprising:

[0120] A drift type classifier is set up, which is configured to continuously monitor the deviation and, by analyzing the statistical characteristics of the deviation, including at least the magnitude of the prediction error between the actual operating data and the GWM simulation results, the rate of data distribution shift, and the time scale of change, classify the concept drift in real time as gradual drift or sudden impact.

[0121] In response to the drift classifier continuously detecting and classifying progressive drift, a regularization-based continuous learning update mechanism is triggered. This mechanism calculates the importance of the GWM's model parameters to previously learned tasks and imposes a flexible regularization constraint proportional to their importance on the model parameters. This flexible regularization constraint allows the model to slowly adapt to new data to minimize the progressive drift while explicitly protecting parameters crucial to old knowledge, thus preventing catastrophic forgetting.

[0122] In response to the drift classifier detecting and classifying a sudden impact, a meta-learning adaptation mechanism is immediately triggered. This mechanism freezes at least a portion of the core parameters of the GWM and treats the small amount of newly acquired actual operational data related to the sudden impact as a novel, data-scarce few-sample task. Subsequently, the mechanism utilizes a model-independent meta-learning algorithm to quickly train or fine-tune only a small, impact-task-specific policy adapter or output layer, thereby achieving instantaneous plasticity and rapid response to structural changes in the system without disrupting the existing knowledge base.

[0123] This embodiment addresses the concept drift challenge mentioned in the background art, namely the problem that GWM models fail over time in non-stationary environments, and provides a complete and intelligent solution.

[0124] Example 6 described the basic idea of ​​online GWM updates, while this example provides a bifurcated adaptive framework whose core objective is to collaboratively manage the stability-plasticity tradeoff of the GWM (i.e., the digital twin itself). The stability-plasticity tradeoff is a core dilemma faced by all continuous learning systems: the model must be plastic to quickly learn new knowledge (e.g., adapt to a new traffic pattern brought about by a newly opened subway station); but it must also be stable to protect learned old knowledge (e.g., how to handle traffic patterns on weekends, holidays, or rainy days) from being catastrophically forgotten by new knowledge. A one-size-fits-all update strategy (e.g., the simple fine-tuning in Example 6, i.e., always training the entire model with new data) cannot simultaneously satisfy these two conflicting needs; if the learning rate is too high, old knowledge will be catastrophically forgotten; if the learning rate is too low, it cannot adapt to new changes. The working principle of this bifurcated adaptive framework is as follows:

[0125] First, the system sets up a drift type classifier. This classifier is a meta-component that does not participate in the traffic flow modeling of GWM, but is specifically configured to continuously monitor the deviation, i.e., the prediction error between the simulation results of GWM and the actual operating data obtained from the target traffic network (as described in Example 6).

[0126] This classifier classifies concept drift in real time as either gradual drift or sudden shock by analyzing the statistical characteristics of the deviation. The statistical characteristics analyzed by the classifier include at least (but are not limited to): the magnitude of the prediction error between the actual operating data and the GWM simulation results (e.g., whether the error increased slowly by 5 percent or suddenly by 50 percent), the rate of data distribution shift (e.g., whether this shift occurred slowly over the past three months or suddenly over the past three minutes), and the time scale of change (e.g., whether it is a continuous, unidirectional trend or a short-term, drastic disturbance).

[0127] Based on the analysis of these characteristics (e.g., through a specialized time series classification model or statistical test), the classifier outputs a diagnostic label: gradual drift or sudden shock. The framework then activates one of two distinct bifurcated response paths based on this diagnostic label.

[0128] The first branching path: responding to continuous detection and classification of the drift classifier as progressive drift. A typical example of progressive drift is a slow, continuous change in traffic patterns due to seasonal variations (e.g., later sunrises in winter causing a slow shift in the morning rush hour), slow urban population growth, or the gradual occupancy of a new residential area. In this case, the prediction error of GWM will slowly and continuously (e.g., over several weeks) increase slightly. At this point, the primary goal of the framework is to absolutely prevent the catastrophic forgetting of GWM's existing, resource-intensively learned knowledge base (e.g., about other seasons, holidays, rainy days, etc.) while adapting to this new pattern. Therefore, the system triggers a regularization-based continuous learning and updating mechanism. This mechanism works as follows:

[0129] Before retraining the GWM (i.e., gradient descent) with new data (e.g., progressively drifting data from the most recent week), the system first calculates the importance of the GWM's model parameters to previously learned tasks. For example, the system can evaluate how important each parameter (i.e., the neural network weights) in the GWM (a giant neural network) is to old knowledge (e.g., the ability to simulate holiday traffic) using continuous learning algorithms such as elastic weight consolidation, synaptic intelligence, or memory-aware synapses (MAS). This importance can be quantified numerically (e.g., by calculating the Fisher information matrix or gradient path integral of that parameter over the old task's loss function).

[0130] Then, when performing gradient descent to learn new data, the system imposes a flexible regularization constraint on the model parameters, proportional to their importance. This regularization constraint (a quadratic penalty term) acts in the opposite direction when the gradient of the new data (the force of learning new knowledge) attempts to pull the parameter to adapt to the new pattern, preventing excessive change and keeping it near the value required by the old knowledge. Parameters that are not important to the old knowledge (with an importance score of zero or very low) are not subject to this regularization constraint and can move freely to adapt to the new data. This flexible regularization constraint allows the model to slowly adapt to new data to minimize the gradual drift while explicitly protecting parameters crucial to the old knowledge, thus preventing catastrophic forgetting.

[0131] The second branching path: This responds to the drift classifier detecting and classifying a sudden shock. A sudden shock is a abrupt, drastic, structural change in the topology or rules of the transportation network caused by a major accident (e.g., the sudden collapse of a critical bridge), extreme weather events (e.g., a sudden blizzard causing the closure of multiple highways), or large-scale events (e.g., a marathon causing the temporary closure of a major road). In this case, the prediction error of GWM spikes instantaneously (large amplitude, rapid rate, and short time scale).

[0132] At this point, the primary goal of the framework is no longer to prevent forgetting (because old knowledge has become invalid to some extent, for example, the old knowledge that the bridge is open is wrong), but to achieve instantaneous plasticity and rapid response, and this must be done under conditions of extremely scarce data (because the shock has just occurred, and the small amount of newly acquired actual operational data is the only available information).

[0133] Therefore, the system immediately triggers a meta-learning adaptation mechanism. This mechanism works quite differently from the first path: First, the system freezes at least a portion of the core parameters of the GWM. These core parameters are typically early layers or encoder parts of the GWM that encode fundamental knowledge about traffic dynamics (e.g., vehicles cannot pass through walls, congestion propagates in waves). This knowledge remains valid even after a sudden shock (bridge collapse) and must be frozen to avoid disrupting the existing knowledge base.

[0134] Secondly, the system treats the small amount of newly acquired operational data related to the sudden impact as a completely new, data-scarce few-sample task. This is an extreme challenge in machine learning.

[0135] Finally, this mechanism utilizes model-agnostic meta-learning algorithms to address this challenge. The core idea of ​​meta-learning algorithms such as MAML is to learn how to learn. GWM, during its initial training (i.e., in step (a) of Example 1), may have already been pre-trained through meta-learning (on a large number of simulated sudden shock tasks), putting its parameters in a sensitive state, i.e., a state ready to be rapidly adapted. In response to a sudden shock, the system leverages this characteristic to quickly train or fine-tune only a miniaturized, shock-task-specific policy adapter or output layer. This adapter could be, for example, a small neural network module inserted into the top layer of GWM that specifically learns how to correct or translate GWM's output in the new (post-shock) environment (e.g., it learns that GWM's core output is based on bridge passage, and my task is to correct it to an output where the bridge is impassable).

[0136] Because only this small adapter is trained instead of the entire GWM (most parameters are frozen), and by leveraging the rapid adaptation (few-shot learning) capabilities of meta-learning, the system can adapt to sudden shocks within minutes or a few iterations (instead of days) without disrupting the existing knowledge base, achieving instantaneous plasticity and rapid response to structural changes in the system.

[0137] Furthermore, the policy adapter is specifically implemented as a lightweight, stand-alone neural network module. It is not a modification of the GWM master model, but rather, as a residual correction module or feature mapping module, it is inserted between the (frozen) core parameters of the GWM and the final output layer.

[0138] The algorithm utilizing model-independent meta-learning is specifically implemented as a two-stage training process:

[0139] Phase 1 (Offline Meta-Training): Before system deployment, GWM's core parameters undergo a special "meta-learning" training process. The goal of this training is not to make the model "memorize" any specific traffic pattern, but rather to enable it to "learn how to quickly learn" new patterns. The system trains the model on thousands of simulated "sudden shock" tasks, bringing GWM's core parameters to a sensitive initial state that is "easy to adapt quickly."

[0140] Phase Two (Online Meta-Adaptation): When a real "sudden shock" occurs, the system immediately triggers this mechanism. The system first freezes all core parameters in the GWM that are in an adaptable state, then feeds the few new data points from the shock event to the newly inserted, small policy adapter module, and only performs rapid fine-tuning on the adapter module (e.g., performing only a few training steps).

[0141] Since the core parameters of GWM have been trained by meta-learning to be good at learning, and the adapter module is very small, the fine-tuning process of this parameter fine-tuning is extremely fast and can converge quickly in the case of scarce data. Thus, without destroying the existing knowledge base, it can achieve instantaneous plasticity and rapid response to structural changes in the system.

[0142] Through this bifurcation adaptive framework, this invention no longer uses a one-size-fits-all update strategy. Instead, it first diagnoses (through a drift classifier) ​​the type of problem, then triages and adopts completely different treatment plans (regularization-based continuous learning or meta-learning-based adapter fine-tuning), thereby co-managing the core tradeoff of stability-plasticity in deploying AI in non-stationary environments.

[0143] Example 10: This application provides a traffic distribution and automatic optimization method based on generative AI, the method including:

[0144] (a) Train a generative world model GWM, which has a probabilistic latent space for characterizing the dynamics of the target traffic network;

[0145] (b) In the simulated environment constituted by the GWM, train an RL agent to output a traffic distribution strategy;

[0146] (c) In response to actual operational data obtained from the target transportation network, the GWM is updated online via a bifurcation adaptive framework to adapt the GWM to the non-stationary dynamic changes of the target transportation network; and

[0147] (d) In the simulated environment, the RL agent is trained through a two-layer adversarial optimization step to improve its worst-case robustness;

[0148] The characteristic is that steps (c) and (d) are executed collaboratively, and the bifurcated adaptive framework (step c) is used to assist the execution of the two-layer adversarial optimization step (step d). This collaborative execution includes:

[0149] (e) The bifurcation adaptive framework includes a drift type classifier configured to classify the non-stationary dynamic changes as gradual drift or sudden shock;

[0150] (f) In response to classification as progressive drift, the bifurcation adaptive framework triggers a regularization-based continuous learning update mechanism to adjust the model parameters of the GWM; the adversarial optimization step (step d) utilizes the stable probabilistic latent space of the regularized updated GWM to perform a gradient-based optimization search to locate the latent space vector representing the worst-case scenario; and

[0151] (g) In response to classification as a sudden shock, the bifurcation adaptive framework triggers a meta-learning adaptation mechanism that freezes at least a portion of the core parameters of the GWM and trains only a policy adapter specific to the shock task; the adversarial optimization step (step d) is redirected to perform the gradient-based optimization search only within a new potential subspace defined by the policy adapter that is relevant to the sudden shock.

[0152] The regularization-based continuous learning and updating mechanism specifically includes the Elastic Weight Consolidation (EWC) mechanism, which quantifies the importance of the GWM model parameters by calculating the Fisher Information Matrix (FIM) and applying an elastic regularization constraint proportional to the importance.

[0153] The policy adapter is a multilayer perceptron (MLP) module that is inserted between the frozen core parameters and the output layer of the GWM;

[0154] The gradient-based optimization search specifically includes the projected gradient descent (PGD) algorithm;

[0155] The worst-case scenario includes network deadlock or ghost blockage caused by multi-agent interaction dynamics.

[0156] This embodiment provides a method for co-executing the two-layer adversarial optimization of Embodiment 8 with the bifurcation adaptive framework of Embodiment 9.

[0157] The core of this embodiment is to solve a key technical problem: the adversarial optimizer (step d) described in embodiment 8 needs to perform an accurate gradient-based search in the probabilistic latent space of the GWM to locate the worst case; however, the online update framework (step c) described in embodiment 9 causes this latent space itself to be in a non-stationary dynamic state (i.e., concept drift). If the GWM changes continuously during the adversarial optimizer search, the search process itself will become unstable and may even fail to converge.

[0158] The working principle of this embodiment is to intelligently assist and stabilize the search process of the adversarial optimizer in embodiment 8 by utilizing the diagnostic results of the drift type classifier in embodiment 9. The specific steps (e), (f), and (g) of this collaborative execution are as follows:

[0159] First, as described in step (e), the drift type classifier in Example 9 classifies the dynamic changes of GWM into gradual drift or sudden impact.

[0160] Next, the system triggers different collaborative paths based on the classification results:

[0161] Cooperative Path (f) (Response to Progressive Drift): If the classification is progressive drift, the system will trigger the regularization-based continuous learning update mechanism described in Example 9. The key cooperative aspect of this embodiment is that the regularization mechanism (as described in Example 9) greatly stabilizes the probabilistic latent space of GWM by protecting key parameters. The adversarial optimizer in Example 8 utilizes this latent space stabilized by step (f) to perform its gradient-based optimization search. This ensures that the adversarial optimizer has sufficient time to converge, thereby accurately locating the worst-case vector (e.g., ghost blocking).

[0162] Cooperative Path (g) (Responding to Sudden Impacts): If classified as a sudden impact, the system triggers the meta-learning adaptation mechanism described in Example 9, which freezes the GWM core parameters and trains only a lightweight policy adapter (as described in parameter fine-tuning in Example 9). The key cooperative aspect of this embodiment is that the adversarial optimizer from Example 8 is redirected. The system prevents the optimizer from performing invalid searches in the old, now-defunct GWM main space; instead, it directs the optimizer to perform its search only within a new, small potential subspace defined by this newly trained policy adapter and relevant to the sudden impact. This ensures the agility and efficiency of the adversarial search.

[0163] In this way, this embodiment ensures that the robust training (from Embodiment 8) and adaptive updates (from Embodiment 9) of the system can work intelligently in tandem, solving the core challenge of adversarial optimization in non-stationary environments. The Elastic Weight Consolidation (EWC), Multilayer Perceptron (MLP) module, or Projective Gradient Descent (PGD) algorithm described in the specification are preferred techniques for implementing the above-mentioned collaborative framework, and are not intended to limit the invention.

[0164] Example 11: Figure 2 This application provides a schematic diagram of a traffic distribution and automatic optimization system based on generative AI, as shown in the embodiments. Figure 2 As shown, the system includes:

[0165] One or more processors; and

[0166] A memory that stores instructions executable by the one or more processors.

[0167] The characteristic is that, when the instruction is executed by the one or more processors, it causes the system to perform the traffic distribution and automatic optimization method based on generative AI as described above.

[0168] A second aspect of this application provides a traffic distribution and automatic optimization system based on generative AI. This system comprises hardware and software entities implementing all the methods described above (as described in Examples 1 to 9). Physically, the system includes one or more processors and a memory.

[0169] In a specific implementation, the one or more processors may be a complex, distributed computing cluster, for example, including a high-performance GPU (Graphics Processing Unit) cluster for offline training of GWM and RL agents and (in Example 8) adversarial training, and a massively parallel CPU (Central Processing Unit) cluster for GWM counterfactual simulation (step b of Example 1), and may also include edge computing units deployed on the target traffic network (e.g., roadside intersection controllers or 5G base stations) for executing optimal strategies and collecting real-world data.

[0170] The memory includes (but is not limited to) hard disk storage, solid-state drive (SSD) or cloud storage for storing massive amounts of historical traffic data and GWM model parameters, and random access memory (RAM) for high-speed computing. The memory stores instructions that can be executed by the one or more processors.

[0171] When these instructions are executed by the one or more processors, they work together to cause the system (as a whole) to perform the method as described in any one of Examples 1 to 9.

[0172] For example, the instructions cause the GPU cluster to load historical data from memory to train the GWM (Example 1(a)); the instructions cause the CPU cluster to load the GWM model to run N counterfactual simulations in parallel (Example 1(b)); the instructions cause the GPU cluster to use the GWM as an environment to train the RL agent (Example 4), and enhance its robustness through adversarial optimization (Example 8), and finally determine the optimal policy (Example 1(c)); the instructions cause the edge computing unit to deploy the policy; at the same time, the instructions cause the central processing unit (or cloud processor) to continuously monitor the actual data, detect deviations (Example 6), and start the bifurcated adaptive framework (Example 9) to update the GWM model parameters in memory online (Example 1(d)), thereby realizing a complete, automated closed-loop optimization system.

[0173] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A traffic distribution and automatic optimization method based on generative AI, characterized in that, The method includes: (a) Train a generative world model (GWM) to model the dynamic operating state of a target traffic network containing multidimensional traffic data; (b) Using the GWM, counterfactual simulations of at least N candidate traffic distribution strategies are run in parallel to generate simulation results for each of the N candidate traffic distribution strategies, where N is an integer greater than 1; (c) Based on the simulation results, determine an optimal traffic distribution strategy from the N candidate traffic distribution strategies, and deploy the optimal traffic distribution strategy in the target traffic network; wherein, determining the optimal traffic distribution strategy includes: using the GWM as a simulated training environment for a reinforcement learning (RL) agent, training the RL agent through interaction with the simulated training environment, and using the output strategy of the RL agent as the optimal traffic distribution strategy; training the RL agent includes performing a two-layer adversarial optimization step; and (d) In response to actual operational data obtained from the target traffic network, the GWM is updated online to adapt the GWM to the non-stationary dynamic changes of the target traffic network, thereby forming a closed-loop optimization feedback; wherein, the online update of the GWM includes running a bifurcation adaptive framework; The bifurcation adaptive framework is executed in coordination with the two-layer adversarial optimization step, so that the bifurcation adaptive framework assists in the execution of the two-layer adversarial optimization step. This coordinated execution specifically includes: (e) The bifurcation adaptive framework classifies the non-stationary dynamic changes into gradual drift or sudden shock through a drift type classifier; (f) In response to classification as progressive drift, the bifurcation adaptive framework triggers a regularization-based continuous learning update mechanism to adjust the model parameters of the GWM; the adversarial optimization step utilizes the stable probabilistic latent space of the regularized updated GWM to perform a gradient-based optimization search to locate the latent space vector representing the worst-case scenario. (g) In response to classification as a sudden shock, the bifurcation adaptive framework triggers a meta-learning adaptation mechanism that freezes at least a portion of the core parameters of the GWM and trains only a policy adapter specific to the shock task; the adversarial optimization step is redirected to perform the gradient-based optimization search only in a new potential subspace defined by the policy adapter that is relevant to the sudden shock. The regularization-based continuous learning and update mechanism includes an elastic weight consolidation mechanism, which quantifies the importance of the GWM model parameters by calculating the Fisher information matrix and applying an elastic regularization constraint proportional to the importance. The policy adapter is a multilayer perceptron module inserted between the frozen core parameters and the output layer of the GWM. The gradient-based optimization search specifically includes a projected gradient descent algorithm. The worst-case scenario includes network deadlock or ghost blocking mode caused by multi-agent interaction dynamics.

2. The method according to claim 1, characterized in that, The generative world model includes: conditional diffusion model or generative adversarial network.

3. The method according to claim 1, characterized in that, Running the counterfactual simulation in step (b) includes: In the simulated environment constructed by the GWM, predict the impact of the N candidate traffic distribution strategies on the multi-agent interaction dynamics in the target traffic network.

4. The method according to claim 1, characterized in that, The optimal traffic distribution strategy includes at least one selected from the group below: Adjustments to traffic signal timing schemes, generation of dynamic route planning suggestions for multiple vehicles, or strategies for allocating network computing and bandwidth resources.

5. The method according to claim 1, characterized in that, The online update of the GWM in step (d) includes: Detect the deviation between the actual operating data and the simulation results of the GWM for the optimal traffic distribution strategy; and The model parameters of the GWM are adjusted based on the deviation to minimize the conceptual drift between the actual dynamics of the target traffic network and the modeling dynamics of the GWM.

6. The method according to claim 1, characterized in that, The RL agent is trained to achieve a multi-objective optimization, which includes at least two of maximizing traffic throughput, minimizing average delay, and minimizing carbon emissions.

7. A traffic distribution and automatic optimization system based on generative AI, comprising: One or more processors; as well as A memory that stores instructions executable by the one or more processors. The characteristic is that, when the instruction is executed by the one or more processors, it causes the system to perform the method as described in any one of claims 1 to 6.