Traffic flow prediction method and system based on multi-factor causal fusion enhanced time sequence diagram convolutional network

Enhance the sequential graph convolutional network through multi-factor causal fusion, combine a variety of algorithms and mechanisms, analyze the causal relationship between vehicle speed, occupancy and traffic volume, extract spatiotemporal features, and solve the problem of insufficient traffic flow prediction accuracy in the existing technology. , achieving higher prediction accuracy.

CN118692231AInactive Publication Date: 2024-09-24NANTONG UNIV
View PDF 0 Cites 13 Cited by

Patent Information

Application Number
CN202410685107.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods fail to fully consider the complex interactions between vehicle speed, occupancy and traffic volume, resulting in insufficient prediction accuracy.

Method used

Multi-factor causal fusion enhanced sequential graph convolution network (MCF-TGCN) is used, combined with convergent cross-mapping algorithm, graph convolution network, graph attention network, sequential convolution network and multi-head attention mechanism, to analyze node causality and extract spatio-temporal Features to enhance the performance of traffic flow prediction models.

Benefits of technology

It effectively improves the accuracy of traffic flow prediction. Compared with the baseline model, the root mean square error on the PEMS04 and PEMS08 data sets is reduced by 11.623% to 29.614%, improving the ability to process the spatiotemporal characteristics of traffic flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692231A
    Figure CN118692231A
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method and system based on a multi-factor causal fusion enhanced time sequence diagram convolutional network, and the method comprises the following steps: firstly, analyzing the causal relationship among multiple factors of a node through employing a convergent cross mapping algorithm; and a causal coefficient matrix fusing multiple traffic states is obtained to enhance the expression ability of node association features. Then, designing a spatial feature extraction module based on a gating fusion network, and improving the processing capability of non-Euclidean data; in addition, a time feature extraction module based on a time sequence convolutional network is designed to effectively capture long-term time dependence. And finally, constructing a fusion output module based on an attention mechanism to obtain a predicted value. Compared with ASTGCN, DCRNN and GWN based on attention, the prediction errors of the MCF-TGCN model are respectively reduced by 11.623%, 18.783% and 21.456% on a PEMS04 data set by taking a root mean square error as an evaluation index, and the prediction errors of the MCF-TGCN model are respectively reduced by 11.623%, 18.783% and 21.456%. On a PEMS08 data set, compared with an ASTGCN model, a DCRNN model and a GWN model, the prediction errors of the MCF-TGCN model are reduced by 14.513%, 20.766% and 29.614% respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of traffic technology and is mainly used for predicting highway traffic flow. In particular, it relates to a traffic flow prediction method and system based on a multi-factor causal fusion enhanced temporal graph convolutional network. Background Art

[0002] Due to the imbalance between the growing traffic demand and limited traffic resources, traffic congestion has become a key factor restricting urban development. Real-time and accurate traffic flow prediction is the key for traffic management departments to effectively implement traffic control strategies.

[0003] There are many methods for traffic flow prediction. Through analysis, it is found that existing prediction methods often only focus on the single feature of traffic flow, and do not fully consider the complex interaction between vehicle speed, occupancy rate and vehicle flow. Therefore, how to improve the accuracy of traffic flow prediction model is a current research hotspot, and it is crucial to propose an effective improvement measure to improve the accuracy of traffic flow prediction model. Summary of the invention

[0004] Purpose of the invention: In view of the above problems, based on the analysis of existing work, this invention proposes a multi-factor causal fusion enhanced temporal graph convolutional network (MCF-TGCN), which combines the convergent cross-mapping algorithm (CCM), enhanced graph convolutional network (GCN), graph attention network (GAT), temporal convolutional network (TCN) and multi-head attention mechanism to improve the performance of traffic flow prediction. First, the CCM algorithm is used to analyze the causal relationship between multiple factors of nodes, and the causal coefficient matrix integrating multiple traffic states is obtained to enhance the expression ability of node association features. Then, a spatial feature extraction module based on the gated fusion network is designed to improve the processing ability of non-Euclidean data. In addition, a temporal feature extraction module based on TCN is designed to effectively capture long-term time dependencies. Finally, a fusion output module based on the attention mechanism is constructed to obtain the predicted value, and the MCF-TGCN prediction model is obtained. The present invention effectively realizes the extraction and analysis of the spatiotemporal characteristics of traffic flow by deeply exploring the complex interaction between vehicle speed, occupancy and vehicle flow.

