Traffic speed prediction method based on deep learning model

文档序号:1688014 发布日期:2020-01-03 浏览:19次 中文

阅读说明:本技术 一种基于深度学习模型的交通速度预测方法 (Traffic speed prediction method based on deep learning model ) 是由 陈晋音 徐轩珩 王珏 于 2019-08-20 设计创作,主要内容包括:本发明公开了一种基于深度学习模型的交通速度预测方法,包括以下步骤:构建GCLSTM模型,以Seq2Seq模型作为模型基础,引入GCN模型分别对细胞层状态和隐藏层状态进行图卷积运算;将待预测路段前一段时刻的交通速度输入至GCLSTM模型中,经计算,输出未来一段时刻的预测交通速度。还公开了一种基于深度学习模型的交通速度预测方法,包括以下步骤:构建GLAT模型,以Seq2Seq模型作为模型基础,引入时间注意力机制对编码器每个时刻的隐含层向量进行关注,将待预测路段前一段时刻的交通速度输入至GLAT模型中,经计算,输出未来一段时刻的预测交通速度。这两个交通速度预测方法能够准确预测交通速度。(The invention discloses a traffic speed prediction method based on a deep learning model, which comprises the following steps: constructing a GCLSTM model, and introducing a GCN model to respectively perform graph convolution operation on a cell layer state and a hidden layer state by taking a Seq2Seq model as a model base; and inputting the traffic speed of the section of the road to be predicted at the previous moment into the GCLSTM model, and outputting the predicted traffic speed of the section of the road to be predicted at the future moment after calculation. Also discloses a traffic speed prediction method based on the deep learning model, which comprises the following steps: constructing a GLAT model, taking a Seq2Seq model as a model base, introducing a time attention mechanism to pay attention to a hidden layer vector of each moment of an encoder, inputting the traffic speed of a section of a road to be predicted at the previous moment into the GLAT model, and outputting the predicted traffic speed of a section of the future moment after calculation. The two traffic speed prediction methods can accurately predict the traffic speed.)

1. A traffic speed prediction method based on a deep learning model comprises the following steps:

constructing a GCLSTM model, introducing a GCN model to respectively perform graph convolution operation on a cell layer state and a hidden layer state by taking a Seq2Seq model as a model base, namely, a hidden layer vector h of the LSTM at the time ttAnd cell layer vector ctAs inputs to 2 GCN models, respectively, Chebyshev polynomials T are usedk(x) To obtainApproximation of filter g by truncation expansion of order KθAnd using a filter gθFor hidden layer vector htAnd cell layer vector ctPerforming convolution operation to output new hidden layer vector of GCN model

Figure FDA0002172946910000011

regarding the road sections to be predicted, each road section is taken as a node, a traffic network G describing the road sections around the road sections to be predicted is constructed, a link matrix A of the traffic network G is defined, and a filter G is constructed according to the link matrix Aθ

And inputting the traffic speed of the section of the road to be predicted at the previous moment into the GCLSTM model, and outputting the predicted traffic speed of the section of the road to be predicted at the future moment after calculation.

2. The deep learning model-based traffic speed prediction method of claim 1, wherein the constructed filter gθComprises the following steps:

wherein the content of the first and second substances,

Figure FDA0002172946910000014

3. The deep learning model-based traffic speed prediction method as claimed in claim 2, wherein when the traffic speed of a time before the road segment to be predicted is input into the GCLSTM model, the GCLSTM model is implemented by the following specific processes:

Figure FDA0002172946910000021

Figure FDA0002172946910000022

Figure FDA0002172946910000023

C=[hT,cT],

START=zero(V),

Figure FDA0002172946910000025

Figure FDA0002172946910000026

wherein the content of the first and second substances,

Figure FDA0002172946910000027

4. The deep learning model-based traffic speed prediction method according to claim 1, wherein in constructing the link matrix a, for the section i and the section j, in the case where the ID of the end node of the section i is the same as the ID of the start node of the section j:

if the direction characteristics of the two road segments are 0 or 1, indicating a double-way road, namely defining that a bidirectional connection exists between the road segment i and the road segment j, namely the road segment i can lead to the road segment j, and the road segment j can lead to the road segment i, wherein the link matrix A indicates that A (i, j) is 1, and A (j, i) is 1, otherwise, no connection exists between the road segment i and the road segment j;

if the direction characteristic of both segments is 2, i.e. representing a single row, and the direction goes from the start node to the end node, then a segment i may be defined to lead to a segment j, where a (i, j) is 1 but a (j, i) is 0 in the adjacency matrix representation of the network;

if the direction characteristic of both road segments is 3, i.e. representing a single row, and the direction is from the end node to the start node, then it is defined that road segment j may lead to road segment i, where a (j, i) is 1 but a (i, j) is 0 in the link matrix representation of the network;

in the case where the ID of the start node of the link i is the same as the ID of the start node of the link j:

if the two road segments are characterized by an aspect of 0 or 1, i.e. representing a two-way road, a bi-directional connection is defined between road segment i and road segment j, i.e. a (i, j) ═ 1, while a (j, i) ═ 1;

if the direction characteristic of the road segment i is 3 and the direction characteristic of the road segment j is 2, defining that the road segment i can lead to the road segment j, wherein A (i, j) is 1 but A (j, i) is 0 under the link matrix representation of the network;

if the direction characteristic of the link i is 2 and the direction characteristic of the link j is 3, the link j is defined to be able to lead to the link i, where a (j, i) is 1 but a (i, j) is 0 in the link matrix representation of the network.

5. A traffic speed prediction method based on a deep learning model comprises the following steps:

constructing a GLAT model, taking a Seq2Seq model as a model base, introducing a time attention mechanism to pay attention to the hidden layer vector of each moment of an encoder, namely calculating similarity scores score between the hidden layer output of the decoder at the current moment and the hidden layer vectors of all the input moments, normalizing the similarity scores by using softmax to enable the sum of all the similarity scores to be 1, performing weighted summation on the similarity scores and the hidden layer vectors of all the input moments to obtain an attention vector a at the current moment, inputting the attention vector a and the hidden layer vectors of the current moment into a full-connection layer together, and outputting a prediction output vector through calculation;

and inputting the traffic speed of the section of the road to be predicted at the previous moment into the GLAT model, and outputting the predicted traffic speed of the section of the road to be predicted at the future moment after calculation.

6. The deep learning model-based traffic speed prediction method as claimed in claim 5, wherein when the traffic speed at a moment before the road section to be predicted is input into the GLAT model, the GLAT model is implemented by the following specific processes:

[ht,ct]=LSTM1(Vt,[ht-1,ct-1])(t=1,2,...,T),

C=[hT,cT],

H=[h1,h2,...,hT],

START=zero(V),

Figure FDA0002172946910000041

Figure FDA0002172946910000042

Figure FDA0002172946910000043

aT+t'=scoreT+t'·H,

Figure FDA0002172946910000044

where Wa is a weight matrix of the temporal attention mechanism.

Technical Field

The invention belongs to the field of traffic monitoring, and particularly relates to a traffic speed prediction method based on a deep learning model.

Background

Real-time accurate traffic speed prediction is a fundamental and challenging task in intelligent traffic systems. The real world traffic network is a large number of criss-crossed roads in which traffic on each particular road segment is likely to be affected by its neighboring road segments. The geographic factors of a road affect its traffic conditions. For example, traffic patterns of main roads and minor roads are not very similar, and traffic congestion often occurs at intersections. However, the conventional traffic prediction model aims to learn the time dependency within each link, and predicts the future traffic speed of the link based on only the previous traffic speed observed from each link.

As the traffic speed is predicted directly using the Seq2Seq model shown in fig. 1, the Seq2Seq model uses a framework of encoder-decoder, in which both encoder and decoder are composed of an LSTM. The encoder maps the input traffic speed sequence into a fixed-length context vector C, which can be regarded as a feature vector of the input traffic speed, the context vector storing traffic speed information at past time is transmitted to the decoder, and the decoder generates a characteristic vector sequence according to the input context vector to predict the traffic speed at a future time, wherein the START vector is an all-zero matrix with the same dimension as the speed vector and used as an initial input vector of the decoder, and FC is a full-connection operation. The Seq2Seq model predicts the future traffic speed of a link only for the previous traffic speed observed for each link. The influence of spatial dependencies between adjacent road segments, or information sharing between related roads, is therefore ignored.

