Traffic flow prediction method based on multimode dynamic memory graph convolutional network

Through the multi-mode dynamic memory graph convolution network, the problem of insufficient spatial and temporal relationship extraction in the existing traffic flow prediction methods is solved, and more accurate and flexible traffic flow prediction is achieved, which enhances the robustness and interpretability of the model.

CN119107798AActive Publication Date: 2024-12-10CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411122085.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-10
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods cannot effectively capture the dynamic changes and complexity of spatiotemporal relationships in traffic data, resulting in insufficient prediction accuracy and failure to fully utilize the potential and traffic pattern memory in real-time data.

Method used

The multi-mode dynamic memory graph convolution network (MM-DMGCN) method is adopted, and the time series feature extraction module, periodic feature capture module, dynamic graph convolution module and dynamic adjacency matrix update module are combined with convolutional neural network and recurrent neural network. , dynamically adjust the adjacency matrix and introduce attention mechanisms to capture the spatiotemporal characteristics and dynamic changes in the traffic network.

Benefits of technology

Improve the accuracy and robustness of traffic flow prediction, can better deal with emergencies and abnormal situations, enhance the interpretability of the model and capture the spatial and temporal features, improve the accuracy of the prediction and the stability of the model. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107798A_ABST
    Figure CN119107798A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic flow prediction method based on a multimode dynamic memory graph convolutional network, and belongs to the technical field of intelligent traffic. An existing graph convolutional neural network method is insufficient in space-time correlation characteristic extraction, insufficient in periodic characteristic consideration and inaccurate in dynamic evolution correlation capture. In order to solve the problem, firstly, a time sequence feature extraction module and a bidirectional memory loop network module are established, and captured time sequence features are fused to form a comprehensive feature vector; then, in a dynamic graph convolution module, through a fusion mode of a diffusion graph convolution neural network, an attention mechanism and a typical traffic mode, capturing spatial correlation between nodes, and generating a new dynamic adjacency matrix; the dynamic adjacency matrix can reflect the node connection relation changing along with time. According to the method, the adjacent matrix is dynamically updated through the multimode dynamic memory graph convolutional network, emergencies and abnormal conditions can be better dealt with, and the accuracy and robustness of traffic flow prediction are effectively improved.
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 relates to a traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network. Background Art

[0002] With the rapid development of intelligent transportation systems (ITS) and the continuous increase of urban traffic data, accurate traffic flow prediction has become increasingly important in real traffic networks. Traffic flow prediction can not only help alleviate traffic congestion and improve road traffic efficiency, but also provide a scientific basis for urban planning and traffic management. In the context of smart city construction, more and more sensors are installed and deployed on urban roads to collect real-time traffic data. However, the complexity and nonlinear characteristics of traffic data make it still a major challenge to achieve accurate traffic prediction.

[0003] Early traffic flow prediction models mainly rely on statistical methods and machine learning algorithms, but these models cannot capture the highly complex nonlinear characteristics of traffic data. In recent years, deep neural networks have performed outstandingly in processing time series, and many deep learning-based methods have been widely used in traffic prediction tasks. Some researchers have tried to use graph neural networks (GNNs) to extract spatiotemporal dependencies from non-Euclidean multi-sensor data. At present, studies usually construct spatial graphs with predefined or data-adaptive adjacency matrices, capture the correlation between spatial nodes at each time step through graph neural networks, and use recurrent neural networks (RNNs) or Transformers to connect each node to itself between adjacent time steps to capture information from temporally adjacent nodes. However, these methods are usually limited to static spatial modeling and fail to accurately capture the dynamic and complex relationship between time and space, that is, they fail to fully extract the spatiotemporal relationship between different time steps and nodes, including the dynamic changes of spatiotemporal relationships, thus affecting the accuracy of prediction.

[0004] Therefore, more effective methods are needed to extract the spatiotemporal relationships between different time steps and nodes, including the dynamic changes of spatiotemporal relationships, and consider assigning different spatiotemporal fusion graphs to different traffic modes. By dynamically adjusting the adjacency matrix and introducing more complex spatiotemporal fusion mechanisms, the changes in spatiotemporal dependencies in the traffic network can be more accurately captured, thereby achieving more accurate traffic flow prediction. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network (MM-DMGCN). This method aims to solve the problems of insufficient extraction of spatiotemporal correlation, insufficient consideration of periodic features, and failure to fully capture the overall spatiotemporal characteristics and dynamic evolution correlation in the traffic network in the model. In addition, these studies often ignore the potential of the adjacency matrix learned from real-time traffic data and the memory of valuable traffic patterns at each traffic node.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a traffic flow prediction method based on MM-DMGCN, which takes into account the extraction of periodic features and typical historical traffic patterns (HTTP) and a dynamic adjacency matrix that evolves over time.

