Highway traffic flow intelligent regulation method, device, equipment and medium

By generating dynamic road network map data and utilizing spatiotemporal fusion prediction models and multi-agent learning algorithms, traffic control strategies are adjusted in real time, solving the dynamic adaptability problem of traffic flow prediction and control in existing technologies, and improving the operational efficiency of the transportation system and the travel experience.

CN122336979APending Publication Date: 2026-07-03SHIJIAZHUANG TIEDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610392271.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-27
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing traffic flow prediction and control technologies cannot adapt to dynamic changes in real time, resulting in limited control effects and impacting the operational efficiency of the transportation system and the travel experience.

Method used

By acquiring real-time and historical traffic flow data and topology of the road network, dynamic road network map data is generated. Traffic flow is predicted using a spatiotemporal fusion prediction model. A dynamic traffic collaborative control instruction set is generated through a multi-agent learning algorithm. The spatiotemporal influence weights of key road sections and the set of independent agents are adjusted in real time to optimize the control strategy.

Benefits of technology

It enables accurate prediction and efficient dynamic control of traffic flow, improves the operational efficiency of the road network and the travel experience, and enhances the targeted management capabilities of key road sections and the coordinated control response between road sections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122336979A_ABST
    Figure CN122336979A_ABST
Patent Text Reader

Abstract

This application relates to a method, device, equipment, and medium for intelligent control of highway traffic flow. The method includes: acquiring real-time and historical traffic flow data and topology of the road network; generating dynamic road network map data containing node and edge association features through spatiotemporal feature fusion; inputting the data into a pre-trained spatiotemporal fusion prediction model to obtain preliminary prediction results including road segment flow, temporal sequence, spatial distribution, and key road segments; dynamically weighting key road segments and adjusting their spatiotemporal impact weights on the surrounding road network to generate future spatiotemporal distribution prediction results for road network flow; designating key road segments with flow exceeding the dynamic capacity threshold as independent intelligent agents; calculating traffic delay values ​​and road network load balance, and linearly weighting and fusing them to generate a joint reward value; and optimizing strategies through a multi-agent learning algorithm to generate a dynamic traffic collaborative control instruction set. This method can adapt to dynamic changes in traffic flow in real time, achieving accurate prediction and efficient control, improving road network operation efficiency and travel experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation Internet of Things application service technology, and in particular relates to a method, device, equipment and medium for intelligent control of highway traffic flow. Background Technology

[0002] With the continuous development of intelligent transportation system technology, data-driven traffic flow prediction and control technologies have emerged. These technologies collect and analyze large amounts of traffic data, utilize advanced algorithm models to predict traffic flow and dynamically control it, thereby improving the operational efficiency of road networks and reducing traffic congestion.

[0003] In existing technologies, traffic flow prediction and regulation mainly rely on static traffic models and fixed control strategies. While these methods can alleviate traffic congestion to some extent, they cannot adapt to dynamic changes in traffic flow in real time, resulting in limited control effectiveness. Current static traffic models and fixed control strategies have significant limitations; they cannot dynamically adjust traffic signals and route planning based on real-time traffic flow changes. This problem causes traditional methods to fail to achieve accurate flow prediction and efficient traffic control in complex traffic scenarios, thus affecting the operational efficiency of the entire transportation system and the travel experience. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, device, equipment, and medium for intelligent control of highway traffic flow that can adapt to dynamic changes in traffic flow in real time, achieve accurate traffic flow prediction and efficient dynamic control, so as to improve the operational efficiency of the road network and enhance the travel experience.

[0005] Firstly, this application provides a method for intelligent control of highway traffic flow, including:

[0006] The system acquires real-time traffic flow data, historical traffic flow data, and topology of the road network, and performs spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data, and topology of the road network to generate dynamic road network graph data containing node and edge association features.

[0007] Dynamic road network map data is input into a pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments.

[0008] The key road segments in the preliminary forecast results are dynamically weighted, and the spatiotemporal impact weights of the key road segments on the surrounding road network are adjusted to generate the spatiotemporal distribution forecast results of road network traffic in future periods; key road segments are road segments in the road network that have a significant impact on the overall traffic flow.

[0009] When the traffic flow of key road segments in the spatiotemporal distribution prediction results of road network traffic exceeds the dynamic capacity threshold, the corresponding key road segments are identified as independent intelligent agents, and a set of independent intelligent agents is obtained.

[0010] Preliminary calculation results were obtained by calculating the vehicle delay value and road network load balance based on real-time traffic flow data;

[0011] The preliminary calculation results are linearly weighted and fused according to preset weights to generate a joint reward value for evaluating the strategy;

[0012] Based on the joint reward value, a multi-agent learning algorithm is used to optimize the strategy of the set of independent agents to generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy control instructions for highway traffic flow.

[0013] In one embodiment, the pre-trained spatiotemporal fusion prediction model is constructed using the following method:

[0014] Based on historical traffic flow data and topology of the road network, a spatiotemporal graph convolutional network is initialized and constructed, generating a graph convolutional base model that includes a spatiotemporal attention mechanism; the node feature update formula of the graph convolutional base model is:

[0015]

[0016] in, For the first The hidden state of layer node i Let represent the set of neighboring nodes of node i. For spatiotemporal attention weights, For a trainable parameter matrix, Let j be the hidden state of node j at level l. The spatiotemporal feature fusion coefficients are represented by ⊙, which denotes the Hadamard product. For temporal convolution operators, Let be the historical time series data of node i, and σ(⋅) be the nonlinear activation function;

[0017] Spatiotemporal dual-stream feature extraction is performed on the graph convolutional basis model. Temporally sensitive features and spatially dependent features are generated by dilated causal convolution in the temporal dimension and graph diffusion convolution in the spatial dimension, respectively.

[0018] Based on the dynamic routing algorithm, time-sensitive features and spatially dependent features are adaptively fused to obtain a spatiotemporal joint representation vector; the iterative formula of the dynamic routing algorithm is:

[0019]

[0020] in, The spatiotemporal coupling coefficient is a characteristic of the system. The bias term between nodes i and j. This represents the bias term between node i and candidate node m. Here, K represents the modal alignment parameter at the k-th time step, where K is the number of time steps. and are the feature vectors of the time flow and the spatial flow, respectively, and C is all possible combinations of spatiotemporal features;

[0021] The spatiotemporal joint representation vector is input into a prediction head with gated recurrent units. The spatiotemporal loss function is optimized through end-to-end training to generate a pre-trained spatiotemporal fusion prediction model. The spatiotemporal loss function is defined as:

[0022]

[0023] in, For the spatiotemporal loss function, To predict the flow matrix, For the real traffic matrix, Denotes the Frobenius norm. and These represent the predicted and actual changes in road segment traffic gradients, respectively. Let KL be the set of edges of the road network. ⋅) represents the KL divergence. and These are the spatial distribution probability and the topological prior distribution, respectively. , , These are the weighting coefficients for each type of loss.

[0024] In one embodiment, key road segments in the preliminary prediction results are dynamically weighted, and the spatiotemporal impact weights of these key road segments on the surrounding road network are adjusted to generate a future spatiotemporal distribution prediction result for road network traffic, including:

[0025] Based on historical congestion patterns, key road segments are identified in the road network topology, generating a dynamic set of key road segments.

[0026] Based on real-time traffic flow data, an impact range analysis is performed on a dynamic set of key road segments to generate a spatiotemporal impact weight matrix.

[0027] Based on the spatiotemporal influence weight matrix, with key road segments as attention centers, the feature propagation intensity of the spatiotemporal influence weight matrix is ​​adaptively adjusted to generate the adjusted feature propagation intensity.

[0028] Based on the adjusted feature propagation intensity, the predicted values ​​of road network traffic for adjacent road segments of key road segments are corrected, and the corrected predicted values ​​of adjacent road segments are generated.

[0029] The preliminary prediction results are fused with the corrected prediction values ​​of adjacent road segments using a spatiotemporal convolutional neural network to generate a spatiotemporal distribution prediction result for road network traffic in future time periods.

[0030] In one embodiment, based on the adjusted feature propagation intensity, the predicted network traffic of adjacent road segments of the critical road segment is corrected to generate corrected predicted values ​​for adjacent road segments, including:

[0031] The influence intensity of adjacent road segments is sorted according to the spatiotemporal influence weight matrix, and a graded correction priority list is generated.

[0032] Based on the hierarchical correction priority list, a differentiated correction strategy is selected to generate a multi-level correction coefficient matrix;

[0033] The preliminary prediction results are corrected by hierarchical feature propagation through a spatiotemporal graph convolutional network to generate preliminary corrected prediction values.

[0034] The correction results of the preliminary revised forecasts were verified based on real-time traffic flow data, and the correction verification results were obtained.

[0035] Based on the correction and verification results, the preliminary corrected prediction values ​​are adjusted accordingly to generate corrected prediction values ​​for adjacent road segments.

[0036] In one embodiment, when the traffic flow of a key road segment exceeds the dynamic capacity threshold in the spatiotemporal distribution prediction result of the road network traffic, the corresponding key road segment is identified as an independent intelligent agent, resulting in a set of independent intelligent agents, including:

[0037] Based on the prediction results of the spatiotemporal distribution of road network traffic, combined with real-time traffic flow data and historical traffic flow data, the capacity thresholds of key road sections are dynamically adjusted to obtain the set of dynamic capacity thresholds for key road sections after adjustment.

[0038] Based on the set of capacity thresholds for key road segments, the ratio of traffic flow to the adjusted dynamic capacity threshold for key road segments is calculated to obtain the set of traffic flow ratios for key road segments.

[0039] Key road segments whose traffic ratios exceed a preset threshold in the traffic ratio set are identified as independent intelligent agents, thus obtaining a set of independent intelligent agents.