In addition, the Seq2Seq model has a serious problem: the input sequence, regardless of size, is encoded by the encoder into a fixed-length representation of the feature vector, and the decoder is constrained to this fixed-length representation of the feature vector. This problem limits the performance of the model, which becomes worse as the sequence is input and as the sequence grows, the original way according to the time step is worse, because the structure of the original encoder-decoder model design has certain defects, especially when the input sequence is longer, the model is difficult to learn reasonable vector representation.

Disclosure of Invention

In view of the above, the present invention provides a traffic speed prediction method based on a deep learning model, which is capable of accurately predicting a traffic speed.

The technical scheme of the invention is as follows:

a traffic speed prediction method based on a deep learning model comprises the following steps:

constructing a GCLSTM model, introducing a GCN model to respectively perform graph convolution operation on a cell layer state and a hidden layer state by taking a Seq2Seq model as a model base, namely, a hidden layer vector h of the LSTM at the time ttAnd cell layer vector ctAs inputs to 2 GCN models, respectively, Chebyshev polynomials T are usedk(x) Approximating the filter g by a truncation spread of order KθAnd using a filter gθFor hidden layer vector htAnd cell layer vector ctPerforming convolution operation to output new hidden layer vector of GCN model

Figure RE-GDA0002246408010000021

And new cell layer vectorAs input to the LSTM at time t + 1;

regarding the road sections to be predicted, each road section is taken as a node, a traffic network G describing the road sections around the road sections to be predicted is constructed, a link matrix A of the traffic network G is defined, and a filter G is constructed according to the link matrix Aθ

And inputting the traffic speed of the section of the road to be predicted at the previous moment into the GCLSTM model, and outputting the predicted traffic speed of the section of the road to be predicted at the future moment after calculation.

The traffic speed prediction method based on the deep learning model introduces the GCN model, considers the influence of the traffic condition of each road section on the traffic conditions of other surrounding roads, and improves the accuracy of the traffic speed.

The traffic speed prediction method based on the deep learning model comprises the following steps:

constructing a GLAT model, taking a Seq2Seq model as a model base, introducing a time attention mechanism to pay attention to the hidden layer vector of each moment of an encoder, namely calculating similarity scores score between the hidden layer output of the decoder at the current moment and the hidden layer vectors of all the input moments, normalizing the similarity scores by using softmax to enable the sum of all the similarity scores to be 1, performing weighted summation on the similarity scores and the hidden layer vectors of all the input moments to obtain an attention vector a at the current moment, inputting the attention vector a and the hidden layer vectors of the current moment into a full-connection layer together, and outputting a prediction output vector through calculation;

and inputting the traffic speed of the section of the road to be predicted at the previous moment into the GLAT model, and outputting the predicted traffic speed of the section of the road to be predicted at the future moment after calculation.

When the traffic speed prediction method is used for predicting the traffic speed, the hidden layer vector of the previous period of time is considered, so that the accuracy of the traffic speed is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a schematic structural diagram of a Seq2Seq model in the background art;

FIG. 2 is a schematic structural diagram of the GCLSTM model provided by the present invention;

FIG. 3 is a schematic diagram illustrating the order K of GCN;

fig. 4 is a schematic structural diagram of the GLAT model provided by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.

As shown in fig. 1, which is a schematic structural diagram of an existing Seq2Seq model, the Seq2Seq model can be used for traffic speed prediction, and the specific process is as follows:

[ht,ct]=LSTM1(Vt,[ht-1,ct-1])(t=1,2,...,T),

C=[hT,cT],

START=zero(V),

Figure RE-GDA0002246408010000041

