A Road Traffic Self-Organizing Operation Control System and Method with Nested Large and Small Models

CN122949680APending Publication Date: 2026-10-20SHENZHEN URBAN TRANSPORT PLANNING CENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424008.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

在异质智能体由不同团队独立开发、接口规范不统一的现实条件下,这种紧耦合导致集成和维护成本随智能体数量增长而急剧上升

Benefits of technology

[0036]1. 本发明通过MCP协议将信控、匝道、车辆协同等异质智能体统一封装为标准化工具,以活动工具清单共享变量作为基础操作子图与策略调控子图之间的唯一数据通道。当交通态势变化需调整智能体组合时,仅需由策略调控子图更新该变量,基础操作子图在下一周期自动按新清单调用对应工具,智能体组合的切换无需修改调度代码或重新部署系统,切换生效时间在一个基础控制周期内完成。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

A road traffic self-organizing operation and control system and method with nested large and small models belongs to the field of traffic control technology. It aims to solve the problem of heterogeneous multi-agent collaborative scheduling. This invention includes an MCP host process and an MCP server process, which are connected through a bidirectional MCP pipe. The MCP host process internally deploys a system initialization module, a basic operation subgraph module, a strategy control subgraph module, and adopted strategy and measure variables. The adopted strategy and measure variables are respectively connected to the basic operation subgraph module and the strategy control subgraph module. The MCP server process internally deploys MCP tools, MCP resources, a heterogeneous agent model group, and a heterogeneous multi-agent simulation interaction environment. The MCP server process instantiates the heterogeneous multi-agent simulation interaction environment in local memory and loads all preset model weights of the heterogeneous multi-agent model group into the global memory of the MCP server process at once.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic control technology, specifically relating to a road traffic self-organizing operation and control system and method with nested large and small models. Background Technology

[0002] Regional traffic control has evolved into a complex system of collaborative decision-making by heterogeneous intelligent agents of various types and strategies. This includes reinforcement learning agents responsible for routine tasks such as signal timing and ramp control, as well as large language model agents handling complex scenarios such as emergencies and special operations. These agents have different implementation frameworks and applicable boundaries; therefore, flexibly scheduling their collaborative work based on real-time situational awareness is a core challenge facing the field.

[0003] In existing technologies, the mainstream solution for heterogeneous multi-agent cooperative scheduling is to adopt a logical routing architecture. This architecture pre-defines a set of static condition judgment logic in the core scheduling layer of the system, which is usually represented by a meta-controller. Its working principle is as follows: the meta-controller receives traffic state summaries and performs branch judgments according to preset rules; if it is determined to be a normal scenario, it calls a general reinforcement learning agent; if it is determined to be a special scenario, it calls a dedicated processing agent.

[0004] This approach has the following inherent flaws: First, the agent selection logic is statically bound to its specific implementation. Routing rules and the agent interfaces called are fixed during the code compilation phase. When adding new agent types, replacing model versions, or adjusting selection strategies, the core scheduling code must be modified and the system redeployed, making dynamic expansion and hot-swapping impossible. Second, the caller is tightly coupled with the agent implementation details. The caller must know the specific interface form, input / output format, and deployment location of each agent in advance and write dedicated adaptation code for different agents. In the reality that heterogeneous agents are developed independently by different teams with inconsistent interface specifications, this tight coupling leads to a sharp increase in integration and maintenance costs as the number of agents grows. These flaws make the logical routing architecture unable to meet the engineering requirements of flexibility and scalability in regional traffic control scenarios with increasingly diverse agent types and frequent iterations of scheduling strategies. Summary of the Invention

[0005] The problem this invention aims to solve is to achieve collaborative scheduling of heterogeneous multi-agent systems, and proposes a road traffic self-organizing operation and control system and method with nested large and small models.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A road traffic self-organizing operation and control system with nested large and small models includes an MCP (Model Context Protocol) host process and an MCP server process, which are connected through a bidirectional MCP pipe.

[0008] The MCP host process internally deploys a system initialization module, a basic operation subgraph module, a strategy control subgraph module, and adopted strategy and measure variables; the adopted strategy and measure variables are respectively connected to the basic operation subgraph module and the strategy control subgraph module;

[0009] The MCP server process internally deploys MCP tools, MCP resources, heterogeneous agent model groups, and heterogeneous multi-agent simulation interaction environment; the MCP server process instantiates the heterogeneous multi-agent simulation interaction environment in local memory and loads all preset model weights in the heterogeneous multi-agent model group into the memory of the MCP server process at once.