[0040] In one embodiment, based on the joint reward value, a multi-agent learning algorithm is used to optimize the policy of the set of independent agents to generate a dynamic traffic cooperative control instruction set, including:

[0041] Based on the joint reward value and the historical interaction data of each independent agent, multi-source data fusion and experience fragment encapsulation are performed to generate a standardized set of experience tuples for policy evaluation.

[0042] The long-term utility evaluation and gradient calculation of the strategy are performed based on a standardized set of empirical tuples, which yields the parameter update direction and magnitude to guide the optimization of the strategy.

[0043] The strategy function parameters are iteratively adjusted based on the parameter update direction and magnitude to generate an optimized collaborative control strategy.

[0044] Based on dynamic road network map data, a dynamic traffic collaborative control instruction set is generated by calculating the dynamic road network map data through a collaborative control strategy.

[0045] In one embodiment, the strategy function parameters are iteratively adjusted based on the parameter update direction and magnitude to generate an optimized cooperative control strategy, including:

[0046] The parameter update direction and magnitude are weighted and aggregated based on the importance weight of the agent to generate a globally consistent parameter update vector;

[0047] Asynchronous incremental update calculations are performed based on the global consistency parameter update vector and the parameters of the current policy function to obtain candidate values ​​for the next generation policy function parameters;

[0048] The policy performance is verified based on the candidate values ​​of the next-generation policy function parameters. The verified candidate values ​​are then updated to the current policy function to generate an optimized cooperative control policy.

[0049] Secondly, this application also provides a smart traffic flow control device for highways, comprising:

[0050] The feature fusion module is used to acquire real-time traffic flow data, historical traffic flow data and topology of the road network, and to perform spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data and topology of the road network to generate dynamic road network map data containing node and edge association features.

[0051] The preliminary traffic flow prediction module is used to input dynamic road network map data into a pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments.

[0052] The weighted prediction module is used to dynamically weight the key road segments in the preliminary prediction results and adjust the spatiotemporal impact weights of the key road segments on the surrounding road network to generate the spatiotemporal distribution prediction results of road network traffic in future periods; key road segments are road segments in the road network that have a significant impact on the overall traffic flow.

[0053] The independent intelligent agent identification module is used to identify the corresponding key road segments as independent intelligent agents when the traffic flow of key road segments in the spatiotemporal distribution prediction results of the road network exceeds the dynamic capacity threshold, thereby obtaining a set of independent intelligent agents.

[0054] The traffic flow status quantification calculation module is used to calculate the vehicle delay value and road network load balance of real-time traffic flow data and obtain preliminary calculation results.

[0055] The joint reward value calculation module is used to linearly weight and fuse the preliminary calculation results according to preset weights to generate a joint reward value for evaluating the strategy.

[0056] The strategy optimization module is used to optimize the strategy of a set of independent agents based on the joint reward value through a multi-agent learning algorithm, and generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy control instructions for highway traffic flow.

[0057] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the intelligent traffic flow control method of the first aspect.

[0058] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent traffic flow control method of the first aspect.

[0059] The aforementioned intelligent traffic flow control methods, devices, and media, by integrating multi-source spatiotemporal data to generate dynamic road network maps and conduct predictions, can more comprehensively and accurately capture road network traffic characteristics and the impact of key road sections. Combined with dynamic weight adjustment and intelligent agent identification, they focus on core control targets. Furthermore, by calculating joint reward values ​​through multi-dimensional indicators to guide strategy optimization, a dynamic and collaborative control instruction set is ultimately formed. This helps improve the accuracy and timeliness of traffic flow prediction, strengthens targeted management capabilities for key road sections, and promotes collaborative control responses between different road sections. Consequently, it effectively improves the overall smoothness and balance of road network operation, providing a more flexible and efficient solution for intelligent control of highway traffic flow. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 A flowchart illustrating an intelligent traffic flow control method for highways provided by this invention;

[0062] Figure 2A flowchart illustrating a method for generating a pre-trained spatiotemporal fusion prediction model in one embodiment of the present invention;

[0063] Figure 3 This is a flowchart illustrating a method for generating a future time period's spatiotemporal distribution prediction of road network traffic in one embodiment of the present invention.

[0064] Figure 4 This is a flowchart illustrating a method for generating corrected prediction values ​​for adjacent road segments in one embodiment of the present invention.

[0065] Figure 5 A flowchart illustrating a method for generating a dynamic traffic cooperative control instruction set in an optional embodiment of the present invention;

[0066] Figure 6 A flowchart illustrating a method for generating a dynamic traffic cooperative control instruction set in one embodiment of the present invention;

[0067] Figure 7 This is a flowchart illustrating a method for generating an optimized collaborative control strategy in one embodiment of the present invention.

[0068] Figure 8 This is a schematic diagram of the structure of an intelligent traffic flow control device for highways provided by the present invention. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0070] In one embodiment, such as Figure 1 As shown, a method for intelligent control of highway traffic flow is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0071] S111. Obtain real-time traffic flow data, historical traffic flow data, and topology of the road network, and perform spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data, and topology of the road network to generate dynamic road network map data containing node and edge association features.

[0072] Among them, real-time traffic flow data is data reflecting the current road network traffic status, such as vehicle flow, vehicle speed, and vehicle flow density, collected in real time by detection equipment; historical traffic flow data is a processed record of traffic flow in different time periods and scenarios in the past; road network topology is a graphical structure that abstracts road network intersections into nodes and road segments into edges, labels attributes, and represents connection relationships through an adjacency matrix; spatiotemporal feature fusion is a processing process that combines the traffic flow change patterns in the time dimension with the road segment association features in the spatial dimension and maps them to a unified dimension; dynamic road network map data is structured data that includes node and edge association features and can reflect the real-time dynamics of the road network.

[0073] Optionally, real-time traffic flow data, historical traffic flow data, and topology of the road network are first acquired and processed. Then, the time and spatial dimensions of the above data are fused to integrate the traffic flow change patterns in time and the road segment association features in space and map them to a unified dimension, ultimately generating dynamic road network map data containing node and edge association features.

[0074] S112. Input the dynamic road network map data into the pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments.

[0075] Specifically, the pre-trained spatiotemporal fusion prediction model is a model that is trained in advance using historical data and can integrate spatiotemporal features to predict traffic flow. The dynamic road network map data is input into the spatiotemporal fusion prediction model trained in advance using historical data. The model performs calculations based on the spatiotemporal features of the fused data and outputs a set of prediction information including road segment traffic prediction (traffic value of each road segment in a specific future time period), time series prediction (traffic flow change curve and peak time), spatial distribution prediction (road network traffic heat map), and key road segments (road segments that have an important impact on overall traffic), thus obtaining preliminary prediction results.

[0076] S113. Dynamically weight the key road segments in the preliminary prediction results and adjust the spatiotemporal impact weights of the key road segments on the surrounding road network to generate the spatiotemporal distribution prediction results of road network traffic in future periods; key road segments are road segments in the road network that have a significant impact on the overall traffic flow.

[0077] Specifically, for key road segments in the preliminary forecast results, dynamic weighting is applied by combining the historical congestion contribution and real-time load of the key road segments. At the same time, the spatiotemporal impact weight of the key road segments on the surrounding road network is adjusted based on the spatial distance with surrounding road segments, traffic flow transmission delay and real-time traffic density. This generates forecast data that reflects the temporal and spatial distribution of traffic flow in each road segment of the road network in a specific future period, i.e., the spatiotemporal distribution forecast of road network traffic in the future period.

[0078] S114. When the traffic flow of key road segments in the spatiotemporal distribution prediction results of road network traffic exceeds the dynamic capacity threshold, the corresponding key road segments are identified as independent intelligent agents, and a set of independent intelligent agents is obtained.

[0079] Specifically, the dynamic capacity threshold is the upper limit of road segment traffic capacity that is dynamically adjusted based on factors such as the basic traffic capacity of the road segment, the proportion of large vehicles in real time, the coefficient of variation of vehicle speed, weather and temporary events; an independent intelligent agent is a critical road segment whose traffic exceeds the dynamic capacity threshold as an individual with independent decision-making and execution capabilities; and an independent intelligent agent set is a group composed of multiple independent intelligent agents that meet the conditions.

[0080] For example, the dynamic capacity threshold of the key road segment is first determined based on the basic characteristics of the road segment and real-time influencing factors. Then, the traffic flow of the key road segment in the spatiotemporal distribution prediction results of the road network traffic is compared with the dynamic capacity threshold. If the traffic flow exceeds the threshold, the key road segment is identified as an independent intelligent agent, and finally a set of independent intelligent agents is formed.

[0081] S115. Calculate the traffic delay value and road network load balance of real-time traffic flow data to obtain preliminary calculation results.

[0082] Optionally, traffic delay value is the difference between the travel time caused by traffic conditions and the free-flow travel time of vehicles during their journey on a road segment. Different methods are used to calculate this for signalized and unsignalized road segments. Road network load balance is an indicator reflecting the degree of load distribution balance among road segments, assessed by weighting the coefficient of variation of the traffic flow-capacity ratio and the Gini coefficient. Based on the different road segment types (signaled and unsignaled), corresponding methods are used to calculate the traffic delay value in real-time traffic flow data. Simultaneously, by calculating and weighting the coefficient of variation of the traffic flow-capacity ratio and the Gini coefficient, the road network load balance is obtained, thus forming preliminary calculation results.

[0083] S116. Perform linear weighted fusion of the preliminary calculation results according to the preset weights to generate a joint reward value for evaluating the strategy.

[0084] Among them, the preset weights are the weights of traffic delay values ​​and road network load balance in the fusion calculation, determined by the analytic hierarchy process (AHP) and expert judgment based on different traffic scenarios (such as morning peak, off-peak, and evening peak); the linear weighted fusion is a calculation method that linearly combines the traffic delay values ​​and road network load balance in the preliminary calculation results according to the preset weights; the joint reward value is generated through linear weighted fusion and is a quantitative indicator used to evaluate the merits of traffic control strategies.