LSTM for LSTM unit in encoder1Indicating the hidden layer vector h obtained at the previous momentt-1The cell layer vector is ct-1Then the two vectors are compared with a velocity vector VtInput together into the next LSTM cell to get a new htAnd ctAnd so on. The last moment of the encoder is T, hTAnd cTThe set of (2) is denoted by C. LSTM for LSTM units in a decoder2Means, unlike the encoder, that the input at time t +1 is a full 0 vector of the same dimension as the velocity vector, every LSTM2Vector h obtained by unitT+t'The input to the full connection layer FC results in a predicted velocity vector.

Research shows that the traffic of a specific road section can be influenced by the adjacent road sections, and the traffic speed needs to be further predicted by utilizing the known network topology of the traffic road section. However, the known Seq2Seq prediction model aims to learn the temporal dependency of each road segment, while disregarding the spatial dependency between road segments. Although the traffic speed of each road segment can be predicted by sequence-to-sequence timing through the Seq2Seq model alone, when predicting the future average speed of a road segment in an actual traffic network, not only the speed information of the previous T moments of the road segment needs to be utilized, but also the influence of the speed information of the surrounding adjacent road segments on the speed change of the road segment needs to be considered, that is, the influence of the topological structure characteristics of the traffic network on the speed prediction performance of all the road segments of the whole traffic network needs to be considered.

Therefore, in the traffic speed prediction method based on the deep learning model, the graph convolution neural network GCN is selected to learn the topological structure of the traffic network to realize the feature extraction of the traffic network, and the influence of the road sections in the surrounding area of each road section on the traffic speed of the road section is learned, so that the GCN is embedded into the Seq2Seq model to form the GCLSTM model shown in fig. 2. Since the cell layer state and the hidden layer state, which are transferred all the way forward in the GCLSTM model, can reflect different state information, respectively, a graph convolution operation is performed on the cell layer state and the hidden layer state using two GCN models, respectively.

Specifically, the GCN is a convolutional neural network directly acting on the graph, and allows end-to-end learning of the structured data, and feature extraction of network nodes is realized by learning the structural features of the network. Extracting the network structure features at each time instant by using a graph convolution neural network GCN, the graph spectrum convolution being defined as the input signal x and the filter gθMultiplication by diag (theta) and to solve the problem of high complexity of eigen decomposition of the large network laplacian matrix, chebyshev polynomial T is usedk(x) Approximating the filter g by a truncation spread of order Kθ

Figure RE-GDA0002246408010000051

Wherein the content of the first and second substances,

Figure RE-GDA0002246408010000052

when represents tInscribing a readjusted Laplace matrix, and Lt=IN-Dt -0.5AtDt -0.5Laplace matrix representing time t, AtAn adjacency matrix representing a snapshot network at time t, DtIs AtMatrix of degree values of, INIs an identity matrix, λmaxIs defined as Laplace matrix LtMaximum characteristic value of thetakCoefficients defined as Chebyshev polynomials recursively defined as Tk(x)=2xTk-1(x)-Tk-2(x) Wherein T is0(x)=1,T1(x) X, K is the order index, K is the maximum order, and is a hyperparameter.

The hidden layer vector h of LSTM at t momenttAnd cell layer vector ctAs input to 2 GCN models, respectively, using a filter gθFor hidden layer vector htAnd cell layer vector ctPerforming convolution operation to output new hidden layer vector of GCN model

Figure RE-GDA0002246408010000061

And new cell layer vector

Figure RE-GDA0002246408010000062

As input to the LSTM at time t + 1.

When the method is applied, aiming at the road sections to be predicted, each road section is taken as a node, a traffic network G describing the road sections around the road sections to be predicted is constructed, a link matrix A of the traffic network G is defined, and a filter G is constructed according to the link matrix Aθ

In constructing the link matrix a, for a link i and a link j, in the case where the ID of the end node of the link i is the same as the ID of the start node of the link j:

if the direction characteristics of the two road segments are 0 or 1, indicating a double-way road, namely defining that a bidirectional connection exists between the road segment i and the road segment j, namely the road segment i can lead to the road segment j, and the road segment j can lead to the road segment i, wherein the link matrix A indicates that A (i, j) is 1, and A (j, i) is 1, otherwise, no connection exists between the road segment i and the road segment j;