[0005] Technical solution: The present invention provides a traffic flow prediction method based on a multi-factor causal fusion enhanced temporal graph convolutional network, wherein the multi-factor causal fusion enhanced temporal graph convolutional network includes stacked spatiotemporal layers and an output layer;

[0006] The spatiotemporal layer receives the vehicle speed, occupancy rate and traffic flow data of the internal vehicle nodes, and forms a training result after being processed by several spatiotemporal layers. The specific steps include:

[0007] Step 1: Calculate the causal relationship between the vehicle speed, occupancy rate and traffic flow of the vehicle node, and obtain the causal coefficient matrix that integrates multiple traffic state information;

[0008] Step 2: The traffic flow data is sent to the graph convolution network and the graph attention network respectively. The causal coefficient matrix is ​​used as auxiliary information to enhance the graph convolution network (equivalent to changing the adjacency matrix A in GCN). The outputs of the graph convolution network and the graph attention network are respectively subjected to Hadamard product operations with the weight matrix, and the results are added to extract spatial features.

[0009] Step 3: Input the extracted spatial features into the temporal convolutional network to capture the temporal dependency, output the temporal convolutional network, and input the extracted temporal features into the next spatiotemporal layer;

[0010] Step 4: Repeat steps 1 to 3 until all the spatiotemporal layers are processed, and send the final training results to the output layer;

[0011] The output layer uses a multi-head self-attention mechanism to fuse the spatial features and temporal features extracted from multiple spatiotemporal layers, and outputs the final prediction value.

[0012] Preferably: Step 1 specifically includes:

[0013] Step 1.1: Normalize the vehicle speed and occupancy rate and perform weighted fusion;

[0014] Step 1.2: Use the convergent cross-mapping algorithm to calculate the causal relationship between the results of step 1.1 and the traffic flow, and obtain the causal coefficient matrix C;

[0015] Step 1.3: Apply the Softmax function to each row of C to normalize it and obtain the causal coefficient matrix that integrates multiple traffic state information as auxiliary information to enhance the graph convolutional network.

[0016] Preferably: the calculation formula of the graph convolutional network is as follows:

[0017]

[0018] in, represents the adjacency matrix with added self-connection, A represents the adjacency matrix, express The degree matrix of X f (z, t) represents the traffic volume measured by N sensors in the T period; W 0 and W 1 Respectively represent the weights of the 0th and 1st layers of the graph convolutional network; ReLU(·) is the ReLU activation function, and σ(·) is the Sigmoid activation function; Represents the output of the graph convolutional network.

[0019] Preferably: the calculation formula of the graph attention network is as follows:

[0020]

[0021] in, is the self-attention coefficient of the kth head of the graph attention network; W k represents the weight matrix of the kth head; σ(·) is the Sigmoid activation function; X f (z j ,t) represents the input feature of i’s neighbor node j, Represents the output of the graph attention network.

[0022] Preferably, the weight matrix is ​​obtained by performing a linear transformation on an initial input matrix.

[0023] Preferably: a Log-Cosh loss function is used to measure the error between the true value of the average speed of the road network detection point and the predicted value, and an Adam optimization algorithm is used to optimize the hyperparameters of the spatiotemporal layer.

[0024] The present invention also provides a traffic flow prediction system based on a multi-factor causal fusion enhanced temporal graph convolutional network, which is characterized by: comprising a stacked spatiotemporal layer and an output layer, wherein the spatiotemporal layer is composed of a causal relationship extraction module, a gated fusion spatial feature extraction module and a temporal convolution time feature extraction module connected in series;

[0025] The causal relationship extraction module is used to calculate the causal relationship between the vehicle speed, occupancy rate and vehicle flow of the vehicle node, and obtain a causal coefficient matrix integrating multiple traffic state information;

[0026] The gated fusion spatial feature extraction module integrates the graph attention network and the graph convolution network to extract spatial features of the traffic flow data; the causal coefficient matrix is ​​used as auxiliary information to enhance the graph convolution network;

[0027] The time series convolution time feature extraction module is used to capture the time features of vehicle flow data;

[0028] The output layer uses a multi-head self-attention mechanism to fuse the spatial features and temporal features extracted from multiple spatiotemporal layers, and outputs the final prediction value.

