A spatio-temporal adaptive graph learning traffic flow prediction method fused with dynamic graph convolution

By combining spatiotemporal adaptive graph learning with dynamic graph convolution, and integrating gated temporal convolution and adaptive hybrid graph convolution modules, the problem of insufficient capture of dynamic spatiotemporal features in traffic flow prediction is solved, achieving higher prediction accuracy and long-term prediction capability.

CN117392846BActive Publication Date: 2026-02-10LANZHOU UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311424900.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2026-02-10
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods struggle to effectively capture the dynamic spatiotemporal characteristics of traffic flow, resulting in low prediction accuracy, especially in long-term predictions.

Method used

A spatiotemporal adaptive graph learning fusion dynamic graph convolution method is adopted. By using a gated temporal convolutional network and an adaptive hybrid graph convolutional module, combined with a static adaptive graph learning module, a dynamic graph learning module and a spatial gate fusion mechanism, the dynamic spatiotemporal features of traffic flow are captured. The computational complexity is reduced by using an extended causal convolutional network and a graph attention mechanism.

Benefits of technology

It significantly improves the accuracy and long-term forecasting capability of traffic flow prediction, reduces computational complexity, and outperforms existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392846B_ABST
    Figure CN117392846B_ABST
Patent Text Reader

Abstract

The application discloses a traffic flow prediction method based on spatiotemporal adaptive graph convolution fusion dynamic graph convolution, and the traffic flow prediction method is characterized by the following: the STAHGCN method mainly comprises a gated time convolution network (Gated TCN) and an adaptive hybrid graph convolution module (AHGCM), the Gated TCN utilizes dilated causal convolution networks of different granularity levels to capture time dependence, the AHGCM is composed of static adaptive graph learning (SAGL), dynamic graph learning (DGL) and a spatial gate fusion mechanism, and dynamic spatiotemporal features in traffic flow historical data are synchronously and sufficiently captured; the SAGL can adaptively capture dynamic spatial features of traffic, and the DGL can capture hidden spatial correlation through a graph attention mechanism and reduce time complexity through parallel calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, specifically to a traffic flow prediction technology that combines spatiotemporal adaptive graph learning with dynamic graph convolution. Background Technology

[0002] With rapid urbanization, transportation networks are becoming increasingly complex, placing a growing burden on Intelligent Transportation Systems (ITS). Accurate traffic flow forecasting is a crucial foundation of ITS and a vital basis for traffic management, enabling the reduction of traffic accidents and the improvement of transportation efficiency. Traffic conditions are not only dynamic in space but also exhibit complex uncertainties in time and are influenced by various external factors; therefore, accurate and real-time traffic flow forecasting remains a significant challenge.

[0003] Currently, traffic flow prediction methods are mainly divided into statistical methods, machine learning methods, and deep learning methods. Statistical methods learn the temporal dependencies of traffic flow through statistical analysis principles, but they do not consider dynamic spatial characteristics, resulting in generally poor prediction performance. Statistical methods mainly include Historical Average (HA), Autoregressive Moving Average (ARMA), and Vector Autoregression (VAR). However, statistical prediction methods struggle to handle nonlinear data and cannot extract the dynamic spatial characteristics of traffic flow. The emergence of machine learning methods has provided a solution to this problem. For example, Mathew et al. used k-nearest neighbor optimization classifiers and sine k-nearest neighbor optimization classifiers to incorporate data-related information between traffic flows into the classification process. Huang et al. proposed a network architecture composed of a deep belief network and a regression method to achieve higher accuracy in traffic flow prediction. However, the aforementioned machine learning methods do not consider the dynamic spatial characteristics of traffic flow during the prediction process.

