CN114267170A - Traffic flow prediction method based on graph space-time transform model considering human mobility - Google Patents

Traffic flow prediction method based on graph space-time transform model considering human mobility Download PDF

Info

Publication number
CN114267170A
CN114267170A CN202111140879.6A CN202111140879A CN114267170A CN 114267170 A CN114267170 A CN 114267170A CN 202111140879 A CN202111140879 A CN 202111140879A CN 114267170 A CN114267170 A CN 114267170A
Authority
CN
China
Prior art keywords
traffic
data
graph
time
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111140879.6A
Other languages
Chinese (zh)
Inventor
孔祥杰
赵振振
沈国江
熊海涛
刘娜利
刘志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202111140879.6A priority Critical patent/CN114267170A/en
Publication of CN114267170A publication Critical patent/CN114267170A/en
Pending legal-status Critical Current

Links

Images

Abstract

A traffic flow prediction method based on a spatio-temporal transform model considering human mobility. The method comprises the following steps: 1) data collection: the method adopts real traffic data sets of different areas in the United states, and obtains data required by an experiment after screening, extracting and preprocessing; 2) spatial feature extraction: designing multi-view graph convolution to reveal different behavior modes of people hidden in traffic data, thereby showing an invisible graph structure in the traffic data and fully mining cross-road network characteristics on a space; 3) time characteristic extraction: performing time feature extraction by using a Transformer network with a multi-head attention mechanism; 4) constructing a model: combining time and space characteristics to construct a map space-time Transformer model for traffic flow prediction; 5) data set verification: the performance evaluation method adopts a real world traffic data set to carry out performance evaluation on the graph space-time Transformer model, finally determines the effectiveness of the graph space-time Transformer model, and is used for traffic flow prediction. Experiments show that the invention has excellent performance for treating similar problems.

Description

