Traffic flow prediction method and system based on multi-scale decomposition and double-branch cooperation

The traffic flow prediction method based on multi-scale decomposition and dual-branch collaboration utilizes GCN graph convolutional layers and temporal decomposition layers to decompose traffic flow into seasonal and high-frequency residual components. By combining MGCN and TGCN layers to extract features, it solves the problem of insufficient modeling for long-term dependence and short-term abrupt changes, thereby improving the accuracy and robustness of traffic flow prediction.

CN121661823APending Publication Date: 2026-03-13NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing traffic flow prediction models suffer from insufficient long-term modeling, inadequate capture of sudden changes, and difficulty in coordinating the use of multi-scale features, resulting in insufficient prediction accuracy and robustness in complex traffic flow scenarios.

Method used

A multi-scale decomposition and dual-branch collaborative approach is adopted. The spatial features of traffic flow are extracted using the GCN graph convolutional layer, and then decomposed into seasonal components and high-frequency residual components through a temporal decomposition layer. Long-term periodicity and short-term mutation features are extracted using the MGCN layer and TGCN layer respectively, and prediction is performed by combining the dynamic gating fusion module.

Benefits of technology

It significantly improves the prediction accuracy and robustness in complex long-term and short-term traffic flow scenarios, effectively capturing long-term dependence and short-term abrupt change characteristics, thereby improving the accuracy and reliability of traffic flow prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661823A_ABST
    Figure CN121661823A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method and system based on multi-scale decomposition and double-branch cooperation in the technical field of traffic flow. The method comprises the following steps: according to an obtained traffic flow sequence and a constructed road network map, performing spatial feature extraction by using a GCN map convolutional layer to obtain traffic flow spatial features; utilizing a time sequence decomposition layer to decompose the traffic flow space characteristics into seasonal components and high-frequency residual components; an MGCN layer is used for extracting a long-term periodic dependency relationship of a seasonal component, a TGCN layer is used for extracting short-term mutation feature information of a high-frequency residual component, and output features of a long-period feature and a short-term mutation feature are obtained; and performing traffic flow prediction by using an output layer according to the output characteristics of the long-period characteristic and the short-term abrupt change characteristic. According to the method, the problems of insufficient long-term dependence modeling, insufficient sudden change capture, difficulty in cooperative utilization of multi-scale features and the like in the prior art are solved, and the prediction precision and robustness in a complex long-term and short-term traffic flow scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic flow technology, and in particular to a traffic flow prediction method and system based on multi-scale decomposition and bi-branch collaboration. Background Technology

[0002] With the acceleration of urbanization, road traffic systems are becoming increasingly complex, leading to more severe urban traffic flow problems such as traffic accidents and congestion. Currently, Intelligent Transportation Systems (ITS) comprehensively utilize sensing, communication, and artificial intelligence technologies to provide efficient traffic management and travel optimization solutions. Traffic flow prediction, as one of the core functions of ITS, effectively reduces traffic congestion, improves road utilization, and optimizes traffic signal control by predicting future road network conditions, thereby significantly improving travel efficiency.

[0003] Traffic flow prediction is essentially a typical spatiotemporal sequence modeling problem. In the temporal dimension, traffic flow not only exhibits short-term continuity but also long-term dependencies caused by holidays, commuting peaks, and other factors. Spatially, influenced by factors such as road network structure and the distribution of road functional zones, complex dynamic dependencies exist between road nodes monitored by sensors. These dependencies include strong correlations between neighboring nodes and potential mutual influences between distant nodes. Therefore, traffic flow prediction must consider not only multi-scale temporal dynamics but also the complex road network topology in the spatial dimension. Due to the inherent strong spatiotemporal correlation and nonlinear time-varying characteristics of traffic data, effectively capturing these complex spatiotemporal dependencies becomes a significant challenge in improving the accuracy of traffic flow prediction.

