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
graph
data
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

Landscapes

  • Traffic Control Systems (AREA)

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.基于考虑人类流动性的图时空Transformer模型的交通流预测方法,包括如下步骤:1. A traffic flow prediction method based on a graph-space-time Transformer model considering human mobility, including the following steps: (1)将道路传感器节点视为图节点,传感器上的交通信息视为节点属性,对交通信息进行图结构数据表示,并进行问题定义;(1) The road sensor node is regarded as a graph node, and the traffic information on the sensor is regarded as a node attribute, and the traffic information is represented by graph structure data, and the problem is defined; (2)将隐藏在交通信息中的多种行为模式进行建模,应用多视图的图卷积神经网络(GCN)模型挖掘交通数据在空间上的跨路网特征;(2) Model the various behavior patterns hidden in the traffic information, and apply the multi-view graph convolutional neural network (GCN) model to mine the spatial cross-road network features of the traffic data; (3)联合步骤(2)所得的特征,利用Transformer神经网络对交通信息进行时间特征表示,捕捉交通数据在时间上的随机扰动性,从而确定用于交通流预测的图时空Transformer模型;(3) Combine the features obtained in step (2), use the Transformer neural network to represent the time feature of the traffic information, and capture the random disturbance of the traffic data in time, so as to determine the graph space-time Transformer model for traffic flow prediction; (4)联合步骤(3)所得的时空特征,在两个不同地区的真实交通数据集进行实验验证,最终确定图时空Transformer模型的有效性;(4) Combine the spatiotemporal features obtained in step (3), and conduct experimental verification on real traffic datasets in two different regions to finally determine the validity of the graph spatiotemporal Transformer model; (5)采用步骤(4)确定的图时空Transformer模型模型,用于交通流量预测。(5) The graph-space-time Transformer model determined in step (4) is used for traffic flow prediction. 2.根据权利要求1所述的基于考虑人类流动性的图时空Transformer模型的交通流预测方法,其特征在于:所述步骤(1)具体包括如下步骤:2. the traffic flow prediction method based on the graph space-time Transformer model considering human mobility according to claim 1, is characterized in that: described step (1) specifically comprises the steps: 1a).将原始交通数据进行归一化处理,将路网进行图表示G=(V,E,W),V表示所有道路集合,E表示边集合,W是权重邻接矩阵,表示节点之间的连接;1a). The original traffic data is normalized, and the road network is represented as G=(V, E, W), where V represents the set of all roads, E represents the set of edges, and W is the weight adjacency matrix, which represents the relationship between the nodes. Connection; 1b).将不同道路的交通数据按五分钟为单元进行统计,表示为节点的特征矩阵
Figure FDA0003283872290000011
h表示历史时间长度,N表示节点个数;
1b). Count the traffic data of different roads in units of five minutes, and express it as a feature matrix of nodes
Figure FDA0003283872290000011
h represents the historical time length, and N represents the number of nodes;
1c).给定道路网路网G,特征矩阵
Figure FDA0003283872290000012
旨在找到一个能够从历史交通信息学习时空特征的映射函数
Figure FDA0003283872290000013
使之能够预测接下来的交通信息。
1c). Given the road network G, the feature matrix
Figure FDA0003283872290000012
Aims to find a mapping function that can learn spatiotemporal features from historical traffic information
Figure FDA0003283872290000013
Make it possible to predict the next traffic information.
3.根据权利要求1所述的基于考虑人类流动性的图时空Transformer模型的交通流预测方法,其特征在于:所述步骤(2)具体包括如下步骤:3. the traffic flow prediction method based on the graph space-time Transformer model considering human mobility according to claim 1, is characterized in that: described step (2) specifically comprises the steps: 2a).按照步骤(1)统计所得到的交通数据,进行行为模式划分,人们在工作日和休息日具有不同的活动轨迹,因此根据工作日和休息日将数据分为两类,对隐藏在交通信息中行为模式进行表征;2a). According to the traffic data obtained by the statistics in step (1), the behavior patterns are divided. People have different activity trajectories on working days and rest days. Therefore, the data are divided into two categories according to working days and rest days. Characterization of behavior patterns in traffic information; 2b).联合步骤(2a)划分后的数据,采用皮尔逊相关系数计算交通信息相似性,对于任意两个道路的交通信息向量U、V,计算公式如下:2b). Combine the data divided by step (2a) and use the Pearson correlation coefficient to calculate the similarity of traffic information. For the traffic information vectors U and V of any two roads, the calculation formula is as follows:
Figure FDA0003283872290000021
Figure FDA0003283872290000021
其中
Figure FDA0003283872290000022
表示特征向量的平均值。最终得到表征任意两个道路交通信息相似性的矩阵A,两个道路交通信息越相似,人们的行为模式越一致;
in
Figure FDA0003283872290000022
represents the mean of the feature vector. Finally, a matrix A representing the similarity of any two road traffic information is obtained. The more similar the two road traffic information is, the more consistent people's behavior patterns are;
2c).按照路网本身具有的物理特性,对于任意两个道路节点vi,vj,进行权重表示如下:2c). According to the physical characteristics of the road network itself, for any two road nodes v i , v j , the weights are expressed as follows:
Figure FDA0003283872290000023
Figure FDA0003283872290000023
其中θ表示数据的标准差,dist(vi,vj)2表示任意两个节点之间的距离。最终得到表征路网物理特征的矩阵D;where θ is the standard deviation of the data, and dist(v i ,v j ) 2 is the distance between any two nodes. Finally, the matrix D representing the physical characteristics of the road network is obtained; 2d).联合步骤(2b)和(2c)得到的多个特征矩阵,对不同的行为模式利用GCN模型进行特征表示,图结构数据上的快速卷积公式如下:2d). Combine the multiple feature matrices obtained in steps (2b) and (2c), and use the GCN model to represent different behavior patterns. The fast convolution formula on graph-structured data is as follows:
Figure FDA0003283872290000024
Figure FDA0003283872290000024
其中
Figure FDA0003283872290000025
IN表示单位矩阵,D是度矩阵D=∑jAij,λmax是Lsys矩阵的最大特征值,Tk(·)表示k阶切比雪夫多项式;θ表示切比雪夫系数的向量。同时利用神经网络进行参数向量进行优化,采用layer-wise图卷积神经网络进行特征提取,公式如下:
in
Figure FDA0003283872290000025
I N represents the identity matrix, D is the degree matrix D=∑ j A ij , λ max is the largest eigenvalue of the L sys matrix, T k (·) represents the k-order Chebyshev polynomial; θ represents the vector of Chebyshev coefficients. At the same time, the neural network is used to optimize the parameter vector, and the layer-wise graph convolutional neural network is used for feature extraction. The formula is as follows:
Hl+1=σ(gθHlWl+bl) (4)H l+1 =σ(g θ H l W l +b l ) (4) 其中Hl表示带有残差结构的神经网络输出,gθ的常数项可以计算得到,待优化的参数项由神经网络参数进行优化,最终可以得到交通信息数据的空间特征嵌入向量表示。Where H l represents the output of the neural network with residual structure, the constant term of g θ can be calculated, the parameter term to be optimized is optimized by the neural network parameters, and finally the spatial feature embedding vector representation of the traffic information data can be obtained.
4.根据权利要求1所述的基于考虑人类流动性的图时空Transformer模型的交通流预测方法,其特征在于:所述步骤(3)具体包括如下步骤:4. the traffic flow prediction method based on the graph space-time Transformer model considering human mobility according to claim 1, is characterized in that: described step (3) specifically comprises the steps: 3a).结合步骤(2)中所得到的空间特征表示,采用线性投影构建注意力的查询向量Q、键向量K和值向量V;3a). Combined with the spatial feature representation obtained in step (2), linear projection is used to construct the attention query vector Q, key vector K and value vector V; Q=ZWQ,K=ZWK,V=ZWV (5)Q=ZW Q , K=ZW K , V=ZW V (5) 3b).采用缩放点积函数作为注意力机制分数的计算,并且将查询向量Q、键向量K和值向量V与不同的线性投影结合,构建多个注意力函数,形成多头注意力机制;3b). The scaled dot product function is used as the calculation of the attention mechanism score, and the query vector Q, the key vector K and the value vector V are combined with different linear projections to construct multiple attention functions to form a multi-head attention mechanism; MultiHead=Concat(head1,…,headn)WO (6)MultiHead=Concat(head 1 ,...,head n )W O (6) 其中headi=Attention(QWi Q,KWi K,VWi V),注意力机制分数计算的缩放点积函数可以表示为
Figure FDA0003283872290000031
where head i = Attention(QW i Q , KW i K , VW i V ), the scaled dot product function of the attention mechanism score calculation can be expressed as
Figure FDA0003283872290000031
3c).结合步骤(3b)得到的多头注意力表示,构建两层的前馈神经网络,并加入残差连接,缓解深度网络下梯度消失的问题;3c). Combined with the multi-head attention representation obtained in step (3b), a two-layer feedforward neural network is constructed, and residual connections are added to alleviate the problem of gradient disappearance in deep networks; FFN=Wσ(WX+b)+b (7)FFN=Wσ(WX+b)+b (7) 其中σ表示激活函数,W和b表示可学习的网络参数;where σ represents the activation function, and W and b represent the learnable network parameters; 3d).结合步骤(3b)和步骤(3c)构建encoder和decoder模块,将多个encoder和decoder模块进行叠加,构建Transformer神经网络,并用于提取交通数据的时间特征;3d). Combine steps (3b) and (3c) to build encoder and decoder modules, stack multiple encoder and decoder modules to build a Transformer neural network, and use it to extract the time features of traffic data; 3e).结合步骤(2)和步骤(3d),将时空特征联合起来,构建出图时空Transformer模型。3e). Combine steps (2) and (3d) to combine spatiotemporal features to construct a graph spatiotemporal Transformer model.
5.根据权利要求1所述的基于考虑人类流动性的图时空Transformer模型的交通流预测方法,其特征在于:所述步骤(4)具体包括如下步骤:5. the traffic flow prediction method based on the graph space-time Transformer model considering human mobility according to claim 1, is characterized in that: described step (4) specifically comprises the steps: 4a).结合步骤(2)中所提取的交通数据空间特征和步骤(3)所提取的交通数据时间特征,构建损失函数,进行图时空Transformer模型的训练和参数的优化;4a). Combining the traffic data spatial features extracted in step (2) and the traffic data temporal features extracted in step (3), a loss function is constructed to train the graph spatiotemporal Transformer model and optimize parameters;
Figure FDA0003283872290000032
Figure FDA0003283872290000032
其中N表示采样个数,Yi
Figure FDA0003283872290000033
表示真实交通信息值和预测交通信息值;
where N represents the number of samples, Y i and
Figure FDA0003283872290000033
Represents the real traffic information value and the predicted traffic information value;
4b).交通预测问题是一个经典的回归问题。因此,为了评估模型的预测性能,选择平均绝对误差(MAE)、平均绝对百分比误差(MAPE)和均方根误差(RMSE)作为指标;对于MAE、RMSE和MAPE指标,值越小表示预测性能越好;4b). The traffic prediction problem is a classic regression problem. Therefore, in order to evaluate the prediction performance of the model, the mean absolute error (MAE), mean absolute percentage error (MAPE) and root mean square error (RMSE) were selected as indicators; for MAE, RMSE and MAPE indicators, the smaller the value, the better the prediction performance. it is good;
Figure FDA0003283872290000034
Figure FDA0003283872290000034
Figure FDA0003283872290000041
Figure FDA0003283872290000041
Figure FDA0003283872290000042
Figure FDA0003283872290000042
4c).将两个不同地区的真实交通数据集输入模型,并采用批处理的方式进行训练,观察模型的表现性能;最终,可以得到具有表征交通数据空间特征和时间趋势的图时空Transformer模型,并应用于交通流预测。4c). Input the real traffic datasets from two different regions into the model, and train them in batch processing to observe the performance of the model; finally, a graph-space-time Transformer model with spatial characteristics and temporal trends of 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742210A (en) * 2022-05-10 2022-07-12 浙江师范大学 Hybrid neural network training method, traffic flow prediction method, equipment and medium
CN116311921A (en) * 2023-03-01 2023-06-23 中国矿业大学 A traffic speed prediction method based on multi-spatial scale spatio-temporal Transformer
CN116910268A (en) * 2023-07-19 2023-10-20 山东师范大学 Crowd congestion prediction method and system based on space-time fusion neural network
CN117393049A (en) * 2023-10-16 2024-01-12 曲阜师范大学 A circRNA-disease association prediction model based on random perturbation and multi-view graph convolutional network
CN117423238A (en) * 2023-12-19 2024-01-19 北京华录高诚科技有限公司 Integrated traffic flow prediction device and prediction method based on convolutional switching network
CN118781806A (en) * 2024-07-09 2024-10-15 江苏贝森智能科技有限公司 Intelligent traffic information sharing method and system

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 Traffic Prediction Method Based on Attention Temporal Graph Convolutional Networks
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 浙江省交通规划设计研究院有限公司 A traffic flow model training method based on attention mechanism
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 Traffic Prediction Method Based on Attention Temporal Graph Convolutional Networks
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 浙江省交通规划设计研究院有限公司 A traffic flow model training method based on attention mechanism
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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742210A (en) * 2022-05-10 2022-07-12 浙江师范大学 Hybrid neural network training method, traffic flow prediction method, equipment and medium
CN116311921A (en) * 2023-03-01 2023-06-23 中国矿业大学 A traffic speed prediction method based on multi-spatial scale spatio-temporal Transformer
CN116910268A (en) * 2023-07-19 2023-10-20 山东师范大学 Crowd congestion prediction method and system based on space-time fusion neural network
CN117393049A (en) * 2023-10-16 2024-01-12 曲阜师范大学 A circRNA-disease association prediction model based on random perturbation and multi-view graph convolutional network
CN117423238A (en) * 2023-12-19 2024-01-19 北京华录高诚科技有限公司 Integrated traffic flow prediction device and prediction method based on convolutional switching network
CN118781806A (en) * 2024-07-09 2024-10-15 江苏贝森智能科技有限公司 Intelligent traffic information sharing method and system