[0085] Specifically, the preset weights of traffic delay value and road network load balance are determined according to different traffic scenarios. Then, the traffic delay value in the preliminary calculation results is positiveized and standardized, and linearly weighted and fused with the road network load balance after the same standardization according to the preset weights to finally generate a joint reward value for evaluating the strategy.

[0086] S117. Based on the joint reward value, a multi-agent learning algorithm is used to optimize the strategy of the set of independent agents to generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy traffic flow control instructions for highways.

[0087] Optionally, the multi-agent learning algorithm is an algorithm that allows multiple independent agents to learn and optimize strategies through interaction. Strategy optimization is a process based on joint reward values, adjusting the decision-making strategies of independent agents through the multi-agent learning algorithm to improve the overall control effect. The dynamic traffic cooperative control instruction set contains executable control instructions for various control devices in the road network (such as traffic signals and variable message signs), used to deploy and implement traffic flow control. Specifically, based on the joint reward value as the evaluation criterion, the multi-agent learning algorithm is used to optimize the decision-making strategies of the set of independent agents, and a dynamic traffic cooperative control instruction set containing executable instructions for each control device is generated based on the optimized strategy, used for the deployment of highway traffic flow control instructions.

[0088] In the above embodiments, by performing spatiotemporal fusion of multi-source data of the road network, using pre-trained models to predict traffic flow, dynamically adjusting the weights of key road segments, identifying independent intelligent agents, calculating evaluation indicators and optimizing control strategies, it is possible to adapt to dynamic changes in traffic flow in real time, accurately predict traffic flow and efficiently coordinate control, thereby improving the road network operation efficiency and travel experience.

[0089] In one exemplary embodiment, such as Figure 2 As shown, the pre-trained spatiotemporal fusion prediction model is constructed using the following method:

[0090] S211. Initialize and construct a spatiotemporal graph convolutional network based on historical traffic flow data and topology of the road network, generating a graph convolutional base model that includes a spatiotemporal attention mechanism; the node feature update formula of the graph convolutional base model is:

[0091]

[0092] in, For the first The hidden state of layer node i Let represent the set of neighboring nodes of node i. For spatiotemporal attention weights, For a trainable parameter matrix, Let j be the hidden state of node j at level l. The spatiotemporal feature fusion coefficients are represented by ⊙, which denotes the Hadamard product. For temporal convolution operators, Let be the historical time series data of node i, and σ(⋅) be the nonlinear activation function.

[0093] The historical traffic flow data of the road network includes time-series records of vehicle flow and speed under different time periods and scenarios. The road network topology consists of a graph structure with nodes representing intersections and edges representing road segments, containing connectivity relationships and attributes. Specifically, based on the road network topology, the node and edge relationships of the graph convolutional network are defined, mapping the historical traffic flow data to initial node features. Subsequently, a spatiotemporal attention mechanism is introduced, calculating the spatiotemporal attention weights between nodes. It reflects the degree of influence of neighboring nodes on the target node at different times, combined with the trainable parameter matrix. Hide state from neighboring nodes Weighted aggregation; simultaneously, utilizing the temporal convolution operator. Historical time series data of node i Temporal feature extraction is performed, and then spatiotemporal feature fusion coefficients are used. The result of spatial dimension aggregation is subjected to Hadamard product operation, and finally the output is processed by nonlinear activation function σ(⋅). Hidden state of layer node i Ultimately, a graph convolutional basis model containing a spatiotemporal attention mechanism is generated, enabling the initial capture of spatiotemporal correlation features of the road network.

[0094] S212. Perform spatiotemporal dual-stream feature extraction on the graph convolutional basis model, generating time-sensitive features and spatially dependent features through dilated causal convolution in the time dimension and graph diffusion convolution in the spatial dimension, respectively.

[0095] Optionally, for the feature data output by the graph convolutional basis model, a dual-stream parallel extraction strategy is adopted to separate spatiotemporal features. In the time dimension, dilated causal convolution is used to expand the receptive field by setting the dilation rate, while maintaining causality to avoid future data leakage. This captures the temporal features of nodes at multiple scales, extracts the traffic change patterns within different time intervals, and generates time-sensitive features, such as the morning peak traffic growth rate and the off-peak traffic stabilization cycle. In the spatial dimension, graph diffusion convolution is used. Based on the adjacency relationship of the road network topology, the diffusion matrix is ​​used to simulate the transmission process of traffic flow between road segments, calculate the feature interactions between nodes and multi-level neighbor nodes, and mine the spatial dependencies between road segments, such as the traffic transmission ratio between main roads and branch roads, and the influence range of intersections on surrounding road segments. This generates spatial dependency features, laying the foundation for subsequent spatiotemporal feature fusion.

[0096] S213. Based on the dynamic routing algorithm, time-sensitive features and spatially dependent features are adaptively fused to obtain a spatiotemporal joint representation vector; the iterative formula of the dynamic routing algorithm is:

[0097]

[0098] in, The spatiotemporal coupling coefficient is a characteristic of the system. The bias term between nodes i and j. This represents the bias term between node i and candidate node m. Here, K represents the modal alignment parameter at the k-th time step, where K is the number of time steps. and Let be the feature vectors of the time flow and the spatial flow, respectively, and C be all possible combinations of spatiotemporal features.

[0099] For example, time-sensitive features and spatially dependent features are used as inputs, and an adaptive fusion of the two is achieved through a dynamic routing algorithm. First, a time-flow feature vector is defined. (Vector representation of time-sensitive features) and spatial flow feature vectors (Vector representation of spatially dependent features), calculate the bias term between different node pairs. (Initially set spatiotemporal feature association base values); subsequently, the modal alignment parameter at the k-th time step is introduced. Adjusting the matching degree of spatiotemporal features at different time steps using cosine similarity. Calculate the similarity of spatiotemporal features, combined with the bias term. Modal alignment parameters The accumulated value is normalized using the Softmax function to obtain the spatiotemporal feature coupling coefficient. This reflects the fusion weight of a certain temporal flow feature and spatial flow feature; finally, based on... We perform a weighted summation of all possible spatiotemporal feature combinations C to generate a spatiotemporal joint representation vector, ensuring that the fusion process can dynamically adjust the weights according to the real-time correlation of spatiotemporal features, thereby improving the accuracy of feature representation.

[0100] S214. Input the spatiotemporal joint representation vector into the prediction head with gated recurrent units, optimize the spatiotemporal loss function through end-to-end training, and generate a pre-trained spatiotemporal fusion prediction model; the spatiotemporal loss function is defined as:

[0101]

[0102] in, For the spatiotemporal loss function, To predict the flow matrix, For the real traffic matrix, Denotes the Frobenius norm. and These represent the predicted and actual changes in road segment traffic gradients, respectively. Let KL be the set of edges of the road network. ⋅) represents the KL divergence. and These are the spatial distribution probability and the topological prior distribution, respectively. , , These are the weighting coefficients for each type of loss.

[0103] Specifically, the spatiotemporal joint representation vector is input into a prediction head equipped with a gated recurrent unit (GRU), a network module responsible for mapping the feature vector to the traffic prediction result. The GRU filters key spatiotemporal features through reset and update gates to avoid redundant information interference and outputs a preliminary predicted traffic matrix. Further, an end-to-end training process is initiated, using a spatiotemporal loss function... To optimize the objective, the deviation between the predicted results and the actual values ​​is comprehensively constrained: where, The term calculates the predicted flow matrix using the Frobenius norm. With the real traffic matrix The overall error is minimized to ensure the basic accuracy of the predicted values; Item passed Norm-constrained prediction of traffic gradients in road segments With the true gradient The differences ensure the consistency of traffic change trend prediction; The term measures the spatial distribution probability using KL divergence. With topological prior distribution To mitigate bias and ensure that the prediction results conform to the physical constraints of the road network topology, the model parameters are iteratively optimized through backpropagation until the spatiotemporal loss function is optimized. The model converges and ultimately generates a pre-trained spatiotemporal fusion prediction model.

[0104] In the above embodiments, by constructing a graph convolutional basis model with a spatiotemporal attention mechanism, extracting dual-flow features, dynamic route fusion, and optimizing multi-constraint loss functions, a high-precision pre-trained spatiotemporal fusion prediction model is formed. This model can more accurately uncover the temporal variation patterns and spatial dependencies of road network traffic flow, providing high-quality model support for subsequent traffic flow prediction and dynamic regulation. This, in turn, improves the accuracy and timeliness of traffic flow prediction, laying the foundation for alleviating traffic congestion and improving the travel experience.

[0105] In one embodiment, such as Figure 3As shown, the key road segments in the preliminary prediction results are dynamically weighted, and the weights of the spatiotemporal impact of the key road segments on the surrounding road network are adjusted to generate the spatiotemporal distribution prediction results of road network traffic for future periods, including:

[0106] S311. Based on historical congestion patterns, identify key road segments in the road network topology and generate a dynamic set of key road segments.

[0107] The road network topology includes a graphical structure with nodes as intersections and edges as road segments, containing attributes such as road segment length, number of lanes, and connection relationships. The historical congestion pattern data includes records of congestion duration, congestion frequency, and congestion spread range of each road segment in the road network under different time periods, weather, holidays, and other scenarios. Statistical analysis of historical congestion patterns is conducted to extract common characteristics of high-congestion road segments, such as the road network level (arterial road, secondary arterial road, local road), peak-hour traffic capacity, and connectivity with surrounding transportation hubs (e.g., subway stations, shopping mall parking lots). Combining this with the road network topology, topological centrality analysis methods, such as degree centrality and betweenness centrality, are used to calculate the connectivity importance of each road segment within the network. Degree centrality reflects the number of connections between a road segment and other road segments, while betweenness centrality reflects the intermediate frequency of a road segment in the network's traffic flow path. Finally, the historical congestion contribution and topological centrality score are combined. The historical congestion contribution includes the proportion of congestion duration and the number of surrounding road segments congested due to congestion spread. Dual thresholds are set, such as a congestion contribution threshold and a topological centrality threshold, to screen road segments that simultaneously meet the threshold conditions, generating a dynamic set of key road segments. This ensures that the identified key road segments not only have historical congestion correlations but also significantly impact the overall connectivity of the road network.

