Traffic signal cooperative optimization control method and device based on large language model

By constructing an intersection topology and traffic flow based on a large language model-based traffic signal collaborative optimization control method, feedback decision instructions are generated, which solves the problem of insufficient coordination of traffic signal control in urban road networks and improves the overall traffic operation efficiency.

CN122223985APending Publication Date: 2026-06-16TIANJIN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-04-22
Publication Date
2026-06-16

Smart Images

  • Figure CN122223985A_ABST
    Figure CN122223985A_ABST
Patent Text Reader

Abstract

The application provides a traffic signal cooperative optimization control method and device based on a large language model, which can be applied to the technical field of traffic signal control. The method comprises the following steps: determining the spatial congestion degree and congestion evolution trend of each traffic flow at the current control step based on the driving vehicle data of each traffic flow in the intersection topology; for each intersection node, generating a feedback decision instruction for the historical phase based on the congestion change of the traffic flow passing through the intersection node after the corresponding historical phase is executed; using a large language model to analyze the spatial congestion degree and congestion change trend of each traffic flow at the current control step, the congestion change trend of the adjacent traffic flow of each traffic flow at the current control step, and the feedback decision instruction of each intersection node, to obtain the phase of each intersection node at the current control step, wherein the adjacent traffic flow is the traffic flow adjacent to the traffic flow in space and having a congestion propagation relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic signal control technology, and more specifically to a traffic signal cooperative optimization control method and device based on a large language model. Background Technology

[0002] With the continuous growth of urban motor vehicle ownership, urban road networks generally suffer from prolonged congestion and severe traffic delays during peak hours, making traffic efficiency a key factor restricting sustainable urban development. Traffic signal control strategies in related technologies mostly employ traditional schemes based on fixed timing or semi-adaptive control methods relying on local detector information.

[0003] However, the aforementioned control strategies typically use a single intersection or a few intersections as control units, lacking a unified coordination mechanism between different intersections. Furthermore, the control strategies are relatively fixed, making it difficult to adaptively adjust the traffic signal control rhythm based on real-time traffic fluctuations. Therefore, when employing these strategies, urban road networks still face technical challenges such as prolonged congestion times and low overall traffic efficiency. Summary of the Invention

[0004] In view of the above problems, the present invention provides a traffic signal cooperative optimization control method and device based on a large language model.

[0005] According to one aspect of the present invention, a traffic signal cooperative optimization control method based on a large language model is provided, comprising: determining the spatial congestion degree and congestion evolution trend of each traffic flow in the current control step based on the vehicle data of each traffic flow in the intersection topology, wherein the intersection topology includes intersection nodes representing the intersection and edges representing the connection relationship between multiple intersections, and the traffic flow is a traffic path composed of upstream lanes entering the intersection and downstream lanes leaving the intersection; for each intersection node, generating a traffic signal cooperative optimization control method based on the congestion change of the traffic flow passing through the intersection node after the corresponding historical phase is executed. Feedback decision instructions are generated for historical phases, where historical phases are used to indicate the traffic signals executed by intersection nodes in historical control steps, and feedback decision instructions are used to adjust the selection tendency of the current control step for historical phases. Using a large language model, the spatial congestion degree and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node are inferred and analyzed to obtain the phase of each intersection node in the current control step. The neighboring traffic flows are traffic flows that are spatially adjacent to the traffic flow and have a congestion propagation relationship.

[0006] According to an embodiment of the present invention, the vehicle data includes: the travel time of each vehicle at multiple sampling time points, and the spatial occupancy data of the vehicle at the target sampling time point; the multiple sampling times include the target sampling time point; based on the vehicle data of each traffic flow in the intersection topology, determining the spatial congestion degree and congestion evolution trend of each traffic flow in the current control step may include the following operations.

[0007] For each traffic flow, based on the spatial occupancy data of the traffic flow, the spatial congestion level of the traffic flow in the current control step is determined. The spatial occupancy data includes at least one of the following: the number of vehicles in the traffic flow, the projected area of ​​each vehicle, and the distance between the leading vehicle and the trailing vehicle. For each traffic flow, based on the travel time of each vehicle at multiple sampling time points, the longest travel time at each of the multiple sampling time points is determined. A time series analysis is performed on the longest travel time at each of the multiple sampling time points to determine the congestion evolution trend.

[0008] According to an embodiment of the present invention, determining the degree of spatial congestion of the traffic flow in the current control step based on the spatial occupancy data of the traffic flow may include the following operations.

[0009] The queuing intensity of the traffic flow is determined based on the number of vehicles in the flow and / or the distance between the first and last vehicles. The average vehicle occupancy rate of the traffic flow is determined based on the projected area of ​​each vehicle and the path length of the traffic flow. The queuing intensity and the average vehicle occupancy rate are comprehensively evaluated to obtain the spatial congestion level of the traffic flow in the current control step.

[0010] According to embodiments of the present invention, the above-described traffic signal cooperative optimization control method may further include the following operations.

[0011] Before the corresponding historical phase is executed at the intersection node, determine the historical spatial congestion level or historical congestion evolution trend of the traffic flow passing through the intersection node; based on the comparison results of the spatial congestion level of the traffic flow passing through the intersection node with the historical spatial congestion level, and / or the comparison results of the congestion evolution trend of the traffic flow passing through the intersection node with the historical congestion evolution trend, determine the congestion change of the traffic flow passing through the intersection node.

[0012] According to an embodiment of the present invention, based on the congestion changes of traffic flow passing through the intersection node after the intersection node executes the corresponding historical phase, a feedback decision instruction for the historical phase is generated, which may include the following operations.

[0013] Aggregate analysis is performed on the congestion changes of at least one traffic flow passing through the intersection node to determine the overall congestion change of the intersection node. If the overall congestion change indicates that congestion has eased, the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the first priority, where the first priority is higher than the preset priority. If the overall congestion change indicates that congestion has not eased, the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the second priority, where the second priority is lower than the preset priority.

[0014] According to an embodiment of the present invention, a large language model is used to perform reasoning analysis on the spatial congestion degree and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flow of each traffic flow in the current control step, and the feedback decision instructions of each intersection node to obtain the phase of each intersection node in the current control step, which may include the following operations.

[0015] The spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flows of each traffic flow in the current control step, the historical phase of each intersection node, feedback decision instructions, and the traffic flow to be released corresponding to each feasible phase are embedded into a preset prompt template to obtain target prompt words. Among them, the feasible phase is determined according to the traffic signals that the traffic lights of the intersection node can indicate, and the released traffic flow is the traffic flow released by the feasible phase of the intersection node. The target prompt words are input into the large language model to obtain the phase information of each intersection node in the current control step. The phase information includes the phase.

[0016] According to an embodiment of the present invention, the preset prompt template includes: inference path constraints for constraining the inference order of the large language model, signal switching constraints for constraining phase switching to meet traffic signal switching specifications, and output format constraints for constraining the output format; the signal switching constraints include at least one of the following: minimum green light duration, maximum green light duration, yellow light duration, all-red light duration, minimum switching interval, and switching penalty rules; wherein, inputting the target prompt word into the large language model to obtain the phase information of each intersection node in the current control step may include the following operations.

[0017] The target prompt is input into the large language model so that the large language model can perform the following operations based on the inference path constraints.

[0018] For each intersection node, based on the congestion evolution trend of each traffic flow passing through the intersection node and a preset duration threshold, time-based congestion analysis is performed on each traffic flow to obtain the analysis results. If it is determined that there is a first traffic flow at the intersection node with an increasing congestion evolution trend and a longest travel time at the latest sampling time exceeding the preset duration threshold, the first feasible phase for releasing the first traffic flow is determined from the traffic flows corresponding to each feasible phase. Based on the spatial congestion degree of each traffic flow, the second traffic flow with the greatest impact on the traffic efficiency of the intersection node is identified, and this is combined with the neighborhood congestion of each traffic flow. The congestion evolution trend of traffic flow is analyzed. From the traffic flows corresponding to each feasible phase, the second feasible phase that can be allowed to proceed and has the least impact on the congestion pressure of neighboring traffic flows is determined. When the feedback decision instruction is to update the selection priority of historical phases from the preset priority to the first priority, the historical phase, the first feasible phase, and the second feasible phase are all regarded as candidate phases. Based on the historical phases and signal switching constraints, the phase of the intersection node in the current control step is determined from the candidate phases. Based on the phase of the intersection node in the current control step and the output format constraints, phase information is generated.

