Abnormal traffic flow prediction method and system based on multi-scale spatial-temporal feature fusion
By leveraging the synergistic effect of the multi-dimensional embedded perception module and the dynamic spatiotemporal multi-scale interaction module, the problem of insufficient accuracy and adaptability in the prediction of abnormal traffic flow in existing technologies is solved, achieving efficient multi-scale spatiotemporal feature fusion and improving prediction accuracy and adaptability.
Patent Information
- Application Number
- CN202511688988.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-27
AI Technical Summary
Existing technologies struggle to accurately capture high-order spatiotemporal dependencies while maintaining a lightweight model in abnormal traffic flow prediction. Furthermore, they fail to enhance the perception of non-periodic fine-grained features and fuse heterogeneous time-period features in a differentiated manner, resulting in insufficient prediction accuracy and adaptability.
A multi-dimensional embedding perception module is used to generate dynamic embedding representations. A dynamic spatiotemporal multi-scale interaction module is used to combine enhanced temporal convolutional networks, graph convolutional networks, and hypergraph graph convolutional networks to extract multi-scale spatiotemporal features. Fine-grained and coarse-grained features are then fused in a heterogeneous feature fusion module.
It achieves high-order spatiotemporal dependency capture of abnormal traffic flow under a lightweight model, improves prediction accuracy and adaptability, meets real-time requirements, and has good scenario generalization ability.
Smart Images

