Traffic prediction method based on adaptive semantic enhancement space-time diagram network

Through the adaptive semantically enhanced spatiotemporal graph network traffic prediction method, dual-branch temporal modeling and adaptive adjacency matrix are used to solve the problems of spatial structure changes and temporal dependencies in traffic prediction, and improve the prediction accuracy and generalization ability.

CN120632366AActive Publication Date: 2025-09-12NANJING UNIV OF TRADITIONAL CHINESE MEDICINE

Patent Information

Application Number
CN202510814955.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-12
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

Existing traffic forecasting methods have difficulty in dynamically adapting to changes in the spatial structure of traffic networks and are unable to effectively capture short-term local patterns and long-term cyclical trends, resulting in insufficient prediction accuracy and generalization performance.

Method used

An adaptive semantically enhanced spatiotemporal graph network traffic prediction method is adopted. Long-term periodic patterns and short-term local patterns are extracted respectively through a dual-branch temporal modeling module. An adaptive adjacency matrix and multi-order diffusion graph convolution mechanism are introduced to dynamically learn the spatial dependencies of traffic networks.

Benefits of technology

It improves the accuracy and generalization performance of traffic prediction, adapts to the adaptability and computational efficiency of traffic networks, can dynamically learn hidden spatial dependencies in traffic networks, and simultaneously captures short-term local patterns and long-term periodic patterns, thereby improving the accuracy of traffic prediction and computational capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632366A_ABST
    Figure CN120632366A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic prediction method based on an adaptive semantic enhancement space-time diagram network, and the method comprises the steps: firstly constructing an initial space diagram through traffic sensor data, and carrying out the standardization processing; secondly, introducing an adaptive node embedding method to dynamically learn a spatial dependency relationship among nodes in the traffic network; a double-branch structure is further adopted, a parallel gating network (PGN) is used for capturing a long-term traffic mode, and linear hierarchical aggregation is adopted for capturing a short-term local mode; and finally, fusing space and time features to perform end-to-end training to optimize the prediction model. The method can effectively improve the accuracy and robustness of traffic prediction, and is suitable for intelligent management and decision optimization of a complex urban traffic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation technology, and in particular relates to a traffic prediction method based on an adaptive semantically enhanced spatiotemporal graph network. Background Art

[0002] Traffic forecasting, a key task in the field of intelligent transportation, has garnered widespread attention. Accurate traffic forecasting not only alleviates urban congestion but also optimizes the allocation of traffic management resources and improves the efficiency of transportation network operations. Currently, traffic forecasting methods primarily fall into two categories: traditional statistical methods and emerging deep learning approaches.

[0003] Traditional statistical methods, such as the autoregressive integrated moving average model (ARIMA) and the vector autoregressive model (VAR), usually assume that the data has stationary and linear characteristics when processing traffic data. They find 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 used in traffic forecasting. These methods include convolutional neural networks (CNNs), recurrent neural networks (RNNs), and graph neural networks (GNNs). CNNs are suited to regular grid data structures and struggle to effectively represent the irregular topological structures of traffic networks. While RNNs can capture temporal characteristics of data, they suffer from the vanishing gradient problem, making it difficult to effectively learn long-term cyclical patterns.

[0005] Graph Neural Networks (GNNs) can effectively capture spatial dependencies in irregular traffic networks and are currently widely used in traffic prediction tasks. Models such as the Spatial-Temporal Graph Convolutional Network (STGCN), the Diffused Convolutional Recurrent Neural Network (DCRNN), and the Graph WaveNet are examples. These models represent traffic networks using graph structures, with nodes representing traffic monitoring sensors and edges representing road connections between nodes. Node features are learned through graph convolution operations.

[0006] However, these GNN-based traffic prediction models generally rely on a predefined, fixed adjacency matrix, which is unable to dynamically adapt to the changing spatial dependencies of traffic networks over time. This static graph structure cannot accurately reflect the true spatial dependencies when the actual traffic network changes, affecting the model's prediction accuracy.