if the direction characteristic of both segments is 2, i.e. representing a single row, and the direction goes from the start node to the end node, then a segment i may be defined to lead to a segment j, where a (i, j) is 1 but a (j, i) is 0 in the adjacency matrix representation of the network;

if the direction characteristic of both road segments is 3, i.e. representing a single row, and the direction is from the end node to the start node, then it is defined that road segment j may lead to road segment i, where a (j, i) is 1 but a (i, j) is 0 in the link matrix representation of the network;

in the case where the ID of the start node of the link i is the same as the ID of the start node of the link j:

if the two road segments are characterized by an aspect of 0 or 1, i.e. representing a two-way road, a bi-directional connection is defined between road segment i and road segment j, i.e. a (i, j) ═ 1, while a (j, i) ═ 1;

if the direction characteristic of the road segment i is 3 and the direction characteristic of the road segment j is 2, defining that the road segment i can lead to the road segment j, wherein A (i, j) is 1 but A (j, i) is 0 under the link matrix representation of the network;

if the direction characteristic of the link i is 2 and the direction characteristic of the link j is 3, the link j is defined to be able to lead to the link i, where a (j, i) is 1 but a (i, j) is 0 in the link matrix representation of the network.

After the chaining matrix A is constructed, it is equivalent to the filter gθAnd (3) well constructed, inputting the traffic speed of a section of the road to be predicted at the previous moment into the GCLSTM model, and outputting the predicted traffic speed of a section of the road to be predicted at the future moment after calculation.

When the traffic speed of a section of the road to be predicted at the previous moment is input into the GCLSTM model, the GCLSTM model is specifically realized in the following steps:

Figure RE-GDA0002246408010000071

Figure RE-GDA0002246408010000072

Figure RE-GDA0002246408010000073

C=[hT,cT],

START=zero(V),

Figure RE-GDA0002246408010000074

Figure RE-GDA0002246408010000076

wherein the content of the first and second substances,

Figure RE-GDA0002246408010000077

for the hidden layer vector htA filter for performing a convolution operation, wherein,

Figure RE-GDA0002246408010000078

for the hidden layer vector ctA filter that performs a convolution operation.

Therefore, the influence of the traffic condition of each road section on the traffic conditions of other surrounding roads can be considered, and the traffic speed of the road section to be detected can be predicted.

It is noted that the present embodiment approximates the filter g with a chebyshev polynomial of order KθInformation of the node which is the maximum K hops away from the central node can be utilized, so that K is a very important hyper-parameter. As shown in fig. 3, when K is 1, only the information of the node 6 itself is considered; when K is 2, the influence of the node (1, 5, 7) information of order 1 on the node 6 is considered; when K is 3, information of the nodes of 1 st order (1, 5, 7) and 2 nd order (2, 4, 8, 12) is additionally considered. When K is larger, the relationship between a wider domain node and a central node can be considered, but the calculation amount is greatly increased. In general, K is selected to be 3.

Since the input speed sequences are generally long in the traffic speed prediction task, in order to solve the problem that the Seq2Seq model depends on the restriction of one fixed length vector inside during encoding and decoding, so that the performance of the model is deteriorated, the embodiment proposes to improve the existing Seq2Seq model by using a time-based attention mechanism, to retain hidden layer vector representations corresponding to the input sequences at various moments output by the encoder in the middle, then to train a model to selectively learn the inputs and to associate the output sequence vectors with the input sequences when the model is output. In other words, the probability of generation of each term in the output sequence depends on which term is selected in the input sequence, and an encoder-decoder structure without attention usually has the last hidden layer vector of the encoder as the input of the decoder, but the hidden layer vector of the encoder is limited and does not store much information, so that for the decoding process, each step has no particularly strong relationship with the previous input of the encoder, and is only related to the hidden layer vector of this input. With the introduction of a time-based attention mechanism, the decoder can match the output at each time instant with the previous input according to the time instant.

