Traffic data prediction method of space-time diagram network based on sustainable learning

By introducing a sustainable learning mechanism and a spatiotemporal graph network into the traffic data prediction model, combined with representative traffic pattern clustering and matching theory, the problem that existing models are difficult to adapt to the dynamic changes of the traffic network is solved, and more efficient and accurate traffic flow prediction is achieved.

CN120236399AActive Publication Date: 2025-07-01北京市通州区大数据中心 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510346176.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-01
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing traffic flow prediction model is difficult to adapt to the dynamic changes of the traffic network and cannot effectively capture the spatial and temporal correlation, resulting in poor prediction results and catastrophic forgetting problems.

Method used

A traffic data prediction method based on a space-time graph network based on sustainable learning is proposed. Through representative traffic pattern clustering and matching theory, the generation process of spatiotemporal data is modeled, combined with model expansion, consolidation and traceability mechanisms, the knowledge base and spatiotemporal learning model are updated to achieve rapid update and efficient prediction of the model.

Benefits of technology

It improves the accuracy, robustness and generalization of the traffic data prediction model, can better adapt to the dynamic changes of traffic patterns, reduces the calculation and time cost of model updates, and avoids catastrophic forgetting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236399A_ABST
    Figure CN120236399A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic data prediction method of a space-time diagram network based on sustainable learning, which belongs to the technical field of space-time data mining, and is characterized in that the precision, robustness and generalization of a traffic data prediction model are effectively improved based on a representative traffic mode clustering and matching theory modeling space-time data generation process; according to the method, the representative mode of the vehicle flow data is extracted while the space-time characteristics of the vehicle flow data are captured, and a knowledge base is formed, so that the method better adapts to the dynamic change characteristics of traffic modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spatio-temporal data mining, and particularly relates to a traffic data prediction method based on a spatio-temporal graph network for sustainable learning. Background Art

[0002] Traffic data not only reflects the dynamic changes of urban operation, but also reveals the potential laws behind the traffic system. Mining valuable information from traffic data and exploring the implicit spatio-temporal dependence relationships therein contribute to a deep understanding and prediction of various urban phenomena. These research results can not only optimize the travel experience of residents, but also be widely applied in the fields of intelligent transportation, urban planning, public safety, environmental monitoring, etc., providing important support for building a more intelligent urban ecosystem.

[0003] In current research, most traffic flow prediction methods model the spatio-temporal correlation between traffic nodes through graph neural networks (GNNs) and have achieved good prediction results to a certain extent. These models usually rely on stable and uniformly distributed data sets, so they tend to capture homogeneous spatio-temporal dependence relationships in static networks. However, with the continuous expansion of urban road scales and the update and iteration of traffic infrastructure, the topological structure of the traffic network is also constantly changing. The addition of new nodes and the removal of old nodes cause the underlying structure of the graph to continuously evolve. In addition, the distribution of traffic flow also exhibits time-dependent characteristics, that is, in different time periods, the patterns and intensities of traffic flow will be different. This spatio-temporal correlation is crucial for understanding and predicting traffic flow. Although GCN performs well on static graph structures, its ability to process dynamic graph structures and capture spatio-temporal correlations is limited. This is because once the parameters of the GCN model are set, it is difficult to adapt and update when facing new graph structures, resulting in a decline in model performance. Existing models generally fail to fully consider the spatio-temporal dynamics of traffic data, which limits the accuracy of the models in practical applications and causes a large consumption of computing resources when the models are updated. Therefore, there is an urgent need in the research field to develop a new model that can adapt to the dynamic changes of traffic patterns and support continuous learning to improve the prediction accuracy and the practicality of the models.

[0004] Continual learning is an emerging technology that can complete tasks by effectively adapting to newly acquired knowledge without forgetting what has been learned. As an advanced machine learning strategy, continual learning allows the model to retain the memory of historical data while continuously absorbing new information, thus overcoming the catastrophic forgetting problem common in traditional learning paradigms. By seeking a balance between the plasticity and stability of the model, this method enables the model to flexibly adapt to new data distributions while maintaining mastery of old knowledge. In the field of graph learning, ER-GNN and Feature-Graph developed a continuous GNN model based on the experience replay strategy. This model can access historical graph data from previous tasks to review previous experiences. To reduce the computational and storage pressure brought by storing historical data, SGNN-GR uses a generator to learn the distribution of historical graph data and generate synthetic historical nodes with the same distribution characteristics. Then, the distribution characteristics of these nodes are replayed in the next task. However, when both the nodes and the traffic patterns of the road network structure evolve simultaneously, the above models cannot effectively update the traffic flow prediction model to cope with this change. To achieve continuous traffic flow prediction, some scholars proposed TrafficStream, a deep learning framework based on the historical data replay strategy, which can basically achieve this goal. Although it uses evolutionary pattern detection, which is beneficial for identifying the transfer of points of interest (POIs) so that the model can selectively choose nodes with significant changes for learning, it fails to deeply explore the role of pattern matching in the stability of continual learning and only uses it as a tool to reduce the time complexity, without achieving more improvement in prediction accuracy.