Traffic flow prediction method based on graph space-time transform model considering human mobility
Technical Field
The invention relates to the fields of artificial intelligence and data mining, in particular to a method for accurately predicting traffic flow and guiding the construction of an intelligent traffic system in a city.
Background
With the rapid development of economy and information technology, the problems of traffic jam, environmental pollution, resource allocation and the like are brought about by the continuously improved modern life of people and the continuously increased automobile holding capacity, the construction of an intelligent traffic system is urgent, and the problems are difficult to solve because the road information is not fully sensed in the past. Nowadays, due to the maturity of various sensor technologies and cloud computing services, the running state of a road vehicle can be accurately sensed, and then the average speed of a road is estimated. These accurate city big data provide new possibilities and ideas for solving these problems. The traffic information of the road surface is accurately predicted by using urban big data and an advanced artificial intelligence technology, so that valuable information references are provided for urban managers and planners, the traffic control capacity and the service efficiency are improved, the traveling experience of urban residents is optimized, and the problems and challenges encountered in urban development can be better handled. Meanwhile, the construction and development of a distributed platform and cloud computing also technically enable the capability of processing the large-scale urban data.
Data mining is a process that combines multiple techniques, such as artificial intelligence, machine learning, pattern recognition, statistics, databases, etc., to reveal implicit, previously unknown, and potentially valuable information from large amounts of data. There is now a lot of data that can be widely used, and there is an urgent need to convert these data into useful information and knowledge for guiding various fields such as city planning, market analysis and scientific exploration.
The timely and accurate traffic flow prediction can better establish an intelligent traffic system, provide accurate traffic information for urban residents, and bring excellent travel experience. However, due to the mobility of humans, people have different patterns of behavior on different days. People are more likely to drive from residential areas to work areas on weekdays, and prefer to go from residential areas to leisure areas such as parks, places of interest, or shopping malls on weekends, which results in people selecting different roads to reach destinations. Therefore, traffic flow shows strong cross-road network characteristics in terms of space. On the other hand, the traffic information is generated not only in relation to the previous time but also in relation to a period of history, but the data inputted in time series cannot directly represent the internal relation in different time scales, in other words, the traffic flow in different times has different influences on the traffic flow in the future, and therefore, the traffic flow shows a strong random disturbance characteristic in time. The urban traffic information data reflects different behaviors of urban residents from the side, people can characterize the mobility of people hidden in the traffic data by using a data mining method, and then the dynamic space-time traffic data is accurately modeled, so that new opportunities are brought to the construction of an intelligent traffic system.
Disclosure of Invention
The present invention is to overcome the above disadvantages of the prior art, and provides a traffic flow prediction method based on a spatiotemporal transform model considering human mobility.
The invention is just applying artificial intelligence method to model the traffic information data in the city. And the urban traffic flow is predicted, the change of the urban road in a period of time in the future can be mastered, the running state of the city is known, the traffic control efficiency is further improved, and the method has important practical significance for building an intelligent traffic system.
The invention achieves the aim through the following technical scheme: the traffic flow prediction method based on the graph space-time Transformer model considering human mobility is characterized by comprising the following steps of:
(1) regarding the road sensor nodes as graph nodes, regarding traffic information on the sensors as node attributes, representing the traffic information by graph structure data, and defining problems;
(2) modeling a plurality of behavior modes hidden in traffic information, and mining cross-road network characteristics of traffic data on the space by applying a multi-view graph convolution neural network (GCN) model;
(3) combining the characteristics obtained in the step (2), performing time characteristic representation on traffic information by using a Transformer neural network, and capturing the random disturbance of traffic data in time so as to determine a graph space-time Transformer model for traffic flow prediction;
(4) combining the space-time characteristics obtained in the step (3), carrying out experimental verification on real traffic data sets in two different areas, and finally determining the effectiveness of the graph space-time transform model;
(5) and (4) adopting the graph space-time transform model determined in the step (4) for traffic flow prediction.
Further, the step (1) specifically comprises the following steps:
1a) normalizing the original traffic data, and representing a road network by G-V, E and W, wherein V represents all road sets, E represents an edge set, and W represents the connection between nodes;
1b) counting the traffic data of different roads by five minutes, and expressing the traffic data as a characteristic matrix of nodes
Figure BDA0003283872300000021
h represents the length of the historical time, and N represents the number of nodes;
1c) given a road network G, a feature matrix
Figure BDA0003283872300000022
Aiming at finding a mapping function capable of learning spatiotemporal features from historical traffic information
Figure BDA0003283872300000023
Enabling it to predict the next traffic information.
Further, the step (2) specifically comprises the following steps:
2a) carrying out behavior mode division according to the traffic data obtained by statistics in the step (1), wherein people have different activity tracks on working days and rest days, so that the data are divided into two types according to the working days and the rest days, and the behavior mode hidden in the traffic information is represented;
2b) combining the data divided in the step (2a), calculating the traffic information similarity by using a Pearson correlation coefficient, wherein for the traffic information vector U, V of any two roads, the calculation formula is as follows:
Figure BDA0003283872300000031
wherein
Figure BDA0003283872300000032
Figure BDA0003283872300000033
The mean of the feature vectors is represented. Finally, a matrix A representing the similarity of any two road traffic information is obtained, and the more similar the two road traffic information is, the more consistent the behavior patterns of people are;
2c) for any two road nodes v, according to the physical characteristics of the road network itselfi,vjThe weights are expressed as follows:
Figure BDA0003283872300000034
where θ represents the standard deviation of the data, dist (v)i,vj)2Representing the distance between any two nodes. Finally, obtaining a matrix D representing the physical characteristics of the road network;
2d) combining the plurality of feature matrices obtained in the steps (2b) and (2c), and characterizing different behavior patterns by using a GCN model, wherein a fast convolution formula on the graph structure data is as follows:
Figure BDA0003283872300000035
wherein
Figure BDA0003283872300000036
INRepresenting a unit matrix, D is a degree matrix D ═ ΣjAij,λmaxIs LsysMaximum eigenvalue of the matrix, Tk(. cndot.) denotes a Chebyshev polynomial of order k. θ represents a vector of chebyshev coefficients. Meanwhile, the parameter vector is optimized by utilizing the neural network, and the layer-wise graph convolution neural network is adopted to extract the characteristics. The formula is as follows:
Hl+1=σ(gθHlWl+bl) (4)
wherein HlRepresenting the output of the neural network with residual structure, gθThe constant term can be obtained by calculation, the parameter term to be optimized is optimized by the neural network parameters, and finally the spatial feature embedded vector representation of the traffic information data can be obtained.
Further, the step (3) specifically comprises the following steps:
3a) constructing an attention query vector Q, a key vector K and a value vector V by adopting linear projection in combination with the spatial feature representation obtained in the step (2);
Q=ZWQ,K=ZWK,V=ZWV (5)
3b) using the scaled dot product function as the calculation of the attention mechanism fraction, and combining the query vector Q, the key vector K, and the value vector V with different linear projections to construct a plurality of attention functions, forming a multi-headed attention mechanism.
MultiHead=Concat(head1,…,headn)WO (6)
Wherein
Figure BDA0003283872300000041
The scaled dot product function of the attention mechanism fractional computation can be expressed as
Figure BDA0003283872300000042
3c) And (3) combining the multi-head attention representation obtained in the step (3b), constructing a two-layer feedforward neural network, and adding residual connection to relieve the problem of gradient disappearance under a deep network.
FFN=Wσ(WX+b)+b (7)
Where σ denotes the activation function, W and b denote learnable network parameters;
3d) building an encoder module and a decoder module by combining the step (3b) and the step (3c), stacking the plurality of encoder modules and the decoder module, and building a Transformer neural network for extracting the time characteristics of the traffic data;
3e) combining the step (2) and the step (3d), and combining the space-time characteristics to construct a map space-time transform model for traffic flow prediction.
Further, the step (4) specifically includes the following steps:
4a) and (3) combining the traffic data space characteristics extracted in the step (2) and the traffic data time characteristics extracted in the step (3), constructing a loss function, and training a graph space-time Transformer model and optimizing parameters.
Figure BDA0003283872300000043
Wherein N represents the number of samples, YiAnd
Figure BDA0003283872300000044
representing a real traffic information value and a predicted traffic information value;
4b) the traffic prediction problem is a classical regression problem. Therefore, in order to evaluate the prediction performance of the model, the Mean Absolute Error (MAE), the Mean Absolute Percentage Error (MAPE), and the Root Mean Square Error (RMSE) were selected as indicators. For MAE, RMSE and MAPE indices, smaller values indicate better prediction performance;
Figure BDA0003283872300000045
Figure BDA0003283872300000046
Figure BDA0003283872300000051
4c) inputting the real traffic data sets of two different regions into the model, training in a batch processing mode, and observing the performance of the model. Finally, a graph space-time Transformer model with the characteristic traffic data space characteristics and time trends can be obtained and applied to traffic flow prediction;
the innovation of the invention is that:
(1) a traffic prediction framework considering human mobility is provided, and the traffic data can be found out in cross-road network characteristics in space and random disturbance characteristics in time.
(2) Different adjacent matrixes under multiple views are constructed to reveal a graph structure which cannot be seen by traffic data, and a Transformer network is applied to simulate a time trend.
(3) Experimental validation was performed on two real traffic data sets in the united states.
The invention has the advantages that:
(1) and carrying out display modeling on different behavior modes hidden in the traffic data, and directly connecting nodes which are logically related to each other.
(2) The method does not strictly depend on data input according to time sequence, gives different weights to traffic flow at different time by multi-head attention, and better represents the time dynamics of traffic data.
Drawings
FIG. 1 is an overall flow chart of the present invention.
FIG. 2 is a flow chart of a multi-view convolutional neural network model used in the present invention.
FIG. 3 is a flow chart of a Transformer neural network model used in the present invention.
FIGS. 4(a) -4 (d) are graphs of results of different filter sizes in the example of METR-LA data set of the present invention, where FIG. 4(a) is a graph of the variation of training set loss function of spatio-temporal Transformer model at different filter sizes, FIG. 4(b) is a graph of the variation of validation set loss function of spatio-temporal Transformer model at different filter sizes, FIG. 4(c) is a graph of the variation of model evaluation indicator RMSE of spatio-temporal Transformer model at different filter sizes, and FIG. 4(d) is a graph of the variation of test set loss function of spatio-temporal Transformer model at different filter sizes.
Fig. 5(a) -5 (d) are graphs showing results of different behavior patterns in the example of the METR-LA data set according to the present invention, wherein fig. 5(a) is a graph showing the variation of the training set loss function of the spatio-temporal Transformer model in different behavior patterns, fig. 5(b) is a graph showing the variation of the verification set loss function of the spatio-temporal Transformer model in different behavior patterns, fig. 5(c) is a graph showing the variation of the test set loss function of the spatio-temporal Transformer model in different behavior patterns, and fig. 5(d) is a graph showing the variation of the model evaluation indicator RMSE of the spatio-temporal Transformer model in different behavior patterns.
Fig. 6(a) to fig. 6(d) are result graphs of different training cycles in the example of the METR-LA dataset according to the present invention, where fig. 6(a) is a result graph of a change in a real value and a predicted value in the METR-LA dataset when the spatio-temporal Transformer model is trained for 1 cycle, fig. 6(b) is a result graph of a change in a real value and a predicted value in the METR-LA dataset when the spatio-temporal Transformer model is trained for 15 cycles, fig. 6(c) is a result graph of a change in a real value and a predicted value in the METR-LA dataset when the METR-LA dataset model is trained for 30 cycles, and fig. 6(d) is a result graph of a change in a real value and a predicted value in the METR-LA dataset when the METR-spatio-temporal Transformer model is trained for 50 cycles.
FIGS. 7(a) -7 (d) are graphs of results of different filter sizes in the example of the PEMS-BAY dataset according to the present invention, where FIG. 7(a) is a graph of the variation of the training set loss function of the spatio-temporal Transformer model at different filter sizes, FIG. 7(b) is a graph of the variation of the validation set loss function of the spatio-temporal Transformer model at different filter sizes, FIG. 7(c) is a graph of the variation of the test set loss function of the spatio-temporal Transformer model at different filter sizes, and FIG. 7(d) is a graph of the variation of the model evaluation indicator RMSE of the spatio-temporal Transformer model at different filter sizes.
Fig. 8(a) -8 (d) are graphs showing results of different behavior patterns in the example of the PEMS-BAY data set according to the present invention, wherein fig. 8(a) is a graph showing the variation of the training set loss function of the spatio-temporal Transformer model in different behavior patterns, fig. 8(b) is a graph showing the variation of the verification set loss function of the spatio-temporal Transformer model in different behavior patterns, fig. 8(c) is a graph showing the variation of the test set loss function of the spatio-temporal Transformer model in different behavior patterns, and fig. 8(d) is a graph showing the variation of the model evaluation indicator RMSE of the spatio-temporal Transformer model in different behavior patterns.
Fig. 9(a) to 9(d) are result graphs of different training cycles in the example of the PEMS-BAY dataset according to the present invention, where fig. 9(a) is a result graph of changes of real values and predicted values in the PEMS-BAY dataset when the spatio-temporal Transformer model is trained for 1 cycle, fig. 9(b) is a result graph of changes of real values and predicted values in the PEMS-BAY dataset when the spatio-temporal Transformer model is trained for 15 cycles, fig. 9(c) is a result graph of changes of real values and predicted values in the PEMS-BAY dataset when the spatio-temporal Transformer model is trained for 30 cycles, and fig. 9(d) is a result graph of changes of real values and predicted values in the PEMS-BAY dataset when the spatio-temporal Transformer model is trained for 50 cycles.
Detailed Description
The invention is further described below in connection with examples of traffic flow predictions in los angeles and california, usa.
The overall framework of the traffic flow prediction method in this example is shown in fig. 1, and specifically includes the following steps:
(1) the statistics of the data set used in the present invention are as follows:
METR-LA the traffic data set contains the traffic speeds of 207 road sensors on the los Angeles expressway, USA. Furthermore, the readings of all sensors deployed on the road are summarized into a 5 minute window. We used data from 4/2/2012 to 5/31/2012 with a total of 17,280 time slices of 5 minutes per sensor.
PEMS-BAY the traffic data set is from the California department of transportation (Caltrans) Performance measurement System (PeMS). It contains the traffic speed of 325 road sensors in the bay. In addition, the readings of all sensors deployed on the road are also aggregated into a 5 minute window. We used data from 3/6/2017 to 4/30/2017 with 16,128 total 5 minute timeslices for each sensor.
(2) Taking traffic speed as an example, dividing data of two regions into two categories of working days and resting days according to time, and constructing a multi-view structure adjacency matrix, wherein the method specifically comprises the following steps:
a) physical road network distance matrix:
for any two roads vi,vjAnd a certain distance is formed between the real road networks, and the distance is coded to represent the geometric association relationship between the real road networks. The calculation is carried out by using a threshold Gaussian kernel function, and the calculation formula is as follows:
Figure BDA0003283872300000071
the closer the physical distance between the two road sections is, the larger the value of the Gaussian kernel function is, and finally, a road network distance matrix D representing any two road sections is obtained, the threshold value is set to be 0.1, and the size of the matrix is n multiplied by n.
b) A weekday and weekday similarity matrix:
traffic information is the result of human activity, and people take different modes of activity on different days. Therefore, we classify the data into two categories according to weekday and weekend. Then, we analyze the correlation between the road sensors by using the threshold Pearson correlation, and for the traffic information vector U, V of any two roads, the calculation formula is as follows: .
Figure BDA0003283872300000072
The more similar the traffic information of the two road sections is, the larger the value of the Pearson correlation coefficient is, the more similar the behavior patterns of people on the road sections are, and finally, a similarity matrix A representing the working day and the rest day of any two road sections is obtained, the threshold value is set to be 0.6, and the size of the similarity matrix is n multiplied by n.
(3) After the multi-view adjacency matrix is constructed, a GCN model is needed to aggregate node features through edge characteristics, and a new node representation is generated, wherein the adopted GCN model has the following formula:
Hl+1=σ(gθHlWl+bl) (4)
wherein HlRepresenting the output of the neural network with residual structure, gθThe constant term can be obtained by calculation, the parameter term to be optimized is optimized by the neural network parameters, and finally the spatial feature embedded vector representation of the traffic information data can be obtained.
And new nodes generated by GCN models under different views are fused, and the connection relation between the nodes is dynamically adjusted through a neural network, so that an adjacency matrix with more beneficial connections is generated, and the method has important significance for representing the cross-road network spatial characteristics of traffic data.
(4) After the GCN extracts the characteristics, a Transformer network is adopted, and the method specifically comprises the following steps:
a) construct the query vector Q, key vector K, and value vector V of attention using linear projection.
Q=ZWQ,K=ZWK,V=ZWV (5)
b) Using the scaled dot product function as the calculation of the attention mechanism fraction, and combining the query vector Q, the key vector K, and the value vector V with different linear projections to construct a plurality of attention functions, forming a multi-headed attention mechanism.
MultiHead=Concat(head1,…,headn)WO (6)
Wherein
Figure BDA0003283872300000081
The scaled dot product function of the attention mechanism fractional computation can be expressed as
Figure BDA0003283872300000082
c) And constructing two layers of feedforward neural networks, and adding residual connection to relieve the problem of gradient disappearance under a deep network.
FFN=Wσ(WX+b)+b (7)
Where σ denotes the activation function and W and b denote learnable network parameters.
d) Combining the step (b) and the step (c) to construct an encoder module and a decoder module, overlapping a plurality of encoder modules and decoder modules to construct a transform neural network, extracting time characteristics of traffic data, and finally combining GCN models in different views to determine a map space-time transform model for traffic flow prediction
(5) Graph spatiotemporal Transformer model performance evaluation was performed on two real traffic data sets:
a) different filter sizes, in experiments we found the filter size of the Transformer network to be very important. Therefore, to obtain the best performance for each data set, we selected the number of filter sizes of the transform network from [128,256,512,1024,2048], and analyzed the variation in prediction accuracy. The training loss, validation loss, test loss, and RMSE for the METR-LA and PEMS-BAY datasets are shown in fig. 4 and 7, respectively.
b) Different behavior patterns, modeling different behavior patterns caused by human movement and inputting the different behavior patterns into the multi-view graph convolutional network, and hopefully, mining spatial features of the cross-road network. Therefore, to more intuitively illustrate the effectiveness and necessity of multiple behavioral patterns, we have eliminated the weekday pattern and weekend pattern modules from the method. The results of the ablation experiments for the METR-LA and PEMS-BAY datasets are shown in FIGS. 5 and 8, respectively.
c) Different training periods, in order to better understand the traffic prediction results, we visualize the prediction results of the proposed method. We compare the predicted traffic speed values for different training sessions with the ground truth values on these two data sets, and the experimental results are shown in fig. 6 and fig. 9, respectively.

