Traffic flow prediction method based on predefined spatio-temporal joint graph decoding

By constructing a multimodal convolutional feature map and a spatiotemporal joint graph decoding module, the problem of difficulty in extracting spatiotemporal correlation in traffic flow prediction is solved, and high-precision and robust traffic flow prediction is achieved.

CN120656315AActive Publication Date: 2025-09-16HUAIYIN INSTITUTE OF TECHNOLOGY

Patent Information

Application Number
CN202510686931.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-16
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods are difficult to effectively extract deep and complex spatiotemporal correlations, and spatial modeling in traffic networks is limited by static or dynamic spatial dependencies, resulting in low prediction accuracy.

Method used

A method based on predefined spatiotemporal joint graph decoding is adopted. By constructing a multimodal convolutional feature map, a spatiotemporal physical encoding module and a spatiotemporal physical decoding module, and combining the temporal and spatial attention layer, the multi-head graph convolution layer and the adaptive spatiotemporal joint graph convolution layer, the physical topology of the transportation network and the dynamic passenger flow signals are decoupled to achieve high-precision traffic prediction.

Benefits of technology

It improves the accuracy and robustness of traffic flow prediction, reduces spatial feature confusion errors, can dynamically respond to passenger flow fluctuations, and enhances the ability to understand and extract spatiotemporal features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656315A_ABST
    Figure CN120656315A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method based on predefined space-time joint graph decoding. The method belongs to the technical field of public traffic data analysis and prediction, and comprises the following steps: collecting rail transit AFC gate passing data and a train operation timetable, constructing a space-time enhanced OD matrix through abnormal value filtering and travel chain completion, and constructing time dimension heterogeneous graph connection by using a dynamic time warping algorithm; a space-time physical coding module is designed, a time attention mechanism and a space attention mechanism are introduced, the form of feature point multiplication is replaced by feature splicing, effective information obtained after passing through two attention layers is reserved, and the space-time feature fusion proportion is balanced in combination with a gating aggregation structure; a space-time physical decoding module is constructed, modeling is carried out on the space-time dependence of a target flow on a sequence through a multi-layer physical coding module with masks under the condition that the target flow is unknown, and comprehensive and dynamic space-time correlation is reflected through a convolution pre-defined and self-adaptive space-time joint graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of public transportation data analysis and prediction, and relates to a traffic flow prediction method based on predefined spatiotemporal joint graph decoding. Background Art

[0002] Traffic flow prediction in intelligent transportation systems (ITS) is the basis for many applications such as traffic management and vehicle networking. Traffic data is a time series structure. Statistical methods were used in the early days to predict traffic flow, such as the Seasonal Autoregressive Integrated Moving Average (SARIMA). These methods have been successfully applied to traffic forecasting tasks. However, they face the challenge of not being able to extract traffic data with inherent limitations. Traditional machine learning algorithms have gradually emerged in traffic forecasting tasks, such as K-nearest neighbor (KNN), support vector regression (SVR), and hidden Markov model (HMM). They have broken through the limitations of neural network-based methods to a certain extent. However, these methods rely on complex mathematical algorithms and prior knowledge, and can only obtain shallow features, but cannot extract deep, complex spatiotemporal correlations.

[0003] The rise of deep learning methods, which automatically process high-dimensional data and extract complex spatiotemporal correlations, provides new insights for completing traffic flow prediction tasks; these methods include LSTM-BILSTM, DELA and ConvLSTM; however, the traffic network is a topological structure and traffic data obeys a discrete distribution; recently, graph neural networks (GNNs) have been widely used for traffic prediction. Although they have made significant progress in spatiotemporal correlation extraction and prediction accuracy, due to the need for physical structure information of the traffic network, spatial modeling is limited by methods that only consider static spatial dependencies or dynamic spatial correlations. Summary of the Invention

[0004] Purpose of the invention: The purpose of the present invention is to propose a traffic flow prediction method based on predefined spatiotemporal joint graph decoding that can stably capture coupling information while maintaining high accuracy.

[0005] Technical solution: The traffic flow prediction method based on decoding of a predefined spatiotemporal joint graph described in the present invention has the following operating steps:

[0006] (1) AFC punch-in data collection and processing;

[0007] (2) Constructing multimodal convolutional feature maps;