[0005] Solving the traffic flow prediction problem by combining pattern clustering and continual learning can effectively address the challenges of the dynamic traffic environment. Due to the complex and variable spatio-temporal characteristics of traffic flow data, applying pattern clustering and continual learning to the traffic flow prediction task faces the following two challenges: (1) Extracting representative patterns. There are potential data patterns in traffic patterns, and it is crucial to discover and utilize these patterns to assist model prediction. Extracting representative patterns from traffic data can improve computational efficiency and reduce the impact of noise. (2) Avoiding catastrophic forgetting. Streaming data makes traffic patterns and topological structures change dynamically. It is crucial to make the update effect of representative patterns better and avoid catastrophic forgetting. However, existing methods cannot adapt to the dynamically changing traffic network, cannot learn new traffic patterns, and have poor prediction effects. When updating the model, the problem of catastrophic forgetting will occur, that is, the prediction effect on the original task will deteriorate. Therefore, an algorithm for quickly updating the model is needed to avoid the occurrence of catastrophic forgetting. Summary of the Invention

[0006] In view of the above problems, the present invention proposes a traffic data prediction method based on a spatio-temporal graph network for sustainable learning, which models the generation process of spatio-temporal data based on representative traffic pattern clustering and matching theory, effectively improving the accuracy, robustness, and generalization of the traffic data prediction model.

[0007] The present invention provides a traffic data prediction method based on a spatio-temporal graph network for sustainable learning, including:

[0008] Step S1: Collect historical vehicle flow data of each node in the road network;

[0009] Step S2: Build an initial spatio-temporal graph network for continuous learning based on the road network; determine the representative pattern set of each node in the spatio-temporal graph network for continuous learning based on the historical vehicle flow data of each node, and obtain the spatio-temporal graph network for continuous learning, which is characterized as a knowledge base;

[0010] Build a spatio-temporal learning model;

[0011] Step S3: Build a traffic data prediction model using the spatio-temporal learning model and the knowledge base;

[0012] Step S4: Let i = 1. When i = 1, it represents the first node in the τ-th historical year of the road network;

[0013] Step S5: Let τ = 1. When τ = 1, it represents the first historical year of node i;

[0014] Step S6: Let t = 1. When t = 1, it represents the initial historical time period traffic pattern of node i in the τ-th historical year;

[0015] Step S7: Obtain the vehicle flow data of node i in the t-th historical time period of the τ-th year Input the traffic data into the prediction model

[0016] Step S8: Based on the spatio-temporal learning model Obtain the spatio-temporal features of the traffic flow data of node i in the t-th historical time period of the τ-th year

[0017] Step S9: Obtain the knowledge base M τ The representative traffic pattern set P in the τ-th year τ ;

[0018] Based on the representative traffic pattern set P in the τ-th year τ Match the vehicle flow data of node i in the t-th historical time period of the τ-th year To obtain the matching traffic pattern of node i in the t-th historical time period of the τ-th year;

[0019] Step S10: Obtain the spatio-temporal characteristics of the vehicle flow data of node i in the t-th historical time period of the τ-th year and the representative traffic pattern set P of the τ-th year τ the cosine similarity P of each representative traffic pattern in τ,i,t ; Based on the cosine similarity P τ,i,t and the representative traffic pattern set P of the τ-th year τ , obtain the corresponding feature matrix

[0020] Step S11: Perform residual connection on the feature matrix and the spatio-temporal characteristics , input it into the fully connected layer, and output the traffic prediction data of node i in the t-th historical time period of the τ-th year;

[0021] Step S12: Traverse T historical time periods to obtain the matching traffic patterns of node i in each historical time period of the τ-th year and the traffic prediction data of node i in each historical time period of the τ-th year;

[0022] Based on the traffic prediction data of node i in each historical time period of the τ-th year and the loss function, update the spatio-temporal learning model to obtain the updated spatio-temporal learning model B' τ,i ;

[0023] Step S13: Input the matching traffic patterns of node i in each historical time period of the τ-th year into the knowledge base C τ,i , and update it based on the knowledge preservation mechanism and the pattern traceability mechanism to obtain the updated knowledge base C' τ,i ;

[0024] Step S14: Based on the updated spatio-temporal learning model B' τ,i and the updated knowledge base C' τ,i , obtain the updated traffic data prediction model A' τ,i ;

