Non-stationary traffic prediction method based on wave flow decomposition and time delay perception
Through the non-stationary traffic prediction method based on wave current decomposition and delay perception, the decoupled flow layer and adaptive graph convolution network are used to solve the shortcomings of traditional traffic prediction methods in non-stationary and space-time delay effects, more accurate traffic flow prediction is achieved, and the management capabilities of intelligent traffic systems are improved.
Patent Information
- Application Number
- CN202510899425.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-01
AI Technical Summary
Traditional traffic flow prediction methods have problems such as insufficient prediction accuracy and poor adaptability to emergencies when dealing with non-stationarity and space-time lag effects, which is difficult to meet the refined and intelligent needs of modern traffic management.
Using a non-stationary traffic prediction method based on wave current decomposition and delay perception, the spatial and temporal correlation and dynamic change characteristics of traffic flow data are captured by decoupling the flow layer, delay perception directed graph attention and adaptive graph convolution network, and the adaptive graph convolution network and time-gated convolution module are built, which integrates short-term fluctuations and long-term trend characteristics to conduct traffic flow prediction.
It improves the accuracy and robustness of traffic flow prediction, can better cope with complex traffic networks, provide more reliable short- and long-term traffic flow prediction, and improves the scientific nature of traffic management decisions and the operation efficiency of intelligent traffic systems.
Smart Images