[0008] (3) Constructing a space-time physical coding module;

[0009] (4) Construct a space-time physics decoding module.

[0010] Furthermore, in the step (1), the data collection uses rail transit routes as the research object, and records the passenger check-in data into a database file at a statistical interval of half an hour.

[0011] Furthermore, the data processing in step (1) is to screen out redundant values, abnormal values ​​and missing values ​​in the collected data, and finally obtain the passenger OD data.

[0012] Furthermore, the implementation process of step (1) is as follows: first, two AFC punch-in behaviors are required to enter and exit the subway station, and this rule defines a passenger OD travel behavior; second, an OD trip is located through the passenger card face number, the station number where the transaction occurred, and the time when the transaction occurred; and records with missing corresponding entry and exit transaction information or too long entry and exit transaction time must be deleted; finally, all OD data are counted, with time intervals of 15 minutes, 30 minutes, and 60 minutes respectively, to form passenger OD data.

[0013] Furthermore, the multimodal convolution feature map in step (2) is based on the physical topology of real rail transit, with the OD data before and after dynamic time regularization as the content value, decoupled into passenger flow signals in the traffic line and at the traffic station, and a multimodal convolution feature map is established.

[0014] Furthermore, the established multimodal convolutional feature map includes a physical topology feature map, a passenger flow similarity map, and a correlation ratio map;

[0015] Among them, the physical topological feature graph G p It is directly constructed according to the physical topology of the subway in the selected area. The implementation process is as follows: By constructing a physical connection matrix P∈R N×N If the corresponding sites i and j are connected in the real world, then P(i, j) = 1, if they are not connected, then P(i, j) = 0. After determining the physical connection matrix P, the edge weight matrix W is obtained by normalizing the rows of P. p , the element W at each position of the weight matrix p The calculation formula for (i,j) is as follows:

[0016]

[0017] Where P(i,k) represents the connectivity relationship between sites i and j;

[0018] Passenger flow similarity graph G S Defined by the similarity of passenger flows, the implementation process is as follows: First, DTW is used to evaluate the deviation between the two time series, and the similarity score S(i, j) between stations i and j is calculated to obtain the similarity score matrix S∈R N×N , the DTW calculation formula is as follows:

[0019] S(i,j)=exp(-DTW(X i ,X j ))

[0020] Where, X i With X j represents the complete passenger flow time series of station i and j, exp(·) represents the exponential function calculation formula;

[0021] Then, normalize S to calculate the edge weight matrix W s , which is calculated as follows:

[0022]

[0023] In the formula, when E s When it contains an edge connecting nodes i and k, L(E s ,i,k)=1, otherwise L(E s ,i,k)=0;

[0024] Correlation ratio graph G c It is constructed by the distribution of passengers' origin and destination. The implementation process is as follows: By establishing a correlation ratio matrix C∈R N×N , which is calculated as follows:

[0025]

[0026] Where D(i,j) represents the total number of passengers from station i to station j. is the total number of passengers departing from station i.

[0027] Furthermore, the spatiotemporal physical coding module in step (3) is composed of a temporal attention layer, a spatial attention layer, a multi-head graph convolution layer and an aggregation gating layer. The basic features before the multi-head graph convolution layer are spliced ​​on the channel, and then the outflow features are processed by the aggregation gating layer.

[0028] Furthermore, the temporal attention layer uses a multi-head attention mechanism to calculate its correlation, which is expressed as follows:

[0029]

[0030] Where, Indicates that at node t i With t j The correlation between time nodes, τ represents the total length of the input time series; this correlation coefficient is determined by the detection site v at time step t i With t j The inner product of the Q and K vectors at is obtained:

[0031]

[0032] Where, and Respectively represent the Q and K vectors in the nonlinear transformation function, <**> represents the inner product operator, represents the in-degree of monitoring station v;

[0033] Calculate the correlation coefficient After that, the head's attention Calculated by the following formula:

[0034]

[0035] Where, represents the nonlinear transformation function for finding the V vector in the head attention, || represents the channel splicing operation, BN represents batch normalization, HDT∈R τ×N×d represents the output of the final temporal attention layer;

[0036] The spatial attention layer calculates weights through a multi-head attention mechanism with physical information, and its expression is as follows:

[0037]

[0038] Where, Indicates that at node t i With t j The correlation between time nodes, v represents the monitoring point of the input module;

[0039] The multi-head graph convolution layer focuses on the traffic flow in different subspaces of the monitoring point, and its expression is as follows:

[0040]

[0041] Where, represents the normalized adjacency matrix with self-connection, A vi Represents the node adjacency matrix with self-connections;

[0042] The output of spatial attention HDS∈R is transformed into τ×N×d The output of multi-head graph convolution HSS∈R τ×N×d Adaptive Fusion:

[0043] HST l =We HDS l +(1-W)e HSS l +HST l-1

[0044] W=σ(HDS l ⊙HSS l )

[0045] Where σ represents the Sigmoid activation function, W∈R T×N×d is the weight vector.

[0046] Furthermore, the spatiotemporal physical decoding module in step (4) includes an input with a mask mechanism, an adaptive spatiotemporal joint graph convolution layer, a predefined spatiotemporal joint graph convolution layer and an aggregation gating layer.

[0047] Furthermore, the implementation process of the adaptive spatiotemporal joint graph convolution layer and the predefined spatiotemporal joint graph convolution layer is as follows: first, a predefined spatiotemporal joint convolution graph is predefined according to the spatiotemporal distance between nodes, and then an adaptive spatiotemporal joint graph is constructed;

[0048] The predefined spatiotemporal joint graph defines a spatial adjacency matrix based on pairwise road network distances:

[0049]

[0050] Where, dist(v i ,,v j ,) indicates site v i , and v j , the shortest travel distance between them, σ represents the standard deviation of travel distance;

[0051] Constructing a spatiotemporal joint graph preserves the full spatiotemporal correlation by connecting different nodes between two time steps:

[0052]

[0053] Where k represents the time difference between two time steps, A i,t-k;j,t Represents the time step tk and the node v at t i The edge weight of

[0054] The adaptive spatiotemporal joint graph convolution is implemented as follows:

[0055]

[0056] Where, L t-k;t represents the adaptive adjacency matrix between step size tk and t, represents the updated features at time step t, with b adt Represents learnable weight and bias parameters;

[0057] The mean square error is used as the model loss function, and the mean absolute error and mean absolute percentage error are used as the final prediction result evaluation indicators. The mathematical expressions are as follows:

[0058]

[0059] Beneficial effects: Compared with the existing technology, the significant advantages of the present invention are: 1. The present invention decouples the diffusion of the original subway passenger flow from the inherent signal, constructs a multimodal convolution feature map, and proposes dynamic decoupling and multimodal reconstruction technology, which effectively reduces the spatial feature confusion error through signal separation; 2. The present invention proposes a spatiotemporal attention collaborative coding module, and for the complex spatiotemporal features in traffic flow prediction, designs a cascade of time-space dual attention layers in the coding module, and cooperates with the parallel feature extraction of multi-head graph convolution to achieve accurate modeling of the spatiotemporal interaction pattern of passenger flow during peak hours; 3. The present invention proposes a dual graph convolution decoding architecture, which adopts adaptive and predefined dual graph convolution joint decoding, which not only maintains the physical topology constraints of rail transit, but also dynamically responds to real-time passenger flow fluctuations, increases the understanding of the correlation between sequences and the feature extraction capabilities, and ultimately improves the prediction accuracy and robustness of the overall network. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a network framework diagram of the present invention;

[0061] Figure 2 It is a schematic diagram of the calculation of the spatial attention layer in the present invention;

[0062] Figure 3 Schematic diagram of the calculation of the temporal attention layer in the present invention;

[0063] Figure 4 This is a diagram of the polymerization gate structure of the present invention;

[0064] Figure 5 Schematic diagram of the graph convolution process in the present invention;

[0065] Figure 6 Schematic diagram of the calculation of the spatiotemporal joint graph convolution layer in the present invention;

[0066] Figure 7 This is a traffic flow prediction result diagram in the present invention. DETAILED DESCRIPTION

[0067] The specific technical solutions of the present invention are further described in detail below with reference to specific examples.

[0068] As shown in the figure, the traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to the present invention has the following operating steps:

[0069] Step (1), AFC punch-in data collection and processing; the data collection uses the rail transit routes within the area surrounded by the Second Ring Expressway of a certain city as the research object, and records the passenger punch-in data into a database file at a half-hour statistical interval;

[0070] The data processing is to screen out redundant values, abnormal values ​​and missing values ​​in the collected data, and finally obtain passenger OD data;

[0071] Step (2), constructing a multimodal convolution feature map; the multimodal convolution feature map is based on the actual rail transit physical topology within the area surrounded by the Second Ring Expressway of a certain city, takes the OD data before and after dynamic time warping as content values, decouples it into passenger flow signals in the traffic line and at the traffic station, and establishes the multimodal convolution feature map;

[0072] Step (3), designing a spatiotemporal physical coding module; the spatiotemporal physical coding module is composed of a temporal attention layer, a spatial attention layer, a multi-head graph convolution layer, and an aggregation gating layer, and the basic features before the multi-head graph convolution layer are spliced ​​on the channel, and then the outflow features are processed by the aggregation gating layer;

[0073] Step (4), designing a spatiotemporal physical decoding module; the spatiotemporal physical decoding module comprises an input with a mask mechanism, an adaptive spatiotemporal joint graph convolution layer, a predefined spatiotemporal joint graph convolution layer and an aggregation gating layer;

[0074] The implementation process of step (1) is as follows: AFC punch-in data collection uses the rail transit routes within the area surrounded by the Second Ring Expressway of a certain city as the research object, and saves the passenger punch-in records into a database file with a statistical interval of half an hour; the data processing is as follows: first, two AFC punch-in behaviors are required to enter and exit the subway station, so this rule can be used to define a passenger OD travel behavior; secondly, an OD trip can be located by the passenger card face number, the station number where the transaction occurred, and the time when the transaction occurred; and it is necessary to delete the records with missing corresponding entry and exit transaction information or too long entry and exit transaction time; finally, all OD data are counted, with time intervals of 15 minutes, 30 minutes, and 60 minutes respectively, to form passenger OD data.

[0075] The multimodal convolution feature map in step (2) includes a physical topology feature map, a passenger flow similarity map, and a correlation ratio map:

[0076] Among them, the physical topological feature graph G p Directly build according to the physical topology of the subway in the selected area; first, by constructing a physical connection matrix P∈R N×N If the corresponding sites i and j are connected in the real world, then P(i, j) = 1, if they are not connected, then P(i, j) = 0. After determining the physical connection matrix P, the edge weight matrix W is obtained by normalizing the rows of P. p , the element W at each position of the weight matrix p The calculation formula for (i,j) is as follows:

[0077]

[0078] Where P(i,k) represents the connectivity relationship between sites i and j;

[0079] Passenger flow similarity graph G S Defined by the similarity of passenger flows; first, Dynamic Time Warping (DTW) is used to evaluate the deviation between two time series, and the similarity score S(i, j) between stations i and j is calculated to obtain the similarity score matrix S∈R N×N , the DTW calculation formula is as follows:

[0080] S(i,j)=exp(-DTW(X i ,X j ))

[0081] Where, X i With X j represents the complete passenger flow time series of stations i and j, exp(·) represents the exponential function calculation formula; then, S is normalized to calculate the edge weight matrix W s , which is calculated as follows:

[0082]

[0083] In the formula, when E s When it contains an edge connecting nodes i and k, L(E s ,i,k)=1, otherwise L(E s ,i,k)=0;

[0084] Correlation ratio graph G c It is constructed by the distribution of passengers' origin and destination. First, a correlation ratio matrix C∈R is established. N×N , which is calculated as follows:

[0085]

[0086] Where D(i,j) represents the total number of passengers from station i to station j. is the total number of passengers departing from station i.

[0087] In step (3), temporal attention is applied to the past, present, and future domains of each monitoring point in the traffic network. The intrinsic relationship between monitoring data changes between different time steps. This intrinsic relationship is called dynamic temporal correlation. The temporal attention layer uses a multi-head attention mechanism to calculate its correlation, which is expressed as follows:

[0088]

[0089] Where, Indicates that at node t iWith t j The correlation between time nodes, τ represents the total length of the input time series, and this correlation coefficient can be obtained by the detection site v at time step t i With t j The inner product of the Q and K vectors at is obtained:

[0090]