[0029] Preferably, the causal relationship extraction module uses a convergent cross-mapping algorithm to calculate the causal relationship between the vehicle speed, occupancy rate and vehicle flow of the vehicle node.

[0030] Beneficial results: First, the causal relationship feature extraction module in the MCF-TGCN model can be used to analyze the causal relationship between multiple factors of nodes, and obtain the causal coefficient matrix that integrates multiple traffic states to enhance the expression ability of node association features. Secondly, the gated fusion spatial feature extraction module in the MCF-TGCN model can achieve efficient fusion of graph attention networks and graph convolutional networks to improve the processing ability of non-Euclidean data. In addition, the prediction performance of MCF-TGCN is better than the existing graph convolutional network based on spatiotemporal feature mining. On the PEMS04 dataset, compared with the attention-based spatiotemporal graph convolutional network (ASTGCN), diffuse convolutional recurrent neural network (DCRNN) and graph wave network (GWN), the root mean square error (RMSE) of MCF-TGCN is reduced by 11.623%, 18.783% and 21.456% respectively; on the PEMS08 dataset, the prediction error of the MCF-TGCN model is reduced by 14.513%, 20.766% and 29.614% compared with the ASTGCN, DCRNN and GWN models respectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is the structure diagram of the causal relationship extraction module;

[0032] Figure 2 It is the structural diagram of the gated fusion spatial feature extraction module;

[0033] Figure 3 It is the structural diagram of the temporal convolution time feature extraction module;

[0034] Figure 4 This is the structure diagram of the attention fusion output module;

[0035] Figure 5 This is the MCF-TGCN network structure diagram;

[0036] Figure 6 This is the visualization result of the traffic flow prediction of sensor No. 142 in PEMS04. (a) is the comparison between the predicted value and the true value of the weekly prediction, and (b) is the comparison between the predicted value and the true value of the daily prediction.

[0037] Figure 7 This is a visualization result diagram of a single model for the Wednesday traffic flow prediction of sensor No. 142 in PEMS04. (a) is a comparison diagram of the GWN prediction value and the true value, (b) is a comparison diagram of the DCRNN prediction value and the true value, (c) is a comparison diagram of the ASTGCN prediction value and the true value, and (d) is a comparison diagram of the MCF-TGCN prediction value and the true value.

[0038] Figure 8 The MAE (a) and RMSE bar graphs (b) of the multi-step forecast of PEMS04;

[0039] Fig. 9 It is the MAE and RMSE bar graph of the PEMS04 ablation experiment. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0041] The present invention proposes a traffic flow prediction method based on a multi-factor causal fusion enhanced temporal graph convolutional network, comprising the following steps:

[0042] Step 1) The convergent cross mapping algorithm (CCM) is used to analyze the causal relationship between the vehicle speed, occupancy rate and traffic flow of the node, and the causal coefficient matrix integrating multiple traffic state information is obtained to enhance the expression ability of node association features;

[0043] Convergent Cross Mapping (CCM) is a causal relationship inference method based on dynamic system theory, which is mainly used to determine whether there is a causal relationship between two time series. Considering the complexity of the road network and the time-varying nature of traffic conditions, although the traditional linear model can describe the relationship between traffic state parameters, its calculation results often do not match the actual detected traffic flow. Therefore, the present invention uses the CCM algorithm to analyze the causal relationship between the speed, occupancy and traffic flow of the node. The following are the steps of the CCM algorithm:

[0044] (1) Constructing phase space and shadow flow

[0045] For time series The embedding process can be expressed as constructing a delay vector, which is the historical information of the time series at a specific time point.

[0046]

[0047] Where E is the embedding dimension and ε is the time delay.

[0048] (2) Find the nearest neighbor and create weights

[0049] for By calculating the Euclidean distance between it and other delay vectors in the reconstruction space, the most similar E+1 points are determined as the nearest neighbors.

[0050]

[0051] Thus, we can get the distance set {d 1 ,d 2 ,…,d E+1}, time point collection

[0052] The weight calculation formula is as follows:

[0053]

[0054] (3) Calculate the correlation coefficient between X and Y

[0055] For every point Y in Y t Perform a weighted accumulation to get an estimate of X versus Y.

[0056]

[0057] Calculate the Pearson correlation coefficient to measure the difference between the original series Y and the estimated series Y| The similarity between .

[0058]