[0008] The multi-scale dynamic fusion graph convolutional network includes the following steps:

[0009] S1: Temporal feature extraction model based on aggregated convolutional network;

[0010] S2: Periodic feature capture model based on Bi-MRNM;

[0011] S3: Dynamic graph convolution model based on HTTP;

[0012] S4: Dynamic adjacency matrix update method based on GRU recurrent network;

[0013] S5: Traffic flow prediction method based on MM-DMGCN.

[0014] In the second aspect, in step S1 of the embodiment of the present invention, the temporal feature extraction module (TFEM) aims to capture the complex temporal correlation in the high-dimensional spatiotemporal representation through a convolution sliding window and aggregate and reduce the dimension of the temporal features. The module efficiently captures the temporal correlation and integrates the temporal information into the feature dimension, reducing the computational complexity while retaining important temporal features.

[0015] In the third aspect, in step S2 of the embodiment of the present invention, a bidirectional memory recurrent network module (Bi-MRNM) is used to extract the periodic characteristics of traffic flow through a long short-term memory network (LSTM) and a gated recurrent unit (GRU) module. Bi-MRNM can capture time dependencies from both the front and back directions, while the GRU module can effectively memorize and forget information and extract periodic change characteristics through its built-in gating mechanism.

[0016] Specifically, Bi-MRNM uses LSTM to handle long-term periodic dependencies, while using GRU to improve computational efficiency and convergence speed. Bi-MRNM aims to enhance the adaptive perception of periodicity and trends in traffic data through adaptive learnable embedding. After capturing the temporal and periodic features of traffic data, the two feature representations are fused to form a comprehensive feature representation. The present invention considers the time dimension information of each node in the traffic network as its potential spatial representation and integrates the time information into the feature dimension. This method not only reduces the number of model parameters, but also effectively retains the temporal information of the model.

[0017] In the fourth aspect, in step S3, an embodiment of the present invention proposes a dynamic graph convolution framework (Memory Dynamic Graph Convolutional, MDGCN) with a memory mode to dynamically capture the spatial correlation between nodes. The module is mainly composed of a diffusion graph convolution layer (DGCL), a fully connected layer, an attention layer, a typical traffic mode interaction layer, a graph generator, and a residual connection layer. Specifically, first, the input node feature matrix and the dynamic adjacency matrix are passed through the diffusion graph convolution layer to generate a new node representation. Subsequently, these features are passed to the fully connected layer for high-order feature extraction and transformation. Next, the attention layer dynamically adjusts the weights of the node features by calculating the attention weight matrix between the node features to highlight the relationship between important nodes. In this process, the typical traffic mode interaction layer interactively fuses the typical traffic modes and hidden features of different time periods to form a comprehensive feature, which enhances the model's ability to capture the hidden dynamic spatial correlation between nodes. Then, the generated hidden feature representation is sent to the graph generator, which mainly includes a series of neural network layers for generating a new dynamic adjacency matrix. By learning the similarity between nodes and generating a dynamic adjacency matrix, the dynamic spatial relationship between nodes in the traffic network can be better captured. Subsequently, the initial adjacency matrix and the dynamic adjacency matrix are fused so that the model can take into account both static and dynamic features. Finally, the residual connection layer maintains the transmission of original information by fusing the input features with the features processed by each layer, thereby enhancing the stability of the model. Through this design, the model can dynamically capture the spatial correlation between nodes and improve the accuracy and robustness of traffic flow prediction.

[0018] In a fifth aspect, in step S4, the embodiment of the present invention designs a new dynamic adjacency matrix A I To replace the original static adjacency matrix, this replacement enhances the model's ability to capture complex data. At the same time, the present invention designs a new adjacency matrix definition method based on spatial structure, extracting distance space information by calculating the correlation of node hierarchical structures in the distance graph, and more comprehensively describing the spatial correlation between nodes.

[0019] In this model, the initial adjacency matrix A I It is defined based on the physical connection relationship and historical data of the traffic network. In order to better capture the dynamic change characteristics of traffic flow, the GRU gating mechanism is introduced to update the adjacency matrix. Specifically, the input traffic flow data sequence X t Through GRU unit processing, a hidden state H is generated. The GRU gating mechanism combines the input data and the hidden state to output a dynamic adjacency matrix A. IThis dynamic adjacency matrix can reflect the node connection relationship that changes over time and capture more accurate spatiotemporal characteristics, thereby improving the accuracy and robustness of traffic flow prediction. By dynamically updating the adjacency matrix, the model has the ability to flexibly adapt to changes in traffic flow and can better respond to emergencies and abnormal situations.