[0007] In addition, existing graph neural network-based methods usually use recurrent neural networks and their variants for temporal modeling, which makes it difficult to effectively capture the comprehensive relationship between long-term cyclical 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 the traffic network and effectively capture both short-term local patterns and long-term cyclical trends in traffic data, so as to overcome the above-mentioned shortcomings of existing technologies and further improve the accuracy and generalization performance of traffic forecasting. Summary of the Invention

[0009] The purpose of this paper is to provide an adaptive semantically enhanced spatiotemporal graph network traffic prediction method (ASSGN), which can dynamically learn the hidden spatial dependencies in traffic networks and simultaneously capture short-term local patterns and long-term cyclic trends, significantly improving the accuracy and generalization performance of traffic prediction.

[0010] In one aspect, the present invention provides a traffic prediction method based on an adaptive semantically enhanced spatiotemporal graph network. A traffic prediction model is obtained by building and training a machine learning model that uses traffic data as input and future traffic data as output. The machine learning model includes a dual-branch temporal modeling module and a prediction output module. The dual-branch temporal modeling module includes a long-term branch unit and a short-term branch unit. 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 are input into the long-term branch unit and the short-term branch unit respectively. The long-term branch unit uses a parallel gating network to capture the long-term dependency of traffic data and obtain the periodic time feature H. long , the short-term branch unit uses a hierarchical aggregation method to capture the local short-term dependencies of traffic data and obtain the local time feature H short , H long and H short Splicing to get H DTM , as the input of 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.

[0011] Preferably, a residual connection mechanism is introduced in the prediction output module: the output H1 of the first ReLU activation function and the output H2 of the second ReLU activation function are added together as the input of the third linear mapping layer.

[0012] Preferably, the method further comprises: The original traffic data collected by the road sensor nodes is standardized to obtain the standardized result X norm ; X norm and time feature TF encConnect and convert into two-dimensional data through Reshape operation; The traffic network is modeled as a graph structure G r =(V,E), where V represents the node set composed of road sensors, |V|=N represents the total number of nodes, and E represents the road connection relationship, which is used to describe the spatial topological structure between nodes; the specific connection weight information is provided by the adjacency matrix , represents the connection strength or weight between node i and node j. In this graph structure, each node records the traffic data of the corresponding location. These data are stored in the form of a two-dimensional time series matrix, providing structured input for spatiotemporal modeling.

[0013] Preferably, the machine learning model further includes a feature fusion module, in which: H DTM Generate the gated weight matrix G through the tanh activation function; Introducing bidirectional multi-order diffusion graph convolution mechanism to model the spatial dependency of nodes: , , Where Z is the diffusion graph convolution result; Fuse(•) is the feature fusion function; k=0,1,…,K, K represents the maximum order of diffusion; X represents traffic data; P f k =(P f ) k 、P b k = (P b ) k are the forward and backward diffusion matrices of the kth diffusion order respectively; P f =A / rowsum (A), P b =A T / rowsum(A T ), rowsum(•) represents the sum of the rows of the matrix; A is the N×N adjacency matrix that represents the connection strength between nodes in traffic network modeling, and its i-th row and j-th column element A ij =1, indicating that there is a road connection between node i and node j. ij = 0, indicating that there is no road connection between node i and node j; k f ,W k b All are trainable weights; Multiply G and Z element by element to get H gated ; H gated With H DTM Splice and get Hconcat , as the input of the prediction output module.

[0014] Preferably, a residual connection structure is introduced into the feature fusion module: After adding X and Z, multiply them element-wise with G to get H gated .

[0015] 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 of E1 and E2. , to mine the implicit spatial dependency strength between nodes: , Where ReLU(•) represents the ReLU activation function, and Softmax(•) represents the Softmax function.

[0016] Preferably, the adaptive adjacency matrix is ​​added as a supplementary term to the diffusion graph convolution: , Where A adp k is the adaptive adjacency matrix of the kth diffusion order; W k adp are trainable weights.