[0108] S312. Analyze the impact range of the dynamic key road segment set based on real-time traffic flow data and generate a spatiotemporal impact weight matrix.

[0109] Specifically, based on real-time traffic flow data, real-time operational status indicators of dynamic key road segments are calculated, such as the current flow-capacity ratio (the ratio of actual traffic flow to the design capacity of the road segment) and the speed deviation rate (the percentage of the difference between actual vehicle speed and free-flow vehicle speed). This is used to determine the current load level of key road segments. The higher the load, the greater the impact on the surrounding road network.

[0110] Furthermore, by combining the spatial distance of road segments (the physical distance between key road segments and surrounding road segments) and the traffic flow propagation delay (the time it takes for traffic flow to travel from key road segments to surrounding road segments based on real-time vehicle speed), an impact range assessment model is constructed: taking key road segments as the center, the model is divided into core impact zones (e.g., within 1 kilometer), secondary impact zones (1-3 kilometers), and edge impact zones (beyond 3 kilometers) according to spatial distance. At the same time, the partition weights are adjusted according to the traffic flow propagation delay (the shorter the delay, the higher the impact weight). Finally, the degree of influence of each key road segment on different surrounding partition road segments is quantified into weight values ​​(ranging from 0 to 1, with higher weights indicating stronger influence). A two-dimensional matrix is ​​constructed according to the correspondence between "key road segments and surrounding road segments" to generate a spatiotemporal impact weight matrix, thereby achieving a structured and quantitative representation of the impact range of key road segments.

[0111] S313. Based on the spatiotemporal influence weight matrix, with key road segments as attention centers, adaptively adjust the feature propagation intensity of the spatiotemporal influence weight matrix to generate the adjusted feature propagation intensity.

[0112] Among them, based on the spatiotemporal influence weight matrix, an attention mechanism is introduced to achieve adaptive adjustment of feature propagation intensity. For example, key road segments are explicitly designated as attention centers, and the initial weights in the spatiotemporal influence weight matrix are used as basic attention weights to reflect the initial influence of key road segments on surrounding road segments. Combining dynamic characteristics from real-time traffic flow data, such as the traffic growth rate of key road segments (percentage change in traffic flow per unit time) and the current load status of surrounding road segments (whether they are approaching congestion thresholds), the basic attention weights are dynamically adjusted: if the traffic growth rate of a key road segment is high (e.g., 10% increase within 5 minutes) and a surrounding road segment is already under high load (flow-capacity ratio exceeding 0.8), the attention weight of that key road segment on its surrounding road segments is increased, i.e., the feature propagation intensity, to strengthen the early warning of traffic changes on that road segment; if the traffic flow of a key road segment tends to be stable and the load on surrounding road segments is low, the attention weight is appropriately reduced to avoid excessive intervention. Finally, the adjusted weights are normalized using the Softmax function to ensure that the sum of the feature propagation intensity weights of each key road segment on all surrounding road segments is 1, generating the adjusted feature propagation intensity. This allows the weight allocation to match the dynamic changes in road network traffic in real time, improving the accuracy of influence quantification.

[0113] S314. Based on the adjusted feature propagation intensity, the predicted values ​​of road network traffic for adjacent road segments of key road segments are corrected, and the corrected predicted values ​​of adjacent road segments are generated.

[0114] For example, based on the adjusted feature propagation intensity, adjacent road segments of the critical road segment are prioritized—adjacent road segments with higher feature propagation intensity are more affected by traffic changes in the critical road segment and require priority for prediction value correction; a differentiated correction strategy is adopted for adjacent road segments with different priorities: for high-priority road segments (feature propagation intensity ≥ 0.6), based on the real-time traffic change rate of the critical road segment (e.g., current traffic increases by 8% compared to 5 minutes ago), a linear regression model is used to establish the correlation between traffic changes in the critical road segment and traffic changes in adjacent road segments, such as the traffic flow of the critical road segment... For a 1% increase in traffic volume and a 0.7% increase in traffic volume on adjacent road segments, a significant correction is made to the initial forecast. For medium-priority road segments (0.3 ≤ feature propagation intensity < 0.6), a moving average method combined with the traffic trend of key road segments is used to make a slight smoothing correction to the initial forecast. For low-priority road segments (feature propagation intensity < 0.3), only the basic trend of the initial forecast is retained, and the correction magnitude is finely adjusted. Finally, the corrected traffic volume forecasts of each adjacent road segment are integrated to generate corrected forecasts for adjacent road segments, ensuring that the forecasts accurately reflect the actual impact of the dynamics of key road segments on adjacent road segments.

[0115] S315. Based on the spatiotemporal convolutional neural network, the preliminary prediction results and the corrected prediction values ​​of adjacent road segments are fused to generate the spatiotemporal distribution prediction results of road network traffic in future periods.

[0116] Specifically, the two types of input data undergo unified format processing: the preliminary prediction of road segment traffic flow is mapped into a spatial grid feature map according to the road network topology (each grid corresponds to a road segment, and the grid value is the predicted traffic flow). The corrected prediction values ​​of adjacent road segments are supplemented according to the same grid position to form an initial fusion feature map. The initial fusion feature map is input into a spatiotemporal convolutional neural network. This network extracts the spatial correlation features between different road segments in the road network (such as the traffic flow coordination change pattern of adjacent road segments) through spatial convolutional layers and captures the continuous change trend of traffic flow in the time dimension (such as the traffic peak migration pattern during peak hours) through temporal convolutional layers, realizing the deep fusion of the two types of prediction data in the spatiotemporal dimension. Finally, the network output layer maps the fused features into the final predicted traffic flow value of all road segments in the road network through a fully connected layer. Combining time series information (such as time nodes in the next 15 minutes, 30 minutes, and 60 minutes) and spatial distribution information (the position of each road segment in the road network), the spatiotemporal distribution prediction result of road network traffic flow in the future is generated, realizing the integration from local road segment correction to overall road network prediction, and improving the completeness and accuracy of the prediction results.

[0117] In the above embodiments, by combining historical congestion patterns with topology to identify key road segments, quantifying the impact range of key road segments with real-time data, dynamically adjusting the impact weights using an attention mechanism, hierarchically correcting the predicted values ​​of adjacent road segments, and performing network-level spatiotemporal fusion, a set of prediction result optimization systems for key road segments is formed. This system can accurately capture the spatiotemporal impact of key road segments on network traffic and significantly improve the accuracy and dynamic adaptability of the prediction results for the spatiotemporal distribution of network traffic in future periods.

[0118] In one embodiment, such as Figure 4 As shown, based on the adjusted feature propagation intensity, the predicted network traffic of adjacent road segments of the critical road segment is corrected, generating corrected predicted values ​​for adjacent road segments, including:

[0119] S411. Sort the influence intensity of adjacent road segments according to the spatiotemporal influence weight matrix and generate a graded correction priority list.

[0120] For example, the weight values ​​corresponding to each adjacent road segment are extracted from the spatiotemporal influence weight matrix. These values ​​comprehensively reflect the spatial distance influence of the key road segment on the adjacent road segment, the traffic flow propagation delay influence, and the real-time traffic correlation. These weight values ​​are sorted using a descending sorting algorithm. The higher the weight value, the stronger the influence of the key road segment on the adjacent road segment, and the more priority is needed for the predicted value correction. Finally, based on the sorting results, the adjacent road segments are divided into three levels: high priority (weight value ≥ 0.7), medium priority (0.3 ≤ weight value < 0.7), and low priority (weight value < 0.3). A graded correction priority list containing road segment identifiers and corresponding priorities is generated in order of level.

[0121] S412. Select differentiated correction strategies based on the hierarchical correction priority list and generate a multi-level correction coefficient matrix.

[0122] Specifically, for high-priority adjacent road segments, considering their significant impact from key road segments and strong correlation with real-time traffic fluctuations, a dynamic elastic correction strategy is adopted. The correction coefficient is positively correlated with the real-time traffic change rate of key road segments (e.g., the percentage increase or decrease in traffic within 5 minutes), with the coefficient range set at 1.2-1.5 to enhance the response to drastic traffic changes. For medium-priority adjacent road segments, which are moderately affected by key road segments, a smooth transition correction strategy is adopted, with the correction coefficient set at 0.8-1.2 based on historical traffic correlation data for the same period, balancing the correction magnitude and prediction stability. For low-priority adjacent road segments, which are weakly affected by key road segments, a conservative fine-tuning strategy is adopted, with the correction coefficient fixed between 0.9-1.1, only making minor adjustments to the initial prediction values. The correction coefficients corresponding to each adjacent road segment are arranged in order of road segment number, forming a two-dimensional multi-level correction coefficient matrix. The matrix row index is the key road segment identifier, the column index is the adjacent road segment identifier, and the element value is the corresponding correction coefficient.

[0123] S413. The preliminary prediction results are corrected by hierarchical feature propagation through a spatiotemporal graph convolutional network to generate preliminary corrected prediction values.

