Traffic flow prediction method and system based on space-time progressive fusion

By employing a spatiotemporal progressive fusion approach and utilizing adaptive embedding and cross-attention mechanisms, this method addresses the issues of static spatial dependency modeling and shallow spatiotemporal feature fusion in traffic flow prediction, thereby achieving high-precision traffic flow prediction.

CN121640720AActive Publication Date: 2026-03-10QUFU NORMAL UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods are static in their spatial dependency modeling, ignoring the dynamic propagation characteristics of traffic flow, and their spatiotemporal feature fusion is shallow, making it difficult to fully integrate the complementary information of spatiotemporal features, which affects prediction performance.

Method used

A spatiotemporal progressive fusion approach is adopted to acquire the operational status and periodic features of traffic data. Adaptive embedding representation and cross-attention mechanism are used to realize the temporal perception spatial dependency learning between nodes. The temporal perception spatial features and time features are fused through a two-stage cross-attention mechanism to generate high-quality spatiotemporal collaborative feature representation.

Benefits of technology

Accurately depicting the spatiotemporal propagation patterns of traffic data improves the accuracy and robustness of traffic flow prediction, enabling high-precision prediction results in various complex traffic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640720A_ABST
    Figure CN121640720A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of traffic flow prediction, and particularly relates to a traffic flow prediction method and system based on spatio-temporal progressive fusion, which effectively learns spatial dependence between traffic nodes along with time by taking a historical time sequence mode of the nodes as a context of spatial dependence learning. Accurately depicting a space-time propagation rule of traffic data in a road network; progressive interaction and mutual enhancement of time features and space features are realized through a two-stage cross attention mechanism, and the precision of traffic flow prediction is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of traffic flow prediction, and particularly relates to a traffic flow prediction method and system based on spatiotemporal progressive fusion. BACKGROUND

[0002] Traffic flow prediction is a core technology for urban traffic management and optimization. It achieves accurate estimation of future traffic flow in a specific period, road section or region by mining the rules of historical traffic data, road network topology and related factors, thereby providing support for traffic control decisions and travel path planning. However, traffic data has complex spatiotemporal characteristics. In the time dimension, it presents multi-level periodicity such as within-day and within-week, and in the spatial dimension, it has complex dependent relationships such as road congestion diffusion and upstream and downstream flow interaction, making it a key challenge to accurately model spatiotemporal dependencies in traffic flow prediction.

[0003] Traditional prediction methods such as autoregressive integrated moving average model (ARIMA) and Kalman filter are based on linear time series analysis framework, which can only handle stationary linear data and ignore the spatial dependency brought by road network topology. At the same time, they have the defects of high computational complexity and low prediction accuracy when facing large-scale data. In recent years, the Transformer model has been widely used in traffic flow prediction due to its excellent sequence modeling ability and parallel computing advantage. Some studies have captured local and global spatial dependencies through spatial mask self-attention mechanism and fused spatiotemporal features through concatenation and linear projection. Some have modeled static and dynamic spatial dependencies through spectral graph convolution and self-attention mechanism, respectively, and input them into the time attention module to extract time sequence features. Some have adaptively captured spatial dependencies through self-attention and graph convolution, and independently extracted time features before weighted fusion of spatiotemporal features.

[0004] Although existing methods based on Transformer have made some progress, there are still two major problems: first, the spatial dependency modeling is static, and existing methods mostly calculate the spatial dependency between nodes independently within a single time step, ignoring the dynamic propagation characteristics of traffic flow, which makes the spatial attention score unable to accurately reflect the actual traffic flow propagation rule; second, the spatiotemporal feature fusion is shallow, and existing methods mostly use serial or parallel architecture to model time and spatial dependencies respectively, lack of deep interaction mechanism, and are difficult to fully integrate the complementary information of spatiotemporal features, limiting the learning ability of complex spatiotemporal patterns and affecting the prediction performance. SUMMARY

[0005] To solve the problems in the background art, the present application provides a traffic flow prediction method and system based on spatiotemporal progressive fusion.