[0091] Where, and Respectively represent the Q and K vectors in the nonlinear transformation function. <**> represents the inner product operator. is the in-and-out degree of the monitoring station v. Calculate the correlation coefficient After that, the head's attention It can be calculated by the following formula:

[0092]

[0093] Where, represents the nonlinear transformation function for finding the V vector in the head attention, || represents the channel splicing operation, BN represents batch normalization, HDT∈R τ×N×d is the output of the final temporal attention layer;

[0094] Spatial attention acts on a monitoring point in the traffic network and is affected by other monitoring points. The weight of its influence changes over time. This property is defined as dynamic spatial correlation. Considering the impact of the inherent physical information of the traffic network on the calculation, the spatial attention layer designs a multi-head attention mechanism with physical information to calculate the weight. Its expression is as follows:

[0095]

[0096] Where, Indicates that at node t i With t j The correlation between time nodes, v represents the monitoring point of the input module.

[0097] Similar to the temporal attention layer, the spatial correlation of traffic flow is also affected by the in-and-out degree of the monitoring station. Embedded as the input of the spatial attention layer for exogenous information, the correlation coefficient is calculated as follows:

[0098]

[0099] At the same time, the correlation between monitoring sites is affected by the shortest path distance and the shortest path, which is defined as and K = |E|. For mutually reachable site pairs, find the shortest path SP. Then calculate the average dot product of the edge eigenvalues ​​on the path and the weight matrix, and incorporate it into the attention module as a bias term. The calculation formula is as follows:

[0100]

[0101] Where, and It can be obtained by calculating the direct distance and Dijkstra algorithm. represents the weight matrix; similarly, the correlation coefficient of the spatial attention layer can be expressed as:

[0102]

[0103] Where, represents a nonlinear transformation, represents the spatial correlation coefficient of site v; the input of the spatial attention layer is HDT∈R τ×N×d , the output is HDS∈R τ×N×d .

[0104] Multi-head graph convolution considers the connection relationship between nodes in the traffic network, that is, the origin and destination of traffic flow at the monitoring station. This characteristic is the static spatial correlation of traffic flow. A multi-head graph convolution is used to focus on the traffic flow in different subspaces of the monitoring point. Its expression is as follows:

[0105]

[0106] Where, It represents the normalized adjacency matrix with self-connection, A vi It represents the node adjacency matrix with self-connection;

[0107] In order to obtain the final spatiotemporal correlation HST∈R between traffic flows τ×N×d , and finally use the gated fusion method to transform the spatial attention output HDS∈R τ×N×d The output of multi-head graph convolution HSS∈R τ×N×d Adaptive fusion, its expression is as follows:

[0108] HST l =We HDS l +(1-W)e HSS l +HST l-1

[0109] W=σ(HDS l ⊙HSS l )

[0110] Where σ represents the Sigmoid activation function, W∈R T×N×drepresents the weight vector.

[0111] The implementation process of the adaptive spatiotemporal joint graph convolution layer and the predefined spatiotemporal joint graph convolution layer in step (4) is as follows: first, a predefined spatiotemporal joint convolution graph is predefined according to the spatiotemporal distance between nodes. However, the predefined graph may not reflect the potential correlation between nodes. An adaptive spatiotemporal joint graph is proposed to construct two types of graphs to represent the comprehensive and dynamic spatiotemporal correlation between nodes;

[0112] The predefined spatiotemporal joint graph defines a spatial adjacency matrix based on pairwise road network distances:

[0113]

[0114] Where, dist(v i, ,v j, ) indicates site v i, With v j, The shortest travel distance between them, σ represents the standard deviation of travel distance;

[0115] Construct a spatiotemporal joint graph by connecting different nodes between two time steps, preserving the full spatiotemporal correlation:

[0116]

[0117] Where k represents the time difference between two time steps, A i,t-k;j,t Represents the time step tk and the node v at t i When k = 0, the spatiotemporal joint graph is reduced to a common spatial adjacency matrix;

[0118] Before defining the adaptive spatiotemporal joint graph, two learnable matrices U and B are set for the nodes that are very close to each other. U represents the potential attributes of the node, and B represents the interaction mode of each attribute. T It can represent the connection between nodes; thus, it can be defined as:

[0119]

