Traffic flow prediction method based on cross-scale spatio-temporal feature interactive fusion

Through the cross-scale spatiotemporal and spatial feature interaction fusion model, the accuracy reduction problem of the existing traffic flow prediction model under the complex spatiotemporal and spatial data characteristics is solved, high-precision and robust prediction of traffic flow are achieved, and the model's ability to capture multi-dimensional feature is improved.

CN120260284APending Publication Date: 2025-07-04BEIJING UNIV OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510524973.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

When existing traffic flow prediction models deal with complex spatiotemporal data characteristics, especially when the trend fluctuates greatly or the recent historical characteristics are inconsistent with the actual predicted time step trend, the prediction accuracy often decreases significantly, making it difficult to effectively capture the complex interactive characteristics of intraday and weekly changes.

Method used

The cross-scale spatiotemporal feature interaction fusion model is adopted, and the input historical feature information window and the attention mechanism of cross-scale interaction is expanded, and the ability to capture features in different time dimensions is enhanced. Combined with the multi-level spatiotemporal feature capture module, the cross-scale feature interaction module and the multi-scale feature fusion module to achieve high-precision prediction of traffic flow.

Benefits of technology

The accuracy and generalization ability of traffic flow prediction were significantly improved, especially in capturing complex features of different time dimensions, showing strong robustness and generalization ability. The experimental results show that the prediction accuracy on multiple real traffic flow data sets is significantly better than the original model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120260284A_ABST
    Figure CN120260284A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-scale spatio-temporal feature interactive fusion traffic flow prediction method, which comprises the following steps of: firstly, extracting short-term, periodic and long-term trend features by a spatio-temporal data feature extraction module through multi-level processing on historical time series data, accurately capturing a time trend and spatial dependence in traffic flow data, and extracting a time trend and a spatial dependence in the traffic flow data; and high-quality feature input is provided for subsequent modules. Then, a cross-scale attention mechanism is introduced into the cross-scale feature information exchange module, information interaction between different time scales and hierarchical features is achieved, the expression ability of global features can be enhanced, capturing of local detail information is also considered, and the model can efficiently process a complex space-time dependent structure; and finally, a multi-scale feature fusion module adopts an attention-based progressive fusion strategy to gradually integrate spatial-temporal features of each layer, highlight key features and generate more comprehensive and accurate feature representation, so that a more accurate prediction result is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic flow prediction, and specifically to a traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion. Background Art

[0002] With the development of intelligent transportation systems, people's requirements for the accuracy of traffic flow prediction are also constantly increasing. Traditional prediction methods often have deficiencies in dealing with the complex spatio-temporal data characteristics. In recent years, with the excellent processing capabilities of deep learning techniques demonstrated in the fields of computer vision and natural language processing, researchers in the transportation industry have gradually introduced deep learning methods into traffic flow prediction, hoping to achieve more accurate prediction of traffic flow by virtue of its powerful non-linear modeling ability and automatic feature extraction advantages.

[0003] Deep learning mainly conducts modeling and prediction based on the spatio-temporal correlation of data. Therefore, deep learning-based models are usually divided into two parts: time relationship modeling and space relationship modeling. In traffic flow prediction, time relationship modeling aims to capture the time dependence of traffic flow, including short-term fluctuations and long-term trends; while space relationship modeling focuses on depicting the spatial interaction characteristics between different traffic regions or sections. The effective combination of these two parts is the key to the significant success of deep learning models in traffic flow prediction. In order to better integrate time and space characteristics, spatio-temporal graph convolutional networks have been proposed in recent years, which organically combine time relationship modeling and space relationship modeling, and can simultaneously capture the interaction patterns of time and space features, thus more comprehensively depicting the dynamic changes of traffic flow. This joint modeling method has significantly improved the prediction ability of traffic flow and has become a research hotspot in the current intelligent transportation field. In existing research, spatio-temporal graph neural networks have been widely used to capture spatial and temporal correlations. For example, Yu et al. used graph convolutional modules and one-dimensional convolutional modules respectively to capture spatial and temporal patterns; Wu et al. combined stacked dilated convolutions and graph convolutions with an adaptive dependency matrix to capture dynamic spatio-temporal features; Cao et al. used an adaptive graph convolutional module, TCN, and Bi-LSTM to capture the intrinsic patterns of time series; Li et al. captured spatio-temporal correlations by generating a dynamic adjacency matrix and combining the encoder-decoder architecture model used by GNN and RNN; Bao et al. fused the distance matrix, data correlation matrix, and weather matrix into a complex correlation matrix, and then used GCN and LSTM to capture spatio-temporal correlations; Yan et al. incorporated accident factors into the adjacency matrix and designed a module for dynamically updating the adjacency matrix, and then used a deep learning framework based on GAT and Bi-LSTM to extract complex spatio-temporal correlations between data; Fan et al. used a graph diffusion attention module based on CNN and other data to adjust weights to capture spatial dependence relationships, and a time attention module to capture time correlations.