[0019] According to an embodiment of the present invention, the output format constraint is used to constrain the phase of each intersection node in the current control step, the reason for the output phase, and the executable action code corresponding to the phase in the output of the large language model; the above-mentioned traffic signal cooperative optimization control method may further include the following operations.

[0020] The phase information is subjected to integrity verification to obtain a first verification result. If the first verification result indicates that the phase information includes fields corresponding to the phase, cause, and executable action code, the content information included in the phase, cause, and executable action code is subjected to format verification to obtain a second verification result. The executable action code is subjected to legality verification, and the phase is subjected to switching specification verification using signal switching constraints to obtain a third verification result. If both the second and third verification results indicate that the verification is passed, the phase information is sent to the traffic signal controller, which is the control device for traffic lights.

[0021] According to embodiments of the present invention, the above-described traffic signal cooperative optimization control method may further include the following operations.

[0022] If the second or third verification result indicates that the verification failed, a failure reason is generated based on the target verification result that failed the verification in the second and third verification results; the failure reason and target prompt words are re-inputted into the large language model, and the updated phase information is output; after verifying the updated phase information, if both the updated second verification result and the updated third verification result indicate that the verification passed, the updated phase information is sent to the traffic signal controller.

[0023] Another aspect of the present invention provides a traffic signal cooperative optimization control device based on a large language model, comprising: a determination module, configured to determine the spatial congestion degree and congestion evolution trend of each traffic flow in the current control step based on the driving vehicle data of each traffic flow in the intersection topology, wherein the intersection topology includes intersection nodes representing the intersection and edges representing the connection relationship between multiple intersections, and the traffic flow is a traffic path composed of upstream lanes entering the intersection and downstream lanes leaving the intersection; and a generation module, configured to, for each intersection node, determine the congestion change of the traffic flow passing through the intersection node after the corresponding historical phase is executed. Furthermore, the system generates feedback decision instructions for historical phases, where historical phases are used to indicate the traffic signals executed by intersection nodes in historical control steps, and feedback decision instructions are used to adjust the selection tendency of the current control step for historical phases; the output module is used to use a large language model to reason and analyze the spatial congestion degree and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node, to obtain the phase of each intersection node in the current control step. The neighboring traffic flows are traffic flows that are spatially adjacent to the traffic flow and have a congestion propagation relationship.

[0024] Another aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0025] Another aspect of the present invention provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0026] Another aspect of the present invention provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0027] According to the traffic signal cooperative optimization control method based on a large language model of the present invention, the urban road network is constructed as an intersection topology, and the lanes passing through each intersection are refined into traffic flows, thereby achieving more accurate identification of congestion states at different turns. Based on the driving vehicle data of each traffic flow, the spatial congestion degree in the spatial dimension and the congestion evolution trend in the temporal dimension of each traffic flow are determined, thereby determining the congestion state description of each traffic flow in the spatiotemporal dimension. Furthermore, based on the actual congestion relief of each traffic flow after the execution of historical phases, semantic feedback decision instructions are generated, thereby enabling timely correction and improvement of ineffective actions.

[0028] When processing input consisting of the aforementioned data, the large language model can analyze the congestion status and trends of the current traffic flow through its inherent semantic understanding capabilities. It also considers the trends in neighboring traffic flows to determine whether congestion at the intersection will be affected by neighboring traffic propagation. Furthermore, based on the selection tendencies of feedback decision instructions, it determines the phases of each intersection node suitable for the current scenario. Therefore, it at least partially solves the technical problem of low overall traffic efficiency in urban road networks, achieving the technical effect of generating more accurate traffic signal control schemes in complex congestion scenarios and improving overall traffic efficiency. Attached Figure Description

[0029] The above-mentioned contents, as well as other objects, features and advantages of the present invention, will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings.

[0030] Figure 1 The diagram illustrates an application scenario of the traffic signal collaborative optimization control method and apparatus based on a large language model according to an embodiment of the present invention.

[0031] Figure 2 A flowchart of a traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention is shown.

[0032] Figure 3 A schematic diagram of a traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention is shown.

[0033] Figure 4 A schematic diagram comparing the traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention with related technologies is shown.

[0034] Figure 5 A structural block diagram of a traffic signal cooperative optimization control device based on a large language model according to an embodiment of the present invention is shown.

[0035] Figure 6 A block diagram of an electronic device suitable for implementing a traffic signal cooperative optimization control method based on a large language model, according to an embodiment of the present invention, is shown. Detailed Implementation

[0036] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0037] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0038] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0039] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0040] The research revealed that real-world urban road networks are large-scale, complex in structure, and exhibit highly time-varying traffic demands. Traffic signal control strategies, whether based on fixed timing, semi-adaptive control using local detector information, or intelligent control methods based on deep reinforcement learning, still face significant technical bottlenecks when optimizing global efficiency for large-scale road networks. These bottlenecks are specifically manifested in the following aspects.

[0041] Insufficient global coordination in road networks: Signal control systems in related technologies often use single intersections or a few intersections as control units, lacking a unified coordination mechanism between different intersections. They rely more on empirical "green wave" strategies or simple arterial road priority policies, making it difficult to achieve regional coordination and global optimization in complex road networks. Furthermore, research has shown that even multi-agent reinforcement learning methods often degenerate into "approximate local optimization" due to excessively high state and action dimensions, failing to effectively characterize the propagation and cumulative effects of congestion in road networks.

[0042] Limited state representation and generalization capabilities: Reinforcement learning-based traffic signal control methods typically rely on manually designed state features, lacking unified modeling of road network topology, neighborhood interactions, and medium- to long-term evolution trends. This hinders policy transfer and generalization across different scenarios. When traffic demand patterns change significantly or expand to new road networks, time-consuming retraining or complex parameter adjustments are often required, impacting actual deployment efficiency.

[0043] The decision-making process lacks interpretability: Deep reinforcement learning strategies typically map directly from states to actions through deep neural networks, making their internal reasoning process invisible to traffic engineers, exhibiting a "black box" characteristic. When abnormal signal timing or localized congestion occurs, it is difficult to trace the cause at the strategy level, and it also hinders targeted adjustments and monitoring by humans. This lack of interpretability becomes a significant obstacle to the large-scale implementation of intelligent control methods in practical engineering applications.

[0044] The spatiotemporal feedback mechanism is crude and struggles to balance real-time performance and stability: related technologies often employ fixed control cycles and fixed policy update frequencies, making it difficult to adaptively adjust the feedback and decision-making rhythm according to the degree of fluctuation in traffic conditions. When traffic conditions change drastically, a fixed cycle may lead to a lag in policy response, missing the opportunity for intervention. Conversely, when traffic conditions are relatively stable, frequent changes in signal phase can easily introduce unnecessary fluctuations, affecting the driving experience and increasing the risk of traffic conflicts.

[0045] Therefore, embodiments of the present invention provide a traffic signal collaborative optimization control method based on a large language model, including: a joint state perception mechanism covering local intersections and neighboring intersections, and a hierarchical feedforward and feedback integrated traffic signal control framework oriented towards traffic efficiency, combined with a chain-like reasoning template. This framework uses a large language model as the core decision-making unit, and performs unified understanding and comprehensive analysis of traffic state information at multiple intersections and time scales from a global spatiotemporal perspective, generating a signal control scheme that conforms to traffic operation patterns and possesses interpretability. Simultaneously, by introducing a spatiotemporal feedback mechanism, the feedback rhythm and decision update frequency are dynamically adjusted according to the fluctuation of traffic congestion, enabling the control strategy to respond quickly when traffic conditions change drastically, while maintaining decision smoothness and system stability when traffic operation is relatively stable. This improves the overall traffic operation efficiency in complex urban road network environments while ensuring the interpretability and controllability of the control process.

[0046] Figure 1 The diagram illustrates an application scenario of the traffic signal collaborative optimization control method and apparatus based on a large language model according to an embodiment of the present invention.

[0047] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0048] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0049] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0050] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0051] It should be noted that the traffic signal cooperative optimization control method based on a large language model provided in this embodiment of the invention can generally be executed by server 105. Correspondingly, the traffic signal cooperative optimization control device based on a large language model provided in this embodiment of the invention can generally be located in server 105. The traffic signal cooperative optimization control method based on a large language model provided in this embodiment of the invention can also be executed by a server or server cluster that is different from server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the traffic signal cooperative optimization control device based on a large language model provided in this embodiment of the invention can also be located in a server or server cluster that is different from server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0052] It should be understood that Figure 1 The number of first terminal devices, second terminal devices, third terminal devices, networks, and servers shown in the diagram is merely illustrative. Depending on implementation needs, any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers can be included.