Similar Documents

Publication Publication Date Title
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
CN114267170A (en) Traffic flow prediction method based on graph space-time transform model considering human mobility
CN110827544B (en) Short-term traffic flow control method based on graph convolution recurrent neural network
CN108629978B (en) A Traffic Trajectory Prediction Method Based on High-dimensional Road Network and Recurrent Neural Network
CN110889546B (en) A traffic flow model training method based on attention mechanism
CN113313947A (en) Road condition evaluation method of short-term traffic prediction graph convolution network
CN110570651A (en) A road network traffic situation prediction method and system based on deep learning
CN109598939B (en) A short-term traffic prediction method based on multi-task and multi-view learning model
CN115905434B (en) Road network track completion method based on learning interpolation prediction
CN116486624B (en) Traffic flow prediction method and system based on space-time diagram convolutional neural network
CN115376317A (en) A Traffic Flow Prediction Method Based on Dynamic Graph Convolution and Temporal Convolutional Network
CN115796007B (en) A Traffic Flow Prediction Method Based on Spatiotemporal Graph Networks
CN115862324A (en) Space-time synchronization graph convolution neural network for intelligent traffic and traffic prediction method
Haputhanthri et al. Short-term traffic forecasting using LSTM-based deep learning models
CN117809456B (en) Highway toll station flow prediction method and system
CN116307152A (en) A Spatiotemporal Interactive Dynamic Graph Attention Network for Traffic Prediction
CN113516304A (en) Spatiotemporal joint prediction method and device for regional pollutants based on spatiotemporal graph network
CN117456738B (en) A highway traffic volume prediction method based on ETC gantry data
CN119047618A (en) Traffic prediction method based on dynamic causal analysis and space-time self-adaptive fusion map learning
CN116959269B (en) Traffic prediction method based on attention reconstruction neural network
CN112115754A (en) Short-term traffic flow prediction model based on firework differential evolution hybrid algorithm-extreme learning machine
CN113971496B (en) Urban traffic network state evolution trend prediction method and system under the influence of activities
CN111815075B (en) Prediction method for transportation travel demand under major public health incident
CN113159371B (en) Unknown target feature modeling and demand prediction method based on cross-modal data fusion

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220401