[0004] Time series data can be classified into two types of characteristics, namely intraday variations and weekly variations, according to time periods. Intraday variations mainly reflect the fluctuation patterns of traffic flow at different times of a day. For example, the traffic flow usually increases significantly during the morning and evening rush hours, while the flow is relatively stable or shows no obvious change during other time periods. Weekly variations reflect the differences in traffic flow between weekdays and weekends. Generally, the traffic flow on weekdays is significantly higher than that on weekends, especially during the morning and evening rush hours. This phenomenon is closely related to the daily commuting needs. On weekends, the overall traffic flow tends to be stable, but the evening rush hour flow may increase significantly due to the increased travel demand. It should be noted that intraday variations and weekly variations do not exist independently, but will interact and influence each other. For example, there are significant differences in the traffic flow characteristics during the morning and evening rush hours on weekdays and the evening rush hour flow on weekends. This complex interaction feature makes the traffic flow data show multi-dimensional regularity and complexity between different time periods. Therefore, when analyzing and modeling traffic flow data, it is necessary to comprehensively consider the change patterns of different time periods to better capture the characteristics of intraday and weekly variations.

[0005] Currently, most models mainly rely on the characteristics of intraday historical data to predict future traffic flow data. This method performs well on datasets with relatively stable or strongly continuous feature trends. However, when the trend fluctuates greatly or the recent historical features are inconsistent with the trend of the actual prediction time step, the prediction accuracy of the model often drops significantly. Summary of the Invention

[0006] A traffic flow prediction model for cross-scale spatio-temporal feature exchange and fusion, such as Figure 1As shown in the figure, the model enhances the ability to capture features in different time dimensions by expanding the input historical feature information window and a cross-scale interaction attention mechanism. Specifically, the input window of the data includes the features of the current time step in the past h hours, the features of the current time step in the past d days, and the features of the current time step in the past w weeks. The cross-scale feature information exchange and fusion mechanism embeds data at different time scales (such as hourly data, daily data, and weekly data) into a unified information representation through fine-grained modeling, fully mining the feature information of each time dimension. This mechanism first captures the short-term fluctuations of hourly data, the intraday change trends of daily data, and the long-term periodic characteristics of weekly data; then effectively filters out invalid information through channel and spatial dual attention mechanisms; finally, reduces the interference that may be introduced in multi-dimensional feature fusion through multi-scale selective fusion, enhancing the accuracy and robustness of feature expression. Through the comprehensive modeling of time-scale features, the model can not only capture local patterns but also better depict global trends, improving the prediction accuracy and generalization ability of complex time series data. To verify the effectiveness of the method, we conducted experiments on six real traffic flow datasets. The experimental results show that the model proposed in this paper has significantly better prediction accuracy than the original model on most datasets, especially showing strong robustness and generalization ability in capturing complex features in different time dimensions.

[0007] To achieve the above object, the present invention adopts the following technical solutions: A traffic prediction method for a spatio-temporal interactive dynamic graph attention network, the method comprising the following steps:

[0008] Step 1: Obtain the historical traffic flow data of each traffic node and perform preprocessing to obtain application data;

[0009] Step 2: Define the traffic prediction problem;

[0010] Step 3: Construct a multi-level spatio-temporal feature capture module;

[0011] Step 4: Construct a cross-scale feature interaction module;

[0012] Step 5: Construct a multi-scale feature fusion module

[0013] Step 6: Divide the collected traffic flow dataset into a training set, a validation set, and a test set, and use the mean absolute error, mean absolute percentage error, and root mean square error as evaluation indicators to evaluate the traffic flow prediction model with cross-scale spatio-temporal feature interaction and fusion.

[0014] Step 1: Process the outliers existing in the traffic data obtained from the sensors. The present invention adopts the Z-Score method to avoid the influence of outliers and extreme values, thereby obtaining the preprocessed application data.