[0025] Step S15: Traverse Z historical years to obtain the updated traffic data prediction model A' i ;

[0026] Step S16: Traverse I nodes to obtain the final traffic data prediction model;

[0027] Step S17: Use the final traffic data prediction model to predict vehicle flow.

[0028] Optionally, the specific steps of determining the representative pattern set of each node in the spatio-temporal graph network based on continual learning in step S2 include:

[0029] Obtain the nodes in the road network; count the multiple historical vehicle flow data of each node in the τ-th historical year;

[0030] Obtain the daily average vehicle flow data of each node in the τ-th historical year;

[0031] Set the time interval;

[0032] According to the time interval, count the daily average vehicle flow data of each node in the τ-th historical year;

[0033] Set the slicing interval, slice the daily average vehicle flow data of each node in the τ-th historical year according to the slicing time interval to obtain multiple sliced data of each node in the τ-th historical year, aggregate the vehicle flow data corresponding to the multiple sliced data of each node in the τ-th historical year to obtain the aggregated vehicle flow data of each node in the τ-th historical year, which is characterized as multiple traffic patterns of each node in the τ-th historical year, and establish the original traffic pattern set of each node in the τ-th historical year;

[0034] Adopt cluster-based downsampling to extract the representative traffic patterns in the original traffic pattern set of each node in the τ-th historical year to obtain multiple representative traffic patterns of each node in the τ-th historical year, and establish the representative traffic pattern set of each node in the τ-th year; τ = 1, 2, 3... Z, where Z represents the total number of historical years;

[0035] Traverse Z historical years to obtain the representative traffic pattern sets of each node in each historical year.

[0036] Optionally, the spatio-temporal learning model includes a spatio-temporal learning module one and a spatio-temporal learning module two;

[0037] Both the spatio-temporal learning module one and the spatio-temporal learning module two include a spatial processing module GCN and a temporal processing module TCN.

[0038] Optionally, the expression of the spatio-temporal learning model is:

[0039]

[0040] Wherein, is the input of the (l - 1)-th layer spatial processing module GCN in the (τ - 1)-th year, is the input of the l-th layer spatial processing module GCN in the τ-th year, is the learnable parameter of the l-th layer spatial processing module GCN in the τ-th year, A τ is the critical matrix in the τ-th year, I τ is the identity matrix in the τ-th year, and D is the degree matrix.

[0041] Optionally, the specific steps of obtaining the matching traffic pattern of node i in the t-th historical time period in the τ-th year in step S9 include;

[0042] Based on obtaining the vehicle flow data of node i in the t-th historical time period of the τ-th year and the set of representative traffic patterns P in the τ-th year τ calculate the cosine similarity of each representative traffic pattern in the set, perform redundancy filtering, obtain the corresponding similarity matrix, and select the representative traffic pattern corresponding to the maximum similarity as the corresponding matching traffic pattern.

[0043] Optionally, the corresponding feature matrix has the following expression:

[0044]

[0045] where P τ,i,t (k) represents the cosine similarity between the spatio-temporal characteristics of the traffic flow data of node i in the t-th historical time period of the τ-th year and the k-th representative traffic pattern in the τ-th year, and M τ (k) represents the k-th representative traffic pattern in the τ-th year, and K represents the total number of representative traffic patterns.

[0046] Optionally, the specific steps of obtaining the updated knowledge base C′ described in step 13 τ,i are as follows:

[0047] Step S131: Determine whether there is historical vehicle flow data of node i in the (τ - 1)-th year. If not, node i is a newly added node, and go to step S133; if yes, go to the next step;

[0048] Step S132: Determine whether there are significant changes in the matching traffic patterns of node i in each historical time period of the τ-th year. If so, go to the next step; if not, let τ = τ + 1, and return to step S6;

[0049] Step S133: Use the matching traffic patterns of node i in each historical time period of the τ-th year to update the knowledge base and obtain the updated knowledge base.

[0050] Optionally, the specific steps of determining whether there are significant changes in the traffic pattern of node i in the τ-th year include:

[0051] Respectively obtain the probability distributions and probability distribution

[0052] of the vehicle flow of node i in each historical time period of the (τ - 1)-th year and the τ-th year and probability distribution Calculate the Wasserstein distance between them. If the Wasserstein distance is small, the distribution difference is small, indicating that there are no significant changes in the traffic pattern of node i in the τ-th year;

[0053] If the Wasserstein distance is large, the distribution difference is large, indicating that the traffic pattern of node i has changed significantly in the τ-th year, and node i is regarded as a conflict node.

[0054] Optionally, obtaining the probability distributions of the vehicle flow volumes of node i in each historical time period in the (τ - 1)-th year and the τ-th year and the probability distribution The specific steps include:

[0055] Collect the daily average vehicle flow volume data of node i in the (τ - 1)-th year and the τ-th year respectively;

[0056] Obtain the total vehicle flow volume data of node i throughout the day in the (τ - 1)-th year and the τ-th year respectively;

[0057] Obtain the probability distribution of the vehicle flow volume data of node i in the t-th historical time period in the (τ - 1)-th year in the corresponding total vehicle flow volume data throughout the day

[0058] Obtain the vehicle flow volume data of node i in the t-th historical time period in the τ-th year in the probability distribution of the corresponding total vehicle flow volume data throughout the day

[0059] Optionally, the expression of the knowledge preservation mechanism is:

[0060] L s = λvec(θ τ-1 - θ τ ) Τ Ωvec(θ τ-1 - θ τ )

[0061] where λ is a balancing factor, a hyperparameter, θ τ-1 represents all the parameters of the traffic prediction model F τ-1 ; vec(.) represents an operation function, Ω represents the Fisher information, and θ τ represents all the parameters of the traffic prediction model F τ .

[0062] Compared with the prior art, the present invention has at least the following beneficial effects:

[0063] (1) While capturing the spatio-temporal characteristics of the vehicle flow volume data, the present invention extracts the representative patterns of the vehicle flow volume data and forms a knowledge base, which better adapts to the dynamic change characteristics of the traffic pattern;

[0064] (2) The present invention designs a continuous learning algorithm based on a pattern expansion mechanism, a pattern consolidation mechanism, and a pattern traceability mechanism; the pattern expansion mechanism selects newly added nodes and nodes with large differences in traffic patterns to update the knowledge base, the pattern consolidation mechanism consolidates the learned knowledge by specifying the initial weights of the model and restricting the update ability of important parameters, and the pattern traceability mechanism trains the knowledge base by selecting relatively stable traffic pattern nodes to form a subgraph to consolidate the learned traffic patterns;

[0065] (3) In the present invention, nodes representing new traffic patterns and historical stable nodes are fine-tuned, and constraint smoothing is introduced in parameter update, reducing the computational and time costs of updating the traffic data prediction model while maintaining the sensitivity of the traffic data prediction model to historical data. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The drawings are only for the purpose of showing specific embodiments and are not considered to be a limitation of the present invention.

[0067] Figure 1 It is a schematic diagram of the flowchart of the traffic data prediction model in the embodiment of the present invention;

[0068] Figure 2 It is a schematic diagram of the spatio-temporal graph network based on continuous learning in the embodiment of the present invention;

[0069] Figure 3 It is a schematic diagram of an example of a traffic pattern in the embodiment of the present invention;

[0070] Figure 4 It is a schematic diagram of the operation of the gated time series layer in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0071] In order to more clearly understand the above objects, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0072] A specific embodiment of the present invention, as Figures 1-4 , discloses a traffic data prediction method based on a spatio-temporal graph network for sustainable learning, and the specific implementation steps are as follows:

[0073] Step S1, collect historical vehicle flow data of each node in the road network;

[0074] Exemplarily, the node is an intersection or a connection point in the road network;

[0075] The node is an intersection, a crossroads, an overpass or a roundabout;

[0076] Step S2: Build an initial spatio-temporal graph network based on continuous learning based on the road network; determine the representative pattern set of each node in the spatio-temporal graph network based on continuous learning based on the historical vehicle flow data of each node, and obtain the spatio-temporal graph network based on continuous learning, which is characterized as a knowledge base;

[0077] Build a spatio-temporal learning model;

[0078] Optionally, the specific steps of determining the representative pattern set of each node in the spatio-temporal graph network based on continuous learning in step S2 include:

[0079] Obtain the nodes in the road network; count the multiple historical vehicle flow data of each node in the τ-th historical year;

[0080] Obtain the daily average vehicle flow data of each node in the τ-th historical year; the input format is a three-dimensional array of B*T*N, where B represents the data batch, T represents the time series length, N represents the node number, and each data represents the traffic flow of this node at this time step within this data batch;

[0081] Set the time interval;

[0082] According to the time interval, count the daily average vehicle flow data of each node in the τ-th historical year;

[0083] Set the slicing interval, slice the daily average vehicle flow data of each node in the τ-th historical year according to the slicing time interval, obtain multiple sliced data of each node in the τ-th historical year, aggregate the vehicle flow data corresponding to the multiple sliced data of each node in the τ-th historical year, obtain the aggregated vehicle flow data of each node in the τ-th historical year, which is characterized as multiple traffic patterns of each node in the τ-th historical year, and establish the original traffic pattern set of each node in the τ-th historical year;