[0020] In a sixth aspect, in step S5, the embodiment of the present invention aims to integrate the features extracted and processed by the above modules to finally generate a prediction result of traffic flow. This module is mainly composed of a linear layer and a fully connected layer to ensure the accuracy of the output and the efficiency of the model.

[0021] The beneficial effects of the present invention are:

[0022] (1) More comprehensive spatiotemporal feature extraction

[0023] Temporal Feature Extraction Module (TFEM): Through time embedding coding and time series aggregation convolution, it effectively captures the temporal correlation in high-dimensional spatiotemporal data and integrates it into the feature dimension, which not only retains important temporal features but also reduces computational complexity.

[0024] Bidirectional Memory Recurrent Network Module (Bi-MRNM): Combining LSTM and improved GRU, it captures temporal dependencies from both the forward and backward directions and extracts periodic change features to more accurately identify the periodic patterns of traffic flow.

[0025] Memory Dynamic Graph Convolutional Network (MDGCN): Through the interaction of diffusion graph convolution layers, attention mechanisms and typical traffic patterns, it dynamically captures the spatial correlation between nodes and generates a new dynamic adjacency matrix to more accurately reflect the node connection relationship that changes over time and capture more comprehensive spatiotemporal features.

[0026] (2) Higher prediction accuracy and robustness

[0027] Dynamic adjacency matrix: replaces the static adjacency matrix to better simulate the correlation between detectors in the road network as the dynamic characteristics of traffic flow change, enhance the model's ability to capture complex data, and improve the accuracy and robustness of predictions.

[0028] Typical traffic pattern memory: A typical traffic pattern memory library is introduced to dynamically capture the hidden dynamic spatial correlations between nodes, further enhancing the prediction ability of the model.

[0029] Attention mechanism: Dynamically adjust the weights of node features, highlight the relationship between important nodes, capture the global dependencies between nodes, and make up for the deficiency that the graph convolution layer can only capture local relationships.

[0030] (3) Stronger ability to respond to emergencies and abnormal situations

[0031] Dynamically update the adjacency matrix: This enables the model to flexibly adapt to changes in traffic flow, better respond to emergencies and abnormal situations, and improve the accuracy and robustness of predictions.

[0032] (4) Model interpretability is stronger

[0033] Multi-module design: Traffic flow prediction is decomposed into multiple modules, each of which is responsible for a specific function, making the model clearer, easier to understand and more interpretable.

[0034] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0036] Figure 1 It is a flow chart of the traffic flow prediction method based on MM-DMGCN;

[0037] Figure 2 The overall model diagram of the traffic flow prediction method based on MM-DMGCN;

[0038] Figure 3 This is a schematic diagram of the static adjacency matrix generation process;

[0039] Figure 4 Update the model graph for the dynamic adjacency matrix;

[0040] Figure 5 Update model diagrams for historically typical traffic patterns interaction. DETAILED DESCRIPTION

[0042] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0043] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0044] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0045] Figure 1 FIG. 1 is a flow chart showing a method for predicting traffic flow according to an embodiment of the present invention. Figure 1 As shown, the method includes: step 1, data collection and data preprocessing, including infrared sensors, traffic cameras or other data collection equipment, obtaining raw traffic flow data, cleaning, denoising and normalizing the raw data set to ensure data quality and consistency, dividing the processed data set into traffic flow data of multiple periodic modes and constructing traffic network signals and adjacency matrices according to the connectivity between sensor nodes. Step 2, sending the constructed traffic flow data of multiple periodic modes to the time series feature and periodic feature extraction module to capture the flow change characteristics of short-term modes and daily and periodic modes, and fusing the two characteristics to form a comprehensive feature vector to provide input for subsequent dynamic spatial correlation capture. Based on the fused comprehensive feature vector, the dynamic graph convolutional neural network is used to extract the dynamic spatial correlation in the traffic flow. Step 3, the acquired spatiotemporal characteristics of the traffic flow are input into the prediction model for training to obtain the prediction result of the traffic flow.

[0046] The traffic flow data of multiple periodic modes described in step 1 include short-term mode, daily mode and weekly mode; the short-term mode represents the traffic flow observation records of adjacent time slices, and the daily mode and weekly mode represent the historical traffic flow observation records in the same weekly and monthly cycles as the prediction target; the traffic data of the short-term mode is expressed as:

[0047] [X t-T-1 ,X t-T ,...,X t-1 ,X t] (1)

[0048] The traffic data matrices for daily and weekly modes are represented as follows:

[0049]

[0050]

[0051] The purpose of traffic prediction is to use the historical traffic data series X = [X t-T-1 ,X t-T ,...,X t-1 ,X t ] to predict the future traffic signal sequence Y = [Y t-T-1 ,Y t-T ,...,Y t-1 ,Y t ]. This process is essentially a mapping process, mapping the traffic data of a period of history to the traffic data of a period of time in the future. Therefore, this process can be defined as:

[0052] [Y t-T-1 ,Y t-T ,...,Y t-1 ,Y t ]=F([X t-T-1 ,X t-T ,...,X t-1 ,X t ]) (4)

[0053] Where F(·) is a learnable neural network model, and our goal is to obtain a more effective network model through training.

[0054] Figure 2 FIG. 1 shows a model diagram of a traffic flow prediction method according to an embodiment of the present invention. Figure 2 As shown in the figure, the model mainly consists of TFEM, Bi-MRNM, MDGCN and output module. For short-term patterns, it is input into the time series feature capture module to obtain the temporal correlation of short-term patterns; for daily and weekly patterns, it is input into the periodic feature capture module to obtain the periodic features of the input data. Then the two features are fused to form a comprehensive feature representation, which is used as a dynamic graph convolution module to extract the hidden long-term dynamic spatiotemporal dependencies.

[0055] 1. Short-term pattern temporal correlation capture process based on TFEM

[0056] In the traffic flow prediction model, directly using the original timestamp as input may not be able to fully express the complex relationships and patterns of time. By using time embedding coding, time information can be converted into continuous and periodic feature representations to help the model better understand changes in the time dimension. Combining time encoding features with node features (such as speed and flow) can be achieved through feature concatenation or addition operations. This combination can help the model better capture the relationship between time and space features and improve prediction accuracy. Specifically, trigonometric functions can be used to generate a unique time embedding vector for each time step t, and simple vector operations can be used to model the relative position relationship between time steps. This process is defined as:

[0057]

[0058]

[0059] Where d is the dimension index of the current embedding vector. model is the total embedding dimension. The generated time embedding vector is fused with the input node features as the input of the temporal aggregation convolution module. This module aims to capture the complex temporal correlations in high-dimensional spatiotemporal representations through convolution sliding windows and aggregate and reduce the dimensionality of temporal features. First, a one-dimensional convolution operation is applied to the input layer to extract preliminary temporal features; then, higher-order temporal features are further extracted through multiple hidden layers; in each layer, an activation function is applied to enhance the nonlinear expression capability, and finally a rich temporal feature representation H is generated. T1 .

[0060] 2. Design of daily cycle pattern feature extraction model based on Bi-MRNM

[0061] The design of the daily cycle pattern feature extraction model based on Bi-MRNM mainly includes two parts: first, Bi-MRNM captures data dependencies based on the LSTM and GRU bidirectional structures; second, Bi-MRNM improves GCN on GRU. Since traffic flow as a time series has a strong periodicity, the Bi-MRNM input sequence used to extract daily cycle features is centered on the last time slice of the input sequence yesterday, and expanded to m time intervals before and after.

[0062] In order to improve the computational efficiency and the convergence speed of the model, the present invention introduces a two-layer parallel GRU and LSTM network structure, one layer from left to right (forward LSTM layer), and the other layer from right to left (backward GRU layer), so that the time dependencies in both the forward and backward directions can be considered at the same time. Among them, GRU is a variant of LSTM, which is used to solve the gradient vanishing and gradient exploding problems that occur in traditional RNN when processing long time series. GRU controls the flow of information by introducing update gates and reset gates, thereby achieving effective modeling of time series data, retaining the ability to capture time dependencies, and reducing computational complexity. In order to further enhance the model's ability to capture time dependencies, the present invention extends the fully connected operation of the backward GRU layer to the graph convolutional network. Specifically, each GRU unit contains a GCN operation, and the calculation process of DGCGRU can be defined as:

[0063]

[0064] Among them, z t is the update gate, which determines how much of the hidden state of the current time step comes from the hidden state of the previous time step, σ is the sigmoid activation function, [h t-1 ,x t ] represents the concatenation of the previous hidden state and the current input; z t It is the reset gate, which controls the influence of the hidden state of the previous time step on the candidate hidden state; is a candidate hidden state, which combines the current input and the hidden state of the previous time step, and controls the flow of information by resetting the gate; h t is the hidden state of the current time step, which controls the linear combination of the current candidate hidden state and the hidden state of the previous time step through the update gate; W z and b z are the weight matrices and bias vectors of the respective definition processes, and G(·) represents the graph convolution operation. In the backward GRU layer, the introduction of GCN makes the hidden state of each time step not only depend on the previous and next information in the time series, but also considers the spatial relationship between nodes, thereby capturing more complex spatiotemporal dependencies. This improvement can more effectively extract the periodicity and spatiotemporal features contained therein when processing traffic flow data.

