A Traffic Prediction Method Based on Adaptive Semantic Augmentation Spatiotemporal Graph Network
By using the Adaptive Semantic Augmented Spatiotemporal Graph Network (ASSGN) model, the spatial dependencies of the traffic network are dynamically learned, which solves the shortcomings of existing methods in adapting to changes in the traffic network and capturing multi-scale patterns, and achieves higher prediction accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF TRADITIONAL CHINESE MEDICINE
- Filing Date
- 2025-06-18
- Publication Date
- 2026-06-30
Smart Images

Figure CN120632366B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation technology, specifically relating to a traffic prediction method based on an adaptive semantically enhanced spatiotemporal graph network. Background Technology
[0002] Traffic forecasting, a key task in the field of intelligent transportation, has received widespread attention. Accurate traffic forecasting can not only alleviate urban traffic congestion but also optimize the allocation of traffic management resources and improve the operational efficiency of the transportation network. Currently, traffic forecasting methods mainly fall into two categories: traditional statistical methods and emerging deep learning methods.
[0003] Traditional statistical methods, such as the Autoregressive Integrated Moving Average (ARIMA) model and the Vector Autoregressive (VAR) model, typically assume that traffic data has stationary and linear characteristics when processing traffic data. This makes it difficult to effectively model nonlinear and complex traffic data, and the prediction accuracy is often limited.
[0004] In recent years, deep learning methods have been increasingly widely used in traffic prediction. These methods include convolutional neural networks (CNNs), recurrent neural networks (RNNs), and graph neural networks (GNNs). Among them, CNNs are suitable for regular grid data structures but have difficulty effectively representing the irregular topological features of traffic networks; while RNNs can capture the temporal features of data, they suffer from the gradient vanishing problem, making it difficult to effectively learn long-term periodic patterns.
[0005] Graph Neural Networks (GNNs) can effectively capture spatial dependencies in irregular traffic networks and are currently widely used for traffic prediction tasks, such as Spatial-Temporal Graph Convolutional Networks (STGCN), Diffused Convolutional Recurrent Neural Networks (DCRNN), and Graph WaveNet. These models represent traffic networks using a graph structure, with nodes representing traffic monitoring sensors and edges representing road connections between nodes, and learn node features through graph convolution operations.
[0006] However, the aforementioned GNN-based traffic prediction models generally rely on predefined and fixed adjacency matrices, failing to dynamically adapt to the spatial dependencies of the traffic network as it changes over time. This static graph structure cannot accurately reflect the true spatial correlations when the actual traffic network changes, thus affecting the model's prediction accuracy.
[0007] Furthermore, existing graph neural network-based methods typically employ recurrent neural networks and their variants for time modeling, which makes it difficult to effectively capture the comprehensive relationship between long-term periodic patterns and short-term fluctuation characteristics in traffic data, resulting in a significant reduction in the accuracy of long-term prediction tasks.
[0008] Therefore, there is an urgent need for a traffic forecasting method that can dynamically adapt to changes in the spatial structure of traffic networks and effectively capture both short-term local patterns and long-term cyclical trends in traffic data, in order to overcome the shortcomings of existing technologies and further improve the accuracy and generalization performance of traffic forecasting. Summary of the Invention
[0009] The purpose of this invention is to provide an adaptive semantically enhanced spatiotemporal graph network traffic prediction method (ASSGN), which can dynamically learn the hidden spatial dependencies in the traffic network and simultaneously capture short-term local patterns and long-term periodic trends, significantly improving the accuracy and generalization performance of traffic prediction.
[0010] On one hand, this invention provides a traffic prediction method based on an adaptive semantically enhanced spatiotemporal graph network. This method involves building and training a machine learning model that takes traffic data as input and future traffic data as output to obtain a traffic prediction model. The machine learning model includes a two-branch temporal modeling module and a prediction output module. The two-branch temporal modeling module includes long-term branch units and short-term branch units. The prediction output module includes a first linear mapping layer, a first ReLU activation function, a second linear mapping layer, a second ReLU activation function, and a third linear mapping layer.
[0011] Traffic data is input into long-term and short-term branch units respectively. The long-term branch unit uses a parallel gating network to capture the long-term dependencies of the traffic data, obtaining the periodic time features H. long The short-term branch unit uses a hierarchical aggregation method to capture local short-term dependencies in traffic data, obtaining local temporal features H. short H long and H short H is obtained by splicing DTM , as input to the prediction output module;
[0012] H DTM After passing through the first linear mapping layer, the first ReLU activation function, the second linear mapping layer, the second ReLU activation function, and the third linear mapping layer in sequence, the traffic prediction result is output.
[0013] Preferably, a residual connection mechanism is introduced in the prediction output module: the output H1 of the first ReLU activation function is added to the output H2 of the second ReLU activation function, and used as the input of the third linear mapping layer.
[0014] Preferably, the method further includes:
[0015] The raw traffic data collected by road sensor nodes is standardized to obtain the standardized result X. norm ;
[0016] X norm With time characteristics TF enc Connect the data and transform it into two-dimensional data through the Reshape operation;
[0017] The transportation network is modeled as a graph structure G. r =(V,E), where V represents the set of nodes consisting of road sensors, |V|=N represents the total number of nodes, and E represents the road connection relationships, used to describe the spatial topology between nodes; the specific connection weight information is provided by the adjacency matrix. , representing the connection strength or weight between node i and node j. In this graph structure, each node records traffic data for its corresponding location. This data is stored in the form of a time-series two-dimensional matrix, providing structured input for spatiotemporal modeling.
[0018] Preferably, the machine learning model further includes a feature fusion module, in which:
[0019] H DTM The gated weight matrix G is generated using the tanh activation function;
[0020] Introducing a bidirectional multi-level diffusion graph convolution mechanism to model the spatial dependencies of nodes:
[0021] ,
[0022] ,
[0023] In the formula, Z represents the diffusion map convolution result; Fuse(•) is the feature fusion function; k=0,1,…,K, where K represents the maximum order of diffusion; X represents traffic data; P f k =(P f ) k P b k = (P b ) k P represents the forward and backward diffusion matrices of the k-th diffusion order, respectively. f =A / rowsum(A), P b =A T / rowsum(A T `rowsum(•)` represents the summation of rows in a matrix; `A` is an N×N adjacency matrix representing the connection strength between nodes in traffic network modeling, and its element in the i-th row and j-th column is Ai. ij =1 indicates that there is a road connection between node i and node j. ij =0 indicates that there is no road connection between node i and node j; W k f W kb All are trainable weights;
[0024] Multiply G and Z element by element to obtain H. gated ;
[0025] H gated With H DTM By splicing, we get H. concat , which serves as the input to the prediction output module.
[0026] Preferably, a residual connection structure is introduced into the feature fusion module:
[0027] Add X and Z together, then multiply them element-wise by G to get H. gated .
[0028] Preferably, a node embedding representation mechanism is introduced to construct two trainable node embedding matrices E1 and E2, and an adaptive adjacency matrix is generated by calculating the similarity between E1 and E2. To explore the strength of implicit spatial dependencies between nodes:
[0029] ,
[0030] In the formula, ReLU(•) represents the ReLU activation function, and Softmax(•) represents the Softmax function.
[0031] Preferably, the adaptive adjacency matrix is added as a supplementary term to the diffusion graph convolution:
[0032] ,
[0033] In the formula, A adp k W is the adaptive adjacency matrix of the k-th diffusion order; k adp These are trainable weights.
[0034] Preferably, the feature fusion function is a feature concatenation, average pooling, weighted summation, or attention weighting function.
[0035] Preferably, the machine learning model is trained using mean absolute error as the loss function.
[0036] On the other hand, a computer-readable storage medium is also provided for storing one or more programs, the one or more programs including instructions, characterized in that, when executed by a computing device, the instructions cause the computing device to perform the adaptive semantically enhanced spatiotemporal graph network traffic prediction method as described above.
[0037] On the other hand, an electronic device is also provided, including one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the spatiotemporal graph network traffic prediction method with adaptive semantic enhancement as described above.
[0038] The significant advantages of this invention compared to existing technologies are:
[0039] This invention proposes a dual-branch temporal modeling (DTM) approach, which extracts short-term local patterns and long-term periodic patterns separately. This allows the model to effectively learn traffic flow trends at different time scales, improving the stability of long-term predictions. An adaptive adjacency matrix learning mechanism dynamically adjusts node relationships in the traffic network through end-to-end training, avoiding the limitations of fixed topology and improving spatial information modeling capabilities. An end-to-end optimization strategy enables the entire model to run efficiently on large-scale traffic network data and enhances its generalization ability across urban scenarios. This invention effectively overcomes the shortcomings of existing traffic prediction methods in spatial dependency modeling, temporal modeling, and computational efficiency. Attached Figure Description
[0040] Figure 1 This is a flowchart of the traffic prediction method of the present invention.
[0041] Figure 2 This is the overall framework diagram of the machine learning model of this invention.
[0042] Figure 3 This is a framework diagram of PGN. Detailed Implementation
[0043] In intelligent transportation systems, traffic forecasting is a crucial technology for optimizing traffic flow control, reducing congestion, and improving traffic management efficiency. However, existing traffic forecasting methods generally suffer from the following technical problems:
[0044] Insufficient spatial dependency modeling: Existing traffic prediction methods typically rely on predefined static adjacency matrices to model the spatial relationships of traffic networks, while the dependencies in actual traffic networks are dynamically changing. For example, factors such as construction, accidents, and severe weather can cause changes in road capacity, and fixed topologies cannot reflect these effects, reducing prediction accuracy. Existing graph neural network (GNN) methods (such as STGCN and DCRNN) only model spatial dependencies based on known road connectivity relationships, failing to effectively uncover potential inter-road coupling relationships and thus unable to adapt to complex traffic environments.
[0045] Time-dependent modeling is limited: Traffic data exhibits short-term fluctuations and long-term cyclical patterns, but most methods only consider short-term time dependencies (such as RNNs and GRUs) or fixed time windows (such as CNNs), making it difficult to simultaneously learn local temporal variations and long-term trends. Existing methods experience rapid performance degradation in long-term prediction tasks and struggle to capture cyclical patterns in traffic flow, such as peak-hour and weekend traffic variations.
[0046] Computational efficiency and generalization issues: Traditional spatiotemporal prediction models have high computational complexity, resulting in significant computational costs for large-scale traffic networks and real-time prediction tasks, making it difficult to meet real-time requirements. Existing models, after being trained on specific cities or datasets, exhibit poor generalization ability across different cities or under varying traffic conditions, limiting their widespread application.
[0047] To address the aforementioned issues, this invention proposes an adaptive semantically enhanced spatiotemporal graph network traffic prediction method (ASSGN). This method can dynamically learn hidden spatial dependencies in traffic networks and simultaneously capture short-term local patterns and long-term periodic trends, thereby improving the accuracy and generalization performance of traffic prediction.
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0049] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings.
[0050] like Figure 1 As shown, the traffic prediction method based on adaptive semantic enhancement spatiotemporal graph networks proposed in this invention, by building a network as follows... Figure 2 The machine learning model shown takes traffic data as input and future traffic data as output, is trained, and the traffic prediction model obtained from the training is used to achieve traffic prediction.
[0051] 1. Data Preprocessing
[0052] (1) Standardization
[0053] The raw traffic data is aggregated into data segments with fixed time intervals, and the input data is standardized using Z-score to reduce data fluctuations and improve data stability.
[0054] (2) Data conversion
[0055]
[0056] Among them TF enc External features representing time, such as timestamps and days of the week, can help models capture the periodicity and temporal dependencies of data; X 2dThis represents the data X after standardization. norm Temporal External Features TF enc Connect the two-dimensional data and transform it through the Reshape operation.
[0057] (3) The transportation network is modeled as a graph structure G. r =(V,E), where V represents the set of road sensor nodes, |V|=N represents the total number of nodes, and E represents the road connection relationships, used to describe the spatial topology between nodes; the specific connection weight information is provided by the adjacency matrix. , representing the connection strength or weight between node i and node j. In this graph structure, each node records traffic data for its corresponding location. This data is stored in the form of a time-series two-dimensional matrix, providing structured input for spatiotemporal modeling. At each time step t, the observations of each node (i.e., the traffic data for its corresponding location) are represented as a feature matrix. Where C is the feature dimension (e.g., traffic flow, speed, etc.). The input sequence is constructed using the sliding window method to feed it into the model for learning and prediction.
[0058] ,
[0059] In the formula, This represents historical data from the past S time steps. The target of the prediction is the standard prediction model f.
[0060] 2. Two-branch time modeling
[0061] like Figure 2 As shown, to improve time modeling capabilities, this invention employs a dual-branch time modeling module (DTM) to extract long-term periodic patterns and short-term local patterns separately. The dual-branch time modeling process is as follows:
[0062] (2.1) Long-term branches employ a parallel gated network (PGN) to capture long-term dependencies, such as... Figure 3 As shown:
[0063] ,
[0064] ,
[0065] ,
[0066] ,
[0067] In the formula, H long As a periodic time feature, Linear long (•) represents a linear model, W g W t All are weights, bg b t All are biased.
[0068] The aforementioned long-term branches can model cyclical trends and improve the ability to capture long-term patterns (such as daily morning and evening rush hours and weekend traffic changes).
[0069] (2.2) Short-term branches use a hierarchical aggregation method to capture local short-term patterns:
[0070] ,
[0071] ,
[0072] In the formula, H short For local time features, Linear row (•) indicates the RowLinear model, Linear col (•) indicates the ColumnLinear model.
[0073] The aforementioned short-term branch focuses on capturing local time patterns, improving the model's ability to perceive short-term traffic fluctuations.
[0074] 3. Feature Fusion
[0075] like Figure 2 As shown, to effectively capture short-term and long-term time dependency patterns, this invention employs a dual-branch time modeling mechanism, extracting local time features obtained from the short-term branch. Periodic time features extracted from long-term branches The two are concatenated along the feature dimension to obtain a complete temporal semantic representation. Its form of expression is:
[0076] ,
[0077] in, This represents concatenating two tensors along the feature dimension; the result after concatenation. It preserves both local variation patterns of time series and reflects global periodic structures, thus enhancing the ability to perceive multi-scale temporal information. This feature will play a role in the following two directions:
[0078] On the one hand, it serves as the output of the time modeling module and participates in the final prediction;
[0079] On the other hand, gating regulation serves as a control signal to guide spatial characteristics.
[0080] To enhance the model's ability to filter spatial feature outputs, this invention further introduces a gated modulation mechanism (GateFusion). Specifically, the output of the time modeling module... As input, a gated weight matrix is generated using the tanh activation function. Furthermore, element-wise adjustments are made to the graph convolution features to achieve dynamic weighting of spatial features. This process is expressed as follows:
[0081] ,
[0082] ,
[0083] in, This represents the spatial diffusion features output by the multi-order diffusion map convolution module. This indicates element-wise multiplication.
[0084] The aforementioned introductory control modulation mechanism suppresses or enhances spatial features based on the current time state, thereby achieving spatiotemporal semantic linkage modeling, effectively improving the model's ability to express the importance of nodes in different regions, and enhancing prediction accuracy and generalization performance.
[0085] 4. Adaptive Spatial Dependency Modeling Module
[0086] In traffic network modeling, adjacency matrices are typically used. This represents the physical connection relationship between road nodes, where N represents the number of nodes, and A... ij =1 indicates that there is a road connection between node i and node j; otherwise, it is 0. If the road network is a directed graph, A is usually an asymmetric matrix.
[0087] To characterize the directional spatial dependence features in transportation networks and fully explore the multi-hop structural relationships between nodes, this invention proposes a bidirectional multi-level diffusion graph convolution structure to construct an all-directional, multi-level graph convolution mechanism.
[0088] First, based on the original adjacency matrix A, we define the single-order transition probability matrices for the forward and reverse directions respectively:
[0089] P f =A / rowsum(A), P b =A T / rowsum(A T ),
[0090] Among them, P f P represents "forward diffusion" originating from a certain node. b This represents "reverse diffusion," which traces back from the target node. When the diffusion order is k, its definitions are as follows: The order diffusion matrix is: P fk =(P f ) k P b k = (P b ) k This is used to describe the propagation influence of a node on a multi-hop path.
[0091] Building upon the basic graph convolution operation Z=AXW in graph neural networks, this invention introduces a bidirectional diffusion mechanism, defining the following bidirectional multi-order diffusion graph convolution expression:
[0092] ,
[0093] in, Represents input features; These are trainable parameters, corresponding to the feature transformations of the k-th order forward and backward diffusion, respectively. This structure can perceive spatial dependencies within different ranges at different diffusion levels.
[0094] To enhance the information preservation capability of deep graph convolutional structures, a residual connection structure can be added after graph convolution. This involves retaining the original input features X and weighting them together with the graph convolution result Z, resulting in:
[0095] ,
[0096] Introducing residual paths helps alleviate information degradation and oversmoothing issues during multi-layer GCN propagation, thereby improving network stability.
[0097] However, a fixed adjacency matrix cannot effectively characterize the potential dynamic influence relationships between nodes under road conditions. Therefore, this invention further introduces an adaptive adjacency matrix A. adp Its calculation form is as follows:
[0098] ,
[0099] in, This is the node vector representation matrix learned through a node embedding network. This matrix dynamically learns the latent spatial dependencies between nodes through end-to-end training and is added as a supplementary term to the convolution expression to construct the final graph convolution output:
[0100] ,
[0101] To integrate multi-scale feature information at different diffusion orders, this invention further introduces a fusion function:
[0102] ,
[0103] in, Strategies such as feature concatenation, average pooling, weighted summation, or attention weighting can be used, and the specific implementation can be flexibly chosen according to the actual application scenario. For a unified representation, if weighted summation is used as the specific implementation method, it can be simplified to:
[0104] ,
[0105] in, These are trainable parameters. The two ways of writing them are semantically equivalent; the former reflects the module's scalability, while the latter reflects the specific computational implementation.
[0106] 5. Predictive Output Module
[0107] The final output of the prediction model is the H output by the Time Feature Modeling Module (DTM). DTM The gated graph feature H output by the spatial feature modeling module gated By concatenating the features, a joint feature representation is formed:
[0108] .
[0109] Although the gating graph feature H gated It is generated by time characteristics, that is However, the two are semantically complementary. The former directly expresses the trend and periodicity of the time series, while the latter reflects the importance modulation of spatial diffusion features under temporal conditions. Concatenating the two can enhance the model's ability to comprehensively model spatiotemporal information. The concatenated feature H concat The nonlinear expressive power of the model is enhanced through two layers of linear mapping and ReLU activation. The structure is as follows:
[0110] .
[0111] To prevent feature degradation during multi-layer propagation, a residual connection mechanism is used to preserve the original information, namely:
[0112] ,
[0113] Final output predicted value: ,
[0114] in For trainable parameters, For high-dimensional semantic representation after fusing temporal and spatial information; To predict the future Traffic conditions at each time step (e.g., traffic flow / speed after 15, 30, and 60 minutes).
[0115] During the model training phase, the mean absolute error (MAE) is used as the loss function for optimization. The loss function is defined as follows:
[0116] ,
[0117] in This indicates the model's prediction results. This is the actual value.
[0118] Existing methods often employ fixed spatial structures and short-term time series models, failing to effectively capture the dynamic spatial relationships and long-term periodic patterns of traffic networks. This invention constructs an initial spatial map using traffic sensor data and performs standardization processing. Then, it introduces an adaptive node embedding method to dynamically learn the spatial dependencies between nodes in the traffic network. Furthermore, it adopts a dual-branch structure, using a parallel gated network (PGN) to capture long-term traffic patterns and linear hierarchical aggregation to capture short-term local patterns. Finally, it fuses spatial and temporal features for end-to-end training and optimization of the prediction model. This invention effectively improves the accuracy and robustness of traffic prediction and is suitable for intelligent management and decision optimization in complex urban traffic environments.
[0119] Based on the same technical solution, the present invention also discloses a computer-readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform the above-described adaptive semantic enhancement spatiotemporal graph network traffic prediction method.
[0120] Based on the same technical solution, the present invention also discloses a computing device, including one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the above-described adaptive semantic enhancement spatiotemporal graph network traffic prediction method.
[0121] 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.
[0122] 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.
[0123] 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.
[0124] 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.
[0125] The above embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
Claims
1. A traffic prediction method based on adaptive semantically enhanced spatiotemporal graph networks, characterized in that, The method describes a traffic prediction model obtained by building and training a machine learning model that takes traffic data as input and future traffic data as output. The machine learning model includes a two-branch time modeling module and a prediction output module. The two-branch time modeling module includes long-term branch units and short-term branch units. The prediction output module includes a first linear mapping layer, a first ReLU activation function, a second linear mapping layer, a second ReLU activation function, and a third linear mapping layer. Traffic data is input into long-term and short-term branch units respectively. The long-term branch unit uses a parallel gating network to capture the long-term dependencies of the traffic data, obtaining the periodic time features H. long The short-term branch unit uses a hierarchical aggregation method to capture local short-term dependencies in traffic data, obtaining local temporal features H. short H long and H short H is obtained by splicing DTM , as input to the prediction output module; H DTM After passing through the first linear mapping layer, the first ReLU activation function, the second linear mapping layer, the second ReLU activation function, and the third linear mapping layer in sequence, the traffic prediction result is output. A residual connection mechanism is introduced in the prediction output module: the output H1 of the first ReLU activation function is added to the output H2 of the second ReLU activation function and used as the input of the third linear mapping layer.
2. The method according to claim 1, characterized in that, The method further includes: The raw traffic data collected by road sensor nodes is standardized to obtain the standardized result X. norm ; X norm With time characteristics TF enc The traffic data is connected and transformed into a two-dimensional matrix form through a reshape operation; The transportation network is modeled as a graph structure G. r =(V,E), where V represents the set of nodes consisting of road sensors, |V|=N represents the total number of nodes, and E represents the road connection relationship, used to describe the spatial topology between nodes; in this graph structure, each node records traffic data at the corresponding location.
3. The method according to claim 2, characterized in that, The machine learning model also includes a feature fusion module, in which: H DTM The gated weight matrix G is generated using the tanh activation function; Introducing a bidirectional multi-level diffusion graph convolution mechanism to model the spatial dependencies of nodes: , , In the formula, Z represents the diffusion map convolution result; Fuse(•) is the feature fusion function; k=0,1,…,K, where K represents the maximum order of diffusion; X represents traffic data; P f k =(P f ) k P b k = (P b ) k P represents the forward and backward diffusion matrices of the k-th diffusion order, respectively. f =A / rowsum(A), P b =A T / rowsum(A T `rowsum(•)` represents the summation of rows in a matrix; `A` is an N×N adjacency matrix representing the connection strength between nodes in traffic network modeling, and its element in the i-th row and j-th column is Ai. ij =1 indicates that there is a road connection between node i and node j. ij =0 indicates that there is no road connection between node i and node j; W k f W k b All are trainable weights; Multiply G and Z element by element to obtain H. gated ; H gated With H DTM By splicing, we get H. concat , which serves as the input to the prediction output module.
4. The method according to claim 3, characterized in that, Introduce a residual connection structure in the feature fusion module: Add X and Z together, then multiply them element-wise by G to get H. gated .
5. The method according to claim 3, characterized in that, A node embedding representation mechanism is introduced, and two trainable node embedding matrices E1 and E2 are constructed. An adaptive adjacency matrix is generated by calculating the similarity between E1 and E2. To explore the strength of implicit spatial dependencies between nodes: , In the formula, ReLU(•) represents the ReLU activation function, and Softmax(•) represents the Softmax function.
6. The method according to claim 5, characterized in that, The adaptive adjacency matrix is added as a supplementary term to the diffusion graph convolution: , In the formula, A adp k W is the adaptive adjacency matrix of the k-th diffusion order; k adp These are trainable weights.
7. The method according to claim 3, characterized in that, The feature fusion function can be feature concatenation, average pooling, weighted summation, or attention weighting function.
8. A computer-readable storage medium storing one or more programs, said one or more programs comprising instructions, characterized in that, When the instruction is executed by the computing device, it causes the computing device to perform the method as described in any one of claims 1 to 7.
9. An electronic device, characterized in that, It includes one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the method as described in any one of claims 1 to 7.