Traffic prediction method and system based on dynamic graph and multi-scale feature fusion
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA CONSTR EIGHTH BUREAU FIRST DIGITAL TECH CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-10
Smart Images

Figure CN121838457A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of traffic prediction, and particularly relates to a traffic prediction method and system based on dynamic graph and multi-scale feature fusion. BACKGROUND
[0002] The intelligent transportation system (ITS) with informationization and intelligence as the core has become a key means to improve traffic operation efficiency and relieve congestion. Traffic flow prediction, as a core component of the intelligent transportation system, directly determines the implementation effect of traffic induction, intelligent signal control, travel path planning and other strategies, and has important significance for improving the fine level of traffic management.
[0003] In recent years, with the development of deep learning technology, traffic prediction methods have made significant progress. Traditional statistical methods (such as ARIMA model) are limited in prediction accuracy because they are difficult to capture the complex spatio-temporal dependence relationship in traffic data. Although early deep learning models (such as recurrent neural network, convolutional neural network) can mine some time series or spatial features, they cannot effectively handle non-Euclidean structure data such as road networks. Therefore, graph neural network (GNN) has been widely applied in the field of traffic prediction due to its unique advantage in handling non-Euclidean data, and a series of space-time graph neural network (STGNN) models have been derived. This kind of model can capture the time dependence and spatial dependence of traffic data by modeling the topology of the road network, and compared with traditional methods and early deep learning models, the prediction performance has been greatly improved, becoming the mainstream technology direction in the current traffic prediction field.
[0004] However, the existing space-time graph neural network method still has the following key technical bottlenecks: Firstly, most existing STGNN models rely on static graph structures, which are either predefined based on physical connections of road networks or learned through node embeddings with fixed adaptive graphs whose adjacency relations and weights remain unchanged throughout the prediction period. However, in real-world traffic scenarios, the mutual influence between road nodes is significantly time-varying, and static graphs cannot capture this dynamic spatial dependence, resulting in insufficient adaptability of the model to traffic dynamics. Secondly, mainstream STGNN models use a "space first, then time" or alternating separate modeling strategy, i.e., first extracting spatial features through graph convolution, and then extracting temporal features through recurrent neural networks or convolutional neural networks. This asynchronous modeling approach cannot capture the complex coupling relationships that occur synchronously within the spatio-temporal dimension (e.g., congestion at an upstream intersection at time t simultaneously affects the traffic state at a downstream intersection at time t), even though some schemes attempt to construct a spatio-temporal graph, its static nature and limited receptive field limit the capture of long-term complex synchronous dependencies. Finally, the similarity patterns between different nodes differ within different time sub-windows, and existing models fail to fully exploit the spatio-temporal associations within medium-scale time windows, resulting in insufficient coverage of long-, medium-, and short-term multi-granularity features.
[0005] How to solve the above technical problems is the problem faced by the present application. SUMMARY
[0006] To solve the deficiencies of the prior art, the present application provides a traffic prediction method and system based on dynamic graph and multi-scale feature fusion through dynamic graph modeling, spatio-temporal synchronous attention, and multi-scale fusion, which significantly improves the accuracy, dynamic adaptability, and generalization ability of traffic prediction.
[0007] The technical scheme adopted by the present application to solve its technical problems is: the present application provides a traffic prediction method based on dynamic graph and multi-scale feature fusion, comprising the following steps Collecting traffic data and preprocessing to obtain preprocessed traffic data; constructing sample pairs based on preprocessed traffic data; Constructing spatio-temporal embedding and generating dynamic adjacency matrix based on spatio-temporal embedding, generating dynamic graph convolution operator based on dynamic adjacency matrix; Based on the dynamic graph convolution operator, a spatio-temporal synchronous attention operator is constructed; A multi-scale traffic prediction model is constructed, which processes the sample pairs through the multi-scale traffic prediction model to obtain traffic prediction results; the multi-scale traffic prediction model uses a cascaded architecture, including a multi-step gated recurrent unit, a single-step gated recurrent unit, and an output prediction layer; the multi-step gated recurrent unit replaces the fully connected layer of the standard gated recurrent unit with the spatio-temporal synchronous attention operator, and the single-step gated recurrent unit replaces the fully connected layer of the standard gated recurrent unit with the dynamic graph convolution operator.
[0008] Preferably, the preprocessing comprises data cleaning, missing value filling and data standardization.
[0009] Preferably, the constructing sample pair comprises adopting a sliding window method to cut data of T continuous time steps from the preprocessed traffic data as an input sequence and to cut data of T' time steps after the input sequence as an output sequence, to form a sample pair.
[0010] Preferably, the generating dynamic graph convolution operator comprises adopting a parameter decomposition strategy to initialize a spatial embedding and a temporal embedding; adding the spatial embedding and the temporal embedding and performing LayerNorm normalization to generate a spatio-temporal embedding; performing softmax operation based on the spatio-temporal embedding to generate a first-order dynamic adjacency matrix; extending the first-order dynamic adjacency matrix based on Chebyshev polynomials to obtain adjacency matrices of different orders; combining the adjacency matrices of different orders into a graph convolution tensor and constructing a dynamic graph convolution operator based on the graph convolution tensor.
[0011] Preferably, the temporal embedding comprises a single-step temporal embedding and a multi-step temporal embedding; wherein the single-step temporal embedding corresponds to a dynamic graph convolution operator formula represented as follows:
[0012] the multi-step temporal embedding corresponds to a dynamic graph convolution operator formula represented as follows:
[0013] wherein, and are learnable weight and bias parameters.
[0014] Preferably, the constructing spatio-temporal synchronous attention operator comprises performing linear transformation on the input sequence of the sample pair to obtain a query vector and a key vector of a self-attention mechanism, and calculating a value vector through the dynamic graph convolution operator; calculating the self-attention according to the query vector, the key vector and the value vector; setting a plurality of parallel attention heads, calculating the self-attention for each attention head to obtain a plurality of attention outputs; performing feature concatenation on the plurality of attention outputs, and defining a learnable weight parameter to perform linear transformation to obtain the spatio-temporal synchronous attention operator.
[0015] Preferably, the processing the sample pair through the multi-scale traffic prediction model comprises The input sequence of the sample pair is divided into multi-step time sub-windows, and is input into a multi-step gated recurrent unit, and the spatio-temporal dependence of the sub-window is captured through a spatio-temporal synchronous attention operator, and the hidden state of the previous sub-window is combined to output macro spatio-temporal features; The macro spatio-temporal features are input into a single-step gated recurrent unit, and are processed one by one according to a single time step, and the dynamic spatial information of the node is aggregated through a dynamic graph convolution operator, and the hidden state of the previous time step is combined to output final features; The final features are input into an output prediction layer for LayerNorm normalization processing, and the traffic prediction results of T' future time steps are generated through 2D convolution operation of the output layer.
[0016] The application also provides a traffic prediction system based on dynamic graph and multi-scale feature fusion, comprising A data acquisition and preprocessing module is used for acquiring traffic data and preprocessing to obtain preprocessed traffic data; and a sample pair is constructed based on the preprocessed traffic data; A dynamic graph convolution operator construction module is used for constructing spatio-temporal embedding and generating a dynamic adjacency matrix based on the spatio-temporal embedding, and generating a dynamic graph convolution operator according to the dynamic adjacency matrix; A spatio-temporal synchronous attention operator construction module is used for constructing a spatio-temporal synchronous attention operator based on the dynamic graph convolution operator; A model construction and prediction module is used for constructing a multi-scale traffic prediction model, processing the sample pair through the multi-scale traffic prediction model, and obtaining a traffic prediction result.
[0017] The application also provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the traffic prediction method based on dynamic graph and multi-scale feature fusion.
[0018] The application also provides a computer storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the steps of the traffic prediction method based on dynamic graph and multi-scale feature fusion.
[0019] The beneficial effects of the application are: through the collaborative design of dynamic graph modeling, spatio-temporal synchronous attention and multi-scale fusion, the accuracy, dynamic adaptability and generalization ability of traffic prediction are significantly improved. Through the parameter decomposition strategy to fuse spatial embedding and single / multi-step time embedding, the adjacency matrix is dynamically generated and expanded by Chebyshev polynomial, which gets rid of the limitation of static graph, accurately captures the spatial dependence between traffic nodes changing over time, and makes the spatial modeling fit the real traffic dynamics. The dynamic graph convolution is integrated into the Value calculation path of the self-attention mechanism, which synchronously captures the time correlation and dynamic spatial information, avoids the asynchronous modeling defects of "space first and then time", and efficiently fits the characteristics of the synchronous transmission of traffic flow in space and time. Through the multi-step gated recurrent unit to extract macro spatio-temporal features, the single-step gated recurrent unit refines the microscopic details, combined with the direct multi-step prediction strategy, which comprehensively covers long, medium and short term dependencies, avoids error accumulation, and improves the long-term prediction accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 The method steps of the application.
[0021] Figure 2 The system module diagram of the application.
[0022] Figure 3 The multi-scale traffic prediction model architecture diagram of the application.
[0023] Figure 4 The internal structure diagram of the computer equipment of embodiment 4 of the application. DETAILED DESCRIPTION In order to clearly illustrate the technical features of the scheme, the scheme will be described below through specific embodiments.
[0024] Embodiment 1: Referring to Figure 1 , 3 , the embodiment is a traffic prediction method based on dynamic graph and multi-scale feature fusion, comprising the following steps S1, collecting traffic data and preprocessing to obtain preprocessed traffic data; based on the preprocessed traffic data, constructing a sample pair; The preprocessing includes data cleaning, missing value filling and data standardization.
[0025] The construction of the sample pair includes using the sliding window method to cut off T continuous time steps of data from the preprocessed traffic data as an input sequence, cut off T' time steps of data after the input sequence as an output sequence, and form a sample pair.
[0026] It should be noted that in traffic data collection and cleaning, raw traffic data is collected from sensor nodes in the urban traffic network, such as loop detectors in the California Highway Performance Measurement System (PEMS). This data records traffic flow information from multiple detector nodes distributed across the road network in time-series format, with a typical collection interval of 5 minutes. Due to sensor malfunctions or network transmission problems, the raw data may contain missing or outlier values. This embodiment uses linear interpolation to fill in the missing parts of the data to ensure the continuity and integrity of the time series. In data standardization, to eliminate the impact of differences in traffic flow value ranges between different sensor nodes and to accelerate the training and convergence of the neural network model, the cleaned data is standardized. This embodiment preferably uses the Z-score standardization method, the formula of which is:
[0027] The specific operation involves first calculating the mean and standard deviation of traffic flow for all nodes at all time steps on the training dataset, and then using these two statistics to standardize all data points in the training, validation, and test sets.
[0028] In constructing sample pairs, a sliding window method is used to build input-output sample pairs from the processed time series data, suitable for supervised learning. In this embodiment, the length of the historical time window is set. The prediction time window length is 12 (representing data from the past hour). Also 12 (representing the forecast target for the next hour). A length of The window slides across the entire time series data in steps of 1. In each slide, the data from the first 12 time steps within the window constitutes an input sample. ( For the number of nodes, (The number of features), and the data from the next 12 time steps constitute the corresponding labels (target output). This method generates a large number of sample pairs for model training and evaluation.
[0029] S2. Construct a spatiotemporal embedding and generate a dynamic adjacency matrix based on the spatiotemporal embedding, and generate a dynamic graph convolution operator based on the dynamic adjacency matrix; Generating dynamic graph convolution operators include A parameter decomposition strategy is adopted to initialize spatial embedding. ( For the number of nodes, Embedding dimension) and temporal embedding: (1) Single-step temporal embedding , used for The single-step time window, where, For the total length of historical time steps, (2) Multi-step temporal embedding , used for Multi-step time windows, among which Number of child windows For the embedded dimension.
[0030] The spatial embedding and the temporal embedding are added together and then normalized using LayerNorm to generate the spatiotemporal embedding; For a single-step time window ( Its spatiotemporal embedding is .
[0031] For multi-step time windows ( Its spatiotemporal embedding is .
[0032] A first-order dynamic adjacency matrix is generated by performing softmax operation based on spatiotemporal embedding. For a first-order dynamic adjacency matrix, an extension based on Chebyshev polynomials is used to obtain adjacency matrices of different orders. and ; Combining adjacency matrices of different orders into a graph convolution tensor and Furthermore, a dynamic graph convolution operator is constructed based on the graph convolution tensor.
[0033] The temporal embedding includes single-step temporal embedding and multi-step temporal embedding; wherein, the dynamic graph convolution operator formula corresponding to single-step temporal embedding is expressed as follows:
[0034] The formula for the dynamic graph convolution operator corresponding to multi-step temporal embedding is as follows:
[0035] in, and These are learnable weights and bias parameters. This convolution operation utilizes time steps... or child window Changing dynamic graph structure and spatiotemporal embedding .
[0036] It should be noted that, in generating multi-scale dynamic adjacency matrices, to address the limitations of static graphs, this invention designs a module capable of generating dynamic adjacency matrices for different time windows. A parameter decomposition strategy is employed to initialize two embeddings, avoiding overfitting caused by directly learning a huge spatiotemporal embedding tensor.
[0037] S3. Construct a spatiotemporal synchronous attention operator based on the dynamic graph convolution operator; Constructing a spatiotemporal synchronized attention operator includes The input sequence of the sample pair is linearly transformed to obtain the query vector and key vector of the self-attention mechanism, and the value vector is calculated by the dynamic graph convolution operator. Self-attention is calculated based on the query vector, key vector, and value vector, as shown in the following formula:
[0038] In the spatiotemporal synchronized attention of this invention and From input Obtained by linear transformation, and Then from the input After dynamic perceptron convolution Obtained. Through this design, The spatial neighborhood information for each time point has already been pre-aggregated. Then, the attention matrix is applied to this pre-contained spatial information. This enables synchronous modeling of spatiotemporal correlations.
[0039] To learn the dependencies of different patterns, several parallel attention heads are set up, and self-attention is calculated for each attention head to obtain several attention outputs; By concatenating features from several attention outputs and defining learnable weight parameters for linear transformation, a spatiotemporal synchronous attention operator is obtained.
[0040] S4. Construct a multi-scale traffic prediction model, process the sample pairs using the multi-scale traffic prediction model, and obtain the traffic prediction results. The sample pairs were processed using a multi-scale traffic prediction model, including... The input sequence of the sample pair is divided into multi-step time sub-windows and input into a multi-step gated recurrent unit. The spatiotemporal dependencies of the sub-windows are captured by the spatiotemporal synchronous attention operator and combined with the hidden state of the previous sub-window to output macro-spatiotemporal features. Macro-spatial features are input into a single-step gated recurrent unit and processed sequentially at each time step. Dynamic spatial information of nodes is aggregated through a dynamic graph convolution operator and combined with the hidden state of the previous time step to output the final features. The final features are input to the output prediction layer and normalized using LayerNorm. The traffic prediction results for the next T' time steps are generated through 2D convolution operations in the output layer.
[0041] It should be noted that in the information extraction of the multi-step gated recurrent unit, in order to capture spatiotemporal patterns on a larger time scale, the fully connected layer in the standard gated recurrent unit is replaced with a spatiotemporal synchronous attention mechanism to form a multi-step gated recurrent unit. Its update formula is as follows: for the... arrive One time window:
[0042] in, Represents spatiotemporal synchronized attention operations. It involves inputting traffic data. It is in a hidden state. This unit has a size of [size missing]. The window slides to process the input sequence.
[0043] In the information fusion of single-step gated recurrent units, in order to further fuse information at a finer single-step time granularity, the output of multi-step gated recurrent units is used as input, and dynamic perceptual graph convolution is used to replace the single-step gated recurrent units of the fully connected layer for processing.
[0044] Its update formula is as follows, for time step :
[0045] in, This represents the convolution operation of a dynamic perceptual map. It is the output from the multi-step gated loop unit.
[0046] In the output layer and data prediction, the output of the last time step of the single-step gated loop unit will be... It can directly generate predictions for multiple future time steps through an output layer (such as a 2D convolutional layer). :
[0047] This direct multi-step prediction strategy effectively avoids the error accumulation problem caused by point-by-point prediction in traditional autoregressive methods, which is particularly important for maintaining the accuracy of long-term predictions.
[0048] Example 2: See Figure 2 As shown, this embodiment is a traffic prediction system based on the fusion of dynamic graphs and multi-scale features, including... The data acquisition and preprocessing module is used to collect traffic data and preprocess it to obtain preprocessed traffic data; sample pairs are constructed based on the preprocessed traffic data. The dynamic graph convolution operator building module is used to construct spatiotemporal embeddings and generate dynamic adjacency matrices based on the spatiotemporal embeddings, and generate dynamic graph convolution operators based on the dynamic adjacency matrices; The spatiotemporal synchronization attention operator construction module is used to construct spatiotemporal synchronization attention operators based on dynamic graph convolution operators; The model building and prediction module is used to build a multi-scale traffic prediction model. The model is then used to process sample pairs to obtain traffic prediction results.
[0049] Example 3: To verify the effectiveness of the proposed method (hereinafter referred to as MS-STN), this embodiment conducted comparative experiments on one or more publicly available traffic flow datasets (such as PEMS04, PEMS08). The experiments used mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) as evaluation metrics.
[0050] The MS-STN method of this invention is compared with a variety of existing technologies. As shown in Table 1, the MS-STN method of this invention achieves the best performance in the three indicators of MAE, RMSE and MAPE on all two datasets, which proves the superiority of this invention in capturing complex spatiotemporal dependencies.
[0051] Table 1 Comparison of Indicators
[0052] Example 4: This embodiment provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0053] This computer device can be a server, and its internal structure diagram can be as follows: Figure 4 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores server data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a traffic prediction method based on dynamic graphs and multi-scale feature fusion.
[0054] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0055] Example 5: This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0056] If the functions implemented by the method are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art or the current technical solution, can be embodied in the form of a software product. This current computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0057] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0058] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0059] The technical features of this invention not described can be implemented by or using existing technology, and will not be repeated here. Of course, the above description is not a limitation of this invention, and this invention is not limited to the examples above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of this invention should also be within the protection scope of this invention.
Claims
1. A traffic prediction method based on the fusion of dynamic graphs and multi-scale features, characterized in that, Includes the following steps Collect traffic data and preprocess it to obtain preprocessed traffic data; Sample pairs were constructed based on the preprocessed traffic data; Construct a spatiotemporal embedding and generate a dynamic adjacency matrix based on the spatiotemporal embedding, and generate a dynamic graph convolution operator based on the dynamic adjacency matrix; A spatiotemporally synchronized attention operator is constructed based on the dynamic graph convolution operator. A multi-scale traffic prediction model is constructed, and sample pairs are processed by the multi-scale traffic prediction model to obtain traffic prediction results. The multi-scale traffic prediction model adopts a cascaded architecture, including a multi-step gated recurrent unit, a single-step gated recurrent unit, and an output prediction layer. The multi-step gated recurrent unit replaces the fully connected layer of the standard gated recurrent unit with a spatiotemporal synchronous attention operator, and the single-step gated recurrent unit replaces the fully connected layer of the standard gated recurrent unit with a dynamic graph convolution operator.
2. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 1, characterized in that, The preprocessing includes data cleaning, missing value imputation, and data standardization.
3. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 2, characterized in that, The construction of sample pairs involves using a sliding window method to extract data from the preprocessed traffic data, taking T consecutive time steps as the input sequence and extracting T' time steps after the input sequence as the output sequence, thus forming sample pairs.
4. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 3, characterized in that, The dynamic graph convolution operator includes A parameter decomposition strategy is adopted to initialize spatial and temporal embeddings; The spatial embedding and the temporal embedding are added together and then normalized using LayerNorm to generate the spatiotemporal embedding; A first-order dynamic adjacency matrix is generated by performing softmax operation based on spatiotemporal embedding. For a first-order dynamic adjacency matrix, an extension based on Chebyshev polynomials is used to obtain adjacency matrices of different orders. Adjacency matrices of different orders are combined into graph convolution tensors, and dynamic graph convolution operators are constructed based on graph convolution tensors.
5. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 4, characterized in that, The temporal embedding includes single-step temporal embedding and multi-step temporal embedding; wherein, the dynamic graph convolution operator formula corresponding to single-step temporal embedding is expressed as follows: Among them, is; The formula for the dynamic graph convolution operator corresponding to multi-step temporal embedding is as follows: in, and These are learnable weights and bias parameters.
6. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 5, characterized in that, The construction of the spatiotemporal synchronization attention operator includes The input sequence of the sample pair is linearly transformed to obtain the query vector and key vector of the self-attention mechanism, and the value vector is calculated by the dynamic graph convolution operator. Calculate self-attention based on the query vector, key vector, and value vector; Set up several parallel attention heads, calculate self-attention for each attention head, and obtain several attention outputs; By concatenating features from several attention outputs and defining learnable weight parameters for linear transformation, a spatiotemporal synchronous attention operator is obtained.
7. The traffic prediction method based on dynamic graph and multi-scale feature fusion according to claim 6, characterized in that, The process of processing sample pairs using a multi-scale traffic prediction model includes... The input sequence of the sample pair is divided into multi-step time sub-windows and input into a multi-step gated recurrent unit. The spatiotemporal dependencies of the sub-windows are captured by the spatiotemporal synchronous attention operator and combined with the hidden state of the previous sub-window to output macro-spatiotemporal features. Macro-spatial features are input into a single-step gated recurrent unit and processed sequentially at each time step. Dynamic spatial information of nodes is aggregated through a dynamic graph convolution operator and combined with the hidden state of the previous time step to output the final features. The final features are input to the output prediction layer and normalized using LayerNorm. The traffic prediction results for the next T' time steps are generated through 2D convolution operations in the output layer.
8. A traffic prediction system based on the fusion of dynamic graphs and multi-scale features, characterized in that, The steps for performing the traffic prediction method based on dynamic graph and multi-scale feature fusion as described in any one of claims 1 to 7 include: The data acquisition and preprocessing module is used to collect traffic data and preprocess it to obtain preprocessed traffic data. Sample pairs were constructed based on the preprocessed traffic data; The dynamic graph convolution operator building module is used to construct spatiotemporal embeddings and generate dynamic adjacency matrices based on the spatiotemporal embeddings, and generate dynamic graph convolution operators based on the dynamic adjacency matrices; The spatiotemporal synchronization attention operator construction module is used to construct spatiotemporal synchronization attention operators based on dynamic graph convolution operators; The model building and prediction module is used to build a multi-scale traffic prediction model. The model is then used to process sample pairs to obtain traffic prediction results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the traffic prediction method based on dynamic graph and multi-scale feature fusion as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the traffic prediction method based on dynamic graph and multi-scale feature fusion as described in any one of claims 1 to 7.