An improved traffic flow prediction method based on aggregated spatiotemporal multi-graph convolutional network
By constructing a multi-graph convolutional network consisting of adaptive graph, spatiotemporal fusion graph and pattern similarity graph, the problem of incomplete capture of spatiotemporal features in existing traffic flow prediction methods is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202410213079.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-02-27
AI Technical Summary
Existing traffic flow prediction methods fail to fully consider the spatiotemporal correlation, heterogeneity and periodicity of traffic data, resulting in insufficient prediction accuracy.
A convolutional network based on aggregated spatiotemporal multi-graphs is constructed to capture various spatiotemporal features of traffic data through adaptive graphs, spatiotemporal fusion graphs, and pattern similarity graphs. Multi-scale temporal convolution modules and self-learning dynamic aggregation layers are used to improve prediction accuracy.
It improves the accuracy of traffic flow prediction, comprehensively captures the spatiotemporal characteristics of traffic data, and enhances the prediction effect.
Smart Images

Figure CN118097948B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation, and specifically relates to an improved traffic flow prediction method based on an aggregated spatiotemporal multi-graph convolutional network. Background Art
[0002] Driven by rapid domestic economic development and urbanization, the smart transportation market is steadily expanding. At the same time, transportation development is facing significant challenges. To effectively alleviate the severe challenges brought about by rapid traffic growth, the Intelligent Transportation System (ITS) has developed a system for traffic data and vehicle control. It uses sensors to capture traffic flow information and utilizes deep learning technology to efficiently address traffic congestion. Traffic flow prediction technology effectively assists in traffic control and reduces the probability of traffic accidents. Therefore, traffic flow prediction methods are an effective way to alleviate traffic pressure.
[0003] Traffic flow prediction methods use historical traffic flow data from a traffic network to predict future traffic flow and other data. The key is that a single traffic graph structure cannot fully reflect the spatiotemporal relationships of traffic data. Traffic data is a nonlinear spatiotemporal network data. Existing research has failed to fully consider: (1) the spatiotemporal correlation of its spatial dependence, which changes dynamically over time; (2) the complex correlations and heterogeneity across both time and space; and (3) the periodicity and regional similarity inherent in this special data.
[0004] In recent years, deep learning-based traffic flow prediction methods have restructured traffic graphs as non-Euclidean structures, or grid structures. Traffic flow at each grid cell is calculated as the traffic flow for each area, and features are extracted from this data through traditional convolution. This approach is simple and clear, but due to the significant differences between real-world road networks and grid structures, it overlooks the complex correlations and heterogeneity of traffic data. Current research is restructuring traffic graphs as Euclidean structures, or graph structures. One approach is based on the spatial domain, focusing on selecting node domains and performing convolution filtering operations on graph nodes and their neighbors. Another approach is based on the frequency domain, utilizing Fourier transforms to implement convolution operations from a signal processing perspective. Current research uses one of these approaches to combine graphs and convolution operations, proposing a graph convolutional neural network. The input and output layers are graph signal data, and the hidden layer performs graph convolution operations by integrating the features and labels of the central node and its neighbors, achieving node clustering or predicting node values. Current research is limited to constructing a single graph structure to capture a certain type of traffic data feature. Considering that the scope and degree of influence of traffic data constantly change with factors such as location, distance, and time, the method of predicting traffic flow by only constructing a single graph is difficult to meet the needs of traffic prediction.
[0005] It can be seen that there is an urgent need to be able to mine the multi-graph structure of complex and deep traffic data, and propose a traffic flow prediction method that constructs a spatiotemporal convolutional network with a multi-graph structure.
[0006] Patent CN114611383A mines the spatial correlation in traffic data by constructing a multi-scale graph, but ignores the spatiotemporal heterogeneity of traffic data in the spatiotemporal dimension and the unique hourly and daily periodicity, and fails to capture the attributes of traffic data, resulting in the prediction accuracy of this method being left to be improved. The present invention improves the capture of traffic data attribute characteristics by supplementing the spatiotemporal fusion graph and the pattern similarity graph. The spatiotemporal fusion graph mainly considers the correlation in the spatiotemporal dimension and the heterogeneity across the spatiotemporal dimension, and fuses the spatial graph matrix A and the correlation matrix A on three consecutive time slices. corr and the heterogeneity matrix A cros Construct fusion matrix A Fus The pattern similarity graph mainly constructs the regional similarity matrix A through Gaussian function and partial autocorrelation coefficient Ds and the periodic similarity matrix A Hs By capturing the attributes of each dimension of traffic data and building a module for capturing the attributes, the prediction effect of the current method can be effectively improved. Summary of the Invention
[0007] The present invention aims to solve the above problems in the prior art. It proposes an improved traffic flow prediction method based on an aggregated spatiotemporal multi-graph convolutional network. The technical solution of the present invention is as follows:
[0008] An improved traffic flow prediction method based on an aggregated spatiotemporal multi-graph convolutional network includes the following steps:
[0009] Step 1: Obtain historical traffic flow data for each node in the traffic network, and perform cleaning, screening, and normalization processing;
[0010] Step 2: Characterize the spatiotemporal characteristics of traffic flow data and construct a data feature enhancement layer;
[0011] Step 3: Analyze the characteristics of traffic flow data, construct the corresponding adaptive graph structure adjacency matrix, spatiotemporal fusion graph structure adjacency matrix, and pattern similarity graph structure adjacency matrix based on the characteristics, and construct a multi-graph convolutional neural network module;
[0012] Step 4: Improve the dilated convolution and construct a multi-scale temporal convolution module, which forms a spatiotemporal convolution layer with the multi-graph convolutional neural network module;
[0013] Step 5: Aggregate the sub-layer outputs of the spatiotemporal convolutional layer, add self-learning units respectively, and construct a self-learning dynamic aggregation layer;
[0014] Step 6: Map the output of the aggregation layer to the shape of the value to be predicted, add a fully connected layer and a global average pooling layer, and construct the output layer;
[0015] Step 7: Input the historical traffic flow data into the data enhancement layer, and the output enters the layers 1 and 2 of the spatiotemporal convolution layer. The final output of the spatiotemporal convolution layer is input into the aggregation layer, and the output of the aggregation layer is input into the output layer to obtain the final result.
[0016] Step 8: Iterate the training, continuously update the learnable parameters, and calculate the model loss function. When the loss function stabilizes at the minimum value, the model training is completed, and the model is used to make the final prediction of the traffic flow data.
[0017] Furthermore, the step 1 is to obtain historical traffic flow data of each node in the traffic network and perform preprocessing, which specifically includes:
[0018] The traffic network graph G = (V, E, A) is composed, where V is the set of nodes that make up the sensor. A single sensor node is represented by v, v∈V, the total number of nodes is represented by N, N=|V|, and the edge set of the traffic network graph G is represented by E, which is used to indicate whether there is connectivity between nodes. is the adjacency matrix of the traffic network graph G, which represents the connectivity relationship of the entire traffic network, as shown in formula (1):
[0019]
[0020] The sensor collects data every five minutes, that is, each sensor contains 288 time slices per day. The data of a node i in one day is represented as Where T is the number of time slices, C is the dimension of traffic data (flow, occupancy and speed), and the traffic data on the traffic network G is expressed as The data were preprocessed by standardizing to zero mean and filling missing values in the data by linear interpolation.
[0021] Furthermore, the step 2 characterizes the spatiotemporal characteristics of traffic flow data and constructs a data feature enhancement layer, specifically including:
[0022] The feature dimension of traffic data is increased to generate a new C-dimensional spatiotemporal feature representation, which is a record of spatial information and time information. A parameterized time embedding matrix is constructed for each time slice of traffic data. Construct a spatial embedding matrix for each node by random initialization Its value is obtained by random initialization method, and the enhanced traffic data is obtained by broadcast mechanism, namely:
[0023]
[0024] Furthermore, step 3 of constructing the corresponding multi-graph structure specifically includes:
[0025] Constructing a self-reinforced learning graph G A =(V,A Adp ,E Adp ), represents the spatial variability, that is, the spatial variability of the traffic network in the spatial dimension that changes over time; among them, the self-learning matrix is constructed Randomly initialize two node embedding matrices E, and then continuously update the parameters through model self-training to solve the invariant spatial correlation under the fixed traffic network graph; inspired by the gated adjustment method in GRU, the adjacency matrix A of the predefined graph and the adjacency matrix A of the adaptive graph are adaptively adjusted through α Adp The influence of; Construct edge weight matrix w i ∈(0,1), giving different weights to the edges between nodes. At the same time, by setting the main diagonal to 1 and the rest to 0, the influence of the node on itself at the next moment is strengthened, and finally the new adjacency matrix of the adaptive graph is obtained.
[0026]
[0027]
[0028] Furthermore, the step 4, which is to learn nonlinear time-dependent features of the output sequence through a multi-scale gated convolution module, includes the following steps:
[0029] A multi-scale temporal convolution module is proposed to capture the features in the temporal dimension from the perspective of local and global information. Two temporal convolution submodules are set, each containing two layers of TCN networks. The convolution kernel sizes are set to 1×2, 1×4 and 1×5, 1×7, and the expansion steps are set to 1×4, 1×2 and 1×1, 1×1. The GRU output of the lth layer is calculated. The formula is as follows:
[0030]
[0031]
[0032] Among them, χ′ G is the input of the current module, i = {1, 2} represents the i-th TCN network, d is the expansion step, d = {1, 2, 4}, f is the convolution kernel, k is the convolution kernel size, k = {2, 4, 5, 7}, and td·k is the jump step.
[0033] Furthermore, the step 5 of constructing the self-learning dynamic aggregation layer specifically includes:
[0034] Through learnable network parameters and The output of the spatiotemporal convolutional layer at time t is obtained as follows:
[0035]
[0036] Furthermore, the step 6 constructs the output layer, which specifically includes:
[0037] The output layer consists of a fully connected layer and a global average pooling layer, which maps the output to a flow value with the same shape as the predicted result. The formula is as follows:
[0038]
[0039] in, represents the parameters of the fully connected layer, represents the parameters of the global average pooling layer, and C′ represents the dimension of the output features of the fully connected layer.
[0040] Furthermore, the step 7 uses real data for iterative training, continuously updates the learnable parameters, and calculates the model loss function. When the loss function stabilizes at the minimum value, the model training is completed, and the mature model is used to predict the real traffic flow data of the traffic network to obtain the prediction accuracy of the model. Specifically, the steps include: step 7-1, model training, using the Adam optimization algorithm to adjust the parameters, and the learning rate is set to 10 -3 , the number of training rounds reaches 200, and the loss function Huber Loss is used, which is defined as follows:
[0041]
[0042] Among them, x i is the true value, is the predicted value, and δ is the threshold used to control the squared error loss range. In step 7-2, model prediction, the first fifty days are used as the training set, and the last nine days are used as the test set. The test set is input into the trained model, and the predicted values are compared with the true values through an evaluation algorithm to determine the model's prediction accuracy. The evaluation metrics used are MAE, MAPE, and RMSE.
[0043] An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network as described in any one of the items is implemented.
[0044] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network as described in any one of the items is implemented.
[0045] The advantages and beneficial effects of the present invention are as follows:
[0046] In response to the problems of incomplete capture of the complex features of traffic data and the single representation of traffic networks in existing research, the present invention proposes a traffic flow prediction method based on a multi-graph convolutional network that aggregates spatiotemporal multi-dimensionality. Starting from the time dimension, space dimension and fused spatiotemporal dimension, the dynamic spatial correlation, spatiotemporal synchronization, spatiotemporal heterogeneity and periodicity of traffic data are explored, and corresponding adaptive graph structures, spatiotemporal fusion graph structures and pattern similarity graph structures are constructed respectively, which comprehensively considers the various spatiotemporal characteristics of traffic flow data and solves the problem of incomplete capture of traffic data properties in current research.
[0047] The main innovation of this invention is to propose a multi-graph aggregation network framework based on the analysis of the potential characteristics of traffic data, which includes an adaptive graph that is not fixed to prior data and is generated through data self-learning, a spatiotemporal fusion graph whose spatial dimension is constantly changing due to the influence of the temporal dimension, and a pattern similarity graph that has periodicity and similarity.
[0048] This invention solves the problems of incomplete capture of traffic flow data features and single traffic network representation in current traffic flow prediction methods. It constructs a prediction method based on a multi-graph convolutional network for traffic data characteristics such as spatiotemporal correlation, heterogeneity across spatiotemporal dimensions, and special periodicity and regional similarity, thereby improving the accuracy of prediction.
[0049] The present invention improves the capture of traffic data attribute features through adaptive graph, spatiotemporal fusion graph and pattern similarity graph. Among them, the adaptive graph combines the static relationship of predefined graph and the dynamic relationship of self-learning graph by introducing gating mechanism. The spatiotemporal fusion graph mainly considers the correlation in spatiotemporal dimension and the heterogeneity across spatiotemporal dimension. By fusing the spatial graph matrix A on three consecutive time slices, the correlation matrix A corr and the heterogeneity matrix A cros Construct fusion matrix A Fus The pattern similarity graph mainly constructs the regional similarity matrix A through Gaussian function and partial autocorrelation coefficient Ds and the periodic similarity matrix A Hs By capturing the attributes of each dimension of traffic data and building a module for capturing the attributes, the prediction effect of the current method can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 1 is a flow chart of an improved traffic flow prediction method using an aggregated multi-graph convolutional network according to a preferred embodiment of the present invention;
[0051] Figure 2 This is the overall network structure diagram of the improved traffic flow prediction method based on the aggregated multi-graph convolutional network proposed in this invention. DETAILED DESCRIPTION
[0052] The following will describe the technical solutions in the embodiments of the present invention in detail with reference to the accompanying drawings. The described embodiments are only a part of the embodiments of the present invention.
[0053] The technical solution of the present invention to solve the above technical problems is:
[0054] Step 1: The present invention uses traffic data from a real traffic network and pre-processes the data as follows:
[0055] Real traffic data from the San Francisco Bay Area in Los Angeles, USA, from January 1 to February 28, 2018, was collected as the actual dataset for this invention. A total of 307 sensors located on 17 roads with a distance of more than 3.5 miles were retained, forming a traffic network graph G = (V, E, A), where V is the set of sensor nodes, c∈V, v represents a sensor node, |V| = N represents the total number of nodes, and E is the edge set of the traffic network graph G, indicating whether there is connectivity between nodes. is the adjacency matrix of the traffic network graph G, which represents the connectivity relationship of the entire traffic network, as shown in formula (1):
[0056]
[0057] The sensor collects data every five minutes, that is, each sensor contains 288 time slices per day. The data of a node i in one day is represented as Where T is the number of time slices, C is the dimension of traffic data (flow, occupancy and speed), and the traffic data on the traffic network G is expressed as The data were preprocessed by standardizing to zero mean and filling missing values in the data by linear interpolation.
[0058] Step 2: Upscale the feature dimension of traffic data to generate a new C-dimensional spatiotemporal feature representation, which is a record of spatial and temporal information. Construct a parameterized time embedding matrix for each time slice of traffic data. Construct a spatial embedding matrix for each node by random initialization Its value is obtained by random initialization method, and the enhanced traffic data is obtained by broadcast mechanism, namely:
[0059]
[0060] Step 3: construct a self-learning graph, a spatiotemporal fusion graph, and a similarity pattern graph for the spatial characteristics of the traffic network and the spatiotemporal characteristics of the traffic data, respectively.
[0061] Step 3-1, specifically propose a self-reinforced learning graph G A =(V,EAdp ,A Adp ), which represents the spatial variability, that is, the spatial variability of the traffic network in the spatial dimension that changes over time. Adp It is a learning graph G A The edge set of , constructs the self-learning matrix The two node embedding matrices E are randomly initialized, and the parameters are continuously updated through model self-training to solve the invariant spatial correlation under the fixed traffic network graph. Inspired by the gated adjustment method in GRU, the adjacency matrix G of the predefined graph and the adjacency matrix A of the adaptive graph are adaptively adjusted through α Adp The influence of; Construct edge weight matrix Indicates the different weights on the node edges. At the same time, by setting the main diagonal to 1 and the rest to 0, the influence of the node on itself at the next moment is strengthened, and finally the new adjacency matrix of the adaptive graph is obtained.
[0062]
[0063]
[0064] Step 3-2, specifically propose a fusion graph G across time and space dimensions F =(V,e Fus ,A Fus ), which indicates spatiotemporal correlation, that is, the current time slice is affected by multiple historical time slices in the time dimension. The fusion graph is designed to fuse the current time slice and the previous two time slices that have an impact on it into one time slice to obtain local spatiotemporal correlation. In the fusion graph time slice, the nodes also include spatiotemporal correlation and uncontrolled heterogeneity. Among them, the fusion matrix Designed as three matrices: spatial graph A at three consecutive time steps (t-2) 、A (t-1) 、A (t) , the correlation adjacency matrix of synchronous changes in time and space dimensions Dynamically changing heterogeneous adjacency matrix across spatiotemporal dimensions Finally, the adjacency matrix A of the fusion graph is obtained Fus ;
[0065]
[0066] Step 3-3, specifically propose a pattern similarity graph G with similarities in different patterns MS =(V,E MS ,A MS ), representing the similarity in units of regions and the periodicity in units of weeks. Construct the pattern similarity matrix A MS , containing the periodic similarity matrix and regional similarity matrix We construct A using the normalized embedding Gaussian function RS To capture the dynamic road network structure, the more similar the traffic patterns of two road sections are, the larger the value will be. The partial autocorrelation coefficient is used to capture the similarity between time periods within a day. At the same time, E MS is the pattern similarity graph G MS The edge set is used to represent the connectivity between nodes.
[0067]
[0068] In steps 3-4, a dynamic convolution module is proposed to capture the spatiotemporal features of the three graphs. The information features of each graph are aggregated in the spatial domain. GLU is used as the activation function. The convolution formula is defined as follows:
[0069]
[0070] Using GLU as the activation function, the convolution operations of the three graphs are defined as follows:
[0071]
[0072]
[0073]
[0074]
[0075] Step 4: The output sequence is passed through a multi-scale gated convolution module to learn nonlinear time-dependent features, which mainly includes the following steps:
[0076] In step 4.1, a multi-scale temporal convolution module is proposed to capture the features in the temporal dimension from the perspective of local and global information. Two temporal convolution submodules are set, each containing two layers of TCN networks. The convolution kernel sizes are set to 1×2, 1×4 and 1×5, 1×7, and the expansion steps are set to 1×4, 1×2 and 1×1, 1×1. The output of the GRU at layer l is calculated. The formula is as follows:
[0077]
[0078]
[0079] Among them, χ′ Gis the input of the current module, i = {1, 2} represents the i-th TCN network, d is the expansion step, d = {1, 2, 4}, f is the convolution kernel, k is the convolution kernel size, k = {2, 4, 5, 7}, td·k is the jump step. Step 5, specifically propose a self-learning dynamic aggregation layer, through the learnable network parameters and The output of the spatiotemporal convolutional layer is obtained as follows:
[0080]
[0081] Step 6: Specifically propose an output layer consisting of a fully connected layer and a global average pooling layer, mapping the output to a flow value with the same shape as the predicted result The formula is as follows:
[0082]
[0083] Step 7: Use real data for iterative training, continuously update the learnable parameters, and calculate the model loss function. When the loss function stabilizes at the minimum value, the model training is completed. Use the mature model to predict real traffic flow data of the traffic network and obtain the model's prediction accuracy, which includes:
[0084] Step 7-1: Model training, using Adam optimization algorithm to adjust parameters, and setting the learning rate to 10 -3 , the number of training rounds reaches 200, and the loss function Huber Loss is used, which is defined as follows:
[0085]
[0086] Among them, x i is the true value, is the predicted value, and δ is the threshold used to control the range of squared error loss.
[0087] Step 7-2: Model prediction. The first fifty days serve as the training set, and the last nine days serve as the test set. The test set is fed into the trained model, and the predicted values and the true values are evaluated using an algorithm to determine the model's prediction accuracy. The evaluation metrics used are MAE, MAPE, and RMSE. Compared to current mainstream models, the proposed model performs well in most metrics, demonstrating its effectiveness.
[0088] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0089] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0090] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0091] The above embodiments should be understood as merely illustrating the present invention and not as limiting the scope of protection of the present invention. After reading the contents of the present invention, technicians may make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. An improved traffic flow prediction method based on aggregated spatiotemporal multi-graph convolutional network, characterized by: The following steps are involved: Step 1: Obtain historical traffic flow data for each node in the traffic network, and perform cleaning, screening, and normalization processing; Step 2: Characterize the spatiotemporal characteristics of traffic flow data and construct a data feature enhancement layer; Step 3: Analyze the characteristics of traffic flow data, construct the corresponding adaptive graph structure adjacency matrix, spatiotemporal fusion graph structure adjacency matrix, and pattern similarity graph structure adjacency matrix based on the characteristics, and construct a multi-graph convolutional neural network module; Step 4: Improve the dilated convolution and construct a multi-scale temporal convolution module, which forms a spatiotemporal convolution layer with the multi-graph convolutional neural network module; Step 5: Aggregate the sub-layer outputs of the spatiotemporal convolutional layer, add self-learning units respectively, and construct a self-learning dynamic aggregation layer; Step 6: Map the output of the aggregation layer to the shape of the value to be predicted, add a fully connected layer and a global average pooling layer, and construct the output layer; Step 7: Input the historical traffic flow data into the data enhancement layer, and the output enters the layers 1 and 2 of the spatiotemporal convolution layer. The final output of the spatiotemporal convolution layer is input into the aggregation layer, and the output of the aggregation layer is input into the output layer to obtain the final result. Step 8: Iterate the training, continuously update the learnable parameters, and calculate the model loss function. When the loss function stabilizes at the minimum value, the model training is completed and the model is used to predict traffic flow data. The step 4 comprises the following steps: A multi-scale temporal convolution module is proposed to capture the features in the temporal dimension from the perspective of local and global information. Two temporal convolution submodules are set, each containing two layers of TCN networks. The convolution kernel sizes are set to 1×2, 1×4 and 1×5, 1×7, and the expansion steps are set to 1×4, 1×2 and 1×1, 1×1. The output of the i-th GTU of the l-th layer is calculated. The formula is as follows: Among them, χ′ G is the input of the current module, i = {1, 2} represents the i-th TCN network, d is the expansion step, d = {1, 2, 4}, f(k) is the convolution kernel, k is the convolution kernel size, k = {2, 4, 5, 7}, and td·k is the jump step.
2. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 1 is characterized in that: The step 1 comprises: The traffic network graph G = (V, E, A) is composed, where V is the set of nodes that make up the sensor. A single sensor node is represented by v, v∈V, the total number of nodes is represented by N, N=|V|, and the edge set of the traffic network graph G is represented by E, which is used to indicate whether there is connectivity between nodes. is the adjacency matrix of the traffic network graph G, which represents the connectivity relationship of the entire traffic network, as shown in formula (1): The sensor collects data every five minutes, that is, each sensor contains 288 time slices per day. The data of a node i in one day is represented as Where T is the number of time slices, C is the dimension of traffic flow data, and traffic flow data includes flow rate, occupancy rate and speed. The traffic flow data on the traffic network G is expressed as The data were preprocessed by standardizing to zero mean and filling missing values in the data by linear interpolation.
3. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 2 is characterized in that: Step 2 characterizes the spatiotemporal characteristics of traffic flow data and constructs a data feature enhancement layer, specifically including: The feature dimension of traffic flow data is upgraded to generate a new C-dimensional spatiotemporal feature representation, which is a record of spatial information and time information, and a parameterized time embedding matrix is constructed for traffic flow data on each time slice. Construct a spatial embedding matrix for each node by random initialization Its value is obtained by random initialization method, and the enhanced traffic flow data is obtained by broadcast mechanism, namely:
4. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 3 is characterized in that: The step 3 comprises: (1) Constructing a self-reinforced learning graph G A =(V,E Adp ,A Adp ), which represents the spatial variability, that is, the spatial variability of the traffic network in the spatial dimension that changes over time; where E Adp It is a learning graph G A The edge set of , constructs the self-learning matrix Randomly initialize two node embedding matrices E, and continuously update the parameters through model self-training to solve the invariant spatial correlation under the fixed traffic network graph; inspired by the gated adjustment method in GRU, the adjacency matrix A of the predefined graph and the adjacency matrix A of the adaptive graph are adaptively adjusted through α Adp The influence of; Construct edge weight matrix Represents different weights on the node edges. At the same time, by setting the main diagonal to 1 and the rest to 0, the influence of the node on itself at the next moment is strengthened, and finally the new adjacency matrix of the adaptive graph is obtained. YOUR Adp =softmax(ReLU(EE T )), (2) Constructing a fusion graph G across time and space dimensions F =(V,E Fus ,A Fus ), indicating spatiotemporal correlation, that is, the current time slice is affected by multiple historical time slices in the time dimension; where E Fus is the fusion graph G F edge set, construct the fusion matrix Contains three matrices: spatial graph A at three consecutive time steps (t-2) 、A (t-1) 、A (t) , the correlation adjacency matrix of synchronous changes in time and space dimensions Dynamically changing heterogeneous adjacency matrix across spatiotemporal dimensions Finally, the adjacency matrix A of the fusion graph is obtained Fus ; (3) Construct a pattern similarity graph G that has similarities in different patterns MS =(V,E MS ,A MS ), which represents the similarity in terms of region and the periodicity in terms of time; where E MS is the pattern similarity graph G MS edge set, constructing a pattern similarity matrix Contains regional similarity matrix and periodic similarity matrix A Ds By constructing the normalized embedded Gaussian function, A Hs The learning parameters can be obtained through the partial autocorrelation coefficient It is used to adjust the influence of the two similarities and finally obtain the adjacency matrix A of the pattern similarity graph. MS ; (4) Specifically, a dynamic convolution module is proposed to capture the spatiotemporal features of the three graphs. The information features of each graph are aggregated in the spatial domain. GLU is used as the activation function. The convolution formula is defined as follows:
5. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 1 is characterized in that: The step 5 of constructing the self-learning dynamic aggregation layer specifically includes: Through learnable network parameters and The output of the spatiotemporal convolutional layer at time t is obtained as follows:
6. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 5 is characterized in that: The step 6 constructs the output layer, specifically including: The output layer consists of a fully connected layer and a global average pooling layer, which maps the output to a flow value with the same shape as the predicted result. The announcement is as follows: in, represents the parameters of the fully connected layer, represents the parameters of the global average pooling layer, and C′ represents the dimension of the output features of the fully connected layer.
7. The improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network according to claim 5 is characterized in that: Step 8 uses real data for iterative training, continuously updates the learnable parameters, and calculates the model loss function. When the loss function stabilizes at the minimum value, the model training is completed. The mature model is used to predict the real traffic flow data of the traffic network to obtain the prediction accuracy of the model, which specifically includes: Step 7-1: Model training, using Adam optimization algorithm to adjust parameters, and setting the learning rate to 10 -3 , the number of training rounds reaches 200, and the loss function Huber Loss is used, which is defined as follows: Among them, x i is the true value, is the predicted value, δ is the threshold used to control the square error loss range; Step 7-2, model prediction, the first fifty days are used as the training set, and the last nine days are used as the test set. The test set is input into the trained model. The predicted value and the true value are evaluated by the algorithm to obtain the prediction accuracy of the model. The evaluation indicators use three indicators: MAE mean absolute error, MAPE mean absolute percentage error and RMSE root mean square error.
8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network as claimed in any one of claims 1 to 7 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the improved traffic flow prediction method based on the aggregated spatiotemporal multi-graph convolutional network as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Multi-scale traffic flow prediction method based on graph convolutional neural network
CN112767682A
Urban traffic flow prediction method for aggregating multi-scale space-time similar information
CN114611814A