Urban traffic flow prediction method based on multiple time-space characteristics of road network
By adaptively extracting and modeling the spatiotemporal features of urban traffic flow through wavelet decomposition, dynamic graph convolutional networks, and multi-branch convolutional feature extraction modules, the problem of insufficient accuracy in traffic flow prediction in existing technologies is solved, and higher accuracy traffic flow prediction is achieved.
Patent Information
- Application Number
- CN202511443686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing technologies struggle to effectively separate and model multi-scale, multi-modal characteristics in urban traffic flow, resulting in insufficient accuracy in traffic flow prediction.
A method for predicting urban traffic flow based on the multi-temporal characteristics of road networks is adopted. The method performs hierarchical decomposition through wavelet decomposition units, combines dynamic graph convolutional networks and multi-branch convolutional feature extraction modules to adaptively extract and model the spatiotemporal features of traffic flow, uses the Mamba temporal modeling module to capture long-range dependencies, and reconstructs features through inverse wavelet transform.
It significantly improves the accuracy and generalization ability of traffic flow prediction, and can adaptively integrate traffic information from different road segments and time periods, overcoming the shortcomings of traditional methods and improving prediction accuracy.
Smart Images

Figure CN120913415A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of intelligent transportation, and particularly relates to a city traffic flow prediction method based on multiple space-time characteristics of a road network. BACKGROUND
[0002] Traffic flow prediction, as a key technology in the construction of intelligent transportation cities, is of great significance in urban planning and traffic congestion management. By modeling the space-time dynamics of the road network, traffic flow prediction can simulate the congestion trend of the road in the future and help relevant management departments to develop effective intervention measures in a timely manner. At the same time, travelers can also optimize their travel paths in combination with prediction information and real-time navigation systems to improve the overall travel experience. Traffic flow is a space-time coupled dynamic process based on road network structure, and therefore has complex multiple space-time characteristics. How to achieve high-precision city traffic flow prediction still faces many challenges.
[0003] In the time dimension, traffic flow shows obvious periodicity and trend. For example, the peak value of traffic flow during the peak period of working days and the traffic flow distribution on non-working days both reflect the regularity of traffic flow change over time. At the same time, the development of urbanization and social economy promotes the sustained growth trend of traffic flow on a longer time scale, reflecting its long-term evolution characteristics.
[0004] In the spatial dimension, traffic flow characteristics mainly come from the topology of the road network and the complex correlation between road segments. Spatial correlation is reflected in that: on the one hand, the traffic state between adjacent road segments is highly correlated, such as the change of upstream traffic volume often directly affects the traffic distribution of downstream; on the other hand, even road segments far apart may have indirect effects due to sudden events such as traffic accidents; in addition, spatial heterogeneity is manifested in that different road segments exhibit different traffic patterns due to differences in structural attributes and functional positioning, for example, urban trunk roads are usually densely trafficked, while suburban roads are sparsely trafficked.
[0005] Therefore, city traffic flow exhibits complex multiple characteristics in space-time, which poses a challenge to accurate prediction. Although time-frequency analysis methods such as wavelet transform provide a way to deal with such multi-scale data, the traditional form has significant defects. Traditional wavelet analysis relies on fixed and non-adaptive basis functions, which makes it difficult to optimally separate the smooth periodic trend and sudden random disturbance in traffic data. This suboptimal feature separation limits the learning ability of the model. Therefore, designing a module that can adaptively learn the decomposition method according to the data characteristics to achieve more accurate feature extraction is a key problem that needs to be solved. SUMMARY
[0006] The application aims to provide a city traffic flow prediction method based on multiple space-time characteristics of a road network, which utilizes the multiple space-time characteristics of city road traffic flow to improve the accuracy of traffic flow prediction.
[0007] To achieve the above-mentioned purpose, the application provides the following technical scheme: a city traffic flow prediction method based on multiple space-time characteristics of a road network, comprising the following steps: Obtain historical traffic flow information and road topology connection structure information of a relevant area, and construct a corresponding data set according to prediction requirements; Preprocess the historical traffic flow information, construct a space-time feature tensor according to the preprocessed historical traffic flow information, and extract road topology connection structure information of an observed road to construct a road adjacency matrix; Input the space-time feature tensor into a trainable lifting wavelet decomposition unit to perform hierarchical decomposition, and obtain low-frequency components and high-frequency components; Input the low-frequency components and high-frequency components obtained by the wavelet decomposition unit into two parallel processing paths respectively; for the low-frequency components, utilize a dynamic graph convolution network (DWH-GCN) to model a dynamic space feature vector in combination with the road adjacency matrix, input the dynamic space feature vector into a Mamba time series modeling module to capture long-range dependence, and obtain low-frequency features containing space-time characteristics; extract the high-frequency components through a multi-branch convolution feature extraction module to obtain high-frequency dynamic weight features; Jointly reconstruct the low-frequency features containing space-time characteristics and the high-frequency dynamic weight features through an inverse wavelet transform module to obtain multi-scale fusion features; Input the reconstructed multi-scale fusion features into a full connection layer to perform prediction, and obtain traffic flow prediction results.
[0008] As a preferred technical scheme of the application, the historical traffic flow information adopts a PEMS series public data set, which contains sensor data of multiple real-world connected roads, and the sensor aggregates the number of vehicles passing through, and the road topology connection structure information is obtained by preprocessing the connection information of the sensor.
[0009] As a preferred technical scheme of the application, the historical traffic flow information is normalized in the form of range standardization, and the missing data in the information data collection process is filled by using a time series interpolation strategy.
[0010] As a preferred technical scheme of the application, a space-time feature tensor is constructed according to N roads and T time steps , representing the dimension of the space-time feature tensor, , wherein , represents a traffic flow observation value at time t, The traffic flow observation value of the road N at time t is represented; the road topology connection structure information of the observed road is extracted to construct an N*N road adjacency matrix .
[0011] As a preferred technical solution of the application, the specific process of hierarchical decomposition of the wavelet decomposition unit is as follows: The input spatio-temporal feature tensor X is down-sampled in the time dimension using a learnable one-dimensional convolution kernel, and is divided into half of the original length to obtain a preliminary low-frequency component and a high-frequency component ; The preliminary low-frequency component and the high-frequency component are projected and transformed using an orthogonal matrix and , and and are optimized through back propagation to make the decomposition kernel dynamically adapt to the signal features; The channel attention is set, the low-frequency component and the high-frequency component after the projection transformation are spliced along the feature channel, the spliced features are then respectively subjected to average pooling and maximum pooling, the results of the average pooling and the maximum pooling are dynamically weighted and fused, and the fused features are subjected to convolution to generate a channel attention mask , and the final low-frequency component and the high-frequency component are obtained through a segmentation operation.
[0012] As a preferred technical solution of the application, in the processing path of the low-frequency component s, the dynamic graph convolution network, for each node, introduces a learnable node embedding vector to mine the feature expression capability in the potential space of the node itself, splices the features of the node pair , i and j are different nodes, and a multi-layer perceptron is further used to generate a spatial relationship dynamic weight: ; The multi-layer perceptron is used to generate the spatial relationship dynamic weight according to a probability normalization function ; The local features and the global connection relationship of the road adjacency matrix are dynamically weighted to obtain a dynamic adjacency matrix A dyn : ; wherein, is the kth road adjacency matrix, k=0, 1, 2, representing a fixed spatial preset relationship; Then the spatial correlation of the dynamic adjacency matrix is captured: S H ; wherein, S H is a dynamic spatial feature vector obtained by multiplying the dynamic adjacency matrix with the low-frequency component s; The dynamic spatial feature vector S H is input into the Mamba time series modeling module to model long time series dependence through a state space equation; meanwhile, the output of the Mamba time series modeling module is added to the low-frequency component s using a residual connection to obtain a low-frequency feature s out .
[0013] As a preferred technical solution of the present application, in the processing path of the high-frequency component, a multi-branch convolution feature extraction module is arranged, which includes at least two convolution kernels of different sizes, respectively performing multi-scale time series feature extraction on the high-frequency component; each convolution branch performs parallel convolution operation on the input high-frequency component data to obtain local feature information at different time scales, and the output results of the multi-convolution branches are fused through a feature fusion layer to obtain fused high-frequency features; in combination with channel attention, the fused high-frequency features are dynamically weighted to obtain high-frequency dynamic weight features.
[0014] As a preferred technical solution of the present application, the inverse wavelet transform module first receives the low-frequency features containing space-time characteristics and the high-frequency dynamic weight features, and then performs inverse restoration operation on the orthogonal wavelet basis used in the decomposition stage through parameter-bound orthogonal matrix inverse transformation.
[0015] The present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the urban traffic flow prediction method based on multiple space-time characteristics of a road network as described above.
[0016] The present application also provides a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the urban traffic flow prediction method based on multiple space-time characteristics of a road network as described above when executing the computer program.
[0017] Compared with the prior art, the present application has the following advantages: Through hierarchical decomposition of the original traffic flow time series data by the wavelet decomposition unit, the features of different frequency components are extracted and modeled respectively, so that the low-frequency component fully learns the global trend and periodic changes of the traffic flow, and the high-frequency component focuses on describing the sudden and local dynamic changes in the traffic network; in combination with the graph convolution network for modeling the spatial correlation of the low-frequency component, and the multi-branch convolution and attention mechanism for efficient extraction of high-frequency disturbance features, the topological connection relationship and complex traffic patterns between nodes of the urban road are effectively fused.
[0018] Not only enhance the extraction ability of multi-scale, multi-mode characteristics of traffic flow, but also can adaptively fuse traffic information of different road sections and time periods, thereby significantly improving the accuracy and generalization ability of traffic flow prediction, overcoming the defects of traditional methods in modeling complex traffic geographical structure and various traffic modes. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 The method flowchart of the present application; Figure 2 The wavelet decomposition schematic diagram of the present application; Figure 3 The road adjacency matrix construction schematic diagram of the present application; Figure 4 The Mamba time series modeling module structure schematic diagram of the present application; Figure 5 The experimental result schematic diagram of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0021] Please refer to Figures 1-5 The present application provides a kind of urban traffic flow prediction method based on road network multiple space-time characteristics, comprising the following steps: Step one: obtain the historical traffic flow information and road topological connection structure information of relevant area, according to the prediction demand, corresponding data set is constructed;In the present embodiment, historical traffic flow information is using PEMS series public data set, contains multiple real world connected road sensor data, sensor every 5min summary result of the number of vehicles passed, road topological connection structure is the connection information of original sensor preprocessed, with connection 1, no connection is 0, road itself is connected, as the preset road connection matrix.
[0022] Step two: pre-process historical traffic flow information, construct space-time feature tensor according to pre-processed historical traffic flow information, extract road topological connection structure information of observed road to construct road adjacency matrix The dataset is divided into training, testing, and validation sets. Specifically, based on the principle of data continuity, the dataset is divided into training, testing, and validation sets. Historical traffic flow information is normalized using range standardization. For missing records during data collection, time series interpolation is used to fill in the missing data. A spatiotemporal feature tensor is constructed based on the spatiotemporal characteristics of N roads and a total of T time steps. , The dimension representing the spatiotemporal feature tensor. ,in , This represents the traffic flow observation value at time t. Represents the traffic flow observation value at time t on road N; extracts the road topology connection structure information of the observed road to construct an N×N road adjacency matrix. ,like Figure 3 As shown in (a), {A, B, C, D, E, F} are 5 related roads, and the road adjacency matrix is... The representation is as follows Figure 3 As shown in (b). In this embodiment, the method for filling missing data is as follows: if a single data point is missing, the average of the preceding and following data points is used to fill it; if there are many missing values, linear interpolation is used to construct a linear relationship based on the valid data on both sides of the missing value, thereby filling the missing value; when the dataset is divided into training set, test set and validation set, the ratio is 6:2:2; at the same time, in order to avoid the leakage of external information during prediction, only the training set is processed by range standardization, and then the transformation method of the training set is used to process the test set and validation set, while maintaining the continuity of the time series.
[0023] Step three: input the spatiotemporal feature tensor into the trainable lifting wavelet decomposition unit for hierarchical decomposition to obtain low-frequency components and high-frequency components; the specific content is as follows: the preprocessed spatiotemporal feature tensor X is input into the trainable lifting wavelet decomposition unit to perform hierarchical decomposition operation; traditional wavelet decomposition technology relies on an experientially preselected fixed wavelet basis, such as Haar wavelet; the core defect lies in that this preset mode lacks adaptability, that is, once the decomposition mode is determined, it cannot be changed, and it is difficult to better match the complex dynamics of specific traffic data, often resulting in that the low-frequency trend and high-frequency disturbance of the signal cannot be completely separated, thereby limiting the final performance of the prediction model; unlike the traditional method, the trainable lifting wavelet decomposition unit in the present application is completely adaptive and does not rely on any preset mother wavelet, but the decomposition process itself is learned end-to-end as part of the model; specifically, the trainable lifting wavelet decomposition unit dynamically decomposes the input feature into low-frequency components and high-frequency components through a set of self-adaptable convolution kernels, the internal dynamic weight adjustment mechanism can optimize the weights of the low-frequency components and the high-frequency components in real time, and adaptively allocate their contribution in subsequent modeling, thereby enhancing the feature representation capability; Figure 2 A wavelet decomposition schematic diagram of the present application is shown in the figure. In this embodiment, the convolution kernel size is set to 5, which can capture a wider local context; the wavelet decomposition layer number is set to 3, thereby better controlling the multi-scale analysis depth of the traffic flow information; a feedback mechanism is introduced to enhance the information interaction between the layers and adapt to the complex time-varying characteristics of the traffic flow; the specific steps are as follows: The input spatiotemporal feature tensor X is down-sampled in the time dimension using a learnable one-dimensional convolution kernel, and is divided into half of the original length to obtain the preliminary low-frequency component and the high-frequency component : ; wherein, is the preliminary low-frequency component, representing the main trend and periodic change of the traffic flow; is the preliminary high-frequency component, representing the sudden event or random disturbance in the traffic flow; Conv1d is a learnable one-dimensional convolution layer, and its weight is automatically optimized in the model training; Chhunk is a segmentation operation, which doubles the feature tensor in the channel dimension after convolution operation, and divides the feature tensor into two parts evenly; The orthogonal matrix and are used to linearly transform the preliminary low-frequency component and the high-frequency component to ensure the stability of the decomposition: ; ; wherein, and are the low-frequency component and the high-frequency component after projection transformation, respectively; and the optimization is performed through back propagation and to dynamically adapt the decomposition kernel to the signal characteristics.
[0024] To further adjust the channel weights of the low-frequency component and the high-frequency component, a channel attention is set; the low-frequency component and the high-frequency component after projection transformation are spliced along the feature channel, and the number of channels is doubled; the spliced features are then captured by average pooling and maximum pooling to capture the global features and local features of the signal, and the results of the average pooling and the maximum pooling are further dynamically weighted and fused to balance the local features and the global features; the features after the weighted fusion generate a channel attention mask through a convolution path, which suppresses noise and highlights important features, and then obtains the final low-frequency component and high-frequency component through a segmentation operation: ; ; wherein F is the feature after splicing the low-frequency component and the high-frequency component after projection transformation, and represent two learnable weights, balancing the importance of average pooling and maximum pooling ; and are two weight matrices realized by convolution layers; is a nonlinear activation function, is an activation function for generating a channel attention mask , is a segmentation operation, s is the final low-frequency component, and d is the final high-frequency component.
[0025] Step four: input the low-frequency component and the high-frequency component obtained by the wavelet decomposition unit into two parallel processing paths respectively; for the low-frequency component, use a dynamic graph convolution network (DWH-GCN) to model a dynamic spatial feature vector in combination with a road adjacency matrix, input the dynamic spatial feature vector into a Mamba time series modeling module to capture long-range dependencies, and obtain a low-frequency feature containing spatial and temporal characteristics; extract the high-frequency component through a multi-branch convolution feature extraction module to obtain a high-frequency dynamic weight feature; In the processing path of the low-frequency component s, the dynamic graph convolution network (DWH-GCN) first targets each node, introduces a learnable node embedding vector to mine the feature expression ability of the node itself in the implicit space, and lays a foundation for subsequent spatial relationship modeling; then, in combination with the normalized road adjacency matrix , and then the low-frequency component s is subjected to spatial feature extraction through a dynamic graph convolution network, so as to fully model the topology and spatial correlation between nodes and effectively improve the perception of spatial distribution rules of the traffic network.
[0026] For each node, a learnable node embedding vector is introduced to mine the feature expression capability of the node in the potential space , i and j are different nodes, and a multi-layer perceptron is further used to generate a spatial relationship dynamic weight: ; is a multi-layer perceptron, and the complex relationship between the node pair is learned; according to a probability normalization function is used to generate the spatial relationship dynamic weight ; The local features and the global connection relationship are dynamically weighted to obtain a dynamic adjacency matrix A dyn : ; wherein, is the kth road adjacency matrix, k = 0, 1, 2, representing a fixed spatial preset relationship; when k = 0, = I (unit matrix, representing self-connection) ; when k = 1, = (predefined physical adjacency matrix) ; when k = 2, = clamp( + I) (representing a combination of first-order neighbors and itself), clamp is a function for limiting a numerical value in a specified interval; the obtained spatial relationship dynamic weight is distributed to the corresponding road adjacency matrix, and the three basic matrices are multiplied by the dynamic weight and added to obtain the dynamic adjacency matrix A dyn ; Then, the spatial correlation of the dynamic adjacency matrix is captured: S H ; wherein, S H is a dynamic spatial feature vector obtained by multiplying the dynamic adjacency matrix and the low-frequency component s; each row vector of the dynamic spatial feature vector represents a new feature representation of a node (for example, a traffic monitoring point) after fusing the spatial information of the neighborhood at a specific time step; the dynamic spatial feature vector captures the dynamic spatial correlation and is used as an input of a subsequent model level for further time series analysis or prediction; The dynamic adjacency matrix is multiplied by the corresponding input feature matrix, and the features of each time step are processed independently, which is similar to a first-order graph convolution operation, thereby realizing the node information interaction between roads and enhancing the interpretability of the traffic flow along the road network road connection. The dynamic spatial feature vector S H is input into the Mamba time series modeling module, and the output of the Mamba time series modeling module is added to the low-frequency component s through a state space equation to obtain a low-frequency feature s out containing refined spatiotemporal characteristics, which retains the basic features while enhancing the temporal evolution information and avoiding gradient disappearance.
[0027] The Mamba time series modeling module is shown in Figure 4 to further capture the long-term temporal dependence relationship in the traffic flow data and strengthen the representation ability of the model to the low-frequency global dynamics.
[0028] The core task of the Mamba time series modeling module is to capture the long-term dependence relationship of the traffic flow data in the time dimension; the dynamic spatial feature vector S H is rearranged, and the rearranged tensor is sent to the Mamba time series modeling module; in the processing flow of the Mamba time series modeling module, the input tensor shape is [B, L, C], where B represents the batch size, i.e. the number of samples processed at the same time; L represents the sequence length, i.e. the number of time steps; C represents the channel number, i.e. the feature dimension of each time step; the flow first divides the input dynamic spatial feature vector S H into a main path and a gating path, and projects them to a higher dimension through a linear layer respectively, then the main path uses one-dimensional convolution and selective scanning mechanism to capture long-distance temporal dependence, and the gating path generates a dynamic "gate" through an activation function; then, the output of the main path is multiplied with the "gate" element by element to realize selective screening and fusion of temporal information; finally, a linear layer projects the fused result back to the original channel dimension, thereby outputting a low-frequency feature s out containing spatiotemporal characteristics after deep temporal modeling and information refinement.
[0029] In the processing path of the high-frequency component d, a multi-branch convolution feature extraction module is set, which includes at least two convolution kernels of different sizes, which respectively perform multi-scale temporal feature extraction on the high-frequency component; each convolution branch performs parallel convolution operation on the input high-frequency component data to obtain local feature information at different time scales, and the output results of the multi-convolution branch are fused through a feature fusion layer to obtain the fused high-frequency feature; combined with channel attention, the fused high-frequency feature is dynamically weighted to obtain a high-frequency dynamic weight feature, so as to enhance the attention degree to key disturbance patterns and suppress invalid noise.
[0030] In the multi-branch convolution feature extraction module, each convolution branch has different scale convolution kernels, such as {1, 3} and {3, 5} sizes, which can capture different spatial and temporal features by cascading convolution operations with different receptive fields; the dynamic weights of each channel are generated by using the convolution network, and then the channel adaptive allocation is performed; d out ; d out is a high-frequency dynamic weight feature; is the feature extraction result of the first convolution branch, is the feature extraction result of the second convolution branch, each convolution branch contains different size convolution kernels; is the dynamic weight generated by the mth convolution branch; is the output of the first convolution branch; is a 1x1 convolution operation, indicates the channel concatenation operation of the feature.
[0031] It should be noted that: the convolution network essentially adopts a dynamic branch weighting attention mechanism multi-branch convolution feature extraction module, the core of the module is to construct multiple parallel convolution branches, each branch uses different size convolution kernels (such as 1x3, 3x5 combination), this multi-branch structure is inspired by the design idea of Inception network, the purpose is to capture and fuse features from multiple different receptive field scales without significantly increasing the computational cost, it is a common strategy to build efficient and lightweight convolutional networks.
[0032] Step five: joint reconstruction of low-frequency features containing spatial and temporal characteristics and high-frequency dynamic weight features through the inverse wavelet transform module to obtain multi-scale fusion features; The inverse wavelet transform module first receives the low-frequency features containing spatial and temporal characteristics and the high-frequency dynamic weight features, and then performs inverse restoration operation on the orthogonal wavelet basis used in the decomposition stage through the parameter-bound orthogonal matrix inverse transform; Specifically, its inverse transform matrix is the exact mathematical inverse of the decomposition matrix learned in step three, not another learned parameter; This design ensures the perfect symmetry and feature consistency of the decomposition and reconstruction process, ensuring that the fine features extracted in the adaptive transformation can be losslessly fused.
[0033] Joint reconstruction is the inverse module of adaptive wavelet transform, operating in reverse. This series of symmetrical inverse operations accurately reconstructs the processed low-frequency and high-frequency signal components back to the original signal form. First, through inverse projection, using the transpose of the basis matrix used in decomposition, the low-frequency and high-frequency components are transformed from their respective feature subspaces back to a unified representation space. Next, through channel merging, the two recovered signals are spliced together in the channel dimension and integrated into a single, more information-rich tensor. Finally, upsampling is performed using transposed convolution with a stride of 2 to restore the sequence length of the tensor to the original resolution before decomposition, thus completing the entire signal reconstruction process.
[0034] Step Six: Input the reconstructed multi-scale fused features into the fully connected layer for prediction to obtain the traffic flow prediction results. The specific process is as follows: Two fully connected layers are used to achieve dimensionality transformation, thereby outputting traffic flow prediction results. When evaluating the difference between predicted and actual values, the mean squared error is used as the loss function, and the formula for calculating the loss function Loss is as follows: ; in, Represents the true value at time t. This represents the predicted value at time t; Meanwhile, the root mean square error (RMSE) and mean absolute error (MAE) are used as performance evaluation metrics. RMSE imposes a much higher penalty on larger errors than on smaller errors, while MAE directly reflects the average magnitude of the model's prediction error.
[0035] The prediction results of the examples of this invention are as follows: Figure 5 As shown, Figure 5 The changes in the line graph demonstrate the evaluation performance of the method of this invention on the PEMS03 and PEMS04 public traffic flow datasets. Specifically, the root mean square error (RMSE) and mean absolute error (MAE) are used as performance indicators in the evaluation process. The lower the values of the two, the better the model prediction performance. In the experimental setup, the current 12 consecutive time steps (corresponding to 60 minutes) are selected as input to predict the changes in urban traffic flow in the next 3 (15 minutes), 6 (30 minutes), 9 (45 minutes) and 12 (60 minutes) time steps.
[0036] from Figure 5It can be seen from the results that the method of the application achieves lower RMSE and MAE values on all prediction time spans, and the evaluation indexes of the model slowly rise stably with the growth of observation time, the predicted values and the true values are clear in visualization, indicating that the model has high accuracy and stability in short-term and long-term traffic flow prediction tasks; the experimental results further verify the effectiveness and superiority of the technical scheme of the application in capturing the spatio-temporal characteristics of traffic flow and improving the prediction accuracy, fully demonstrating the practical value and wide applicability of the application in complex traffic scenarios.
[0037] Another embodiment of the application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the urban traffic flow prediction method based on multiple spatio-temporal characteristics of a road network as described above.
[0038] Still another embodiment of the application provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the urban traffic flow prediction method based on multiple spatio-temporal characteristics of a road network as described above.
[0039] Although the embodiments of the application have been shown and described in detail, as described above, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.
Claims
1. A method for urban traffic flow prediction based on multiple spatio-temporal characteristics of road networks, characterized in that: The method comprises the following steps: obtaining historical traffic flow information and road topology connection structure information of a relevant area, and constructing a corresponding data set according to a predicted demand; preprocessing the historical traffic flow information, constructing a space-time feature tensor according to the preprocessed historical traffic flow information, and extracting road topology connection structure information of an observed road to construct a road adjacency matrix; inputting the space-time feature tensor into a trainable lifting wavelet decomposition unit for hierarchical decomposition to obtain low-frequency components and high-frequency components; inputting the low-frequency components and the high-frequency components obtained by the wavelet decomposition unit into two parallel processing paths respectively, for the low-frequency components, modeling a dynamic space feature vector by using a dynamic graph convolution network combined with the road adjacency matrix, inputting the dynamic space feature vector into a Mamba time series modeling module to capture long-range dependence, and obtaining low-frequency features containing space-time characteristics; extracting high-frequency dynamic weight features by extracting the high-frequency components through a multi-branch convolution feature extraction module; jointly reconstructing the low-frequency features containing space-time characteristics and the high-frequency dynamic weight features through an inverse wavelet transform module to obtain multi-scale fusion features; inputting the reconstructed multi-scale fusion features into a fully connected layer for prediction to obtain a traffic flow prediction result. 2.The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: The historical traffic flow information adopts a PEMS series public data set, which contains sensor data of multiple real-world connected roads, and the sensor aggregates the number of vehicles passing through, and the road topology connection structure information is obtained by preprocessing the connection information of the sensor, with 1 for connection and 0 for no connection, and the road itself is self-connected. 3.The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: The historical traffic flow information is normalized in the form of range standardization, and the missing data in the information data collection process is filled by using a time series interpolation strategy.
4. The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: A space-time feature tensor is constructed according to N roads and total T time steps , represent the dimension of the space-time feature tensor, , wherein , denotes the traffic flow observation value at time t, denotes the traffic flow observation value of road N at time t; a road adjacency matrix of N* N is constructed by extracting the road topological connection structure information of the observed road .
5. The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: The specific process of hierarchical decomposition of the wavelet decomposition unit is as follows: The input spatio-temporal feature tensor X is down-sampled in the time dimension with a learnable one-dimensional convolution kernel and split into two halves of the original length, resulting in preliminary low-frequency and high-frequency components and high-frequency components ; Utilizing orthogonal matrices and Projecting the preliminary low-frequency components and high-frequency components and optimizing by backpropagation and to dynamically adapt the decomposition kernel to the signal characteristics; The low-frequency component and the high-frequency component after the projection transformation are spliced along the feature channel to set the channel attention, the spliced features are respectively subjected to average pooling and maximum pooling, then the results of the average pooling and the maximum pooling are dynamically weighted and fused, and the features after the weighted fusion generate the channel attention mask through a convolution path Then, the final low-frequency component and high-frequency component are obtained through a segmentation operation. 6.The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: In the processing path of the low-frequency component s, the dynamic graph convolution network mines the feature expression ability of each node in the node potential space by introducing a learnable node embedding vector, and splices the features of the node pair , i and j are different nodes, and a spatial relationship dynamic weight is further generated by a multilayer perceptron: ; is a multilayer perceptron; according to a probability normalization function generates spatial relation dynamic weights ; The dynamic adjacency matrix A is obtained by dynamically weighting the local features and global connection relationship of the road adjacency matrix dyn : ; wherein, is the kth road adjacency matrix, k = 0, 1, 2, representing a fixed spatial preset relationship; Then the spatial correlation of the dynamic adjacency matrix is captured: S H ; where S H is a dynamic spatial feature vector obtained by multiplying the dynamic adjacency matrix with the low-frequency component s; The dynamic spatial feature vector S H is input to the Mamba temporal modeling module, which models long temporal dependencies through a state space equation; the output of the Mamba temporal modeling module is added to the low frequency component s using a residual connection to obtain the low frequency feature s out .
7. The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: In the processing path of the high-frequency components, a multi-branch convolution feature extraction module is set, which includes at least two convolution kernels of different sizes, respectively, for multi-scale time series feature extraction of the high-frequency components; each convolution branch performs parallel convolution operation on the input high-frequency component data to obtain local feature information at different time scales, and the multi-convolution branch output results are fused through a feature fusion layer to obtain fused high-frequency features; the fused high-frequency features are dynamically weighted by combining channel attention to obtain high-frequency dynamic weight features. 8.The urban traffic flow prediction method based on multiple space-time characteristics of road network according to claim 1, characterized in that: The inverse wavelet transform module first receives the low-frequency features containing space-time characteristics and the high-frequency dynamic weight features, and then performs inverse restoration operation on the orthogonal wavelet basis used in the decomposition stage through parameter-bound orthogonal matrix inverse transformation.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the urban traffic flow prediction method based on the multiple space-time characteristics of a road network according to any one of claims 1-8.
10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the urban traffic flow prediction method based on the multiple space-time characteristics of a road network according to any one of claims 1-8.
Citation Information
Patent Citations
Traffic prediction method, system and device based on dynamic space-time diagram convolutional neural network, and medium
CN117218837A
Time sequence prediction method and device based on period embedding and multi-scale features
CN119622319A
Non-stationary traffic prediction method based on wave flow decomposition and time delay perception
CN120409841A
Urban traffic flow prediction method fusing dynamic graph convolutional network and Transform
CN120726808A
Highly-frequent transaction-adaptive intelligence system
JP2025098093A
Cited By
Long-term traffic flow prediction method and system based on frequency domain decomposition and time sequence modeling
CN121354357A
Long-term traffic flow prediction method and system based on frequency domain decomposition and time series modeling
CN121354357B