[0006] The technical solution of the present application is as follows: The present application provides a traffic flow prediction method based on spatiotemporal progressive fusion, comprising: S1: Obtain the running state feature of the traffic data, and obtain the running state embedding representation through feature mapping and dimension transformation; Obtain the periodic feature of the traffic data, and obtain the periodic feature embedding representation through the preset learnable periodic embedding dictionary; The running state embedding representation, the periodic feature embedding representation, and the adaptive embedding representation are spliced along the feature dimension to obtain the spatiotemporal feature representation; S2: Take the basic observation unit of the traffic data as a node, and calculate the feature similarity of the node in the time dimension based on the spatiotemporal feature representation, taking the feature similarity as the attention weight, and weighting and aggregating the historical T time step features of the node to generate the time feature representation of the node; The node is denoted as n = 1, 2,..., N, and N is the total number of nodes. The feature similarity of the node in the time dimension is calculated based on the spatiotemporal feature representation, and the feature similarity is taken as the attention weight to weight and aggregate the historical T time step features of the node to generate the time feature representation of the node. The time feature representation of the node is spliced with the time window of T to construct the historical time sequence feature of the node. The historical time sequence feature of the node is processed by three independent feedforward neural networks to calculate the similarity between nodes and generate the time sequence perception spatial feature representation of the node. The time feature representation and the time sequence perception spatial feature representation of each node are aggregated along the node dimension to obtain the overall time feature and the time sequence perception spatial feature. S3: The time sequence perception spatial feature and the time feature are fused through a two-stage cross-attention mechanism to obtain the spatiotemporal collaborative feature representation; and after full connection processing, the traffic flow prediction result of the future T' time steps is obtained.

[0007] Based on the above prediction method, the spatiotemporal collaborative feature representation is obtained by fusing the time sequence perception spatial feature and the time feature through a two-stage cross-attention mechanism, as described in S3, specifically: In the first stage, the time feature is taken as the query, the time sequence perception spatial feature is taken as the key and the value, and the enhanced time feature is obtained through the cross-attention mechanism processing. In the second stage, the time sequence perception spatial feature is taken as the query, and the enhanced time feature is taken as the key and the value, and the spatiotemporal collaborative feature representation is obtained through the cross-attention mechanism processing.

[0008] Based on the above prediction method, the time sequence perception spatial feature representation of the node is generated by calculating the similarity between nodes after processing the historical time sequence feature of the node through three independent feedforward neural networks, as described in S2, specifically: After processing the historical time sequence feature of the node through three independent feedforward neural networks, the query vector, the key vector, and the value vector are obtained, and the similarity between nodes is calculated through weighted fusion and aggregation with other nodes to generate the time sequence perception spatial feature representation of the node.

[0009] Further, the formula is: , , Get the query vector Key vector Value vector ; In the formula, Represents a node Historical chronological characteristics; , , This represents three independent feedforward neural networks.

[0010] Based on the above prediction method, the operational status characteristics of the traffic data mentioned in S1 include traffic flow, vehicle speed, and road occupancy.

[0011] Based on the above prediction method, the adaptive embedding representation in S1 is obtained by iteratively updating the adaptive embedding matrix based on the spatiotemporal distribution characteristics of traffic data.

[0012] Based on the above prediction method, the splicing time window S2 is represented by the time feature of T. The historical time series feature of this node is constructed by the formula: Achieve; where, Indicates the first The node at the th The temporal features of each time step are represented.

[0013] This invention also provides a traffic flow prediction system based on spatiotemporal progressive fusion, comprising: Spatiotemporal feature representation construction module: used to acquire the operational status features of traffic data, and obtain the operational status embedded representation through feature mapping and dimensional transformation; The periodic features of traffic data are obtained and encoded using a pre-defined learnable periodic embedding dictionary to obtain a periodic feature embedding representation. The runtime state embedding representation, the periodic feature embedding representation, and the adaptive embedding representation are concatenated along the feature dimension to obtain the spatiotemporal feature representation; Feature extraction module: Using basic observation units of traffic data as nodes, it performs feature extraction on the first... 1 node =1,2,...,N, where N is the total number of nodes. Based on the spatiotemporal feature representation, the feature similarity of the node in the time dimension is calculated. This feature similarity is used as the attention weight, and the features of the node's historical T time steps are aggregated in a weighted manner to generate the temporal feature representation of the node. By splicing together the time feature representation with a time window of T, the historical time series features of this node are constructed. The historical temporal features of the node are processed by three independent feedforward neural networks to calculate the similarity between nodes and generate a temporal-aware spatial feature representation of the node. The temporal feature representations and temporal-aware spatial feature representations of each node are aggregated according to the node dimension to obtain the overall temporal feature and temporal-aware spatial feature. Feature fusion and prediction module: It is used to fuse temporal and spatial features through a two-stage cross-attention mechanism to obtain a spatiotemporal collaborative feature representation; after fully connected processing, it obtains the traffic flow prediction results for the next T′ time steps.

