A method for predicting urban traffic flow based on Markov clustering graph attention network
By constructing a graph structure for traffic data and using Markov clustering graph attention network and generative adversarial neural network, the shortcomings of existing methods in processing nonlinear traffic data are addressed, and more accurate traffic flow prediction is achieved.
Patent Information
- Application Number
- CN202111521189.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-12-13
AI Technical Summary
Existing traffic data prediction methods cannot effectively handle nonlinear traffic data, and traditional methods cannot dynamically obtain the global spatiotemporal dependencies of the graph.
We employ a Markov clustering graph attention network-based approach. By constructing a graph structure for traffic data, we use a generative adversarial neural network model, combined with an improved graph attention module and an LSTM module, to dynamically obtain the global spatiotemporal dependencies of the graph.
It improves the accuracy of traffic flow prediction, dynamically considers local and global neighbor node information, makes up for the shortcomings of traditional methods in graph structure processing, and enhances the ability to acquire spatial features.
Smart Images

Figure CN114202122B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for predicting urban traffic flow based on Markov clustering graph attention networks, belonging to the field of traffic technology. Background Technology
[0002] With economic development and improved living standards, traffic problems caused by travel have become increasingly serious. The mining and analysis of traffic data has become a hot topic for researchers, and traffic data prediction has also become popular.
[0003] Traditional statistical methods use historical data to predict future trends, such as Autoregressive Integrated Moving Average (ARIMA) and Kalman Filter (KF). However, they cannot handle non-linear traffic data because they assume that future predictions will have the same characteristics as past data. More recently, deep learning-based neural network methods have emerged, such as Graph Convolutional Neural Networks (GCN) for extracting spatial features of graph structure, Long Short-Term Memory Neural Networks (LSTM) for extracting features from time series data, and Graph Attention Neural Networks (GAT) for introducing self-attention mechanisms into graphs and applying them to inductive learning. However, these methods still have limitations. GCN only considers the global structure of the graph and cannot assign different importance to neighboring nodes. GAT can assign different weights to neighboring nodes, but it sacrifices the overall structure of the graph to some extent. Summary of the Invention
[0004] To address the above shortcomings, the technical problem to be solved by this invention is to provide a method for predicting urban traffic flow based on Markov clustering graph attention networks that dynamically acquires the global spatiotemporal dependencies of a graph.
[0005] The present invention adopts the following technical solution:
[0006] This invention relates to a method for predicting urban traffic flow based on Markov clustering graph attention networks, which includes the following steps:
[0007] Step 1: Based on historical traffic data, construct the structure of a time-series graph for the selected area to obtain the corresponding traffic matrix; this includes the following steps:
[0008] 1.1) Constructing graph information: First, divide the selected area into equidistant small plots and use them as nodes of the graph structure. Let the number of nodes be N, and label them sequentially with numbers 1-N.
[0009] 1.2) Obtain the time series traffic matrix: Organize historical traffic data into time series (t1, t2, ..., tt) with time intervals t. n Divide the data according to (t1, t2, ..., t).n For each corresponding traffic data point, obtain the traffic flow value for all plots, and use this value as weights to obtain a time-series traffic flow matrix (n). Let one of the traffic flow matrices be represented as...
[0010] Step 2: Process the time series flow matrix, extract the natural structure information present in the graph, and obtain the spatial feature matrix of the time series; specifically, this includes the following steps:
[0011] 2.1) Processing the time series flow matrix: Based on the idea of random walk, the Markov clustering algorithm is applied to process the time series flow matrix, so that it eventually converges and the naturally existing disconnected regions in the graph are obtained;
[0012] 2.2) Obtain the global correlation node matrix The structure of the result obtained by the Markov clustering algorithm is multiple attracting systems. Each attracting system includes an attracting node and multiple attracted nodes. The matrix representation after convergence is a 0-1 matrix.
[0013] Step 3: Establish a generative adversarial neural network model. Take the time series traffic flow matrix, the global correlation node matrix, and the adjacency matrix A of the graph as inputs, and take the obtained regional predicted traffic flow matrix as output. Train the model and use the trained model as the regional traffic flow prediction model.
[0014] Furthermore, the generative adversarial neural network model includes a generator and a discriminator;
[0015] The generator includes an improved graph attention module and an LSTM module;
[0016] The discriminator includes an LSTM module and a fully connected layer, used to distinguish between real samples and predicted samples generated by the generator. The generator and the discriminator train against each other until the discriminator can no longer distinguish whether the input sample comes from the generator or the real value. At this point, it can be considered that the generator has learned the distribution characteristics of the input sample, and the generated predicted value is used as the output result, that is, the predicted traffic flow matrix of the selected area.
[0017] Furthermore, the calculation formula for dividing the selected area into equidistant small plots in step 1.1 is as follows:
[0018]
[0019]
[0020]
[0021]
[0022] N = column * row (5)
[0023] Where R represents the Earth's radius; change represents the side length of the selected area divided into smaller plots, in meters; Lon_left and Lon_right represent the maximum and minimum longitudes of the selected area, in degrees; ΔLon represents the change in longitude corresponding to the change, and ΔLat represents the change in latitude corresponding to the change, both ΔLon and ΔLat are in radians; Lat_up and Lat_down represent the maximum and minimum latitudes of the selected area; column represents the number of equally spaced smaller plots within the longitude range of the selected area; row represents the number of equally spaced smaller plots within the latitude range of the selected area; and N represents the total number of smaller plots into which the selected area is divided.
[0024] Furthermore, in step 1.2, one of the flow matrices is obtained. The formula is as follows:
[0025]
[0026] in, Indicates the t-th s The flow matrix at time intervals, Q NN This represents the flow rate between two plots of land.
[0027] Furthermore, in step 2.1, the time series flow matrix is processed. The formula is as follows:
[0028]
[0029]
[0030] exp_Mat=Prob_Mat×Prob_Mat (9)
[0031]
[0032] Formula (7): This indicates that the flow matrix obtained in step 1.2 is calculated according to t. s to t n The sum of time series data;
[0033] Formula (8) normalizes Prob_Mat, where: Prob_Mat represents the probability matrix after normalization, i and j represent matrix index subscripts (1≤i≤N), (1≤j≤N), and I represents a diagonal matrix. Consistent with the shape and size of the I matrix;
[0034] Formula (9): exp_Mat is the result of matrix multiplication, and × represents matrix multiplication;
[0035] Formula (10) normalizes inf_Mat, where * represents the Hadamard product, which is the multiplication of elements at corresponding positions in the matrix, and the result has the same shape and size as the original matrix.
[0036] Furthermore, in step 2.2, the global correlation node matrix is obtained. Includes the following steps:
[0037] Step a: Process the time series flow matrix into a normalized probability matrix according to formula (8);
[0038] Step b: Iterate through equations (9) and (10) until the inf_Mat matrix converges.
[0039] Furthermore, the generator first uses an improved graph attention module, which incorporates the information obtained in step 2.2 when calculating the attention matrix. Will The result is used as the condition for determining whether a node is a neighbor node to obtain the attention matrix. Finally, the attention matrix and the flow matrix are used together to obtain the hidden features.
[0040] Furthermore, in step 3, the generator in the generative adversarial neural network inputs the results of the improved graph attention module into the LSTM module to obtain spatial features with time dependence.
[0041] The LSTM module consists of one LSTM layer, and one LSTM layer consists of one cell unit. The specific calculation formula in the cell is as follows:
[0042] f t =σ(W f ·[h t-1 ,x t ]+b f (11)
[0043] i t =σ(W i ·[h t-1 ,x t ]+b i (12)
[0044]
[0045]
[0046] o t =σ(W o ·[ht-1 ,x t ]+b o (15)
[0047] h t =o t *tanh(C t (16)
[0048] Among them, f t W represents the degree to which the forgetting gate is open or closed. f b is the weight parameter for the forget gate. f h is the bias parameter for the forget gate. t-1 x represents the result from the previous moment. t This is the input at this time step; · represents a multiplication operation, [] represents a concatenation operation, and σ is the sigmoid activation function; i t Input the degree of opening or closing of the gate, W i b is the input gate weight parameter. i For the input gate bias parameters, In the old state, W C b is the weight parameter. C The bias parameter tanh is the activation function; o t W represents the degree of opening and closing of the output gate. o b is the output gate weight parameter. o For the output gate bias parameters, * represents the Hadamard product, C t For the new state, h t Output the result for this moment.
[0049] In step 3 of this invention, the discriminator in the generative adversarial neural network uses an LSTM module and a fully connected layer. The calculation formula in the fully connected layer is as follows:
[0050] F = σ(W) F ·output+b F (17)
[0051] Where F represents the result of the fully connected layer; output represents the result of the LSTM module; W F b represents the weight parameters of the fully connected layer. F σ represents the bias parameters of the fully connected layer; σ is the sigmoid activation function.
[0052] Furthermore, the generator and discriminator are trained in an adversarial manner. First, the generator is fixed and the discriminator is trained. Then, the trained discriminator is fixed and the generator is trained. Finally, the generator obtains the predicted value as the traffic flow value for the next time interval predicted by the entire model.
[0053] The technical advantages of this invention are as follows: The method obtains the graph information of the traffic network based on the interactive graph representation of traffic data in step 1, and thereby acquires the time-series traffic matrix; step 2.2 obtains the global relevance node matrix, which takes into account the information of the entire graph structure and uses the idea of random walks to discover the natural structures (disconnected regions) existing within the graph; step 3 uses an improved graph attention module in the generative adversarial neural network to acquire hidden features between nodes and obtain spatial dependencies; the improved graph attention module adds the global relevance node matrix obtained in step 2.2 to the attention value calculated using the adjacency matrix. This not only makes the attention value consider local neighbor node information, but also dynamically considers the neighbor node information of the global structure, compensating for the shortcomings of graph attention networks in abandoning the entire graph structure. The LSTM module is used to process time series data to obtain time dependencies. An improved graph attention module and the LSTM module are used as generators in a generative adversarial network (GAN), and the LSTM module and fully connected layers are used as discriminators in the GAN. Finally, an urban traffic flow prediction model based on a Markov clustering graph attention network is formed. When acquiring spatial hidden features, the improved graph attention module no longer restricts neighboring nodes to only first-order neighboring nodes, but extends to the global relevance node information obtained based on the Markov clustering algorithm. The improved graph attention module of this invention not only focuses on local neighboring nodes, but also dynamically considers the neighboring node information in the overall graph structure, assigning different weights to them, thereby improving the ability to acquire spatial features. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of the generative adversarial neural network structure of the present invention. Detailed Implementation
[0055] The following is in conjunction with the appendix Figure 1 The present invention will be described in detail below.
[0056] like Figure 1 As shown, a method for predicting urban traffic flow based on Markov clustering graph attention networks includes the following steps:
[0057] Step 1: Based on historical traffic data, construct the structure of a time-series graph for the selected area to obtain the corresponding traffic flow matrix; the specific operation is divided into the following steps:
[0058] 1.1) Constructing Graph Information: First, divide the selected area into equidistant small plots, which are used as nodes in the graph structure. Let the number of nodes be N, and label them sequentially from 1 to N. Divide the selected area into 1km*1km small plots, G={N}, where N={N1, N2, ..., N N} represents the set of nodes; the formula for dividing the selected area into equidistant small plots is as follows:
[0059]
[0060]
[0061]
[0062]
[0063] N = column * row (5)
[0064] Where R represents the Earth's radius; change represents the side length of the selected area divided into smaller plots, in meters; Lon_left and Lon_right represent the maximum and minimum longitudes of the selected area, in degrees; ΔLon represents the change in longitude corresponding to the change, and ΔLat represents the change in latitude corresponding to the change, both ΔLon and ΔLat are in radians; Lat_up and Lat_down represent the maximum and minimum latitudes of the selected area; column represents the number of equally spaced smaller plots within the longitude range of the selected area; row represents the number of equally spaced smaller plots within the latitude range of the selected area; and N represents the total number of smaller plots into which the selected area is divided.
[0065] 1.2) Obtain the time series traffic matrix: Organize historical traffic data into time series (t1, t2, ..., t) with time intervals t. n Divide the data into groups based on (t1, t2, ..., t). n For each corresponding traffic data point, obtain the traffic flow value for all plots, and use this value as weights to obtain a time-series traffic flow matrix (n). Let one of the traffic flow matrices be represented as... The formula is as follows:
[0066]
[0067] in, Indicates t s Flow matrix of time intervals, O NN This represents the flow rate between two plots of land.
[0068] Step 2: Process the time series flow matrix, extract the natural structure information present in the graph, and obtain the spatial feature matrix of the time series. The specific operation is divided into the following steps:
[0069] 2.1) Processing the Time Series Flow Matrix: Based on the idea of random walks, the Markov clustering algorithm is applied to process the time series flow matrix, causing it to eventually converge and revealing the naturally occurring disconnected regions in the graph; processing the time series flow matrix The formula is as follows:
[0070]
[0071]
[0072] exp_Mat=Prob_Mat×Prob_Mat (9)
[0073]
[0074] Formula (7): This indicates that the flow matrix obtained in step 1.2 is calculated according to t. s to t n The sum of time series; Formula (8) normalizes Prob_Mat, where: Prob_Mat represents the probability matrix after normalization, i and j represent matrix index subscripts (1≤i≤N), (1≤j≤N), and I represents a diagonal matrix. The shape and size of the matrix are consistent with that of the matrix I; Formula (9): exp_Mat is the result of matrix multiplication, × represents matrix multiplication; Formula (10) normalizes inf_Mat, where: * represents the Hadamard product, that is, the elements at corresponding positions of the matrix are multiplied, and the result is the same as the shape and size of the original matrix.
[0075] 2.2) Obtain the global correlation node matrix The Markov clustering algorithm produces a structure consisting of multiple attracting systems, each containing one attracting node and multiple attracted nodes. The converged matrix is represented as a 0-1 matrix. The global correlation node matrix is then obtained. Includes the following steps:
[0076] Step a: Process the time series flow matrix into a normalized probability matrix according to formula (8);
[0077] Step b: Iterate through operations (9) and (10) until the inf_Mat matrix converges.
[0078] Step 3: Establish a generative adversarial neural network model. Take the time series traffic flow matrix, the global correlation node matrix, and the adjacency matrix A of the graph as inputs, and take the obtained regional predicted traffic flow matrix as output. Train the model and use the trained model as the regional traffic flow prediction model.
[0079] The generative adversarial neural network model includes a generator and a discriminator;
[0080] The generator includes an improved graph attention module and an LSTM module. The improved graph attention module in the generator uses a self-attention mechanism to extract deep spatial features of the predicted region after it is mapped to a graph structure based on the traffic flow matrix. The application of LSTM can better capture the dependencies between time steps with large distances in the time series. The discriminator includes an LSTM module and a fully connected layer to distinguish between real samples and predicted samples generated by the generator. The generator and discriminator train against each other until the discriminator can no longer distinguish whether the input sample comes from the generator or the real value. At this point, it can be considered that the generator has learned the distribution characteristics of the input sample, and the generated predicted value is used as the output result, i.e., the predicted traffic flow matrix of the region.
[0081] The improved graph attention module incorporates the information obtained in step 2.2 when calculating the attention matrix. It doesn't just use the adjacency matrix A of the graph as the criterion for whether a node is an adjacent node, but rather... The result is used as the criterion for determining whether a node is a neighbor to obtain the attention matrix. Finally, the attention matrix and the flow matrix are combined to obtain the hidden features. The result of the improved graph attention module is input into the LSTM module to obtain spatial features with time dependence. The LSTM module consists of one LSTM layer, and one LSTM layer consists of one cell unit. The specific calculation formula in the cell is as follows:
[0082] f t =σ(W f ·[h t-1 x t ]+b f (11)
[0083] i t =σ(W i ·[h t-1 x t ]+b i (12)
[0084]
[0085]
[0086] o t =σ(W o ·[h t-1 x t ]+b o (15)
[0087] h t =o t *tanh(C t (16)
[0088] Formula (11) calculates the degree of opening and closing of the forgetting gate: where, f t W represents the degree of opening and closing of the forget gate (within the range of [0.1]). f b is the weight parameter for the forget gate. f h is the bias parameter for the forget gate. t-1 x represents the result from the previous moment. t The input at this moment, · represents a multiplication operation, [] represents a concatenation operation, and σ is the sigmoid activation function; Formula (12) calculates the degree of opening and closing of the input gate: i t W represents the degree of opening or closing of the input gate (within the range of [0.1]). i b is the input gate weight parameter. i The input gate bias parameters are used; formula (13) calculates the old state of the cell. In the old state, W C b is the weight parameter. C Here, tanh is the bias parameter, and tanh is the activation function; formula (14) calculates the new state of the cell, C t For the new state, * represents the Hadamard product; Formula (15) calculates the opening and closing degree of the output gate: o t W represents the degree of opening or closing of the output gate (within the range of [0.1]). o b is the output gate weight parameter. o The output gate bias parameter is used; formula (16) calculates the output: h t Output the result for this moment.
[0089] The discriminator uses an LSTM module and a fully connected layer. The calculation formula in the fully connected layer is:
[0090] F = σ(W) F ·output+b F (17)
[0091] Where F represents the result of the fully connected layer, output represents the result of the LSTM module, and W... F b represents the weight parameters of the fully connected layer. F σ represents the bias parameters of the fully connected layer, and σ is the sigmoid activation function.
[0092] The steps for obtaining spatial features using the improved graph attention module are as follows:
[0093] The flow matrix Given a flow matrix obtained over a certain time interval, predict the flow matrix for the next time interval using historical data from the previous p time intervals. First, generate the flow matrix for p time intervals. Merge into P∈R N×N×pA three-dimensional tensor is used for feature extraction, where P is the extracted feature dimension, and F is the parameter tensor W∈R. p×F The processed hidden layer feature tensor is X∈R N×N×F (P∈R N×N×p With W∈R p×F The result of tensor multiplication is defined as the parameter matrix a∈R. F×1 X and a∈R F×1 Perform tensor multiplication, then process the result using the LeakyReLU activation function to obtain E (a tensor). Finally, combine the adjacency matrix A with the result from step 2.2. The sum is used to obtain the attention matrix on E. During the calculation, it is also necessary to remove the attention values of disconnected nodes. This invention defines a large negative number γ to remove the attention values of disconnected nodes (if...). E ij No changes, otherwise E ij =γ), standardized using the softmax function, and then the result of tensor multiplication of the final attention matrix with X is used to apply the ELU activation function to obtain the improved graph attention module output value Y∈R. N×N×1 The improved graph attention module's result is used as input to the LSTM module to obtain time dependence. The loss function in the generator is the mean squared error (MSE) between the predicted and actual traffic flow values. The discriminator uses an LSTM module and a fully connected layer, employing a cross-entropy loss function. The discriminator's result represents the probability of classifying the data as true, ultimately used to determine whether it is fake or real. This invention uses root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) to measure the error between the traffic data predictions and actual traffic data values obtained by the model. A certain urban area in Shijiazhuang is divided into 1km*1km small plots, totaling 180, which serve as nodes in the constructed graph structure. The time interval in the time series is set to 30 minutes, and 6 historical time series are selected to predict the traffic flow value for the next time interval. Step 3 generates the improved graph attention module in the generator of the adversarial neural network, with input P∈R 180×180×6 The hidden layer features are extracted with a dimension F of 2, and the output predicted value is Y∈R. N×N×1 The LeakyReLU() activation function has a negative slope of 0.2. The model parameters are optimized using the Adam optimizer with a learning rate of 1e-2 and 200 iterations.
[0094] The method of this invention obtains the graph information of the traffic network through the interactive graph representation of traffic data in step 1, and obtains the time series traffic matrix accordingly; step 2.2 obtains the global relevance node matrix, which takes into account the information of the entire graph structure and uses the idea of random walk to discover the natural structure (disconnected regions) existing in the graph; step 3 uses an improved graph attention module in the generative adversarial neural network to obtain the hidden features between nodes and obtain spatial dependencies; the improved graph attention module adds the global relevance node matrix obtained in step 2.2 to the attention value calculated by the adjacency matrix, which not only takes into account the local neighbor node information, but also dynamically takes into account the neighbor node information of the global structure, making up for the deficiency of graph attention network in abandoning the whole graph structure. The LSTM module is used to process time series data to obtain time dependencies. An improved graph attention module and the LSTM module are used as generators in a generative adversarial network (GAN), and the LSTM module and fully connected layers are used as discriminators in the GAN. Finally, a city traffic flow prediction model based on a Markov clustering graph attention network is formed. When acquiring spatial hidden features, the improved graph attention module no longer restricts neighboring nodes to only first-order neighbors, but extends to the global relevance node information obtained based on the Markov clustering algorithm. The improved graph attention module of this invention not only focuses on local neighboring nodes, but also dynamically considers the neighboring node information in the overall graph structure, assigning different weights to them to improve the ability to acquire spatial features.
[0095] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting urban traffic flow based on Markov clustering graph attention networks, characterized in that, It includes the following steps: Step 1: Based on historical traffic data, construct the structure of a time-series graph for the selected area to obtain the corresponding traffic matrix; this includes the following steps: 1.1) Constructing graph information: First, divide the selected area into equidistant small plots and use them as nodes of the graph structure. Let the number of nodes be N, and label them sequentially with numbers 1-N. 1.2) Obtain the time series traffic matrix: Organize historical traffic data into time series (t1, t2, ..., tt) with time intervals t. n Divide the data according to (t1, t2, ..., t). n For each corresponding traffic data point, obtain the traffic flow value for all plots, and use this value as weights to obtain a time-series traffic flow matrix (n). Let one of the traffic flow matrices be represented as... Obtain one of the traffic matrices The formula is as follows: in, Indicates the t-th s The flow matrix at time intervals, Q NN This represents the flow rate between two plots of land. Step 2: Process the time series flow matrix, extract the natural structure information present in the graph, and obtain the spatial feature matrix of the time series; specifically, this includes the following steps: 2.1) Processing the time series flow matrix: Based on the idea of random walk, the Markov clustering algorithm is applied to process the time series flow matrix, so that it eventually converges and the naturally existing disconnected regions in the graph are obtained; Processing time series flow matrix The formula is as follows: exp_Mat=Prob_Mat×Prob_Mat (9) In formula (7) This indicates that the flow matrix obtained in step 1.2 is calculated according to t. s to t n The sum of time series data; Formula (8) normalizes Prob_Mat, where: Prob_Mat represents the probability matrix after normalization, i and j represent matrix index subscripts (1≤i≤N), (1≤j≤N), and I represents a diagonal matrix. Consistent with the shape and size of the I matrix; Formula (9): exp_Mat is the result of matrix multiplication, and × represents matrix multiplication; Formula (10) normalizes inf_Mat, where: * represents the Hadamard product, that is, the elements at corresponding positions of the matrix are multiplied, and the result has the same shape and size as the original matrix; 2.2) Obtain the global correlation node matrix The structure of the result obtained by the Markov clustering algorithm is multiple attracting systems. Each attracting system includes an attracting node and multiple attracted nodes. The matrix representation after convergence is a 0-1 matrix. Step 3: Establish a generative adversarial neural network model, taking the time series traffic flow matrix, the global correlation node matrix, and the adjacency matrix A of the graph as inputs, and the resulting regional predicted traffic flow matrix as output. Learn and train the model, and use the learned model as the regional traffic flow prediction model. The generative adversarial neural network model includes a generator and a discriminator; The generator includes an improved graph attention module and an LSTM module; The discriminator includes an LSTM module and a fully connected layer, used to distinguish between real samples and predicted samples generated by the generator. The generator and the discriminator train against each other until the discriminator can no longer distinguish whether the input sample comes from the generator or the real value. At this point, it can be considered that the generator has learned the distribution characteristics of the input sample, and the generated predicted value is used as the output result, i.e., the predicted traffic flow matrix of the selected area. The generator first uses an improved graph attention module, which incorporates the information obtained in step 2.2 when calculating the attention matrix. Will The result is used as the criterion for determining whether a node is a neighbor to obtain the attention matrix. Finally, the attention matrix and the flow matrix are combined to obtain the hidden features; the calculation formula in the fully connected layer is: F=σ(W F ·output+b F ) (17) Where F represents the result of the fully connected layer; output represents the result of the LSTM module; W F b represents the weight parameters of the fully connected layer. F σ represents the bias parameters of the fully connected layer; σ is the sigmoid activation function.
2. The urban traffic flow prediction method based on Markov clustering graph attention network according to claim 1, characterized in that, The formula for calculating the division of the selected area into equidistant small plots in step 1.1 is as follows: N = column * row (5) Where R represents the Earth's radius; change represents the side length of the selected area divided into smaller plots, in meters; Lon_left and Lon_right represent the maximum and minimum longitudes of the selected area, in degrees; △Lon represents the change in longitude corresponding to the change, and △Lat represents the change in latitude corresponding to the change, both △Lon and △Lat are in radians; Lat_up and Lat_down represent the maximum and minimum latitudes of the selected area; column represents the number of equally spaced smaller plots within the longitude range of the selected area; row represents the number of equally spaced smaller plots within the latitude range of the selected area; and N represents the total number of smaller plots into which the selected area is divided.
3. The urban traffic flow prediction method based on Markov clustering graph attention network according to claim 1, characterized in that, In step 2.2, the global correlation node matrix is obtained. Includes the following steps: Step a: Process the time series flow matrix into a normalized probability matrix according to formula (8); Step b: Iterate through equations (9) and (10) until the inf_Mat matrix converges.
4. The urban traffic flow prediction method based on Markov clustering graph attention network according to claim 1, characterized in that, In step 3, the generator in the generative adversarial neural network inputs the results of the improved graph attention module into the LSTM module to obtain spatial features with time dependence. The LSTM module consists of one LSTM layer, and one LSTM layer consists of one cell unit. The specific calculation formula in the cell is as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ) (11) i t =σ(W i ·[h t-1 ,x t ]+b i ) (12) the t =σ(W o ·[h t-1 ,x t ]+b o ) (15) h t =o t *fishy(C) t ) (16) Among them, f t W represents the degree to which the forgetting gate is open or closed. f b is the weight parameter for the forget gate. f h is the bias parameter for the forget gate. t-1 x represents the result from the previous moment. t This is the input at this time step; · represents a multiplication operation, [] represents a concatenation operation, and σ is the sigmoid activation function; i t Input the degree of opening or closing of the gate, W i Here, bi represents the input gate weights, and bi represents the input gate biases. In the old state, W C b is the weight parameter. C The bias parameter tanh is the activation function; o t W represents the degree of opening and closing of the output gate. o b is the output gate weight parameter. o For the output gate bias parameters, * represents the Hadamard product, C t For the new state, h t Output the result for this moment.
5. The urban traffic flow prediction method based on Markov clustering graph attention network according to claim 1, characterized in that, The generator and discriminator are trained in an adversarial manner. First, the generator is fixed and the discriminator is trained. Then, the trained discriminator is fixed and the generator is trained. Finally, the generator obtains the predicted value as the traffic flow value for the next time interval predicted by the entire model.
Citation Information
Patent Citations
Traffic flow prediction method based on graph convolution embedded space-time long-short-term memory network
CN112749832A
Road traffic flow prediction method based on graph aggregation mechanism of reconstructed traffic network
CN113129585A