[0004] Because traffic conditions are influenced by the road network structure, adjacent nodes exhibit similar traffic conditions as vehicles travel along the road. Considering spatial features in traffic flow prediction not only enables the full extraction of spatiotemporal features but also improves the long-term prediction accuracy of traffic flow. For example, Shi et al. proposed a traffic flow prediction network combining CNN and LSTM, using CNN to learn the spatial structural features of the road network and thus capture the spatiotemporal correlation of traffic flow. Ke et al. combined convolutional LSTM, standard LSTM, and convolutional FCL-Net, considering spatiotemporal dependencies to predict future traffic flow. However, traffic flow is non-Euclidean data, and CNN cannot effectively extract features from non-Euclidean data. Therefore, graph convolutional networks (GCNs) capable of handling non-Euclidean data are widely used in traffic flow prediction. For example, Li et al. proposed using GCNs to generate self-learning graph convolutional modules to capture the spatial features of traffic flow, but did not further consider the hidden spatiotemporal relationships of traffic flow. T-GCN uses feature matrices and adjacency matrices to capture temporal and spatial information respectively, and extracts complex temporal dependencies and spatial features through GRU and GCN respectively. ASTGCN combines spatiotemporal convolution and spatiotemporal attention mechanisms to learn the temporal and spatial features of traffic flow, but its ability to capture the dynamic spatiotemporal features of traffic flow is insufficient. STSGCN proposes a local spatiotemporal graph and extracts spatial features in the vertex domain using GCN, but it does not consider the hidden spatiotemporal relationships between nodes, making it difficult to handle long-term sequences. STGCN combines GCN and gated TCN to extract the spatiotemporal features of traffic flow, but it does not consider the complex dynamic spatiotemporal features of traffic flow. Due to the complex spatiotemporal dependencies, dynamism, and uncertainty of traffic flow prediction, the task is affected by modeling, data processing, and method training, resulting in existing traffic flow prediction methods being unable to simultaneously and effectively extract the dynamic spatiotemporal features of traffic flow, leading to low prediction accuracy and difficulties in long-term prediction. Summary of the Invention

[0005] The purpose of this invention is to better capture the dynamic spatiotemporal characteristics of traffic flow.

[0006] This invention is a traffic flow prediction method based on spatiotemporal adaptive graph learning and dynamic graph convolution. STAHGCN consists of a gated temporal convolutional network (GatedTCN) and an adaptive hybrid graph convolutional module (AHGCM). GatedTCN utilizes dilated causal convolutional networks at different granularities to capture temporal dependencies. AHGCM comprises a static adaptive graph learning module (SAGL), a dynamic graph learning module (DGL), and a spatial gate fusion mechanism to simultaneously and fully capture the dynamic spatiotemporal features in historical traffic flow data. SAGL adaptively captures the dynamic spatial features of traffic, while DGL captures hidden spatial correlations through graph attention mechanisms and reduces time complexity through parallel computation. STAHGCN combines multiple modules to construct a combined prediction method, using a prediction layer to predict the spatiotemporal features extracted by multiple modules to achieve medium- to long-term predictions of future traffic flows.

[0007] The present invention has the following advantages:

[0008] 1. A novel traffic flow prediction method, STAHGCN, is proposed. This method combines gated temporal convolution, static adaptive graph convolution, and dynamic graph convolution with multi-head attention mechanism. It can not only more comprehensively mine the dynamic spatiotemporal features of traffic flow to improve the prediction accuracy, but also reduce the computational complexity of the method through parallel computing.

[0009] 2. A gated convolutional network (Gated TCN) is constructed to capture the temporal dependence of traffic flow by using dilated causal convolutional networks of different granularities. In addition, an adaptive adjacency matrix is ​​constructed to further extract the dynamic spatial features of traffic flow in order to deeply explore the spatiotemporal features of traffic flow.

[0010] 3. An adaptive hybrid graph convolution module (AHGCM) is constructed, which consists of a static adaptive graph learning module (SAGL), a dynamic graph learning module (DGL), and a spatial gate fusion mechanism. SAGL can adaptively capture the dynamic spatial features of traffic, and DGL includes a graph attention mechanism, which can perform parallel computation to reduce time complexity while capturing hidden spatial correlations.