Specifically, as shown in fig. 4, a Seq2Seq model is used as a model base, a time attention mechanism is introduced to pay attention to the hidden layer vector at each moment of the encoder, that is, similarity scores score between the hidden layer vector at the current moment and the hidden layer vector at all the input moments in the decoder are calculated, the similarity scores are normalized by using softmax, the sum of all the similarity scores is 1, then the similarity scores and the hidden layer vectors at all the input moments are subjected to weighted summation, so that an attention vector a at the current moment is obtained, the attention vector a and the hidden layer vector at the current moment are input into a full-connection layer together, and a predicted output vector is calculated and output;

when the method is applied, the traffic speed of a section of the road to be predicted at the previous moment is input into the GLAT model, and the predicted traffic speed of a section of the road to be predicted at the future moment is output after calculation. When the traffic speed of a section of the road to be predicted at the previous moment is input into the GLAT model, the concrete implementation process of the GLAT model is as follows:

[ht,ct]=LSTM1(Vt,[ht-1,ct-1])(t=1,2,...,T),

C=[hT,cT],

H=[h1,h2,...,hT],

START=zero(V),

Figure RE-GDA0002246408010000091

Figure RE-GDA0002246408010000092

Figure RE-GDA0002246408010000093

aT+t'=scoreT+t'·H,

where Wa is a weight matrix of the temporal attention mechanism. ,

thus, the vector quantity of the hidden layer in the previous period is considered, and the traffic speed is accurately predicted.

Examples of the experiments

The experiment selects an open large-scale Traffic data set, the Q-Traffic data set, which provides Traffic speed data as well as various off-line and on-line additional information. There are three additional pieces of information in the Q-Traffic dataset: 1) off-line geographic and social information including holidays, morning and evening peaks, lane numbers, speed limit grades, and the like; 2) a road network structure; 3) and inquiring information of the online map. While the Q-Traffic dataset comprises a total of 3 sub-datasets: the query subdata set, the traffic speed subdata set and the road network subdata set. The data set is presented as follows:

(1) querying subdata sets

The query subdata set contains map query information from 2017, 4 and 1 days to 2017, 5 and 31 days in Beijing City, and is derived from Baidu maps. Baidu maps provide two map query modes: one type, called "location search," includes a search for a particular location; the other is called "route search" and provides a navigation route from one location to another. The sub data set has been preprocessed by statistical methods to obtain statistics for about 1.14 million user queries, each user query record including a start timestamp, coordinates of a start location, coordinates of a destination, and an estimated travel time (minutes), wherein a portion of the query data set is shown in table 1.

TABLE 1 query subdata set example

Figure RE-GDA0002246408010000101

(2) Traffic speed subdata set

The traffic speed sub data set also collects traffic speed data in the same time period and the same map area as the query sub data set, and is collected from 2017, 4 and 1 days to 2017, 5 and 31 days in Beijing City. The sub data set contains a total of 45148 road segments covering approximately 738.91 kilometers. Table 2 shows the statistics for these segments, all within six loops of beijing, here the most congested area of all beijing. Since the traffic speed sub data set is from a real-world city region, the state of the traffic light will have a great influence on the traffic speed of each road segment, resulting in a great change in the traffic speed of each road segment. For example, traffic speed may reach a gap of 20km/h between two consecutive minutes. Thus to make traffic speed predictable, traffic speed is sampled at 15 minute intervals for each road segment.

TABLE 2 statistics of traffic speed subdata sets

Figure RE-GDA0002246408010000102

(3) Road network subdata set

Due to the fact that the traffic data have the space-time characteristic, traffic of each specific road section is possibly influenced by the adjacent road sections, and therefore the topological structure of the traffic road network can effectively help to predict the traffic speed of each specific road section. The road network sub data set contains the topological relations among 45148 road segments in total in Beijing, and Table 3 shows the geographic characteristic attributes of each sample (i.e., each road segment) of the road network sub data set. For each road section in the traffic speed sub data set, the road network sub data set mainly provides a starting node and an ending node of the road section, and a corresponding traffic channel network can be built based on the topological relation. In addition, the sub data set provides various geographic attributes of the road segment, such as the width, length, vehicle speed limit, number of lanes, and direction of travel of the road segment (or whether the road segment is a one-way road or a two-way road).

TABLE 3 example geographic attributes for each road segment