[0124] The process involves combining the initial predicted values ​​of adjacent road segments with the road network topology to construct a spatiotemporal feature map. Node features represent predicted traffic flow for each road segment, while edge features represent connectivity and spatiotemporal influence weights between road segments. Subsequently, the spatial convolutional layer of ST-GCN assigns higher feature propagation weights to high-priority adjacent road segments based on hierarchical correction priorities. This prioritizes transmitting real-time traffic characteristics (such as congestion trends) of key road segments to high-priority adjacent road segments, and then gradually influences medium- and low-priority adjacent road segments through a hierarchical propagation mechanism. Simultaneously, the temporal convolutional layer captures the time-series traffic flow characteristics of road segments with different priorities, and dynamically adjusts the predicted values ​​of each road segment using a multi-level correction coefficient matrix. High-priority road segments undergo a larger correction based on the corresponding high values ​​in the coefficient matrix, while medium- and low-priority road segments undergo gradient correction based on their corresponding coefficients. Finally, the output is the traffic prediction value of each adjacent road segment after hierarchical feature propagation, i.e., the preliminary corrected prediction value.

[0125] S414. Based on real-time traffic flow data, the preliminary revised forecast values ​​are verified to obtain the revised verification results.

[0126] Specifically, the error indices between the preliminary corrected forecast and the real-time traffic flow data of the same period are calculated, including the root mean square error (RMSE) and the mean absolute percentage error (MAPE). RMSE reflects the overall dispersion of the error, while MAPE reflects the relative magnitude of the error. Different error thresholds are set for adjacent road segments with different priorities: high-priority road segments have higher requirements for prediction accuracy and are set with lower error thresholds (e.g., MAPE ≤ 5%), medium-priority road segments are set with medium thresholds (e.g., MAPE ≤ 8%), and low-priority road segments are set with higher thresholds (e.g., MAPE ≤ 12%). Finally, the error indices of each adjacent road segment are compared with the corresponding thresholds to generate correction verification results, including two categories: "passed verification" (error below the threshold) and "failed verification" (error above the threshold). The error exceedance range and specific time period of the road segments that failed verification are also recorded.

[0127] S415. Based on the correction and verification results, adjust the preliminary corrected prediction values ​​accordingly and generate corrected prediction values ​​for adjacent road segments.

[0128] Optionally, the preliminary corrected prediction values ​​are further optimized based on the correction verification results. For adjacent road segments that "passed verification," their preliminary corrected prediction values ​​are retained, and smoothing is performed only based on minor fluctuations in real-time traffic flow (e.g., within ±2%) to maintain prediction stability. For adjacent road segments that "failed verification," if the error exceeds the standard by a small margin, such as MAPE exceeding the threshold by 1-3 percentage points, the preliminary corrected prediction values ​​are linearly fine-tuned based on the error direction (predicted value too high or too low), with the adjustment magnitude proportional to the error exceeding the standard. If the error exceeds the standard by a large margin, such as MAPE exceeding the threshold by more than 3 percentage points, the process is backtracked to the multi-level correction coefficient matrix, and the correction coefficients are recalculated in conjunction with real-time traffic flow data. For example, the correction coefficient is reduced for road segments with high prediction values ​​and increased for road segments with low prediction values, and feature propagation correction is performed again through a spatiotemporal graph convolutional network. All adjusted adjacent road segment prediction values ​​are integrated to generate the final adjacent road segment corrected prediction values.

[0129] In the above embodiments, the correction priority is achieved by ranking the influence intensity, correction coefficients are generated by combining the differentiation strategy, hierarchical feature propagation correction is performed by using a spatiotemporal graph convolutional network, and the prediction results are optimized by real-time data verification and secondary adjustment. This significantly improves the accuracy and dynamic adaptability of the traffic prediction values ​​of adjacent road segments, making the prediction results more consistent with the actual operating status of the road network.

[0130] In an optional embodiment, such as Figure 5 As shown, when the traffic flow of key road segments in the spatiotemporal distribution prediction results of the road network exceeds the dynamic capacity threshold, the corresponding key road segments are identified as independent intelligent agents, resulting in a set of independent intelligent agents, including:

[0131] S511. Based on the prediction results of the spatiotemporal distribution of road network traffic, combined with real-time traffic flow data and historical traffic flow data, the capacity thresholds of key road sections are dynamically adjusted to obtain the set of dynamic capacity thresholds for key road sections after adjustment.

[0132] Optionally, the basic capacity thresholds for key road segments are extracted based on the theoretical capacity of the road segment design standards. For example, the basic capacity threshold for a two-way four-lane road segment is typically 2000-2200 pcu / h. The basic thresholds are then adjusted by combining dynamic influencing factors from real-time traffic flow data: if real-time data shows that the proportion of large vehicles is higher than the historical average (e.g., exceeding 30%), the capacity threshold should be reduced by 2%-3% for every 5% increase in the proportion of large vehicles due to their low efficiency; if the real-time vehicle speed is lower than 60% of the free-flow speed, it indicates that the road segment is already in a state of mild congestion, and the capacity threshold should be lowered by 10%-15% for early warning; at the same time, referring to the spatiotemporal distribution prediction results of road network traffic, if the predicted traffic growth rate exceeds 15% in the next 15 minutes, the capacity threshold should be further lowered by 5%-8% to cope with the traffic surge; finally, the capacity thresholds of each key road segment after multi-factor correction are integrated to generate a set of adjusted dynamic capacity thresholds for key road segments, including road segment identification, adjustment basis, and corresponding dynamic capacity thresholds.

[0133] S512. Based on the set of capacity thresholds for key road segments, calculate the ratio of the traffic flow of key road segments to the adjusted dynamic capacity thresholds to obtain the set of traffic flow ratios for key road segments.