[0011] 4. Extensive comparative experiments were conducted on two sets of traffic datasets. The experiments show that the method of this invention achieves the best prediction performance compared with existing baseline methods. Attached Figure Description

[0012] Figure 1 This is the overall framework diagram of STAHGCN. Figure 2 This is a diagram of the Gated TCN structure. Figure 3 This is a comparison chart of the MAE metric on the PEMS-BAY dataset. Figure 4This is a comparison chart of the MAPE index on the PEMS-BAY dataset. Figure 5 This is a comparison chart of the RMSE metrics on the PEMS-BAY dataset. Detailed Implementation

[0013] The present invention will be further described in detail below with reference to the embodiments.

[0014] Step 1, Method

[0015] This invention proposes a traffic flow prediction method STAHGCN based on spatiotemporal adaptive graph learning and dynamic graph convolution, characterized by the following construction steps:

[0016] Step 1.1: Prepare raw traffic flow data by feeding the raw data into the gated temporal convolutional network GatedTCN and using dilated causal convolutional networks of different granularities to capture the temporal dependencies of traffic flow.

[0017] Step 1.2: Input the extracted temporal features into the Static Adaptive Graph Learning (SAGL) module to adaptively capture the dynamic spatial features of traffic flow;

[0018] Step 1.3: Input the extracted temporal features into the Dynamic Graph Learning (DGL) module. DGL includes a graph attention mechanism, which can reduce time complexity by performing parallel computation while capturing the correlations in the hidden space.

[0019] Step 1.4: Extract the dynamic spatiotemporal features of traffic flow from the outputs of SAGL and DGL through a spatial gating fusion mechanism to reduce the propagation of errors during the prediction process and improve prediction accuracy.

[0020] Step 2: Problem Definition

[0021] Step 2.1: Graph G = (V, E) describes the topology of the transportation network, where V represents a finite set of |V| = N road nodes; E is a finite set of edges in the road network, representing the connectivity between the road network nodes. Let v be the adjacency matrix of graph G, if v i ,v j ∈V and (v i ,v j If )∈E, then A ij The value is 1 if the value is not equal to 0 otherwise. Within each time step t, the graph G has a dynamic feature matrix. Based on the above relationship, the essence of traffic flow prediction is how to obtain a function f that can predict the traffic flow at the next time step T by learning from the historical graph signals of a given graph G and its S-step time step. This mapping relationship is expressed as follows:

[0022]

[0023] in and

[0024] Step 2.2: The Gated TCN contains two parallel temporal convolutional modules, TCN-a and TCN-b. The Gated TCN captures the temporal dependencies of traffic flow through dilated causal convolutional networks at different granularity levels. The dilated causal convolutional networks obtain a larger receptive field by stacking convolutional layers. In addition, the dilated causal convolution slides the input with a specific stride and uses a non-recursive parallel computation method to process long-term series, thereby improving the learning speed and alleviating the gradient vanishing problem.

[0025] Using a dilated causal convolution with a kernel size of 2 and a dilation factor of k, the input is selected every k steps, and a standard 1D convolution is applied to the selected input, given a one-dimensional sequence input. and filter The dilated causal convolution operation of x and f at step t is represented as follows:

[0026]

[0027] Here, d is the dilation factor controlling the jump step size. By stacking dilated causal convolutional layers with dilation factors in ascending order, the receptive field of the temporal convolutional network layer grows exponentially. Therefore, dilated causal convolutional networks can capture longer sequences with fewer layers, saving computational resources while improving long-term prediction accuracy. In recurrent neural networks, gating mechanisms can efficiently control the information flow through each layer in the temporal convolutional network, given an input... Gated temporal convolution is shown below:

[0028] h=g(ζ1*X+b)⊙σ(ζ2*X+c) (3)

[0029] Where ζ1, ζ2, b, and c are method parameters, ⊙ is element-wise multiplication, g(·) is the activation function of the output, and σ(·) is the Sigmoid function.