[0014] Based on the above prediction system, the feature fusion and prediction module fuses temporal-aware spatial features and temporal features through a two-stage cross-attention mechanism to obtain a spatiotemporal co-representation, specifically: The first stage uses time features as queries and time-aware spatial features as keys and values. Through cross-attention mechanism processing, enhanced time features are obtained. The second stage uses temporally-aware spatial features as queries and enhanced temporal features as keys and values. After processing through a cross-attention mechanism, a spatiotemporal collaborative feature representation is obtained.

[0015] Based on the above prediction system, the feature extraction module processes the historical time-series features of the node through three independent feedforward neural networks, calculates the similarity between nodes, and generates a time-aware spatial feature representation of the node, specifically: The historical time-series features of the node are processed by three independent feedforward neural networks to obtain query vector, key vector, and value vector. The similarity between nodes is calculated by weighted fusion and aggregated with other nodes to generate the time-aware spatial feature representation of the node.

[0016] Beneficial effects This invention overcomes the limitation of single-time-step spatial features in characterizing dynamic spatial dependencies by using the historical temporal patterns of nodes as the context for spatial dependency learning. It realizes a temporally-aware spatial dependency learning mechanism, which effectively learns the temporal spatial dependencies between traffic nodes through a graph-structure-free method, accurately characterizes the spatiotemporal propagation patterns of traffic data in the road network, and provides a high-quality spatial representation for traffic flow prediction.

[0017] This invention achieves progressive interaction and mutual enhancement of temporal and spatial features through a two-stage cross-attention mechanism, fully integrating the complementary information of temporal and spatial features. It can more accurately capture the complex spatiotemporal dependencies in traffic data, providing more expressive feature representations for traffic flow prediction, thereby further improving the accuracy of traffic flow prediction. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the framework of the traffic flow prediction method based on spatiotemporal progressive fusion in Example 1.

[0019] Figure 2This is a comparison chart of the 5-minute predicted values ​​and actual values ​​of the traffic flow prediction method based on spatiotemporal progressive fusion in Example 1.

[0020] Figure 3 This is a comparison chart of the 1-hour predicted and actual values ​​of the traffic flow prediction method based on spatiotemporal progressive fusion in Example 1. Detailed Implementation

[0021] The following examples are intended to illustrate the present invention, and not to further limit the invention.

[0022] Example 1 like Figure 1 As shown, this embodiment provides a traffic flow prediction method based on spatiotemporal progressive fusion, including: S1: Obtain the operational status features of traffic data, and obtain the operational status embedding representation through feature mapping and dimensional transformation.

[0023] The weekly and daily cyclical features of traffic data are obtained and encoded using a pre-defined learnable periodic embedding dictionary to obtain a cyclical feature embedding representation.

[0024] The runtime state embedding representation, the periodic feature embedding representation, and the adaptive embedding representation are concatenated along the feature dimension to obtain the spatiotemporal feature representation.

[0025] The specific steps are as follows: S11: Obtain the operational status features of traffic data. These operational status features are numerical features reflecting traffic operation conditions, including traffic flow, vehicle speed, and road occupancy. The operational status features are then mapped and dimensionally transformed using a feature mapping network to extract the operational status feature information from the traffic data, resulting in an embedded representation of the operational status.