[0017] Preferably, the feature fusion function is feature concatenation, average pooling, weighted summation or attention weighted function.

[0018] Preferably, the machine learning model is trained using mean absolute error as the loss function.

[0019] On the other hand, a computer-readable storage medium storing one or more programs is also provided, wherein the one or more programs include instructions, characterized in that when the instructions are executed by a computing device, the computing device executes the adaptive semantically enhanced spatiotemporal graph network traffic prediction method as described above.

[0020] On the other hand, an electronic device is also provided, comprising 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 are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the adaptive semantically enhanced spatiotemporal graph network traffic prediction method as described above.

[0021] Compared with the prior art, the present invention has the following significant advantages: The dual-branch temporal modeling (DTM) proposed in this paper extracts short-term local patterns and long-term cyclical patterns, enabling the model to effectively learn traffic flow trends at different time scales and 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. The end-to-end optimization strategy enables the entire model to run efficiently on large-scale traffic network data and enhances cross-city generalization capabilities. This invention effectively overcomes the shortcomings of existing traffic prediction methods in spatial dependency modeling, temporal modeling, and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the method for traffic prediction of the present invention.

[0023] Figure 2 It is the overall framework diagram of the machine learning model of the present invention.

[0024] Figure 3 This is the framework diagram of PGN. DETAILED DESCRIPTION

[0025] In intelligent transportation systems, traffic forecasting is an important technology for optimizing traffic flow control, reducing congestion, and improving traffic management efficiency. However, existing traffic forecasting methods generally have the following technical problems: Inadequate spatial dependency modeling: Existing traffic prediction methods typically rely on predefined static adjacency matrices to model the spatial relationships of traffic networks, whereas the dependencies in real traffic networks are dynamic. For example, factors such as construction, accidents, and severe weather can cause changes in road capacity, and fixed topological structures cannot reflect these effects, reducing prediction accuracy. Existing graph neural network (GNN) methods (such as STGCN and DCRNN) model spatial dependencies based solely on known road connectivity, failing to effectively explore potential coupling relationships between roads and failing to adapt to complex traffic environments.

[0026] Limited temporal dependency modeling: Traffic data exhibits both short-term fluctuations and long-term cyclical patterns. However, most methods only consider short-term temporal dependencies (e.g., RNNs and GRUs) or fixed time windows (e.g., 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 and weekend traffic fluctuations.

[0027] Computational efficiency and generalization issues: Traditional spatiotemporal prediction models are computationally complex and expensive for large-scale traffic networks and real-time prediction tasks, making them difficult to meet real-time requirements. Existing models, trained on specific cities or datasets, have poor generalization capabilities across different cities or traffic conditions, limiting their widespread application.

[0028] To address the above problems, this paper proposes an adaptive semantically enhanced spatiotemporal graph network traffic prediction method (ASSGN), which can dynamically learn the hidden spatial dependencies in traffic networks and simultaneously capture short-term local patterns and long-term cyclic trends, thereby improving the accuracy and generalization performance of traffic prediction.

[0029] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0030] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings.

[0031] like Figure 1 As shown in the figure, the traffic prediction method based on adaptive semantic enhanced spatiotemporal graph network proposed in this invention is constructed by Figure 2 The machine learning model shown takes traffic data as input and future traffic data as output and is trained, and traffic prediction is achieved using the traffic prediction model obtained through training. 1. Data Preprocessing

[0032] (1) Standardization Aggregate the raw traffic data into data segments at fixed time intervals and perform Z-score normalization on the input data to reduce data fluctuations and improve data stability.

[0033] (2) Data conversion

[0034] Among them TF enc Represents external temporal features, such as timestamps, day of the week, and other information, which can assist the model in capturing the periodicity and time-dependent characteristics of the data; X 2d Represents the data X after normalization norm and temporal external features TF enc Connect and transform the two-dimensional data through the Reshape operation.