[0030] Step 2.3: AHGCM consists of a static adaptive graph learning module (SAGL), a dynamic graph learning module (DGL), and a spatial gate fusion mechanism to simultaneously and fully capture the dynamic spatiotemporal features in historical traffic flow data. SAGL can adaptively capture the dynamic spatial features of traffic, while DGL includes a graph attention mechanism that can perform parallel computation while capturing hidden spatial features to reduce time complexity.

[0031] Step 2.4: SAGL can effectively capture the spatial dependencies between road nodes in traffic flow. GCN is the core component for SAGL feature extraction. GCN smooths the node signals by aggregating and transforming neighborhood information and supports multi-dimensional input. Indicates the input signal. Indicates the output. Representation method parameter matrix, GCN represents a normalized adjacency matrix with self-circulating capability.

[0032]

[0033] Diffusion convolutional networks use K finite strides to simulate the diffusion process of graphic signals. STAHGCN, by combining diffusion convolutional networks with GCN, obtains the following generalized form:

[0034]

[0035] Where P k The power series of the transition matrix is ​​P = A / rowsum(A) in an undirected graph. In a directed graph, the diffusion process is divided into forward and backward directions, where the forward transition matrix P... f =A / rowsum(A) and the backward transition matrix P b =A T / rowsum(A T By combining the forward and backward transition matrices, a diffusion graph convolutional network is obtained:

[0036]

[0037] An adaptive adjacency matrix that requires no prior knowledge and can be learned end-to-end via stochastic gradient descent. By using learnable parameters Two node embedding dictionaries are randomly initialized so that the adaptive adjacency matrix can discover hidden spatial dependencies during the learning process. The SAGL module proposes the following adaptive adjacency matrix:

[0038]

[0039] Where E1 is the source node embedding and E2 is the target node embedding, SAGL obtains the spatial dependency weights between the source and target nodes by multiplying E1 and E2. The ReLU activation function is used to eliminate weak connections, and the SoftMax function normalizes the adaptive adjacency matrix. Therefore, the transition matrix of the hidden diffusion process is the normalized adaptive adjacency matrix. Combining predefined spatial dependencies and the dynamic spatial features of self-learned hiding, SAGL proposes a graph convolutional layer:

[0040]

[0041] When a given graph structure is unavailable, SAGL uses an adaptive adjacency matrix alone to capture hidden dynamic spatial features:

[0042]

[0043] in, This is the output of the SAGL module.

[0044] Step 2.5: DGL constructs a graph attention network (GAT) to aggregate features of traffic road network nodes in order to capture the dynamic spatiotemporal correlations between nodes. Since the dynamic spatiotemporal dependencies of road nodes are mainly affected by neighboring nodes, DGL uses an exponential distance decay matrix. As a prior graph structure for GAT, GAT achieves spatiotemporal information aggregation of traffic flow by calculating the attention coefficients between nodes and their neighbors. Furthermore, the multi-head graph attention mechanism can be computed in parallel to reduce the time complexity of the method. DGL at node v ij The calculation of the multi-head graph attention mechanism at a given location can be represented as follows:

[0045]

[0046]

[0047] Among them, a ij For node v i and v j Attention coefficient between, N i It is node v i The set of neighboring nodes, v j ∈N i For node v j The neighbors, that is Learnable parameters The method shares a linearly changing weight matrix. At time step t, node v i The characteristic is that K represents the number of multi-head attention mechanisms. It is the transformation parameter matrix of the head k. It is node v in the DGL module i The output at time step t, and the DGL output on the l-th block are:

[0048] Step 2.6: The STAHGCN method fuses the spatiotemporal features fed by SAGL and DGL by constructing a Spatial Gate Fusion module. and The specific calculation of the spatiotemporal gating fusion mechanism can be represented as follows:

[0049]

[0050]

[0051] in, and These are learnable parameters. This is the final output of the STAHGCN method. The spatial gate fusion module can adaptively fuse the dynamic spatiotemporal features of traffic flow for better traffic flow prediction.

[0052] Step 3, Experiment

[0053] Step 3.1: The predictive performance of the STAHGCN method was validated on the public transportation datasets METR-LA and PEMS-BAY. METR-LA consists of traffic speed statistics recorded by 207 sensors on Los Angeles County highways over four months. PEMS-BAY consists of traffic speed information recorded by 325 sensors on roads in the San Francisco Bay Area over six months. Both METR-LA and PEMS-BAY recorded detection location, detection date, data type, etc. In the experiment, the datasets were split into training, test, and validation sets in a 7:2:1 ratio according to time sequence to predict traffic flow speeds at 15, 30, and 60 minutes. Detailed information about the experimental datasets is shown in Table 1.

[0054] Table 1. Description of Experimental Datasets

[0055]

[0056] Step 3.2: Since some data in the METR-LA dataset is missing, linear interpolation is used to fill in the missing values ​​in the experiment. Before inputting the data into the prediction method, the data is subjected to min-max normalization to restrict the data to [0, 1]. The normalization formula is:

[0057]

[0058] Where, x i Let x represent the i-th original data. min and x max These represent the minimum and maximum values ​​of the original data, respectively. This represents the normalized input data.

[0059] Step 3.3, Evaluation Indicators and Baseline Methods: The mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are used to assess the error between actual traffic flow speeds and predicted results.

[0060] 1) Mean Absolute Error (MAE):