[0053] The following will be based on Figure 1 The described scene, through Figures 2-4The invention provides a detailed description of the traffic signal cooperative optimization control method based on a large language model according to the embodiments of the invention.

[0054] Figure 2 A flowchart of a traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention is shown.

[0055] like Figure 2 As shown, the method includes operations S210 to S230.

[0056] In operation S210, based on the vehicle data of each traffic flow in the intersection topology, the spatial congestion level and congestion evolution trend of each traffic flow in the current control step are determined. The intersection topology includes intersection nodes representing the intersection and edges representing the connection relationship between multiple intersections. The traffic flow is the traffic path formed by the upstream lane entering the intersection and the downstream lane leaving the intersection.

[0057] In operation S220, for each intersection node, based on the congestion changes of the traffic flow passing through the intersection node after the corresponding historical phase is executed, a feedback decision instruction for the historical phase is generated. The historical phase is used to indicate the traffic signal executed by the intersection node in the historical control step, and the feedback decision instruction is used to adjust the selection tendency of the current control step for the historical phase.

[0058] In operating S230, using a large language model, the spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node are analyzed to obtain the phase of each intersection node in the current control step. The neighboring traffic flow is the traffic flow that is spatially adjacent to the traffic flow and has a congestion propagation relationship.

[0059] Urban road networks can be abstracted as intersection topology, which can be a directed topological network. This intersection topology includes intersection nodes representing intersections and edges representing the connections between intersections, which can be determined based on the road segments between intersections. Intersections constitute a set of controlled objects, and the connections describe the travel direction of vehicles entering a controlled intersection from an upstream road segment and then proceeding to a downstream road segment.

[0060] There are no restrictions on the intersection; it can be a crossroad, such as a crossroads or a T-junction.

[0061] For any intersection, its set of entrance lanes, exit lanes, and neighboring intersections can be clearly defined. Neighboring intersections are used to characterize potential traffic coupling and spillover effects between adjacent intersections. To ensure uniform granularity in dynamic perception and control decisions, an intermediate layer called "traffic flow" is further defined within the intersection: entrance lanes are organized into several traffic flows based on their turning intentions and downstream connections, so that each traffic flow corresponds to a clear traffic path. This path starts from the entrance lane (i.e., the upstream lane entering the intersection), passes through the corresponding travel direction (also called the turning direction, such as: straight, left turn, etc.), and finally connects to the downstream lane.

[0062] Based on this traffic flow definition, the intersection signal phase structure can be constructed and solidified: a set of feasible phases is configured for each intersection, including the traffic signals that the intersection's traffic lights can indicate. A mapping relationship between phases and traffic flows is established, which can include the traffic flows to be released corresponding to each feasible phase, to accurately specify which traffic flows are released when a particular feasible phase is executed. This ensures that any subsequent control action can be interpreted as "selecting a phase to release a specific set of traffic flows," and guarantees that the action can be directly issued to the intersection environment for execution.

[0063] At each control step, the spatial operational status of each intersection can be perceived in real time, and the results can be aligned to the traffic flow granularity to achieve a natural match with the release mapping relationship between phase and traffic flow. Relying solely on spatial operational status can easily lead to inaccurate judgments of congestion status, such as apparent congestion that is actually dissipating, or apparent lack of congestion that is still causing delays. Therefore, dynamic evidence in the time dimension is introduced to characterize the cumulative effect of congestion and its evolution trend.

[0064] The operational status of a space can be characterized by the degree of spatial congestion, while dynamic evidence in the time dimension can be characterized by the trend of congestion evolution.

[0065] Vehicle data can include information about vehicles moving within a traffic flow, such as the duration a particular vehicle has traveled in that flow, the number of vehicles traveling in that flow, etc. This vehicle data can be used to analyze the spatial congestion level and congestion evolution trends of each traffic flow.

[0066] Feedback trigger cycles can be set for each intersection node to determine congestion changes before and after each phase's execution. For example, upon reaching the feedback trigger cycle, instead of continuously monitoring the entire time series, monitoring can be performed on the vehicle data of each traffic flow from the execution time of the current phase or a certain observation time before execution to another observation time after execution, to determine the congestion changes characterizing the phase control effect. These congestion changes can be determined based on indicators consistent with the aforementioned spatial congestion level and congestion evolution trend. This reflects whether congestion has been alleviated within the time window and the degree of alleviation. Subsequently, the congestion changes of each traffic flow at the same intersection node are aggregated to form structured feedback information, and feedback decision instructions for historical phases are generated based on this.

[0067] When generating feedback decision instructions for the current control step, the historical control step is not limited; that is, the execution effect of any historical phase of any historical control step can be selected as the feedback source according to actual needs. For example, the historical control step can be the previous control step (i.e., the historical control step most adjacent to the current control step), thereby enabling a rapid response to changes in congestion and fluctuations in control effectiveness. Alternatively, the historical control step can be the previous few control steps of the current control step to smooth out possible observation noise or short-term disturbances in a single control step, extracting feedback information from a more robust trend of control effectiveness changes.

[0068] Based on the adjacency relationships between intersection nodes in the intersection topology, neighboring traffic flows can be determined for each traffic flow. The congestion status of the neighboring traffic flows, such as the degree of spatial congestion or the trend of congestion evolution, is then input into the large language model to determine whether regional congestion propagates to the current intersection, whether there is a risk of spillover downstream, and whether adjacent intersections need to perform rhythm matching at the coordination level.

[0069] The prompt words used to output the large language model can be determined by analyzing the spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node.

[0070] After receiving the above prompts, the large language model uses its built-in semantic understanding capabilities to automatically identify which traffic flow congestion states have a key impact on phase decisions, which neighborhood propagation relationships may form a chain reaction, and how the selection tendency reflected in the feedback instructions should be integrated with the current state, based on the semantic relevance of the input content.

[0071] For example, when a traffic flow experiences high congestion and its neighboring traffic flows show an increasing trend of congestion, the model infers that this direction should be prioritized to prevent congestion from spreading. When feedback indicates that congestion has eased after executing a historical phase in the previous cycle, the model increases the recommendation weight or selection priority of that historical phase in the current step. In this reasoning process, the model does not simply perform rule matching, but rather weighs multiple factors based on the overall situation of the input information to generate a phase selection that meets the current control objectives (such as balancing traffic efficiency in all directions and alleviating congestion at key bottlenecks).

[0072] Through the above methods, the large language model realizes comprehensive reasoning and analysis of traffic flow status, neighborhood propagation relationship and feedback decision instructions, transforms multi-source information into executable phase instructions, and realizes dynamic perception and control decision-making of complex intersection status.

[0073] According to embodiments of the present invention, by constructing the urban road network as an intersection topology and refining the lanes passing through each intersection into traffic flows, more accurate identification of congestion states at different turns can be achieved. Based on the vehicle data of each traffic flow, the spatial congestion degree in the spatial dimension and the congestion evolution trend in the temporal dimension of each traffic flow are determined, that is, the congestion state description of each traffic flow in the spatiotemporal dimension is determined. Furthermore, based on the actual congestion relief of each traffic flow after the execution of historical phases, semantic feedback decision instructions are generated, thereby enabling timely correction and improvement of ineffective actions.

[0074] When processing input consisting of the aforementioned data, the large language model can analyze the congestion status and trends of the current traffic flow through its inherent semantic understanding capabilities. It also considers the trends in neighboring traffic flows to determine whether congestion at the intersection will be affected by neighboring traffic propagation. Furthermore, based on the selection tendencies of feedback decision instructions, it determines the phases of each intersection node suitable for the current scenario. Therefore, it at least partially solves the technical problem of low overall traffic efficiency in urban road networks, achieving the technical effect of generating more accurate traffic signal control schemes in complex congestion scenarios and improving overall traffic efficiency.

[0075] According to embodiments of the present invention, a large language model is used as the core decision engine to construct a global collaborative decision-making mechanism for the entire urban road network. This at least partially solves the limitations of related technologies that rely on independent decision-making at single intersections or weak collaboration, making it difficult to achieve optimization at the regional or even network level. Through a unified understanding and comprehensive reasoning of traffic state information at multiple intersections and multiple time scales, the present invention can achieve coordinated scheduling and collaborative optimization among multiple intersections under conditions of complex road network topology and highly dynamic traffic demand. While ensuring the engineering feasibility of the control scheme, it effectively reduces the average travel time of vehicles and queue length, thereby improving overall traffic efficiency.