[0010] The modules within the MCP host process collaborate through an asynchronous event loop and a shared list of activity tools. The MCP host process and the MCP server process exchange control requests and runtime data bidirectionally through the invocation of MCP tools and the reading of MCP resources. The heterogeneous agent model group includes traffic control agents, ramp agents, and vehicle agents. Each agent has an independent observation space, action space, and reward function. The observation space of the signal control agent adopts a low-dimensional observation vector, which consists of the phase number normalization, the queuing ratio of each inlet channel, the waiting time ratio of each inlet channel, the phase index normalization, and the phase duration normalization. The observation space of the ramp agent consists of the position-velocity characteristics of ramp vehicles and main road vehicles; The observation space of the vehicle intelligent agent consists of nine-dimensional normalized vectors.

[0011] Furthermore, the MCP tool includes three action-related tools: an action prediction tool, a step simulation tool, and a reward acquisition tool.

[0012] The action prediction tool is responsible for triggering the neural network forward inference of the heterogeneous intelligent agent model group, generating control actions and temporarily storing them in the action cache area;

[0013] The stepping simulation tool is responsible for sending the action instructions in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the physical clock to advance one step;

[0014] The reward acquisition tool is responsible for collecting reward values ​​and state snapshots after a physical step is completed, which are used as inputs for the next action prediction.

[0015] Furthermore, each agent model in the heterogeneous agent model group is encapsulated as a tool conforming to the MCP specification and exposes three action class tools and at least one resource class interface to enable the MCP host process to call it.

[0016] A method for self-organizing and managing road traffic operations using nested large and small models, implemented based on a road traffic self-organizing and managing system using nested large and small models, includes the following steps:

[0017] S1. The system initialization module performs system initialization. After the MCP host process starts, the MCP server process is started through the MCP bidirectional pipe to instantiate the heterogeneous multi-agent simulation interaction environment and load and register the heterogeneous agent model group.

[0018] S2. The basic operation subgraph module completes the micro-control cycle closed loop of state and activity tool list acquisition, action prediction, simulation advancement and reward acquisition periodically with a fixed step size, so as to drive all intelligent agent models in the heterogeneous intelligent agent model group with a unified physical step size.

[0019] S3. Run the strategy control subgraph module in an independent asynchronous task, wake it up at a period of T or triggered by a traffic event, complete the complete decision-making loop of reading macro operation indicators - scenario diagnosis and strategy selection - verification and switching, and obtain an updated list of activity tools;

[0020] S4. Based on the updated activity tool list obtained in step S3, the basic operation subgraph module automatically reads the updated activity tool list shared variables in the next micro-control cycle and calls the corresponding MCP tool to realize the control of the heterogeneous intelligent agent model group.

[0021] Furthermore, when the MCP server process starts in step S1, the following operations are performed:

[0022] S1.1. Instantiate the heterogeneous multi-agent simulation interaction environment and keep it resident in memory;

[0023] S1.2. Load the deep neural network weight files of the traffic control agent, ramp agent, and vehicle cooperative agent, and cache the model objects in the process global memory;

[0024] S1.3. Register the signal control agent, ramp agent, and vehicle cooperative agent as tools according to the MCP specification, and define standardized input and output modes; decompose the reinforcement learning environment interaction logic into three action-type tools: action prediction, step simulation, and reward acquisition, and register them.

[0025] S1.4. Provides a macro-level operational indicator resource interface for querying traffic operation status data such as traffic flow, average speed, queue length, and occupancy rate according to road segment identification.

[0026] Furthermore, the micro-control periodic closed-loop method in step S2 includes the following steps:

[0027] S2.1. Read the activity tool list: The MCP host process reads the shared variables of the current activity tool list and obtains the latest traffic operation status required for the basic operation subgraph module to run, so as to determine the agents participating in the decision-making and their input data for the action prediction in this cycle;

[0028] S2.2. Action Prediction: The MCP host process calls the action prediction tool to the MCP server process through the MCP client agent. The MCP server process performs inference on the agents that have reached the decision time and are in the activity tool list based on the matching relationship between the current simulation time and the preset action cycle of each agent, and temporarily stores the generated control actions in the action buffer. Let the preset action cycle of agent i be Ti, the activity tool list be L, and the current simulation time be t, then the inference trigger condition is expressed as: t mod Ti = 0 and i ∈ L;

[0029] S2.3. Simulation Progression and Reward Acquisition:

[0030] The MCP server process first sends the control commands in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the simulation clock forward by one step. Within each step of the physical advance, the MCP server process traverses the timetable, executes the corresponding stage action for the agent model that has reached the switching time, and maintains the current state for the agent model that has not reached the time. It calculates the reward obtained by each agent, collects the latest traffic operation status, and returns the corresponding results to the MCP host process. The feedback content is marked according to the action cycle of each agent. The MCP host process performs a suspension operation at the end of the timetable node to align with the physical clock, and then jumps back to step S2.1 to enter the next cycle.

[0031] Furthermore, the complete decision-making closed-loop method in step S3 includes the following steps:

[0032] S3.1. Reading macro-operation indicators: The MCP host process requests macro-operation indicator data for the specified detection road segment from the MCP server process through the interface of MCP resources, including road segment traffic flow, average speed, queue length, and occupancy rate indicators; the MCP server process extracts the corresponding data from the heterogeneous multi-agent simulation interaction environment and returns it to the MCP host process in a structured format;

