Traffic flow prediction method for new steady-state traffic
By introducing graph convolutional neural networks and continuous learning models into the traffic flow prediction model, the problems of scarcity and disproportionate distribution in new steady-state traffic are solved, and the ability to accurately predict traffic flow and adapt to traffic pattern changes is achieved.
Patent Information
- Application Number
- CN202510326433.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-06
AI Technical Summary
Traditional traffic flow prediction models are difficult to generalize under new steady-state traffic, and data is scarce and distribution is not adaptable, resulting in inaccurate prediction results.
The graph convolutional neural network is used to combine the continuous learning model, and the road network graph structure is constructed by acquiring and preprocessing historical traffic data, and a continuous learning model is equipped to optimize the loss function. The sliding window method is used to perform real-time data processing to output the final traffic flow prediction results.
It effectively solves the problems of data scarcity and distribution offset under the new steady state, realizes accurate prediction of traffic flow, and adapts to the gradual changes in traffic patterns.
Smart Images

Figure CN120108190A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of urban traffic technology, and in particular to a traffic flow prediction method for new steady-state traffic. Background Art
[0002] In urban traffic management, accurate traffic flow prediction is the key basis for achieving congestion relief and improving traffic efficiency, and is of vital importance to traffic management departments.
[0003] In recent years, major events, typified by the pandemic, have significantly changed the traffic patterns of road vehicles, including: Changes in travel starting and ending points. For example, people have changed their working methods due to the epidemic and more people are working from home, resulting in the starting point of commuting changing from the original concentrated residential area to the work area to from home to nearby temporary offices or directly at home.
[0004] Potential changes in vehicle-to-vehicle interaction logic, such as changes in vehicle spacing and driving speed to maintain social distance. When these changes gradually stabilize, a relatively fixed and sustained traffic state different from the past is formed, which is the new steady-state traffic.
[0005] This new steady-state traffic has new travel rules and vehicle operation characteristics, which are significantly different from the old steady-state traffic and bring new challenges to traffic flow prediction and management, which are mainly reflected in: 1. The old model has low generalization ability: When major events cause fundamental changes in traffic patterns, traditional prediction models are difficult to effectively generalize to new situations.
[0006] 2. Small data volume: Traffic data is scarce under the new steady state, which makes it difficult for traditional data-driven models to retrain prediction models that adapt to the new steady state, and is prone to overfitting or non-convergence risks.
[0007] 3. Data distribution is difficult to adapt to: The data obtained in real time under the new steady state is not the complete data of the road network. There are problems such as missing intersection data and missing roadside sensing equipment on newly built roads, which leads to incomplete prediction model data and inaccurate prediction results.
[0008] Therefore, it is necessary to study a method for accurately predicting traffic flow under the new steady state. Summary of the invention
[0009] In order to solve the above technical problems, the present invention provides a traffic flow prediction method for new steady-state traffic, the method comprising: S1, obtain and preprocess historical traffic data, and output the traffic flow information matrix containing each node and edge of the road network; S2. constructing a road network graph structure based on the traffic flow information matrix, and using a graph convolutional neural network to construct a traffic flow prediction model having the road network graph structure; S3. Based on the traffic flow prediction model, a continuous learning model is installed, and the elastic weight consolidation method in continuous learning is used to optimize the loss function to protect key parameters, while allowing some parameters to be updated; S4, determining a prediction strategy and a statistical scale, processing the real-time traffic flow data for prediction using a sliding window method according to the statistical scale, inputting the processed traffic flow data into the continuous learning model, and outputting the final prediction result after output dimension conversion and normalized data restoration; S5. Verify the credibility of the final prediction result to dynamically adjust the parameters of the continuous learning model.
[0010] Furthermore, the road network graph structure satisfies the expression: G=(V, E); wherein V is the node, the node is represented as an intersection, and E is the edge, the edge is represented as a road.
[0011] Further: The node includes traffic flow at the intersection; The edges contain road information between adjacent intersections.
[0012] Furthermore, the propagation method of the graph convolutional neural network described in S2 is Satisfies the expression:
[0013] In the formula, is a nonlinear activation function; is the degree matrix; ,in, An adjacency matrix representing the road network graph structure, is the identity matrix; The traffic flow information matrix input to the first layer of the graph convolutional neural network; is the corresponding weight.
[0014] Furthermore, the loss function optimized in S3 Satisfies the expression:
[0015] In the formula, Represents the original loss function of the current task; is the general coefficient; Represents the Fisher information matrix, which is used to measure the importance of parameters; Indicates the parameters currently to be learned; represents the parameters learned by the previous task.
[0016] Furthermore, the prediction strategy includes either prediction based on time series or prediction based on machine learning algorithms.
[0017] Furthermore, the statistical scale includes using the traffic flow data of the past rated time period as input to predict the traffic flow data of the future rated time period.
[0018] Furthermore, the real-time traffic flow data for prediction is processed using a sliding window method according to the statistical scale, including: The real-time traffic flow data is divided and sorted according to the rated time period to form a plurality of traffic flow data segments with the rated time period as a unit.
[0019] Furthermore, the S5 further includes: Calculating the residual standard deviation of the prediction result; The residual standard deviation is compared with a pre-calibrated threshold: When the residual standard deviation is less than the threshold, it is determined that the prediction result has a trustworthiness, and the prediction result can be used for coordinated control of traffic lights; When the residual standard deviation is greater than or equal to the threshold, it is determined that the prediction result has no trust, and the parameters of the continuous learning model are further adjusted.
[0020] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The present invention effectively solves the problems of data scarcity and distribution shift in the new steady state by integrating the continuous learning model with the graph convolutional neural network. It updates the model in real time through a sliding window to adapt to the gradual changes in traffic patterns. At the same time, it uses the graph reasoning ability of the graph convolutional neural network to estimate the flow of missing data or newly built roads, thereby realizing the reconstruction of traffic patterns due to major events and the accurate prediction of traffic flow when traditional prediction models fail in the new steady state. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 The present invention discloses a flowchart. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The present invention aims to provide a traffic flow prediction method for new steady-state traffic, which can solve the problem of traffic pattern reconstruction caused by major events and the failure of traditional prediction models in the new steady-state, and can be used to accurately predict traffic flow.
[0025] See also Figure 1 , mainly including the following steps: S1. Data acquisition and preprocessing Acquire and preprocess historical traffic data, and output a traffic flow information matrix containing each node and edge of the road network.
[0026] Specific: First, traffic-related data are collected from various data sources, such as historical traffic data and real-time traffic data, which include information such as vehicle driving trajectories and road network topology.
[0027] Next, the acquired data is preprocessed, including cleaning, deduplication, outlier processing and other steps to ensure the quality and consistency of the data, obtain high-quality traffic data, and provide a reliable data foundation for subsequent model training and prediction.
[0028] In the process of processing outliers, the data is normalized at the same time.
[0029] Finally, the output is a matrix containing the traffic flow information of each node and edge of the road network.
[0030] People skilled in the art further explain that a node represents an intersection, including the traffic flow at the intersection; an edge represents a road, including the road information between adjacent intersections.
[0031] S2. Historical Data Modeling The road network graph structure is constructed based on the traffic flow information matrix, and a traffic flow prediction model with a road network graph structure is constructed using a graph convolutional neural network.
[0032] Specific: First, a graph structure is constructed to represent the road network. Then, traffic flow information is used as the features of nodes and edges to represent the road network in the graph dimension containing topological structure information. Subsequently, a road network traffic flow prediction model is trained based on a graph convolutional neural network.
[0033] Among them, the road network graph structure satisfies the expression: G=(V, E); where V is a node, a node represents an intersection, and E is an edge, and an edge represents a road.
[0034] How graph convolutional neural networks spread Satisfies the expression:
[0035] In the formula, is a nonlinear activation function; is the degree matrix; ,in, The adjacency matrix representing the road network graph structure, is the identity matrix; Traffic flow information matrix input to the first layer of graph convolutional neural network; is the corresponding weight.
[0036] The road network is modeled through a multi-layer graph convolutional neural network, the characteristic representation of the road network is learned, and the state information of the road network is obtained. The purpose of this design is to establish an initial model containing historical traffic flow information through historical traffic data, providing a prerequisite for subsequent continuous learning.
[0037] S3. Continuous learning model construction Based on the traffic flow prediction model, a continuous learning model is installed, and the elastic weight consolidation method in continuous learning is used to optimize the loss function to protect key parameters, while allowing some parameters to be updated.
[0038] Those skilled in the art further explain that, based on the idea of continuous learning in the continuous learning model, the traffic flow prediction model constructed using the graph convolutional neural network is updated in combination with real-time traffic flow data.
[0039] By inputting real-time traffic flow data and using the elastic weight consolidation method in continuous learning, the importance of each neuron to the task is measured, and only some neurons or the connections between certain neurons are allowed to be plastic, while the remaining parameters are solidified, so as to achieve the purpose of continuous learning and maintain the accuracy and stability of the model.
[0040] In a further solution, the original loss function is modified and updated to the loss function shown in the following formula:
[0041] In the formula, is the optimized loss function; is the original loss function of the current task; is a general coefficient; Represents the parameters currently to be learned; Represents the parameters learned from the previous task; is an evaluation of the importance of each parameter; there are as many corresponding If a parameter is important, it should have a large , which can make important parameters fluctuate in a range as small as possible, preventing the model from making excessive changes and making the model forget the characteristics of historical traffic conditions.
[0042] In a further solution, the Fisher matrix is used to measure the importance of parameters and is continuously updated as tasks change. The optimized loss function Satisfies the following formula:
[0043] In the formula, Represents the original loss function of the current task; is the general coefficient; Represents the Fisher information matrix, which is used to measure the importance of parameters; Indicates the parameters currently to be learned; represents the parameters learned by the previous task.
[0044] In a further scheme, for the parameter , the calculation formula of Fisher information matrix is:
[0045] In the formula, Represents expectations.
[0046] As the model continues to learn and train new data, the importance parameters are constantly updated, allowing the model to protect the parameters containing the underlying traffic information while learning the underlying traffic flow information unique to the new steady state.
[0047] S4. Prediction result output Determine the prediction strategy and statistical scale, use the sliding window method to process the real-time traffic flow data used for prediction according to the statistical scale, input the processed traffic flow data into the continuous learning model, and output the final prediction result after output dimension conversion and normalized data restoration.
[0048] The prediction strategy includes either time series-based prediction or machine learning algorithm-based prediction.
[0049] The input and output traffic flow statistics scale includes using the traffic flow data of the past rated time period as input to predict the traffic flow data of the future rated time period. For example, using the traffic flow data of the past 15 minutes as input to predict the traffic flow data of the next 15 minutes, this clarifies the scope and granularity of the data in the time dimension, which facilitates the subsequent data processing and model operation.
[0050] The sliding window method divides and organizes the real-time traffic flow data according to the rated time period to form several traffic flow data segments with the rated time period as the unit. For example, the real-time data is divided and organized according to the 15-minute period to form a traffic flow data segment with 15 minutes as the unit. This is done to make the data conform to the format requirements of the model input, so that the model can analyze and learn the data.
[0051] Subsequently, the traffic flow data preprocessed by the sliding window method is input into the trained continuous learning model. Since the model may not meet the final requirements in terms of dimension and data format after calculating and analyzing the input data, it is necessary to perform output dimension conversion to convert the result into a suitable dimensional form.
[0052] Since the data may have been normalized during the model training process (i.e., the data was scaled to a specific range to facilitate model training), it is also necessary to normalize the data here and restore the data to its original actual numerical range to finally obtain the traffic flow prediction results for each intersection.
[0053] S5. Model evaluation and application The credibility of the final prediction results is verified to dynamically adjust the parameters of the continuous learning model.
[0054] In a further solution, the residual standard deviation of the prediction results is calculated; the residual standard deviation is compared with a pre-calibrated threshold: When the residual standard deviation is less than the threshold, the prediction result is deemed to be trustworthy and can be used for coordinated control of traffic lights; When the residual standard deviation is greater than or equal to the threshold, the prediction result is deemed to be untrustworthy and the parameters of the continuous learning model are further adjusted.
[0055] By continuously evaluating and monitoring the performance of the model, the model's predictive capabilities can be continuously improved, thereby better supporting and guiding traffic management.
[0056] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A traffic flow prediction method for new steady-state traffic, characterized in that: The method comprises: S1, obtain and preprocess historical traffic data, and output the traffic flow information matrix containing each node and edge of the road network; S2. constructing a road network graph structure based on the traffic flow information matrix, and using a graph convolutional neural network to construct a traffic flow prediction model having the road network graph structure; S3. Based on the traffic flow prediction model, a continuous learning model is installed, and the elastic weight consolidation method in continuous learning is used to optimize the loss function to protect key parameters, while allowing some parameters to be updated; S4, determining a prediction strategy and a statistical scale, processing the real-time traffic flow data for prediction using a sliding window method according to the statistical scale, inputting the processed traffic flow data into the continuous learning model, and outputting the final prediction result after output dimension conversion and normalized data restoration; S5. Verify the credibility of the final prediction result to dynamically adjust the parameters of the continuous learning model.
2. The traffic flow prediction method for new steady-state traffic according to claim 1, characterized in that: The road network graph structure satisfies the expression: G=(V, E); wherein V is the node, the node is represented as an intersection, and E is the edge, the edge is represented as a road.
3. The traffic flow prediction method for new steady-state traffic according to claim 1 or 2, characterized in that: The node includes traffic flow at the intersection; The edges contain road information between adjacent intersections.
4. The traffic flow prediction method for new steady-state traffic according to claim 1, characterized in that: The propagation method of the graph convolutional neural network described in S2 Satisfies the expression: In the formula, is a nonlinear activation function; is the degree matrix; ,in, An adjacency matrix representing the road network graph structure, is the identity matrix; The traffic flow information matrix input to the first layer of the graph convolutional neural network; is the corresponding weight.
5. The traffic flow prediction method for new steady-state traffic according to claim 1, characterized in that: The optimized loss function in S3 Satisfies the expression: In the formula, Represents the original loss function of the current task; is the general coefficient; Represents the Fisher information matrix, which is used to measure the importance of parameters; Indicates the parameters currently to be learned; represents the parameters learned by the previous task.
6. The traffic flow prediction method for new steady-state traffic according to claim 1, characterized in that: The prediction strategy includes either prediction based on time series or prediction based on machine learning algorithms.
7. The traffic flow prediction method for new steady-state traffic according to claim 1 or 6, characterized in that: The statistical measure includes taking the traffic flow data of the past rated time period as input to predict the traffic flow data of the future rated time period.
8. The traffic flow prediction method for new steady-state traffic according to claim 7, characterized in that: The method of processing the real-time traffic flow data for prediction using a sliding window method according to the statistical scale includes: The real-time traffic flow data is divided and sorted according to the rated time period to form a plurality of traffic flow data segments with the rated time period as a unit.
9. The traffic flow prediction method for new steady-state traffic according to claim 1, characterized in that: The S5 further includes: Calculating the residual standard deviation of the prediction result; The residual standard deviation is compared with a pre-calibrated threshold: When the residual standard deviation is less than the threshold, it is determined that the prediction result has a trustworthiness, and the prediction result can be used for coordinated control of traffic lights; When the residual standard deviation is greater than or equal to the threshold, it is determined that the prediction result has no trust, and the parameters of the continuous learning model are further adjusted.