[0026] The weekly and daily cyclical features of traffic data are acquired and encoded using a pre-defined learnable periodic embedding dictionary to obtain a periodic feature embedding representation. These periodic features characterize the cyclical variation patterns of traffic data over time, including weekly and daily cyclical variation patterns.

[0027] Obtain the adaptive embedding representation, which is obtained by iteratively updating the adaptive embedding matrix based on the spatiotemporal distribution characteristics of traffic data during the training process of the prediction model corresponding to this prediction method.

[0028] Among them, the spatiotemporal distribution characteristics of traffic data include the spatial distribution differences of operational status features at different nodes, the differentiated adaptation rules of weekly or daily periodic features at each node, the dynamic fluctuation characteristics of operational status at different time steps of the same node, and the evolution rules of spatial correlation between nodes over time; and the update process is coordinated with the feature interaction logic of temporal perception spatial feature extraction and two-stage cross-attention fusion in S2, so that the adaptive embedding representation can dynamically adapt to the spatiotemporal evolution characteristics of traffic flow and realize the dynamic adaptive optimization of feature representation.

[0029] S12: The running state embedding representation, the periodic feature embedding representation, and the adaptive embedding representation are concatenated along the feature dimension to obtain the spatiotemporal feature representation.

[0030] S2: Using the basic observation unit of traffic data as the node, for the first... 1 node =1,2,...,N, where N is the total number of nodes. Based on the spatiotemporal feature representation, the feature similarity of the node in the time dimension is calculated. This feature similarity is used as the attention weight, and the features of the node's historical T time steps are aggregated in a weighted manner to generate the temporal feature representation of the node.

[0031] By splicing together time feature representations with a time window of T, the historical time series features of this node are constructed. .

[0032] In this embodiment, the formula is: Achieve; where, Indicates the first The node at the th The temporal features of each time step are represented.

[0033] The historical temporal features of this node are processed by three independent feedforward neural networks. The similarity between nodes is calculated to generate a temporal-aware spatial feature representation of this node, specifically: The historical time-series features of the node are processed by three independent feedforward neural networks to obtain query vector, key vector, and value vector. The similarity between nodes is calculated by weighted fusion and aggregated with other nodes to generate the time-aware spatial feature representation of the node.

[0034] In this embodiment, the formula is: , , Get the query vector Key vector Value vector .

[0035] In the formula, Represents a node Historical chronological characteristics; , , This represents three independent feedforward neural networks, where , Historical time sequence characteristics Compress to dimension, Feature dimensions and Same dimensions.

[0036] The time feature representations and time-aware spatial feature representations obtained independently by each node are aggregated according to the node dimension to obtain the overall time feature and time-aware spatial feature.

[0037] In this embodiment, the formula is: The temporal features of all nodes are integrated. Time characteristics were obtained. .

[0038] Through the formula: Integrating the temporal-aware spatial feature representations of all nodes To obtain temporally perceived spatial features .

[0039] This invention overcomes the limitation of single-time-step spatial features in characterizing dynamic spatial dependencies by using the historical temporal patterns of nodes as the context for spatial dependency learning. It realizes a temporally-aware spatial dependency learning mechanism, which effectively learns the temporal spatial dependencies between traffic nodes through a graph-structure-free method, accurately characterizes the spatiotemporal propagation patterns of traffic data in the road network, and provides a high-quality spatial representation for traffic flow prediction.

[0040] S3: By fusing temporal and spatial features through a two-stage cross-attention mechanism, a spatiotemporal collaborative feature representation is obtained; after fully connected processing, the traffic flow prediction results for the next T′ time steps are obtained.

[0041] The specific steps are as follows: S31: By fusing temporally-aware spatial and temporal features through a two-stage cross-attention mechanism, a spatiotemporal collaborative feature representation is obtained, specifically: S311: The first phase is characterized by time. As a query, spatial features are perceived in a time sequence. As keys and values, they are processed through a cross-attention mechanism to obtain enhanced temporal features. .

[0042] S312: The second stage uses temporal perception of spatial features Enhance time features for queries. For keys and values, a cross-attention mechanism is used: the similarity between the query and the key-value pair is calculated as a weight to extract features associated with spatial features, resulting in a spatiotemporal co-representation. .