[0015] Step 2: Define the traffic flow prediction problem: Traffic flow prediction refers to analyzing and modeling the traffic flow data at time t and before for a certain road section or area to obtain the traffic flow data at future times. Its model can be expressed as Equation

[0016]

[0017] where is the traffic flow prediction value at time t + 1, X t is the traffic flow data at time t, and τ is the number of time steps of the input traffic flow data. Traffic flow prediction is divided into single-step prediction and multi-step prediction. Specifically, assuming that the traffic flow data collection time interval is τmin, the number of flow sequences collected within 1 hour is 60 / τ. Single-step prediction refers to predicting the traffic flow after τmin in the future; multi-step prediction of traffic flow refers to predicting the traffic flow in the future n steps, that is, predicting the traffic flow after (τ × n)min in the future.

[0018] Step 3-1: The multi-level spatio-temporal feature capture module consists of two parts, as Figure 2 shown. The first part is the feature progressive extraction layer, and the data undergoes multiple pooling and convolution operations to obtain feature information at different depths.

[0019] Step 3-2-1: The second part is the spatio-temporal feature capture layer. The multi-level features respectively obtain multi-level spatio-temporal joint features through the multi-dimensional self-attention graph convolution module and the multi-time pattern capture module. The multi-dimensional self-attention graph convolution module consists of a multi-dimensional dynamic attention matrix construction module, a GCN module, and a feature embedding module. These modules work together to jointly complete the extraction and fusion process from time series data to spatio-temporal features.

[0020] Step 3-2-2: The multi-time pattern capture module is used to capture the global pattern and local pattern of the time series. The module is mainly divided into two parts, the Bi-LSTM for capturing the long-term global pattern and the feed-forward fully connected layer for capturing the short-term local pattern. Finally, the outputs of the two are added together as the output result of the module.

[0021] Step 4: The cross-scale feature interaction module is as Figure 3 shown. It realizes information complementarity between features at different time scales through the cross-scale exchange and fusion mechanism, effectively enhancing the synergistic effect between features, improving the accuracy of global information, and comprehensively capturing multi-dimensional spatio-temporal dependence relationships.

[0022] Step 5-1: The multi-scale feature fusion module is as Figure 4As shown, it combines the temporal attention and node attention mechanisms to effectively generate global weights, thereby dynamically adjusting the importance of features in different time dimensions and enhancing the prediction ability. The temporal attention mechanism first uses multi-scale convolution operations to extract features from the input hourly, daily, and weekly window data respectively. Subsequently, the features extracted by convolution are downsampled through pooling operations to retain key feature information. Finally, a weight distribution in the time dimension is generated through convolution and the Sigmoid activation function, ensuring that the model can dynamically focus on important features at different time points.

[0023] Step 5-2: Node attention mechanism The node attention module performs a non-linear transformation on the features between nodes through 1×1 convolution and ReLU activation, further enhancing the local feature representation ability. Then, the features adjusted by temporal attention and node attention are weighted and fused to generate a global feature representation.

[0024] Step 6: The present invention uses the mean absolute error MAE (representing the average of the absolute errors between the actual value and the predicted value), the mean absolute percentage error MAPE (representing the average of the absolute percentage errors between the actual value and the predicted value), and the root mean square error RMSE (representing the arithmetic square root of the mean square error between the actual value and the predicted value) as evaluation indicators for evaluating the prediction performance of the evaluation module, and their calculations are as follows:

[0025]

[0026] where, y i and are the true value and the predicted value respectively, and N is the number of samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is the structural diagram of the traffic flow prediction model for cross-scale spatio-temporal feature exchange and fusion of the present invention.

[0028] Figure 2 is the structural diagram of the multi-level spatio-temporal feature capture module of the present invention.

[0029] Figure 3 is the structural diagram of the cross-scale feature interaction module of the present invention.

[0030] Figure 4 is the structural diagram of the multi-scale feature fusion module of the present invention.

[0031] Table 1 is the entity table for comparing the traffic flow prediction results of the present invention.

[0032] Table 2 is another entity table for comparing the traffic flow prediction results of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0033] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The present invention obtains a large amount of traffic flow data from the sensors of the urban road network, and performs data cleaning on it. After sorting, the flow value attributes are obtained.

[0034] Step 1: Process the outliers existing in the traffic data obtained from the sensors. The present invention uses the Z-Score method to avoid the influence of outliers and extreme values, so as to obtain the preprocessed application data.