[0134] Specifically, a correspondence table of "critical road segment - dynamic capacity threshold - predicted flow" is established, specifying the predicted flow value for each critical road segment (denoted as ). ) and the adjusted dynamic capacity threshold (denoted as The ratio calculation formula is used: Flow R = / Each key road segment is calculated individually. This ratio directly reflects the load level of the key road segment in the future period. The closer R is to 1, the closer the road segment load is to saturation and the higher the risk of congestion. The road segment identification, predicted flow, dynamic capacity threshold and corresponding flow ratio of all key road segments are organized in a unified format to generate a set of flow ratios for key road segments.

[0135] S513. Identify key road segments in the traffic ratio set whose traffic ratio exceeds a preset ratio threshold as independent intelligent agents, and obtain a set of independent intelligent agents.

[0136] The preset ratio threshold is determined based on historical congestion data statistics and is usually set at 0.8-0.9. That is, when the traffic flow reaches 80%-90% of the dynamic capacity threshold, the road segment enters a congestion warning state and needs to be prioritized for control.

[0137] For example, the set of traffic flow ratios is traversed, and the traffic flow ratio R of each key road segment is compared with a preset ratio threshold. If R exceeds the preset threshold, it indicates that the key road segment will have an excessively high load in the future, with a significant risk of congestion. It needs to be managed precisely as an independent control unit, and is therefore identified as an independent intelligent agent, capable of autonomously sensing the road segment status, receiving control instructions, and executing local control strategies. If R does not exceed the preset threshold, it indicates that the road segment load is within a safe range and does not require independent control at this time, and is not included in the category of intelligent agents. All identified independent intelligent agents are classified and summarized according to information such as road segment number, the extent of traffic flow ratio exceeding the standard, and the predicted time of congestion, to generate an independent intelligent agent set, laying the foundation for subsequent multi-agent collaborative control.

[0138] In the above embodiments, by fusing prediction results and real-time and historical data to dynamically adjust the capacity threshold of key road segments, quantitatively calculate the matching ratio of traffic flow and capacity, and accurately identify independent intelligent agents with high congestion risk, the real-time performance of the capacity threshold and the accuracy of the traffic flow ratio are ensured. This enables precise screening and independent control of high-risk key road segments, providing precise control targets for subsequent multi-agent collaborative regulation.

[0139] In one embodiment, such as Figure 6 As shown, based on the joint reward value, a multi-agent learning algorithm is used to optimize the policy of a set of independent agents, generating a dynamic traffic cooperative control instruction set, including:

[0140] S611. Based on the joint reward value and the historical interaction data of each independent agent, perform multi-source data fusion and encapsulate experience fragments to generate a standardized set of experience tuples for policy evaluation.

[0141] The process involves multi-source data fusion and experience encapsulation, using a joint reward value and historical interaction data from each independent agent as input. The joint reward value is a quantitative indicator used to evaluate the effectiveness of the control strategy, integrating traffic delay values ​​and road network load balance. The historical interaction data from each independent agent includes records of the agent's past actions in executing the control strategy, changes in road segment traffic before and after strategy execution, and logs of collaborative interactions with other agents.

[0142] Furthermore, the input data undergoes data format standardization: the joint reward value is associated with the corresponding control period by timestamp; discrete action records in historical interaction data (such as signal timing adjustment amplitude and path guidance instructions) are converted into numerical vectors; and road segment traffic change data is standardized to the [0,1] interval to eliminate the dimensional differences between different dimensions of data. Feature splicing and time-series alignment techniques are used to achieve multi-source data fusion. Using the control period as the time unit, the joint reward value, agent action vector, and traffic change vector within the same period are spliced ​​into a multi-dimensional feature vector to ensure data consistency in the time dimension. The data is encapsulated according to the "state-action-reward-next state" (SARS) experience fragment structure: "state" is the initial road network feature of the fused period, "action" is the control action vector executed by the agent, "reward" is the joint reward value of the corresponding period, and "next state" is the road network feature after control. The encapsulated experience fragments are converted into standardized experience tuples of fixed dimensions. All tuples are integrated in chronological order to generate a set of standardized experience tuples for policy evaluation.

[0143] S612. Based on the standardized set of empirical tuples, perform long-term utility evaluation and gradient calculation of the strategy to obtain the parameter update direction and magnitude that guide the optimization of the strategy.

[0144] Optionally, the analysis can be conducted using a standardized set of experience tuples as the core input, combined with policy evaluation methods in reinforcement learning.

[0145] For example, the long-term utility of employing a temporal difference learning (TD-Learning) computational strategy: based on the reward value and next-state features in the empirical tuple, through the Bellman equation:

[0146] U(s) = r + γ・U(s')

[0147] Where U(s) is the utility of the current state, r is the immediate reward, γ is the discount factor, and U(s') is the utility of the next state; the long-term cumulative reward of the state corresponding to each empirical tuple is estimated iteratively to evaluate the regulatory effect of the strategy in the long-term dimension and avoid short-sighted decision-making caused by focusing only on immediate rewards;

[0148] With the goal of maximizing long-term utility, a policy loss function is constructed, such as the policy gradient loss function:

[0149] L(θ) =

[0150] Where θ is the policy function parameter. Let A(s,a) be the probability of choosing action a in state s, and let A(s,a) be the advantage function. The gradient of the loss function with respect to the policy function parameter θ is calculated using the backpropagation algorithm. The direction of the gradient is the direction in which the parameter needs to be adjusted, and the magnitude of the absolute value of the gradient corresponds to the magnitude of the parameter adjustment. Finally, the gradient is normalized, such as by using L2 normalization, to ensure the stability of the parameter update process and avoid gradient explosion or vanishing. The final result is the parameter update direction and magnitude that guide the policy optimization.

[0151] S613. Iteratively adjust the strategy function parameters according to the parameter update direction and magnitude to generate an optimized cooperative control strategy.

[0152] Optionally, a learning rate, such as 0.001-0.01, is set and dynamically adjusted according to the model's training convergence speed. The parameter update magnitude is multiplied by the learning rate to obtain the actual parameter adjustment amount. The parameters of the current policy function are iteratively adjusted according to the parameter update direction: if the gradient direction is positive, it indicates that increasing the parameter value can improve the long-term utility of the policy, so the parameter is increased by the adjustment amount; if the gradient direction is negative, the parameter is decreased by the adjustment amount. During the adjustment process, a momentum optimization algorithm is used to accelerate convergence, while parameter regularization constraints (such as L1 regularization) are introduced to avoid overfitting and ensure the generalization ability of the policy in different road network scenarios. After each parameter adjustment, the policy performance is evaluated using a validation set (empirical data that has not participated in training, partitioned from the standardized set of empirical tuples) (e.g., calculating the average long-term utility on the validation set). If the performance meets the preset convergence condition, such as the performance improvement being less than 0.1% for three consecutive iterations, the iteration is stopped; otherwise, the parameter adjustment and performance evaluation process is repeated until convergence, ultimately generating the optimized collaborative control policy.

[0153] S614. Based on dynamic road network map data, a dynamic traffic collaborative control instruction set is generated by calculating the dynamic road network map data through a collaborative control strategy.

[0154] Specifically, features from dynamic road network map data, such as road segment traffic and node congestion status, are input into the optimized collaborative control strategy. Based on multi-agent collaborative logic, the strategy assigns targeted control tasks to each independent agent: for example, for key road segments with signal control, it outputs signal timing adjustment instructions, such as increasing / decreasing the green light duration by seconds or adjusting the phase sequence; for key road segments with path guidance, it outputs guidance ratio adjustment instructions, such as guiding 20% ​​of the traffic flow to alternative road segments; for key road segments with variable lanes, it outputs lane function switching instructions, such as adjusting a straight lane to a left-turn lane.

[0155] Furthermore, the original control tasks output by the strategy are formatted and transformed into standardized instruction formats (such as JSON or XML) that conform to the communication protocols of traffic control equipment (such as traffic signals, variable message signs, and lane controllers). Finally, the standardized instructions are categorized and organized according to the control objects (key road sections corresponding to independent intelligent agents), and the execution time window (such as execution within the next 5-10 minutes) and priority of the instructions are marked to generate a dynamic traffic collaborative control instruction set, providing a feasible execution basis for the subsequent deployment of control instructions.

[0156] In the above embodiments, multi-source data fusion and experience encapsulation provide a standardized data foundation for strategy evaluation. Combined with long-term utility evaluation and gradient calculation, the direction of strategy optimization is clarified. Through iterative adjustment, a more adaptable collaborative control strategy is generated. Finally, based on dynamic road network data, an executable set of control instructions is output, realizing the transformation of the control strategy from "static and fixed" to "dynamic and collaborative". This ensures that the control instructions can accurately match the real-time status and future trends of the road network, significantly improving the timeliness and collaboration of traffic control, thereby effectively alleviating traffic congestion and improving the operational efficiency of the road network and the travel experience.

[0157] In one embodiment, such as Figure 7 As shown, the strategy function parameters are iteratively adjusted according to the parameter update direction and magnitude to generate an optimized cooperative control strategy, including:

[0158] S711. Perform weighted aggregation of parameter update direction and magnitude based on agent importance weights to generate a globally consistent parameter update vector.

[0159] Among them, the topological betweenness factor of key road segments reflects the intermediate frequency of the road segment in the traffic flow path of the road network, and the higher the betweenness factor, the greater the weight; the historical congestion contribution is the proportion of congestion duration and the number of road segments that cause congestion in the surrounding area, and the higher the contribution, the greater the weight; the real-time load rate is the ratio of the current traffic flow to the dynamic capacity threshold, and the higher the load rate, the greater the weight. First, the importance weight of the agent is calculated: combining the topological betweenness factor of key road segments, the historical congestion contribution, and the real-time load rate, the three-dimensional indicators are normalized to the [0,1] interval through the weighted summation formula: weight = 0.4 × topological betweenness factor + 0.3 × historical congestion contribution + 0.3 × real-time load rate, to obtain the importance weight of each independent agent.

[0160] Furthermore, for each parameter dimension, such as the weight matrix and bias term of the policy network, the parameter update magnitude corresponding to each agent is multiplied by its own importance weight to obtain a weighted update magnitude. At the same time, the consistency of the parameter update direction of each agent is preserved. If the update direction of most high-importance agents is consistent, then that direction is used as the global direction. Finally, the average of the weighted update magnitudes of all agents is calculated and integrated into a unified global parameter adjustment amount. Combined with the global update direction, a globally consistent parameter update vector matching the dimensions and policy function parameters is generated to ensure that parameter adjustment can prioritize the control needs of high-importance agents.

[0161] S712. Perform asynchronous incremental update calculation based on the global consistency parameter update vector and the parameters of the current policy function to obtain candidate values ​​for the next generation policy function parameters.

[0162] Optionally, the parameters of the current policy function can be decomposed into multiple parameter subsets by layer, such as the weights of convolutional layer 1, the weights of convolutional layer 2, the biases of fully connected layers, etc., with each subset corresponding to a sub-vector in the global consistency parameter update vector.

[0163] Furthermore, an asynchronous update mechanism is introduced: instead of waiting for all parameter subsets to complete the update simultaneously, the parameter subsets are sorted according to their computational complexity. For example, the fully connected layer parameters have a small computational cost and are updated first. Each parameter subset is incrementally calculated with its corresponding global update subvector. The update formula is "next generation parameter candidate value = current parameter value + learning rate × global update subvector". The learning rate (set to 0.001-0.01) is dynamically adjusted according to the sensitivity of the parameter subset. For example, a smaller learning rate is used for fully connected layer parameters that have a large impact on the policy output to ensure stability.

[0164] During the update process, a parameter locking mechanism is adopted: when a certain subset of parameters is being updated, other threads are temporarily blocked from calling that subset to avoid update conflicts; after all parameter subsets are updated, they are integrated to obtain the complete candidate values ​​of the next-generation strategy function parameters, balancing update efficiency and parameter consistency.

[0165] S713. Based on the candidate values ​​of the new generation policy function parameters, the policy performance is verified, and the verified candidate values ​​of parameters are updated to the current policy function to generate an optimized cooperative control policy.

[0166] Specifically, candidate parameter values ​​are loaded into the policy function to generate a temporary collaborative control policy. Simulation tests are conducted on a validation dataset: different traffic scenarios are simulated, such as morning rush hour congestion on main roads, road network traffic during severe weather, and sudden traffic surges caused by temporary events. The "state" information from the validation data is input to obtain the "actions" output by the temporary policy, and the policy performance indicators are calculated based on the "rewards" in the data. These indicators include the average joint reward value (reflecting the overall control effect; a higher value is better), policy stability (the coefficient of variation of reward values ​​under different scenarios; a lower value indicates greater stability), and congestion relief rate (after policy execution). The reduction rate of congestion time on key road sections is set, with higher values ​​being better. Next, performance thresholds are set (e.g., average joint reward value ≥ 0.85, coefficient of variation ≤ 0.15, congestion relief rate ≥ 20%). If the temporary strategy meets all threshold conditions, the parameter candidate value is deemed "verified". If not, the process backtracks to S711 to readjust the agent importance weights or learning rate, regenerates parameter candidate values, and verifies them. Finally, the verified parameter candidate values ​​are updated to the current policy function, overwriting the original parameters, generating an optimized cooperative control policy to ensure the effectiveness and stability of the policy in complex scenarios.

[0167] In the above embodiments, priority allocation of parameter updates is achieved through the importance weight of intelligent agents, and the efficiency of parameter optimization is improved by combining asynchronous incremental updates. The reliability of the strategy is ensured by relying on multi-scenario performance verification, ensuring that the optimized collaborative control strategy can prioritize the control needs of high-impact key road sections, while maintaining stable and efficient control performance under different traffic scenarios. This avoids global strategy fluctuations caused by the adjustment of a single parameter, thereby achieving the precision, dynamism and collaboration of traffic control strategies, significantly improving the road network's ability to cope with complex traffic conditions, reducing traffic congestion, and improving the road network's operating efficiency and travel experience.

[0168] The aforementioned intelligent traffic flow control methods, devices, and media effectively address the problems of static traffic models and fixed control strategies failing to adapt to dynamic changes in traffic flow in real time and having limited control effects. In the traffic flow prediction stage, real-time and historical traffic flow data and topology of the road network are acquired and spatiotemporal features are fused to generate dynamic road network graph data containing node and edge association features. This data is then combined with a pre-trained spatiotemporal fusion prediction model, which is initialized using a spatiotemporal graph convolutional network and incorporates a spatiotemporal attention mechanism. Spatiotemporal feature adaptive fusion is achieved through spatiotemporal dual-flow feature extraction and a dynamic routing algorithm. Furthermore, the prediction accuracy is significantly improved by using a prediction head with gated recurrent units and a multi-weighted spatiotemporal loss function. This model not only outputs prediction results for road segment flow, time series, and spatial distribution but also accurately identifies key road segments. For key road segments, an impact range analysis is performed by combining historical congestion patterns and real-time data to generate a spatiotemporal influence weight matrix and adaptively adjust the feature propagation intensity. The predicted values ​​for adjacent road segments are graded for correction and verification, further optimizing the future spatiotemporal distribution prediction results of the road network flow and ensuring that the prediction dynamically matches changes in the road network. In generating control strategies, key road sections with traffic exceeding the dynamic capacity threshold are set as independent intelligent agents. By calculating traffic delay values ​​and road network load balance and linearly weighting them, a joint reward value is generated. Then, based on a multi-agent learning algorithm, the set of independent intelligent agents is subjected to experience encapsulation, long-term utility evaluation, parameter iterative adjustment, and performance verification to generate a dynamic traffic collaborative control instruction set. This realizes the dynamic optimization and collaborative adaptation of control strategies, effectively improves the road network operation efficiency, enhances the travel experience, and breaks through the limitations of traditional static methods in complex traffic scenarios.

[0169] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0170] Based on the same inventive concept, this application also provides an apparatus for implementing the above-mentioned intelligent traffic flow control method for highways. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the intelligent traffic flow control apparatus provided below can be found in the limitations of the intelligent traffic flow control method for highways described above, and will not be repeated here.

[0171] In one exemplary embodiment, such as Figure 8 As shown, a smart traffic flow control device 10 for highways is provided, comprising:

[0172] The feature fusion module 11 is used to acquire real-time traffic flow data, historical traffic flow data and topology of the road network, and to perform spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data and topology of the road network to generate dynamic road network map data containing node and edge association features.

[0173] The preliminary traffic flow prediction module 12 is used to input dynamic road network map data into a pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments.

[0174] The weighted prediction module 13 is used to dynamically weight the key road segments in the preliminary prediction results and adjust the spatiotemporal impact weights of the key road segments on the surrounding road network to generate the spatiotemporal distribution prediction results of road network traffic in future periods; key road segments are road segments in the road network that have a significant impact on the overall traffic flow.

[0175] The independent intelligent agent identification module 14 is used to identify the corresponding key road segment as an independent intelligent agent when the traffic flow of the key road segment in the spatiotemporal distribution prediction result of the road network traffic exceeds the dynamic capacity threshold, and obtain a set of independent intelligent agents.

[0176] The traffic flow status quantification calculation module 15 is used to calculate the vehicle flow delay value and road network load balance of real-time traffic flow data and obtain preliminary calculation results.

[0177] The joint reward value calculation module 16 is used to linearly weight and fuse the preliminary calculation results according to preset weights to generate a joint reward value for evaluating the strategy.

[0178] The strategy optimization module 17 is used to optimize the strategy of the set of independent agents based on the joint reward value through a multi-agent learning algorithm, and generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy control instructions for highway traffic flow.

[0179] In one embodiment, the preliminary traffic prediction module further includes:

[0180] The graph convolutional basis model building unit is used to initialize and construct a spatiotemporal graph convolutional network based on historical traffic flow data and topology of the road network, generating a graph convolutional basis model that includes a spatiotemporal attention mechanism; the node feature update formula of the graph convolutional basis model is:

[0181]

[0182] in, For the first The hidden state of layer node i Let represent the set of neighboring nodes of node i. For spatiotemporal attention weights, For a trainable parameter matrix, Let j be the hidden state of node j at level l. The spatiotemporal feature fusion coefficients are represented by ⊙, which denotes the Hadamard product. For temporal convolution operators, Let be the historical time series data of node i, and σ(⋅) be the nonlinear activation function;

[0183] The spatiotemporal dual-stream feature extraction unit is used to extract spatiotemporal dual-stream features from the graph convolutional basis model. It generates time-sensitive features and spatially dependent features through dilated causal convolution in the time dimension and graph diffusion convolution in the spatial dimension, respectively.

[0184] The spatiotemporal joint representation vector generation unit is used to adaptively fuse time-sensitive features and spatially dependent features based on a dynamic routing algorithm to obtain a spatiotemporal joint representation vector; the iterative formula of the dynamic routing algorithm is:

[0185]

[0186] in, The spatiotemporal coupling coefficient is a characteristic of the system. The bias term between nodes i and j. This represents the bias term between node i and candidate node m. Here, K represents the modal alignment parameter at the k-th time step, where K is the number of time steps. and are the feature vectors of the time flow and the spatial flow, respectively, and C is all possible combinations of spatiotemporal features;

[0187] The pre-trained model generation unit is used to input the spatiotemporal joint representation vector into the prediction head with a gated recurrent unit, optimize the spatiotemporal loss function through end-to-end training, and generate a pre-trained spatiotemporal fusion prediction model; the spatiotemporal loss function is defined as:

[0188]

[0189] in, For the spatiotemporal loss function, To predict the flow matrix, For the real traffic matrix, Denotes the Frobenius norm. and These represent the predicted and actual changes in road segment traffic gradients, respectively. Let KL be the set of edges of the road network. ⋅) represents the KL divergence. and These are the spatial distribution probability and the topological prior distribution, respectively. , , These are the weighting coefficients for each type of loss.

[0190] In one embodiment, the weighted prediction module includes:

[0191] The dynamic critical road segment set generation unit is used to identify critical road segments in the road network topology based on historical congestion patterns and generate a dynamic critical road segment set.

[0192] The spatiotemporal influence weight matrix generation unit is used to analyze the influence range of a dynamic set of key road segments based on real-time traffic flow data and generate a spatiotemporal influence weight matrix.

[0193] The feature propagation intensity adjustment unit is used to adaptively adjust the feature propagation intensity of the spatiotemporal influence weight matrix based on the spatiotemporal influence weight matrix and with key road segments as attention centers, and generate the adjusted feature propagation intensity.

[0194] The adjacent road segment correction prediction value generation unit is used to correct the predicted value of road network traffic for adjacent road segments of key road segments based on the adjusted feature propagation intensity, and generate the adjacent road segment correction prediction value.

[0195] The network traffic spatiotemporal distribution prediction result generation unit is used to fuse the preliminary prediction results with the corrected prediction values ​​of adjacent road segments based on the spatiotemporal convolutional neural network to generate the network traffic spatiotemporal distribution prediction results for future periods.

[0196] In one embodiment, the adjacent road segment correction prediction value generation unit includes:

[0197] The sub-unit for generating the graded correction priority list is used to sort the influence intensity of adjacent road segments according to the spatiotemporal influence weight matrix and generate the graded correction priority list.

[0198] The multi-level correction coefficient matrix generation sub-unit is used to select differentiated correction strategies based on the hierarchical correction priority list and generate a multi-level correction coefficient matrix.

[0199] The preliminary revised prediction value generation sub-unit is used to perform hierarchical feature propagation correction on the preliminary prediction results through a spatiotemporal graph convolutional network to generate preliminary revised prediction values.

[0200] The correction verification result acquisition subunit is used to verify the correction result of the preliminary correction prediction based on real-time traffic flow data, and obtain the correction verification result.

[0201] The adjacent road segment correction prediction value adjustment subunit is used to adjust the preliminary correction prediction value according to the correction verification results and generate the adjacent road segment correction prediction value.

[0202] In one embodiment, the independent agent recognition module includes:

[0203] The dynamic capacity threshold set generation unit is used to dynamically adjust the capacity threshold of key road sections based on the prediction results of the spatiotemporal distribution of road network traffic, combined with real-time traffic flow data and historical traffic flow data, to obtain the adjusted dynamic capacity threshold set of key road sections.

[0204] The flow ratio set generation unit is used to calculate the ratio between the flow of key road segments and the adjusted dynamic capacity threshold based on the key road segment capacity threshold set, so as to obtain the flow ratio set of key road segments.

[0205] The independent intelligent agent set generation unit is used to identify key road segments in the traffic ratio set whose traffic ratio exceeds a preset ratio threshold as independent intelligent agents, thereby obtaining an independent intelligent agent set.

[0206] In one embodiment, the strategy optimization module includes:

[0207] The standardized experience tuple set generation unit is used to perform multi-source data fusion and experience fragment encapsulation based on the joint reward value and the historical interaction data of each independent agent to generate a standardized experience tuple set for policy evaluation.

[0208] The parameter update direction and magnitude acquisition unit is used to evaluate the long-term utility of the strategy and calculate the gradient based on the standardized set of empirical tuples, so as to obtain the parameter update direction and magnitude that guide the optimization of the strategy.

[0209] The cooperative control strategy generation unit is used to iteratively adjust the strategy function parameters according to the parameter update direction and magnitude to generate an optimized cooperative control strategy.

[0210] The dynamic traffic cooperative control instruction set generation unit is used to generate a dynamic traffic cooperative control instruction set based on dynamic road network map data and through cooperative control strategies.

[0211] In one embodiment, the collaborative control strategy generation unit includes:

[0212] The global consistency parameter update vector generation subunit is used to perform weighted aggregation of parameter update direction and magnitude based on agent importance weights to generate a global consistency parameter update vector.

[0213] The next-generation policy function parameter candidate value acquisition subunit is used to perform asynchronous incremental update calculation based on the global consistency parameter update vector and the parameters of the current policy function to obtain the next-generation policy function parameter candidate values;

[0214] The optimized cooperative control strategy generation sub-unit is used to verify the strategy performance based on the candidate values ​​of the next-generation strategy function parameters, update the verified candidate values ​​of parameters to the current strategy function, and generate the optimized cooperative control strategy.

[0215] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the aforementioned intelligent control method for highway traffic flow.

[0216] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0217] For the device embodiments, since they basically correspond to the method embodiments, the relevant details can be found in the descriptions of the method embodiments. The device embodiments described above are merely illustrative; components described as separate parts may or may not be physically separate, and components shown as units may or may not be physical units, meaning they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without any inventive effort.