Claims (5)

1. The traffic flow prediction method based on the graph space-time Transformer model considering human mobility comprises the following steps:
(1) regarding the road sensor nodes as graph nodes, regarding traffic information on the sensors as node attributes, representing the traffic information by graph structure data, and defining problems;
(2) modeling a plurality of behavior modes hidden in traffic information, and mining cross-road network characteristics of traffic data on the space by applying a multi-view graph convolution neural network (GCN) model;
(3) combining the characteristics obtained in the step (2), performing time characteristic representation on traffic information by using a Transformer neural network, and capturing the random disturbance of traffic data in time so as to determine a graph space-time Transformer model for traffic flow prediction;
(4) combining the space-time characteristics obtained in the step (3), carrying out experimental verification on real traffic data sets in two different areas, and finally determining the effectiveness of the graph space-time transform model;
(5) and (4) adopting the graph space-time transform model determined in the step (4) for traffic flow prediction.
2. The traffic flow prediction method based on a spatiotemporal Transformer model considering human fluidity according to claim 1, characterized in that: the step (1) specifically comprises the following steps:
1a) normalizing the original traffic data, and representing a road network by G-V, E and W, wherein V represents all road sets, E represents an edge set, and W represents the connection between nodes;
1b) counting the traffic data of different roads by five minutes, and expressing the traffic data as a characteristic matrix of nodes
Figure FDA0003283872290000011
h represents the length of the historical time, and N represents the number of nodes;
1c) given a road network G, a feature matrix
Figure FDA0003283872290000012
Aiming at finding a mapping function capable of learning spatiotemporal features from historical traffic information
Figure FDA0003283872290000013
Enabling it to predict the next traffic information.
3. The traffic flow prediction method based on a spatiotemporal Transformer model considering human fluidity according to claim 1, characterized in that: the step (2) specifically comprises the following steps:
2a) carrying out behavior mode division according to the traffic data obtained by statistics in the step (1), wherein people have different activity tracks on working days and rest days, so that the data are divided into two types according to the working days and the rest days, and the behavior mode hidden in the traffic information is represented;
2b) combining the data divided in the step (2a), calculating the traffic information similarity by using a Pearson correlation coefficient, wherein for the traffic information vector U, V of any two roads, the calculation formula is as follows:
Figure FDA0003283872290000021
wherein
Figure FDA0003283872290000022
The mean of the feature vectors is represented. Finally, a matrix A representing the similarity of any two road traffic information is obtained, and the more similar the two road traffic information is, the more consistent the behavior patterns of people are;
2c) for any two road nodes v, according to the physical characteristics of the road network itselfi,vjThe weights are expressed as follows:
Figure FDA0003283872290000023
where θ represents the standard deviation of the data, dist (v)i,vj)2Representing the distance between any two nodes. Finally obtaining the physical characteristics of the characterized road networkA characterized matrix D;
2d) combining the plurality of feature matrices obtained in the steps (2b) and (2c), and characterizing different behavior patterns by using a GCN model, wherein a fast convolution formula on the graph structure data is as follows:
Figure FDA0003283872290000024
wherein
Figure FDA0003283872290000025
INRepresenting a unit matrix, D is a degree matrix D ═ ΣjAij,λmaxIs LsysMaximum eigenvalue of the matrix, Tk(. h) represents a Chebyshev polynomial of order k; θ represents a vector of chebyshev coefficients. Meanwhile, the parameter vector is optimized by using the neural network, the layer-wise graph convolution neural network is used for feature extraction, and the formula is as follows:
Hl+1=σ(gθHlWl+bl) (4)
wherein HlRepresenting the output of the neural network with residual structure, gθThe constant term can be obtained by calculation, the parameter term to be optimized is optimized by the neural network parameters, and finally the spatial feature embedded vector representation of the traffic information data can be obtained.
4. The traffic flow prediction method based on a spatiotemporal Transformer model considering human fluidity according to claim 1, characterized in that: the step (3) specifically comprises the following steps:
3a) constructing an attention query vector Q, a key vector K and a value vector V by adopting linear projection in combination with the spatial feature representation obtained in the step (2);
Q=ZWQ,K=ZWK,V=ZWV (5)
3b) adopting a scaling dot product function as the calculation of the attention mechanism fraction, and combining the query vector Q, the key vector K and the value vector V with different linear projections to construct a plurality of attention functions to form a multi-head attention mechanism;
MultiHead=Concat(head1,…,headn)WO (6)
wherein the headi=Attention(QWi Q,KWi K,VWi V) Note that the scaled dot product function of the fractional computation of the mechanism can be expressed as
Figure FDA0003283872290000031
3c) Constructing two layers of feedforward neural networks by combining the multi-head attention expression obtained in the step (3b), and adding residual connection to relieve the problem of gradient disappearance under a deep network;
FFN=Wσ(WX+b)+b (7)
where σ denotes the activation function, W and b denote learnable network parameters;
3d) building an encoder module and a decoder module by combining the step (3b) and the step (3c), stacking the plurality of encoder modules and the decoder module, and building a Transformer neural network for extracting the time characteristics of the traffic data;
3e) combining the step (2) and the step (3d), and combining the spatio-temporal characteristics to construct a diagram spatio-temporal transform model.
5. The traffic flow prediction method based on a spatiotemporal Transformer model considering human fluidity according to claim 1, characterized in that: the step (4) specifically comprises the following steps:
4a) combining the traffic data space characteristics extracted in the step (2) and the traffic data time characteristics extracted in the step (3), constructing a loss function, and training a graph space-time Transformer model and optimizing parameters;
Figure FDA0003283872290000032
wherein N represents the number of samples, YiAnd
Figure FDA0003283872290000033
representing a real traffic information value and a predicted traffic information value;
4b) the traffic prediction problem is a classical regression problem. Therefore, in order to evaluate the prediction performance of the model, the Mean Absolute Error (MAE), the Mean Absolute Percent Error (MAPE), and the Root Mean Square Error (RMSE) were selected as indicators; for MAE, RMSE and MAPE indices, smaller values indicate better prediction performance;
Figure FDA0003283872290000034
Figure FDA0003283872290000041
Figure FDA0003283872290000042
4c) inputting real traffic data sets of two different regions into a model, training in a batch processing mode, and observing the performance of the model; finally, a space-time Transformer model with a graph representing the spatial characteristics and the time trend of the traffic data can be obtained and applied to traffic flow prediction.
CN202111140879.6A 2021-09-28 2021-09-28 Traffic flow prediction method based on graph space-time transform model considering human mobility Pending CN114267170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111140879.6A CN114267170A (en) 2021-09-28 2021-09-28 Traffic flow prediction method based on graph space-time transform model considering human mobility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111140879.6A CN114267170A (en) 2021-09-28 2021-09-28 Traffic flow prediction method based on graph space-time transform model considering human mobility