[0076] According to an embodiment of the present invention, the vehicle data includes: the travel time of each vehicle at multiple sampling time points, and the spatial occupancy data of the vehicle at the target sampling time point; the multiple sampling times include the target sampling time point; based on the vehicle data of each traffic flow in the intersection topology, determining the spatial congestion degree and congestion evolution trend of each traffic flow in the current control step may include the following operations.

[0077] For each traffic flow, based on the spatial occupancy data of the traffic flow, the spatial congestion level of the traffic flow in the current control step is determined. The spatial occupancy data includes at least one of the following: the number of vehicles in the traffic flow, the projected area of ​​each vehicle, and the distance between the leading vehicle and the trailing vehicle. For each traffic flow, based on the travel time of each vehicle at multiple sampling time points, the longest travel time at each of the multiple sampling time points is determined. A time series analysis is performed on the longest travel time at each of the multiple sampling time points to determine the congestion evolution trend.

[0078] The vehicle data includes the travel time of each vehicle at multiple sampling time points, as well as the space occupancy data at the target sampling time point. Among the multiple sampling time points is the target sampling time point corresponding to the current control step, used to support the synchronous calculation of congestion status and trends. The target sampling time point is not limited and can be the latest time point among the multiple sampling time points, or any time point among them.

[0079] When determining the degree of spatial congestion, it can be quantitatively characterized based on the spatial occupancy data of traffic flow at the target sampling time point. For example, if the number of vehicles is used, the total number of vehicles within the road segment covered by the traffic flow can be counted as a simple measure of congestion. If the projected area is used, the projected areas of each vehicle are summed to obtain the total area occupied by vehicles on the road space; this indicator can more accurately reflect the actual space resources occupied by vehicles. If the first-to-last vehicle distance is used, the longitudinal distance between the first and last vehicles in the traffic flow is calculated to characterize queue length or traffic flow extension range. In practical applications, a comprehensive spatial congestion value can be obtained by selecting a single indicator or by comprehensively evaluating multiple indicators.

[0080] When determining the evolution trend of congestion, spatial occupancy data or travel time data at multiple sampling time points can be used to analyze the changing patterns of congestion over time. For example, for each sampling time point, the maximum travel time among all vehicles at that moment can be extracted as the longest travel time at that time point. This indicator reflects the time cost experienced by the vehicle with the longest travel time in the traffic flow and can characterize the traffic efficiency under the current congestion state.

[0081] Subsequently, time-series analysis can be performed on the longest travel times at multiple sampling time points to determine the congestion evolution trend. For example, a congestion evolution curve can be plotted with the sampling time point on the horizontal axis and the longest travel time on the vertical axis. This curve shows the increase or decrease of the longest travel time over time. Alternatively, the change or rate of change of the longest travel time between adjacent sampling time points can be calculated to form a rate of change sequence. A positive rate of change indicates that congestion has intensified during that time period; a negative rate of change indicates that congestion has eased. By accumulating the rate of change, the overall magnitude of congestion evolution over a period of time can be quantified.

[0082] According to embodiments of the present invention, a multi-dimensional and accurate characterization of congestion is achieved by combining traffic flow space occupancy data with the longest travel time time series analysis. In the spatial dimension, multiple indicators such as vehicle number, projected area, and distance between the first and last vehicles are integrated to reflect the degree of congestion from different perspectives, including density, space occupancy, and queue length, reducing the representational bias of single indicators in complex scenarios. In the temporal dimension, a time series is constructed based on the longest travel time at multiple sampling time points, and the congestion development trend is identified through curve fitting and rate of change calculation. These two aspects complement each other, allowing the subsequent large-scale language model to grasp both the current congestion level and the congestion development trend.

[0083] In addition, by constructing key time features around vehicles with the longest travel times, the changes in vehicle travel times are continuously tracked across various traffic flow dimensions. These changes can comprehensively reflect the actual traffic results after the superposition of multiple factors such as signal waiting, queuing delays, and downstream obstruction. In particular, this helps to highlight the most severe traffic bottlenecks and avoid being masked by mean-based indicators.

[0084] According to an embodiment of the present invention, determining the degree of spatial congestion of the traffic flow in the current control step based on the spatial occupancy data of the traffic flow may include the following operations.

[0085] The queuing intensity of the traffic flow is determined based on the number of vehicles in the flow and / or the distance between the first and last vehicles. The average vehicle occupancy rate of the traffic flow is determined based on the projected area of ​​each vehicle and the path length of the traffic flow. The queuing intensity and the average vehicle occupancy rate are comprehensively evaluated to obtain the spatial congestion level of the traffic flow in the current control step.

[0086] The average vehicle occupancy rate of each traffic flow reflects the space pressure that vehicles exert on the detection area, and can quickly indicate whether the direction is in a high-density state.

[0087] The queuing intensity or waiting intensity of each traffic flow can characterize the length of congestion or the size of waiting vehicles, reflecting the actual waiting pressure in that direction.

[0088] Considering that differences in lane length, detection range, or design capacity can lead to incomparable original dimensions, the average vehicle occupancy rate and queuing intensity can be standardized to make the congestion levels between different traffic flows comparable, reducing the possibility of misleading control by stating that "longer lanes naturally have higher values".

[0089] To focus decision-making more on bottlenecks affecting overall efficiency, average occupancy and queuing intensity can be comprehensively evaluated. This can be achieved through weighted averages or by assessing congestion severity based on preset thresholds for both average occupancy and queuing intensity. This results in a spatial congestion characterization oriented towards signal control, which can be used to represent congestion severity. Based on this, key congested traffic flows or key congested directions can be identified and simultaneously input into the large language model along with other data.

[0090] Average occupancy and queuing intensity can be categorized into several severity levels based on thresholds, with the highest severity level among those corresponding to average occupancy and queuing intensity being taken as the final severity level. By binning or discretizing variables such as average occupancy and queuing intensity, the robust analytical capability of large language models for numerical information can be enhanced, and inference fluctuations caused by noise can be reduced.

[0091] By identifying the key congested traffic flow or key congested direction, the large language model can avoid treating all traffic flows as congested traffic flows. Instead, it can prioritize directions that contribute more to delays, have harder queues to dissipate, and are more likely to induce backlogs. This allows subsequent phase selection to focus on releasing the most needed traffic capacity.

[0092] The spatial congestion level of each traffic flow in the current control step can be input into the large language model in the form of a traffic flow sequence or embedded in a preset prompt template. Combined with the static phase and traffic flow release mapping relationship, a corresponding basis for phase selection and congestion relief can be formed.

[0093] According to embodiments of the present invention, addressing the problem of spatiotemporal propagation and evolution of traffic congestion in urban road networks, the present invention proposes a spatiotemporally integrated traffic state perception and control mechanism. This mechanism jointly utilizes multi-source spatiotemporal indicators within the target intersection and its neighborhood, including information such as the spatial congestion level and congestion evolution trend at the current control step, as well as historical congestion evolution trends. At the large language model decision level, it explicitly embodies the control concept of "combining local rapid response with neighborhood collaborative adjustment," enabling signal control strategies to more accurately reflect the diffusion, superposition, and dissipation processes of congestion across different road segments. Thus, without significantly increasing perception and communication costs, it achieves a fine-grained characterization and forward-looking regulation of the complex road network's operational state.

[0094] According to embodiments of the present invention, the above-described traffic signal cooperative optimization control method may further include the following operations.

[0095] Before the corresponding historical phase is executed at the intersection node, determine the historical spatial congestion level or historical congestion evolution trend of the traffic flow passing through the intersection node; based on the comparison results of the spatial congestion level of the traffic flow passing through the intersection node with the historical spatial congestion level, and / or the comparison results of the congestion evolution trend of the traffic flow passing through the intersection node with the historical congestion evolution trend, determine the congestion change of the traffic flow passing through the intersection node.

[0096] The time point before the execution of the corresponding historical phase can refer to the execution time of the historical phase or several time points before the execution, that is, the congestion state at the moment of phase switching and the congestion state before the switching.

[0097] It can obtain the historical spatial congestion level and historical congestion evolution trend of each traffic flow passing through the intersection node before the execution of the historical phase. Among them, the historical spatial congestion level is determined based on the spatial occupancy data at the execution time or a certain time before the execution, and the historical congestion evolution trend is obtained based on the longest travel time series analysis of multiple sampling time points before the execution.

[0098] Subsequently, the spatial congestion level and congestion evolution trend after the execution of historical phases can be obtained. Since the spatial congestion level and congestion evolution trend of the current control step are determined after the execution of historical phases, these spatial congestion levels and trends can be used in this calculation. In some embodiments, the spatial congestion level and congestion evolution trend at any time point after the execution of historical phases can also be used.