[0059] (4) Calculate the causal coefficient matrix

[0060] From (3), we can get the correlation coefficient C of the two sensor detection points X and Y: XY , C YX The causal coefficient matrix C is obtained by calculating the causal coefficients of each pair of sensors in the road network.

[0061]

[0062] Where N is the number of road network sensors; i and j are the sensor numbers.

[0063] like Figure 1 As shown, X(z i ,t) is the traffic flow state data recorded by the i-th sensor at time t, including the vehicle flow X measured by the sensor f (z i ,t), average speed X s (z i ,t) and occupancy X o (z i ,t). First, the vehicle speed and occupancy rate are normalized and weighted fused; then, the CCM is used to calculate the causal relationship between them and the traffic flow to obtain the causal coefficient matrix C; finally, the Softmax function is applied to each row of C to normalize it, and the causal coefficient matrix that integrates multiple traffic state information is obtained as auxiliary information to enhance the graph convolutional network.

[0064] Step 2) Design a gated fusion network to achieve efficient fusion of the graph attention network (GAT) and the graph convolutional network (GCN) to improve its ability to process non-Euclidean data;

[0065] Both GCN and GAT are designed to process graph-structured data and can effectively capture the dependencies between nodes and the structural characteristics of the graph. However, when aggregating neighbor node features, GCN usually adopts a fixed or simple weight allocation mechanism based on the graph topology, while GAT introduces an attention mechanism to dynamically adjust the information aggregation weights between nodes without relying on the fixed structure of the graph. The two graph neural network models have their own strengths: GCN does not require additional parameters to learn the weights between neighbors, so its computational complexity is relatively low; in contrast, GAT shows greater flexibility and effectiveness in processing the heterogeneity and complexity of graphs, but requires more computing resources to learn attention weights. To this end, the present invention proposes a gated fusion network, such as Figure 2 As shown in the figure, the network combines GCN and GAT. Through dynamic weight adjustment, it takes into account the high efficiency of GCN and the flexibility and adaptability of GAT, aiming to improve the processing ability of non-Euclidean data.

[0066] The traffic flow data is sent to the GCN layer, GAT layer and Linear layer respectively. The calculation formula of the GCN layer is as follows:

[0067]

[0068] in, represents the adjacency matrix with self-connection added, C represents the causal coefficient matrix, express The degree matrix of X f (z, t) represents the traffic volume measured by N sensors in the T period; W 0 and W 1 Represent the weights of layer 0 and layer 1 respectively; ReLU(·) is the ReLU activation function, σ(·) is the Sigmoid activation function; Represents the output of the GCN layer.

[0069] The calculation formula of the GAT layer is as follows:

[0070]

[0071] in, is the self-attention coefficient of the kth head; W k represents the weight matrix of the kth head; σ(·) is the Sigmoid activation function; X f (z j ,t) represents the input feature of i’s neighbor node j, Represents the output of the GAT layer.

[0072] The gated fusion network performs Hadamard product operations on the output of the GCN layer and the output of the GAT layer with the weight matrix, and then adds the results to obtain the final output. The specific calculation is as follows. The weight ratio z is obtained by linearly transforming the initial input matrix, and the specific calculation is as follows.

[0073]

[0074] z=σ(X f (z,t)W+b)

[0075] Among them, z is responsible for adjusting the weight ratio of GCN and GAT outputs in gated fusion to ensure that the sum of the values ​​of the two weight matrices at the corresponding positions is 1; Represents the output of the gated fusion network.

[0076] Step 3) Using the Temporal Convolutional Network (TCN) to capture long-term temporal dependencies, the aim is to effectively predict short-term and long-term changes in traffic flow;

[0077] The temporal convolutional temporal feature extraction module uses TCN to capture the long-term dependencies of time series, aiming to effectively predict short-term and long-term changes in traffic flow. Figure 3 , TCN uses causal convolution to ensure that predictions are based only on current and past information, avoiding leakage of future information; at the same time, dilated convolution can increase the receptive field of the model while keeping the number of parameters unchanged. Compared with RNN and its variants, TCN avoids the gradient problem in long sequence training and can process data in parallel, significantly improving processing efficiency and prediction accuracy.

[0078] Let the long history sequence X = [X t-k ,X t-k+1 ,…,X t-1 ], then in X t The specific calculation of the time-expanded causal convolution is as follows.