[0065] In Bi-MRNM, the input data will pass through the forward LSTM layer and the backward GRU layer to generate two hidden state sequences H f and H b , these two hidden state sequences are concatenated together at each time step, providing richer time-dependent features Finally, the fused time-correlation feature vector of the short-term pattern and the daily and weekly pattern is used as the input feature H of the subsequent dynamic image convolution module. SThe process can be defined as:

[0066] H S =concat(H T1 ,H T2 ) (8)

[0067] Among them, concat(·) represents the feature concatenation operation, H T1 and H T2 Concatenate on the feature dimension.

[0068] 3. Design of dynamic spatiotemporal feature extraction module for typical traffic pattern memory

[0069] The design of the dynamic spatiotemporal feature extraction module with typical traffic pattern memory mainly includes the adjacency matrix generation and update module, diffusion graph convolution layer, fully connected layer, attention layer, traffic pattern interaction layer, graph generator, and output layer. The design aims to improve the accuracy and robustness of traffic flow prediction by dynamically capturing the spatial correlation between nodes.

[0070] (1) Adjacency matrix generation and update module

[0071] The adjacency matrix definition module mainly includes the static matrix definition module and the dynamic matrix definition module. Figure 3 As shown, the static matrix mainly considers distance-based graphs and spatial structure-based graphs.

[0072] (a) The distance-based graph is constructed by using the Haversine distance between sensor nodes and the threshold Gaussian kernel. Definition

[0073] The method is as follows:

[0074]

[0075] in, represents the Haversine distance metric between nodes i and j on the road; σ represents the standard deviation of the metric; ε represents the threshold for adjusting the sparsity of the distance-based graph adjacency matrix distribution.

[0076] (b) Spatial structure-based graphs extract distance space information by calculating the correlation of node hierarchical levels in the distance graph. Specifically, we first derive a structure-aware embedding vector E by performing random walks on the struc2vec hierarchical graph, and then use a hyperbolic distance function to measure the correlation between the embedding vectors to preserve the hierarchical and local structural information of the derived embedding. Spatial distance indicators between sensor nodes It can be defined as follows:

[0077]

[0078] Among them, Ei ,E j represents the sensor embedding vector; arcosh(·) represents the inverse hyperbolic cosine function. After obtaining the spatial distance index, the threshold Gaussian kernel is also used to construct the static spatial matrix. The definition is as follows:

[0079]

[0080] In order to prevent the introduction of unnecessary or even negative information into the node representation in the message passing module, the present invention considers learning pre-connected edges in distance-based graphs and structure-based graphs, using predefined distance-based and structure-based adjacency matrices to multiply the learnable matrix. Figure 3 As shown, the learnable matrix consists of the product of two node embeddings G1 and G2. Its definition is as follows:

[0081]

[0082] in To learn the matrix, updates are done via back-propagation during the training phase. By dynamically adjusting the connections of static matrices through the Hadamard inner product, the impact of incorrect or incomplete prior knowledge is mitigated.

[0083] The correlation between nodes in the road network changes with the characteristics of traffic flow. In order to simulate the changes in the relationship between nodes at different times, the present invention uses a dynamic adjacency matrix A I To replace the originally defined static matrix A0, where A0 = A sta .

[0084] like Figure 4 As shown in the figure, the Dynamic Adjacency Matrix Update Module (DAMUM) implements this process. Specifically, first, the input road network flow features and the adjacency matrix are reshaped: 1. The adjacency matrix is ​​encoded, then expanded and repeated to match the length of the time step. 2. The road network flow and the encoded adjacency matrix are concatenated in the feature dimension to form combined features. These combined features will be passed as input to the GRU recurrent module. Then, each layer of GRU will process these combined features, extract the temporal correlations therein, and generate new hidden representations. Finally, the last hidden state of the GRU is processed through a linear layer to generate a new dynamic adjacency matrix A. I This dynamic adjacency matrix can better reflect the relationship between nodes that changes over time, thereby improving the model's ability to capture traffic flow characteristics and prediction accuracy.

[0085] (2) Diffusion graph convolution layer