[0033] S3.2. Scenario Diagnosis and Strategy Selection: The Strategy Control Subgraph Module analyzes the macro-state data obtained in step S3.1, identifies the current traffic operation scenario, and generates a list of activity tools that should be activated accordingly.

[0034] S3.3. Verification and Switching: Check whether the activity tool list generated in step S3.2 contains at least one core control agent and whether all tool names are within the scope of registered legal tools; if the check passes, atomically update the activity tool list in the MCP host process so that the basic operation subgraph module automatically calls the corresponding agent according to the updated activity tool list in the next cycle; if the check fails, discard the decision result of this time and maintain the original list unchanged.

[0035] The beneficial effects of this invention are:

[0036] 1. This invention encapsulates heterogeneous intelligent agents such as traffic control, ramps, and vehicle coordination into standardized tools through the MCP protocol, using a shared variable in the activity tool list as the sole data channel between the basic operation subgraph and the strategy control subgraph. When changes in traffic conditions require adjustments to the agent combination, only the strategy control subgraph needs to update this variable. The basic operation subgraph automatically calls the corresponding tools according to the new list in the next cycle. Switching between agent combinations does not require modification of scheduling code or redeployment of the system, and the switching takes effect within one basic control cycle.

[0037] 2. This invention splits the system into two independent subgraphs through asynchronous graph orchestration: a basic operation subgraph performs real-time control in a self-looping manner with a simulation step size dt, and a policy control subgraph runs asynchronously with larger periods or event triggers. The two subgraphs execute concurrently in independent asynchronous tasks within the host process. Even if a large model is introduced into the policy control subgraph, causing inference delays of seconds to tens of seconds, the loop timing of the basic operation subgraph remains unaffected. This architecture fundamentally solves the problem of macroscopic decision-making blocking microscopic control loops in traditional serial schemes, achieving compatible operation of second-level real-time control and minute-level policy decisions within the same system.

[0038] 3. This invention deconstructs the environmental interaction logic of traditional reinforcement learning into three independent tools: action prediction, physical stepping, and feedback collection. This design enables heterogeneous agents with different optimization step sizes to complete decisions according to their own rhythm under the drive of a unified physical step size, without the need to maintain multiple independent control loops for agents with different step sizes. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of the structure of a road traffic self-organizing operation and control system with nested large and small models as described in this invention;

[0040] Figure 2 This is a flowchart of a road traffic self-organizing operation and control method with nested large and small models as described in this invention;

[0041] Figure 3 This is a flowchart of a road traffic self-organizing operation and control method with nested large and small models as described in this invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.

[0043] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.

[0044] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 -Appendix Figure 3 Detailed explanation is as follows:

[0045] Example 1:

[0046] A road traffic self-organizing operation and control system with nested large and small models includes an MCP host process and an MCP server process, which are connected through a bidirectional MCP pipe.

[0047] The MCP host process internally deploys a system initialization module, a basic operation subgraph module, a strategy control subgraph module, and adopted strategy and measure variables; the adopted strategy and measure variables are respectively connected to the basic operation subgraph module and the strategy control subgraph module;

[0048] The MCP server process internally deploys MCP tools, MCP resources, heterogeneous agent model groups, and heterogeneous multi-agent simulation interaction environment; the MCP server process instantiates the heterogeneous multi-agent simulation interaction environment in local memory and loads all preset model weights in the heterogeneous multi-agent model group into the memory of the MCP server process at once.

[0049] The modules within the MCP host process collaborate through an asynchronous event loop and a shared list of activity tools. The MCP host process and the MCP server process exchange control requests and runtime data bidirectionally through the invocation of MCP tools and the reading of MCP resources. The heterogeneous agent model group includes traffic control agents, ramp agents, and vehicle agents. Each agent has an independent observation space, action space, and reward function. The observation space of the signal control agent adopts a low-dimensional observation vector, which consists of the phase number normalization, the queuing ratio of each inlet channel, the waiting time ratio of each inlet channel, the phase index normalization, and the phase duration normalization. The observation space of the ramp agent consists of the position-velocity characteristics of ramp vehicles and main road vehicles; The observation space of the vehicle intelligent agent consists of nine-dimensional normalized vectors.

[0050] Furthermore, the MCP tool includes three action-related tools: an action prediction tool, a step simulation tool, and a reward acquisition tool.

[0051] The action prediction tool is responsible for triggering the neural network forward inference of the heterogeneous intelligent agent model group, generating control actions and temporarily storing them in the action cache area;

[0052] The stepping simulation tool is responsible for sending the action instructions in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the physical clock to advance one step;

[0053] The reward acquisition tool is responsible for collecting reward values ​​and state snapshots after a physical step is completed, which are used as inputs for the next action prediction.