[0079]

[0080] in, is the ιth layer filter, d is X t The expansion rate at the moment, the size of the expanded convolution receptive field is defined as (Ι-1)d+1. By increasing Ι or d, the receptive field range can be adjusted.

[0081] Step 4) Use a multi-head self-attention mechanism to fuse the spatiotemporal features extracted from multiple spatiotemporal layers and output the final prediction value.

[0082] The attention fusion output module aims to effectively integrate spatiotemporal features to enhance the model’s ability to analyze both temporal and spatial dimensions. Figure 4As shown in the figure, the module applies a multi-head self-attention mechanism to fuse features extracted from different spatiotemporal levels. This mechanism allows multiple attention units to process in parallel and learn multiple dimensions of the data separately to reveal the internal correlation of spatiotemporal data. This multi-dimensional fusion strategy improves prediction accuracy and strengthens the model's ability to interpret complex spatiotemporal patterns.

[0083] The multi-head self-attention mechanism consists of several parallel self-attention "heads", each of which learns the attention distribution of different parts of the input data. The attention weights calculated by each head are different, which can capture different features in the sequence. The specific formula is as follows. The advantage of this is that it allows the model to focus on multiple positions in the input at the same time, rather than just one position, thereby capturing richer information.

[0084]

[0085] MultiHead(Q,K,V)=Concat(head 1 ,...,head h )W C

[0086]

[0087] Among them, d k The dimension of K, which is used to scale the dot product result to prevent the value from being too large before calculating Softmax, thus helping the gradient to be more stable; and is the learnable parameter matrix of the i-th self-attention mechanism, W C is the parameter matrix of the concatenation layer, W O is the parameter matrix of the fully connected layer; Attention(Q,K,V) represents the self-attention calculation of each head, head i represents the output of the i-th head, MultiHead(Q,K,V) represents the multi-head self-attention output, is the final prediction result of the model.

[0088] The Log-Cosh loss function can better handle outliers and noise in traffic flow data and improve the robustness and stability of the model. Therefore, the present invention uses the Log-Cosh loss function to measure the true value X and the predicted value of the average speed of the road network detection point. The Adam optimization algorithm is used to optimize the model parameters.

[0089]

[0090] In summary, in order to further explore the spatiotemporal characteristics of traffic flow sequences, the present invention proposes the MCF-TGCN model. The model is based on multiple stacked spatiotemporal layers, each of which is composed of a causal relationship extraction module, a gated fusion spatial feature extraction module, and a temporal convolution temporal feature extraction module in series. The residual connection training strategy is used to enhance the learning efficiency between layers, and the final prediction results are fused and output through the attention mechanism. Its overall architecture is as follows Figure 5 As shown. It includes: 1) Causal feature extraction module, which is used to analyze the relationship between traffic states. The convergent cross mapping algorithm (CCM) is used to analyze the causal relationship between the speed, occupancy and traffic flow of the node, and the causal coefficient matrix that integrates multiple traffic state information is obtained to enhance the expression ability of node association features. 2) Gated fusion spatial feature extraction module, which is used to capture spatial features. The gated fusion network is designed to achieve efficient fusion of graph attention network and graph convolution network to improve its ability to process non-Euclidean data. 3) Temporal convolution time feature extraction module, which is used to capture long-term time dependencies. The temporal convolution network (TCN) is used to capture long-term time dependencies, aiming to effectively predict short-term and long-term changes in traffic flow. 4) Attention fusion output module, which is used to fuse the spatiotemporal features extracted from multiple spatiotemporal layers and output the final prediction value.

[0091] Step 5) Experiments are conducted using the PEMS04 and PEMS08 real traffic flow datasets and compared with multiple benchmark models.