[0099] The degree of spatial congestion can be compared with historical levels to obtain the amount or relative rate of change in congestion, which can be used to determine whether congestion has worsened or eased. The current congestion trend can also be compared with historical trends, i.e., comparing the direction and rate of congestion change before and after the implementation phase, to determine whether the congestion trend has shifted. If the current trend changes from rising to falling or the rate of falling compared to the historical trend, it indicates that the implementation of the historical phase reversed the congestion development trend. If the current trend changes from falling to rising or the rate of rising compared to the historical trend, it indicates that the control effect is poor or has had a negative impact.

[0100] By combining the results of the two types of comparisons above, or based on one of them, the congestion changes for each traffic flow are generated. For example, when the spatial congestion level decreases compared to the historical spatial congestion level, it is determined that the congestion has been alleviated.

[0101] According to embodiments of the present invention, a multi-dimensional comprehensive evaluation of the historical phase control effect is achieved by comparing the degree of spatial congestion with the degree of historical spatial congestion, and the current congestion evolution trend with the historical congestion evolution trend, thus providing a more robust and sensitive control effect evaluation capability.

[0102] According to an embodiment of the present invention, based on the congestion changes of traffic flow passing through the intersection node after the intersection node executes the corresponding historical phase, a feedback decision instruction for the historical phase is generated, which may include the following operations.

[0103] Aggregate analysis is performed on the congestion changes of at least one traffic flow passing through the intersection node to determine the overall congestion change of the intersection node. If the overall congestion change indicates that congestion has eased, the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the first priority, where the first priority is higher than the preset priority. If the overall congestion change indicates that congestion has not eased, the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the second priority, where the second priority is lower than the preset priority.

[0104] Aggregate analysis is performed on the congestion changes of at least one traffic flow passing through the intersection node. Congestion mitigation or aggravation information of each traffic flow dimension is integrated into a comprehensive congestion change at the intersection node level through methods such as weighted averaging, extreme value statistics, or comprehensive scoring, forming an overall evaluation of the historical phase control effect.

[0105] Based on this, if the overall congestion change indicates that congestion has been alleviated, the selection priority of the historical phase will be updated from the preset priority to the first priority. This first priority is higher than the preset priority, which means that the phase will have a higher tendency to be selected in subsequent decisions, so as to maintain stable dissipation and reduce unnecessary switching.

[0106] If the overall congestion change indicates that congestion has not been alleviated, i.e., the congestion level has not changed or has intensified, then the selection priority of historical phases will be updated from the preset priority to the second priority. This second priority is lower than the preset priority, which means that the phase is less likely to be selected in subsequent decisions. Candidate phases that provide more comprehensive coverage of the bottleneck direction and are more direct in releasing queues will be given priority, thereby achieving timely correction and improvement of ineffective actions.

[0107] According to embodiments of the present invention, by aggregating congestion changes at the traffic flow level into comprehensive congestion changes at intersection nodes, and dynamically adjusting the selection priority of historical phases accordingly, a closed-loop feedback-driven decision-making mechanism is formed. This mechanism not only responds quickly based on actual control effects, strengthening effective phases to maintain stable dissipation when congestion is alleviated and promptly correcting deviations to avoid continuous ineffective control when congestion is not alleviated, but also achieves smooth correction of phase selection bias through stepwise priority adjustments, avoiding drastic oscillations in decision-making. Thus, while ensuring control stability, it improves the adaptability and optimization efficiency of traffic signals to changes in congestion conditions.

[0108] According to an embodiment of the present invention, a large language model is used to perform reasoning analysis on the spatial congestion degree and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flow of each traffic flow in the current control step, and the feedback decision instructions of each intersection node to obtain the phase of each intersection node in the current control step, which may include the following operations.

[0109] The spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flows of each traffic flow in the current control step, the historical phase of each intersection node, feedback decision instructions, and the traffic flow to be released corresponding to each feasible phase are embedded into a preset prompt template to obtain target prompt words. Among them, the feasible phase is determined according to the traffic signals that the traffic lights of the intersection node can indicate, and the released traffic flow is the traffic flow released by the feasible phase of the intersection node. The target prompt words are input into the large language model to obtain the phase information of each intersection node in the current control step. The phase information includes the phase.

[0110] The preset prompt template can include role constraints and objective constraints. Role constraints define the large language model as an "urban traffic signal control and scheduling expert," giving it a clear task role and optimization orientation during the reasoning process. This role is assigned the responsibility of comprehensively analyzing the road network's operational status and generating signal control decisions, while adhering to basic traffic engineering rules. Objective constraints constrain the large language model's optimization objectives to prioritize the overall improvement of traffic operation efficiency.

[0111] The spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flow of each traffic flow in the current control step, the historical phase of each intersection node, feedback decision instructions, and the traffic flow corresponding to each feasible phase can all be uniformly transcribed into structured text or key-value pair form suitable for large language model parsing, and used as input content for the preset prompt template.

[0112] The input can be organized according to the intersection node dimension and includes at least the following observation fields: intersection identifier, time of the current control step, historical phase, spatial congestion level of each traffic flow passing through the intersection node in the current control step, congestion evolution trend of each traffic flow passing through the intersection node in the current control step, traffic flow released corresponding to each feasible phase of the intersection node, and congestion change trend of the neighboring traffic flow of each traffic flow in the current control step.

[0113] Intersection markers are used to distinguish multi-intersection scenarios. Control step time indicates the control rhythm; historical phases characterize the historical control context. Spatial congestion level can include spatial congestion level values, the average occupancy rate of each traffic flow, and the queuing intensity of each traffic flow. The released traffic flow corresponding to each feasible phase is a phase-to-flow release mapping, used to ensure that the model's output actions are always within the engineering feasible range and can clearly correspond to the set of released traffic flows. Congestion change trends are used to determine whether congestion has eased or worsened and whether there is a risk of neighborhood propagation and spillover.

[0114] To enhance the model's robustness in parsing continuous numerical information and reduce inference fluctuations caused by noise, the congestion trend and its category (rising, flat, or falling) can be encoded. In addition, information on whether the longest travel time at each sampling time point exceeds a threshold can also be input.

[0115] Furthermore, special attention conditions can be written into preset prompt templates in the form of events. For example, when the congestion evolution trend of a certain traffic flow shows a continuous upward trend and the latest longest travel time exceeds a preset threshold, it can be judged as a time-based severe congestion trigger state, and the trigger marker and its corresponding traffic flow can be explicitly recorded in the preset prompt template to ensure that the subsequent large language model can adjust the phase in a timely manner to alleviate congestion in that direction. By writing the congestion evolution trend of the traffic flow, the congestion evolution trend of the neighborhood traffic flow, and the trigger rule of continuous increase and exceeding the threshold into the preset prompt template, the large language model can not only characterize the congestion intensity at the current moment, but also identify the congestion evolution trend, providing a traceable temporal context for subsequent control, and supporting the judgment of the dissipation capacity after release and whether the release effect may be limited due to neighborhood backlog.

[0116] In some embodiments, the action space can be defined in the preset prompt template or in the input content entered into the preset prompt template. That is, in order to ensure that the control decision output by the large language model is always within the scope of engineering execution, the action space, i.e., the set of feasible phases, can be predefined for each intersection node, and the control action can be limited to the executable action code corresponding to the feasible phase selected for execution in each control step.

[0117] For example, the action set of the target intersection node is constrained to a finite number of discrete integers (0, 1, 2, 3), where each integer corresponds one-to-one with a specific signal phase or phase. The large language model can only output actions within this set, thereby avoiding the generation of unexecutable instructions that exceed the feasible phase set.

[0118] Furthermore, the feasibility of the action space is not only reflected in the legality of the number values, but also in the legality of the phase coverage relationship: in the preset prompt module or input content, the model can be required to determine the set of traffic flows that can be released by the phase before outputting a certain action, based on the phase and the traffic flow release mapping (or the traffic flow release corresponding to each feasible phase), to ensure that the selected phase can cover the direction that needs to be prioritized for evacuation or priority for traffic.

[0119] Meanwhile, preset prompt templates or input content can also indicate the action selection or phase selection of the large language model, which must also meet the basic timing engineering constraints of signal control (i.e., signal switching constraints), including minimum green light duration, maximum green light duration, yellow light duration, all-red light duration, minimum switching interval, and switching penalty rules. These constraints can be transformed into language constraints that the model can follow, ensuring that even without explicit timing calculations, the model's output actions maintain engineering feasibility and operational stability, avoiding unfeasible strategies such as high-frequency switching in pursuit of short-term performance improvements.