[0086] DGCL receives the hidden layer features H S and the dynamic adjacency matrix A I , generating new node representations. The core idea of ​​DGCL is to propagate information in the graph through a diffusion process, that is, information starts from a node and propagates layer by layer through its neighboring nodes to capture the local and global structural information of the node.

[0087] The present invention adopts the random walk diffusion process to propagate information. In DGCL, the convolution operation combines the features of a node with the features of its neighboring nodes by applying the diffusion kernel multiple times. The specific process is defined as follows:

[0088]

[0089] Among them, H (l) is the node feature matrix of the lth layer, K is the diffusion order, P is the diffusion kernel, and W (l) is the weight matrix of the lth layer, σ is the activation function, α k is the weight coefficient of one-step diffusion. By introducing multi-order diffusion kernels, not only the local neighbor information of the node can be captured, but also the global graph structure information. At the same time, DGCL can capture the high-order relationship between nodes, thereby improving the expressiveness and prediction performance of the model.

[0090] (3) Fully connected layer

[0091] After the diffusion graph convolution layer, the feature representation H is obtained. Dif =DGCN(H S ,A I ). Then, a fully connected layer is added after the diffusion graph convolution. The functions of the fully connected layer after the diffusion graph convolution mainly include feature transformation and extraction, nonlinear transformation, feature fusion, and adjustment of feature dimensions. By introducing the fully connected layer, the expressive power of the model can be enhanced, and the complex patterns in the data can be better captured, thereby improving the performance of the prediction task. The specific process can be defined as:

[0092]

[0093] Among them, σ is the activation function, W is the weight matrix, and b is the bias vector.

[0094] (4) Attention layer

[0095] First, the embedded feature H∈R N×D (N represents the number of nodes, D represents the feature dimension) is mapped to a high-dimensional potential subspace to generate subspace, where the mapping is implemented using a feedforward neural network. The process can be defined as:

[0096]

[0097] in, is the projection matrix to be learned. Then, the V space feature vector is sent to the Feature Pattern Update Module (FPUM) to perform a “memory-data” correlation analysis with the typical traffic pattern memory library to obtain a new feature representation. Among them, ψ(·) represents the update process, M t is a typical traffic pattern memory library. Then calculate the dot product of the query matrix Q and the key matrix K and divide it by the scaling factor Then apply the softmax function to normalize the weights to get the attention distribution. Finally, the normalized weight matrix is ​​updated to the value matrix The weighted sum process can be defined as follows:

[0098]

[0099] Definition of the invention in, is the updated feature matrix. Through the attention mechanism, the model can dynamically adjust the weights according to the importance of node features and highlight the relationship between key nodes. The attention mechanism can capture the global dependency between nodes, making up for the deficiency that the graph convolution layer can only capture local relationships. Finally, the feature matrix H obtained by the attention layer is Att Feed it into the graph generator to generate a dynamic adjacency matrix that the model can train.

[0100] (5) Typical traffic mode interaction layer

[0101] like Figure 5 As shown, the present invention uses the idea of ​​memory network to propose a typical traffic pattern memory bank (MemoryBank, MB). The memory bank is designed to memorize the typical features in the samples seen for further pattern matching. During the interaction between the subspace and MB, first, the feature vector in the V space is used as the query vector At the same time, read the characteristic pattern p in MB m ; Then, the matching probability between the query vector and this feature pattern is calculated, and the memory items with matching probability are weighted. The process can be defined as:

[0102]

[0103] Among them, k represents the query vector index, the maximum is max; m represents the MB feature pattern set; represents the MB feature pattern index; Represents the set of matching probabilities between the query vector and MB.

[0104] Finally, the pattern matching vector in the memory is calculated based on the weighted average of the matching probabilities in the probability set, and sent to the original item of the V space to update the corresponding feature matching vector. The specific process can be defined as:

[0105]

[0106]

[0107] in, Representatives and Matched MB feature pattern; f m represents the feature space pattern update function; Represents the updated feature space.

[0108] (6) Graph Generator

[0109] The graph generator is mainly composed of three parts: Multi-Layer Perceptron (MLP), Gumbel Softmax layer, and Masked Fill layer. First, MLP is used to generate a preliminary dynamic adjacency matrix A L , where A L =MLP(H A tt). Then, Gumbel Softmax is applied to generate samples from the discrete distribution; Gumbel Softmax is an approximate sampling method that allows discrete selection in neural networks, and since it is differentiable, backpropagation can be used during training. The process can be defined as:

[0110]

[0111] Among them, g i Represents A L Gumbel noise added; u i is the value sampled from the uniform distribution U(0,1); A pro represents the probability matrix generated by Gumbel Softmax, and τ is the temperature parameter.