[0035] (3) The traffic 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 relationship, which is used to describe the spatial topological structure between nodes; the specific connection weight information is provided by the adjacency matrix , represents the connection strength or weight between node i and node j. In this graph structure, each node records the traffic data of the corresponding location. These data are stored in the form of a two-dimensional matrix of time series, providing structured input for spatiotemporal modeling. At each time step t, the observation value of each node (i.e., the traffic data of the corresponding location) is represented as the feature matrix , where C is the feature dimension (such as traffic flow, speed, etc.). The input sequence is constructed according to the sliding window method to input the model for learning and prediction: , Where, represents the historical data of the past S time steps, is the prediction target, and f is the standard prediction model. 2. Dual-branch temporal modeling

[0036] like Figure 2 As shown, to improve the temporal modeling capability, the present invention adopts a dual-branch temporal modeling module (DTM) to extract long-term periodic patterns and short-term local patterns respectively. The dual-branch temporal modeling process is as follows: (2.1) Long-term branches use parallel gated networks (PGN) to capture long-term dependencies, such as Figure 3 As shown: , , , , Where H long is a periodic time feature, Linear long (•) represents the linear model, W g 、W t are weights, b g 、b t All are biased.

[0037] The above-mentioned long-term branch can model periodic trends and improve the forecasting ability to capture long-term patterns (such as daily morning and evening peaks and weekend traffic changes).

[0038] (2.2) Short-term branches use a hierarchical aggregation method to capture local short-term patterns: , , Where H short is a local time feature, Linear row (•) indicates RowLinear model, Linear col(•) indicates the ColumnLinear model.

[0039] The above short-term branch focuses on capturing local temporal patterns and improving the model's perception of short-term traffic fluctuations. 3. Feature Fusion

[0040] like Figure 2 As shown, in order to effectively capture the short-term and long-term time dependency patterns, the present invention adopts a dual-branch time modeling mechanism to extract the local time features obtained by the short-term branch and the periodic temporal features extracted by long-term branches The two are spliced ​​along the feature dimension to obtain a complete temporal semantic representation , which is expressed as: , in, Indicates splicing two tensors along the feature dimension direction; the result after splicing It not only preserves the local variation pattern of the time series but also reflects the global periodic structure, which helps to enhance the perception of multi-scale temporal information. This feature will play a role in the following two directions: On the one hand, it participates in the final prediction as the output of the time modeling module; On the other hand, it acts as a control signal to guide the gating regulation of spatial features.

[0041] In order to enhance the model's ability to filter spatial feature outputs, the present invention further introduces a gate modulation mechanism (GateFusion). Specifically, the output of the temporal modeling module is As input, the gated weight matrix is ​​generated through the tanh activation function , and adjust the graph convolution features element by element to achieve dynamic weighting of spatial features. The process is expressed as follows: , , in, represents the spatial diffusion features output by the multi-order diffusion graph convolution module, Represents element-wise multiplication.

[0042] The above-mentioned entry-controlled modulation mechanism suppresses or strengthens spatial features according to the current time state, realizes the linkage modeling of spatiotemporal semantics, effectively improves the model's ability to express the importance of nodes in different regions, and enhances prediction accuracy and generalization performance. 4. Adaptive Spatial Dependency Modeling Module

[0043] In traffic network modeling, the adjacency matrix is ​​usually used Represents the physical connection relationship between road nodes, where N represents the number of nodes, 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.

[0044] In order to characterize the directional spatial dependency characteristics in the transportation network and fully explore the multi-hop structural relationship between nodes, this paper proposes a bidirectional multi-order diffusion graph convolution structure to construct an omnidirectional, multi-level graph convolution mechanism.

[0045] First, based on the original adjacency matrix A, define the forward and reverse single-order transition probability matrices respectively: P f =A / rowsum (A), P b =A T / rowsum(A T ), Among them, P f represents the “forward diffusion” starting from a certain node, P b Indicates the "reverse diffusion" from the target node. When the diffusion order is k, define The diffusion matrix of order P is: f k =(P f ) k 、P b k = (P b ) k , used to describe the propagation influence of a node on a multi-hop path.