[0054] Furthermore, the observation space, action space, and reward function of the signal-controlled agent are as follows:

[0055] The observation space of an information control agent is defined as:

[0056]

[0057] in, For the observation vector of the signal control agent; For the bit normalization quantity, take ; For the first Queuing at each entrance lane, take ; For the first The average waiting time at each entrance lane is normalized to the following values. ; The normalized value of the current phase index is taken as... ; The normalized value of the current phase's execution duration is taken as... ; Number of import lanes; This represents the total number of green light phases. For lane Current number of vehicles in the queue; For lane Maximum capacity; The duration of execution for the current phase; The maximum execution time allowed for the current phase;

[0058] The action space of the signal control agent is a discrete-phase action space, defined as:

[0059]

[0060] in, For the action of the signal control agent, indicate the next green light phase index;

[0061] The reward function of the signal control agent takes the inter-step difference of the local delay and is defined as:

[0062]

[0063] in, The current step reward for the information control intelligent agent; For the first The total local delay value at the pedestrian intersection is taken as follows: ; For vehicles Local delays at the current intersection, take ; For vehicles To the The cumulative waiting time for each step; For vehicles Historical cumulative waiting time when entering the current intersection; For the first The group of vehicles located within the current intersection control area;

[0064] Furthermore, the ramp agent is defined as:

[0065]

[0066] in, For the observation set of the ramp intelligent agent; For the first The vehicle's position and speed; This is the maximum number of vehicles that can be controlled on the ramp; The maximum number of vehicles observed on the main road;

[0067] Take on ramp vehicles Take measures for vehicles on the main road ; This represents the longitudinal position of the vehicle in the corresponding lane. , These refer to the length of the ramp and the length of the main road observation section, respectively.

[0068] The action space of the ramp agent is a continuous speed adjustment action space, defined as:

[0069]

[0070] in, For the action vector of the ramp agent; For the first The expected speed adjustment for each vehicle on the ramp; Adjust the amplitude for the maximum speed of a single vehicle;

[0071] No. The expected speed of the vehicle after execution is:

[0072]

[0073] in, Speed ​​limits for ramps, The original speed factor of the vehicle. Minimum permissible speed, This is a truncation function;

[0074] The reward function of the ramp agent consists of the basic bias, the color strip safety reward, and the total delay penalty, and is defined as follows:

[0075]

[0076] in, The reward for the current step of the ramp agent; As a safety reward for the ribbon model, take ; For the first The vehicle's safety rating is located in the red zone. Take the yellow area Otherwise take ; For the total delay, take ; Average ramp delay; Average delay on the main road; This represents the effective number of vehicles on the ramp; Ramp length; For the first The vehicle's position measured from the ramp entrance;

[0077] Furthermore, the observation space of the vehicle intelligent agent is defined as follows:

[0078]

[0079] in, For vehicle intelligent agent observation vectors; This is the normalized value of the distance from the vehicle to the intersection; This is the normalized value of its own velocity; The normalized value for its own acceleration; This is the normalized value of the speed difference with the vehicle in front; The normalized value for the time distance to the front of the vehicle ahead; The normalized value of the acceleration of the vehicle in front; This is a normalized value representing the time elapsed since the last phase change; For traffic light direction indication, green light means Otherwise take ; The light is yellow; the current light is yellow. Otherwise take ;

[0080] The action space of the vehicle intelligent agent is a continuous acceleration action space, defined as:

[0081]

[0082] in, For the actions of the vehicle's intelligent agent, the desired acceleration is represented; This is the upper limit of the acceleration amplitude; it is taken during execution. ;

[0083] The reward function of the vehicle agent consists of a minimum delay reward, a basic penalty, and an acceleration stability penalty, and is defined as follows:

[0084]

[0085] in, Reward the vehicle's intelligent agent for the current step; To minimize the delay reward, take ; The basic penalty term is taken as a constant. ; To achieve acceleration stability penalty, take ; For target speed; For vehicles Current speed; For vehicles Current acceleration; This is the group of vehicles currently under control in the lane.

[0086] Furthermore, each agent model in the heterogeneous agent model group is encapsulated as a tool conforming to the MCP specification and exposes three action class tools and at least one resource class interface to enable the MCP host process to call it.

[0087] Furthermore, the MCP host process integrates an asynchronous graph orchestration engine (based on LangGraph) to model the traffic control decision-making process as a directed graph, compiling and managing two independent subgraphs—the basic operations subgraph and the policy control subgraph. The basic operations subgraph is responsible for real-time traffic control, executing in a self-looping manner with a simulation step size dt (e.g., 0.5 seconds). The policy control subgraph dynamically determines the appropriate combination of control strategies and measures based on the traffic status, executing with a longer control period (e.g., 60 seconds) or triggered by a traffic event. The two subgraphs run concurrently in independent asynchronous tasks within the Host process, without blocking each other. The Host also maintains a cross-subgraph shared variable—the adopted strategies and measures. The basic operations subgraph reads this variable to invoke the corresponding intelligent agent tools, while the policy control subgraph updates its decisions through scenario diagnosis.