[0004] In recent years, deep learning technology has greatly promoted the development of traffic flow prediction. In the temporal dimension, recurrent neural networks (such as Long Short-Term Memory (LSTM) networks) and temporal convolutional networks (TCNs) are widely used to mine temporal dependencies; in the spatial dimension, graph neural networks (GNNs), due to their advantage in modeling non-Euclidean spatial structures, are widely used to capture spatial correlations in road networks. Currently, most deep learning-based traffic flow prediction models typically employ a separate-fusion strategy, that is, first modeling temporal and spatial features separately, and then coupling them for prediction. However, the accuracy of such methods drops significantly when facing long-term prediction tasks, making it difficult to effectively capture long-term dependency features. To address this, the Transformer model, with its self-attention mechanism, shows significant advantages in handling long-sequence tasks; however, its high computational cost and resource consumption limit its application in large-scale traffic prediction. The Mamba model, proposed in recent years, has demonstrated strong potential in complex time-series tasks such as traffic flow prediction by combining the temporal structure of Recurrent Neural Networks (RNNs), the parallel computing power of Transformers, and the linear modeling advantages of State Space Models (SSMs). Meanwhile, TCNs, with their dilated convolutional structure and parallelism, show good performance in capturing short-term local features (such as sudden changes in traffic flow). However, these models generally suffer from limited ability to capture deep dependencies within the variable sequences, thus affecting the understanding and prediction of complex traffic sequences.

[0005] Therefore, there is a need for a traffic flow prediction method that can deeply mine the characteristics of the original traffic flow sequence and adaptively model complex scenarios in order to improve road capacity and solve dynamic congestion problems. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a traffic flow prediction method and system based on multi-scale decomposition and bi-branch collaboration. This effectively solves the problems of insufficient modeling of long-term dependencies, inadequate capture of sudden changes, and difficulty in the collaborative utilization of multi-scale features in the prior art, and significantly improves the prediction accuracy and robustness in complex long-term and short-term traffic flow scenarios.

[0007] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution:

[0008] In a first aspect, the present invention provides a traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration, comprising:

[0009] Based on the obtained traffic flow sequence and the constructed road network map, spatial features are extracted using GCN graph convolutional layers to obtain the spatial features of traffic flow.

[0010] The spatial features of traffic flow are decomposed into seasonal components and high-frequency residual components using a temporal decomposition layer.

[0011] The seasonal component and the high-frequency residual component are input into the dual-branch architecture: the long-term periodic dependency of the seasonal component is extracted using the MGCN layer to obtain the output features of the long-term characteristics; the short-term mutation feature information of the high-frequency residual component is extracted using the TGCN layer to obtain the output features of the short-term mutation characteristics.

[0012] Based on the output characteristics of the long-period characteristics and the output characteristics of the short-term abrupt change characteristics, traffic flow prediction is performed using the output layer to obtain the traffic flow prediction results.

[0013] Optionally, based on the obtained traffic flow sequence and the constructed road network map, spatial features are extracted using a GCN graph convolutional layer to obtain spatial features of the traffic flow, including:

[0014] An adjacency matrix is ​​constructed based on the physical connectivity of the road network to obtain the constructed road network map;

[0015] The Laplace matrix is ​​used to perform spectral decomposition on the constructed road network map to transform the structural information into a frequency domain representation, thus obtaining the frequency domain representation of the road network.

[0016] Based on the obtained traffic flow sequence and road network frequency domain representation, graph convolution operation is performed using Chebyshev polynomials to obtain the spatial features of traffic flow.

[0017] Optionally, graph convolution operations using Chebyshev polynomials can be implemented using the following formula:

[0018] ,

[0019] in, Indicates spatial characteristics of traffic flow. This represents the graph convolution kernel function. Represents a road network map. This represents the obtained traffic flow sequence. Indicates the total order. express Convolution kernel parameters, This represents the frequency domain representation of the road network. express Chebyshev polynomial terms.

[0020] Optionally, the step of using a time-series decomposition layer to decompose the spatial features of traffic flow into seasonal components and high-frequency residual components includes:

[0021] Multi-scale moving average kernel extraction is used to extract the trend components of the spatial features of the traffic flow.

[0022] The trend component is removed from the traffic flow spatial features to obtain the detrended component;

[0023] The detrended component is subjected to Fourier transform to extract periodic features in the frequency domain, and then the periodic features in the frequency domain are subjected to inverse Fourier transform to obtain the seasonal component.

[0024] Remove the seasonal component from the detrended component to obtain the initial residual component;

[0025] Nonlinear high-frequency features are extracted from the initial residual components using convolutional layers, and a gating mechanism is introduced to fuse the initial residual components with the nonlinear high-frequency features to obtain high-frequency residual components.

[0026] Optionally, the trend component is obtained by the following formula:

[0027] ,