[0120] According to embodiments of the present invention, a unified organization and fusion of multi-source information is achieved through a preset prompt template. Simultaneously, the mapping relationship between feasible phases and traffic flow is explicitly embedded, enabling the model to clearly establish the association between "phase, traffic flow object, and control objective," thereby more accurately matching congestion status and traffic flow strategies in decision-making. Utilizing the semantic understanding and reasoning capabilities of a large language model, it can automatically identify key congestion directions, assess the risk of neighborhood propagation, refer to historical feedback reward and punishment signals, and achieve multi-objective optimization trade-offs among multiple feasible phases, outputting a phase selection that balances current congestion relief, trend reversal, and control continuity.

[0121] According to an embodiment of the present invention, the preset prompt template includes: inference path constraints for constraining the inference order of the large language model, signal switching constraints for constraining phase switching to meet traffic signal switching specifications, and output format constraints for constraining the output format; the signal switching constraints include at least one of the following: minimum green light duration, maximum green light duration, yellow light duration, all-red light duration, minimum switching interval, and switching penalty rules; wherein, inputting the target prompt word into the large language model to obtain the phase information of each intersection node in the current control step may include the following operations.

[0122] The target prompt is input into the large language model so that the large language model can perform the following operations based on the inference path constraints.

[0123] For each intersection node, based on the congestion evolution trend of each traffic flow passing through the intersection node and a preset duration threshold, time-based congestion analysis is performed on each traffic flow to obtain the analysis results. If it is determined that there is a first traffic flow at the intersection node with an increasing congestion evolution trend and a longest travel time at the latest sampling time exceeding the preset duration threshold, the first feasible phase for releasing the first traffic flow is determined from the traffic flows corresponding to each feasible phase. Based on the spatial congestion degree of each traffic flow, the second traffic flow with the greatest impact on the traffic efficiency of the intersection node is identified, and this is combined with the neighborhood congestion of each traffic flow. The congestion evolution trend of traffic flow is analyzed. From the traffic flows corresponding to each feasible phase, the second feasible phase that can be allowed to proceed and has the least impact on the congestion pressure of neighboring traffic flows is determined. When the feedback decision instruction is to update the selection priority of historical phases from the preset priority to the first priority, the historical phase, the first feasible phase, and the second feasible phase are all regarded as candidate phases. Based on the historical phases and signal switching constraints, the phase of the intersection node in the current control step is determined from the candidate phases. Based on the phase of the intersection node in the current control step and the output format constraints, phase information is generated.

[0124] To ensure that the decision-making process of the large language model is clear, interpretable, auditable, and reproducible in multi-way scenarios, reasoning path constraints are imposed on the reasoning order in the preset prompt template.

[0125] Based on the reasoning order constrained by the reasoning path constraints, the large language model will check the time-based severe congestion trigger conditions. Specifically, it will determine whether the longest travel time shows a continuous upward trend and whether the longest travel time corresponding to the latest sampling time exceeds a preset time threshold, such as 150 seconds. Once triggered, the corresponding first traffic flow will be prioritized for de-congestion. For example, the selection priority of the first feasible phase of the first traffic flow can be updated from the preset priority to the first priority. This allows for the priority selection of phases that can allow traffic flow in that direction under phase coverage constraints, thus suppressing the continued accumulation of extreme congestion and reducing the risk of backlog.

[0126] Subsequently, the model identifies the most congested, queued, and impactful bottleneck traffic flow that has the greatest impact on overall traffic efficiency by combining spatial congestion levels. It also considers the congestion evolution trends of neighboring traffic flows to determine if there is a tendency for spillover or insufficient downstream dissipation, thus avoiding situations where upstream flow is allowed but downstream flow is obstructed, leading to ineffective traffic flow relief. Finally, it selects the phase from the set of feasible phases that is more effective in relieving the bottleneck and more conducive to regional stability. During implementation, the selection priority of the second feasible phase for the bottleneck traffic flow (i.e., the second traffic flow) can be updated from the preset priority to the first priority.

[0127] Subsequently, the model makes a judgment based on the feedback decision instruction: if the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the first priority, then the historical phase, the first feasible phase, and the second feasible phase are all included in the candidate phase set. If the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the second priority, then the candidate phase set may only contain the first feasible phase and the second feasible phase. Based on this, the model determines the phase that meets the signal switching specification from the candidate phase set according to the historical phase of the current control step and the signal switching constraints, and can combine the target priorities corresponding to the three methods mentioned above.

[0128] The target priority of each candidate phase can be determined based on the target priority corresponding to the three methods mentioned above. For example, the target priority of the historical phase is greater than that of the first feasible phase, and the target priority of the first feasible phase is greater than that of the second feasible phase.

[0129] Each candidate phase can be verified using signal switching constraints according to its priority order. If the verification passes, the candidate phase is used as the phase of the current control step. If the verification fails, the next candidate phase is selected for verification according to its priority order until a candidate phase that passes the verification is obtained.

[0130] Signal switching constraints can be used to verify whether candidate phases meet hard requirements such as minimum green light duration, maximum green light duration, yellow light duration, all-red light duration, minimum switching interval, and switching penalty rules, thereby ensuring that the selected phases conform to the control logic of actual traffic signals.

[0131] Signal switching constraints can suppress startup losses and operational instability caused by frequent switching. By combining the previous control action (i.e., historical phase) with rules such as minimum switching interval and switching penalty, the historical phase is prioritized when the minimum interval since the last switching is not enough or the historical phase can still effectively serve the critical direction. When severe congestion is triggered or the bottleneck direction changes significantly and maintaining it will lead to a significant worsening of delays, it is recommended to switch to other candidate phases.

[0132] Since the effectiveness of traffic signal control depends not only on the current traffic conditions but also on the historical phases executed in the previous control step and their duration, historical phases are embedded as input into the target prompts to explicitly consider the impact of historical control behaviors on current traffic operations in subsequent decisions and to reduce efficiency losses and operational instability risks caused by frequent switching. By introducing historical phases, the large language model can determine whether a phase switch has just been completed, whether the historical phase has met the minimum green light duration, and whether it is necessary to maintain a certain continuity of historical phases to improve queue initiation and release efficiency. Furthermore, it can be combined with engineering constraints such as the minimum phase switching interval to avoid a decrease in traffic efficiency caused by frequent switching within a short period.

[0133] There are no restrictions on the output format. You can constrain the output format according to your needs. For example, you can constrain the content output by the large language model, or the format of each piece of content output. Specifically, you can constrain the output content of the large language model to be the phase of each intersection node at the current time step, and constrain the output format of the phase to be the target format.

[0134] According to embodiments of the present invention, the reasoning process of the large language model is subject to structured constraints and guidance, constructing a clear and complete decision-making logic chain from multiple levels, including "identification of key congestion directions, analysis of neighborhood traffic capacity, historical phase control effects, and basis for signal phase adjustment." Through this design, traffic signal control decisions are transformed from traditional "black box" output results into a traceable, auditable, and reproducible reasoning process, facilitating understanding and verification of control intentions by traffic engineering technicians and improving the interpretability and oversight of intelligent traffic control methods.

[0135] According to an embodiment of the present invention, the output format constraint is used to constrain the phase of each intersection node in the current control step, the reason for the output phase, and the executable action code corresponding to the phase in the output of the large language model; the above method may also include the following operations.

[0136] The phase information is subjected to integrity verification to obtain a first verification result. If the first verification result indicates that the phase information includes fields corresponding to the phase, cause, and executable action code, the content information included in the phase, cause, and executable action code is subjected to format verification to obtain a second verification result. The executable action code is subjected to legality verification, and the phase is subjected to switching specification verification using signal switching constraints to obtain a third verification result. If both the second and third verification results indicate that the verification is passed, the phase information is sent to the traffic signal controller, which is the control device for traffic lights.

[0137] Output format constraints can constrain large language models to give decision conclusions (phases), corresponding explanations (reasons for output phases), and final action codes (executable action codes corresponding to phases) according to a pre-defined unified structure, so as to ensure that the results are parsable and easy to verify and execute later.