[0035] Step 2: Define the traffic flow prediction problem: Traffic flow prediction refers to analyzing and modeling the traffic flow data at time t and before for a certain road section or area to obtain the traffic flow data at future times. Its model can be expressed as Equation (2-1)

[0036]

[0037] where is the flow prediction value at time t + 1, X t is the traffic flow data at time t, and τ is the number of time steps of the input flow data. Traffic flow prediction is divided into single-step prediction and multi-step prediction. Specifically, assuming that the traffic flow data collection time interval is τmin, the number of flow sequences collected within 1 hour is 60 / τ. Single-step prediction refers to predicting the traffic flow after τmin in the future; multi-step prediction of traffic flow refers to predicting the traffic flow in the future n steps, that is, predicting the traffic flow after (τ × n)min in the future.

[0038] Step 3-1: The present invention adopts a three-layer pyramid structure, and each layer captures the global dependence of the data through a pooling module. The pooling operation focuses on the global information by compressing the feature map, but local potential feature dependencies of the data may be ignored in this process. To make up for this deficiency, we introduce a parallel convolutional module in each layer to extract the local dependence features of the data. Subsequently, by designing a fusion module, the local features extracted by the convolutional module are effectively fused with the global features captured by the pooling module, providing a more comprehensive and detailed data pattern expression for the subsequent spatio-temporal feature capture module. The specific calculation formula of this layer is as follows:

[0039] x1 = x

[0040] x2 = W2(Concat[AvgPool(x1),Conv(x1)]) + b2

[0041] x3 = W3(Concat[AvgPool(x2),Conv(x2)]) + b3

[0042] Step 3-2-1: The multi-dimensional self-attention graph convolution module consists of a multi-dimensional dynamic attention matrix construction module, a GCN module, and a feature embedding module. The multi-dimensional dynamic attention adjacency matrix construction module dynamically constructs a feature matrix that conforms to the current data pattern according to the data pattern of the current time period, combining the time step relationship dimension and the node relationship dimension. Specifically: First, feature extraction is performed on the global relationship of the current-level features, and its extraction formula is expressed as:

[0043]

[0044] where σ represents the sigmoid activation function, is the global relationship weight between nodes obtained by performing max pooling and average pooling on the time step dimension features, then concatenating, convolving, and using the sigmoid function, while is the global relationship weight between time steps extracted by performing the same operations on the node dimension features.

[0045] Then, the original data passes through a convolutional layer with a residual connection to extract the local detail features of the data. Subsequently, the extracted detail features are respectively multiplied pointwise with two global relationship matrices to obtain the global and local overall relationships between nodes and between time steps. Its calculation formula is as follows:

[0046]

[0047] Finally, we perform matrix multiplication on the relationship matrix between nodes and the transposed time step relationship matrix to synthesize the mutual influence of the two relationships. Then, the weak connections between nodes are filtered out through the ReLU function to retain the key relationship structure. Subsequently, the generated adjacency matrix is normalized using the softmax function to obtain the adaptively adjusted dynamic attention relationship adjacency matrix A i .

[0048]

[0049] In this paper, a graph convolutional neural network (GCN) is used to extract spatial features. GCN is an important graph neural network that can process graph-structured data. The input of the GCN model requires the adjacency matrix of the graph and the node features. This study adopted a single-layer graph convolution operation model. The input feature is the current layer The adjacency matrix is the constructed logical relationship matrix

[0050]

[0051] where is the learnable parameter matrix.

[0052] Step 3-2-2: The multi-time mode capture module is used to capture the global and local patterns of the time series. The module is mainly divided into two parts, the Bi-LSTM for capturing long-term global patterns and the feed-forward fully connected layer for capturing short-term local patterns. Finally, the outputs of the two are added together as the output result of the module.

[0053]

[0054] Among them respectively represent the outputs of the Bi-LSTM and the feed-forward fully connected layer. represents the output of the multi-time mode capture module.