[0061]

[0062] 2) Root Mean Square Error (RMSE):

[0063]

[0064] 3) Mean Absolute Percentage Error (MAPE):

[0065]

[0066] Where N is the number of observations, y i and These represent actual traffic speed and predicted traffic speed, respectively; the smaller the predicted values ​​of MAE, RMSE, and MAPE, the better the prediction effect of the STAHGCN method.

[0067] The main comparisons are with deep learning methods and other baseline methods, including:

[0068] 1) Historical Average (HA) method: The prediction is based on historical average traffic flow information;

[0069] 2) Vector Autoregression (VAR): n variables within the same sample period can be used as linear functions of their historical values;

[0070] 3) Support Vector Regression (SVR): This method uses a linear vector machine training method based on support vector regression and predicts traffic flow based on the input-output relationship.

[0071] 4) Feedforward Neural Network (FNN): A feedforward neural network that combines two hidden layers and L2 regularization;

[0072] 5) Autoregressive Moving Average Method (ARIMA): An autoregressive composite moving average method with a Kalman filter;

[0073] 6) Long Short-Term Memory Network FC-LSTM: A recurrent neural network with fully connected LSTM hidden units;

[0074] 7) WaveNet: A convolutional neural network for predicting sequence data;

[0075] 8) Graph WaveNet: A combination of graph convolutional networks and dilated causal convolutional networks;

[0076] 9) Spatiotemporal Graph Convolutional Network STGCN: A spatiotemporal graph convolutional network that combines graph convolution and 1D convolution;

[0077] 10) Attention-based Spatiotemporal Graph Convolutional Network ASTGCN: Integrates a spatiotemporal attention mechanism into a spatiotemporal graph convolutional network to simultaneously capture the dynamic spatiotemporal features of traffic flow;

[0078] 11) Spatiotemporal Synchronous Graph Convolutional Network (STSGCN): Captures spatiotemporal features by stacking multiple local GCN layers in the temporal direction.

[0079] Step 3.4, Experimental Results and Analysis