[0218] The above embodiments merely illustrate several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the embodiments of this application, and these all fall within the protection scope of the embodiments of this application.

Claims

1. A method for intelligent regulation of highway traffic flow, characterized in that, The method includes: The system acquires real-time traffic flow data, historical traffic flow data, and topology of the road network, and performs spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data, and topology of the road network to generate dynamic road network map data containing node and edge association features. The dynamic road network map data is input into a pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments. The key road segments in the preliminary prediction results are dynamically weighted, and the spatiotemporal impact weights of the key road segments on the surrounding road network are adjusted to generate the spatiotemporal distribution prediction results of road network traffic in future time periods; the key road segments are those in the road network that have a significant impact on the overall traffic flow. When the traffic flow of the key road segment in the spatiotemporal distribution prediction result of the road network exceeds the dynamic capacity threshold, the corresponding key road segment is identified as an independent intelligent agent, and a set of independent intelligent agents is obtained. The traffic flow data is used to calculate the vehicle delay value and the road network load balance, and preliminary calculation results are obtained. The preliminary calculation results are linearly weighted and fused according to preset weights to generate a joint reward value for evaluating the strategy; Based on the joint reward value, the set of independent agents is optimized using a multi-agent learning algorithm to generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy traffic flow control instructions for highways.