To evaluate the proposed GCLSTM and GCN models, the performance of the models was tested through a series of experiments on traffic data sets and compared to other classical traffic speed prediction methods. All experiments were performed on a 12G imprintant GPU, 32G DDR running memory server, the algorithm was coded using the python programming language.

Traffic speeds in the data set of the experiment were sampled at 15 minute intervals, and in general, a traffic speed sequence of one day could be used as input data for predicting traffic speeds of 2 hours in the future. Therefore, in this experiment, the length of the input sequence of the model is t 96, and the length of the output sequence is t' 8. For the Seq2Seq model, the GCLSTM model, and the GLAT model, the hidden state dimension of the LSTM is set to 128, and an Adam optimizer is employed to optimize both models. In the entire test set, half of the data (first month) was used as the training set and the other half (second month) was used for the test. All comparative experiments were performed under the TensorFlow framework.

Since the road network sub data set only provides the geographic attributes corresponding to each road segment as shown in table 3, and does not directly provide the network topology structure of the traffic network, a corresponding traffic network needs to be built according to the direction of the start node, the end node and the road segment provided in the road network sub data set. And constructing a link matrix A of the traffic network according to the method.

Furthermore, since the data set has 45148 links, if a traffic network is constructed with all links as nodes, this results in the adjacency matrix a being a matrix of 45148 × 45148 size, which is still large and difficult to calculate even if the connection matrix is stored by way of a sparse matrix. Therefore, the experiment sequentially selects 1000 more dense road segments (i.e. those with more adjacent road segments and close to the center) from 45148 road segments, generates the corresponding sub-networks and adjacency matrixes, and performs the corresponding speed prediction experiment on the sub-networks.

Since the one-day speed data was used in the experiments to predict traffic speeds for two hours in the future, whereas the data herein was collected at 15-minute dimensional intervals, table 4 represents the predicted performance of 3 models at 8 time periods, respectively. Firstly, in the whole test set, the prediction performance of the GCLSTM model at all times is improved to a certain extent compared with that of the Seq2Seq model, and from the result of the statistics of MAPE at all times, the average MAPE of the GCLSTM is 8.601%, but the average MAPE of the Seq2Seq model is 9.729%, so that the average MAPE of the GCLSTM at all times is reduced by about 1.12% compared with that of the Seq2Seq model, and therefore, the spatial relationship of the traffic network can effectively improve the accuracy of the traffic prediction model. Especially, the speed prediction performance at the first moment (the first 15 minutes) is improved most obviously, the average MAPE of GCLSTM is 1.058%, but the average MAPE of the Seq2Seq model is 2.019%, so that the prediction performance of GCLSTM performance is improved by about one time compared with the Seq2Seq model, and the improvement of short-term prediction performance is more obvious, which shows that the model has excellent effect on short-term prediction performance. In addition, performances of the GLAT model and the GLSTM model are compared, the prediction performance of the GLAT model at all moments is not greatly different from that of the GCLSTM model, but the performance is improved to a certain extent, and the GLAT adds a time attention mechanism on the basis of the GLSTM, so that the time attention mechanism can be shown to improve the traffic speed prediction performance to a certain extent.

TABLE 4 MAPE over the entire test set

Figure RE-GDA0002246408010000131

MAPE is the average absolute percentage error, the MAPE not only considers the error between the predicted value and the actual value, but also considers the proportion between the error and the actual value, for example, the prediction is in the range of 0.5 to 5, the difference between 0.5 prediction and 1.0 prediction and 5.0 prediction and 4.5 prediction is very large, so MAPE is selected as the evaluation index of traffic speed prediction in the experiment.

Figure RE-GDA0002246408010000132

Wherein v istAnd

Figure RE-GDA0002246408010000133

representing the actual and predicted speed at time t, respectively.

The above-mentioned embodiments are intended to illustrate the technical solutions and advantages of the present invention, and it should be understood that the above-mentioned embodiments are only the most preferred embodiments of the present invention, and are not intended to limit the present invention, and any modifications, additions, equivalents, etc. made within the scope of the principles of the present invention should be included in the scope of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种智慧公路管理系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!