[0043] S32: Spatiotemporal Co-representation of Features The fully connected processing is used for mapping to obtain the traffic flow prediction results for the next T′ time steps.

[0044] This invention achieves progressive interaction and mutual enhancement of temporal and spatial features through a two-stage cross-attention mechanism, fully integrating the complementary information of temporal and spatial features. It can more accurately capture the complex spatiotemporal dependencies in traffic data, providing more expressive feature representations for traffic flow prediction, thereby further improving the accuracy of traffic flow prediction.

[0045] Example 2 This embodiment provides a traffic flow prediction system based on spatiotemporal progressive fusion, including: Spatiotemporal feature representation construction module: used to acquire the operational status features of traffic data, and obtain the operational status embedded representation through feature mapping and dimensional transformation; The weekly and daily cyclical features of traffic data are obtained and encoded using a pre-defined learnable periodic embedding dictionary to obtain a periodic feature embedding representation. The runtime state embedding representation, the periodic feature embedding representation, and the adaptive embedding representation are concatenated along the feature dimension to obtain the spatiotemporal feature representation.

[0046] Feature extraction module: Using basic observation units of traffic data as nodes, it performs feature extraction on the first... 1 node =1,2,...,N, where N is the total number of nodes. Based on the spatiotemporal feature representation, the feature similarity of the node in the time dimension is calculated. This feature similarity is used as the attention weight, and the features of the node's historical T time steps are aggregated in a weighted manner to generate the temporal feature representation of the node. By splicing together the time feature representation with a time window of T, the historical time series features of this node are constructed. The historical temporal features of the node are processed by three independent feedforward neural networks to calculate the similarity between nodes and generate a temporal-aware spatial feature representation of the node. The time feature representations and time-aware spatial feature representations obtained independently by each node are aggregated according to the node dimension to obtain the overall time feature and time-aware spatial feature.

[0047] Preferably, the feature extraction module processes the historical temporal features of the node through three independent feedforward neural networks, calculates the similarity between nodes, and generates a temporal-aware spatial feature representation of the node, specifically as follows: The historical time-series features of the node are processed by three independent feedforward neural networks to obtain query vector, key vector, and value vector. The similarity between nodes is calculated by weighted fusion and aggregated with other nodes to generate the time-aware spatial feature representation of the node.

[0048] Feature fusion and prediction module: It is used to fuse temporal and spatial features through a two-stage cross-attention mechanism to obtain a spatiotemporal collaborative feature representation; after fully connected processing, it obtains the traffic flow prediction results for the next T′ time steps.

[0049] Preferably, the feature fusion and prediction module fuses temporal and spatial features through a two-stage cross-attention mechanism to obtain a spatiotemporal collaborative feature representation, specifically as follows: The first stage uses time features as queries and time-aware spatial features as keys and values. Through cross-attention mechanism processing, enhanced time features are obtained. The second stage uses temporally-aware spatial features as queries and enhanced temporal features as keys and values. After processing through a cross-attention mechanism, a spatiotemporal collaborative feature representation is obtained.

[0050] The prediction system provided by this invention utilizes the temporal patterns of historical time windows and the location information of nodes to effectively learn the spatial dependencies between traffic nodes over time, accurately depicting the spatiotemporal propagation patterns of traffic data in the road network. Through a multi-layered cross-attention mechanism, it achieves progressive interaction and mutual reinforcement between temporal and spatial features, enabling more accurate capture of complex spatiotemporal dependencies in traffic data, thereby further improving the accuracy of traffic flow prediction.

[0051] Example 3 To verify the effectiveness of this invention, its performance in terms of traffic flow prediction is tested below.

[0052] 1. Dataset This invention was tested on four benchmark traffic flow prediction datasets: PEMS03, PEMS04, PEMS07, and PEMS08, to verify its performance. All four datasets are from the California Department of Transportation Performance Measurement System (PEMS), employing a uniform data collection granularity, recording at 5-minute intervals, generating 12 data frames per hour. Table 1 shows the number of nodes, total time step, data collection start time, data collection end time, data missing rate, and recorded signal type (F represents flow, S represents speed, and O represents occupancy) for the four datasets, providing a complete data foundation for subsequent modeling and analysis.