[0088] Furthermore, during heterogeneous multi-agent inference, the timing of action prediction and reward acquisition is determined based on the iteration step size of each agent. At the same time, during step-by-step simulation, each type of agent needs to perform separate state statistics and action triggering to ensure that the predicted action can be executed in the corresponding time frame.

[0089] This invention discloses a road traffic self-organizing operation and control system with nested large and small models. It encapsulates heterogeneous agents into standardized tools using the MCP protocol, employing a shared variable in the activity tool list as the sole data channel between the basic operation subgraph and the strategy control subgraph. Switching between agent combinations requires no modification to the scheduling code. Simultaneously, asynchronous graph orchestration divides the system into two independent subgraphs: the basic operation subgraph performs second-level real-time control in a self-looping manner with simulation steps, while the strategy control subgraph runs asynchronously with larger periods or event triggers. Both execute concurrently without blocking each other, fundamentally solving the problem of macro-level decision-making blocking micro-level control loops in traditional serial architectures.

[0090] The road traffic self-organizing operation and control system described in this invention, which uses nested models of varying sizes, deconstructs the environmental interaction logic into three independent tools: action prediction, physical stepping, and feedback collection. Each agent independently determines whether to perform inference within its own preset cycle within the action prediction tool, and the feedback collection is marked according to each agent's cycle. This design allows heterogeneous agents with different optimization step sizes to complete decisions according to their own rhythm within the same control loop, eliminating the need to maintain multiple independent control loops.

[0091] The road traffic self-organizing operation and control system described in this invention, which uses nested models of different sizes, designs three types of heterogeneous intelligent agents: signal control agents, ramp agents, and vehicle agents. Differentiated observation spaces, action spaces, reward functions, and decision cycles are defined for each type. The agents are uniformly encapsulated into standardized tools through the MCP protocol, enabling collaborative scheduling of heterogeneous intelligent agents within the same framework.

[0092] Example 2:

[0093] A method for self-organizing and managing road traffic operations using nested large and small models, implemented based on the road traffic self-organizing and managing system using nested large and small models described in Example 1, includes the following steps:

[0094] S1. The system initialization module performs system initialization. After the MCP host process starts, the MCP server process is started through the MCP bidirectional pipe to instantiate the heterogeneous multi-agent simulation interaction environment and load and register the heterogeneous agent model group.

[0095] Furthermore, when the MCP server process starts in step S1, the following operations are performed:

[0096] S1.1. Instantiate the heterogeneous multi-agent simulation interaction environment and keep it resident in memory;

[0097] S1.2. Load the deep neural network weight files of the traffic control agent, ramp agent, and vehicle cooperative agent, and cache the model objects in the process global memory;

[0098] S1.3. Register the signal control agent, ramp agent, and vehicle cooperative agent as tools according to the MCP specification, and define standardized input and output modes; decompose the reinforcement learning environment interaction logic into three action-type tools: action prediction, step simulation, and reward acquisition, and register them.

[0099] S1.4. Provides a macro-level operational indicator resource interface for querying traffic operation status data such as traffic flow, average speed, queue length, and occupancy rate according to road segment identification.

[0100] Furthermore, through the aforementioned tool-based decomposition, heterogeneous agents with different optimization step sizes can collaborate and interact within the same control framework, making decisions according to their respective rhythms, without the need to maintain multiple independent agent control loops. Through the aforementioned initialization operations, heterogeneous agents with different optimization step sizes complete registration using a unified tool, and the physical server loads all model weights into memory at once, laying the foundation for high-frequency, zero-latency calls to the subsequent basic control loops.

[0101] S2. The basic operation subgraph module completes the micro-control cycle closed loop of state and activity tool list acquisition, action prediction, simulation advancement and reward acquisition periodically with a fixed step size, so as to drive all intelligent agent models in the heterogeneous intelligent agent model group with a unified physical step size.

[0102] Furthermore, the micro-control periodic closed-loop method in step S2 includes the following steps:

[0103] S2.1. Read the activity tool list: The MCP host process reads the shared variables of the current activity tool list and obtains the latest traffic operation status required for the basic operation subgraph module to run, so as to determine the agents participating in the decision-making and their input data for the action prediction in this cycle;

[0104] S2.2. Action Prediction: The MCP host process calls the action prediction tool to the MCP server process through the MCP client agent. The MCP server process performs inference on the agents that have reached the decision time and are in the activity tool list based on the matching relationship between the current simulation time and the preset action cycle of each agent, and temporarily stores the generated control actions in the action buffer. Let the preset action cycle of agent i be Ti, the activity tool list be L, and the current simulation time be t, then the inference trigger condition is expressed as: t mod Ti = 0 and i ∈ L;