[0092] To verify the performance of the model, experiments were conducted using the highway network data of PEMS04 and PEMS08. The average speed of the detection point every 5 minutes was used as the input parameter of the model. The feasibility of the model was verified through comparative experiments and ablation experiments. The traffic flow, vehicle speed and occupancy data recorded by the PEMS04 highway sensor in the San Francisco Bay Area, California, from January 1 to February 28, 2018, for a period of 59 days. The data involved covered 307 sensors on 29 roads, collected every 5 minutes, totaling 16,992 records. And the traffic flow, vehicle speed and occupancy data recorded by the PEMS08 highway sensor in the San Bernardino area of ​​California, from July 1 to August 31, 2016, for a period of 62 days. The data involved covered 170 sensors on 8 roads, counted every 5 minutes, totaling 17,856 data. The MCF-TGCN model was developed based on the deep learning framework Pytorch GPU. The graphics card is NVIDIA 3060 and the CPU is Intel i5-6700K. The processed data set is input into the model for training. The K-Fold cross-validation method is used to split the data set, and the hyperparameters optimized by the grid search method are cross-validated 10 times. Specific parameter settings: batch size is 64, training rounds are 500, learning rate is 0.001, number of GCN layers is 2, number of GAT attention heads is 3, TCN expansion rate is 1, 2, 4 and 8, and number of spatiotemporal layers is 3. The Adam optimization algorithm is used to optimize the model parameters.

[0093] As shown in Table 1, in the PEMS04 real traffic flow dataset, the MCF-TGCN model has better prediction performance than other benchmark models, and all three evaluation indicators show that the MCF-TGCN model has the most accurate prediction results. Taking RMSE as the evaluation indicator, the MCF-TGCN model is 21.456%, 18.783% and 11.623% lower than the GWN, DCRNN and ASTGCN models, respectively.

[0094] Table 1 PEMS04 dataset model prediction results

[0095]

[0096] As shown in Table 2, in the PEMS08 real traffic flow dataset, the MCF-TGCN model has better prediction performance than other benchmark models. Its prediction performance under MAE and RMSE evaluation indicators exceeds that of the other six models. 2 The evaluation index is slightly lower than that of the ASTGCN model. Taking RMSE as the evaluation index, the MCF-TGCN model is reduced by 29.614%, 20.766% and 14.513% compared with the GWN, DCRNN and ASTGCN models respectively.

[0097] Table 2 PEMS08 dataset model prediction results

[0098]

[0099] In order to intuitively compare the differences in prediction performance of models based on spatiotemporal feature mining, the present invention uses GWN, DCRNN, ASTGCN and MCF-TGCN models to predict the traffic volume (in units of vehicles) of sensor No. 142 in the PEMS04 highway network from 00:00 on February 19, 2018 (Monday) to 23:55 on February 25, 2018 (Sunday). The visualization of the prediction results is shown in Figure 6 . Figure 6 The visualization result of (a) clearly shows the weekly periodicity of traffic flow, especially during the morning and evening rush hours from Tuesday to Friday, which is particularly regular and in sharp contrast to the traffic pattern on weekends. It is worth noting that on February 19, 2018, the traffic flow characteristics of the day were more consistent with the weekend pattern because it coincided with the US President's Day holiday. The prediction results of all models have similar trends to the actual traffic flow, showing a strong daily periodicity, reflecting that they can effectively depict the basic dynamics of intraday traffic flow. However, as Figure 6 As shown in (b), GWN, ASTGCN, and MCF-TGCN all show significant peaks when predicting the peak traffic volume on Wednesday, but DCRNN's prediction during the evening peak period is relatively flat. In addition, the GWN model seems to be greatly disturbed during the trough stage, resulting in a slight deviation in the predicted value.

[0100] Further analysis of the visualization results of a single model, such as Figure 7 Among the four models, MCF-TGCN has the best data fitting effect, and the model's prediction results are most similar to the changing trend of the actual traffic flow. Figure 7 As shown in (a), the GWN model combines graph convolutional networks to capture spatial features and enhances the pattern recognition ability of time series through fluctuation networks. The model performs well in capturing peak traffic flow in the morning and evening, but some fluctuations in the trough phase may point to room for improvement in long-term dependency modeling. The DCRNN model combines graph convolution with recurrent neural networks, and presents smoother prediction results by simulating the diffusion process of traffic flow and its time dependency. Figure 7 (b) This smoothing may reflect the conservative response of the model in capturing traffic changes during peak hours. The ASTGCN model introduces an attention mechanism to assign weights to spatiotemporal features, such as Figure 7(c) The trend of the prediction results is consistent with the actual data, especially in depicting the intraday periodicity. The MCF-TGCN model considers the impact of internal factors such as vehicle speed and occupancy on vehicle flow, and uses the attention mechanism to fuse the output of multi-layer spatiotemporal graphs. Figure 7 As can be seen in (d), its predictions show high stability and accuracy during both peak and trough periods.