[0084] Adopt cluster-based downsampling to extract the representative traffic patterns in the original traffic pattern set of each node in the τ-th historical year, obtain multiple representative traffic patterns of each node in the τ-th historical year, and establish the representative traffic pattern set of each node in the τ-th year; τ = 1, 2, 3... Z, where Z represents the total number of historical years;

[0085] Traverse Z historical years to obtain the representative traffic pattern sets of each node in each historical year.

[0086] Preferably, the specific steps of adopting cluster-based downsampling to extract the representative traffic patterns in the original traffic pattern set of each node in the τ-th year include:

[0087] The K-means algorithm is selected to operate on the original traffic pattern set of each node in the τ-th year, and each cluster center is regarded as a representative pattern, so as to obtain the representative traffic pattern set of each node in the τ-th year.

[0088] Step S3: Build a traffic data prediction model by using the spatio-temporal learning model and the knowledge base;

[0089] Optionally, the spatio-temporal learning model includes a spatio-temporal learning module one and a spatio-temporal learning module two;

[0090] Both the spatio-temporal learning module one and the spatio-temporal learning module two include a spatial processing module GCN and a temporal processing module TCN;

[0091] Step S4: Let i = 1. When i = 1, it represents the first node in the τ-th historical year of the road network;

[0092] Step S5: Let τ = 1. When τ = 1, it represents the node i in the first historical year;

[0093] Step S6: Let t = 1. When t = 1, it represents the initial historical time period traffic pattern of the node i in the τ-th historical year;

[0094] Step S7: Obtain the vehicle flow data of the node i in the t-th historical time period of the τ-th year Input the traffic data into the prediction model

[0095] Step S8: Based on the spatio-temporal learning model Obtain the spatio-temporal characteristics of the traffic flow data of the node i in the t-th historical time period of the τ-th year

[0096] Optionally, the expression of the spatio-temporal learning model is:

[0097]

[0098] Among them, is the input of the (l-1)-th layer spatial processing module GCN in the (τ-1)-th year, is the input of the l-th layer spatial processing module GCN in the τ-th year, is the learnable parameter of the l-th layer spatial processing module GCN in the τ-th year, A τ is the critical matrix in the τ-th year, I τ is the corresponding identity matrix, and D is the degree matrix.

[0099] Furthermore, As the output of the spatial processing module GCN and used as the input of the gated temporal layer to capture temporal correlations, the gated temporal layer in the present invention can dynamically process the temporal dependencies in the sequence data, that is, the data at subsequent time points will be affected by the data at previous time points, ensuring that the spatio-temporal learning model does not utilize future information when processing the current data, thus partially avoiding the problem of causal relationship confusion in time series analysis.

[0100] Step S9: Obtain the knowledge base M τ The representative traffic pattern set P in the τ-th year τ ;

[0101] Based on the representative traffic pattern set P in the τ-th year τ For the vehicle flow data of node i in the t-th historical time period in the τ-th year Perform traffic pattern matching to obtain the matching traffic pattern of node i in the t-th historical time period in the τ-th year;

[0102] Optionally, the specific steps of obtaining the matching traffic pattern of node i in the t-th historical time period in the τ-th year in step S9 include;

[0103] Based on obtaining the vehicle flow data of node i in the t-th historical time period in the τ-th year And the representative traffic pattern set P in the τ-th year τ Calculate the cosine similarity with each representative traffic pattern in it, and perform redundancy filtering to obtain the corresponding similarity matrix, and select the representative traffic pattern corresponding to the maximum similarity as the corresponding matching traffic pattern.

[0104] Step S10: Obtain the spatio-temporal features of the vehicle flow data of node i in the t-th historical time period in the τ-th year Calculate the cosine similarity P τ With each representative traffic pattern in the representative traffic pattern set P in the τ-th year τ,i,t , to obtain the corresponding cosine similarity attention score matrix P' τ,i,t ;

[0105] Based on the cosine similarity P τ,i,t And the representative traffic pattern set P in the τ-th year τ , obtain the corresponding feature matrix The expression is:

[0106]

[0107] Where P τ,i,t (k) represents the cosine similarity between the spatio-temporal features of the traffic flow data of node i in the t-th historical time period in the τ-th year and the k-th representative traffic pattern in the τ-th year, M τ(k) represents the k-th representative traffic pattern in the τ-th year, and K represents the total number of representative traffic patterns.

[0108] Optionally, the probability distribution of obtaining the vehicle flow data of node i in each historical time period of each day in the (τ - 1)-th year described in step S10 The specific steps include:

[0109] Obtain the total vehicle flow data of node i on each day in the (τ - 1)-th year respectively;

[0110] Calculate the proportion of the vehicle flow data of node i in each historical time period of each day in the total vehicle flow data of the corresponding day in the (τ - 1)-th year to obtain the probability distribution