[0080] Table 2 compares the performance of the STAHGCN method with 11 common baseline methods for 15-minute, 30-minute, and 60-minute predictions. On both datasets, the STAHGCN method significantly outperforms the baseline methods in all evaluation metrics. In the 15-minute, 30-minute, and 60-minute predictions on METR-LA, the STAHGCN method improves MAE, RMSE, and MAPE by 5.9%, 9.4%, 7.3%, and 10.4%, 12.9%, 11.1%, respectively, and 14.4%, 4.7%, 13.8%, respectively; correspondingly, on the PEMS-Bay dataset, it improves by 4.4%, 7.1%, 5.9%, and 10.5%, 10.5%, 10.7%, and 15.5%, 9.9%, 16.5%, respectively.

[0081] Statistical methods (HA, VAR, ARIMA), traditional machine learning methods SVR and FC-LSTM fail to consider spatial correlations, resulting in poor prediction accuracy. Spatiotemporal GCN methods, such as STGCN and STSGCN, effectively handle non-Euclidean traffic data and exhibit good prediction performance. ASTGCN utilizes an attention mechanism to effectively capture the temporal dependencies of sequences, achieving superior predictions. GraphWaveNet embeds GCN into TCN, making its performance even better than ASTGCN and STSGCN, but it lacks a self-attention mechanism to further capture hidden spatiotemporal features. In contrast, the STAHGCN method combines TCN with adaptive and dynamic graphs, and together with GCN and multi-head graph attention mechanisms, fully extracts the dynamic spatiotemporal features of traffic flow. By constructing an adaptive adjacency matrix in the static adaptive graph learning module and a graph attention network in the dynamic graph learning network, it effectively captures the dynamic relationships of hidden nodes in the road network over time. Furthermore, the stacked dilated causal convolutional networks and multi-head graph attention mechanism enable the STAHGCN method to effectively perform long-term predictions. Compared with the baseline method, the STAHGCN method has the best prediction performance. Furthermore, the training performance of the STAHGCN method improves with increasing training time, the prediction accuracy increases, and the long-term prediction effect becomes even better.

[0082] Table 2. Performance comparison of different traffic flow prediction methods on the METR-LA and PEMS-BAY datasets

[0083]

[0084]

[0085] Step 3.5, Ablation Experiment

[0086] To further investigate the performance of different modules of the STAHGCN method, two variants of the STAHGCN method were designed. The impact of SAGL and DGL on the method's prediction performance was studied, and the two variants were compared with the STAHGCN method on the METR-LA and PEMS-BAY datasets for 15-minute, 30-minute, and 60-minute traffic flow predictions, as shown in Table 3. The differences between these three variant methods and the STAGCN method are as follows:

[0087] NSAGL: This method does not have a static adaptive graph learning module but includes a dynamic graph learning module.

[0088] NDGL: This method does not have a dynamic graph learning module but includes a static adaptive graph learning module.

[0089] NSA-DGL: This method does not have a static adaptive graph learning module or a dynamic graph learning module.

[0090] Table 3. Prediction performance of the STAHGCN method and its three variants at different time points.

[0091]

[0092] On the PEMS-BAY dataset, the STAHGCN method reduced the MAE by approximately 7.14%, 8.45%, and 9.09% and the RMSE by approximately 7.72%, 8.33%, and 9.54% respectively at 15 minutes compared to the NSAGL, NDGL, and NSA-DGL methods. At 30 minutes, the MAE was reduced by approximately 12.43%, 14.74%, and 18.18% and the RMSE by approximately 5.32%, 10.10%, and 12.82% respectively. At 60 minutes, the MAE was reduced by approximately 18.38%, 16.96%, and 19.41% and the RMSE by approximately 8.21%, 10.96%, and 18.13% respectively. Similarly, the STAHGCN method also achieved good prediction performance on the METR-LA dataset. This demonstrates that the proposed SAGL and DGL methods can efficiently process long-term series data and perform predictions. This invention demonstrates that by utilizing an adaptive graph learning network and a multi-head graph attention mechanism, it can effectively capture the temporal and spatial dependencies of traffic flow simultaneously, and handle spatial dependencies at different time levels, resulting in the STAHGCN method's prediction performance significantly exceeding that of baseline methods. Furthermore, as shown in Table 3, the STAHGCN method can better predict future traffic flow with increasing training time.