[0101] In order to deeply evaluate the prediction performance of the selected model at different time scales, the present invention conducts a multi-step prediction experiment. The experiment adopts a recursive method, using the prediction output of the current step as the input of the next prediction, and gradually extending the prediction range. This process takes 5 minutes as a step and increases to 30 minutes to compare the performance of the four models as the prediction step changes. Through this method, the experiment not only tests the accuracy of the model in short-term prediction, but also explores its stability and reliability when facing long-term prediction. The multi-step prediction experiment results of PEMS04 are shown in Figure 2. Figure 8 shown. Figure 8 It reflects that as the prediction time increases, the model error generally increases. Compared with other models, the MCF-TGCN model proposed in the present invention shows better prediction performance in medium- and long-term predictions. For DCRNN and GWN, their errors are higher than ASTGCN and MCF-TGCN in all prediction steps, showing poor multi-step prediction capabilities. The performance of the ASTGCN model within 15 minutes is close to that of the MCF-TGCN, but as the step size increases further, the error growth rate of ASTGCN is obvious, which may reflect its sensitivity to uncertainty in dealing with long-term predictions. In contrast, the error growth of the MCF-TGCN model is relatively stable, thanks to the fact that it considers the causal relationship between traffic variables while integrating spatiotemporal features, and strengthens the mining of spatiotemporal dependencies of data, so it shows significant advantages in multi-step prediction tasks.

[0102] To further analyze the performance of the MCF-TGCN model, different module combinations are used: i) MCF-TGCN_CCM: remove the causal relationship extraction module. ii) MCF-TGCN_GNN: remove the gated fusion spatial feature extraction module. iii) MCF-TGCN_TCN: remove the temporal convolution temporal feature extraction module. iv) MCF-TGCN_A: remove the attention fusion output module. By comparing these four simplified variant models with the complete MCF-TGCN model, the ablation experiment aims to analyze the impact of each independent module on the overall performance of the model. Fig. 9As shown in the figure, in the MCF-TGCN model, after removing the gated fusion spatial feature extraction module (MCF-TGCN_GNN), the significant improvement in MAE and RMSE highlights the importance of this module. In contrast, the removal of the causal relationship extraction module (MCF-TGCN_CCM) also leads to a decrease in prediction performance, highlighting its role in reducing errors. The absence of the time series convolution module (MCF-TGCN_TCN) causes a significant drop in performance, especially in RMSE, illustrating its criticality in capturing temporal dependencies. Although the removal of the attention fusion output module (MCF-TGCN_A) affects performance, the change is less obvious than other variants. The complete MCF-TGCN model shows the best performance, verifying the importance of each component of the model in maintaining the overall performance and indicating the relative importance of different modules in the model composition.

[0103] The existing prediction methods often only focus on the single feature of traffic flow, and do not fully consider the complex interaction between vehicle speed, occupancy and traffic volume. Based on the analysis of existing work, this paper proposes a multi-factor causal fusion enhanced temporal graph convolutional network (MCF-TGCN), which combines CCM, GCN, GAT, TCN and multi-head self-attention mechanism to improve the performance of traffic flow prediction. First, the convergent cross-mapping algorithm is used to analyze the causal relationship between multiple factors of nodes, and the causal coefficient matrix that integrates multiple traffic states is obtained to enhance the expression ability of node association features. Then, a spatial feature extraction module based on the gated fusion network is designed to improve the processing ability of non-Euclidean data. In addition, a temporal feature extraction module based on the temporal convolutional network is designed to effectively capture long-term time dependencies. Finally, a fusion output module based on the attention mechanism is constructed to obtain the MCF-TGCN prediction model. The real traffic flow datasets of PEMS04 and PEMS08 are used for verification. The experimental results show that the performance of the MCF-TGCN model is significantly better than other models, and it can be applied to actual highway networks to improve the traffic efficiency of traffic networks.

Claims