Publications (1)

Publication Number Publication Date
CN114267170A true CN114267170A (en) 2022-04-01

Family

ID=80824772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111140879.6A Pending CN114267170A (en) 2021-09-28 2021-09-28 Traffic flow prediction method based on graph space-time transform model considering human mobility

Country Status (1)

Country Link
CN (1) CN114267170A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117423238A (en) * 2023-12-19 2024-01-19 北京华录高诚科技有限公司 Integrated traffic flow prediction device and prediction method based on convolution switching network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A kind of traffic forecast method based on attention temporal diagram convolutional network
CN109887282A (en) * 2019-03-05 2019-06-14 中南大学 A kind of road network traffic flow prediction technique based on level timing diagram convolutional network
CN110889546A (en) * 2019-11-20 2020-03-17 浙江省交通规划设计研究院有限公司 Attention mechanism-based traffic flow model training method
CN111047078A (en) * 2019-11-25 2020-04-21 中山大学 Traffic characteristic prediction method, system and storage medium
CN113313947A (en) * 2021-05-31 2021-08-27 湖南大学 Road condition evaluation method of short-term traffic prediction graph convolution network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A kind of traffic forecast method based on attention temporal diagram convolutional network
CN109887282A (en) * 2019-03-05 2019-06-14 中南大学 A kind of road network traffic flow prediction technique based on level timing diagram convolutional network
CN110889546A (en) * 2019-11-20 2020-03-17 浙江省交通规划设计研究院有限公司 Attention mechanism-based traffic flow model training method
CN111047078A (en) * 2019-11-25 2020-04-21 中山大学 Traffic characteristic prediction method, system and storage medium
CN113313947A (en) * 2021-05-31 2021-08-27 湖南大学 Road condition evaluation method of short-term traffic prediction graph convolution network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117423238A (en) * 2023-12-19 2024-01-19 北京华录高诚科技有限公司 Integrated traffic flow prediction device and prediction method based on convolution switching network