[0028] in, Indicates trend components, Indicates the total number of pooling cores. Indicates the first The weight coefficients of each pooling kernel. Indicates the first A one-dimensional pooling function with a pooling kernel. Indicates spatial characteristics of traffic flow. This indicates that boundary processing is performed using mirror padding to ensure that the output dimension is consistent with the input dimension;

[0029] The detrending component is obtained using the following formula:

[0030] ,

[0031] in, Indicates the detrended component;

[0032] The seasonal component is obtained by the following formula:

[0033] ,

[0034] in, Indicates seasonal component, Indicates Fourier transform, Indicates the inverse Fourier transform. For hyperparameters, represents the frequency domain representation that retains only the detrended components. The dominant frequency information is used to suppress aperiodic components and low-frequency noise. Frequency variables in the frequency domain representing the detrending component;

[0035] The initial residual components are obtained by the following formula:

[0036] ,

[0037] in, Represents the initial residual components;

[0038] The high-frequency residual components are obtained by the following formula:

[0039] ,

[0040] in, Represents high-frequency residual components; This represents the parameters of the first convolution kernel. This represents the parameters of the second convolution kernel. This represents the activation function. Indicates the gating parameters, This represents the Sigmoid function.

[0041] Optionally, the MGCN layer includes an embedding layer and a bidirectional Mamba branch;

[0042] The embedding layer is used to adapt and map the feature dimensions of the seasonal components to obtain the output features of the embedding layer.

[0043] The embedded layer output features are input into the bidirectional Mamba branch to extract long-term periodic dependencies and obtain output features with long-term characteristics.

[0044] The output features of the embedding layer are obtained by the following formula:

[0045] ,

[0046] in, This represents the output features of the embedding layer;

[0047] The output characteristics of the long-period property are obtained by the following formula:

[0048] ,

[0049] in, Output characteristics representing long-period properties Represents the learnable parameter matrix, This represents the concatenation function. express The forward hidden state at the time step ,

[0050] , For discretized time-series Mamba parameters, express The forward hidden state at the time step express Input feature vector at time step transpose, , express The backward hidden state at the time step. .

[0051] Optionally, the TGCN layer includes a gated convolutional layer Gate-TCN and a regularization layer Drop;

[0052] The output characteristics of the short-term mutation property are obtained by the following formula:

[0053] ,

[0054] in, Output features representing short-term mutation characteristics This represents a regularization operation. To follow the Bernoulli distribution The binary mask matrix, Represents probability. This represents the output features of the Gate-TCN gated convolutional layer;

[0055] The output features of the gated convolutional layer Gate-TCN It can be obtained through the following formula:

[0056] ,

[0057] in, This represents a filtering convolution operation. This represents the activation function. This represents element-wise multiplication. This represents the Sigmoid function. This indicates a gated convolution operation.

[0058] Optionally, the traffic flow prediction using the output layer includes:

[0059] The output features of the long-period characteristics and the output features of the short-term abrupt change characteristics are dynamically weighted and fused using a dynamic gating fusion module to obtain the dynamic fused features;

[0060] The dynamic fusion feature is expanded in dimension to obtain the expanded fusion feature;

[0061] The extended fused features and the obtained traffic flow sequence are residually joined and then normalized. A linear projection layer is then used to reduce the dimensionality of the normalized results to obtain the traffic flow prediction results.

[0062] Optionally, the dynamically fused features are obtained using the following formula:

[0063] ,

[0064] in, Indicates dynamic fusion characteristics, This represents the fusion weights of the gating network output. , , This represents the Sigmoid function. This represents the activation function. , For weight parameters, The result of splicing the output features representing long-period characteristics and short-term mutation characteristics. , Output characteristics representing long-period properties Output features representing short-term mutation characteristics;

[0065] The extended fusion feature is obtained through the following formula:

[0066] ,

[0067] in, Indicates the expanded fusion features, This represents a linear dimension expansion operation;

[0068] The traffic flow prediction results are obtained using the following formula:

[0069] ,

[0070] in, This indicates the traffic flow prediction results. This represents the obtained traffic flow sequence. This represents the residual convolution operation. Presentation layer normalization operation, This indicates a linear projection layer.

[0071] Secondly, the present invention provides a traffic flow prediction system based on multi-scale decomposition and bi-branch collaboration, comprising:

[0072] The spatial feature extraction module is used to extract spatial features of traffic flow based on the acquired traffic flow sequence and the constructed road network map using the GCN graph convolutional layer.

[0073] The temporal decomposition module is used to: decompose the spatial features of traffic flow into seasonal components and high-frequency residual components using the temporal decomposition layer;

[0074] The dual-branch architecture module is used to: input the seasonal component and the high-frequency residual component into the dual-branch architecture; use the MGCN layer to extract the long-term periodic dependency of the seasonal component to obtain the output features of the long-term characteristics; use the TGCN layer to extract the short-term mutation feature information of the high-frequency residual component to obtain the output features of the short-term mutation characteristics.

[0075] The traffic flow prediction module is used to: predict traffic flow using the output layer based on the output characteristics of the long-period characteristics and the output characteristics of the short-term abrupt change characteristics, and obtain the traffic flow prediction result.

[0076] Compared with existing technologies, the beneficial effects achieved by this invention are as follows:

[0077] 1. A traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration is proposed. First, a graph convolutional network is used to capture the spatial correlation of the original input sequence. Then, a multi-scale temporal decomposition module is used to split the original input sequence into seasonal components and high-frequency residual components. Second, a bi-branch model architecture and dynamic fusion mechanism are constructed. A bidirectional Mamba module is used to process the seasonal components to extract long-term periodic features, and a Gate-TCN module is used to process the high-frequency residual components to capture short-term abrupt features. This achieves dynamic collaborative modeling of long-term and short-term features, thereby improving the accuracy and reliability of traffic flow prediction in complex scenarios where long-term periodicity and short-term abrupt features coexist.

[0078] 2. A traffic flow prediction system based on multi-scale decomposition and bi-branch collaboration is proposed. By setting up a spatial feature extraction module, a temporal decomposition module, a bi-branch architecture module and a traffic flow prediction module, traffic flow prediction is achieved together. This effectively solves the problems of insufficient modeling of long-term dependencies, insufficient capture of sudden changes and difficulty in the collaborative utilization of multi-scale features in existing technologies, and significantly improves the prediction accuracy and robustness in complex long-term and short-term traffic flow scenarios. Attached Figure Description

[0079] Figure 1 A flowchart of a traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration is provided according to an embodiment of the present invention;

[0080] Figure 2 A diagram illustrating the bidirectional Mamba branch structure provided in an embodiment of the present invention;

[0081] Figure 3 This is a flowchart of the timing decomposition layer workflow provided according to an embodiment of the present invention. Detailed Implementation

[0082] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations thereof. In the absence of conflict, the embodiments and technical features in the embodiments can be combined with each other.

[0083] It should be noted that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0084] Example 1

[0085] This invention discloses a traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration, with reference to... Figure 1 As shown, the specific steps include the following:

[0086] S1. Based on the obtained traffic flow sequence and the constructed road network map, spatial features are extracted using the GCN graph convolutional layer to obtain the spatial features of traffic flow.

[0087] S2, using a time-series decomposition layer to decompose the spatial features of traffic flow into seasonal components and high-frequency residual components;

[0088] S3, input the seasonal component and the high-frequency residual component into the dual-branch architecture: use the MGCN layer to extract the long-term periodic dependency of the seasonal component to obtain the output features of the long-term characteristics; use the TGCN layer to extract the short-term mutation feature information of the high-frequency residual component to obtain the output features of the short-term mutation characteristics.

[0089] S4. Based on the output characteristics of the long-period characteristics and the output characteristics of the short-term mutation characteristics, traffic flow prediction is performed using the output layer to obtain the traffic flow prediction result.

[0090] Specifically, the problem addressed in this embodiment is to analyze historical time windows (with a length of...) In the traffic flow sequence of (steps), a mapping function is learned to predict the future. Step-by-step traffic flow data, with the raw input data as follows: The output is ,in and Represented as feature dimension, This indicates the number of nodes in the transportation network. This represents a road network diagram.

[0091] In step S1, this embodiment defines the road network as a directed graph. ,in Indicating transportation network A set of nodes, Let be the edge set of the graph, representing the road connections between nodes. Let be the adjacency matrix of the graph, and its elements Represents a node and Spatial correlation.

[0092] Based on the obtained traffic flow sequence and the constructed road network map, spatial features are extracted using GCN graph convolutional layers to obtain the spatial features of traffic flow, including:

[0093] An adjacency matrix is ​​constructed based on the physical connectivity of the road network to obtain the constructed road network map;

[0094] The Laplace matrix is ​​used to perform spectral decomposition on the constructed road network map to transform the structural information into a frequency domain representation, thus obtaining the frequency domain representation of the road network.

[0095] Based on the obtained traffic flow sequence and road network frequency domain representation, graph convolution operation using Chebyshev polynomials is performed to obtain the spatial features of traffic flow:

[0096] ,

[0097] in, Indicates spatial characteristics of traffic flow. This represents the graph convolution kernel function. Represents a road network map. This represents the obtained traffic flow sequence. Indicates the total order. express Convolution kernel parameters, This represents the frequency domain representation of the road network. express Chebyshev polynomial terms.

[0098] In step S2, refer to Figure 3 As shown, this embodiment constructs a multi-scale time series decomposition layer to extract complex multi-scale time-frequency features from time series data, and decomposes the original time series into seasonal components with long-term periodicity and high-frequency residual components with short-term abrupt changes. Specifically, it includes the following steps:

[0099] S2.1, Multi-scale trend extraction is performed on the spatial features of the traffic flow using multi-scale moving average kernel extraction to obtain trend components;

[0100] Will (B represents the batch size) as the input sequence, using Moving average kernels with different window sizes (e.g.) The input sequences are processed in parallel at hourly and daily granularities respectively. Then, learnable weight coefficients are introduced, and the trends at each scale are weighted and fused through normalization to obtain the final trend components. :

[0101] ,

[0102] in, Indicates trend components, Indicates the total number of pooling cores. Indicates the first The weight coefficients of each pooling kernel. Indicates the first A one-dimensional pooling function with a pooling kernel. Indicates spatial characteristics of traffic flow. This indicates that boundary processing is performed using mirror padding to ensure that the output dimension is consistent with the input dimension.

[0103] S2.2, Remove the trend component from the traffic flow spatial characteristics to obtain the detrended component;

[0104] Since trend components typically belong to the low-frequency range and can easily mask the true periodic frequency, removing the trend components from the original sequence yields the detrended components:

[0105] ,

[0106] in, Indicates the detrended component;

[0107] S2.3, Perform a Fourier transform on the detrended component to extract periodic features in the frequency domain, and then perform an inverse Fourier transform on the periodic features in the frequency domain to obtain the seasonal component:

[0108] ,

[0109] in, Indicates seasonal component, Indicates Fourier transform, Indicates the inverse Fourier transform. For hyperparameters, represents the frequency domain representation that retains only the detrended components. The dominant frequency information is used to suppress aperiodic components and low-frequency noise. Frequency variables in the frequency domain representing the detrending component;

[0110] S2.4, Remove the seasonal component from the detrended component and extract the initial residual component in the sequence that contains information such as high-frequency perturbations, sudden events, and local structure:

[0111] ,

[0112] in, Represents the initial residual components;

[0113] S2.4, Nonlinear high-frequency features are extracted from the initial residual components using convolutional layers, and a gating mechanism is introduced to fuse the initial residual components with the nonlinear high-frequency features to obtain high-frequency residual components.

[0114] To further enhance the extraction capability of short-term, high-frequency fluctuation features in the sequence, a convolutional layer is used to extract nonlinear high-frequency features from the initial residual. Subsequently, a gating mechanism is introduced to fuse the original residual with the extracted high-frequency components, resulting in the final enhanced high-frequency residual components.

[0115] ,

[0116] in, Represents high-frequency residual components; This represents the parameters of the first convolution kernel. This represents the parameters of the second convolution kernel. This represents the activation function. Indicates the gating parameters, This represents the Sigmoid function.

[0117] In step S3, this embodiment constructs a dual-branch architecture, which models the seasonal component and the high-frequency residual component decomposed from the time series data respectively to achieve long-term and short-term collaborative prediction; the dual-branch architecture includes the MGCN layer and the TGCN layer.

[0118] The MGCN layer includes an embedding layer and a bidirectional Mamba branch, and its workflow includes:

[0119] The embedding layer is used to adapt and map the feature dimensions of the seasonal components to obtain the output features of the embedding layer:

[0120] ,