[0093] The above research demonstrates that the STAHGCN method achieves optimal prediction results across different prediction time stages. The STAHGCN method can accurately predict traffic congestion, capture traffic flow trends, and identify the start and end times of peak traffic periods, proving its superior predictive performance and effectiveness in real-time traffic forecasting.

[0094] Although the present invention has been described in detail above with general description and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A traffic flow prediction method STAHGCN based on spatiotemporal adaptive graph learning and dynamic graph convolution, characterized in that, STAHGCN consists of a gated temporal convolutional network (Gated TCN) and an adaptive hybrid graph convolutional module (AHGCM). Gated TCN uses dilated causal convolutional networks at different granularity levels to capture temporal dependencies. AHGCM consists of a static adaptive graph learning module (SAGL), a dynamic graph learning module (DGL), and a spatial gate fusion mechanism to simultaneously and fully capture the dynamic spatiotemporal features in historical traffic flow data. SAGL can adaptively capture the dynamic spatial features of traffic, while DGL can capture hidden spatial correlations through graph attention mechanisms while reducing time complexity through parallel computation. The steps for constructing the traffic flow prediction method are as follows: Step 1: Use the Gated Temporal Convolutional Network (GCN) to capture the temporal dependencies of traffic flow by employing dilated causal convolutional networks at different granularity levels. Step 2: Input the extracted temporal features into the Static Adaptive Graph Learning (SAGL) module to adaptively capture the dynamic spatial features of traffic flow; Step 3: Input the extracted temporal features into the Dynamic Graph Learning (DGL) module. DGL includes a graph attention mechanism, which can reduce time complexity by performing parallel computation while capturing the correlations in the hidden space. Step 4: Extract the dynamic spatiotemporal features of traffic flow from the outputs of SAGL and DGL using a spatial gating fusion mechanism; Step 5: Configure the model's hyperparameters, optimizer, loss function, and number of iterations.

2. The STAHGCN traffic flow prediction method based on spatiotemporal adaptive graph learning and dynamic graph convolution as described in claim 1, characterized in that: Step 3.1: Graph G = (V, E) describes the topology of the transportation network, where V represents a finite set of V = |N| road nodes; E is a finite set of edges in the road network, representing the connectivity between the road network nodes. Let v be the adjacency matrix of graph G, if v i v j ∈V and (v i v j If )∈E, then A ij The value is 1 if the value is not equal to 0 otherwise. Within each time step t, the graph G has a dynamic feature matrix. Based on the above relationship, the essence of traffic flow prediction is how to obtain a function f that can predict the traffic flow at the next time step T by learning from the historical graph signals of a given graph G and its S-step time step. This mapping relationship is expressed as follows: in and Step 3.2: The Gated TCN contains two parallel temporal convolutional modules, TCN-a and TCN-b. The Gated TCN captures the temporal dependencies of traffic flow through dilated causal convolutional networks at different granularity levels. The dilated causal convolutional networks obtain a larger receptive field by stacking convolutional layers. In addition, the dilated causal convolution slides the input with a specific stride and uses a non-recursive parallel computation method to process long-term sequences. Using a dilated causal convolution with a kernel size of 2 and a dilation factor of k, the input is selected every k steps, and a standard 1D convolution is applied to the selected input, given a one-dimensional sequence input. and filter The dilated causal convolution operation of x and f at step t is represented as follows: Here, d is the expansion factor that controls the jump step size. By stacking expanded causal convolutional layers with expansion factors in ascending order, the receptive field of the temporal convolutional network layer grows exponentially. In recurrent neural networks, the gating mechanism controls the information flow of each layer in the temporal convolutional network layer, based on a given input. Gated temporal convolution is shown below: h=g(ζ1*X+b)⊙σ(ζ2*X+c) (3) Where ζ1, ζ2, b, and c are model parameters, ⊙ is element-wise product, g(·) is the activation function of the output, and σ(·) is the Sigmoid function.