[0111] Optionally, the expression of the cosine similarity of each representative traffic pattern is:

[0112]

[0113] where M τ (k) is the k-th representative traffic pattern in the τ-th year, and P τ,i,t (k) is the k-th representative traffic pattern corresponding to node i in the t-th historical time period in the τ-th year, is the spatio-temporal feature of node i in the t-th historical time period in the τ-th year, and D is the dimension of the representative traffic pattern.

[0114] Step S11: Residually connect the feature matrix with the spatio-temporal feature and input it into the fully connected layer to output the traffic prediction data of node i in the t-th historical time period in the τ-th year;

[0115] Step S12: Traverse T historical time periods to obtain the matching traffic patterns of node i in each historical time period in the τ-th year and the traffic prediction data of node i in each historical time period in the τ-th year;

[0116] Based on the traffic prediction data of node i in each historical time period in the τ-th year and the loss function, update the spatio-temporal learning model to obtain the updated spatio-temporal learning model B′ τ,i ;

[0117] Step S13: Input the matching traffic patterns of node i in each historical time period in the τ-th year into the knowledge base C τ,i , and update it based on the knowledge preservation mechanism and the pattern traceability mechanism to obtain the updated knowledge base C′ τ,i ;

[0118] Optionally, select the 5% of the nodes with the lowest Wasserstein distance as stable nodes, which reduces the computational complexity, saves time and space resources, and reduces the interference of abnormal data.

[0119] Optionally, the specific steps for obtaining the updated knowledge base C′ described in step 13 τ,i are as follows:

[0120] Step S131: Determine whether there is historical vehicle flow data for node i in the (τ - 1)-th year. If not, node i is a newly added node, and go to step S133; if so, go to the next step;

[0121] Step S132: Determine whether the matching traffic patterns of node i in each historical time period in the τ-th year have changed significantly. If so, go to the next step; if not, let τ = τ + 1, and return to step S6;

[0122] Step S133: Utilize the matching traffic patterns of node i in each historical time period in the τ-th year, and update the knowledge base to obtain the updated knowledge base;

[0123] Furthermore, the specific steps for determining whether the traffic pattern of node i in the τ-th year has changed significantly include:

[0124] Obtain the probability distributions and probability distribution

[0125] of the vehicle flows of node i in each historical time period in the (τ - 1)-th year and the τ-th year respectively and probability distribution Obtain the Wasserstein distance between the probability distributions

[0126] If the Wasserstein distance is small, the distribution difference is small, indicating that the traffic pattern of node i in the τ-th year has not changed significantly;

[0127] If the Wasserstein distance is large, the distribution difference is large, indicating that the traffic pattern of node i in the τ-th year has changed significantly, and node i is regarded as a conflict node;

[0127] Sort the Wasserstein distances between the probability distributions and probability distribution from small to large, select the top 5% of the nodes corresponding to the lowest Wasserstein distances as stable nodes, and use the corresponding stable nodes to train the knowledge base to reduce the computational complexity, save time and space resources, and reduce the interference of abnormal data.

[0128] Furthermore, obtain the probability distributions and probability distribution The specific steps include:

[0129] Collect the daily average vehicle flow data of node i in the (τ - 1)-th year and the τ-th year respectively;

[0130] Obtain the total vehicle flow data of node i in the whole day in the (τ - 1)-th year and the τ-th year respectively;

[0131] Obtain the probability distribution of the vehicle flow data of node i in the historical time period t in the (τ - 1)-th year in the corresponding total vehicle flow data of the whole day

[0132] Obtain the vehicle flow data of node i in the historical time period t in the τ-th year In the probability distribution of the corresponding total vehicle flow data of the whole day The expression is:

[0133]

[0134] Wherein, Represents the vehicle flow data of node i in the historical time period t in the (τ - 1)-th year.

[0135] It can be understood that the daily average vehicle flow data is the vehicle flow data collected at 5-minute intervals for each day of node i in the τ-th year, and a total of 288 time period vehicle flow data are collected;

[0136] Step S14, based on the updated spatio-temporal learning model B′ τ,i And the updated knowledge base C′τ ,i , obtain the updated traffic data prediction model A′ τ,i ;

[0137] Step S15, traverse Z historical years to obtain the updated traffic data prediction model A′ i ;

[0138] Step S16, traverse I nodes to obtain the final traffic data prediction model;

[0139] Step S17, use the final traffic data prediction model to predict the vehicle flow.

[0140] Optionally, the expression of the loss function of the traffic prediction model is:

[0141]