[0121] in, This represents the output features of the embedding layer. The seasonal component obtained after multi-scale decomposition has the following feature dimensions: ( Indicates batch size, Indicates the time step. (Indicates the number of traffic nodes); It is a linear change function used to... Node dimension Mapped to the dimensions that the subsequent bidirectional Mamba branch hidden layer can handle. ; The output feature vector of the embedding layer has a feature dimension of . ( Indicates batch size, Indicates the time step. (representing the embedded dimension), serving as input for the bidirectional Mamba branch;

[0122] The output features of the embedding layer are input into the bidirectional Mamba branch to extract long-term periodic dependencies, resulting in output features with long-term characteristics.

[0123] ,

[0124] in, Output characteristics representing long-period properties Represents the learnable parameter matrix, This represents the concatenation function. express The forward hidden state at the time step , , For discretized time-series Mamba parameters, express The forward hidden state at the time step express Input feature vector at time step transpose, , express The backward hidden state at the time step. The specific structure of the bidirectional Mamba branch in this embodiment is referenced here. Figure 2 As shown, by modeling the periodically enhanced seasonal components in both positive and negative time directions, the model's prediction accuracy for scenarios such as morning and evening rush hours and long-term forecasts can be effectively improved.

[0125] The TGCN includes a gated convolutional layer Gate-TCN and a regularization layer Drop. Compared with the traditional TCN, Gate-TCN introduces a gating mechanism to dynamically adjust the weights for different time steps and uses its feature selection capability to extract high-frequency fluctuation features from high-frequency residual components, thereby enhancing the ability to model effective short-term mutation information in the sequence.

[0126] The output characteristics of the short-term mutation property are obtained by the following formula:

[0127] ,

[0128] in, Output features representing short-term mutation characteristics This represents a regularization operation. To follow the Bernoulli distribution A binary mask matrix, with elements in probability Retain (value 1), with probability Set to zero (in this embodiment) (Value is 0.2) Represents probability. This represents the output features of the Gate-TCN gated convolutional layer;

[0129] The output features of the gated convolutional layer Gate-TCN It can be obtained through the following formula:

[0130] ,

[0131] in, This represents a filtering convolution operation. This represents the activation function. This represents element-wise multiplication. This represents the Sigmoid function. This indicates a gated convolution operation.

[0132] In step S4, the traffic flow prediction using the output layer includes:

[0133] The output features of the long-period characteristics and the output features of the short-term abrupt change characteristics are dynamically weighted and fused using a dynamic gating fusion module to obtain the dynamically fused features:

[0134] ,

[0135] in, Indicates dynamic fusion characteristics, This represents the fusion weights of the gating network output. , , This represents the Sigmoid function. This represents the activation function. , For weight parameters, The result of splicing the output features representing long-period characteristics and short-term mutation characteristics. , Output characteristics representing long-period properties Output features representing short-term mutation characteristics;

[0136] The dynamic fusion features are then expanded in dimension to obtain the expanded fusion features:

[0137] ,

[0138] in, Indicates the expanded fusion features, This represents a linear dimension expansion operation;

[0139] The extended fused features and the obtained traffic flow sequence are residually joined and then normalized. A linear projection layer is then used to reduce the dimensionality of the normalized result to obtain the traffic flow prediction result.

[0140] ,

[0141] in, The traffic flow prediction results are represented by the shape shown. That is to One sample Traffic flow prediction is performed at each node in the future, taking T steps. This represents the obtained traffic flow sequence. This represents the residual convolution operation. Presentation layer normalization operation, This indicates a linear projection layer.

[0142] This embodiment proposes a traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration. Addressing the coexistence of long-term periodicity and short-term abrupt changes in real-world traffic flow data, it constructs a prediction network with multi-scale decomposition and bi-branch collaboration to simultaneously meet modeling needs at different time scales. This network includes a GCN graph convolutional layer, a temporal decomposition layer, a bidirectional Mamba branch, a Gate-TCN layer, and a dynamic gating fusion module. The temporal decomposition module utilizes multi-scale moving averages combined with time and frequency domain information to effectively extract seasonal components with long-term periodicity and high-frequency disturbance components. The bidirectional Mamba branch and the Gate-TCN layer process the corresponding components respectively, enhancing the model's ability to perceive long-term trends and short-term abrupt changes, thereby improving collaborative modeling capabilities in complex traffic scenarios such as peak hours and sudden events. The dynamic gating fusion module adaptively adjusts the output weights of the two branches based on contextual information to achieve collaborative modeling of multi-scale features. This embodiment directly inputs raw traffic flow data for prediction, effectively improving prediction accuracy and robustness in complex dynamic traffic environments.

[0143] Example 2:

[0144] Based on the same inventive concept as Embodiment 1, this embodiment of the invention discloses a traffic flow prediction system based on multi-scale decomposition and bi-branch collaboration, comprising:

[0145] The spatial feature extraction module is used to extract spatial features of traffic flow based on the acquired traffic flow sequence and the constructed road network map using the GCN graph convolutional layer.

[0146] The temporal decomposition module is used to: decompose the spatial features of traffic flow into seasonal components and high-frequency residual components using the temporal decomposition layer;

[0147] The dual-branch architecture module is used to: input the seasonal component and the high-frequency residual component into the dual-branch architecture; use the MGCN layer to extract the long-term periodic dependency of the seasonal component to obtain the output features of the long-term characteristics; use the TGCN layer to extract the short-term mutation feature information of the high-frequency residual component to obtain the output features of the short-term mutation characteristics.

[0148] The traffic flow prediction module is used to: predict traffic flow using the output layer based on the output characteristics of the long-period characteristics and the output characteristics of the short-term abrupt change characteristics, and obtain the traffic flow prediction result.

[0149] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.

[0150] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0151] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0152] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0153] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0154] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration, characterized in that, include: Based on the obtained traffic flow sequence and the constructed road network map, spatial features are extracted using GCN graph convolutional layers to obtain the spatial features of traffic flow. The spatial features of traffic flow are decomposed into seasonal components and high-frequency residual components using a temporal decomposition layer. The seasonal component and the high-frequency residual component are input into the dual-branch architecture: the long-term periodic dependency of the seasonal component is extracted using the MGCN layer to obtain the output features of the long-period characteristics; The short-term mutation feature information of the high-frequency residual component is extracted using the TGCN layer to obtain the output feature of the short-term mutation characteristics; Based on the output characteristics of the long-period characteristics and the output characteristics of the short-term abrupt change characteristics, traffic flow prediction is performed using the output layer to obtain the traffic flow prediction results.

2. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 1, characterized in that, The process involves extracting spatial features of the traffic flow based on the obtained traffic flow sequence and the constructed road network map, using a GCN graph convolutional layer to obtain the spatial features of the traffic flow, including: An adjacency matrix is ​​constructed based on the physical connectivity of the road network to obtain a well-constructed road network map; The Laplace matrix is ​​used to perform spectral decomposition on the constructed road network map to transform the structural information into a frequency domain representation, thus obtaining the frequency domain representation of the road network. Based on the obtained traffic flow sequence and road network frequency domain representation, graph convolution operation is performed using Chebyshev polynomials to obtain the spatial features of traffic flow.

3. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 2, characterized in that, Graph convolution using Chebyshev polynomials is achieved through the following formula: , in, Indicates spatial characteristics of traffic flow. This represents the graph convolution kernel function. Represents a road network map. This represents the obtained traffic flow sequence. Indicates the total order. express Convolution kernel parameters, This represents the frequency domain representation of the road network. express Chebyshev polynomial terms.

4. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 1, characterized in that, The process of decomposing the spatial features of traffic flow into seasonal components and high-frequency residual components using a time-series decomposition layer includes: Multi-scale moving average kernel extraction is used to extract the trend components of the spatial features of the traffic flow. The trend component is removed from the traffic flow spatial features to obtain the detrended component; The detrended component is subjected to Fourier transform to extract periodic features in the frequency domain, and then the periodic features in the frequency domain are subjected to inverse Fourier transform to obtain the seasonal component. Remove the seasonal component from the detrended component to obtain the initial residual component; Nonlinear high-frequency features are extracted from the initial residual components using convolutional layers, and a gating mechanism is introduced to fuse the initial residual components with the nonlinear high-frequency features to obtain high-frequency residual components.

5. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 4, characterized in that, The trend component is obtained through the following formula: , in, Indicates trend components, Indicates the total number of pooling cores. Indicates the first The weight coefficients of each pooling kernel. Indicates the first A one-dimensional pooling function with a pooling kernel. Indicates spatial characteristics of traffic flow. This indicates that boundary processing is performed using mirror padding to ensure that the output dimension is consistent with the input dimension; The detrending component is obtained using the following formula: , in, Indicates the detrended component; The seasonal component is obtained by the following formula: , in, Indicates seasonal component, Indicates Fourier transform, Indicates the inverse Fourier transform. For hyperparameters, represents the frequency domain representation that retains only the detrended components. The dominant frequency information is used to suppress aperiodic components and low-frequency noise. Frequency variables in the frequency domain representing the detrending component; The initial residual components are obtained by the following formula: , in, Represents the initial residual components; The high-frequency residual components are obtained through the following formula: , in, Represents high-frequency residual components; This represents the parameters of the first convolution kernel. This represents the parameters of the second convolution kernel. This represents the activation function. Indicates the gating parameters, This represents the Sigmoid function.

6. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 1, characterized in that, The MGCN layer includes an embedding layer and a bidirectional Mamba branch; The embedding layer is used to adapt and map the feature dimensions of the seasonal components to obtain the output features of the embedding layer. The embedded layer output features are input into the bidirectional Mamba branch to extract long-term periodic dependencies and obtain output features with long-term characteristics. The output features of the embedding layer are obtained by the following formula: , in, This represents the output features of the embedding layer; The output characteristics of the long-period property are obtained by the following formula: , in, Output characteristics representing long-period properties Represents the learnable parameter matrix, This represents the concatenation function. express The forward hidden state at the time step , , For discretized time-series Mamba parameters, express The forward hidden state at the time step express Input feature vector at time step transpose, , express The backward hidden state at the time step. .

7. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 1, characterized in that, The TGCN layer includes a gated convolutional layer Gate-TCN and a regularized layer Drop; The output characteristics of the short-term mutation property are obtained by the following formula: , in, Output features representing short-term mutation characteristics This represents a regularization operation. To follow Bernoulli distribution The binary mask matrix, Represents probability. This represents the output features of the Gate-TCN gated convolutional layer; The output features of the gated convolutional layer Gate-TCN It can be obtained through the following formula: , in, This represents a filtering convolution operation. This represents the activation function. This represents element-wise multiplication. This represents the Sigmoid function. This indicates a gated convolution operation.

8. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 1, characterized in that, The method of using the output layer for traffic flow prediction includes: The output features of the long-period characteristics and the output features of the short-term abrupt change characteristics are dynamically weighted and fused using a dynamic gating fusion module to obtain the dynamic fused features; The dynamic fusion feature is expanded in dimension to obtain the expanded fusion feature; The extended fused features and the obtained traffic flow sequence are residually joined and then normalized. A linear projection layer is then used to reduce the dimensionality of the normalized results to obtain the traffic flow prediction results.

9. The traffic flow prediction method based on multi-scale decomposition and bi-branch collaboration according to claim 8, characterized in that, Dynamic fusion features are obtained through the following formula: , in, Indicates dynamic fusion characteristics, This represents the fusion weights of the gating network output. , , This represents the Sigmoid function. This represents the activation function. , For weight parameters, The result of splicing the output features representing long-period characteristics and short-term mutation characteristics. , Output characteristics representing long-period properties Output features representing short-term mutation characteristics; The extended fusion feature is obtained through the following formula: , in, Indicates the expanded fusion features, This represents a linear dimension expansion operation; The traffic flow prediction results are obtained using the following formula: , in, This indicates the traffic flow prediction results. This represents the obtained traffic flow sequence. This represents the residual convolution operation. Presentation layer normalization operation, This indicates a linear projection layer.

10. A traffic flow prediction system based on multi-scale decomposition and bi-branch collaboration, characterized in that, include: The spatial feature extraction module is used to extract spatial features from the acquired traffic flow sequence and the constructed road network map using the GCN graph convolutional layer to obtain the spatial features of the traffic flow. The temporal decomposition module is used to: decompose the spatial features of traffic flow into seasonal components and high-frequency residual components using the temporal decomposition layer; The dual-branch architecture module is used to: input the seasonal component and the high-frequency residual component into the dual-branch architecture; and use the MGCN layer to extract the long-term periodic dependency of the seasonal component to obtain the output features of the long-period characteristics. The short-term mutation feature information of the high-frequency residual component is extracted using the TGCN layer to obtain the output feature of the short-term mutation characteristics; The traffic flow prediction module is used to: predict traffic flow using the output layer based on the output characteristics of the long-period characteristics and the output characteristics of the short-term abrupt change characteristics, and obtain the traffic flow prediction result.