3. The STAHGCN traffic flow prediction method based on spatiotemporal adaptive graph learning and dynamic graph convolution as described in claim 1, characterized in that: Step 4.1: AHGCM consists of a static adaptive graph learning module (SAGL), a dynamic graph learning module (DGL), and a spatial gate fusion mechanism to simultaneously and fully capture the dynamic spatiotemporal features in historical traffic flow data. SAGL can adaptively capture the dynamic spatial features of traffic, and DGL contains a graph attention mechanism that can perform parallel computation while capturing hidden spatial features to reduce time complexity. Step 4.2: SAGL can effectively capture the spatial dependencies between road nodes in traffic flow. GCN is the core component for SAGL feature extraction. GCN smooths the node signals by aggregating and transforming neighborhood information and supports multi-dimensional input. Indicates the input signal. Indicates the output. Represents the model parameter matrix. GCN represents a normalized adjacency matrix with self-circulating capability. Diffusion convolutional networks use K finite strides to simulate the diffusion process of graphic signals. STAHGCN, by combining diffusion convolutional networks with GCN, obtains the following generalized form: Where P k Let P represent the power series of the transition matrix. In an undirected graph, P = A / rowsum(A). In a directed graph, the diffusion process is divided into forward and backward directions, where the forward transition matrix P... f =A / rowsum(A) and the backward transition matrix P b =A T / rowsum(A T Combining the forward and backward transition matrices, we obtain the diffusion graph convolutional network: An adaptive adjacency matrix that requires no prior knowledge and can be learned end-to-end via stochastic gradient descent. By using learnable parameters Two node embedding dictionaries are randomly initialized so that the adaptive adjacency matrix can discover hidden spatial dependencies during the learning process. The SAGL module proposes the following adaptive adjacency matrix: Where E1 is the source node embedding and E2 is the target node embedding, SAGL obtains the spatial dependency weights between the source and target nodes by multiplying E1 and E2. The ReLU activation function is used to eliminate weak connections, and the SoftMax function normalizes the adaptive adjacency matrix. Therefore, the transition matrix of the hidden diffusion process is the normalized adaptive adjacency matrix. Combining predefined spatial dependencies and the dynamic spatial features of self-learned hiding, SAGL proposes a graph convolutional layer: When a given graph structure is unavailable, SAGL uses an adaptive adjacency matrix alone to capture hidden dynamic spatial features: in, This is the output of the SAGL module; Step 4.3: DGL constructs a graph attention network (GAT) to aggregate features of traffic road network nodes in order to capture the dynamic spatiotemporal correlations between nodes. DGL uses an exponential distance decay matrix. As the prior graph structure of GAT, GAT achieves spatiotemporal information aggregation of traffic flow by calculating the attention coefficients between nodes and their neighbors; in addition, the multi-head graph attention mechanism is computed in parallel to reduce the time complexity of the model, and DGL at node v ij The computational energy of the multi-head graph attention mechanism at a given location can be represented as follows: Among them, a ij For node v i and v j Attention coefficient between, N i It is node v i The set of neighboring nodes, v j ∈N i For node v j The neighbors, that is Learnable parameters The model shares a linearly changing weight matrix. At time step t, node v i The characteristic is that K represents the number of multi-head attention mechanisms. It is the transformation parameter matrix of the head k. It is node v in the DGL module i The output at time step t, and the DGL output on the l-th block are: Step 4.4: The STAHGCN model fuses the spatiotemporal features fed by SAGL and DGL by constructing a Spatial Gate Fusion module. and The specific calculation of the spatiotemporal gating fusion mechanism can be represented as follows: in, and These are learnable parameters. This is the final output of the STAHGCN model.

Citation Information

Patent Citations

  • Method for predicting traffic flow by using spatial dynamic graph convolutional network

    CN115482656A

  • Traffic flow prediction model based on gated time convolutional network

    CN116596109A