Traffic flow prediction method and storage medium based on spatiotemporal information fusion
By constructing a spatiotemporal information fusion matrix and using a spatiotemporal graph convolution module and a multi-channel gating network module, the spatiotemporal correlation between road network nodes is comprehensively learned, solving the problem that existing technologies have failed to fully consider spatiotemporal correlation and achieving more accurate traffic flow prediction.
Patent Information
- Application Number
- CN202311526445.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-11-15
AI Technical Summary
Existing traffic flow prediction methods fail to fully consider spatiotemporal correlations, especially the temporal similarity between road network nodes and the dependence on different time scales, resulting in inaccurate prediction results.
By constructing spatial graphs, temporal graphs, and temporal similarity graphs, and fusing them into a spatiotemporal information fusion matrix, spatiotemporal information and multi-scale temporal information are extracted using a spatiotemporal graph convolution module and a multi-channel gating network module to comprehensively learn the spatiotemporal relationships between road network nodes.
It improves the accuracy of traffic flow forecasting, captures hidden spatiotemporal dependencies and heterogeneity, and provides more accurate forecast results.
Smart Images

Figure CN117612370B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic flow prediction technology, and more particularly to a traffic flow prediction method and storage medium based on spatiotemporal information fusion. Background Technology
[0002] Traffic flow prediction helps alleviate traffic congestion and improve road resource utilization. However, traditional modeling methods for the spatiotemporal relationship of traffic flow usually only consider the correlation in the time dimension or the spatial dimension, failing to fully consider the spatiotemporal correlation in the modeling of spatiotemporal relationships, resulting in insufficient modeling.
[0003] In existing technologies, some methods construct a spatiotemporal correlation matrix by fusing spatial graphs from adjacent time steps to extract spatiotemporal correlations from traffic data. Additionally, some methods employ similarity calculations to determine the spatial correlation between road network nodes, and then use spatiotemporal graph convolutional network models to predict future traffic flow.
[0004] In traffic flow prediction methods, models based on spatiotemporal correlation matrices can predict future traffic flow well, but most of them only integrate spatial and temporal graphs of adjacent time steps. Models using similarity calculation methods only consider the spatial correlation of road network nodes, lacking consideration of the temporal similarity between nodes. The dilated causal convolution method, used to capture temporal dependencies, lacks awareness of temporal dependencies at different time scales.
[0005] In view of this, the present invention proposes a traffic flow prediction method and storage medium based on spatiotemporal information fusion. Summary of the Invention
[0006] To address the aforementioned shortcomings, this invention provides a traffic flow prediction method and storage medium based on spatiotemporal information fusion. This invention primarily utilizes spatial graphs, temporal graphs, and temporal similarity graphs to fuse them into a spatiotemporal information fusion matrix, capturing hidden spatiotemporal dependencies and comprehensively learning the spatiotemporal relationships between road network nodes. A spatiotemporal graph convolution module is used to extract spatiotemporal information from the spatiotemporal information fusion matrix. A multi-channel gating network module is employed to fuse information at different time scales to obtain multi-scale temporal information. The prediction result is obtained by fusing spatiotemporal information and multi-scale temporal information, resulting in more accurate predictions.
[0007] The technical means employed in this invention are as follows:
[0008] On the one hand, this invention provides a traffic flow prediction method based on spatiotemporal information fusion, including:
[0009] Construct spatial, temporal, and temporal similarity graphs between road network nodes;
[0010] The spatial map, the temporal map, and the temporal similarity map are fused into a spatiotemporal information fusion matrix;
[0011] Spatiotemporal information is extracted from the spatiotemporal information fusion matrix using a spatiotemporal graph convolution module;
[0012] A multi-channel gated convolutional network module is used to extract multi-scale temporal information from the spatiotemporal information fusion matrix;
[0013] The prediction result is obtained by fusing the spatiotemporal information and the multi-scale time information.
[0014] Furthermore, constructing the time similarity graph among the road network nodes includes:
[0015] The time similarity between the road network nodes is calculated using a dynamic time warping algorithm, and the time similarity graph is constructed based on the time similarity.
[0016] Furthermore, the step of extracting spatiotemporal information from the spatiotemporal information fusion matrix using the spatiotemporal graph convolution module includes:
[0017] Multiple spatiotemporal graph convolutional modules with identical structures are used;
[0018] Multiple spatiotemporal graph convolutional modules are trained with spatiotemporal information fusion matrices of different time periods, and each spatiotemporal graph convolutional module corresponds one-to-one with the spatiotemporal information fusion matrix.
[0019] Multiple trained spatiotemporal graph convolutional modules independently and in parallel process the corresponding spatiotemporal information fusion matrix to extract spatiotemporal correlation information and spatiotemporal heterogeneity information.
[0020] Furthermore, the extraction of spatiotemporal correlation information includes:
[0021] The spatiotemporal graph convolution module includes three stacked graph convolutional layers, which extract single spatiotemporal information based on the spatiotemporal information fusion matrix.
[0022] The spatiotemporal correlation information is obtained by performing aggregation and pruning operations on multiple single spatiotemporal information.
[0023] Furthermore, the multi-channel gated convolutional network module extracts multi-scale temporal information from the spatiotemporal information fusion matrix, including:
[0024] The multi-channel gated convolutional network module includes multiple channels, each with a different convolutional kernel and the same activation function. The multiple channels extract multiple traffic data information from the spatiotemporal information fusion matrix, and the multiple traffic data information have different scales.
[0025] The multi-scale time information is obtained by performing splicing, pooling, and nonlinear activation function calculations on multiple traffic data information.
[0026] Furthermore, the step of fusing the spatiotemporal information and the multi-scale temporal information to obtain the prediction result includes:
[0027] The spatiotemporal information and the multi-scale time information are fused and passed through a fully connected network layer to obtain the prediction result.
[0028] On the other hand, the present invention also provides a storage medium comprising a stored program, wherein, when the program is executed, the method described in any of the preceding claims is performed.
[0029] Compared with the prior art, the present invention has the following advantages:
[0030] 1. The traffic flow prediction method and storage medium based on spatiotemporal information fusion provided by this invention fuses spatial graphs, temporal graphs, and temporal similarity graphs into a spatiotemporal information fusion matrix to capture hidden spatiotemporal dependencies and comprehensively learn the spatiotemporal relationships between road network nodes; it uses a spatiotemporal graph convolution module to extract spatiotemporal information from the spatiotemporal information fusion matrix; it uses a multi-channel gating network module to fuse information at different time scales to obtain multi-scale temporal information; and it fuses spatiotemporal information and multi-scale temporal information to obtain prediction results, resulting in more accurate prediction.
[0031] 2. The traffic flow prediction method and storage medium based on spatiotemporal information fusion provided by the present invention uses a spatiotemporal graph convolution module to capture local spatiotemporal correlations, and uses different spatiotemporal graph convolution modules for the spatiotemporal fusion matrix data at different time steps to capture the heterogeneity of spatiotemporal data.
[0032] 3. The traffic flow prediction method and storage medium based on spatiotemporal information fusion provided by this invention are of great significance for discovering potential spatiotemporal dependencies between nodes. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of a traffic flow prediction method based on spatiotemporal information fusion provided by the present invention.
[0035] Figure 2This is another flowchart illustrating the traffic flow prediction method based on spatiotemporal information fusion provided by the present invention.
[0036] Figure 3 This is a schematic diagram of a spatiotemporal information fusion matrix.
[0037] Figure 4 This is a schematic diagram of a spatiotemporal graph convolution module.
[0038] Figure 5 This is a schematic diagram of a multi-channel gated convolutional network module.
[0039] Figure 6 This is a schematic diagram of a process for a spatiotemporal graph convolution module to extract spatiotemporal information from a spatiotemporal information fusion matrix.
[0040] Figure 7 This is a schematic diagram of a process for extracting multi-scale temporal information from a spatiotemporal information fusion matrix for prediction using a multi-channel gated convolutional network module. Detailed Implementation
[0041] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] Combination Figure 1 , Figure 2 , Figure 3 , Figure 4 and Figure 5 , Figure 1 This is a schematic diagram of a traffic flow prediction method based on spatiotemporal information fusion provided by the present invention. Figure 2This is another flowchart illustrating the traffic flow prediction method based on spatiotemporal information fusion provided by the present invention. Figure 3 This is a schematic diagram of a spatiotemporal information fusion matrix. Figure 4 This is a schematic diagram of a spatiotemporal graph convolution module. Figure 5 This is a schematic diagram of a multi-channel gated convolutional network module, illustrating a specific embodiment of the traffic flow prediction method based on spatiotemporal information fusion provided by the present invention, including:
[0044] S1: Construct spatial, temporal, and temporal similarity graphs between road network nodes;
[0045] S2: Merge the spatial map, temporal map, and temporal similarity map into a spatiotemporal information fusion matrix;
[0046] S3: Spatiotemporal information is extracted from the spatiotemporal information fusion matrix using a spatiotemporal graph convolution module;
[0047] S4: A multi-channel gated convolutional network module is used to extract multi-scale temporal information from the spatiotemporal information fusion matrix;
[0048] S5: The prediction results are obtained by fusing spatiotemporal information and multi-scale time information.
[0049] It should be noted that data preparation is performed before step S1, including:
[0050] Calculate the adjacency matrix of the spatial graph, the adjacency matrix of the temporal graph, and the adjacency matrix of the temporally similar graph among the nodes of the road network.
[0051] Understandably, spatial graphs can capture the mutual influence between adjacent nodes in the current time step, while temporal graphs can capture the self-connectivity of the same node in different time steps. Furthermore, since traffic flow data between nodes exhibits time-series similarity, this similarity can be used to reflect flow relationships that the spatial road network structure cannot capture, thus uncovering potential correlations.
[0052] Reference Figure 3 After the spatial map, temporal map, and temporal similarity map are constructed, they are integrated into a spatiotemporal information fusion matrix. This matrix can learn the mutual influence of adjacent nodes in the current time step, the self-connectivity of the same node in different time steps, and the temporal series similarity between nodes. It can obtain the spatiotemporal information of traffic data from different perspectives and learn the spatiotemporal relationship between nodes more comprehensively.
[0053] The traffic flow prediction method based on spatiotemporal information fusion provided by this invention fuses spatial graphs, temporal graphs, and temporal similarity graphs into a spatiotemporal information fusion matrix to capture hidden spatiotemporal dependencies and comprehensively learn the spatiotemporal associations between road network nodes. A spatiotemporal graph convolution module is used to extract spatiotemporal information from the spatiotemporal information fusion matrix. A multi-channel gating network module is used to fuse information at different time scales to obtain multi-scale temporal information. The fusion of spatiotemporal information and multi-scale temporal information yields more accurate prediction results, which is highly significant for uncovering potential spatiotemporal dependencies between nodes. This method can be used not only for traffic flow prediction but also for prediction problems in other directions, demonstrating its value in prediction problems.
[0054] In some optional embodiments, constructing a temporal similarity graph among road network nodes includes:
[0055] The dynamic time warping algorithm is used to calculate the temporal similarity between road network nodes, and a temporal similarity graph is constructed based on the temporal similarity.
[0056] It is understandable that a dynamic time warping algorithm is used to measure the temporal similarity between road network nodes, and a temporal similarity graph is constructed based on the measured temporal similarity.
[0057] In some alternative embodiments, refer to Figure 4 and Figure 6 , Figure 6 This is a flowchart illustrating a process for a spatiotemporal graph convolution module to extract spatiotemporal information from a spatiotemporal information fusion matrix. The extraction of spatiotemporal information from the spatiotemporal information fusion matrix using the spatiotemporal graph convolution module includes:
[0058] Multiple spatiotemporal graph convolutional modules with identical structures are used;
[0059] Multiple spatiotemporal graph convolutional modules are trained with spatiotemporal information fusion matrices for different time periods, and there is a one-to-one correspondence between the spatiotemporal graph convolutional modules and the spatiotemporal information fusion matrices.
[0060] Multiple trained spatiotemporal graph convolutional modules independently and in parallel process the corresponding spatiotemporal information fusion matrix to extract spatiotemporal correlation information and spatiotemporal heterogeneity information.
[0061] Understandably, in Figure 6 The illustration only shows that the spatiotemporal correlation information is extracted first, and then the spatiotemporal heterogeneity information is extracted. Of course, the spatiotemporal heterogeneity information can also be extracted first, and then the spatiotemporal correlation information can be extracted. This implementation does not impose any specific restrictions on this.
[0062] In some alternative embodiments, reference continues to be made to... Figure 4 Extract spatiotemporal correlation information, including:
[0063] The spatiotemporal graph convolution module consists of three stacked graph convolutional layers, which extract single spatiotemporal information based on the spatiotemporal information fusion matrix.
[0064] Multiple individual spatiotemporal information items are aggregated and pruned to obtain spatiotemporal correlation information.
[0065] It should be noted that the relationships between road network nodes are complex, and using only spatial and temporal features to model the spatiotemporal correlation of road network nodes is insufficient. Therefore, a spatiotemporal information fusion matrix is constructed and graph convolution is performed on it to fuse the features of each node with the features of its neighboring nodes in adjacent time steps, in order to build a predictive model that can comprehensively learn node features.
[0066] Understandably, in the spatiotemporal graph convolution module, a graph convolutional network is used to extract rich information contained in the nodes from the constructed spatiotemporal information fusion matrix, updating the feature representations of each node in the road network. Furthermore, the spatiotemporal graph convolution module expands the aggregation region by stacking three graph convolutional layers, capturing a wider range of spatiotemporal correlations. After the graph convolution operation, aggregation and pruning operations are used to remove duplicate features. In addition, spatiotemporal network data also exhibits spatiotemporal heterogeneity. From a spatial perspective, different regions have different functions, leading to significant differences in spatial dependencies within those regions. From a temporal perspective, different time periods within the same region also exhibit different temporal correlations. Therefore, using different spatiotemporal graph convolution modules for data from different time periods, processing the data independently and in parallel, can better capture the heterogeneity of spatiotemporal data.
[0067] In some alternative embodiments, refer to Figure 5 and Figure 7 , Figure 7 This is a flowchart illustrating a process for extracting multi-scale temporal information from a spatiotemporal information fusion matrix using a multi-channel gated convolutional network module for prediction. The extraction of multi-scale temporal information from the spatiotemporal information fusion matrix using the multi-channel gated convolutional network module includes:
[0068] The multi-channel gated convolutional network module includes multiple channels, each with a different convolutional kernel and the same activation function. The multiple channels extract multiple traffic data information from the spatiotemporal information fusion matrix, and the multiple traffic data information have different scales.
[0069] Multi-scale time information is obtained by performing splicing, pooling, and nonlinear activation function calculations on multiple traffic data.
[0070] Understandably, the multi-channel gated convolutional network module integrates the temporal features of multiple receptive domains with multi-scale gated convolutions, enhancing the ability to perceive the temporal dependencies of the road network. The multi-channel gated convolutional network captures traffic data information at different time scales. Each channel uses a convolutional kernel of a different size to capture traffic data information at different time scales, which can increase the receptive field on the time axis and improve the ability to extract sequence dependencies. Based on the different temporal scale information rich in multiple channels, concatenation, pooling, and non-linear activation functions are used to fuse the node feature representations of different channels to obtain the final node representation.
[0071] In some optional embodiments, spatiotemporal information and multi-scale temporal information are fused to obtain the prediction result, including:
[0072] The spatiotemporal information and multi-scale temporal information are fused and the prediction result is obtained through a fully connected network layer.
[0073] Based on the same inventive concept, the present invention also provides a storage medium including a stored program, wherein, when the program is executed, the method described in any of the above embodiments is performed.
[0074] In some optional embodiments, traffic flow data for future time steps is predicted, and three metrics—mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE)—are used to evaluate the generalization performance of the model. The loss between the true and predicted values is calculated using the Hubor Loss loss function, and the parameters of the spatiotemporal graph convolutional module and the multi-channel gated convolutional network module are further optimized.
[0075] In some optional embodiments, four datasets are collected from real-world road networks located in different areas of the California highway network: PEMS03 (traffic data from 358 nodes collected continuously from September 1, 2018 to November 30, 2018), PEMS04 (traffic data from 307 nodes collected continuously from January 1, 2018 to February 28, 2018), PEMS07 (traffic data from 883 nodes collected continuously from May 1, 2017 to August 31, 2017), and PEMS08 (traffic data from 170 nodes collected continuously from July 1, 2016 to August 31, 2016). The raw traffic data is aggregated every 5 minutes, resulting in 12 traffic data points per hour. Simultaneously, a spatial adjacency graph is constructed for each dataset based on the distances within the real-world road network. The data is then processed through a spatiotemporal graph convolutional module and a multi-channel gated convolutional network module to obtain the final traffic prediction values. Record the loss value between the real sample label value and the model prediction value, as well as the index value to evaluate the model's predictive ability.
[0076] The model performance was tested for various parameters and key modules (spatiotemporal graph convolution module and multi-channel gated convolutional network module). The impact of the spatiotemporal fusion matrix dimension and the number of channels in the gated convolutional network on the test results was observed. Model variants were developed, such as removing the spatiotemporal information fusion matrix utilizing temporal similarity maps, removing the spatiotemporal graph convolution module, or removing the multi-channel gated convolutional network module. The model results were evaluated using the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) for different modules; smaller values for these three parameters indicate that the predicted traffic flow values are closer to the actual traffic flow values.
[0077] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0078] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A traffic flow prediction method based on spatiotemporal information fusion, characterized in that, include: Construct spatial, temporal, and temporal similarity graphs between road network nodes; The spatial graph captures the mutual influence between adjacent nodes in the current time step, while the time graph captures the self-connectivity of the same node in different time steps; time series similarity is used to reflect traffic relationships that cannot be reflected by the spatial road network structure, and to discover potential correlations. The spatial map, the temporal map, and the temporal similarity map are fused into a spatiotemporal information fusion matrix; A spatiotemporal graph convolution module is used to extract spatiotemporal information from the spatiotemporal information fusion matrix. Within this module, a graph convolutional network is used to extract rich information from the nodes of the constructed spatiotemporal information fusion matrix, updating the feature representations of each node in the road network. Furthermore, three graph convolutional layers are stacked within the module to expand the aggregation region and capture broader spatiotemporal correlations. After the graph convolution operation, aggregation and pruning operations are used to remove duplicate features. The spatiotemporal network data also exhibits spatiotemporal heterogeneity. Spatially, different regions have different functions, leading to significant differences in spatial dependencies within those regions. Temporally, different time periods within the same region also exhibit different temporal correlations. Different spatiotemporal graph convolution modules are used for data from different time periods, processing the data independently and in parallel to capture the spatiotemporal data heterogeneity. A multi-channel gated convolutional network module is used to extract multi-scale temporal information from the spatiotemporal information fusion matrix; The prediction result is obtained by fusing the spatiotemporal information and the multi-scale time information. 2.The traffic flow prediction method based on spatio-temporal information fusion according to claim 1, characterized in that, Constructing the time similarity graph among the road network nodes includes: The time similarity between the road network nodes is calculated using a dynamic time warping algorithm, and the time similarity graph is constructed based on the time similarity. 3.The traffic flow prediction method based on spatio-temporal information fusion according to claim 1, characterized in that, The step of extracting spatiotemporal information from the spatiotemporal information fusion matrix using a spatiotemporal graph convolution module includes: using multiple spatiotemporal graph convolution modules with identical structures; Multiple spatiotemporal graph convolutional modules are trained with spatiotemporal information fusion matrices of different time periods, and each spatiotemporal graph convolutional module corresponds one-to-one with the spatiotemporal information fusion matrix. Multiple trained spatiotemporal graph convolutional modules independently and in parallel process the corresponding spatiotemporal information fusion matrix to extract spatiotemporal correlation information and spatiotemporal heterogeneity information. 4.The traffic flow prediction method based on spatio-temporal information fusion according to claim 3, characterized in that, The extraction of spatiotemporal correlation information includes: The spatiotemporal graph convolution module includes three stacked graph convolutional layers, which extract single spatiotemporal information based on the spatiotemporal information fusion matrix. The spatiotemporal correlation information is obtained by performing aggregation and pruning operations on multiple single spatiotemporal information.
5. The traffic flow prediction method based on spatio-temporal information fusion according to claim 1 or 2, characterized in that, The multi-channel gated convolutional network module extracts multi-scale temporal information from the spatiotemporal information fusion matrix, including: The multi-channel gated convolutional network module includes multiple channels, each with a different convolutional kernel and the same activation function. The multiple channels extract multiple traffic data information from the spatiotemporal information fusion matrix, and the multiple traffic data information have different scales. The multi-scale time information is obtained by performing splicing, pooling, and nonlinear activation function calculations on multiple traffic data information. 6.The traffic flow prediction method based on spatio-temporal information fusion according to claim 1 or 2, characterized in that, The process of fusing the spatiotemporal information and the multi-scale temporal information to obtain the prediction result includes: The spatiotemporal information and the multi-scale time information are fused and passed through a fully connected network layer to obtain the prediction result.
7. A storage medium, characterized in that, The storage medium includes a stored program, wherein when the program is executed, it performs the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Traffic flow prediction method based on space-time fusion graph neural network
CN114970825A
Short-term traffic flow prediction method based on new deep space-time adaptive fusion graph network
CN115019504A