[0055] Step 4: The cross-scale feature interaction module first inputs and into the Fusion layer for splicing respectively. The splicing operation combines features of different scales into a more comprehensive feature vector, enabling the model to capture rich spatio-temporal information from multiple dimensions. Then, the Conv convolutional layer and the Norm regularization layer are used to extract and compress the spliced features to obtain Secondly, the input on the left and right sides are respectively passed through two layers of Conv convolution and the RELU function for feature extraction and compression of the feature information of the current time step in the past day and the past week to obtain Then, are respectively reshaped and compressed to obtain the state required for attention calculation Next, attention calculation is respectively performed between and to obtain the self-attention featureized output feature The gating mixing module dynamically screens the importance of information between multi-scale features for fusion, and adjusts with and adjusts with to obtain the output Y i d ,Y i w , and finally the reshaped are spliced. Then, dimensionality reduction is performed through Conv and the correlation between time channels is modeled to obtain the output Y i .

[0056] Step 5-1: The temporal attention mechanism first uses multi-scale convolution operations of 3×3, 5×5, and 7×7 to extract features from the input hourly, daily, and weekly window data respectively. Subsequently, the features extracted by convolution are downsampled through pooling operations, which not only reduces the feature dimension and computational complexity but also further retains key feature information. On this basis, the temporal attention module uses global average pooling to generate temporal features, and generates a weight distribution in the temporal dimension through convolution and the Sigmoid activation function, ensuring that the model can dynamically focus on important features at different time points.

[0057] Step 5-2: The node attention module performs a non-linear transformation on the features between nodes through 1×1 convolution and ReLU activation to further enhance the local feature representation ability. Finally, the model performs weighted fusion on the features adjusted by temporal attention and node attention to generate a global feature representation. The fused features are further processed through linear transformation and normalization to remove redundant information and obtain a normalized final feature representation for prediction output.

[0058] Step 6: The present invention uses the mean absolute error MAE (representing the average of the absolute errors between the actual value and the predicted value), the mean absolute percentage error MAPE (representing the average of the absolute percentage errors between the actual value and the predicted value), and the root mean square error RMSE (representing the square root of the mean square error between the actual value and the predicted value) as evaluation metrics for evaluating the prediction performance of the evaluation module, and their calculations are as follows:

[0059]

[0060]

[0061] where, y i and are the true value and the predicted value respectively, and N is the number of samples.

[0062] The present invention performs multi-step prediction on 7 datasets and compares with other baseline models. On the PEMS-BAY and METR-LA datasets, the prediction ranges are {3, 6, 12} (predicting the traffic flow in the next 15 minutes, 30 minutes, and 60 minutes), and the prediction ranges for the other four datasets are set to 12 (predicting the traffic flow in the next 60 minutes). For the PEMS03 dataset, in the 60-minute long-term prediction, the present model achieves a MAPE of 13.19 and an RMSE of 27.73, while the best MAPE and RMSE achieved by the baseline are 14.22 and 25.17 respectively, and the present model realizes an improvement of approximately 8% in MAPE; for the 60-minute long-term prediction of the PEMS04 dataset, the present model achieves a MAPE of 8.87 and an RMSE of 27.14, while the best MAPE and RMSE achieved by the baseline are 12.64 and 30.50 respectively, and the present model realizes an improvement of approximately 20%; for the 60-minute long-term prediction of the PEMS07 dataset, the present model achieves a MAPE of 9.76 and an RMSE of 32.50, while the best MAPE and RMSE achieved by the baseline are 8.49 and 33.02 respectively, and the present model realizes an improvement of approximately 2% in RMSE; for the 60-minute long-term prediction of the PEMS07 dataset, the present model achieves a MAPE of 7.16 and an RMSE of 22.64, while the best MAPE and RMSE achieved by the baseline are 9.35 and 23.46 respectively, and the present model realizes an improvement of approximately 10%; for the other two datasets, the present model also achieves excellent performance. On the PEMS-BAY dataset and the METR-LA dataset, the present model realizes improvements of 11% and 7% respectively in the 60-minute long-term prediction.

[0063] Table 1 Comparison of Traffic Flow Prediction Results

[0064]

[0065]

[0066] Table 2 Comparison of Traffic Flow Prediction Results

[0067]

Claims