Similar Documents

Publication Publication Date Title
CN110889546B (en) Attention mechanism-based traffic flow model training method
CN110827544B (en) Short-term traffic flow control method based on graph convolution recurrent neural network
CN108629978B (en) Traffic track prediction method based on high-dimensional road network and recurrent neural network
CN109697852B (en) Urban road congestion degree prediction method based on time sequence traffic events
CN111612243B (en) Traffic speed prediction method, system and storage medium
CN108898829B (en) Dynamic short-time traffic flow prediction system aiming at non-difference division and data sparseness
CN112085947B (en) Traffic jam prediction method based on deep learning and fuzzy clustering
Kim et al. Urban traffic flow prediction system using a multifactor pattern recognition model
CN113313947B (en) Road condition evaluation method of short-term traffic prediction graph convolution network
Yan et al. Spatial-temporal chebyshev graph neural network for traffic flow prediction in iot-based its
CN115240425B (en) Traffic prediction method based on multi-scale space-time fusion graph network
CN114299723B (en) Traffic flow prediction method
Lu et al. Lane-level traffic speed forecasting: A novel mixed deep learning model
CN113051811B (en) Multi-mode short-term traffic jam prediction method based on GRU network
CN114944053A (en) Traffic flow prediction method based on spatio-temporal hypergraph neural network
Haputhanthri et al. Short-term traffic forecasting using LSTM-based deep learning models
CN114611814A (en) Urban traffic flow prediction method for aggregating multi-scale space-time similar information
CN114267170A (en) Traffic flow prediction method based on graph space-time transform model considering human mobility
CN111815075B (en) Prediction method for transportation travel demand under major public health incident
CN115862324A (en) Space-time synchronization graph convolution neural network for intelligent traffic and traffic prediction method
CN112115754A (en) Short-term traffic flow prediction model based on firework differential evolution hybrid algorithm-extreme learning machine
CN115909717A (en) Expressway short-term traffic flow prediction method based on deep learning
He et al. Dyna-PTM: OD-enhanced GCN for metro passenger flow prediction
Ehlers Traffic queue length and pressure estimation for road networks with geometric deep learning algorithms
Zhu et al. Research on spatio-temporal network prediction model of parallel–series traffic flow based on Transformer and GCAT

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220401

RJ01 Rejection of invention patent application after publication