Figure CN121583097A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation systems, specifically to a method and system for predicting abnormal traffic flow based on multi-scale spatiotemporal feature fusion. Background Technology
[0002] Traffic flow prediction is a core support for Intelligent Transportation Systems (ITS) to achieve traffic control, congestion mitigation, and travel optimization. Accurate prediction of abnormal traffic flow (such as congestion during morning and evening rush hours or sudden traffic changes caused by accidents) is a key requirement to ensure the efficient operation of the road network. With the acceleration of urbanization and the increase in the number of motor vehicles, this requirement is becoming increasingly urgent. In the course of technological development, spatiotemporal prediction models based on graph neural networks (GNNs) have become the mainstream solution in this field. These models typically abstract traffic sensor networks into graph structures, capture the spatial dependencies between road network nodes through graph convolution (GCN), and combine recurrent neural networks (RNNs), temporal convolutional networks (TCNs), or attention mechanisms to mine temporal correlation features, forming multiple technical routes. For example, "A Traffic Flow Prediction Method and Device Based on Spatiotemporal Graph Convolutional Networks (CN120748194A)" and "A Modeling Method for Accurate Traffic Flow Prediction (CN120748205A)" achieve effective learning of the basic spatiotemporal laws of traffic flow by constructing fixed or adaptive graph structures and combining them with time-series modules. To further improve performance, subsequent research has deepened the technical solution from multiple dimensions. In the direction of multi-scale modeling, "A Long-Term Traffic Flow Prediction Method Based on Multi-Scale Spatiotemporal Models (CN120748205A)" has been developed. The methods “N120599821A” and “A Traffic Flow Prediction Method Based on Cross-Scale Spatiotemporal Feature Interaction Fusion (CN120260284A)” capture spatiotemporal features of different ranges by designing multi-scale network structures. In the direction of dynamic dependency modeling, “A Traffic Flow Prediction Method Based on Dynamic Graph Convolutional Recurrent Network (CN120279714A)” and “A Gated Multi-Graph Convolutional Perception Modeling Method for Traffic Flow Prediction (CN120706615A)” introduce dynamic graphs or attention mechanisms to adapt to spatial relationships that change with time and traffic conditions. In the direction of feature fusion and decomposition, “A Non-Stationary Traffic Prediction Method Based on Wave Flow Decomposition and Time Delay Perception (CN120409841A)” and “A Highway Traffic Flow Prediction Method Based on Multimodal Fusion and Sequence Decomposition (CN120708420A)” enhance feature representation capabilities by decomposing traffic components or fusing multi-source data.
[0003] However, these existing technologies still have unavoidable limitations when predicting abnormal traffic flow (especially complex abnormal scenarios during morning and evening rush hours): First, in terms of high-order spatial dependency modeling, complex relationships often arise between nodes through indirect influence via multiple paths during the propagation of abnormal traffic flow. While methods such as "A Traffic Flow Prediction Method Based on Multi-Scale Dual Hypergraph Fusion (CN120673587A)" and "A Traffic Flow Prediction Method Based on Multi-Channel Spatiotemporal Interaction and Fine-Grained Graph Convolution (CN120431730A)" attempt to capture these relationships through hypergraphs or multigraph structures, the computational load and parameter scale of the models increase significantly, failing to meet real-time prediction requirements. Furthermore, models relying on simple graph convolution, due to their linear aggregation mechanism, struggle to effectively characterize the high-order nonlinear spatial dependencies of abnormal traffic flow. Second, at the feature perception level, abnormal traffic flow often... While traffic flow exhibits non-periodic, fine-grained fluctuations (such as minute-level timestamp changes and instantaneous speed abrupt changes during peak hours), most existing methods rely on periodic time embeddings such as daily or weekly cycles. Even the "Traffic Flow Prediction Method and Device Based on Global-Local Spatiotemporal Dependency Interaction (CN120496328A)" which employs multiple embedding methods, fails to achieve deep collaboration between embedding learning and the unique fluctuation patterns of abnormal traffic flow. This results in insufficient representation of the contextual information of abnormal scenarios by the input features. Finally, regarding feature fusion mechanisms, existing models generally adopt a unified architecture to process traffic flow features across all time periods. They fail to explicitly distinguish between the local abrupt changes and strong heterogeneity of abnormal traffic flow during peak hours and the differences between stable traffic flow during off-peak hours. This makes the models prone to overfitting noise during stable periods and difficult to capture key fluctuation details during peak periods when abnormal traffic is concentrated, thus limiting the overall prediction robustness.
[0004] In summary, existing technologies still lack a technical solution that can accurately capture the high-order spatiotemporal dependence of abnormal traffic flow while maintaining model lightweightness, and comprehensively improve the accuracy of abnormal traffic flow prediction and its adaptability to all scenarios through enhanced perception of non-periodic fine-grained features and differentiated fusion of heterogeneous time-period features. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for predicting abnormal traffic flow based on multi-scale spatiotemporal feature fusion, which solves the problems mentioned in the background.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion, comprising the following steps:
[0007] The input traffic data is enhanced by a multi-dimensional embedding perception module to generate a dynamic embedded representation that integrates time, space and traffic state information.
[0008] The dynamic embedding representation is input into the dynamic spatiotemporal multi-scale interaction module, and multi-scale spatiotemporal features are extracted and interacted by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks and hypergraph graph convolutional networks.
[0009] The fine-grained features output by the dynamic spatiotemporal multi-scale interaction module and the coarse-grained features exported by the multi-dimensional embedded perception module are fused in the heterogeneous feature fusion module to output the final abnormal traffic flow prediction result.
[0010] Preferably, the step of the multidimensional embedding perception module generating dynamic embedding representations includes:
[0011] Construct an intraday hourly dictionary and an intraday timestamp dictionary, and generate time parameter embeddings by querying the dictionaries; use a multilayer perceptron to map the raw traffic flow data to a high-dimensional feature space to obtain the traffic flow embedding;
[0012] Based on speed and time occupancy data, auxiliary traffic state embeddings are generated through multilayer perceptron and activation functions; dynamic node embeddings that change over time are generated to capture dynamic spatial dependencies.
[0013] By concatenating time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding, a dynamic embedding representation is obtained.
[0014] Preferably, the operation mode of the enhanced temporal convolutional network in the dynamic spatiotemporal multi-scale interaction module includes:
[0015] A multi-branch one-dimensional convolutional kernel with different dilation factors is used to extract multi-scale local temporal features in parallel; a gating mechanism is used to control the information flow of each branch.
[0016] Residual connections are introduced between layers, and time normalization is applied to highlight the characteristics of flow fluctuations.
[0017] Preferably, the operation mode of the graph convolutional network in the dynamic spatiotemporal multi-scale interaction module includes:
[0018] Adjacency matrices are adaptively generated based on dynamic node embedding, and graph convolution operations are performed using these adjacency matrices.
[0019] In the process of information dissemination, the characteristics of the target node itself at the previous layer are integrated to balance the evolution of the node itself and the influence of neighboring nodes.
[0020] Preferably, the operation mode of the hypergraph convolutional network in the dynamic spatiotemporal multi-scale interaction module includes:
[0021] Multiply the node representations output by the graph convolutional network with the learnable weight matrix to construct a low-rank hypergraph correlation matrix.
[0022] The node information is aggregated by the low-rank hypergraph association matrix to generate hyperedge embeddings, and the hyperedge embeddings are updated using the hyperedge embedding matrix.
[0023] By using the updated hyperedge embedding, node representations are updated in reverse through the low-rank hypergraph association matrix, capturing high-order spatial dependencies.
[0024] Preferably, the feature fusion step performed by the heterogeneous feature fusion module includes:
[0025] Spatial normalization is performed on the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module.
[0026] The dynamic embedding representation output by the multidimensional embedding perception module is processed to extract the coarse-grained features of its last time step.
[0027] Fine-grained features, spatially normalized features, and coarse-grained features are concatenated; the concatenated features are then input into a prediction network containing multiple convolutional layers to generate the final abnormal traffic flow prediction value.
[0028] Preferably, the dynamic node embedding is initialized with learnable parameters and aligned with the batch dimension through an expansion operation, so that each node has a differentiated embedding representation at different timestamps.
[0029] An abnormal traffic flow prediction system based on multi-scale spatiotemporal feature fusion includes:
[0030] The multidimensional embedding perception module is used to enhance the features of the input traffic data and generate a dynamic embedded representation that integrates time, space and traffic state information.
[0031] The dynamic spatiotemporal multi-scale interaction module is used to receive dynamic embedded representations and extract and interact with multi-scale spatiotemporal features by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks, and hypergraph graph convolutional networks.
[0032] The heterogeneous feature fusion module is used to fuse the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module with the coarse-grained features exported by the multi-dimensional embedded perception module, and output the final abnormal traffic flow prediction result.
[0033] Preferably, the multidimensional embedded sensing module includes:
[0034] The time parameter embedding unit is used to construct an intraday hour dictionary and an intraday timestamp dictionary, and to generate time parameter embeddings by querying the dictionary;
[0035] The traffic embedding unit is used to map the raw traffic flow data to a high-dimensional feature space through a multilayer perceptron to obtain the traffic embedding.
[0036] The auxiliary traffic state embedding unit is used to generate auxiliary traffic state embeddings based on speed and time occupancy data through a multilayer perceptron and activation function.
[0037] A dynamic node embedding unit is used to generate dynamic node embeddings that change over time in order to capture dynamic spatial dependencies.
[0038] The splicing unit is used to splice time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding to obtain dynamic embedding identifier.
[0039] Preferably, the dynamic spatiotemporal multi-scale interaction module includes:
[0040] Enhanced temporal convolutional units are used to extract multi-scale local temporal features through multi-branch dilated convolution, gating mechanisms, residual connections, and temporal normalization;
[0041] The graph convolution unit is used to perform graph convolution operations based on the adaptively generated adjacency matrix, which integrates the evolution of the node itself and the influence of the neighboring nodes.
[0042] Hypergraph convolutional units are used to construct low-rank hypergraph association matrices, generate and update hyperedge embeddings, and inversely update node representations to capture high-order spatial dependencies.
[0043] This invention provides a method and system for predicting abnormal traffic flow based on multi-scale spatiotemporal feature fusion. It has the following beneficial effects:
[0044] 1. This invention deeply integrates time parameters, spatial dependencies, and multi-source features of traffic conditions through a multi-dimensional embedded perception module. Combined with the collaborative operation of enhanced temporal convolutional networks, graph convolutional networks, and low-rank hypergraph convolutional networks in the dynamic spatiotemporal multi-scale interaction module, it can accurately capture the high-order, non-periodic spatiotemporal correlations contained in abnormal traffic flow. At the same time, it avoids the high computational cost caused by the complex graph structure in traditional high-order modeling schemes. While ensuring the accuracy of modeling the core features of abnormal traffic, it achieves model lightweighting and meets the real-time requirements of abnormal traffic prediction in actual traffic scenarios.
[0045] 2. This invention utilizes a heterogeneous feature fusion module to explicitly distinguish between the fine-grained fluctuation characteristics of abnormal traffic flow during peak hours and the coarse-grained variation patterns of stable traffic flow during off-peak hours. By enhancing the perception of local anomalies through fine-grained feature extraction and spatial normalization, and combining coarse-grained features to maintain the prediction stability during stable periods, this invention effectively solves the problems of insufficient peak capture and overfitting during stable periods caused by using a unified architecture to process features of different time periods in existing technologies. This significantly improves the model's predictive adaptability and overall robustness to various abnormal traffic flow scenarios.
[0046] 3. This invention adopts a modular design approach. The multi-dimensional embedded perception module can flexibly generate effective feature embeddings in scenarios with or without auxiliary traffic data such as speed and occupancy. The dynamic spatiotemporal multi-scale interaction and heterogeneous fusion module can adapt to the traffic flow characteristics of different road networks such as urban roads and highways. It can be deployed and applied without extensive customization for specific scenarios, and has good scenario generalization ability. It can directly provide reliable abnormal traffic prediction support for core functions such as traffic control, congestion warning, and emergency dispatch in intelligent transportation systems, and has high practical application value. Attached Figure Description
[0047] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0048] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0049] Please see the appendix Figure 1 This invention provides a method for predicting abnormal traffic flow based on multi-scale spatiotemporal feature fusion, comprising the following steps:
[0050] The input traffic data is enhanced by a multi-dimensional embedding perception module to generate a dynamic embedded representation that integrates time, space and traffic state information.
[0051] The steps of the multidimensional embedding perception module in generating dynamic embedding representations include:
[0052] Construct an intraday hourly dictionary and an intraday timestamp dictionary, and generate time parameter embeddings by querying the dictionaries; use a multilayer perceptron to map the raw traffic flow data to a high-dimensional feature space to obtain the traffic flow embedding;
[0053] Based on speed and time occupancy data, auxiliary traffic state embeddings are generated through multilayer perceptron and activation functions; dynamic node embeddings that change over time are generated to capture dynamic spatial dependencies.
[0054] By concatenating time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding, a dynamic embedding representation is obtained.
[0055] The dynamic embedding representation is input into the dynamic spatiotemporal multi-scale interaction module, and multi-scale spatiotemporal features are extracted and interacted by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks and hypergraph graph convolutional networks.
[0056] Specifically, peak-hour traffic fluctuations are directly related to the time period (whether it's morning or evening rush hour) and the timestamp. This involves constructing an hourly dictionary for the entire day. and timestamp dictionary Where N hod N is the number of hours in a day. tod This represents the number of timestamps within a day. The corresponding intraday hour embeddings are generated by specifying the feature dimensions of the input feature matrix X. and intraday timestamp embedding Generating fine-grained temporal embeddings E t =E tod ||E hod To capture local time fluctuations.
[0057] E tod =T tod (X×N d )
[0058] E hod =T hod
[0059] Traffic flow data is mapped to X using a multilayer perceptron (which maps traffic flow data to a feature space through two 2D convolutional layers and a ReLU activation layer). st Considering that a sharp drop in speed can significantly impact traffic distribution, and that occupancy reflects the time spent on the road during that period, with a trend highly similar to traffic flow, an auxiliary embedding E is generated by combining speed and occupancy features. se This enhances the semantic understanding of peak-period fluctuations, and its formula is as follows:
[0060] E se =MLP(X[...,k s ])⊙σ(MLP(X[...,k o ]))
[0061] Where k s k o The index represents speed and occupancy information. σ is an activation function used to control the transmission of information.
[0062] Spatial parameter embedding: During morning and evening rush hours, sensors exhibit dynamic spatial dependencies, which become higher-order when congestion occurs. This step addresses this through dynamic node embedding. Where D ds This is the embedding dimension, which ensures that each node has different node embeddings at different timestamps t in time slice T, in order to model dynamic spatial dependencies. The formula is as follows:
[0063] E adp=Expand(E ds size = (B, shape(Emb)))
[0064] Embedding merging: The above embeddings are concatenated to obtain the input embedding Z for peak periods. This method enhances the spatiotemporal characteristics of the input data, enabling the model to better capture complex traffic patterns during peak hours. Some datasets provide auxiliary data E. se This step involves two forms of input embedding Z: one with auxiliary embedding E. se The input embedding Z. One type does not contain auxiliary embedding E. se The input embedding is Z. Its formula is as follows:
[0065] Z = E t ||X st ||E adp ||E se
[0066] Z = E t ||X st ||E adp
[0067] The fine-grained features output from the dynamic spatiotemporal multi-scale interaction module and the coarse-grained features exported from the multi-dimensional embedding perception module are fused in the heterogeneous feature fusion module to output the final abnormal traffic flow prediction result. The operation of the enhanced temporal convolutional network in the dynamic spatiotemporal multi-scale interaction module includes:
[0068] A multi-branch one-dimensional convolutional kernel with different dilation factors is used to extract multi-scale local temporal features in parallel; a gating mechanism is used to control the information flow of each branch.
[0069] Residual connections are introduced between layers, and time normalization is applied to highlight the characteristics of flow fluctuations.
[0070] The operation of graph convolutional networks in dynamic spatiotemporal multi-scale interaction modules includes:
[0071] Adjacency matrices are adaptively generated based on dynamic node embedding, and graph convolution operations are performed using these adjacency matrices.
[0072] In the process of information dissemination, the characteristics of the target node itself at the previous layer are integrated to balance the evolution of the node itself and the influence of neighboring nodes.
[0073] The operation of the hypergraph convolutional network in the dynamic spatiotemporal multi-scale interaction module includes:
[0074] Multiply the node representations output by the graph convolutional network with the learnable weight matrix to construct a low-rank hypergraph correlation matrix.
[0075] The node information is aggregated by the low-rank hypergraph association matrix to generate hyperedge embeddings, and the hyperedge embeddings are updated using the hyperedge embedding matrix.
[0076] By using the updated hyperedge embedding, node representations are updated in reverse through the low-rank hypergraph association matrix, capturing high-order spatial dependencies.
[0077] Specifically, this step aims to learn the multi-scale spatial characteristics of traffic flow, especially the fusion of spatial dependencies at multiple local time scales and higher-order spatial dependencies, in order to capture spatiotemporal dependencies at multiple time scales. This includes: Enhanced Temporal Convolutional Network Layer: The enhanced temporal convolutional network (ETCN) that processes the spatiotemporal representation Z helps the model capture and fuse local time scale information of peak-hour traffic flow. It uses multi-branch dilated convolution to capture local temporal features and combines gating mechanisms and time normalization (TN) to enhance the model's sensitivity to fluctuation features.
[0078] Input preprocessing: To ensure output sequence consistency and avoid boundary effects, ETCN input data requires padding. Furthermore, to better utilize the spatiotemporal representation Z, convolution operations are performed on the padded data. The formula is as follows:
[0079] X = Conv(padding(permute(Z)))
[0080] Where permute represents dimension swapping, padding represents padding the time dimension, and Conv is a two-dimensional convolution.
[0081] ETCN employs an extended convolution method, which skips a certain time step by setting the convolution kernel, thereby enabling the model to capture information at local time scales.
[0082]
[0083] Among them, f 1×θ It is a one-dimensional convolutional kernel of size 1×θ, where q is the scaling factor for the time step, and s is the scaling factor for the current convolutional kernel, representing the time step of the current kernel index. q×s is the interval controlling the sliding of the convolutional kernel along the time axis. Simultaneously, to fuse multi-scale patterns from different time ranges, the formula for expanding the initial layer in this step is as follows:
[0084]
[0085] Among them, f 1×2 ,f 1×3 ,f 1×6 ,f 1×7Representing convolutional kernels of different sizes, based on multi-branch and dilated convolutions, these kernels can learn local features of time series at different scales. A gating mechanism is used to control the model information, as shown in the following formula:
[0086]
[0087] Where φ1, φ2, b, c are training parameters, and ⊙ is the element-wise product.
[0088] ETCN adds skip connection layers between layers, which are standard 1×T′ 2D convolutions. It jumps to the next layer by indexing the sequence length of the current layer. The formula is as follows:
[0089]
[0090] Skipconv is a two-dimensional convolution.
[0091] To enable ETCN to better learn the complex multi-scale temporal dependencies of the input data, a time normalization operation is added to the residual connections between ETCN layers. Time normalization makes the distribution of features in the sample space more regular, thus helping the model to more effectively capture complex temporal patterns. This step, to some extent, weakens the stable trend of traffic flow and highlights the fluctuating characteristics during peak hours. The formula is as follows:
[0092]
[0093] Here, μ and σ are the mean and variance calculated over the batch and time dimensions, respectively, while γ and β are learnable scaling and offset parameters. ∈ is a small constant to prevent division by zero. The learning capability of TCN for multi-scale temporal dependencies is improved by enhancing the input embedding Z and the time normalization operation.
[0094] Adaptive Graph Convolutional Layer (GCN): Sensor traffic patterns are influenced by their own evolution and the transmission of sequences from external sensors. Traffic anomalies, especially during morning and evening peak hours, are localized fluctuations that directly affect the traffic trends of nearby sensors. Based on these spatial patterns, the graph convolutional layer, at each time scale, aggregates the features H of neighboring nodes and fuses the evolutionary features of the target node itself through adaptive graph convolution based on node embedding. The specific formula is as follows:
[0095]
[0096] Hypergraph Convolutional Layer: To better extract multi-scale high-order spatial information in complex scenarios such as traffic congestion, this step introduces a low-rank hypergraph convolutional layer after the adaptive graph convolutional layer. This reveals high-order spatial dependencies while avoiding the complex learning methods based on dynamic graphs and hypergraphs, thus reducing model complexity and computational resource requirements. Even for datasets lacking speed- and occupancy-based auxiliary embeddings E... se It can provide semantic information and can also mine higher-order spatial dependencies through hypergraph convolution.
[0097] Low-rank correlation matrix: After learning multi-scale low-order spatial dependencies through ETCN and GCN, the hypergraph convolutional layer first mines the high-order spatial dependencies of traffic flow through the learnable hypergraph correlation matrix Λ. The correlation matrix Λ is decomposed into the product of the node representation matrix H and the weight matrix W. Specifically, the hypergraph correlation matrix Λ is represented as:
[0098] Λ=HW
[0099] Where Λ is the incidence matrix, W∈R d×I It is the weight matrix. H∈R B×(T'×N)×D It is the node representation after the adaptive graph convolutional layer, which hides multi-scale spatiotemporal low-order information. T′ is the time step affected by the receptive field of each temporal convolutional network layer.
[0100] Hyperedge embedding: Utilizes hypergraph convolution to aggregate all node information related to the hyperedge, generating a hyperedge embedding representation E. h .
[0101] E h =Λ T softmax(H)
[0102] Then, a higher-order hyperedge embedding is generated using the hyperedge embedding matrix U and combined with the hyperedge embedding E. h Residual connection.
[0103] E h =φ(UMLP(E) h ))+MLP(E h )
[0104] Node update: Finally, the correlation matrix and the updated hyperedge embedding E are used to update the node. h To update the node embedding X, the formula is as follows:
[0105] X = ΛE h =Λ(φ(UMLP(E) h ))+MLP(E h ))
[0106] The steps of feature fusion performed by the heterogeneous feature fusion module include:
[0107] Spatial normalization is performed on the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module.
[0108] The dynamic embedding representation output by the multidimensional embedding perception module is processed to extract the coarse-grained features of its last time step.
[0109] Fine-grained features, spatially normalized features, and coarse-grained features are concatenated. The concatenated features are then input into a prediction network containing multiple convolutional layers to generate the final abnormal traffic flow prediction. Dynamic node embeddings are initialized with learnable parameters and aligned with the batch dimension through an expansion operation, giving each node a differentiated embedding representation at different timestamps.
[0110] Specifically, this step aims to fuse coarse-grained and fine-grained features to address the differences between peak and off-peak periods. This step learns two sets of spatiotemporal features: for the local spatiotemporal characteristics of traffic during peak periods, fine-grained spatiotemporal features are learned through dynamic spatiotemporal multi-scale interactive capture. For the stable traffic characteristics during off-peak periods, coarse-grained spatiotemporal features are captured through multi-dimensional embedding perception processing, including:
[0111] Fine-grained spatiotemporal feature extraction: This step extracts fine-grained features. Spatial normalization is performed to enhance robustness;
[0112] The updated node embedding X in the output of the last layer is used to finally output fine-grained spatiotemporal features through skip connections. At this point, the time scale is 1, enabling the mining of fine-grained spatiotemporal features.
[0113] skip out =skipconv out (X)+skip
[0114] Among them, skipconv out This represents a two-dimensional convolution.
[0115] via skip out Spatial normalization is performed to remove global components while preserving the differences in local components, enhancing the model's robustness and enabling it to better learn the distributions of different spatial features. The formula for spatial normalization is as follows:
[0116]
[0117] Coarse-grained spatiotemporal feature extraction: The output embedding Z of the pair is processed by a multilayer perceptron, and the coarse-grained spatiotemporal features Z of the last time step are extracted by indexing. out It is used to characterize relatively stable flow changes during off-peak periods.
[0118] Coarse-grained and fine-grained spatiotemporal feature fusion: skipping fine-grained features out Spatial normalized features SN (skip) out ) and coarse-grained feature Z out The concatenation is F, which is then processed by a multi-layer convolutional network to output the final prediction result Y. pred The formula is as follows:
[0119] F = skip out ||Z out ||SN(skip out )
[0120] F = Endconv1(relu(F))
[0121] Y pred =Endconv2(relu(F))
[0122] Endconv1 and Endconv2 represent two-dimensional convolutions.
[0123] An abnormal traffic flow prediction system based on multi-scale spatiotemporal feature fusion includes:
[0124] The multidimensional embedding perception module is used to enhance the features of the input traffic data and generate a dynamic embedded representation that integrates time, space and traffic state information.
[0125] The multidimensional embedded perception module includes:
[0126] The time parameter embedding unit is used to construct an intraday hour dictionary and an intraday timestamp dictionary, and to generate time parameter embeddings by querying the dictionary;
[0127] The traffic embedding unit is used to map the raw traffic flow data to a high-dimensional feature space through a multilayer perceptron to obtain the traffic embedding.
[0128] Specifically, the core principle of the multidimensional embedding perception module is to solve the problem of insufficient representation of information in the time, space, and traffic state dimensions of the original traffic data through multidimensional and targeted feature extraction and integration, providing a more comprehensive feature foundation for subsequent abnormal traffic prediction. Among them, the time parameter embedding unit is based on the strong correlation between traffic flow and intraday time periods. By constructing an intraday hour dictionary and an intraday timestamp dictionary, and then querying matching features from the dictionary according to the specific hour and timestamp corresponding to the input traffic data, it transforms the abstract time information into a feature form that the model can learn, thereby strengthening the ability to capture the non-periodic and fine-grained time fluctuations that are prone to occur in abnormal traffic. The traffic flow embedding unit addresses the problem that the original traffic flow data has a single dimension and limited ability to directly express spatiotemporal features for prediction. It uses the nonlinear mapping capability of the multilayer perceptron to map the low-dimensional original traffic flow data to a high-dimensional feature space. In the mapping process, it mines the hidden potential features in the original data to form a traffic flow embedding containing richer information, laying the foundation for subsequent fusion with time and space dimension features. At the same time, it also makes it easier for the model to identify the early abnormal traffic features (fine-grained fluctuation features) that are not easily detected in the original data.
[0129] The auxiliary traffic state embedding unit is used to generate auxiliary traffic state embeddings based on speed and time occupancy data through a multilayer perceptron and activation function.
[0130] A dynamic node embedding unit is used to generate dynamic node embeddings that change over time in order to capture dynamic spatial dependencies.
[0131] The splicing unit is used to splice time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding to obtain dynamic embedding identifier.
[0132] The dynamic spatiotemporal multi-scale interaction module is used to receive dynamic embedded representations and extract and interact with multi-scale spatiotemporal features by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks, and hypergraph graph convolutional networks.
[0133] Specifically, the auxiliary traffic state embedding unit generates auxiliary embeddings that supplement traffic state details based on auxiliary data such as speed and time occupancy, which reflect traffic congestion and efficiency. This is achieved by leveraging the nonlinear mapping capability of the multilayer perceptron and the feature enhancement effect of the activation function. The dynamic node embedding unit generates node embeddings that change dynamically over time to adapt to the time-varying characteristics of spatial dependencies between nodes in the traffic network. The stitching unit stitches the time parameter embedding, flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding along the channel dimension to form a dynamic embedding representation that integrates multi-source information on time, space, flow, and traffic state. After receiving this dynamic embedding representation, the dynamic spatiotemporal multi-scale interaction module extracts local fluctuation features at different time scales through an enhanced temporal convolutional network. The graph convolutional network, based on an adaptive adjacency matrix, fuses the node's own evolution and the influence of its neighbors to capture low-order spatial dependencies. The hypergraph graph convolutional network updates the node representation in reverse through operations such as the low-rank hypergraph association matrix to capture high-order spatial dependencies. The three work together to achieve deep interaction and extraction of multi-scale spatiotemporal features, providing accurate feature support for subsequent abnormal traffic prediction.
[0134] The dynamic spatiotemporal multi-scale interaction module includes:
[0135] Enhanced temporal convolutional units are used to extract multi-scale local temporal features through multi-branch dilated convolution, gating mechanisms, residual connections, and temporal normalization;
[0136] The graph convolution unit is used to perform graph convolution operations based on the adaptively generated adjacency matrix, which integrates the evolution of the node itself and the influence of the neighboring nodes.
[0137] Hypergraph convolutional units are used to construct low-rank hypergraph association matrices, generate and update hyperedge embeddings, and inversely update node representations to capture high-order spatial dependencies.
[0138] The heterogeneous feature fusion module is used to fuse the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module with the coarse-grained features exported by the multi-dimensional embedded perception module, and output the final abnormal traffic flow prediction result.
[0139] Specifically, the core principle of the dynamic spatiotemporal multi-scale interaction module is to accurately capture the multi-scale dependencies of traffic flow in the temporal and spatial dimensions through hierarchical collaboration. The heterogeneous feature fusion module focuses on balancing the differences in traffic flow characteristics across different time periods, jointly providing accurate feature support for abnormal traffic prediction. The enhanced temporal convolution unit, targeting the multi-scale fluctuation characteristics of traffic flow in the temporal dimension, expands the coverage of temporal information through multi-branch dilated convolution. Combined with gating mechanisms to filter key temporal features for abnormal prediction, residual connections to avoid gradient vanishing in deep networks, and time normalization to highlight fluctuation characteristics in peak periods and other abnormal traffic concentration scenarios, it ultimately achieves efficient extraction of multi-scale local temporal features. The graph convolution unit, based on the spatial correlation of traffic sensor networks, through self- The adaptive adjacency matrix preserves the evolutionary characteristics of traffic flow within each node during graph convolution operations while aggregating the influence information of neighboring nodes, thus accurately capturing low-order spatial dependencies between sensors. The hypergraph convolution unit addresses high-order spatial dependencies formed by indirect associations among multiple nodes in abnormal traffic propagation. It constructs a hypergraph structure using a low-rank hypergraph association matrix, first generating and updating hyperedge embeddings, and then updating node representations in reverse, effectively capturing high-order spatial dependencies. The heterogeneous feature fusion module considers the significant differences between the fine-grained fluctuations of abnormal traffic during peak hours and the coarse-grained changes of stable traffic during off-peak hours. It fuses the two types of features to avoid the limitations of single features in predicting traffic at different times, ultimately outputting prediction results that are adaptable to all time periods and accurately reflect the state of abnormal traffic.
[0140] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for predicting abnormal traffic flow based on multi-scale spatiotemporal feature fusion, characterized in that, Includes the following steps: The input traffic data is enhanced by a multi-dimensional embedding perception module to generate a dynamic embedded representation that integrates time, space and traffic state information. The dynamic embedding representation is input into the dynamic spatiotemporal multi-scale interaction module, and multi-scale spatiotemporal features are extracted and interacted by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks and hypergraph graph convolutional networks. The fine-grained features output by the dynamic spatiotemporal multi-scale interaction module and the coarse-grained features exported by the multi-dimensional embedded perception module are fused in the heterogeneous feature fusion module to output the final abnormal traffic flow prediction result.
2. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The steps of generating dynamic embedding representations by the multidimensional embedding perception module include: Construct an intraday hourly dictionary and an intraday timestamp dictionary, and generate time parameter embeddings by querying the dictionaries; use a multilayer perceptron to map the raw traffic flow data to a high-dimensional feature space to obtain the traffic flow embedding; Based on speed and time occupancy data, auxiliary traffic state embeddings are generated through multilayer perceptron and activation functions; dynamic node embeddings that change over time are generated to capture dynamic spatial dependencies. By concatenating time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding, a dynamic embedding representation is obtained.
3. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The operation mode of the enhanced temporal convolutional network in the dynamic spatiotemporal multi-scale interaction module includes: A multi-branch one-dimensional convolutional kernel with different dilation factors is used to extract multi-scale local temporal features in parallel; a gating mechanism is used to control the information flow of each branch. Residual connections are introduced between layers, and time normalization is applied to highlight the characteristics of flow fluctuations.
4. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The operation mode of the graph convolutional network in the dynamic spatiotemporal multi-scale interaction module includes: Adjacency matrices are adaptively generated based on dynamic node embedding, and graph convolution operations are performed using these adjacency matrices. In the process of information dissemination, the characteristics of the target node itself at the previous layer are integrated to balance the evolution of the node itself and the influence of neighboring nodes.
5. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The operation mode of the hypergraph convolutional network in the dynamic spatiotemporal multi-scale interaction module includes: Multiply the node representations output by the graph convolutional network with the learnable weight matrix to construct a low-rank hypergraph correlation matrix. The node information is aggregated by the low-rank hypergraph association matrix to generate hyperedge embeddings, and the hyperedge embeddings are updated using the hyperedge embedding matrix. By using the updated hyperedge embedding, node representations are updated in reverse through the low-rank hypergraph association matrix, capturing high-order spatial dependencies.
6. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The heterogeneous feature fusion module performs feature fusion in the following steps: Spatial normalization is performed on the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module. The dynamic embedding representation output by the multidimensional embedding perception module is processed to extract the coarse-grained features of its last time step. Fine-grained features, spatially normalized features, and coarse-grained features are concatenated; the concatenated features are then input into a prediction network containing multiple convolutional layers to generate the final abnormal traffic flow prediction value.
7. The abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion according to claim 1, characterized in that, The dynamic node embedding is initialized with learnable parameters and aligned with the batch dimension through an expansion operation, so that each node has a differentiated embedding representation at different timestamps.
8. An abnormal traffic flow prediction system based on multi-scale spatiotemporal feature fusion, used in the abnormal traffic flow prediction method based on multi-scale spatiotemporal feature fusion as described in any one of claims 1-7, characterized in that, include: The multidimensional embedding perception module is used to enhance the features of the input traffic data and generate a dynamic embedded representation that integrates time, space and traffic state information. The dynamic spatiotemporal multi-scale interaction module is used to receive dynamic embedded representations and extract and interact with multi-scale spatiotemporal features by enhancing the synergistic effect of temporal convolutional networks, graph convolutional networks, and hypergraph graph convolutional networks. The heterogeneous feature fusion module is used to fuse the fine-grained features output by the dynamic spatiotemporal multi-scale interaction module with the coarse-grained features exported by the multi-dimensional embedded perception module, and output the final abnormal traffic flow prediction result.
9. The abnormal traffic flow prediction system based on multi-scale spatiotemporal feature fusion according to claim 8, characterized in that, The multidimensional embedded sensing module includes: The time parameter embedding unit is used to construct an intraday hour dictionary and an intraday timestamp dictionary, and to generate time parameter embeddings by querying the dictionary; The traffic embedding unit is used to map the raw traffic flow data to a high-dimensional feature space through a multilayer perceptron to obtain the traffic embedding. The auxiliary traffic state embedding unit is used to generate auxiliary traffic state embeddings based on speed and time occupancy data through a multilayer perceptron and activation function. A dynamic node embedding unit is used to generate dynamic node embeddings that change over time in order to capture dynamic spatial dependencies. The splicing unit is used to splice time parameter embedding, traffic flow embedding, dynamic node embedding, and optional auxiliary traffic state embedding to obtain dynamic embedding identifier.
10. The abnormal traffic flow prediction system based on multi-scale spatiotemporal feature fusion according to claim 8, characterized in that, The dynamic spatiotemporal multi-scale interaction module includes: Enhanced temporal convolutional units are used to extract multi-scale local temporal features through multi-branch dilated convolution, gating mechanisms, residual connections, and temporal normalization; The graph convolution unit is used to perform graph convolution operations based on the adaptively generated adjacency matrix, which integrates the evolution of the node itself and the influence of the neighboring nodes. Hypergraph convolutional units are used to construct low-rank hypergraph association matrices, generate and update hyperedge embeddings, and inversely update node representations to capture high-order spatial dependencies.
Citation Information
Patent Citations
Traffic flow prediction method based on cross-scale spatio-temporal feature interactive fusion
CN120260284A
Traffic flow prediction method based on dynamic graph convolution circulation network
CN120279714A
Non-stationary traffic prediction method based on wave flow decomposition and time delay perception
CN120409841A
Traffic flow prediction method based on multi-channel space-time interaction and fine-grained graph convolution
CN120431730A
Traffic flow prediction method and device based on global-local space-time dependency interaction
CN120496328A