[0138] The output of a large language model can be defined as a standardized structure that is parsable, auditable, and executable, avoiding semantic drift or unparsable results caused by natural language chatter. For example, the large language model can be constrained to output the following information for each intersection node: First, the phase of the intersection node in the current control step, indicating whether the node should maintain its current phase or switch to a new phase, further reflecting the nature of traffic signal decisions. Second, the reason for the output phase, providing a rationale for the selected action based on traffic conditions. This explanation must correspond to input observation evidence, such as whether the longest travel time is continuously increasing and exceeding a threshold, whether occupancy and queuing intensity indicate a critical bottleneck in a certain direction, or whether the neighborhood traffic flow suggests a backflow trend, thus ensuring an auditable causal chain in the output. Third, the executable action code corresponding to the phase, providing an action code that downstream control programs can directly execute. This code must be output in integer form, and when multiple intersections exist, it must strictly adhere to legal output specifications, without quotation marks or extra characters, ensuring that downstream control programs can directly parse and issue commands to traffic lights or signal controllers.

[0139] To facilitate system parsing and subsequent verification, JSON can be preferred as the outer organizational structure, with fixed key names and output limited to specified fields, avoiding the output of extra paragraphs, comments, or unstructured text by large language models.

[0140] It can automatically verify the phase information output by large language models, and the verification target is further extended from output parsability to engineering feasibility and security compliance.

[0141] For example, field integrity checks can be performed: the system verifies the structural integrity of the output, determining whether it contains all necessary fields and checking whether the format of the field content information meets the parsing requirements. For example, the executable action code corresponding to the phase should be parsed as an integer or a list of integers, and the reason for outputting the phase should be non-empty text. If there are missing fields, incorrect key names, or type mismatches, the structure is deemed unqualified.

[0142] Action validity verification can also be performed. Based on the feasible phase set of each intersection node and the executable action code corresponding to each feasible phase, it verifies whether each code is an integer and falls within the allowed value range. It also checks whether the length of the code sequence including multiple executable action codes is consistent with the number of intersections to avoid situations such as missing actions, exceeding boundaries, or mismatched outputs from multiple intersections. In addition, signal switching constraint verification can be performed. Even if the action value is legal, it is still necessary to combine control cycle information and historical status to determine whether it meets transition rules such as minimum green light duration, minimum phase switching interval, yellow light duration, and all-red light duration. For example, if the minimum switching interval has not been reached since the last switch, or if the historical phase has not met the minimum green light duration, it is determined that the signal switching constraint is not met.

[0143] If any check fails, the output is deemed invalid and prevented from entering the execution chain, thus intercepting potential risks before control is issued.

[0144] According to embodiments of the present invention, while the large language model generates traffic signal control actions, it is required to simultaneously output step-by-step natural language explanations. This design facilitates targeted strategy optimization and parameter adjustment based on the explanation information in engineering practice. Furthermore, a multi-level quality assurance mechanism is constructed through integrity verification, format verification, legality verification, and signal switching constraint verification. This ensures that phase information can be more comprehensively verified before being sent to traffic signal controllers, reducing the risk of signal control failure due to decision-making errors, data anomalies, or violations of regulations. This achieves reliable integration between the large language model's intelligent decision-making and existing traffic signal control equipment.

[0145] According to embodiments of the present invention, the above-described traffic signal cooperative optimization control method may further include the following operations.

[0146] If the second or third verification result indicates that the verification failed, a failure reason is generated based on the target verification result that failed the verification in the second and third verification results; the failure reason and target prompt words are re-inputted into the large language model, and the updated phase information is output; after verifying the updated phase information, if both the updated second verification result and the updated third verification result indicate that the verification passed, the updated phase information is sent to the traffic signal controller.

[0147] When a model output fails to meet any validation condition, a fault tolerance and rollback mechanism is triggered to ensure the continuity of the control chain and operational safety. A regeneration request can be initiated to the large language model based on the same target prompt word, with the reason for failure indicated in the retry prompt, to increase the probability that the regenerated result will meet the constraints.

[0148] For the updated phase information generated by the large language model after the retry, the same verification steps as the phase information output in the previous round are repeated to obtain the updated second verification result and the updated third verification result. When both verification results indicate that the verification has passed, the updated phase information is sent to the traffic signal controller.

[0149] The number of retries can be capped at two to reduce the cumulative control delay caused by multiple generations, which could affect real-time performance. If a qualified output is not obtained within the limited number of retries, the current control step can be abandoned and the result of the larger model can be used. The rollback strategy will be automatically activated, and the valid phase action that has passed the verification and can be executed in the previous historical control step will be preferred to maintain the stable operation of the control process without introducing additional switching risks.

[0150] In safety-sensitive or abnormal operating conditions, the system can also activate a preset safety strategy as a backup to ensure that control actions remain controllable and safe when model output is abnormal, observations are missing, or verification fails.

[0151] Figure 3 A schematic diagram of a traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention is shown.

[0152] like Figure 3 As shown, observation indicators such as the spatial congestion level and congestion evolution trend of traffic flow at intersection node 310 can be embedded into a preset prompt template and input into the large language model 320. This drives the large language model 320 to generate the phase information of the current control step for intersection node 310 under role constraints, inference path constraints, and output format constraints. After satisfying multiple verifications, this phase information will be transmitted back to the traffic signal controller in intersection node 310 to form a closed-loop cooperative control process.

[0153] According to embodiments of the present invention, when the second or third verification result indicates that the verification has failed, a clear reason for failure is generated based on the target verification result of the failed verification. This reason for failure, along with the original target prompt word, is then re-inputted into the large language model. This guides the model to make targeted corrections based on understanding why the previous output was invalid, and outputs updated phase information. This enables the large language model to possess the ability for self-reflection and iterative optimization, transforming verification feedback into incremental information for model inference and reducing the recurrence of similar errors. Furthermore, by retrying or adopting historical control actions or preset safety strategies, the continuity, stability, and safety of the traffic signal control process can be ensured.

[0154] According to embodiments of the present invention, at the system implementation level, the present invention encapsulates the phase information generated by the large language model into standardized signal phase control commands, and interfaces with traffic signal controllers and host computer control platforms through standardized interfaces. This implementation method takes into account the hardware and software conditions of urban traffic signal control systems, and can be deployed without large-scale modifications to roadside equipment, such as traffic signal controllers. It supports phased and regional gradual promotion and application, has good engineering feasibility and system scalability, and is easy to implement quickly and effectively in actual urban traffic management scenarios.

[0155] Figure 4 A schematic diagram comparing the traffic signal cooperative optimization control method based on a large language model according to an embodiment of the present invention with related technologies is shown.

[0156] like Figure 4 As shown, to quantitatively evaluate the control effect and performance advantages of the traffic signal cooperative optimization control method based on a large language model proposed in this invention under actual operating conditions, average vehicle travel time, average waiting time, and average driving speed are selected as evaluation indicators. This invention is also compared and analyzed with related technologies. The related technology is a timed signal control method, which periodically switches signals according to a pre-set fixed phase sequence and fixed green light duration to complete traffic release. The black bars represent the experimental results obtained using the related technology method, while the gray bars represent the experimental results obtained using the method of this invention.

[0157] from Figure 4 As can be seen, under the same traffic demand and road network conditions, the method of this invention demonstrates significant advantages in all three key indicators: compared with the timed signal control method, the average vehicle travel time is significantly reduced, indicating that the overall traffic efficiency of vehicles in the road network is effectively improved; the average waiting time is significantly shortened, indicating that queuing and delays at intersections are effectively alleviated; and at the same time, the average vehicle speed is increased, reflecting a smoother road network operation and more rational utilization of traffic resources. The above experimental results verify the effectiveness and stability of the method of this invention in improving traffic operation efficiency, especially in scenarios with dynamically changing traffic demand, where it can better adapt to the road network operation and make reasonable control decisions.

[0158] Based on the aforementioned traffic signal cooperative optimization control method based on a large language model, this invention also provides a traffic signal cooperative optimization control device based on a large language model. The following will combine... Figure 5 The device is described in detail.

[0159] Figure 5 A structural block diagram of a traffic signal cooperative optimization control device based on a large language model according to an embodiment of the present invention is shown.

[0160] like Figure 5 As shown, the traffic signal cooperative optimization control device 500 based on a large language model in this embodiment includes a determination module 510, a generation module 520, and an output module 530.

[0161] The determination module 510 is used to determine the spatial congestion level and congestion evolution trend of each traffic flow in the current control step based on the vehicle data of each traffic flow in the intersection topology. The intersection topology includes intersection nodes representing the intersection and edges representing the connection relationships between multiple intersections. The traffic flow is a path formed by the upstream lane entering the intersection and the downstream lane leaving the intersection. In one embodiment, the determination module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0162] The generation module 520 is used to generate feedback decision instructions for each intersection node based on the congestion changes of traffic flow passing through the intersection node after the corresponding historical phase is executed. The historical phase indicates the traffic signal executed by the intersection node in the previous control step, and the feedback decision instructions adjust the selection bias of the current control step towards the historical phase. In one embodiment, the generation module 520 can be used to execute the operation S220 described above, which will not be repeated here.