[0105] S2.3. Simulation Progression and Reward Acquisition:

[0106] The MCP server process first sends the control commands in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the simulation clock forward by one step. Within each step of the physical advance, the MCP server process traverses the timetable, executes the corresponding stage action for the agent model that has reached the switching time, and maintains the current state for the agent model that has not reached the time. It calculates the reward obtained by each agent, collects the latest traffic operation status, and returns the corresponding results to the MCP host process. The feedback content is marked according to the action cycle of each agent. The MCP host process performs a suspension operation at the end of the timetable node to align with the physical clock, and then jumps back to step S2.1 to enter the next cycle.

[0107] Furthermore, for actions that need to be executed in stages during the simulation (such as traffic light switching requiring a yellow light transition, a full red light clear, and a new phase green light activation), the physical server internally maintains an action transition timetable for each controlled unit, recording the currently executed transition action and the target switching time. Within each dt of the physical step progression, the physical server traverses this timetable, executing the corresponding stage action for units that have reached their switching time, while units that have not reached their time maintain their current state. Thus, the agent only needs to generate a target decision once when its own action cycle is reached; subsequent transitions are automatically completed by the physical server in continuous physical steps, maintaining the independent optimization step size for each agent while supporting gradual action changes during simulation iterations.

[0108] Furthermore, the feedback content is marked according to the action cycle of each agent. Only when an agent executes a new inference decision within the current step is its corresponding reward and state change included in the feedback, allowing agents with different optimization step sizes to be compatible with their respective decision-making rhythms in the same feedback channel. The host process performs a suspension operation at the end of this node to align with the physical clock. Through the sequential invocation of the above three tools, the basic operation subgraph drives all agents with a unified physical step size. Each agent independently determines whether to execute inference according to its own preset cycle in the action prediction stage, enabling heterogeneous agents with different optimization step sizes to complete decisions according to their own rhythms in the same control loop without maintaining multiple independent control loops.

[0109] The further defined basic control loop is responsible for the real-time control execution of traffic operations. It periodically completes a micro-control closed loop of "state and inventory acquisition—action prediction—simulation progression and reward acquisition" with a fixed step size, ensuring real-time response to second-level control measures such as traffic signals, ramps, and vehicle coordination. This closed loop executes cyclically with a period of dt, meaning the k-th cycle corresponds to the simulation time tk = k·dt. The basic operation subgraph within the host process runs in a self-looping manner with a fixed simulation step size dt (e.g., 0.5 seconds). Each cycle sequentially calls the three action-type tools mentioned above to complete a full micro-control closed loop.

[0110] S3. Run the strategy control subgraph module in an independent asynchronous task, wake it up at a period of T or triggered by a traffic event, complete the complete decision-making loop of reading macro operation indicators - scenario diagnosis and strategy selection - verification and switching, and obtain an updated list of activity tools;

[0111] Furthermore, the complete decision-making closed-loop method in step S3 includes the following steps:

[0112] S3.1. Reading macro-operation indicators: The MCP host process requests macro-operation indicator data for the specified detection road segment from the MCP server process through the interface of MCP resources, including road segment traffic flow, average speed, queue length, and occupancy rate indicators; the MCP server process extracts the corresponding data from the heterogeneous multi-agent simulation interaction environment and returns it to the MCP host process in a structured format;

[0113] S3.2. Scenario Diagnosis and Strategy Selection: The Strategy Control Subgraph Module analyzes the macro-state data obtained in step S3.1, identifies the current traffic operation scenario, and generates a list of activity tools that should be activated accordingly.

[0114] Furthermore, this node operates in one of the following two modes depending on the system configuration:

[0115] 1. Deterministic Rule-Based Model: Diagnosis is based on pre-defined traffic engineering rules. For example, a congestion metric P = Qin − Qout (the difference between inflow and outflow traffic on a road segment) can be defined, similar to the concept of pressure. When P exceeds a threshold θ, a congestion scenario is identified. For instance, if the traffic flow on a road segment exceeds a set threshold for multiple consecutive data collection cycles, it is determined that a ramp control agent needs to be activated; when specific accident characteristics are detected, it is determined that an emergency traffic management agent needs to be activated. The rule base can be configured and expanded according to the actual road network characteristics.

[0116] Two intelligent model modes: Macro-level state data is constructed as structured input and requests are sent to the large model service asynchronously and non-blockingly. The large model integrates multi-dimensional traffic indicators to perform scenario reasoning and strategy selection, outputting diagnostic conclusions and a recommended tool list. The advantage of this mode lies in its ability to handle complex or ambiguous scenarios not covered by the rule base, leveraging the generalization reasoning capabilities of the large model for flexible judgment. If a request times out, experiences network interruption, or returns an incompatible format, the node automatically circuit breaks, degrading to the aforementioned deterministic rule mode as the first line of defense to ensure uninterrupted diagnostic processing.