[0142] Wherein, L τ Is the total loss value in the τ-th year, Is the vehicle flow prediction data of each node in each historical time period in the τ-th year, Y τrepresent the true vehicle flow data of each node in each historical time period of the τ-th year; μ is a hyperparameter used to balance the two parts of the loss; P τ is the attention score matrix of the τ-th year, Q τ is the matching degree matrix of the τ-th year, ensuring that the traffic prediction model only accesses the representative patterns matched in the knowledge base.

[0143] Optionally, the expression of the knowledge preservation mechanism is:

[0144] L s = λvec(θ τ-1 - θ τ ) Τ Ωvec(θ τ-1 - θ τ )

[0145] where λ is a balance factor, a hyperparameter, θ τ-1 represents all the parameters of the traffic prediction model F τ-1 ; vec(.) represents an operation function, Ω represents the Fisher information, θ τ represents all the parameters of the traffic prediction model F τ ;

[0146] Furthermore,

[0147]

[0148] where Ω i represents the Fisher information matrix of node i of the traffic prediction model F τ-1 , measuring the importance of parameters, |D t | represents the training data of historical time period t, x represents the sample of the training data of historical time period t, L pr is the prediction loss function, θ i is the parameter of node i.

[0149] The above is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.

Claims

1. A traffic data prediction method based on a spatiotemporal graph network with continuous learning, characterized in that: include: Step S1, collecting historical vehicle flow data of each node in the road network; Step S2: Building an initial spatiotemporal graph network based on continuous learning based on the road network; Determine a representative pattern set of each node in the continuous learning-based spatiotemporal graph network based on historical vehicle flow data of each node, and obtain the continuous learning-based spatiotemporal graph network, which is represented as a knowledge base; Building spatiotemporal learning models; Step S3: Building a traffic data prediction model using the spatiotemporal learning model and the knowledge base; Step S4, let i=1, when i=1, it represents the first node in the τth historical year in the road network; Step S5, set τ=1. When τ=1, it means that node i is in the first historical year; Step S6, let t=1, when t=1, it represents the traffic mode of the node i in the initial historical time period of the τth historical year; Step S7: Obtain the vehicle flow data of node i in the tth historical time period in the τth year Input traffic data prediction model Step S8: Based on spatiotemporal learning model Obtain the spatiotemporal characteristics of the traffic flow data of node i in the tth historical period of year τ Step S9: Obtain knowledge base M τ The representative traffic mode set P in the τth year τ ; Based on the representative traffic mode set P in the τth year τ The vehicle flow data of node i in the tth historical time period in the τth year Perform traffic mode matching to obtain the matching traffic mode of node i in the tth historical time period in the τth year; Step S10: Obtain the spatiotemporal characteristics of the vehicle flow data of node i in the tth historical time period in the τth year. and the representative traffic mode set P in the τth year τ The cosine similarity P of each representative traffic mode in τ,i,t ; Based on cosine similarity P τ,i,t and the representative traffic mode set P in the τth year τ , and obtain the corresponding feature matrix Step S11: The feature matrix and spatiotemporal characteristics Perform residual connection, input the fully connected layer, and output the traffic prediction data of node i in the tth historical time period in the τth year; Step S12, traversing T historical time periods, obtaining the matching traffic mode of node i in each historical time period of the τth year and the traffic prediction data of node i in each historical time period of the τth year; Based on the traffic prediction data and loss function of node i in each historical time period in the τth year, the spatiotemporal learning model is updated to obtain an updated spatiotemporal learning model B′ τ,i ; Step S13: input the matching traffic mode of node i in each historical time period in the τth year into the knowledge base C τ,i , based on the knowledge preservation mechanism and pattern traceability mechanism, the updated knowledge base C′ is obtained τ,i ; Step S14: Based on updating the spatiotemporal learning model B′ τ,i and update the knowledge base C′ τ,i , get the updated traffic data prediction model A′ τ,i ; Step S15: traverse Z historical years to obtain an updated traffic data prediction model A′ i ; Step S16, traverse I nodes to obtain the final traffic data prediction model; Step S17: Use the final traffic data prediction model to predict vehicle flow.

2. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 1 is characterized in that: The specific steps of determining the representative pattern set of each node in the spatiotemporal graph network based on continuous learning in step S2 include: Obtain nodes in the road network; count multiple historical vehicle flow data of each node in the τth historical year; Get the daily average vehicle flow data of each node in the τth historical year; the input format is a three-dimensional array of B*T*N, where B represents the data batch, T represents the time series length, N represents the node number, and each data represents the traffic flow of the node at this time step in the data batch; Set the time interval; According to the time interval, the average daily vehicle flow data of each node in the τth historical year is counted; Set a slicing interval, slice the daily average vehicle flow data of each node in the τth historical year according to the slicing time interval, obtain multiple slice data of each node in the τth historical year, aggregate the vehicle flow data corresponding to the multiple slice data of each node in the τth historical year, obtain each aggregated vehicle flow data of each node in the τth historical year, represent it as multiple traffic modes of each node in the τth historical year, and establish an original traffic mode set of each node in the τth historical year; Cluster-based downsampling is used to extract the representative traffic mode of each node in the original traffic mode set in the τth historical year, and multiple representative traffic modes of each node in the τth historical year are obtained to establish the representative traffic mode set of each node in the τth historical year; τ=1,2,3...Z, Z represents the total number of historical years; Traverse Z historical years and obtain the representative traffic mode set of each node in each historical year.

3. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 1 is characterized in that: The spatiotemporal learning model includes a spatiotemporal learning module 1 and a spatiotemporal learning module 2; The spatiotemporal learning module 1 and the spatiotemporal learning module 2 both include a spatial processing module GCN and a temporal processing module TCN.

4. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 1 is characterized in that: The expression of the spatiotemporal learning model is: in, is the input of the (l-1)th spatial processing module GCN in the τ-1th year, is the input of the l-th layer spatial processing module GCN in the τth year, is the learnable parameter of the l-th layer spatial processing module GCN in the τth year, A τ is the critical matrix for the τth year, I τ is the corresponding identity matrix and D is the degree matrix.

5. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 4 is characterized in that: The specific steps of obtaining the matching traffic mode of node i in the tth historical time period in the τth year in step S9 include: Based on obtaining the vehicle flow data of node i in the tth historical time period in the τth year and the representative traffic mode set P in the τth year τ The cosine similarity of each representative traffic mode in is calculated, and redundant filtering is performed to obtain the corresponding similarity matrix, and the representative traffic mode corresponding to the maximum similarity is selected as the corresponding matching traffic mode.

6. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 5 is characterized in that: The corresponding feature matrix The expression is: Among them, P τ,i,t (k) represents the cosine similarity between the spatiotemporal characteristics of the traffic flow data of node i in the tth historical period of year τ and the kth representative traffic mode in year τ, M τ (k) represents the kth representative traffic mode in the τth year, and K represents the total number of representative traffic modes.

7. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 6 is characterized in that: Step 13 obtains the updated knowledge base C′ τ,i The specific steps include: Step S131, determine whether node i has historical vehicle flow data in the τ-1th year. If not, node i is a newly added node and proceed to step S133; if yes, proceed to the next step; Step S132, determine whether the matching traffic mode of node i in each historical time period of the τth year has changed significantly, if so, proceed to the next step, if not, set τ=τ+1, and return to step S6; Step S133: Utilize the matching traffic patterns of node i in each historical time period of the τth year, and update the knowledge base to obtain an updated knowledge base.

8. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 7 is characterized in that: The specific steps for judging whether the traffic pattern of node i in the τth year has changed significantly include: The probability distribution of vehicle flow at node i in each historical time period in the τ-1th year and the τth year is obtained respectively. and probability distribution Get probability distribution and probability distribution If the Wasserstein distance is small, the distribution difference is small, indicating that the traffic pattern of node i in the τth year has not changed significantly; If the Wasserstein distance is large, the distribution difference is large, indicating that the traffic pattern of node i in the τth year has changed significantly, and node i is regarded as a conflict node.

9. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 8 is characterized in that: Obtain the probability distribution of vehicle flow at node i in each historical time period in the τ-1th year and the τth year and probability distribution The specific steps include: Collect the daily average vehicle flow data of node i in the τ-1 year and the τth year respectively; Obtain the total vehicle flow data of node i for the entire day in the τ-1 year and the τ year; Get the probability distribution of the vehicle flow data of node i in the τ-1th tth historical time period in the corresponding total vehicle flow data for the whole day Get the vehicle flow data of node i in the tth historical time period in the τth year The probability distribution of the corresponding total vehicle flow data for the whole day 10. The traffic data prediction method based on the spatiotemporal graph network of sustainable learning according to claim 9 is characterized in that: The expression of the knowledge preservation mechanism is: L s =λvec(θ τ-1 -θ τ ) Τ Ωvec(θ τ-1 -θ τ ) Among them, λ is the balance factor, hyperparameter, θ τ-1 Denotes the traffic prediction model F τ-1 All parameters; vec(.) represents the operation function, Ω represents the Fisher information, θ τ Denotes the traffic prediction model F τ All parameters of .

Citation Information

Patent Citations

  • Traffic flow prediction method based on space-time embedded attention network

    CN117688453A

  • Improved traffic flow prediction method based on aggregated space-time multi-graph convolutional network

    CN118097948A

  • Traffic flow prediction method based on space-time meta-graph learning

    CN118379882A

  • Traffic flow prediction method and apparatus

    WO2025010879A1