[0163] Output module 530 is used to perform reasoning analysis on the spatial congestion level and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node using a large language model, to obtain the phase of each intersection node in the current control step. The neighboring traffic flows are traffic flows that are spatially adjacent to the traffic flows and have a congestion propagation relationship. In one embodiment, output module 530 can be used to execute the operation S230 described above, which will not be repeated here.

[0164] According to embodiments of the present invention, any plurality of modules among the determining module 510, generating module 520, and output module 530 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the determining module 510, generating module 520, and output module 530 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the determining module 510, generating module 520, and output module 530 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0165] Figure 6 A block diagram of an electronic device suitable for implementing a traffic signal cooperative optimization control method based on a large language model, according to an embodiment of the present invention, is shown.

[0166] like Figure 6 As shown, an electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 602 or a program loaded from a storage portion 608 into a random access memory RAM 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0167] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in said one or more memories.

[0168] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0169] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0170] According to embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present invention, a computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.

[0171] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the traffic signal cooperative optimization control method based on a large language model provided in the embodiments of the present invention.

[0172] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this invention. According to embodiments of the invention, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0173] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0174] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this embodiment of the invention. According to embodiments of the invention, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0175] According to embodiments of the present invention, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0176] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0177] Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.

[0178] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.

Claims

1. A traffic signal cooperative optimization control method based on a large language model, characterized in that, The method includes: Based on the vehicle data of each traffic flow in the intersection topology, the spatial congestion degree and congestion evolution trend of each traffic flow in the current control step are determined. The intersection topology includes intersection nodes representing the intersection and edges representing the connection relationship between multiple intersections. The traffic flow is a traffic path composed of the upstream lane entering the intersection and the downstream lane leaving the intersection. For each intersection node, based on the congestion changes of the traffic flow passing through the intersection node after the corresponding historical phase is executed, a feedback decision instruction is generated for the historical phase. The historical phase is used to indicate the traffic signal executed by the intersection node in the historical control step, and the feedback decision instruction is used to adjust the selection tendency of the current control step for the historical phase. Using a large language model, the spatial congestion degree and congestion change trend of each traffic flow in the current control step, the congestion change trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node are analyzed to obtain the phase of each intersection node in the current control step. The neighboring traffic flows are traffic flows that are spatially adjacent to the traffic flows and have a congestion propagation relationship.

2. The method according to claim 1, characterized in that, The vehicle data includes: the driving time of each vehicle at multiple sampling time points, and the space occupancy data of the vehicle at the target sampling time point; the multiple sampling times include the target sampling time point; The determination of the spatial congestion level and congestion evolution trend of each traffic flow in the current control step based on the vehicle data of each traffic flow in the intersection topology includes: For each traffic flow, the spatial congestion level of the traffic flow in the current control step is determined based on the spatial occupancy data of the traffic flow, wherein the spatial occupancy data includes at least one of the following: the number of vehicles in the traffic flow, the projected area of ​​each vehicle, and the distance between the first vehicle and the last vehicle. For each traffic flow, the longest travel time at each of the multiple sampling time points is determined based on the travel time of each vehicle at multiple sampling time points. A time-series analysis was performed on the longest travel time at each of the multiple sampling time points to determine the congestion evolution trend.

3. The method according to claim 2, characterized in that, Determining the spatial congestion level of the traffic flow in the current control step based on the spatial occupancy data of the traffic flow includes: The queuing intensity of the traffic flow is determined based on the number of vehicles traveling in the traffic flow and / or the distance between the first and last vehicles. The average vehicle occupancy rate of the traffic flow is determined based on the projected area of ​​each of the vehicles and the path length of the traffic flow. The spatial congestion level of the traffic flow in the current control step is obtained by comprehensively evaluating the queuing intensity and the average vehicle occupancy rate.

4. The method according to claim 1, characterized in that, The method further includes: Determine the historical spatial congestion level or historical congestion evolution trend of the traffic flow passing through the intersection node before the corresponding historical phase is executed at the intersection node; Based on the comparison between the spatial congestion level of the traffic flow passing through the intersection node and the historical spatial congestion level, and / or the comparison between the congestion evolution trend of the traffic flow passing through the intersection node and the historical congestion evolution trend, the congestion change of the traffic flow passing through the intersection node is determined.

5. The method according to claim 4, characterized in that, The step of generating feedback decision instructions for the historical phase based on the congestion changes of traffic flow passing through the intersection node after the corresponding historical phase is executed includes: Aggregate analysis is performed on the congestion changes of at least one traffic flow passing through the intersection node to determine the overall congestion changes of the intersection node; When the overall congestion change indicates congestion relief, the feedback decision instruction is to update the selection priority of the historical phase from a preset priority to a first priority, wherein the first priority is higher than the preset priority; If the overall congestion change indicates that congestion has not been alleviated, the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the second priority, wherein the second priority is lower than the preset priority.

6. The method according to claim 1, characterized in that, The method utilizes a large language model to perform reasoning analysis on the spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flows of each traffic flow in the current control step, and the feedback decision instructions of each intersection node, to obtain the phase of each intersection node in the current control step, including: The spatial congestion level and congestion trend of each traffic flow in the current control step, the congestion trend of the neighboring traffic flow of each traffic flow in the current control step, the historical phase of each intersection node, the feedback decision instructions, and the traffic flow to be released corresponding to each feasible phase are embedded into a preset prompt template to obtain target prompt words. The feasible phase is determined according to the traffic signals that the traffic lights of the intersection node can indicate, and the traffic flow to be released is the traffic flow released by the feasible phase of the intersection node. The target prompt word is input into the large language model to obtain the phase information of each intersection node in the current control step, and the phase information includes the phase.

7. The method according to claim 6, characterized in that, The preset prompt template includes: reasoning path constraints for constraining the reasoning order of the large language model, signal switching constraints for constraining phase switching to meet traffic signal switching specifications, and output format constraints for constraining the output format; the signal switching constraints include at least one of the following: minimum green light duration, maximum green light duration, yellow light duration, all-red light duration, minimum switching interval, and switching penalty rules. The step of inputting the target prompt word into the large language model to obtain the phase information of each intersection node in the current control step includes: The target prompt word is input into the large language model so that the large language model performs the following operations based on the inference path constraints: For each intersection node, based on the congestion evolution trend of each traffic flow passing through the intersection node and a preset duration threshold, a time-based congestion analysis is performed on each traffic flow to obtain the analysis results. If it is determined that there is a first traffic flow with an increasing congestion trend at the intersection node and the longest travel time at the latest sampling time point is greater than a preset duration threshold, then a first feasible phase that can be released for the first traffic flow is determined from the traffic flows corresponding to each feasible phase. Based on the spatial congestion level of each traffic flow, identify the second traffic flow that has the greatest impact on the traffic efficiency of the intersection node. Combined with the congestion evolution trend of the neighboring traffic flows of each traffic flow, determine the second feasible phase that can be released and has the least impact on the congestion pressure of the neighboring traffic flows from the traffic flows corresponding to each feasible phase. When the feedback decision instruction is to update the selection priority of the historical phase from the preset priority to the first priority, the historical phase, the first feasible phase, and the second feasible phase are all regarded as candidate phases; Based on the historical phase and signal switching constraints, the phase of the intersection node in the current control step is determined from the candidate phases; The phase information is generated based on the phase of the intersection node in the current control step and the output format constraints.

8. The method according to claim 7, characterized in that, The output format constraint is used to constrain the output of each intersection node of the large language model in the current control step, the reason for outputting the phase, and the executable action code corresponding to the phase; The method further includes: The phase information is subjected to integrity verification to obtain a first verification result; If the first verification result indicates that the phase information includes fields corresponding to the phase, the cause, and the executable action code, then the format of the content information included in the phase, the cause, and the executable action code is verified to obtain a second verification result. The executable action code is validated for legality, and the phase is validated for switching specifications using the signal switching constraints to obtain a third validation result. If both the second and third verification results indicate that the verification is successful, the phase information is sent to the traffic signal controller, which is the control device for traffic lights.

9. The method according to claim 8, characterized in that, The method further includes: If the second verification result or the third verification result indicates that the verification failed, a failure reason is generated based on the target verification result that failed the verification in the second verification result and the third verification result. The failure reason and the target prompt word are re-inputted into the large language model, and the updated phase information is output. After verifying the updated phase information, if both the updated second verification result and the updated third verification result indicate that the verification has passed, the updated phase information is sent to the traffic signal controller.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.