Figure CN120409841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation systems, and specifically to a non-stationary traffic prediction method based on wave-flow decomposition and time-delay perception. Background Technique
[0002] In the development process of modern cities, the traffic system plays a crucial role. However, traffic flow prediction, as a key link in traffic management and planning, has been facing many challenges. Traditional traffic prediction methods have obvious deficiencies in dealing with the non-stationarity and spatio-temporal time-delay effects of the traffic system. The non-stationarity stems from the irregularity of traffic flow changes over time, such as the flow differences between peak and off-peak periods, and the sharp increase or decrease in traffic flow caused by emergencies. The spatio-temporal time-delay effect is reflected in the time delay in the propagation of traffic congestion and other phenomena from one section to another. These factors make it difficult for traditional methods to break through in prediction accuracy and difficult to meet the refined and intelligent requirements of modern traffic management. At the same time, although end-to-end deep learning models have improved the prediction accuracy to a certain extent, they still lack sufficient robustness for problems such as data distribution shift, such as the differences in traffic patterns between holidays and weekdays. Summary of the Invention
[0003] To solve the above problems, the present invention proposes a non-stationary traffic prediction method based on wave-flow decomposition and time-delay perception to solve the problems existing in traditional traffic flow prediction methods when dealing with the non-stationarity and spatio-temporal time-delay effects of the traffic system, such as insufficient prediction accuracy and poor adaptability to emergencies. Compared with traditional methods, the present invention can effectively capture the spatio-temporal correlation and dynamic change characteristics of traffic flow data by introducing mechanisms such as decoupled flow layer, time-delay perception directed graph attention, and adaptive graph convolutional network, and provide more accurate short-term and long-term traffic flow predictions, providing a more reliable solution for traffic flow prediction in intelligent transportation systems. The technical solutions provided by the present invention are as follows:
[0004] A non-stationary traffic prediction method based on wave-flow decomposition and time-delay perception, comprising the following steps:
[0005] Step 1, represent the traffic network as a directed graph and obtain the traffic flow data of all sensors in the traffic network;
[0006] Step 2, construct a decoupled flow layer, and use wavelet transform to decouple the traffic flow data into a "wave component" and a "flow component": the two high-frequency components after wavelet transform are combined into a "wave component" to capture short-term fluctuations and event information in the traffic flow data; the low-frequency component after wavelet transform is the "flow component" to reflect the long-term trend of the traffic flow data;
[0007] Step 3, construct the temporal gated convolutional module TGC1, and input the data obtained in Step 2 into TGC1 to capture short-term temporal dependencies, obtaining the "wave component" feature and the "flow component" feature;
[0008] Step 4, construct the time-delay aware directed graph attention DeDGA, and use the "wave component" feature output by TGC1 as the input of DeDGA to capture the causal relationship of the "wave component" in the spatio-temporal dimension;
[0009] Step 5, construct the adaptive graph convolutional network AdaGCN, and use the "flow component" feature output by TGC1 as the input of AdaGCN to extract the global steady-state features contained in the "flow component";
[0010] Step 6, construct the temporal gated convolutional module TGC2, and use TGC2 to further process the features processed by DeDGA and AdaGCN to capture long-term temporal dependencies;
[0011] Step 7, construct the adaptive event fusion module AEFM, calculate the weights by the attention mechanism and learn through backpropagation; according to the obtained attention weights, fuse the prediction results of the "wave component" and the "flow component" to obtain a comprehensive representation of future traffic;
[0012] Step 8, construct a fully connected layer, and use a fully connected neural network to convert the future traffic representation output by AEFM into the desired predicted value;
[0013] Step 9, output the predicted traffic flow data; evaluate the predicted traffic flow data using a loss function, calculate the prediction error by comparing with the true value, and measure the prediction performance.
[0014] Preferably, the wavelet transform of the input traffic data in Step 2 is as follows: ; ; ; where and represent the low-pass filter and the high-pass filter of the wavelet, is the convolution operation; is the downsampling operation; in the decoupled flow layer, after the wavelet transform is completed, the low-frequency component and two high-frequency components and are obtained; perform the upsampling operation and the inverse wavelet transform to obtain the "wave component" and the "flow component" : ; ; where , and , is a learnable parameter.
[0015] Preferably, the time-gated convolution modules TGC1 and TGC2 are specifically expressed as: ; ; where represents the input node signal feature of the time-gated convolution module; is a one-dimensional convolution operation for extracting local features in the time dimension; is a splitting operation for dividing the output of the one-dimensional convolution into two parts; and are the results after splitting the two tensors, which are used for linear transformation and gating operation respectively; is the output feature of the time-gated convolution module, representing the time series feature after processing at the layer; is an element-wise multiplication operation, i.e., multiplying element by element; is an activation function for mapping the input value to the range.
[0016] Preferably, the construction method of DeDGA is specifically as follows:
[0017] Step 4.1, calculate the prior time-delay correlation coefficient. Let be the data of the sensor node. The prior time-delay correlation coefficient between two sensor nodes and is: ; ; ; where is the traffic flow of at the time node; is the traffic flow of at the time node; is the sequence length; is the time-delay length; is the time-delay correlation coefficient between sensor nodes and at the time-delay length ; The time-delay correlation coefficient starts to calculate the time-delay correlation coefficient from the initial time-delay length , then gradually increases the time-delay length , and calculates the corresponding time-delay correlation coefficient at each increment;
[0018] Step 4.2, extract the dynamic time window feature: ; ; where is the feature output by TGC1 to DeDGA; and are learnable weight matrices used to map input features to a new feature space; tanh is the hyperbolic tangent function used to introduce non-linearity and map the input values to the range of ; and are the output feature matrices after linear transformation and non-linear activation;
[0019] Step 4.3, the output feature matrix , where ReLU is the rectified linear unit function used to map the input values to the range of ;
[0020] Step 4.4, construct a time-delay aware directed graph attention mechanism based on the prior time-delay correlation coefficient and dynamic time-window features: , where is the prior time-delay correlation coefficient obtained through training, is a learnable parameter matrix, is the "wave component" feature output by DeDGA.
[0021] Preferably, the construction method of AdaGCN is specifically as follows:
[0022] Step 5.1, adopt an adaptive graph learning algorithm to dynamically adjust the connection weights between nodes, expressed as: ; ; ; where represents the node adaptive feature, is a learnable parameter; represents the diagonalization of , and self-connections are incorporated into the anti-symmetric matrix to determine the weights at the diagonal positions; use the non-linear activation function ReLU to generate the sparse matrix , and the adaptive aggregation module integrates the sparse matrix with the existing adjacency matrix to generate the matrix , where represents the non-linear activation function, is a convolutional layer with a convolutional kernel of , represents the Hadamard product multiplication; normalize the obtained matrix , where and correspond to the diagonal matrices of and respectively; is the threshold used to eliminate the weak relationships in the matrix ; is the output matrix of the adaptive graph learning algorithm;
[0023] Step 5.2, based on the Chebyshev polynomial graph convolution method, perform a convolution operation on the node features, expressed as: ; where the parameter is a vector of polynomial coefficients; , is the Laplacian matrix, is the maximum eigenvalue of the Laplacian matrix, is the identity matrix, is the feature output by TGC1 to AdaGCN; is the "flow component" feature output by AdaGCN; is the Chebyshev polynomial, and its recursive definition is:
[0024] Preferably, step 7 is specifically: ; ; where represents the sensor at the time step the predicted traffic flow or speed value; is the "flow component" prediction result processed by TGC2, representing the long-term trend part of the traffic flow; is the total number of time steps of the historical data, representing the number of past time steps used by the model; is the number of predicted time steps, representing the number of future time steps predicted by the model; is the attention weight, indicating the degree of importance attached to the event data of the th time step at the time step ; is a weight matrix used to linearly transform the prediction result of the "wave component"; is the "wave component" prediction result processed by TGC2, representing the short-term fluctuation part of the traffic flow; is a weight matrix used to convert the "flow component" prediction result into a query vector; is a weight matrix used to convert the "wave component" prediction result into a key vector; is the dot product between the query vector and the key vector, used to calculate the correlation between the "flow component" and the "wave component" at the time steps and ; is the sum of the exponential dot products for all future time steps, used to normalize the attention weight; the set of traffic flow or speed values predicted by the model obtained through fusion is , storing all within the next time steps The predicted value of traffic flow or speed of a sensor; Indicates that the dimension of the set is , Indicates the feature dimension of each sensor.
[0025] Preferably, the loss function in step 9 is expressed as: , where Indicates the loss function of traffic flow prediction, which is used to measure the difference between the predicted value and the true value of the model; and Are respectively the total number of time steps of historical data and the total number of predicted time steps; Is the index of the time step; Is the number of sensors, indicating how many sensors there are in the traffic network; Is the index of the sensor, indicating which sensor's prediction error is currently being calculated; Is the true value, indicating at the time step The actual value of the traffic flow or speed of the th sensor; Is the predicted value, indicating at the time step The predicted value of the traffic flow or speed of the th sensor; Is the absolute error, indicating at the time step The absolute difference between the true value and the predicted value of the th sensor.
[0026] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: By mechanisms such as decoupling the flow layer, time-delay aware directed graph attention, and adaptive graph convolutional network, it can effectively consider the spatial dependence of sudden fluctuations and stable propagation characteristics in traffic flow, and more accurately capture the complex relationships that change over time between nodes in the traffic network. Through the decoupled flow layer, this method overcomes the limitations of traditional methods in prediction accuracy and dealing with complex traffic networks, and effectively solves the problems of insufficient prediction accuracy and inability to reflect the impact of traffic networks in traditional traffic flow prediction methods in intelligent transportation systems.
[0027] After a series of verification and analysis, the results show that the prediction method in the present invention has significant advantages in improving prediction accuracy and dealing with complex traffic networks. When facing various complex traffic conditions, it can still maintain a certain accuracy in prediction. The present invention provides more accurate short-term and long-term traffic flow predictions for intelligent transportation systems, which helps to improve the scientific nature of traffic management decisions and the operation efficiency of intelligent transportation systems, and has great application prospects in traffic flow prediction in intelligent transportation systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0029] Figure 1 is a flow chart of the method of the present invention;
[0030] Figure 2 It is a conceptual diagram of the network and entities of the present invention;
[0031] Figure 3 is a schematic diagram of the decoupled flow layer of the present invention;
[0032] Figure 4 Schematic diagram of the time-gated convolution module of the present invention;
[0033] Figure 5 Schematic diagram of the time-delay correlation analysis results of the present invention, wherein Figure a is a heat map of the maximum correlation time-delay coefficient, Figure b is a flow curve diagram of different time-delays between nodes, Figure c is a density distribution diagram of the traffic flow time-delay effect with maximum cross-correlation, and Figure d is a schematic diagram of the optimal time-delay step;
[0034] Figure 6 is a schematic diagram of the adaptive graph learning framework of the present invention;
[0035] Figure 7 is a schematic diagram of the adaptive fusion module of the present invention;
[0036] Figure 8 It is an end-to-end overall framework diagram of the present invention;
[0037] Figure 9 This is a diagram of the wave-current integration network model of the present invention;
[0038] Figure 10 is a graph showing the evolution and attenuation characteristics of traffic flow prediction errors according to the present invention;
[0039] Figure 11 : This is a graph comparing traffic flow prediction values and measured values at different time steps at node 39 of the PeMS04 dataset in an embodiment of the present invention;
[0040] Figure 12 This is a comparison diagram of traffic flow prediction values and measured values at different time steps at node 35 of the PeMS08 dataset of the present invention. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0042] To make the above objects, features, and effects of the present invention more clearly understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0043] Embodiment 1: A non-stationary traffic prediction method based on wave-flow decomposition and time-delay perception, as Figure 1 shown, mainly includes the following steps: constructing a traffic network graph and inputting historical traffic flow data; constructing a decoupled flow layer (WFDM); decoupling the original flow into a "wave component" and a "flow component"; constructing a temporal gated convolutional module (Temporal Gated Convolutional Block 1, TGC1); capturing short-term dependencies; constructing a time-delay aware directed graph attention (DeDGA); processing the spatio-temporal causal chain of the "wave component"; constructing an adaptive graph convolutional network (AdaGCN); processing the global steady-state features of the "flow component"; constructing a temporal gated convolutional module (Temporal Gated Convolutional Block 2, TGC2); capturing long-term time dependencies; constructing an adaptive event fusion module (AEFM); constructing a fully connected layer; and outputting the predicted traffic flow data.
[0044] Step 1, construct a traffic network graph, as Figure 2 shown, represent the traffic road network as a directed graph , where is the set of sensors, is the set of edges between adjacent sensors on the traffic road network, is the adjacency matrix, specifically corresponding to the adjacency matrix of , used to represent the connection relationship between sensors; perform data collection to obtain sensor data in the traffic network, and this data contains historical traffic flow information, usually recorded in the form of a time series, such as recording traffic flow, speed, etc. information every 5 minutes.
[0045] The specific operation is as follows: at the time step , represent the traffic flow or speed value of the th sensor on the traffic network as , where , indicating that only single-channel data is considered (e.g., only traffic flow or only speed), and no multi-feature fusion is performed.
[0046] At time step , the values of all sensors on the traffic network are represented as: , where is the traffic flow or speed value of the th sensor at time ; is the total number of sensors; indicates that each sensor has only one feature (traffic flow or speed); is a column vector representing the traffic flow or speed values of all sensors at time step .
[0047] Given historical time-slice traffic data as: , where is the sensor data vector for each time step; is the total number of time steps of the historical data; is a tensor containing all sensor data from time step 1 to .
[0048] The object of the present invention is to learn through the prediction model so that it can predict the traffic data of all sensors in the future time slices, specifically: , where is the sensor data vector for the future time step predicted by the model; represents the learnable parameters in the model, which are optimized through the training process; is the traffic network graph; is the historical sensor data.
[0049] Step 2, construct a decoupled flow layer (WFDM), as shown in Figure 3 , select a wavelet basis function suitable for unwrapping the traffic volume time series (such as Haar Wavelet, Haar, etc.), and use the wavelet transform (Discrete Wavelet Transform, DWT) to decompose the traffic flow data into components of different frequencies.
[0050] In the present invention, through multi-level wavelet transform, the input signal is decomposed into a low-frequency component including the trend and two high-frequency components and 。 and represent the low - pass filter and high - pass filter of the wavelet. The wavelet transform of the input traffic data 𝒳 is specifically as follows: ; ; ; where is the convolution operation; is the downsampling operation; In the decoupled flow layer, after the wavelet transform is completed, the low - frequency and high - frequency components are obtained. These components go through the downsampling operation, reducing the number of time slices of the data.
[0051] In order to restore these components to the length of the original time series and convert them back to the time domain, an upsampling operation and an inverse wavelet transform (IDWT) are required: ; The fully - connected module is specifically as follows: , where , and , are learnable parameters.
[0052] Decouple the original traffic flow into "wave components" and "flow components": Extract the low - frequency components after the wavelet transform as the "flow components" representing stable propagation, thereby reflecting the long - term trend of traffic flow; Extract the high - frequency components after the wavelet transform and combine all high - frequency components as the "wave components" depicting sudden fluctuations, thereby capturing short - term fluctuations and event information in traffic flow.
[0053] Perform upsampling and inverse wavelet transform. Perform an upsampling operation on the decomposed low - frequency and high - frequency components and apply the inverse wavelet transform to make the data length consistent with the original input, and at the same time return data of different frequencies to the time domain.
[0054] Step 3, construct the time - gated convolution module (TGC1), as shown in Figure 4 . Perform a one - dimensional convolution operation, perform a one - dimensional convolution on the input sequence along the time dimension to extract the relationship between adjacent time steps and obtain a feature map; Construct a gated linear unit (GLU), divide the feature map obtained from the one - dimensional convolution into a linear part and a gated part, activate the gated part through the Sigmoid function to limit its value within the range of 0 to 1, and then adjust the importance of the features in the linear part to achieve the screening and enhancement of time - series features.
[0055] The specific operation can be expressed as: ; ; where represents the input node signal feature of TGC1; is the one - dimensional convolution operation used to extract local features in the time dimension; is a splitting operation, which is used to divide the output of the one-dimensional convolution into two parts; and are the results after splitting for two tensors, which are used for linear transformation and gating operation respectively; is the output feature of the time gating convolution module (TGC1), representing the time series feature after being processed at the layer; is an element-wise multiplication operation, that is, multiplying element by element; is an activation function, which is used to map the input value to the range.
[0056] Using the TGC1 module, capture the short-term time dependencies from the input sequence, that is, the change patterns and trends of traffic flow within a short period (such as from a few minutes to more than a dozen minutes), specifically as follows: . The output results of TGC1 include the "wave component" feature and the "flow component" feature , which are used as the inputs of DeDGA and AdaGCN respectively later.
[0057] Step 4, construct the time-delay aware directed graph attention (DeDGA), and the specific steps are as follows.
[0058] Step 4.1, perform the calculation of the prior time-delay correlation coefficient, and calculate the prior time-delay correlation coefficient between nodes using the training data, which reflects the long-term stable time-delay pattern of traffic flow between different nodes.
[0059] Let be the traffic flow sequence of sensor , and then the prior time-delay information between nodes is obtained as: ; ; ; where is the traffic flow at node at time ; is the traffic flow at node at time ; is the sequence length; is the time-delay length; is the time-delay correlation coefficient between nodes and at the time-delay length ; the time-delay correlation coefficient needs to be calculated using the overall training data. Calculate the time-delay correlation coefficient starting from the initial time-delay length , then gradually increase the time-delay length , and calculate the corresponding time-delay correlation coefficient at each increment, and the specific results are asFigure 5 as shown
[0060] Step 4.2: Extract dynamic time window features and combine them with the direction features of the current time window to enhance the adaptability of the model to real-time traffic conditions.
[0061] Specifically, it can be expressed as: ; ; where is the feature output by TGC1 to DeDGA; and are learnable weight matrices used to map the input features to a new feature space; tanh is the hyperbolic tangent function, a commonly used activation function for introducing non-linearity, which maps the input value to the range; and are the output feature matrices after linear transformation and non-linear activation.
[0062] Step 4.3: Calculate , where ReLU is the rectified linear unit function for mapping the input value to the range; is the final output feature matrix representing the relationship between the processed nodes.
[0063] Step 4.4: Based on the prior time delay correlation coefficient and dynamic time window features, construct a time delay-aware directed graph attention mechanism to capture the dynamic propagation time delay and spatio-temporal causal chain of traffic waves between nodes: , where is the prior time delay correlation coefficient obtained through training, which is a learnable parameter matrix; is the event data feature on the node output by TGC1; is used to model the directionality and capture the dynamic changes of traffic flow.
[0064] Process the spatio-temporal causal chain of the "wave component", use the "wave component" feature output by TGC1 as the input of DeDGA, capture the causal relationship of the "wave component" in the spatio-temporal dimension through DeDGA, and extract the propagation pattern and trend of traffic waves, expressed as: .
[0065] Step 5: Construct an Adaptive Graph Convolutional Network (AdaGCN), and the specific steps are as follows.
[0066] Step 5.1: Adopt an adaptive graph learning algorithm to dynamically adjust the connection weights between nodes and update the topological structure of the traffic network in real time to capture the dynamic spatial interaction pattern between node neighborhoods.
[0067] Specifically, asFigure 6 As shown, it can be expressed as: ; ; ; where represents the node adaptive feature, is the learnable parameter; represents diagonalization of, and self - connections are incorporated into the anti - symmetric matrix to determine the weights at the diagonal positions. Subsequently, the non - linear activation function ReLU is used to generate the sparse matrix . The adaptive aggregation module integrates the sparse matrix with the existing adjacency matrix to produce the matrix , where represents the non - linear activation function (e.g., Sigmoid), is the convolutional layer with a convolutional kernel of , represents the Hadamard product multiplication. Next, to further enhance the sparsity of the matrix, the obtained matrix is normalized, where and correspond to the diagonal matrices of and respectively; is the threshold used to eliminate the weak relationships in the matrix ; is the output matrix of the adaptive graph learning algorithm.
[0068] Step 5.2, based on the graph convolution method of Chebyshev Polynomial, perform a convolution operation on the node features to extract the global steady - state features of the road network while balancing the computational efficiency and the model representation ability.
[0069] Specifically, it can be expressed as: ; where the parameter is the vector of polynomial coefficients; , is the Laplacian matrix, is the largest eigenvalue of the Laplacian matrix, is the identity matrix, is the result of the adaptive graph learning algorithm, is the node feature output by TGC1; is the Chebyshev polynomial, and its recursive definition is: ; where represents the -th order Chebyshev polynomial; is the independent variable of the Chebyshev polynomial, usually a real number, and its value range is in inside; is the order of the Chebyshev polynomial, which is used to indicate the complexity of the polynomial.
[0070] Process the global steady-state characteristics of the "flow component", use the "flow component" characteristics output by TGC1 as the input of AdaGCN, and extract the global steady-state characteristics contained in the "flow component" through AdaGCN, that is, the stable change trend and pattern of traffic flow in a relatively long time range, which is expressed as: .
[0071] Step 6, construct the Time Gated Convolution module (TGC2). After processing in the spatial dimension, use the TGC2 module to further process the results processed by DeDGA and AdaGCN to capture the long-term time dependence, that is, the change law and trend of traffic flow over a relatively long time span (such as several hours).
[0072] Specifically, it can be expressed as: , where and are the feature representations of the processed "wave component" and "flow component" respectively; and come from DeDGA and AdaGCN respectively.
[0073] Step 7, construct the Adaptive Event Fusion Module (AEFM), as Figure 7 shown. First, calculate the attention weights and perform weighted summation on the events in each time slice of the trend. The weights are calculated by the attention mechanism and the data-driven event weight adjustment is realized through backpropagation learning; then fuse the features. According to the calculated attention weights, adaptively fuse the prediction results of the "wave component" and "flow component", retain the useful event information, discard the useless events, and obtain the comprehensive representation of traffic flow.
[0074] Specifically, it can be expressed as: ; ; where represents the predicted traffic flow or speed value at the time step ; is the prediction result of the "flow component" obtained through the Adaptive Graph Convolution Network (AdaGCN), representing the long-term trend part of traffic flow; is the total number of time steps of historical data, representing the number of past time steps used by the model; is the number of predicted time steps, representing the number of future time steps predicted by the model; is the attention weight, representing the degree of importance attached to the event data of the th time step at the time step ; is a weight matrix used for linearly transforming the prediction results of "wave components"; is the prediction result of "wave components" obtained through time-delay aware directed graph attention (DeDGA), representing the short-term fluctuation part of traffic flow; is a weight matrix used for converting the prediction results of "flow components" into query vectors; is a weight matrix used for converting the prediction results of "wave components" into key vectors; is the dot product between the query vector and the key vector, used for calculating the correlation between "flow components" and "wave components" at time steps and ; is the sum of exponential dot products for all future time steps, used for normalizing attention weights.
[0075] Obtain a set of traffic flow or speed values predicted by the model through fusion , usually a three-dimensional tensor, used here to store the predicted values of traffic flow or speed for all sensors within the future time steps; indicates that the dimension of the tensor is , that is, there are three dimensions in the tensor, indicates the feature dimension of each sensor (usually represents a single feature, such as flow or speed; represents multiple features).
[0076] Step 8, construct a fully connected layer, and use a fully connected neural network to convert the future flow representation output by AEFM into the desired prediction values, that is, map the fused features into the prediction space of traffic flow, denoted as , where represents a set of traffic flow or speed values obtained through conversion by a fully connected neural network, represents the number of features of each sensor (usually represents a single feature, such as flow or speed; represents multiple features, such as flow, speed, and occupancy).
[0077] Step 9, output the predicted traffic flow data: generate the prediction results. After passing through the fully connected layer, obtain the final traffic flow prediction results, usually represented in tensor form, containing the traffic flow prediction values of each sensor within multiple future time steps; evaluate the model, use metrics such as L1 loss to supervise and evaluate the prediction results, and calculate the prediction error by comparing with the true values to measure the prediction performance of the model of the present invention.
[0078] The loss function can be expressed as: , where represents the loss function of the traffic flow prediction task, which is used to measure the difference between the predicted value and the true value of the model; and are the total number of time steps of historical data and the total number of predicted time steps respectively; is the index of the time step; is the number of sensors, indicating how many sensors there are in the traffic network; is the index of the sensor, indicating which sensor's prediction error is being calculated currently; is the true value, indicating the actual value of the traffic flow or speed of the th sensor at time step is the predicted value, indicating the predicted value of the traffic flow or speed of the th sensor at time step is the absolute error, indicating the absolute difference between the true value and the predicted value of the th sensor at time step
[0079] In summary, the overall framework of the present invention is as shown in Figure 8 . Through the decoupled flow layer, multiple spatio-temporal blocks (ST blocks) and the adaptive fusion output layer constitute the WaveFlowNet model shown in Figure 9 in the present invention.
[0080] In this embodiment, 4 public datasets, including PeMS03, PeMS04, PeMS07, and PeMS08, are used for experiments. The GPS data of the PeMS dataset comes from https: / / PeMS.dot.ca.gov / . Taking traffic flow as the research object, all datasets are divided into a training set, a validation set, and a test set in a ratio of 6:2:2 according to time. The detailed information and division of the datasets are shown in the following table: .
[0081] PeMS03: The collected data is the traffic flow (veh / 5min) feature, and the time is from September 1, 2018, to November 30, 2018, for a total of 91 days.
[0082] PeMS04: The collected data includes traffic flow (veh / 5 minutes), average speed (mph / 5 minutes), and average occupancy rate, covering January 1, 2018, to February 28, 2018, for a total of 59 days.
[0083] PeMS07: The collected data is the traffic flow (veh / 5min) feature, covering the period from May 1, 2017 to August 31, 2017, for a total of 123 days.
[0084] PeMS08: The collected data includes traffic flow (veh / 5 minutes), average speed (mph / 5 minutes), and average occupancy rate, covering the period from July 1, 2016 to August 31, 2016, for a total of 62 days.
[0085] In this embodiment, three metrics commonly used in traffic flow prediction tasks, namely Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE), are used to evaluate the prediction accuracy of the proposed model, as shown below: ; ; ; where represents the true value of traffic flow; represents the predicted value of traffic flow; represents the total number of samples; the lower the three metrics, the higher the prediction ability of the model.
[0086] To verify the performance of the WaveFlowNet model proposed in the present invention in traffic flow prediction, this experiment evaluates its prediction efficiency on four standard datasets (PeMS03 / 04 / 07 / 08) and conducts a comparative analysis with the following models.
[0087] Traditional models: Historical Average (HA), Autoregressive Integrated Moving Average (ARIMA), Support Vector Regression (SVR), Long Short-Term Memory (LSTM).
[0088] Classical benchmark models: Temporal Convolutional Network (TCN), Spatio-Temporal Graph Convolutional Network (STGCN), Graph WaveNet (GWN), Attention-Based Spatio-Temporal Graph Convolutional Network (Revised) (ASTGCN(r)).
[0089] Cutting-edge methods: Dual-Stage Spatial-Temporal Graph Neural Network (D2STGNN), Spatio-Temporal Dual-Former (PDFormer), Spatio-Temporal Autoencoder Transformer (STAEformer), Dual-Phase Spatio-Temporal Graph Convolution (DPSTGC).
[0090] Other recent models: Progressive Graph Convolutional Network (PGCN), Contrastive Consistency Learning for Time Series Generative Adversarial Network (CCST-GAN), Long Short-Term Memory Neural Network (LSTNN).
[0091] The performance comparison between the WaveFlowNet model proposed in this application and the above methods after testing is shown in the following table: 。
[0092] It can be seen that for the PeMS07 dataset with the most nodes, the RMSE of the WaveFlowNet model is 4.54%, 8.92%, 4.51% and 11.30% lower than that of the CCST-GAN, LSTNN, DPSTGC and PGCN models respectively. On the PeMS03 dataset with fewer nodes, the RMSE, MAE and MAPE values of the WaveFlowNet model are 9.22%, 7.37% and 7.91% lower than those of the STAEformer model respectively, which indicates that the learning mode of three-stage modeling of traffic spatio-temporal evolution with dynamic decoupling-time delay perception-spatio-temporal resonance fusion can fully capture the complex dependencies and patterns in the spatio-temporal domain.
[0093] Such as Figure 10As shown, the overall error attenuation percentage remains at a relatively low level (mean: 8.2% ± 2.3%), verifying the stable prediction performance of the WaveFlowNet model in the full prediction interval of 5 - 60 minutes. Through the spatio-temporal feature coupling mechanism, the model significantly controls the cumulative effect of prediction errors (short-term prediction: 12.8% MAPE attenuation, long-term prediction: 5.3% MAPE attenuation). This temporal robustness has important application value for intelligent transportation systems (ITS).
[0094] Figure 11 It shows the comparison results between the predicted traffic flow values and the measured values at node 39 of the PeMS04 dataset at different time steps (T = 1, 6, 12) on February 21, 2018. Figure 12 It presents the same-scale prediction performance comparison at node 35 of the PeMS08 dataset on August 24, 2016. Through the spatio-temporal convolutional gating mechanism, WaveFlowNet ensures the short-term prediction accuracy, and its attention weight allocation strategy also achieves good results for long-term traffic flow. This feature indicates that the model in this application has the microscopic accuracy of short-term prediction and the macroscopic reliability of long-term prediction, which has significant value for intelligent transportation applications such as dynamic routing decision-making and congestion warning.
[0095] Example 2: The computer-readable storage medium of this example stores a computer program, and when the program is executed by a processor, it implements the steps in a non-stationary traffic prediction method based on wave flow decomposition and time-delay perception in Example 1.
[0096] The computer-readable storage medium of this example can be the internal storage unit of the terminal, such as the hard disk or memory of the terminal; the computer-readable storage medium of this example can also be the external storage device of the terminal, such as the plug-in hard disk, smart memory card, secure digital card, flash card, etc. equipped on the terminal; further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the terminal.
[0097] The computer-readable storage medium of this example is used to store the computer program and other programs and data required by the terminal, and the computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0098] Example 3: The computer device of this example includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in a non-stationary traffic prediction method based on wave flow decomposition and time-delay perception in Example 1.
[0099] In this embodiment, the processor may be a central processing unit, or may also be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.; the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0100] Those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solutions, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0101] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A non-stationary traffic prediction method based on wave-current decomposition and time-delay perception, characterized in that It includes the following steps: Step 1: Represent the traffic network as a directed graph and obtain the traffic flow data of all sensors in the traffic network. Step 2: Construct a decoupled flow layer and use wavelet transform to decouple the traffic flow data into a "wave component" and a "flow component": The two high-frequency components after wavelet transform are merged into the "wave component" to capture short-term fluctuations and event information in the traffic flow data; the low-frequency component after wavelet transform is the "flow component" to reflect the long-term trend of the traffic flow data. Step 3: Construct a time-gated convolutional module TGC1, and input the data obtained in Step 2 into TGC1 to capture short-term time dependencies, obtaining the "wave component" feature and the "flow component" feature. Step 4: Construct a time-delay aware directed graph attention DeDGA, and use the "wave component" feature output by TGC1 as the input of DeDGA to capture the causal relationship of the "wave component" in the spatio-temporal dimension. Step 5: Construct an adaptive graph convolutional network AdaGCN, and use the "flow component" feature output by TGC1 as the input of AdaGCN to extract the global steady-state features contained in the "flow component". Step 6: Construct a time-gated convolutional module TGC2, and use TGC2 to further process the features processed by DeDGA and AdaGCN to capture long-term time dependencies. Step 7: Construct an adaptive event fusion module AEFM, calculate the weights by an attention mechanism and learn through backpropagation; according to the obtained attention weights, fuse the prediction results of the "wave component" and the "flow component" to obtain a comprehensive representation of future traffic flow. Step 8: Construct a fully connected layer, and use a fully connected neural network to convert the future traffic flow representation output by AEFM into a desired predicted value. Step 9: Output the predicted traffic flow data; use a loss function to evaluate the predicted traffic flow data, calculate the prediction error by comparing with the true value, and measure the prediction performance.
2. The non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 1, wherein The input flow data in Step 2 has a wavelet transform as follows: ; ; ; where and represent the low-pass filter and high-pass filter of the wavelet, is the convolution operation; is the downsampling operation; in the decoupling flow layer, after the wavelet transform is completed, the low-frequency component and two high-frequency components and are obtained; an upsampling operation and an inverse wavelet transform are performed to obtain the "wave component" and the "flow component" : ; ; where , and , are learnable parameters.
3. A non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 1, characterized in that The time-gated convolution modules TGC1 and TGC2 are specifically represented as follows: ; ; where represents the input node signal feature of the time-gated convolution module; is a one-dimensional convolution operation used to extract local features in the time dimension; is a splitting operation used to divide the output of the one-dimensional convolution into two parts; and are two tensors that are the results of the splitting and are used for linear transformation and gating operations respectively; is the output feature of the time-gated convolution module, representing the time series feature after processing at the th layer; is an element-wise multiplication operation, i.e., multiplying element by element; is an activation function used to map the input value to the range.
4. A non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 2, characterized in that The specific construction method of DeDGA is as follows: Step 4.1, calculate the prior time-delay correlation coefficient. Let be the data of the sensor node. The prior time-delay correlation coefficient between two sensor nodes and is: ; ; ; where is the traffic flow at node at time ; is the traffic flow at node at time ; is the sequence length; is the time-delay length; is the time-delay correlation coefficient between sensor nodes and and at the time-delay length The time-delay correlation coefficient starts from the initial time-delay length to calculate the time-delay correlation coefficient, and then gradually increases the time-delay length , and calculates the corresponding time-delay correlation coefficient at each increment ; Step 4.2, extract dynamic time window features: ; ; where is the feature output by TGC1 to DeDGA; and are learnable weight matrices used to map the input features to a new feature space; The tanh is the hyperbolic tangent function, which is used to introduce non-linearity and map the input values into the range of ; and are the output feature matrices after linear transformation and non-linear activation; Step 4.3, output the feature matrix , where ReLU is the rectified linear unit function for mapping the input value to range; Step 4.4: Based on the prior time-delay correlation coefficient and the dynamic time window feature, construct a time-delay aware directed graph attention mechanism: , where is the prior time-delay correlation coefficient obtained through training, is a learnable parameter matrix, is the "wave component" feature output by DeDGA.
5. A non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 2, characterized in that, The specific construction method of AdaGCN is as follows: Step 5.1, an adaptive graph learning algorithm is adopted to dynamically adjust the connection weights between nodes, expressed as: ; ; ; where represents the node adaptive feature, is a learnable parameter; represents diagonalization of, and self-connections are incorporated into the skew-symmetric matrix to determine the weights at the diagonal positions; Use the non-linear activation function ReLU to generate a sparse matrix , the adaptive aggregation module combines the sparse matrix with the existing adjacency matrix to produce a matrix , where represents the non-linear activation function, is a convolutional layer with a convolutional kernel of ; represents the Hadamard product multiplication; normalize the obtained matrix , where and correspond to the diagonal matrices of and respectively; is the threshold used to eliminate weak relationships in the matrix ; is the output matrix of the adaptive graph learning algorithm; Step 5.2, based on the Chebyshev polynomial-based graph convolution method, perform a convolution operation on the node features, expressed as: ; where the parameter is a vector of polynomial coefficients; , is the Laplacian matrix, is the largest eigenvalue of the Laplacian matrix, is the identity matrix, is the feature output by TGC1 to AdaGCN; is the "flow component" feature output by AdaGCN; is the Chebyshev polynomial, and its recursive definition is: ; where represents the -th order Chebyshev polynomial; is the independent variable of the Chebyshev polynomial, and its value range is within ; is the order of the Chebyshev polynomial, which is used to indicate the complexity of the polynomial.
6. The non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 1, characterized in that Step 7 is specifically as follows: ; ; where represents the predicted traffic flow or speed value of the sensor at the time step ; is the prediction result of the "flow component" after being processed by TGC2, representing the long-term trend part of the traffic flow; is the total number of time steps of the historical data, representing the number of past time steps used by the model; is the number of predicted time steps, representing the number of future time steps predicted by the model; is the attention weight, representing the degree of importance attached to the event data of the th time step at the time step ; is a weight matrix used to linearly transform the prediction result of the "wave component"; is the prediction result of the "wave component" after being processed by TGC2, representing the short-term fluctuation part of the traffic flow; is a weight matrix used to convert the prediction result of the "flow component" into a query vector; is a weight matrix used to convert the prediction result of the "wave component" into a key vector; is the dot product between the query vector and the key vector, used to calculate the correlation between the "flow component" and the "wave component" at the time steps and ; is the sum of the exponential dot products for all future time steps, used to normalize the attention weight; the set of traffic flow or speed values predicted by the model through fusion is , storing the predicted values of the traffic flow or speed of all sensors within the future time steps; represents that the dimension of the set is , represents the feature dimension of each sensor.
7. A non-stationary traffic prediction method based on wave-current decomposition and time-delay perception according to claim 6, characterized in that The loss function of step 9 is expressed as: , where represents the loss function of traffic flow prediction, which is used to measure the difference between the predicted value and the true value of the model; and are the total number of time steps of historical data and the total number of predicted time steps respectively; is the index of the time step; is the number of sensors, indicating how many sensors there are in the traffic network; is the index of the sensor, indicating which sensor's prediction error is being calculated currently; is the true value, indicating the actual value of the traffic flow or speed of the -th sensor at time step is the predicted value, indicating the predicted value of the traffic flow or speed of the -th sensor at time step is the absolute error, indicating the absolute difference between the true value and the predicted value of the -th sensor at time step 8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in a non-stationary traffic prediction method based on wave-flow decomposition and time-delay awareness as described in any one of claims 1-7.
9. A computer device, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in a non-stationary traffic prediction method based on wave-flow decomposition and time-delay awareness as described in any one of claims 1-7.
Citation Information
Patent Citations
Traffic prediction method and device based on dynamic space-time diagram convolution attention model
CN113487088A
Road network level traffic flow integrated prediction method based on adaptive time series decomposition
CN116824838A
Near-shore wind wave prediction method and system based on data driving
CN119293745A
Cited By
Urban traffic flow prediction method based on multiple time-space characteristics of road network
CN120913415A
Traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling
CN120998030A
Traffic flow prediction method and device based on multi-level space-time and perception fusion
CN121092937A
Traffic flow prediction method and device based on multi-level space-time and perception fusion
CN121092937B
Traffic flow prediction method, system and equipment based on intra-block convolution and axis remapping
CN121260012A