[0053] Table 1 Traffic Flow Prediction Dataset

[0054] 2. Evaluation Indicators This invention uses three metrics—Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Square Error (RMSE)—to evaluate the effectiveness of traffic flow prediction methods. MAE calculates the average error across a set of predictions, regardless of the direction of the error; MAPE expresses the error as a percentage of the actual value, and this standardization method makes it easier to compare errors at different data scales; RMSE quantifies the square root of the average of the squared differences between predicted and actual values, penalizing larger errors more severely.

[0055] 3. Comparative Analysis of Experimental Results To better demonstrate the effectiveness of the traffic flow prediction method (STPF) of this invention, it was compared with other comparative methods. The comparative methods used were ASTGCN, PDFormer, MVSTT, STAEformer, DSTSPYN, and ASTEGCN.

[0056] ASTGCN: This method proposes a spatiotemporal graph convolutional network based on an attention mechanism, which models the recent dependence, daily periodicity, and weekly periodicity of traffic flow data through spatiotemporal attention and spatiotemporal convolution.

[0057] PDFormer: This method proposes a propagation delay-aware dynamic long-range Transformer that captures dynamic spatial dependencies at both long-range and short-range scales, explicitly modeling the time delay of spatial information propagation.

[0058] MVSTT: This method proposes a multi-perspective spatial and temporal learning framework, which designs sub-modules from both temporal and spatial perspectives, and then performs cross-perspective fusion.

[0059] STAEformer: This method proposes a spatiotemporally adaptive embedded component that enhances the performance of Transformer in traffic flow prediction.

[0060] DSTSPYN: This method proposes a dynamic spatiotemporal similarity pyramid network that dynamically adjusts the weights of center, edge, and global spatiotemporal features through an enhanced attention mechanism and a pyramid-gated convolutional structure.

[0061] ASTEGCN: This method proposes an adaptive spatiotemporally enhanced graph convolutional network that extracts spatial correlations from a dual perspective through local graph convolutions and node-adaptive graph convolutions, and then extracts temporal correlations between continuous and discontinuous time steps from two different angles.

[0062] Table 2 presents the prediction performance of the STPF method of this invention on the PEMS03 dataset compared to other methods. The PEMS03 dataset faces unique challenges; its traffic flow mean and standard deviation exhibit a significant nonlinear and scattered relationship, and it also displays unstable traffic patterns, contrasting sharply with the other three datasets (PEMS04, PEMS07, and PEMS08). Under these data characteristics, the STPF method of this invention still achieves the best mean absolute error (MAE) and maintains a top-three ranking in root mean square error (RMSE), approaching the optimal method ASTEGCN.

[0063] Table 2. Performance comparison of the STPF method of this invention with other comparative methods on the PEMS03 dataset.

[0064] Table 3 presents the prediction performance of the STPF method of this invention on the PEMS04 dataset compared with other methods. For the PEMS04 dataset with a high data missing rate, the STPF method of this invention achieves the best results in terms of mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). This highlights the strong robustness of the STPF method in the presence of noise and data missing, which is an important advantage for real-world scenarios where node data may be sporadic or unreliable. Although the dataset has a high proportion of missing data, its traffic flow still has a clear overall distribution, allowing STPF to effectively suppress the impact of data missing through co-modeling of spatiotemporal features.

[0065] Table 3. Performance comparison of the STPF method of this invention with other comparative methods on the PEMS04 dataset.

[0066] Table 4 presents the prediction performance of the STPF method of this invention on the PEMS07 dataset compared with other methods. The PEMS07 dataset has the largest number of nodes, but its traffic flow still exhibits a relatively clear distribution overall. This allows the STPF method of this invention to still achieve the best performance in mean absolute error (MAE) and reach a tie-best level in mean absolute percentage error (MAPE), indicating that the STPF method of this invention has advantages in modeling mainstream traffic conditions.

[0067] Table 4. Performance comparison of the STPF method of this invention with other comparative methods on the PEMS07 dataset.