2. The method of claim 1, wherein, The pre-trained spatiotemporal fusion prediction model is constructed using the following method: Based on the historical traffic flow data and topology of the road network, a spatiotemporal graph convolutional network is initialized and constructed, generating a graph convolutional base model that includes a spatiotemporal attention mechanism; the node feature update formula of the graph convolutional base model is: wherein, is the the hidden state of the is a set of neighbor nodes representing node i, is a spatio-temporal attention weight, is a trainable parameter matrix, is the hidden state of the is a spatio-temporal feature fusion coefficient, and denotes the Hadamard product, is a temporal convolution operator, is the historical time series data of node i, and σ(·) is a nonlinear activation function. Spatiotemporal dual-stream feature extraction is performed on the graph convolutional basis model, generating time-sensitive features and spatially dependent features through dilated causal convolution in the time dimension and graph diffusion convolution in the spatial dimension, respectively. The time-sensitive features and spatially dependent features are adaptively fused based on a dynamic routing algorithm to obtain a spatiotemporal joint representation vector; the iterative formula of the dynamic routing algorithm is: in, The spatiotemporal coupling coefficient is a characteristic of the system. The bias term between nodes i and j. This represents the bias term between node i and candidate node m. Here, K represents the modal alignment parameter at the k-th time step, where K is the number of time steps. and are the feature vectors of the time flow and the spatial flow, respectively, and C is all possible combinations of spatiotemporal features; The spatiotemporal joint representation vector is input into a prediction head with a gated recurrent unit, and the spatiotemporal loss function is optimized through end-to-end training to generate the pre-trained spatiotemporal fusion prediction model; the spatiotemporal loss function is defined as: in, For the spatiotemporal loss function, To predict the flow matrix, For the real traffic matrix, Denotes the Frobenius norm. and These represent the predicted and actual changes in road segment traffic gradients, respectively. Let KL be the set of edges of the road network. ⋅) represents the KL divergence. and These are the spatial distribution probability and the topological prior distribution, respectively. , , These are the weighting coefficients for each type of loss.

3. The method according to claim 1, characterized in that, The process of dynamically weighting the key road segments in the preliminary prediction results and adjusting the spatiotemporal impact weights of these key road segments on the surrounding road network to generate a future time period spatiotemporal distribution prediction result for road network traffic includes: Based on historical congestion patterns, key road segments are identified in the road network topology, and a dynamic set of key road segments is generated. Based on the real-time traffic flow data, the influence range of the dynamic key road segment set is analyzed, and a spatiotemporal influence weight matrix is ​​generated. Based on the spatiotemporal influence weight matrix, with the key road segment as the attention center, the feature propagation intensity of the spatiotemporal influence weight matrix is ​​adaptively adjusted to generate the adjusted feature propagation intensity. Based on the adjusted feature propagation intensity, the predicted value of the road network traffic of the adjacent road segments of the key road segment is corrected, and the corrected predicted value of the adjacent road segment is generated. The preliminary prediction results and the corrected prediction values ​​of adjacent road segments are fused using a spatiotemporal convolutional neural network to generate a spatiotemporal distribution prediction result for road network traffic in future time periods.

4. The method according to claim 3, characterized in that, The step of correcting the predicted network traffic for adjacent road segments based on the adjusted feature propagation intensity, and generating corrected predicted values ​​for adjacent road segments, includes: The influence intensity of the adjacent road segments is sorted according to the spatiotemporal influence weight matrix to generate a graded correction priority list; Based on the aforementioned hierarchical correction priority list, a differentiated correction strategy is selected to generate a multi-level correction coefficient matrix; The preliminary prediction results are corrected by hierarchical feature propagation through a spatiotemporal graph convolutional network to generate preliminary corrected prediction values. The correction results of the preliminary corrected prediction value are verified based on the real-time traffic flow data to obtain the correction verification results. Based on the correction verification results, the preliminary corrected prediction values ​​are adjusted accordingly to generate corrected prediction values ​​for adjacent road segments.

5. The method according to claim 1, characterized in that, When the traffic flow of a key road segment in the spatiotemporal distribution prediction result of the road network exceeds the dynamic capacity threshold, the corresponding key road segment is identified as an independent intelligent agent, resulting in a set of independent intelligent agents, including: Based on the predicted spatiotemporal distribution of road network traffic, combined with the real-time traffic flow data and the historical traffic flow data, the capacity threshold of the key road segments is dynamically adjusted to obtain the set of dynamic capacity thresholds for the key road segments after adjustment. Based on the set of capacity thresholds for key road segments, the ratio of the traffic flow of the key road segments to the adjusted dynamic capacity thresholds is calculated to obtain the set of traffic flow ratios for key road segments. Key road segments whose traffic ratios exceed a preset threshold in the traffic ratio set are identified as independent intelligent agents, thus obtaining a set of independent intelligent agents.

6. The method according to claim 1, characterized in that, The step of optimizing the policy of the set of independent agents based on the joint reward value and generating a dynamic traffic cooperative control instruction set includes: Based on the joint reward value and the historical interaction data of each independent agent, multi-source data fusion and experience fragment encapsulation are performed to generate a standardized set of experience tuples for policy evaluation. Based on the standardized set of empirical tuples, the long-term utility of the strategy is evaluated and gradients are calculated to obtain the parameter update direction and magnitude that guide the optimization of the strategy. Based on the update direction and magnitude of the parameters, the strategy function parameters are iteratively adjusted to generate an optimized collaborative control strategy; Based on the dynamic road network map data, the dynamic traffic collaborative control instruction set is generated by calculating the dynamic road network map data through the collaborative control strategy.

7. The method according to claim 6, characterized in that, The iterative adjustment of the strategy function parameters based on the parameter update direction and magnitude to generate an optimized cooperative control strategy includes: The parameter update direction and magnitude are weighted and aggregated based on the importance weight of the agent to generate a globally consistent parameter update vector; Asynchronous incremental update calculations are performed based on the global consistency parameter update vector and the parameters of the current policy function to obtain candidate values ​​for the next generation policy function parameters; Based on the candidate values ​​of the new generation strategy function parameters, the strategy performance is verified, and the verified candidate values ​​of the parameters are updated to the current strategy function to generate the optimized cooperative control strategy.

8. A smart traffic flow control device for highways, characterized in that, The device includes: The feature fusion module is used to acquire real-time traffic flow data, historical traffic flow data and topology of the road network, and to perform spatiotemporal feature fusion on the real-time traffic flow data, historical traffic flow data and topology of the road network to generate dynamic road network map data containing node and edge association features. The preliminary traffic flow prediction module is used to input the dynamic road network map data into a pre-trained spatiotemporal fusion prediction model to predict traffic flow and obtain preliminary prediction results. The preliminary prediction results include road segment traffic flow prediction, time series prediction, spatial distribution prediction, and key road segments. The weighted prediction module is used to dynamically weight the key road segments in the preliminary prediction results and adjust the spatiotemporal impact weights of the key road segments on the surrounding road network to generate the spatiotemporal distribution prediction results of road network traffic in future periods; the key road segments are road segments in the road network that have a significant impact on the overall traffic flow. The independent intelligent agent identification module is used to identify the corresponding key road segment as an independent intelligent agent when the traffic flow of the key road segment in the spatiotemporal distribution prediction result of the road network traffic exceeds the dynamic capacity threshold, thereby obtaining a set of independent intelligent agents. The traffic flow status quantification calculation module is used to calculate the vehicle flow delay value and road network load balance of the real-time traffic flow data to obtain preliminary calculation results; The joint reward value calculation module is used to linearly weight and fuse the preliminary calculation results according to preset weights to generate a joint reward value for evaluating the strategy. The strategy optimization module is used to optimize the strategy of the set of independent agents based on the joint reward value through a multi-agent learning algorithm, and generate a dynamic traffic cooperative control instruction set; the dynamic traffic cooperative control instruction set is used to deploy control instructions for highway traffic flow.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.