[0112] Finally, the MaskedFill layer is used to perform a mask operation on the generated adjacency matrix to ensure that the diagonal elements are zero, that is, self-connection is not considered. The process can be defined as follows:

[0113]

[0114] Finally, in order to ensure the symmetry and stability of the generated adjacency matrix, the present invention performsdy Perform symmetric operation. At the same time, the generated dynamic adjacency matrix A dy With the initial adjacency matrix A sta Fusion is performed to further improve the performance and robustness of the model. The specific process can be defined as follows:

[0115]

[0116] A F =αA dy +(1-α)A sta (twenty three)

[0117] Among them, α is a weight parameter that controls the fusion ratio of the dynamic adjacency matrix and the initial adjacency matrix. Through this fusion strategy, the spatiotemporal relationship between nodes can be dynamically captured while retaining the initial static structural information.

[0118] This symmetrization and fusion strategy ensures the stability and symmetry of the adjacency matrix, making the model more accurate and robust in capturing the dynamic spatial relationship between nodes in the transportation network. F After that, it and MDGCN are input into feature H S The nodes are fed into the graph convolutional network for processing to form a new node feature representation. Through this design, the model can retain the original information of the input features and effectively integrate the spatial correlation captured by the dynamic adjacency matrix, thereby improving the performance of traffic flow prediction.

[0119] (7) Prediction output layer

[0120] The features processed by MDGCN are sent to the prediction output layer to complete the final traffic flow prediction. The prediction output layer consists of a fully connected layer and a regression layer. The fully connected layer performs a linear transformation on the input node features and introduces nonlinear features through the activation function; the regression layer maps the features output by the fully connected layer to the final prediction result [Y t-T-1 ,Y t-T ,...,Y t-1 ,Y t ].

[0121] 4. System Process

[0122] The traffic flow prediction method based on MM-DMGCN has the following specific steps:

[0123] Steps 601-605: initialization phase;

[0124] Step 601: Algorithm initialization;

[0125] Step 602: Roadside sensors collect data;

[0126] Step 603: pre-processing the collected traffic data;

[0127] Step 604: constructing a road network signal and initializing an adjacency matrix;

[0128] Step 605: sampling the road network signal;

[0129] Steps 606-610: multi-mode timing feature capture phase;

[0130] Step 606: Perform time embedding coding on the sequence data;

[0131] Step 607: Time series aggregation convolution operation;

[0132] Step 608: If the short-term pattern feature and the daily cycle pattern feature have achieved feature fusion, then execute step 411, otherwise execute step 609;

[0133] Step 609: Create road network data in daily and periodic modes;

[0134] Step 610: Perform Bi-MRNM model training;

[0135] Steps 611-616: Dynamic spatial correlation feature capture stage;

[0136] Step 611: Create a static matrix;

[0137] Step 612: Generate a dynamic adjacency matrix;

[0138] Step 613: Perform diffusion graph convolution operation on the fused features;

[0139] Step 614: attention operation;

[0140] Step 615: Apply MB to perform feature calculation;

[0141] Step 616: Obtain dynamic spatial correlation features;

[0142] Steps 617-620: output prediction stage;

[0143] Step 617: Model training;

[0144] Step 618: If the model meets the quality requirements, execute step 415, otherwise repeat 405;

[0145] Step 619: Output prediction;

[0146] Step 620: The algorithm ends.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network, characterized by: The method comprises the following steps: S1: A temporal feature extraction model based on an aggregated convolutional network, which captures the temporal correlation in high-dimensional spatiotemporal data and integrates it into the feature dimension through temporal embedding coding and temporal aggregate convolution; S2: A periodic feature capture model based on the bidirectional memory recurrent network module Bi-MRNM, which combines the long short-term memory network LSTM and the improved gated recurrent unit GRU to capture time dependencies from both the front and back directions and extract periodic change features; S3: A dynamic graph convolution model based on typical traffic patterns, which dynamically captures the spatial correlation between nodes and generates a new dynamic adjacency matrix through the interaction of diffusion graph convolution layers, attention mechanisms and typical traffic patterns; S4: A dynamic adjacency matrix update method based on the gated recurrent unit (GRU) recurrent network uses the GRU gating mechanism to update the adjacency matrix to reflect the node connection relationship that changes over time; S5: A traffic flow prediction method based on the multi-mode dynamic memory graph convolutional network MM-DMGCN integrates the features extracted and processed by the aforementioned modules to finally generate a traffic flow prediction result.

2. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: In S1, the temporal feature extraction model uses a temporal embedding coding assisted temporal aggregation convolution (TAC) network to generate a temporal embedding vector and fuse it with the input node features as the input of the temporal aggregation convolution module. The temporal aggregation convolution module captures the complex temporal correlation in the high-dimensional spatiotemporal representation through a convolution sliding window, and aggregates and reduces the dimensionality of the temporal features.

3. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: In S2, the bidirectional memory recurrent network module Bi-MRNM adopts a hybrid recurrent model of a long short-term memory network LSTM and an improved gated recurrent unit (GRU), uses LSTM to process long-term periodic dependencies, and uses GRU based on a graph convolutional network to improve computational efficiency and convergence speed, and enhances the perception of periodicity and trends in traffic data through adaptive learnable embedding vectors.

4. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: In the S3, the dynamic graph convolution model includes a diffusion graph convolutional layer (DGCL), a fully connected layer, an attention layer, a typical traffic mode interaction layer, a graph generator and a prediction layer. The spatial correlation between nodes is captured by the diffusion graph convolutional layer, the weights of node features are dynamically adjusted by the attention layer, the typical traffic modes and hidden features of different time periods are interactively fused by the typical traffic mode interaction layer, a new dynamic adjacency matrix is ​​generated by the graph generator, and the prediction result of traffic flow is output by the prediction layer.

5. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: In S4, the dynamic adjacency matrix update method designs a new adjacency matrix definition method based on spatial structure, extracts distance space information by calculating the correlation of node hierarchies in the distance graph, more comprehensively characterizes the spatial correlation between nodes, and dynamically updates the adjacency matrix using the GRU gating mechanism to reflect the node connection relationship that changes over time.

6. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: In S5, the prediction output module consists of a fully connected layer and a regression layer, which performs linear transformation and mapping on the features processed by the multi-mode dynamic memory graph convolutional network MM-DMGCN, and finally generates a prediction result of the traffic flow.

7. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: The temporal feature extraction model includes: The time embedding encoding module converts timestamps into continuous and periodic feature representations; The temporal aggregation convolution module captures the complex temporal correlations in high-dimensional spatiotemporal representations through a convolution sliding window and aggregates and reduces the dimensionality of temporal features.

8. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: The bidirectional memory recurrent network module (Bi-MRNM) comprises: A forward long short-term memory (LSTM) layer for processing forward time series data; Backward Gated Recurrent Unit (GRU) layer, used to process backward time series data; The feature fusion module fuses the outputs of the forward LSTM layer and the backward GRU layer to form a comprehensive feature representation.

9. The traffic flow prediction method based on a multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: The dynamic graph convolution model includes: Diffusion graph convolutional layer DGCL, which propagates information in the graph through a diffusion process and captures the local and global structural information of nodes; The fully connected layer performs nonlinear transformation and feature fusion on the features output by the diffusion graph convolution layer; The attention layer dynamically adjusts the weights according to the importance of node features to highlight the relationship between key nodes; The typical traffic mode interaction layer interacts node features with the typical traffic mode memory library to enhance the model's ability to capture the hidden dynamic spatial correlations between nodes; Graph generator, which generates a new dynamic adjacency matrix to reflect the node connectivity that changes over time; Prediction layer, outputs the prediction results of traffic flow.

10. The traffic flow prediction method based on multi-mode dynamic memory graph convolutional network according to claim 1 is characterized by: The dynamic adjacency matrix updating method comprises: Static matrix definition module, defining distance-based graphs and spatial structure-based graphs; The dynamic matrix definition module dynamically updates the adjacency matrix through the GRU gating mechanism to reflect the node connection relationship that changes over time; The adjacency matrix fusion module fuses the static adjacency matrix and the dynamic adjacency matrix to improve the performance and robustness of the model.

Citation Information

Patent Citations

  • Short-term traffic flow control method based on graph convolution recurrent neural network

    CN110827544A

  • Multi-information fusion space-time diagram convolution traffic flow prediction method

    CN116258258A

  • Traffic flow forecasting method based on multi-mode dynamic residual graph convolution network

    US20230334981A1

Cited By

  • Traffic flow prediction method based on multivariate spatial-temporal feature extraction

    CN119863929A

  • A Traffic Flow Prediction Method Based on Multivariate Spatiotemporal Feature Extraction

    CN119863929B

  • Traffic flow prediction method and device and storage medium

    CN119940662A

  • Medical emergency system based on dynamic graph flow prediction

    CN120412306A

  • Unmanned aerial vehicle cluster target long-time robust tracking method in low-altitude airspace complex environment

    CN120949800A