[0117] The diagnostic results include the current traffic operation scenario label and a list of recommended intelligent agent tools to be enabled.

[0118] S3.3. Verification and Switching: Check whether the activity tool list generated in step S3.2 contains at least one core control agent and whether all tool names are within the scope of registered legal tools; if the check passes, atomically update the activity tool list in the MCP host process so that the basic operation subgraph module automatically calls the corresponding agent according to the updated activity tool list in the next cycle; if the check fails, discard the decision result of this time and maintain the original list unchanged.

[0119] Furthermore, the strategy control subgraph is positioned based on traffic operation situation analysis, dynamically selecting the combination of traffic control strategies and measures to be activated. Unlike the basic operation subgraph, which focuses on real-time control execution, the strategy control subgraph focuses on the trend of traffic state changes over a longer time window, determining the current operating scenario of the road network (such as normal traffic, increased congestion, sudden accidents, tidal imbalance, etc.), and accordingly deciding which heterogeneous intelligent agent tools should be activated to work collaboratively. The host process runs this subgraph in an independent asynchronous task, awakened at a period T (e.g., 60 seconds) or triggered by a traffic event, executing concurrently with the basic operation subgraph without blocking each other.

[0120] Furthermore, through the aforementioned mechanism, the strategy control subgraph achieves a complete decision-making closed loop of "judgment—selection—verification—switching." It communicates asynchronously with the basic operation subgraph only through shared variables in the activity tool list, completely decoupling the two in terms of time dimension and execution entity, ensuring that strategy switching does not cause any disturbance to real-time control.

[0121] S4. Based on the updated activity tool list obtained in step S3, the basic operation subgraph module automatically reads the updated activity tool list shared variables in the next micro-control cycle and calls the corresponding MCP tool to realize the control of the heterogeneous intelligent agent model group.

[0122] Asynchronous state synchronization is a key link connecting the policy control subgraph and the basic operation subgraph, and its role is to realize the transmission of policy decision results to real-time control execution.

[0123] After the strategy control subgraph completes the tool list update, the basic operation subgraph requires no notification or interruption. When S201 is executed in the next cycle, the updated activity tool list shared variable is automatically read, and the corresponding agent tool is called according to the new list. For non-periodic control needs (such as variable lane switching), simply add the tool name to the list in the strategy control subgraph based on event-triggered decisions, and it will be automatically called in subsequent basic control cycles without modifying any code.

[0124] Through the above mechanism, the strategy control subgraph and the basic operation subgraph only intersect on the shared variables of the activity tool list. The update of strategy decisions and the execution of real-time control are completely decoupled in time and process, realizing the collaborative scheduling effect of "asynchronous decision-making and synchronous execution".

[0125] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0126] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A road traffic self-organizing operation and control system with nested large and small models, characterized in that, This includes the MCP host process and the MCP server process, which are connected through a bidirectional MCP pipe. The MCP host process internally deploys a system initialization module, a basic operation subgraph module, a strategy control subgraph module, and adopted strategy and measure variables; the adopted strategy and measure variables are respectively connected to the basic operation subgraph module and the strategy control subgraph module; The MCP server process internally deploys MCP tools, MCP resources, heterogeneous agent model groups, and heterogeneous multi-agent simulation interaction environment; the MCP server process instantiates the heterogeneous multi-agent simulation interaction environment in local memory and loads all preset model weights in the heterogeneous multi-agent model group into the memory of the MCP server process at once. The modules within the MCP host process collaborate through an asynchronous event loop and a shared list of activity tools. The MCP host process and the MCP server process exchange control requests and runtime data bidirectionally through the invocation of MCP tools and the reading of MCP resources. The heterogeneous agent model group includes traffic control agents, ramp agents, and vehicle agents. Each agent has an independent observation space, action space, and reward function. The observation space of the signal control agent adopts a low-dimensional observation vector, which consists of the phase number normalization, the queuing ratio of each inlet channel, the waiting time ratio of each inlet channel, the phase index normalization, and the phase duration normalization. The observation space of the ramp agent consists of the position-velocity characteristics of ramp vehicles and main road vehicles; The observation space of the vehicle intelligent agent consists of nine-dimensional normalized vectors.

2. The road traffic self-organizing operation and control system with nested large and small models according to claim 1, characterized in that, The MCP tool includes three action-related tools: an action prediction tool, a step simulation tool, and a reward acquisition tool. The action prediction tool is responsible for triggering the neural network forward inference of the heterogeneous intelligent agent model group, generating control actions and temporarily storing them in the action cache area; The stepping simulation tool is responsible for sending the action instructions in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the physical clock to advance one step; The reward acquisition tool is responsible for collecting reward values ​​and state snapshots after a physical step is completed, which are used as inputs for the next action prediction.