[0046] Based on the basic graph convolution operation form Z=AXW of graph neural networks, this paper introduces a bidirectional diffusion mechanism and defines the following bidirectional multi-order diffusion graph convolution expression: , in, Represents input features; are trainable parameters corresponding to the feature transformation of the k-th order forward and backward diffusion, respectively. This structure can perceive spatial dependencies in different ranges at different diffusion levels.

[0047] To enhance the information retention capability of deep graph convolutional structures, a residual connection structure can be added after graph convolution, that is, the original input feature X is retained and weightedly added to the graph convolution result Z to obtain: , The introduction of residual paths helps alleviate the information degradation and over-smoothing problems in the multi-layer GCN propagation process and improves network stability.

[0048] However, the fixed adjacency matrix cannot effectively describe the potential dynamic influence relationship between nodes under the road state. To this end, the present invention further introduces an adaptive adjacency matrix A adp , which is calculated as follows: , in, is the node vector representation matrix learned through the node embedding network. This matrix dynamically learns the potential 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: , In order to integrate multi-scale feature information under different diffusion orders, the present invention further introduces a fusion function: , in, It can be a strategy of feature concatenation, average pooling, weighted summation, or attention weighting. The specific implementation can be flexibly selected according to the actual application scenario. For the purpose of unified representation, if weighted summation is used as a specific implementation method, it can be simplified to: , in, The two expressions are semantically equivalent. The former reflects module scalability, while the latter reflects specific computational implementation. 5. Prediction output module

[0049] The final output of the prediction model is the H output by the temporal feature modeling module (DTM). DTM The gated graph feature H output by the spatial feature modeling module gated Perform splicing to form a joint feature representation: .

[0050] Although the gated graph feature H gated It is generated by the guidance of time characteristics, that is, , but the two are semantically complementary. The former directly expresses the trend and periodicity of the time series, while the latter reflects the importance adjustment of spatial diffusion features under time conditions. Splicing the two can enhance the model's comprehensive modeling ability for spatiotemporal information. The spliced ​​feature H concat Through two layers of linear mapping and ReLU activation processing, the nonlinear expression ability of the model is improved. The structure is as follows: .

[0051] In order to avoid the degradation of features in multi-layer transmission, the residual connection mechanism is used to retain the original information, namely: , The final output prediction value: , in is a trainable parameter, It is a high-dimensional semantic representation after integrating temporal and spatial information; To predict the future The traffic status at each time step (e.g., traffic flow / speed after 15, 30, or 60 minutes).

[0052] The mean absolute error (MAE) is used as the loss function for optimization during the model training phase. The loss function is defined as follows: , in Represents the model prediction results, is the true value.

[0053] Existing methods often use fixed spatial structures and short-term time series models, failing to effectively capture the dynamic spatial relationships and long-term cyclical patterns of traffic networks. This method utilizes traffic sensor data to construct an initial spatial graph and standardizes it. It then introduces an adaptive node embedding method to dynamically learn the spatial dependencies between nodes in the traffic network. Furthermore, it employs a dual-branch architecture, using a parallel gated network (PGN) to capture long-term traffic patterns and a linear hierarchical aggregation to capture short-term local patterns. Finally, it integrates spatial and temporal features to optimize the prediction model through end-to-end training. This method effectively improves the accuracy and robustness of traffic predictions and is suitable for intelligent management and decision-making optimization in complex urban traffic environments.

[0054] Based on the same technical solution, the present invention also discloses a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, enable the computing device to execute the above-mentioned adaptive semantically enhanced spatiotemporal graph network traffic prediction method.

[0055] 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 are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the above-mentioned adaptive semantically enhanced spatiotemporal graph network traffic prediction method.

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