1. A traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network, characterized by: The multi-factor causal fusion enhanced temporal graph convolutional network includes stacked spatiotemporal layers and output layers; The spatiotemporal layer receives the vehicle speed, occupancy rate and vehicle flow data of the internal vehicle nodes, and forms a training result after being processed by several spatiotemporal layers. The specific steps include: Step 1: Calculate the causal relationship between the vehicle speed, occupancy rate and traffic flow of the vehicle node, and obtain the causal coefficient matrix that integrates multiple traffic state information; Step 2: The traffic flow data is sent to the graph convolution network and the graph attention network respectively. The causal coefficient matrix is ​​used as auxiliary information to enhance the graph convolution network. The outputs of the graph convolution network and the graph attention network are respectively subjected to Hadamard product operations with the weight matrix, and the results are added to extract spatial features. Step 3: Input the extracted spatial features into the temporal convolutional network to capture the temporal dependency, output the temporal convolutional network, and input the extracted temporal features into the next spatiotemporal layer; Step 4: Repeat steps 1 to 3 until all the spatiotemporal layers are processed, and send the final training results to the output layer; The output layer uses a multi-head self-attention mechanism to fuse the spatial features and temporal features extracted from multiple spatiotemporal layers, and outputs the final prediction value.

2. According to claim 1, a traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network is characterized by: Step 1 specifically includes: Step 1.1: Normalize the vehicle speed and occupancy rate and perform weighted fusion; Step 1.2: Use the convergent cross-mapping algorithm to calculate the causal relationship between the results of step 1.1 and the traffic flow, and obtain the causal coefficient matrix C; Step 1.3: Apply the Softmax function to each row of C to normalize it and obtain the causal coefficient matrix that integrates multiple traffic state information as auxiliary information to enhance the graph convolutional network.

3. According to claim 1, a traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network is characterized by: The calculation formula of the graph convolutional network is as follows: in, represents the adjacency matrix with added self-connection, A represents the adjacency matrix, express The degree matrix of X f (z, t) represents the traffic volume measured by N sensors in the T period; W0 and W1 represent the weights of the 0th and 1st layers of the graph convolutional network, respectively; ReLU(·) is the ReLU activation function, and σ(·) is the Sigmoid activation function; Represents the output of the graph convolutional network.

4. According to claim 1, a traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network is characterized by: The calculation formula of the graph attention network is as follows: in, is the self-attention coefficient of the kth head of the graph attention network; W k represents the weight matrix of the kth head; σ(·) is the Sigmoid activation function; X f (z j ,t) represents the input feature of i’s neighbor node j, Represents the output of the graph attention network.

5. The traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network according to claim 1 is characterized by: The weight matrix is ​​obtained by performing a linear transformation on the initial input matrix.

6. The traffic flow prediction method based on multi-factor causal fusion enhanced temporal graph convolutional network according to claim 1 is characterized by: The Log-Cosh loss function is used to measure the error between the true value of the average speed of the road network detection point and the predicted value, and the Adam optimization algorithm is used to optimize the hyperparameters of the spatiotemporal layer.

7. A traffic flow prediction system based on multi-factor causal fusion enhanced temporal graph convolutional network, characterized by: It includes stacked spatiotemporal layers and output layers, wherein the spatiotemporal layer is composed of a causal relationship extraction module, a gated fusion spatial feature extraction module, and a sequential convolutional temporal feature extraction module connected in series; The causal relationship extraction module is used to calculate the causal relationship between the vehicle speed, occupancy rate and vehicle flow of the vehicle node, and obtain a causal coefficient matrix integrating multiple traffic state information; The gated fusion spatial feature extraction module fuses the graph attention network and the graph convolution network to extract spatial features of the traffic flow data; The causal coefficient matrix is ​​used as auxiliary information to enhance the graph convolutional network; The time series convolution time feature extraction module is used to capture the time features of vehicle flow data; The output layer uses a multi-head self-attention mechanism to fuse the spatial features and temporal features extracted from multiple spatiotemporal layers, and outputs the final prediction value.

8. The traffic flow prediction system based on multi-factor causal fusion enhanced temporal graph convolutional network according to claim 7 is characterized by: The causal relationship extraction module uses a convergent cross-mapping algorithm to calculate the causal relationship between the vehicle speed, occupancy rate and vehicle flow of the vehicle node.

Citation Information

Cited By

  • Weather detection method and system based on meteorological rainfall radar, and storage medium

    CN119414495A

  • Road transportation capacity distribution prediction method integrating long-term and short-term fluctuation trends

    CN119623763A

  • A method for predicting the distribution of road transport capacity by integrating long and short-term fluctuation trends

    CN119623763B

  • Method for predicting residual service life of aero-engine

    CN119720075A

  • Unmanned aerial vehicle flow prediction method and device

    CN119808835A