3. A road traffic self-organizing operation and control system with nested large and small models according to claim 2, characterized in that, Each agent model in the heterogeneous agent model group is encapsulated as a tool conforming to the MCP specification and exposes three action class tools and at least one resource class interface to enable the MCP host process to call it.

4. A method for self-organized operation and control of road traffic with nested large and small models, implemented based on the road traffic self-organized operation and control system with nested large and small models as described in any one of claims 1-3, characterized in that, Includes the following steps: S1. The system initialization module performs system initialization. After the MCP host process starts, the MCP server process is started through the MCP bidirectional pipe to instantiate the heterogeneous multi-agent simulation interaction environment and load and register the heterogeneous agent model group. S2. The basic operation subgraph module completes the micro-control cycle closed loop of state and activity tool list acquisition, action prediction, simulation advancement and reward acquisition periodically with a fixed step size, so as to drive all intelligent agent models in the heterogeneous intelligent agent model group with a unified physical step size. S3. Run the strategy control subgraph module in an independent asynchronous task, wake it up at a period of T or triggered by a traffic event, complete the complete decision-making loop of reading macro operation indicators - scenario diagnosis and strategy selection - verification and switching, and obtain an updated list of activity tools; S4. Based on the updated list of activity tools obtained in step S3, the basic operation subgraph module automatically reads the shared variables of the updated list of activity tools in the next micro-control cycle and calls the corresponding MCP tool to realize the control of the heterogeneous intelligent agent model group.

5. The road traffic self-organizing operation and control method with nested large and small models according to claim 4, characterized in that, When the MCP server process starts in step S1, it performs the following operations: S1.

1. Instantiate the heterogeneous multi-agent simulation interaction environment and keep it resident in memory; S1.

2. Load the deep neural network weight files of the traffic control agent, ramp agent, and vehicle cooperative agent, and cache the model objects in the process global memory; S1.

3. Register the signal control agent, ramp agent, and vehicle cooperative agent as tools according to the MCP specification, and define standardized input and output modes; decompose the reinforcement learning environment interaction logic into three action-type tools: action prediction, step simulation, and reward acquisition, and register them. S1.

4. Provides a macro-level operational indicator resource interface for querying traffic operation status data such as traffic flow, average speed, queue length, and occupancy rate according to road segment identification.

6. The road traffic self-organizing operation and control method with nested large and small models according to claim 5, characterized in that, The micro-control periodic closed-loop method in step S2 includes the following steps: S2.

1. Read the activity tool list: The MCP host process reads the shared variables of the current activity tool list and obtains the latest traffic operation status required for the basic operation subgraph module to run, so as to determine the agents participating in the decision-making and their input data for the action prediction in this cycle; S2.

2. Action Prediction: The MCP host process calls the action prediction tool from the MCP client agent to the MCP server process. The MCP server process, based on the matching relationship between the current simulation time and the preset action cycles of each agent, performs inference on agents that have reached the decision time and are in the activity tool list, and temporarily stores the generated control actions in the action buffer. Let the agent... i The preset action cycle is Ti The list of activity tools is as follows L The current simulation time is t The reasoning trigger condition is then expressed as: t mod Ti= 0 and i∈L ; S2.

3. Simulation Progression and Reward Acquisition: The MCP server process first sends the control instructions in the action buffer to the heterogeneous multi-agent simulation interaction environment, driving the simulation clock forward by one step. Within each step of the physical step, the MCP server process traverses the timetable and executes the corresponding stage action for the agent model that has reached the switching time, while the agent model that has not reached the time maintains its current state. The rewards obtained by each agent are calculated, the latest traffic operation status is collected, and the corresponding results are returned to the MCP host process. The feedback content is marked according to the action cycle of each agent. The MCP host process performs a suspension operation at the end of the timetable node to align with the physical clock, and then jumps back to step S2.1 to enter the next cycle.

7. A road traffic self-organizing operation and control method with nested large and small models according to claim 6, characterized in that, The complete decision-making closed-loop method in step S3 includes the following steps: S3.

1. Reading macro-operation indicators: The MCP host process requests macro-operation indicator data for the specified detection road segment from the MCP server process through the interface of MCP resources, including road segment traffic flow, average speed, queue length, and occupancy rate indicators; the MCP server process extracts the corresponding data from the heterogeneous multi-agent simulation interaction environment and returns it to the MCP host process in a structured format; S3.

2. Scenario Diagnosis and Strategy Selection: The Strategy Control Subgraph Module analyzes the macro-state data obtained in step S3.1, identifies the current traffic operation scenario, and generates a list of activity tools that should be activated accordingly. S3.

3. Verification and Switching: Check whether the activity tool list generated in step S3.2 contains at least one core control agent and whether all tool names are within the scope of registered legal tools; if the check passes, atomically update the activity tool list in the MCP host process so that the basic operation subgraph module automatically calls the corresponding agent according to the updated activity tool list in the next cycle; if the check fails, discard the decision result of this time and maintain the original list unchanged.