[0068] Table 5 presents the prediction performance of the STPF method of this invention on the PEMS08 dataset compared to other methods. The STPF method of this invention performs particularly well on the PEMS08 dataset, achieving optimal results in MAE, RMSE, and MAPE. The PEMS08 dataset has fewer nodes and a lower missing data rate, with smaller traffic flow fluctuations, indicating that the STPF method of this invention is very suitable for datasets with stable traffic conditions.

[0069] Table 5. Performance comparison of the STPF method of this invention with other comparative methods on the PEMS08 dataset.

[0070] As can be seen from the above, the prediction method of the present invention exhibits excellent performance and robustness in multi-dataset experiments. In particular, on the PEMS04 dataset with a high data missing rate and the PEMS07 dataset with a large number of nodes, the MAE, RMSE, MAPE and other indicators are better than or close to the existing mainstream methods. On the PEMS08 dataset with stable traffic patterns, it achieves the best performance across all indicators and is suitable for a variety of complex traffic scenarios.

[0071] To further verify the effectiveness of the prediction method proposed in this invention, sensor number 14 in the PEMS08 dataset was selected for a case study. The prediction results of this invention were evaluated over a 48-hour period from 00:00 on August 26, 2016 to 00:00 on August 28, 2016. Figure 2 The comparison between actual traffic flow and 5-minute predicted traffic flow is shown. The predicted values ​​of the model corresponding to the prediction method of this invention are in good agreement with the actual measured values ​​of traffic flow, and can accurately capture short-term fluctuations and subtle changes. Figure 3 The invention demonstrates a comparison between actual traffic flow and 1-hour predicted traffic flow. The prediction method of this invention successfully captures the overall trend and periodic pattern over two days and maintains reliable prediction results even over longer time periods.

[0072] This case study demonstrates that the prediction method of this invention can achieve high-precision short-term predictions while generating reliable long-term predictions, effectively simulating traffic dynamics across multiple time scales. The results confirm that the model can closely fit actual traffic flow, showcasing its powerful predictive performance and practical applicability in real-world traffic prediction tasks.

Claims

1. A traffic flow prediction method based on spatiotemporal progressive fusion, characterized in that, Comprise: S1: obtain the running state feature of traffic data, get the running state embedding representation through feature mapping and dimension transformation; Obtain the periodic feature of traffic data, encode through the preset learnable period embedding dictionary, get the periodic feature embedding representation; The running state embedding representation, the periodic feature embedding representation and the adaptive embedding representation are spliced along the feature dimension to obtain the spatio-temporal feature representation; S2: taking the traffic data basic observation unit as a node, calculating the feature similarity of the node in the time dimension based on the space-time feature representation, taking the feature similarity as an attention weight, weighting and aggregating the historical T time step features of the node to generate a time feature representation of the node; =1,2,...,N, N is the total number of nodes, the feature similarity of the node in the time dimension is calculated based on the space-time feature representation, the feature similarity is taken as an attention weight, the historical T time step features of the node are weighted and aggregated to generate a time feature representation of the node;​ Splice the time feature representation of the time window T to construct the historical time sequence feature of the node; After the historical time sequence feature of the node is processed by three independent feedforward neural networks, the similarity between nodes is calculated to generate the time sequence perception space feature representation of the node; Aggregate the time feature representation and the time sequence perception space feature representation of each node according to the node dimension to obtain the overall time feature and time sequence perception space feature; S3: fuse the time sequence perception space feature and the time feature through the two-stage cross attention mechanism to obtain the spatio-temporal collaborative feature representation; After full connection processing, the traffic flow prediction result of the future T' time steps is obtained. 2.The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 1, characterized in that, S3: fuse the time sequence perception space feature and the time feature through the two-stage cross attention mechanism to obtain the spatio-temporal collaborative feature representation, specifically: The first stage takes the time feature as the query, the time sequence perception space feature as the key and the value, and processes through the cross attention mechanism to obtain the enhanced time feature; The second stage takes the time sequence perception space feature as the query and the enhanced time feature as the key and the value, and processes through the cross attention mechanism to obtain the spatio-temporal collaborative feature representation. 3.The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 1, characterized in that, S2: after the historical time sequence feature of the node is processed by three independent feedforward neural networks, the similarity between nodes is calculated to generate the time sequence perception space feature representation of the node, specifically: After the historical time sequence feature of the node is processed by three independent feedforward neural networks, the query vector, the key vector and the value vector are obtained, and the similarity between nodes is calculated by weighted fusion and aggregated with other nodes to generate the time sequence perception space feature representation of the node.