1. A traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion, characterized in that Including the following steps: Step 1: Obtain the historical traffic flow data of each traffic node and perform preprocessing to obtain application data; Step 2: Conduct problem analysis and definition for traffic flow prediction based on the preprocessed data; Step 3: Construct a multi-level spatio-temporal feature capture module, which consists of a feature progressive extraction layer and a spatio-temporal feature capture layer. The data is extracted through this module to obtain spatio-temporal features; Step 4: Construct a cross-scale feature interaction module, which consists of a convolutional layer, a regularization layer, and a multi-attention mechanism. The spatio-temporal features pass through this module to achieve information complementarity between features of different time scales and obtain multi-dimensional spatio-temporal dependence relationships; Step 5: Construct a multi-scale feature fusion module, which consists of a time attention mechanism and a node attention mechanism. The spatio-temporal dependence relationships pass through this module to capture the correlation changes in the time dimension and between nodes, thereby optimizing the importance assignment of features and improving the expression ability for complex spatio-temporal dependencies; Step 6: Divide the collected traffic flow data set into a training set, a validation set, and a test set, and use the mean absolute error, mean absolute percentage error, and root mean square error as evaluation indicators to evaluate the traffic flow prediction method with cross-scale spatio-temporal feature interaction and fusion.

2. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 1, characterized in that In the implementation of Step 1, the outliers in the traffic data obtained from the sensors are processed, and the Z-Score method is used to avoid the influence of outliers and extreme values, thereby obtaining the preprocessed application data.

3. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 2, characterized in that, In the implementation of Step 2, define the traffic flow prediction problem: Traffic flow prediction refers to analyzing and modeling based on the traffic flow data at time t and before for a certain road section or a certain area to obtain the traffic flow data at future times; The model is expressed as: Among them is the traffic flow prediction value at time t+1, f represents the prediction model or algorithm, and X t is the traffic flow data at time t, and τ is the number of time steps of the input traffic flow data; traffic flow prediction is divided into single-step prediction and multi-step prediction. If the traffic flow data collection time interval is τmin, the number of flow sequences collected within 1 hour is 60 / τ. Single-step prediction refers to predicting the traffic flow after τmin in the future; multi-step prediction of traffic flow refers to predicting the traffic flow in the future n steps, that is, predicting the traffic flow after (τ×n)min in the future; joint modeling of traffic flow data in different time periods is used to obtain more accurate prediction data. Let the current prediction time be T p min, that is, the prediction step is T p / τ, T h 、T d 、T w 's unit time step is the same as T p ; where h, d, and w represent the corresponding hours, days, and weeks respectively.

4. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 3, characterized in that In Step 3, Step 3-1: Adopt a three-layer pyramid structure, and each layer captures the global dependence of the data through a pooling module; The pooling operation focuses on the global information by compressing the feature map, and parallel convolutional modules are introduced in each layer to extract the local dependence features of the data; Subsequently, by designing a fusion module, the local features extracted by the convolutional module are effectively fused with the global features captured by the pooling module to provide a more comprehensive and detailed data pattern expression for the subsequent spatio-temporal feature capture module; The specific calculation formula of this layer is as follows: x1 = x x2 = W2(Concat[AvgPool(x1),Conv(x1)]) + b2 x3 = W3(Concat[AvgPool(x2),Conv(x2)]) + b3 where x i ∈R N×T is the temporal feature extracted from each layer, R is the set of real numbers, N represents the number of nodes in the traffic road network, T represents the length of the given historical time series, Concat is the concatenation operation, AvgPool is the average pooling layer, Conv is the one-dimensional convolution operation, W i , b i represent learnable parameters; Step 3-2-1: The multi-dimensional self-attention graph convolutional module consists of a multi-dimensional dynamic attention matrix construction module, a GCN module, and a feature embedding module. The multi-dimensional dynamic attention adjacency matrix construction module dynamically constructs a feature matrix that conforms to the current data pattern according to the data pattern of the current time period in combination with the time step relationship dimension and the node relationship dimension. Specifically: First, extract the global relationship of the features at the current level, and its extraction formula is expressed as: where X i ∈R N×T is the original input data, is the global relationship weight between nodes obtained by performing max pooling and average pooling on the time step dimension features, then concatenating, followed by convolution and applying the sigmoid function. And is the global relationship weight between time steps extracted from the node dimension features through the same operations. R is the set of real numbers, N represents the number of nodes in the traffic road network, T represents the length of the given historical time series, σ represents the sigmoid activation function, Conv represents one-dimensional convolution operation, Concat represents the concatenation operation, MaxPool represents the max pooling layer, and AvgPool represents the average pooling layer; The original data is passed through a convolutional layer with a residual connection to extract the local detailed features of the data; the extracted detailed features are respectively multiplied pointwise with two global relationship matrices to obtain the global and local overall relationships between nodes and between time steps; its calculation formula is as follows: where X i ∈R N×T is the original input data, is the extracted feature data, is the extracted local detail feature, R is the set of real numbers, N represents the number of nodes in the traffic road network, and T represents the length of the given historical time series; Conv is a one-dimensional convolution operation, and ☉ represents a dot product operation; Finally, perform matrix multiplication on the relationship matrix between nodes and the transposed time-step relationship matrix to synthesize the mutual influence of the two relationships; filter out the weak connections between nodes through the ReLU function to retain the key relationship structure; use the softmax function to normalize the generated adjacency matrix to obtain the dynamically adaptive attention relationship adjacency matrix A i ; where A i ∈R N×N is the generated dynamic attention relationship matrix, is the extracted feature data, R is the set of real numbers, N represents the number of nodes in the traffic road network, Softmax and σ are activation functions; Use the graph convolutional neural network GCN to extract spatial features; Adopt a single-layer graph convolutional operation model, and the input feature is the current layer The adjacency matrix is the constructed logical relationship matrix where A i ∈R N×N is the generated dynamic attention relationship matrix, and X i ∈R N×T is the feature data extracted by the current layer, is a learnable parameter, is the spatial feature data extracted by the graph convolutional network; Step 3-2-2: The multi-time mode capture module is used to capture the global mode and local mode of the time series; the module is divided into two parts, the Bi-LSTM for capturing the long-term global mode and the feed-forward fully connected layer for capturing the short-term local mode, and finally the outputs of the two are added as the output result of the module; Among them respectively represent the outputs of the Bi-LSTM and the feedforward fully connected layer, Dropout is the dropout layer, represents the output of the multi-time pattern capture module; R is the set of real numbers, N represents the number of nodes in the traffic road network, and T represents the length of the given historical time series.

5. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 4, wherein In step 4, the cross-scale feature interaction module first separately inputs the X i hour data, day data, and week data into the fusion layer for splicing. The splicing operation combines features of different scales into a more comprehensive feature vector, enabling the model to capture rich spatio-temporal information from multiple dimensions. Using one-dimensional convolutional operations and a regularization layer to perform feature extraction and compression on the spliced features, two associated spatio-temporal joint feature data and are obtained. Secondly, the day data and X i w week data are respectively passed through two layers of convolutional operations and the RELU activation function to extract and compress the feature information of the current time step in the past day and the past week to obtain the key day feature and the key week feature Then, are respectively reshaped and compressed to obtain the states V i d , V i w required for attention calculation. Then, attention calculation is performed between V i d and V i w to obtain the output feature after self-attention featureization The gating mixing module dynamically filters the importance of information between multi-scale features for fusion, respectively using to adjust and using to adjust to obtain the output Y i d ,Y i w . Finally, the reshaped are spliced; then, dimensionality reduction is performed through convolutional operations and the correlation between time channels is modeled to obtain the output Y i .

6. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 5, characterized in that, In the implementation of step 5, step 5-1: The time attention mechanism first performs multi-scale convolution operation using 3×3 convolutional layer, 5×5 convolutional layer and 7×7 convolutional layer to extract features from the input hourly, daily and weekly window data respectively; the features extracted by convolution are downsampled through pooling operation to reduce the feature dimension and computational complexity, and further retain the key feature information; the time attention module uses global average pooling to generate time features, and generates the weight distribution in the time dimension through convolution operation and Sigmoid activation function to ensure dynamic focus on the important features at different time points; Step 5-2: The node attention module enhances the local feature expression ability by performing one-dimensional convolution operation and ReLU activation on the features between nodes; The model performs weighted fusion on the features adjusted by time attention and node attention to generate the global feature representation; The fused features are processed by linear transformation and normalization to remove redundant information, and the standardized final feature representation is obtained for prediction output.

7. The traffic flow prediction method for cross-scale spatio-temporal feature interaction and fusion according to claim 6, wherein, In step 6, the mean absolute error MAE, mean absolute percentage error MAPE and root mean square error RMSE are used as evaluation metrics for evaluating the prediction performance of the evaluation module, and their calculations are as follows: where y i and are the true value and the predicted value respectively, and N is the number of samples.

Citation Information

Cited By

  • Double-flow time convolution enhanced interactive bearing life prediction method

    CN120429987A

  • Traffic flow prediction method, device and equipment for text travel scene, and storage medium

    CN120748214A

  • Method and system for bridge detection by using unmanned aerial vehicle group

    CN120760686A

  • Abnormal traffic flow prediction method and system based on multi-scale spatial-temporal feature fusion

    CN121583097A