Traffic flow prediction method based on hierarchical space-time correlation
By employing a differentiated modeling strategy, the STKGCN method identifies hub nodes, constructs a differentiated graph structure and adjacency matrix, and combines spatiotemporal synchronization and step-by-step feature extraction to solve the problem of insufficient prediction accuracy caused by node heterogeneity in transportation networks, thereby improving prediction accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-10
AI Technical Summary
Existing traffic flow prediction methods fail to fully capture the complex spatiotemporal characteristics of hub nodes and non-hub nodes in traffic networks, resulting in insufficient prediction accuracy and high computational complexity, especially making it difficult to scale up in large-scale road networks.
A hierarchical spatiotemporal correlation-based traffic flow prediction method (STKGCN) is adopted. Hub nodes are identified through a dynamic scoring function, and differentiated graph structures and adjacency matrices are constructed. The spatiotemporal features of hub and non-hub nodes are processed separately by combining spatiotemporal synchronization and step-by-step feature extraction strategies, and feature fusion is performed by channel splicing.
It significantly improves the accuracy and efficiency of traffic flow forecasting, adapts to the computing needs of large-scale road networks, and provides more accurate traffic decision support.
Smart Images

Figure CN121838470A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical fields of information technology, graph convolutional neural network, and gated linear unit, and relates to a traffic flow prediction method based on hierarchical spatiotemporal correlation. BACKGROUND
[0002] Traffic flow prediction is a core component of intelligent transportation systems and has important significance for urban traffic management and planning. Accurate traffic flow prediction can help optimize traffic signal control, alleviate traffic congestion, and improve road usage efficiency. With the acceleration of urbanization, the transportation network is becoming increasingly complex, and traditional traffic flow prediction methods are facing new challenges.
[0003] Existing traffic flow prediction methods can be mainly divided into three categories: statistical model-based methods, traditional machine learning-based methods, and deep learning-based methods. Statistical model-based methods such as autoregressive integrated moving average (ARIMA) are simple to calculate, but they are difficult to capture the nonlinear relationships and complex spatiotemporal dependencies in traffic data. Traditional machine learning-based methods such as support vector regression (SVR) improve the prediction accuracy to some extent, but they are still limited by the quality of feature engineering and the expressiveness of the model. CN120706615A fuses multi-graph structure construction, gated graph convolution, and temporal feature extraction to address the problem of strong temporal fluctuations and heterogeneous spatial relationships in traffic data. First, according to the maximum mutual information metric between the spatial distribution information of sensors and historical traffic data, geographic graphs and semantic graphs are constructed. CN120708407A uses adaptive graph structure modeling and diffusion graph convolution to jointly mine the dynamic road network structure and directional spatial inertia in the data, obtaining the internal coupling effect of traffic flow data in the spatial dimension; a dynamic bidirectional gated recurrent unit time process convolution is constructed to fuse the periodic features from each segment, adaptively learning the forward and backward spatiotemporal relationships of each node in the temporal dimension, and fusing the prediction results. CN120656318A introduces a multi-scale dynamic graph structure and an adaptive convolution mechanism, which can effectively model the spatial dimension dynamic evolution law of traffic flow at different scales.
[0004] In recent years, deep learning-based methods have made significant progress in the field of traffic flow prediction. Graph convolutional neural networks (GCN) can effectively model the spatial structure of the road network, and recurrent neural networks (RNN) and their variants such as long short-term memory networks (LSTM) can capture temporal dependencies. However, these methods usually adopt a uniform modeling approach for all nodes, ignoring the heterogeneity of node functions in the transportation network. In fact, hub nodes and non-hub nodes in the transportation network have significant differences in traffic characteristics and spatiotemporal dependencies.
[0005] Specifically, traffic hub nodes are usually located at key positions of the road network, have high-frequency interactions with multiple other nodes, and have complex dynamic spatio-temporal characteristics. The traffic patterns of non-hub nodes are relatively simple, and the spatio-temporal dependence is weak. Existing methods use a unified modeling strategy, either failing to fully capture the complex characteristics of hub nodes or over-parameterizing non-hub nodes, resulting in low model efficiency and overfitting risk.
[0006] In addition, existing methods have limitations in spatio-temporal feature extraction. Most methods use a step-by-step processing strategy, first extracting spatial features and then extracting temporal features, or vice versa. This serial processing approach cannot fully model the spatio-temporal interaction. Although some research attempts to extract spatio-temporal features simultaneously, the computational complexity is high, making it difficult to extend to large-scale road networks.
[0007] Therefore, in view of the defects and deficiencies of the prior art and the improvable space, the present application proposes a traffic flow prediction method based on hierarchical spatio-temporal correlation (STKGCN), which can effectively solve the problem of insufficient prediction accuracy caused by node heterogeneity in the traffic network. First, in the node classification dimension, STKGCN quantifies the traffic aggregation distribution ability and geographical proximity of nodes through a dynamic scoring function, achieving intelligent discrimination of hub nodes and non-hub nodes. Second, in the spatio-temporal modeling dimension, for hub nodes, a spatio-temporal synchronous graph convolution module is used to accurately capture the complex interactions in the radial network structure through dynamic adjacency matrix and local spatio-temporal convolution joint modeling. For non-hub nodes, a step-by-step feature extraction strategy is used, combining one-dimensional causal convolution and differentiated graph convolution to process spatio-temporal features. Third, in the feature fusion dimension, a dual-branch parallel structure is used to realize independent modeling of heterogeneous nodes, and a channel splicing method is used for hierarchical feature integration. Through this hierarchical and differentiated spatio-temporal modeling framework, the accuracy and efficiency of traffic flow prediction are significantly improved, providing reliable decision support for intelligent transportation systems. SUMMARY
[0008] The present application proposes a traffic flow prediction method based on hierarchical spatio-temporal correlation, aiming to effectively solve the problem of spatio-temporal feature heterogeneity of hub nodes and non-hub nodes in the traffic network through differentiated modeling strategies, and improve the accuracy and efficiency of traffic flow prediction.
[0009] The technical solution of the present application is as follows: A traffic flow prediction method based on hierarchical spatio-temporal correlation, comprising the following steps: Step 1: Data preprocessing enhancement The large model is introduced to preprocess the input traffic data for enhancement. A lightweight large model Qwen3-1.7B-FP8 is used to uniformly analyze and clean the multi-source raw data. Qwen3-1.7B-FP8 is based on the Transformer architecture, which learns the general data rules in the traffic field through the pre-training stage, and adapts the feature distribution of sensor data and road network topology data through the fine-tuning stage. It automatically identifies and repairs data missing and abnormal fluctuations, and captures the potential association across data sources through the self-attention mechanism. It converts unstructured data into standardized feature vectors, providing high-quality data input for node classification and spatio-temporal modeling in step 3.
[0010] Step 2: Node feature enhancement and dynamic association mining In the node feature enhancement and dynamic association mining link, the deep semantic understanding and feature generation capability of Qwen3-1.7B-FP8 are integrated. Through Qwen3-1.7B-FP8, the historical traffic sequence and geographic association data of the node are deeply encoded to generate high-dimensional semantic feature vectors, supplementing the representation of traditional features in complex scenarios. At the same time, the large model's few-shot learning ability is used to enhance the features of data-sparse non-hub nodes, generate supplementary features based on the clustering information of similar nodes, and improve the completeness of non-hub node features. In addition, Qwen3-1.7B-FP8 continuously learns the dynamic change data of the road network and updates the prior knowledge of the association weight between nodes in real time, providing more accurate initialization parameters for the construction of the dynamic adjacency matrix, and strengthening the model's adaptability to the dynamic changes of the road network.
[0011] Step 3: Node classification Step 3.1 Quantification of node traffic aggregation capability First, define the node attributes in the traffic network. The traffic hub node refers to a node in the traffic network topology that is in a core connection position and has significantly higher traffic aggregation and distribution capabilities than the average level in the network. To identify such nodes, the traffic propagation capability between nodes needs to be quantified first.
[0012] The specific calculation process is as follows: Let node i be the node to be evaluated, and set the time step index m and the traffic flow propagation time T. Before calculating the similarity, normalize the traffic data of node p and node q. The purpose of normalization is to eliminate the influence of different nodes caused by feature dimension, numerical range or distribution differences, map the features to the same scale, and avoid calculation bias caused by numerical disparity, ensuring the fairness and accuracy of subsequent similarity evaluation.
[0013] denotes the element in the i-th row and j-th column of matrix E, which is used to quantify the traffic flow propagation influence strength between node p and node q. denotes the dynamic correlation observation of the current state of node p and the historical state of node q at a given time delay. , denote the traffic feature normalization factors of node p and node q respectively. The division by this product eliminates the differences in dimension and numerical distribution of different nodes, ensuring the accuracy of similarity evaluation. The higher the final standardized similarity, the greater the influence of traffic features from node q on node p.
[0014] Step 3.2 Hub node comprehensive score and screening On the basis of quantifying the traffic capacity of nodes, a comprehensive scoring function is constructed to integrate traffic aggregation / distribution capacity and geographical distance, which is used to accurately determine the criticality of nodes. The invention proposes a scoring formula to determine the criticality of nodes using the traffic aggregation / distribution capacity of E nodes and geographical distance. Through model training, automatic optimization can be achieved to adapt to the needs of different scenarios. The design of the scoring function is as follows: denotes the comprehensive criticality score of node , which is used to measure whether the node is a traffic hub; denotes the total number of nodes in the traffic network; denote the bidirectional traffic dependence strength between node i and node j determined by matrix E, which is used to quantify the centrality of nodes in function; is a controllable hyperparameter weight used to balance the influence proportion of traffic function features and geographical space features; denotes the geographical Euclidean distance between node i and node j; is a very small constant used to prevent the denominator from being zero, ensuring the stability of numerical calculation.
[0015] Based on the designed scoring function, the system screens out hub nodes according to the scores of the nodes. The parameter is used as a control variable to determine the number of final selected hub nodes. For the selected hub nodes, subsequent steps will use dynamic spatio-temporal correlation matrix for refined modeling; for non-hub nodes that are not selected, only the basic topological connection is retained.
[0016] Step 4: Construction of graph structure and adjacency matrix Step 4.1: Definition of differentiated connection strategy After screening out the hub nodes meeting the score requirements, a graph structure that can accurately represent the spatio-temporal dependence relationship between nodes is constructed. Considering the significant difference in traffic influence strength between hub nodes and ordinary nodes, the system adopts differentiated connection modeling methods: for hub nodes, the spatio-temporal association matrix is used for complete modeling to accurately quantify the spatio-temporal coupling strength between node pairs, which comprehensively considers the time delay effect and spatial attenuation characteristics; for ordinary nodes, only the basic connection relationship based on network topology is retained, and the binary adjacency representation is used to simplify the calculation complexity.
[0017] Step 4.2: Construction of mixed adjacency matrix The mixed adjacency matrix explicitly distinguishes the connection relationship between hub nodes and ordinary nodes through logical operations. Specifically, for the connection edges containing hub nodes, the normalized association strength is used; for the connection between ordinary nodes, the original topological weight is retained. The calculation formula of the element in the ith row and jth column of the adjacency matrix A is as follows: denotes the element in the ith row and jth column of the adjacency matrix A, representing the connection state between node i and node j, denotes the distance between node i and node j, denotes the preset distance threshold.
[0018] Step 4.3: Dynamic graph adjacency weight adjustment and feature aggregation A joint modeling framework of dynamic hub node graph adjacency matrix and local spatio-temporal convolution is adopted to simultaneously aggregate spatial neighborhood and temporal adjacent features through graph convolution operation within a sliding time window. This framework realizes the simultaneous modeling of the spatio-temporal dependence relationship of hub nodes by dynamically adjusting the adjacency weight: the input features are divided into multiple continuous local windows according to the time axis, and dynamic graph convolution operation is performed on each window; among them, the dynamic adjacency matrix A uses the weight based on traffic similarity learning for hub nodes, and the static weight for non-hub nodes. Finally, after nonlinear transformation by the activation function, the updated feature vector is generated by summing along the time dimension.
[0019] Step 5: Spatio-temporal feature extraction of non-hub nodes The hub node spatiotemporal correlation module can effectively extract the complex spatiotemporal dependencies of hub nodes, but feature extraction for non-hub nodes still needs further optimization. Considering that the spatiotemporal features of non-hub nodes are relatively simple, a step-by-step feature extraction strategy can significantly reduce computational complexity. In the field of traffic flow prediction, although RNN-based models are widely used in temporal feature extraction, their complex loop mechanism leads to long training iteration times and low efficiency. In contrast, CNN has the advantages of simple structure and fast training speed. Therefore, this model uses a CNN-based temporal convolutional layer for feature extraction in the temporal dimension. The temporal convolutional layer contains a 1D causal convolutional architecture with a width of... The one-dimensional convolutional kernel processes the M-step historical data of each node in a non-padding manner, thereby reducing the sequence length layer by layer. To maintain strict temporal causality, a GLU gating unit is used to achieve nonlinear feature selection. The convolution output [PQ] is gated through σ(Q)⊙P, where the sigmoid gate σ(Q) dynamically selects effective features, enhancing the model's ability to capture complex temporal patterns.
[0020] Y represents the output feature sequence after processing by the temporal convolutional layer; A and B represent the linear transformation results of the input sequence after processing by two independent one-dimensional convolutional kernels, respectively. This represents the Hadamard product, which is the product of corresponding elements. This represents the Sigmoid activation function, used to map the value of B to the (0,1) interval, acting as a gating mechanism. In spatial feature extraction, the Generative Convolutional Network (GCN) method is generally used to learn the spatial correlation between nodes. By sharing convolutional kernel parameters, the common patterns of all nodes are learned. The specific calculation formula is as follows: Z is the enhanced feature matrix output after spatial correlation modeling; the calculation terms in parentheses reflect the reconstruction of the traffic topology, where... The identity matrix is used to establish self-connections of nodes, ensuring that nodes retain their historical characteristics while aggregating neighborhood traffic information; D is the degree matrix, which, together with the adjacency matrix A, implements Laplacian regularization to prevent numerical explosion or diffusion of features due to differences in the number of node connections during hierarchical transmission; X is the feature matrix of the input nodes, which usually contains multi-dimensional traffic vectors after preprocessing by a large model. represents the learnable shared convolutional kernel parameters used to extract the common traffic distribution patterns in the road network, while b is the bias term vector used to correct model fitting bias.
[0021] Step 6: Feature Fusion By using a channel-dimensional splicing method, the features of hub nodes and non-hub nodes are integrated, preserving their respective spatiotemporal characteristics.
[0022] Step 7: Output the prediction results The fused features are mapped to future traffic flow predictions through two linear transformation layers and activation functions in the output layer.
[0023] The effects and benefits of this invention are as follows: This invention effectively solves the problem of spatiotemporal heterogeneity between hub nodes and non-hub nodes in transportation networks by using a differentiated modeling strategy, thereby improving the accuracy and efficiency of traffic flow prediction. Attached Figure Description
[0024] Figure 1 This is a framework diagram of the algorithm of the present invention; Figure 2 This is a schematic diagram illustrating the current state of the problem according to the present invention. Detailed Implementation
[0025] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.
[0026] To make the technical solution and advantages of the present invention clearer, the implementation methods of the present invention will be described in detail below with reference to specific embodiments. It should be noted that the following embodiments are only used to explain the present invention and are not intended to limit the present invention.
[0027] Example 1: A traffic flow prediction method based on hierarchical spatiotemporal correlation includes the following steps: Step 1. Input layer: After the traffic data is preprocessed and enhanced by the large model, it is input into the model. The system performs a systematic quantitative analysis of all nodes by combining the scoring function of traffic aggregation and distribution capability and geographical proximity. Hub nodes and non-hub nodes are selected based on the scores.
[0028] Step 2. Spatiotemporal Relationship Module of Hub Nodes: In view of the complex spatiotemporal interaction characteristics of hub nodes, spatiotemporally synchronized graph convolution operations are adopted, and dynamically adjusted adjacency matrices and local spatiotemporal convolutions are used for joint modeling to accurately capture the complex dependencies in their radial network structure and achieve accurate representation of the spatiotemporal characteristics of hub nodes.
[0029] Step 3. Spatiotemporal correlation module for non-hub nodes: Considering the relatively simple spatiotemporal features of non-hub nodes, a step-by-step feature extraction strategy is adopted. First, one-dimensional causal convolution combined with gated linear units (GLU) is used to effectively extract temporal dimension features. Then, adaptive graph convolution is used to mine the spatial correlation between nodes, thus efficiently completing the spatiotemporal feature extraction of non-hub nodes.
[0030] Step 4. Node Feature Fusion Framework: The features of hub nodes and non-hub nodes are extracted independently through a dual-branch parallel structure. Then, the two types of node features are integrated by using a channel dimension splicing method. While fusing global information, the unique spatiotemporal feature information of each type of node is fully preserved.
[0031] Step 5. Output layer: Two linear transformation layers are used in conjunction with activation functions to perform dimensional mapping and nonlinear transformation on the fused global features, and finally output the traffic flow prediction results for a specific time step in the future.
[0032] Example 2: A traffic flow prediction method based on hierarchical spatiotemporal correlation includes the following steps: Step 1: Enhanced Data Preprocessing A large-scale model is introduced to preprocess and enhance the input traffic data. A lightweight, adaptable large-scale model, Qwen3-1.7B-FP8, is used to uniformly parse and clean the multi-source raw data. This large-scale model is based on the Transformer architecture. During the pre-training phase, it learns common data patterns in the traffic domain. In the fine-tuning phase, it adapts to the feature distributions of multi-source inputs, including sensor data and road network topology data. It automatically identifies and corrects issues such as missing data and abnormal fluctuations. Simultaneously, it captures potential correlations across data sources through a self-attention mechanism, transforming unstructured data into standardized feature vectors, providing high-quality data input for subsequent node classification and spatiotemporal modeling.
[0033] Step 2: Node Feature Enhancement and Dynamic Association Mining In the node feature enhancement and dynamic association mining stages, the deep semantic understanding and feature generation capabilities of a large-scale model are integrated. The large-scale model performs deep encoding on the historical traffic sequences and geographical association data of hub nodes, generating high-dimensional semantic feature vectors to supplement the insufficient representation of traditional features in complex scenarios. Simultaneously, leveraging the large-scale model's few-shot learning capability, feature enhancement is performed on non-hub nodes with sparse data, generating supplementary features based on clustering information of similar nodes to improve the completeness of non-hub node features. Furthermore, the large-scale model continuously learns from dynamically changing road network data, updating prior knowledge of the association weights between nodes in real time. This provides more accurate initialization parameters for constructing the dynamic adjacency matrix, enhancing the model's adaptability to dynamic changes in the road network.
[0034] Step 3: Node Classification Because these transportation hub nodes occupy core connecting positions in the transportation network, their ability to aggregate traffic flow from other nodes and allocate traffic flow to other nodes is generally higher than that of ordinary nodes. Therefore, it is necessary to quantify the traffic aggregation capacity of hub nodes as input data, where node i represents the node's capacity, m is the time step exponent, and T is the time required for traffic flow to propagate between nodes. In this invention, d=1 is set to represent a time step, and a time step equals 5 minutes. It is a matrix of trainable parameters reflecting the prior spatial relationship between node pairs (p, q). By weighted summing of the current state of p and the historical state of q for each time window, the dynamic correlation strength between traffic nodes p and q under time delay δ is calculated.
[0035] Before calculating the similarity between nodes p and q, they must first be normalized. The core purpose of normalization is to eliminate the influence of differences in feature dimensions, numerical ranges, or distributions between different nodes, thereby mapping the features of each node to the same scale or interval. Through normalization, the feature values of nodes p and q are transformed to the same order of magnitude, effectively avoiding similarity calculation biases caused by significant differences in the numerical values of the features themselves, and providing a comparable basis for subsequent standardized similarity assessments. This step significantly improves the fairness and accuracy of similarity measurement, enabling the assessment results to more realistically reflect the intrinsic connections between nodes, rather than being constrained by differences in the dimensions of the original data.
[0036] The similarity is calculated by comparing the traffic flow at the current time step node p with the traffic flow at the previous d time steps node q. A higher standardized similarity indicates a greater impact of traffic features propagating from node q to node p. The entries in the i-th row of matrix E represent the dependencies of other nodes on node i at time d. Therefore, the sum of each row in matrix E represents the aggregation capacity of each node in the traffic map. Similarly, the sum of the i-th column of matrix E represents the distribution capacity of node i.
[0037] This invention proposes a scoring formula that uses the traffic aggregation and distribution capabilities and geographical distance of node E to determine the criticality of a node. The formula is automatically optimized through model training and can adapt to the needs of different scenarios. The design of the scoring function is as follows: Based on the designed scoring function, the system selects hub nodes according to their scores. Among these, the parameters... As a control variable, k is used to determine the final number of selected hub nodes, and its specific value can be flexibly adjusted according to the needs of the actual application scenario. In the experimental verification stage, the k value is optimized as a hyperparameter to determine the optimal configuration under different scenarios.
[0038] Step 4: Construct the graph structure and adjacency matrix After selecting hub nodes that meet the score requirements, a graph structure that accurately represents the spatiotemporal dependencies between nodes needs to be constructed. Considering the significant differences in the intensity of traffic influence between hub nodes and ordinary nodes, this invention employs a differentiated modeling strategy to achieve efficient and accurate graph representation. For hub nodes, a complete model is created using a spatiotemporal correlation matrix, representing the number of hub nodes. This matrix accurately quantifies the spatiotemporal coupling strength between node pairs, comprehensively considering key factors such as time delay effects and spatial attenuation characteristics. In contrast, ordinary nodes, due to their smaller traffic influence, only retain the basic connection relationships based on network topology, using a binary adjacency representation to simplify computational complexity. Furthermore, the hub node spatiotemporal correlation module achieves differentiated modeling by constructing a hybrid adjacency matrix: The final hybrid adjacency matrix adopts an adjacency matrix definition method based on indicator functions, explicitly distinguishing the connection relationships between hub nodes and ordinary nodes through logical operations: for connection edges containing hub nodes, a normalized association strength σ(e_{i,j}) is used; for connections between ordinary nodes, the original topological weights are retained. In node feature extraction, traditional methods generally only use static adjacency matrices, ignoring dynamic spatiotemporal dependencies, and employ a phased approach to processing time and spatial relationships, resulting in the implicit relationships between the two not being modeled synchronously. This invention adopts a joint modeling framework of dynamic hub node graph adjacency matrices and local spatiotemporal convolution. By dynamically adjusting adjacency weights, the framework achieves synchronous modeling of the spatiotemporal dependencies of hub nodes, improving the model's ability to predict traffic flow changes at hub nodes. Since joint modeling is only performed on the area surrounding the hub node, the model's ability to predict traffic flow changes at hub nodes is significantly improved while effectively controlling computational complexity. The input feature Hl of layer l is divided into d+1 consecutive local windows along the time axis, and each window contains feature slices for consecutive time steps. Then, dynamic graph convolution operation is performed on each window, where the dynamic adjacency matrix A uses the weight sigmoid(eu, v) based on traffic similarity learning for hub nodes, and the static weights u, v are used for non-hub nodes. Through graph convolution operation within the sliding time window, spatial neighborhood and temporally adjacent features are aggregated simultaneously. After nonlinear transformation by activation function σ, the updated features are generated by summing along the time dimension.
[0039] Step 5: Spatiotemporal feature extraction of non-hub nodes The hub node spatiotemporal correlation module can effectively extract the complex spatiotemporal dependencies of hub nodes, but feature extraction for non-hub nodes still needs further optimization. Considering that the spatiotemporal features of non-hub nodes are relatively simple, a step-by-step feature extraction strategy can significantly reduce computational complexity. In the field of traffic flow prediction, although RNN-based models are widely used in temporal feature extraction, their complex loop mechanism leads to long training iteration times and low efficiency. In contrast, CNN has the advantages of simple structure and fast training speed. Therefore, this model uses a CNN-based temporal convolutional layer for feature extraction in the temporal dimension. The temporal convolutional layer contains a 1D causal convolutional architecture with a width of... The one-dimensional convolutional kernel processes the M-step historical data of each node in a non-padding manner, thereby reducing the sequence length layer by layer. To maintain strict temporal causality, a GLU gating unit is used to achieve nonlinear feature selection. The convolution output [PQ] is gated through σ(Q)⊙P, where the sigmoid gate σ(Q) dynamically selects effective features, enhancing the model's ability to capture complex temporal patterns.
[0040] *Y=A⊙ In spatial feature extraction, the GCN method is generally used to learn the spatial correlation between nodes. By sharing convolution kernel parameters, the common patterns of all nodes are learned, and experimental results show that the experimental results are good.
[0041] Step 6: Feature Fusion By using a channel-dimensional splicing method, the features of hub nodes and non-hub nodes are integrated, preserving their respective spatiotemporal characteristics.
[0042] Step 7: Output the prediction results The fused features are mapped to future traffic flow predictions through two linear transformation layers and activation functions in the output layer.
Claims
1. A traffic flow prediction method based on hierarchical spatiotemporal correlation, characterized in that, Includes the following steps: Step 1: Enhanced Data Preprocessing The lightweight, adaptable large model Qwen3-1.7B-FP8 is used to perform unified parsing and cleaning of multi-source raw data; Step 2: Node Feature Enhancement and Dynamic Association Mining In the node feature enhancement and dynamic association mining stages, the deep semantic understanding and feature generation capabilities of Qwen3-1.7B-FP8 are integrated; Step 3: Node Classification Step 3.1 Quantification of Node Traffic Aggregation Capability Let node i be the node to be evaluated. Set the time step exponent m and the traffic flow propagation time T, and normalize the traffic data of node p and node q. This represents the element in the i-th row and j-th column of matrix E, used to quantify the intensity of traffic flow propagation between node p and node q; This represents the dynamic correlation observation between the current state of node p and the historical state of node q over a given time delay. , These represent the normalization factors for the flow characteristics of nodes p and q, respectively. Step 3.2 Comprehensive scoring and screening of hub nodes Based on the quantitative node traffic capacity, a comprehensive scoring function is constructed that integrates traffic aggregation / distribution capabilities and geographical distance. The scoring function is as follows: Represents a node The comprehensive criticality score is used to measure whether the node is a transportation hub; This represents the total number of nodes in the transportation network; These represent the bidirectional flow dependency strength between node i and node j, as determined by matrix E. These are adjustable hyperparameter weights; This represents the geographical Euclidean distance between node i and node j; It is a very small constant; Based on the scoring function, the system selects hub nodes according to their scores; Step 4: Construct the graph structure and adjacency matrix Step 4.1: Define the differentiated connection strategy Construct a graph structure that can accurately represent the spatiotemporal dependencies between nodes; adopt a differentiated connection modeling approach: for hub nodes, perform a complete modeling through a spatiotemporal correlation matrix to accurately quantify the spatiotemporal coupling strength between node pairs; For ordinary nodes, only the basic connection relationships based on the network topology are retained, and binary adjacency representation is used to simplify the computational complexity; Step 4.2: Construction of the Hybrid Adjacency Matrix The hybrid adjacency matrix explicitly distinguishes the connection relationships between hub nodes and ordinary nodes through logical operations; Step 4.3: Dynamic Graph Adjacency Weight Adjustment and Feature Aggregation A joint modeling framework of dynamic hub node graph adjacency matrix and local spatiotemporal convolution is adopted. Through graph convolution operation within a sliding time window, spatial neighborhood and temporal adjacency features are aggregated simultaneously. Step 5: Spatiotemporal feature extraction of non-hub nodes The spatiotemporal features of non-hub nodes can be significantly reduced in computational complexity by employing a step-by-step feature extraction strategy. Feature extraction is performed using a CNN-based temporal convolutional layer. The temporal convolutional layer contains a 1D causal convolutional architecture with a width of [missing information]. The one-dimensional convolutional kernel processes the M-step historical data of each node in a non-padding manner, thereby reducing the sequence length layer by layer. It maintains strict temporal causality; combines GLU gate unit to realize nonlinear feature selection, and realizes the gating mechanism of convolution output [PQ] through σ(Q)⊙P, where sigmoid gate σ(Q) dynamically selects effective features, enhancing the model's ability to capture complex temporal patterns; Y represents the output feature sequence after processing by the temporal convolutional layer; A and B represent the linear transformation results of the input sequence after processing by two independent one-dimensional convolutional kernels, respectively. This represents the Hadamard product, which is the product of corresponding elements. This represents the Sigmoid activation function, used to map the value of B to the (0,1) interval, acting as a gating mechanism. In spatial feature extraction, the GCN method is used to learn the spatial correlation between nodes. By sharing convolutional kernel parameters, the common patterns of all nodes are learned. The specific calculation formula is as follows: Z is the enhanced feature matrix output after spatial correlation modeling; the calculation terms in parentheses reflect the reconstruction of the traffic topology, where... D is the identity matrix; A is the degree matrix; X is the adjacency matrix; and X is the feature matrix of the input nodes. represents the learnable shared convolutional kernel parameters, while b is the bias term vector used to correct model fitting bias. Step 6: Feature Fusion By using a channel-dimensional stitching method, the features of hub nodes and non-hub nodes are integrated, while retaining their respective spatiotemporal feature information; Step 7: Output the prediction results The fused features are mapped to future traffic flow predictions through two linear transformation layers and activation functions in the output layer.
2. The traffic flow prediction method based on hierarchical spatiotemporal correlation as described in claim 1, characterized in that, The Qwen3-1.7B-FP8 is based on the Transformer architecture. It learns general data patterns in the transportation field through the pre-training stage and adapts the feature distribution of sensor data and road network topology data through the fine-tuning stage. It automatically identifies and repairs data missing and abnormal fluctuation problems. At the same time, it captures potential correlations across data sources through a self-attention mechanism, transforming unstructured data into standardized feature vectors, providing high-quality data input for node classification and spatiotemporal modeling in step 3.
3. The traffic flow prediction method based on hierarchical spatiotemporal correlation as described in claim 1, characterized in that, The specific operation of step 2 is as follows: The historical traffic sequences and geographical association data of nodes are deeply encoded using Qwen3-1.7B-FP8 to generate high-dimensional semantic feature vectors. At the same time, the few-shot learning capability of the large model is utilized to enhance the features of non-hub nodes with sparse data and generate supplementary features based on the clustering information of similar nodes. Qwen3-1.7B-FP8 continuously learns from the dynamic changes in road network data and updates the prior knowledge of the association weights between nodes in real time, providing initialization parameters for the construction of the dynamic adjacency matrix and enhancing the model's adaptability to dynamic changes in the road network.
4. The traffic flow prediction method based on hierarchical spatiotemporal correlation as described in claim 1, characterized in that, The specific operation of step 4.2 is as follows: For connections containing hub nodes, normalized association strength is used; for connections between ordinary nodes, the original topological weights are preserved; the elements in the i-th row and j-th column of the adjacency matrix A... The calculation formula is as follows: Let represent the element in the i-th row and j-th column of the adjacency matrix A, which represents the connection state between node i and node j. This represents the distance between node i and node j. This indicates the preset distance threshold.
5. The traffic flow prediction method based on hierarchical spatiotemporal correlation as described in claim 1, characterized in that, The specific operation of step 4.3 is as follows: The input features are divided into multiple continuous local windows along the time axis, and a dynamic graph convolution operation is performed on each window. The dynamic adjacency matrix A uses weights based on traffic similarity learning for hub nodes, while static weights are used for non-hub nodes. Finally, after nonlinear transformation by the activation function, the updated feature vector is generated by summing along the time dimension.
Citation Information
Patent Citations
Traffic flow prediction method and system based on multi-scale dynamic space diagram
CN120656318A
Gated multi-graph convolution perception modeling method for traffic flow prediction
CN120706615A
Traffic flow prediction method of space-time attention adaptive graph diffusion convolutional network
CN120708407A