4. The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 3, characterized in that, The query vector, the key vector and the value vector are obtained by the following formulas: , , ;​​​ wherein representing a node historical timing characteristics; , , representing three independent feedforward neural networks.

5. The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 1, characterized in that, S1: the running state feature of traffic data includes traffic flow, vehicle speed and road occupancy.

6. The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 1, characterized in that, S1: the adaptive embedding representation is obtained by iteratively updating the adaptive embedding matrix based on the spatio-temporal distribution characteristics of traffic data.

7. The traffic flow prediction method based on spatio-temporal progressive fusion according to claim 1, characterized in that, S2 the splicing time window is T time characteristic representation, construct this node history time sequence characteristic, for through formula: Realization; In the formula, The first The first Time characteristic representation of the first node at the first time step.

8. A traffic flow prediction system based on spatio-temporal progressive fusion, characterized in that, Comprise: Spatio-temporal feature representation construction module: used for obtaining the running state feature of traffic data, getting the running state embedding representation through feature mapping and dimension transformation; Obtain the periodic feature of traffic data, encode through the preset learnable period embedding dictionary, get the periodic feature embedding representation; The running state embedding representation, the periodic feature embedding representation and the adaptive embedding representation are spliced along the feature dimension to obtain the spatio-temporal feature representation; The feature extraction module takes a basic observation unit of traffic data as a node, calculates a feature similarity of the node in a time dimension based on a space-time feature representation, takes the feature similarity as an attention weight, aggregates a T time step feature of the node in a weighted manner, and generates a time feature representation of the node. =1,2,...,N, N is a total number of nodes,​ Splice the time feature representation of the time window T to construct the historical time sequence feature of the node; After the historical time sequence feature of the node is processed by three independent feedforward neural networks, the similarity between nodes is calculated to generate the time sequence perception space feature representation of the node; Aggregate the time feature representation and the time sequence perception space feature representation of each node according to the node dimension to obtain the overall time feature and time sequence perception space feature; The feature fusion and prediction module is configured to fuse the time-aware spatial features and the time features through a two-stage cross-attention mechanism to obtain a spatio-temporal collaborative feature representation, and to obtain a traffic flow prediction result of T' future time steps after full connection processing.

9. The spatio-temporal progressive fusion based traffic flow prediction system according to claim 8, wherein, The feature fusion and prediction module fuses the time-aware spatial features and the time features through a two-stage cross-attention mechanism to obtain a spatio-temporal collaborative feature representation, specifically as follows: In the first stage, the time features are taken as queries, and the time-aware spatial features are taken as keys and values, and the enhanced time features are obtained through cross-attention mechanism processing; In the second stage, the time-aware spatial features are taken as queries, and the enhanced time features are taken as keys and values, and the spatio-temporal collaborative feature representation is obtained through cross-attention mechanism processing.

10. The spatio-temporal progressive fusion based traffic flow prediction system according to claim 8, wherein, The feature extraction module is configured to calculate the similarity between nodes after processing the historical time sequence features of the node through three independent feedforward neural networks, and generate the time-aware spatial feature representation of the node, specifically as follows: After processing the historical time sequence features of the node through three independent feedforward neural networks, the query vector, the key vector and the value vector are obtained, the similarity between nodes is calculated through weighted fusion, and the time-aware spatial feature representation of the node is generated after aggregation with other nodes.

Citation Information

Patent Citations

  • Traffic flow prediction method based on improved space-time Transform

    CN115273464A

  • Multi-view fusion space-time dynamic graph convolutional network urban traffic flow prediction method

    CN116935649A

  • Traffic flow prediction method based on space-time sequence

    CN119479312A

  • Traffic flow prediction method and device based on global-local space-time dependency interaction

    CN120496328A

  • Traffic flow prediction method and system for dynamic association information fusion space-time network

    CN120766546A