[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0058] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0060] The above embodiments are only for illustrating the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. A traffic prediction method based on adaptive semantically enhanced spatiotemporal graph network, characterized by: The method obtains a traffic prediction model by building and training a machine learning model that uses traffic data as input and future traffic data as output. The machine learning model includes a dual-branch time modeling module and a prediction output module. The dual-branch time modeling module includes a long-term branch unit and a short-term branch unit. 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 are input into the long-term branch unit and the short-term branch unit respectively. The long-term branch unit uses a parallel gating network to capture the long-term dependency of traffic data and obtain the periodic time feature H. long , the short-term branch unit uses a hierarchical aggregation method to capture the local short-term dependencies of traffic data and obtain the local time feature H short , H long and H short Splicing to get H DTM , as the input of 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.

2. The method according to claim 1, characterized in that 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 as the input of the third linear mapping layer.

3. The method according to claim 1, characterized in that The method further comprises: The original traffic data collected by the road sensor nodes is standardized to obtain the standardized result X norm ; X norm and time feature TF enc Connect and transform the traffic data into a two-dimensional matrix through the Reshape operation; The traffic network is modeled as a graph structure G r =(V,E), where V represents the node set consisting of road sensors, |V|=N represents the total number of nodes, and E represents the road connection relationship, which is used to describe the spatial topological structure between nodes; in this graph structure, each node records the traffic data of the corresponding location.

4. The method according to claim 3, characterized in that The machine learning model also includes a feature fusion module. In the feature fusion module: H DTM Generate the gated weight matrix G through the tanh activation function; Introducing bidirectional multi-order diffusion graph convolution mechanism to model the spatial dependency of nodes: , , Where Z is the diffusion graph convolution result; Fuse(•) is the feature fusion function; k=0,1,…,K, K represents the maximum order of diffusion; X represents traffic data; P f k =(P f ) k 、P b k = (P b ) k are the forward and backward diffusion matrices of the kth diffusion order respectively; P f =A / rowsum (A), P b =A T / rowsum(A T ), rowsum(•) represents the sum of the rows of the matrix; A is the N×N adjacency matrix that represents the connection strength between nodes in traffic network modeling, and its i-th row and j-th column element A ij =1, indicating that there is a road connection between node i and node j. ij = 0, indicating that there is no road connection between node i and node j; k f ,W k b All are trainable weights; Multiply G and Z element by element to get H gated ; H gated With H DTM Splice and get H concat , as the input of the prediction output module.

5. The method according to claim 4, characterized in that Introduce the residual connection structure in the feature fusion module: After adding X and Z, multiply them element-wise with G to get H gated .

6. The method according to claim 4, characterized in that Introducing a node embedding representation mechanism, constructing two trainable node embedding matrices E1 and E2, and generating an adaptive adjacency matrix by calculating the similarity of E1 and E2 , to mine the implicit spatial dependency strength between nodes: , Where ReLU(•) represents the ReLU activation function, and Softmax(•) represents the Softmax function.

7. The method according to claim 6, characterized in that The adaptive adjacency matrix is ​​added as a supplementary term to the diffuse graph convolution: , Where A adp k is the adaptive adjacency matrix of the kth diffusion order; W k adp are trainable weights.

8. The method according to claim 4, characterized in that The feature fusion function is feature concatenation, average pooling, weighted summation or attention weighted function.

9. A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, characterized in that: When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 8.

10. An electronic device, characterized in that: The method comprises 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 are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for inhibiting temperature effect of hybrid power supply driving system of electric automobile

    CN109889131A

  • Space-time adaptive dynamic graph convolutional network traffic flow prediction method

    CN118629226A

  • Synchronous electric energy meter error verification and correction method, medium and electronic device

    CN118897245A

  • Traffic flow prediction method and device based on graph isomorphic space-time network, and medium

    CN119169817A

  • System and method for providing accident rental car service

    KR1020240033353A

Cited By

  • Traffic prediction method based on dual-granularity level Transform

    CN121564977A