[0120] Where U T Represents the spatiotemporal embedding of the node at time step t, and uses the softmax function to eliminate nodes smaller than the threshold δ adt weight, Represents spatial connections, which change with time steps and can be transformed into:

[0121]

[0122] Where, L t-k;tRepresents the normalized adaptive spatiotemporal joint matrix. The standard graph convolution only models correlation in the spatial graph. In order to match the spatiotemporal joint graph, a spatiotemporal joint graph convolution is proposed. The calculation formula of the traditional graph convolution is:

[0123]

[0124] In the formula, X and Z represent input and output, represents the normalized adjacency matrix, where A is the adjacency matrix with self-loops and D is the degree matrix;

[0125] The convolution method on the predefined spatiotemporal joint graph is:

[0126]

[0127] Where, represents the normalized predefined spatiotemporal joint matrix, Represents the aggregation of time and space information, Indicates that only the information in the spatial domain is aggregated; integrating the information of K time steps, the above formula can be reduced to:

[0128]

[0129] In the case of a directed graph:

[0130]

[0131] Where, and Denotes the normalized predefined spatiotemporal joint matrix in two directions, X t-k and X t represents the input graph signal at time points tk and t, is the updated feature at time step t, with b pdf are learnable weight and bias parameters;

[0132] Similar to the predefined spatiotemporal joint graph convolution, the adaptive spatiotemporal joint graph convolution is implemented as follows:

[0133]

[0134] Where, represents the adaptive adjacency matrix between step size tk and t, represents the updated features at time step t, with b adt are learnable weight and bias parameters;

[0135] The mean square error (MSE) is used as the model loss function, and the mean absolute error (MAE) and mean absolute percentage error are used as the final prediction result evaluation indicators. The mathematical expressions are as follows:

[0136]

Claims

1. A traffic flow prediction method based on predefined spatiotemporal joint graph decoding, characterized in that: The steps are as follows: (1) AFC punch-in data collection and processing; (2) Constructing multimodal convolutional feature maps; (3) Constructing a space-time physical coding module; (4) Construct a space-time physics decoding module.

2. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The data collection in step (1) uses rail transit routes as the research object, takes half an hour as the statistical interval, and records the passenger check-in data into the database file.

3. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The data processing in step (1) is as follows: redundant values, abnormal values ​​and missing values ​​in the collected data are screened and eliminated, thereby obtaining passenger OD data.

4. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The implementation process of step (1) is as follows: first, two AFC punch-in behaviors are required to enter and exit the subway station, and this rule defines a passenger OD travel behavior; second, an OD trip is located through the passenger card face number, the station number where the transaction occurred, and the time when the transaction occurred; finally, all OD data are counted, with time intervals of 15 minutes, 30 minutes, and 60 minutes respectively, to form passenger OD data.

5. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The construction process of the multimodal convolution feature map in step (2) is: based on the actual rail transit physical topology, using the OD data before and after dynamic time regularization as the content value, decoupling it into passenger flow signals in the traffic line and at the traffic station, and finally establishing the multimodal convolution feature map.

6. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 5, characterized in that: The established multimodal convolutional feature map includes a physical topology feature map, a passenger flow similarity map and a correlation ratio map; Among them, the physical topological feature graph G p It is directly constructed according to the physical topology of the subway in the selected area. The implementation process is as follows: By constructing a physical connection matrix P∈R N×N If the corresponding sites i and j are connected in the real world, then P(i, j) = 1, if they are not connected, then P(i, j) = 0. After determining the physical connection matrix P, the edge weight matrix W is obtained by normalizing the rows of P. p , the element W at each position of the weight matrix p The calculation formula for (i,j) is as follows: Where P(i,k) represents the connectivity relationship between sites i and j; Passenger flow similarity graph G S The similarity of passenger flow is constructed as follows: First, DTW is used to evaluate the deviation between the two time series, and the similarity score S(i, j) between stations i and j is calculated to obtain the similarity score matrix S∈R N ×N , the DTW calculation formula is as follows: S(i,j)=exp(-DTW(X i ,X j )) Where, X i With X j represents the complete passenger flow time series of station i and j, exp(·) represents the exponential function calculation formula; Then, normalize S to calculate the edge weight matrix W s , which is calculated as follows: In the formula, when E s When it contains an edge connecting nodes i and k, L(E s ,i,k)=1, otherwise L(E s ,i,k)=0; Correlation ratio graph G c The process is as follows: establish a correlation ratio matrix C∈R N×N , which is calculated as follows: Where D(i,j) represents the total number of passengers from station i to station j. is the total number of passengers departing from station i.

7. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The spatiotemporal physical coding module in step (3) is composed of a temporal attention layer, a spatial attention layer, a multi-head graph convolution layer and an aggregation gating layer. The basic features before the multi-head graph convolution layer are spliced ​​on the channel, and then the outflow features are processed by the aggregation gating layer.

8. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 7, characterized in that: The temporal attention layer uses a multi-head attention mechanism to calculate its relevance, and its formula is as follows: Where, Indicates that at node t i With t j The correlation between time nodes, τ represents the total length of the input time series; this correlation coefficient is determined by the detection site v at time step t i With t j The inner product of the Q and K vectors at is obtained: Where, and Respectively represent the Q and K vectors in the nonlinear transformation function, <**> represents the inner product operator, represents the in-degree of monitoring station v; Calculate the correlation coefficient After that, the head's attention From the following formula we can get: Where, represents the nonlinear transformation function for finding the V vector in the head attention, || represents the channel splicing operation, BN represents batch normalization, HDT∈R τ×N×d represents the output of the final temporal attention layer; The spatial attention layer calculates weights through a multi-head attention mechanism with physical information, and its formula is as follows: Where, Indicates that at node t i With t j The correlation between time nodes, v represents the monitoring point of the input module; The multi-head graph convolution layer focuses on the traffic flow in different subspaces of the monitoring point, and its formula is as follows: Where, represents the normalized adjacency matrix with self-connection, A vi Represents the node adjacency matrix with self-connections; The output of spatial attention HDS∈R is transformed into τ×N×d The output of multi-head graph convolution HSS∈R τ×N×d Adaptive fusion, its formula is as follows: HST l =We HDS l +(1-W)e HSS l +HST l-1 W=σ(HDS l ⊙HSS l ) Where σ represents the Sigmoid activation function, W∈R T×N×d is the weight vector.

9. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 1, characterized in that: The spatiotemporal physical decoding module in step (4) includes an input with a mask mechanism, an adaptive spatiotemporal joint graph convolution layer, a predefined spatiotemporal joint graph convolution layer and an aggregation gating layer.

10. The traffic flow prediction method based on predefined spatiotemporal joint graph decoding according to claim 9, characterized in that: The implementation process of the adaptive spatiotemporal joint graph convolution layer and the predefined spatiotemporal joint graph convolution layer is as follows: first, a predefined spatiotemporal joint convolution graph is predefined according to the spatiotemporal distance between nodes, and then an adaptive spatiotemporal joint graph is constructed; The predefined spatiotemporal joint graph defines a spatial adjacency matrix based on pairwise road network distances, and its formula is as follows: Where, dist(v i ,,v j ,) indicates site v i, With v j, The shortest travel distance between them, σ represents the standard deviation of travel distance; The spatiotemporal joint graph is constructed by connecting different nodes between two time steps, preserving the comprehensive spatiotemporal correlation. Its formula is as follows: Where k represents the time difference between two time steps, A i,t-k;j,t Represents the time step tk and the node v at t i The edge weight of The adaptive spatiotemporal joint graph convolution is implemented as follows: Where, L t-k;t represents the adaptive adjacency matrix between step size tk and t, represents the updated features at time step t, with b adt Represents learnable weight and bias parameters; The mean square error is used as the model loss function, and the mean absolute error and mean absolute percentage error are used as the final prediction result evaluation indicators. The formula is as follows:

Citation Information

Patent Citations

  • Traffic flow prediction method and system based on trend space-time diagram convolution, and medium

    CN116895157A

  • Multi-modal traffic flow prediction method based on multi-source data feature fusion

    CN119323879A

  • Multi-modal traffic flow prediction method based on dynamic space-time hypergraph and large language model

    CN119942803A

  • Traffic flow forecasting method based on deep graph gaussian processes

    US20230058520A1

Cited By

  • A method and system for road network traffic flow prediction based on a dual-view asynchronous graph

    CN122473938A