Traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling
By employing multi-scale decomposition and dynamic graph modeling, this approach addresses the challenge of existing traffic prediction models in accurately decomposing traffic flow change patterns across multiple time scales. This enables high-precision prediction of complex traffic scenarios and enhances the stability and reliability of road network condition prediction.
Patent Information
- Application Number
- CN202511236763.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-21
Smart Images

Figure CN120998030A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle networking technology, and in particular relates to a traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling. Background Technology
[0002] With the acceleration of urbanization, traffic congestion has become a core issue restricting urban operational efficiency and affecting residents' quality of life. Especially during holidays or emergencies (such as traffic accidents or road construction), traffic flow exhibits highly nonlinear fluctuations and spatiotemporal heterogeneity, leading to poor performance of traditional prediction methods. Intelligent Transportation Systems (ITS), as a key means to address this challenge, heavily rely on high-precision prediction results of complex traffic flow dynamics.
[0003] However, existing mainstream prediction models, such as graph neural networks based on static topology or time-scale modeling methods, have significant shortcomings in handling the multi-scale characteristics of traffic flow, the heterogeneity of trend and detail components, and the spatiotemporal dependencies of dynamic changes between roads. For example, existing methods often struggle to adaptively construct spatial adjacency relationships in the absence of prior knowledge, and cannot effectively quantify the delayed transmission effect of sudden traffic events (such as congestion spread 30 minutes after an accident) on the surrounding road network.
[0004] Therefore, how to finely decompose traffic flow change patterns and dynamically model their spatiotemporal correlations across multiple time scales has become a key technological bottleneck that urgently needs to be overcome in the field of intelligent traffic prediction. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling, thereby resolving the issues present in the existing technologies.
[0006] To achieve the above objectives, this invention provides a traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling, comprising the following steps:
[0007] Traffic indicator data collected by traffic sensors are aggregated according to time steps to construct a traffic state sequence;
[0008] Discrete wavelet transform is used to decompose the preprocessed traffic state sequence into low-frequency trend components and high-frequency detail components.
[0009] The low-frequency trend component and high-frequency detail component after decomposition are subjected to dimensionality-upgrading and decoupling processing to obtain the trend feature component and the detail perturbation component.
[0010] Dynamic adjacency matrices are constructed for both trend feature components and detail perturbation components;
[0011] Spatiotemporal modeling branches are constructed for the trend feature components and the detail perturbation components, respectively;
[0012] Extrapolate and predict the trend feature components and detailed disturbance components of the final state output to obtain the traffic state prediction results for future time periods.
[0013] Optionally, after aggregating the traffic indicator data collected by traffic sensors by time step to construct the traffic state sequence, the process also includes preprocessing the traffic state sequence:
[0014] Missing values in the traffic state sequence are filled with mean and normalized using Z-score to obtain the preprocessed traffic state sequence.
[0015] Optionally, the process of decomposing the preprocessed traffic sequence into low-frequency trend components and high-frequency detail components using discrete wavelet transform includes:
[0016] The input preprocessed traffic sequence is subjected to multi-level filtering and downsampling operations along the time axis using discrete wavelet transform, and is decomposed into low-frequency trend components and high-frequency detail components; wherein, the low-frequency trend components reflect a periodic evolution structure, and the high-frequency detail components reflect short-term abnormal fluctuations.
[0017] Optionally, the process of upgrading and decoupling the decomposed low-frequency trend components and high-frequency detail components includes:
[0018] By using learnable weight matrices and bias terms, the decomposed low-frequency trend components and high-frequency detail components are input into a fully connected layer for dimensionality upscaling to obtain a unified dimension of encoded features. By applying a multi-level filter bank to the obtained encoded features, they are decoupled into trend feature components and detail perturbation components.
[0019] Optionally, the process of constructing spatiotemporal modeling branches for the trend feature components and the detail perturbation components separately includes:
[0020] Using a dynamic graph, graph convolution operations are performed, and the graph convolution output is embedded into a recurrent neural network structure. Recursive calculations are then performed, and the embedded structure is applied to the trend feature component and the detail perturbation component respectively to obtain the final output state.
[0021] Optionally, the process of extrapolating the trend feature components and detailed disturbance components of the final state output to obtain the traffic state prediction results for future time periods includes:
[0022] By using a linear projection layer, the trend feature components and detail perturbation components of the final state output are predicted in multiple steps, and the prediction result sequence for future time steps is output.
[0023] This invention also proposes a traffic flow prediction system based on multi-scale decomposition and dynamic graph modeling, for implementing the method, including:
[0024] The traffic data aggregation module is used to aggregate traffic indicator data collected by traffic sensors according to time steps to construct a traffic state sequence;
[0025] The state sequence decomposition module is used to decompose the preprocessed traffic state sequence into low-frequency trend components and high-frequency detail components using discrete wavelet transform.
[0026] The state component decoupling module is used to perform dimensionality-upgrading and decoupling processing on the decomposed low-frequency trend component and high-frequency detail component to obtain trend feature component and detail perturbation component.
[0027] The feature component processing module is used to construct dynamic adjacency matrices for trend feature components and detail perturbation components respectively; and to construct spatiotemporal modeling branches for trend feature components and detail perturbation components respectively.
[0028] The traffic condition prediction module is used to extrapolate and predict the trend feature components and detailed disturbance components of the final state output to obtain the traffic condition prediction results for future time periods.
[0029] The present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0030] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.
[0031] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the method.
[0032] Compared with the prior art, the present invention has the following advantages and technical effects:
[0033] This invention utilizes discrete wavelet transform to decompose traffic data at multiple scales, precisely decoupling low-frequency trend components and high-frequency detail disturbances in traffic flow. Simultaneously, it incorporates a dynamic graph generation mechanism to adaptively capture the dynamic evolution of spatiotemporal dependencies within the traffic network. This method significantly enhances the ability to capture and predict complex, non-stationary traffic patterns, maintaining stable and reliable output even during periods of significant fluctuation in road network conditions. It provides city managers and navigation systems with more realistic prediction results, helping to optimize traffic management strategies, dynamically adjust signal timing, or recommend efficient detour routes, effectively improving the overall traffic efficiency of the road network. Attached Figure Description
[0034] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0035] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation
[0036] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0037] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0038] Example 1
[0039] like Figure 1 As shown, given the close relationship between road congestion and vehicle flow density, this embodiment provides a traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling to more accurately predict traffic flow trends. In the prediction phase, the model takes the spatial characteristics and multi-timescale temporal characteristics of traffic flow as input and outputs the traffic state prediction results for future time periods. This method not only deeply integrates multi-scale, multi-frequency, and multi-source traffic information but also effectively overcomes the limitations of static graph structures on prediction performance, significantly enhancing the model's robustness and generalization ability in non-stationary traffic scenarios. The method includes the following steps:
[0040] Traffic indicator data collected by traffic sensors are aggregated according to time steps to construct a traffic state sequence;
[0041] Discrete wavelet transform is used to decompose the preprocessed traffic state sequence into low-frequency trend components and high-frequency detail components.
[0042] The low-frequency trend component and high-frequency detail component after decomposition are subjected to dimensionality-upgrading and decoupling processing to obtain the trend feature component and the detail perturbation component.
[0043] Dynamic adjacency matrices are constructed for both trend feature components and detail perturbation components;
[0044] Spatiotemporal modeling branches are constructed for the trend feature components and the detail perturbation components, respectively;
[0045] Extrapolate and predict the trend feature components and detailed disturbance components of the final state output to obtain the traffic state prediction results for future time periods.
[0046] As an optional implementation method, the specific steps include:
[0047] Step 1: Aggregate the traffic indicator data collected by traffic sensors according to time steps to construct a traffic state sequence. Set the traffic observation matrix as: X t ∈R N×C Where N represents the number of traffic sensing points, such as road segment nodes; C represents the feature dimensions recorded by each node, such as vehicle speed, traffic flow, and congestion index; and t represents the time step. External time information, such as date and hour, is also loaded to generate time codes.
[0048] Step 2: Impute missing values in the traffic observation matrix using the mean and normalize it using the Z-score to obtain the preprocessed traffic observation matrix. Used for subsequent training.
[0049] Step 3: Use discrete wavelet transform to perform multi-level filtering and downsampling operations (along the time axis) on the preprocessed traffic observation matrix X, decomposing the original signal into low-frequency trend subsequences and multiple high-frequency detail subsequences. The low-frequency part reflects periodic evolution structures such as morning and evening rush hours, weekdays and holidays, while the high-frequency part represents short-term abnormal fluctuations such as traffic accidents and sudden road closures.
[0050] The first-level decomposition formula is as follows:
[0051]
[0052] Where: h[n] is a low-pass filter, which is a trend extractor and corresponds to the scaling function of the wavelet function; g[n] is a high-pass filter, which is a detail extractor and corresponds to the mother wavelet of the wavelet function; * is a one-dimensional convolution operation (along the time axis); ↓2 is a downsampling operation, which means that the result is retained once at each time point.
[0053] The second-level decomposition formula is as follows:
[0054]
[0055] Similarly, if the decomposition level is L, then the final trend part is... Details are
[0056] Step 4: To keep the time step length consistent with the original input, decompose the trend components. and details By inputting each fully connected layer into the higher dimension, we obtain encoded features of a unified dimension d, which are consistent with the embedding dimension.
[0057] The formula is as follows:
[0058]
[0059] in: For learnable weight matrix, This is a bias term.
[0060] The original traffic sequence X, after being processed by the time-series feature decomposition module, is deconstructed into trend feature components representing stable periodic characteristics. The sum and represent the detailed perturbation components of short-term perturbation changes. This decoupling process is accomplished by applying a multi-level filter bank (low-pass and high-pass) to the time series of each node. The resulting trend and detail features are then fed as parallel inputs into two dynamic graph modeling modules, preserving long-term and short-term dependency information.
[0061] Step 5: At each time t, construct the dynamic adjacency matrix. Used to reflect time-varying spatial dependencies, node embedding is... Wherein: T t Indicates intraday time encoding (e.g., 24-hour one-hot or sinusoid), W t ⊕ indicates the weekday time code (e.g., weekdays / holidays), and ⊕ indicates a concatenation operation.
[0062] Through a learnable attention function The adjacency matrix is dynamically generated to capture time-varying dependencies between nodes in real time. Here, f(·) and g(·) are learnable linear mappings.
[0063] Step 6: For the two decoupled input sequences, construct two parallel spatiotemporal modeling branches respectively. Use dynamic graph A. t Perform graph convolution operation G t =σ(A t ·H t ·W g ).in Let σ be the graph convolution weights, and σ(·) be the activation function.
[0064] The graph convolution output is embedded into the GRU structure, and recursive computation is performed: h t =GRU(G t ,h t-1 Then apply this structure to the trend sequence and the detail sequence respectively to obtain... By combining dynamic graph-aware graph convolution with recurrent networks, we can finely model the spatial propagation effect and temporal evolution relationship between nodes, effectively modeling spatiotemporal dynamic heterogeneity.
[0065] Step 6: Output the trend H of the final state trend With detailed state Hdetail As input, traffic flow is predicted for the next H time steps. The fusion weight λ can be a learnable parameter. The formula is as follows:
[0066]
[0067] The predicted sequence for the next H time steps is output through a linear projection layer.
[0068] This embodiment introduces discrete wavelet transform for multi-scale decomposition, which can finely decouple low-frequency trend components and high-frequency detail disturbances in traffic flow, achieving more accurate modal modeling. In particular, this method considers the heterogeneous evolution of different frequency components under scenarios such as holiday peaks and sudden accidents, significantly improving the model's ability to capture complex and non-stationary traffic patterns and its prediction accuracy, enabling it to maintain stable and reliable output even when the road network condition fluctuates drastically.
[0069] This embodiment can not only handle routine traffic flow prediction, but also perform real-time modeling and response to dynamic changes in spatiotemporal dependencies caused by sudden traffic events (such as accidents and construction), providing users with more realistic prediction results. It helps city managers and navigation systems anticipate the risk of congestion spread and key impact paths, thereby optimizing traffic management strategies, dynamically adjusting signal timing, or recommending efficient detour routes, effectively improving the overall traffic efficiency of the road network.
[0070] Example 2
[0071] On the other hand, based on the same inventive concept as the above embodiments, this embodiment also provides a traffic flow prediction system based on multi-scale decomposition and dynamic graph modeling. The usage method of this system is comparable to that of the above embodiments in terms of effectiveness. The system includes:
[0072] The traffic data aggregation module is used to aggregate traffic indicator data collected by traffic sensors according to time steps to construct a traffic state sequence;
[0073] The state sequence decomposition module is used to decompose the preprocessed traffic state sequence into low-frequency trend components and high-frequency detail components using discrete wavelet transform.
[0074] The state component decoupling module is used to perform dimensionality-upgrading and decoupling processing on the decomposed low-frequency trend component and high-frequency detail component to obtain trend feature component and detail perturbation component.
[0075] The feature component processing module is used to construct dynamic adjacency matrices for trend feature components and detail perturbation components respectively; and to construct spatiotemporal modeling branches for trend feature components and detail perturbation components respectively.
[0076] The traffic condition prediction module is used to extrapolate and predict the trend feature components and detailed disturbance components of the final state output to obtain the traffic condition prediction results for future time periods.
[0077] Example 3
[0078] This embodiment also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in Embodiment 1.
[0079] Example 4
[0080] This embodiment also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1.
[0081] Example 4 and Example 5: This example also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in Example 1.
[0082] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A traffic flow prediction method based on multi-scale decomposition and dynamic graph modeling, characterized in that, The method comprises the following steps: aggregating traffic indicator data collected by a traffic sensor according to time steps to construct a traffic state sequence; decomposing the preprocessed traffic state sequence into a low-frequency trend component and a high-frequency detail component by using discrete wavelet transform; performing dimension increasing and decoupling processing on the decomposed low-frequency trend component and high-frequency detail component to obtain a trend feature component and a detail disturbance component; constructing a dynamic adjacency matrix for the trend feature component and the detail disturbance component, respectively; constructing a space-time modeling branch for the trend feature component and the detail disturbance component, respectively; extrapolating the trend feature component and the detail disturbance component of the final state output to obtain a traffic state prediction result for a future time period.
2. The method of claim 1, wherein, after aggregating the traffic indicator data collected by the traffic sensor according to time steps to construct the traffic state sequence, the method further comprises preprocessing the traffic state sequence: filling missing values of the traffic state sequence with mean values, and performing Z-score normalization processing to obtain the preprocessed traffic state sequence.
3. The method of claim 1, wherein, the process of decomposing the preprocessed traffic sequence into a low-frequency trend component and a high-frequency detail component by using discrete wavelet transform comprises: performing multi-level filtering and downsampling operations on the input preprocessed traffic sequence along the time axis by using discrete wavelet transform to split the preprocessed traffic sequence into a low-frequency trend component and a high-frequency detail component; wherein, the low-frequency trend component embodies a periodic evolution structure, and the high-frequency detail component embodies short-term abnormal fluctuations.
4. The method of claim 1, wherein, the process of performing dimension increasing and decoupling processing on the decomposed low-frequency trend component and high-frequency detail component comprises: inputting the decomposed low-frequency trend component and high-frequency detail component into a fully connected layer through a learnable weight matrix and a bias term to increase the dimension, and obtaining encoded features of a unified dimension; and decoupling the encoded features into a trend feature component and a detail disturbance component by applying a multi-level filter set to the encoded features.
5. The method of claim 1, wherein, the process of constructing a space-time modeling branch for the trend feature component and the detail disturbance component, respectively, comprises: using a dynamic graph to perform graph convolution operations, embedding the graph convolution output into a recurrent neural network structure, performing recursive calculations, and applying the embedded structure to the trend feature component and the detail disturbance component, respectively, to obtain the final output state.
6. The method of claim 1, wherein, the process of extrapolating the trend feature component and the detail disturbance component of the final state output to obtain a traffic state prediction result for a future time period comprises: performing multi-step prediction on the trend feature component and the detail disturbance component of the final state output through a linear projection layer to output a prediction result sequence for a future time step. A device for implementing the method of any one of claims 1-6, comprising: a traffic data aggregation module configured to aggregate traffic indicator data collected by a traffic sensor according to time steps to construct a traffic state sequence; a state sequence decomposition module configured to decompose the preprocessed traffic state sequence into a low-frequency trend component and a high-frequency detail component by using discrete wavelet transform; 7. A traffic flow prediction system based on multiscale decomposition and dynamic graph modeling, characterized in that, a state component decoupling module, configured to perform dimensionality increasing and decoupling processing on the decomposed low-frequency trend component and high-frequency detail component, to obtain a trend feature component and a detail disturbance component; a feature component processing module, configured to construct a dynamic adjacency matrix for the trend feature component and the detail disturbance component respectively; and configured to construct a space-time modeling branch for the trend feature component and the detail disturbance component respectively; a traffic state prediction module, configured to extrapolate and predict the trend feature component and the detail disturbance component of the final state output, to obtain a traffic state prediction result for a future time period.
8. A computer apparatus comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, causes the processor to perform the method of any one of claims 1 to 7. The processor executes the computer program to implement the steps of the method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.
Citation Information
Patent Citations
Traffic prediction method based on multi-scale graph convolutional network model
CN113053115A
Traffic prediction method based on multi-scale space-time fusion graph network
CN115240425A
Traffic flow prediction model construction method and prediction method based on adaptive dynamic graph
CN116187555A
Road network level traffic flow integrated prediction method based on adaptive time series decomposition
CN116824838A
Traffic flow prediction method and system based on trend space-time diagram convolution, and medium
CN116895157A