CN110070715A - A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure - Google Patents

A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure Download PDF

Info

Publication number
CN110070715A
CN110070715A CN201910352267.XA CN201910352267A CN110070715A CN 110070715 A CN110070715 A CN 110070715A CN 201910352267 A CN201910352267 A CN 201910352267A CN 110070715 A CN110070715 A CN 110070715A
Authority
CN
China
Prior art keywords
traffic flow
road
road traffic
neural network
data
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
CN201910352267.XA
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 CN201910352267.XA priority Critical patent/CN110070715A/en
Publication of CN110070715A publication Critical patent/CN110070715A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • G08G1/0145Measuring and analyzing of parameters relative to traffic conditions for specific applications for active traffic flow control

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure, comprising the following steps: 1), construct the traffic flow data matrix of associated road, and data are pre-processed;2) road traffic flow space-time characteristic, is extracted based on traffic flow data matrix;3) road traffic flow prediction model, is constructed based on road traffic flow space-time characteristic: regression forecasting is made to obtained road traffic flow space-time characteristic using full articulamentum, future time instance is obtained without the prediction result of the road traffic flow of renormalization, and model parameter is continued to optimize using back-propagation algorithm according to the result of mean square error, result is mapped as actual traffic flow value eventually by renormalization;4) it, verifies road traffic flow prediction model: the road traffic flow data in test set being predicted using the model that training is completed, compare prediction result and actual value to test model performance.Prediction result of the present invention is more acurrate according to the experimental results.

Description

一种基于Conv1D-NLSTMs神经网络结构的道路交通流预测 方法A Road Traffic Flow Prediction Based on Conv1D-NLSTMs Neural Network Structure method

技术领域technical field

本发明属于交通预测领域,涉及一种基于Conv1D-NLSTMs神经网络结构的道路交通流预测方法。The invention belongs to the field of traffic prediction, and relates to a road traffic flow prediction method based on a Conv1D-NLSTMs neural network structure.

背景技术Background technique

随着社会经济的高速发展,国内的汽车保有量大幅增加,但是随之而来的交通堵塞问题也给人们的出行带来了极大的不便。而智能交通系统的出现,对各种交通数据进行分析,从而实现对地面交通进行实时、准确、高效地管理调控,在一定程度上缓解了地面交通压力。而道路交通流预测作为智能交通系统的一部分,可以预知未来一段时间内的交通状态,对实现交通的实时管理起到了重要作用。With the rapid development of social economy, the domestic car ownership has increased significantly, but the accompanying traffic jam problem has also brought great inconvenience to people's travel. The emergence of intelligent transportation systems analyzes various traffic data to realize real-time, accurate and efficient management and regulation of ground traffic, which relieves the pressure of ground traffic to a certain extent. As a part of the intelligent transportation system, road traffic flow prediction can predict the traffic state in the future and play an important role in the real-time management of traffic.

现有的道路交通流预测方法主要是基于数理统计、机器学习的预测模型,或者对几类模型进行单一组合,虽然能够取得一定的预测效果,但是仍存在一些局限性,往往会忽略交通流数据中的某些特性。The existing road traffic flow prediction methods are mainly based on mathematical statistics, machine learning prediction models, or a single combination of several types of models. Although certain prediction effects can be achieved, there are still some limitations, and traffic flow data are often ignored. some of the features in .

发明内容SUMMARY OF THE INVENTION

为了克服现有道路交通预测方法的精度较低的不足,本发明提供一种基于Conv1D-NLSTMs神经网络结构的道路交通流预测方法,该方法使用了多条关联道路的交通流数据,从中提取了道路交通流的空间特征,同时,较长时间以前的交通流数据也会对未来时刻的交通流量产生一定影响,本方法中的NLSTMs神经网络能够增强这方面的特征提取。In order to overcome the shortcomings of the low precision of the existing road traffic prediction methods, the present invention provides a road traffic flow prediction method based on the Conv1D-NLSTMs neural network structure. At the same time, the traffic flow data from a long time ago will also have a certain impact on the traffic flow in the future. The NLSTMs neural network in this method can enhance the feature extraction in this aspect.

本发明解决其技术问题所采用的技术方案是:The technical scheme adopted by the present invention to solve its technical problems is:

一种基于Conv1D-NLSTMs神经网络结构的道路交通流预测方法,包括以下步骤:A road traffic flow prediction method based on Conv1D-NLSTMs neural network structure, including the following steps:

1)、构建关联道路的交通流数据矩阵,并对数据进行预处理:选择预测道路及其相关联道路的交通流数据,构建交通流数据矩阵,并对其进行归一化处理;1), construct the traffic flow data matrix of the associated road, and preprocess the data: select the traffic flow data of the predicted road and its associated road, construct the traffic flow data matrix, and normalize it;

2)、基于交通流数据矩阵提取道路交通流时空特征:采用一维卷积网络对交通流数据矩阵中同一时刻不同路段的交通流数据提取空间特征,得到具有空间特征的序列数据,再使用NLSTMs神经网络提取该序列数据中的时序特征,从而得到道路交通流时空特征;2) Extract the spatiotemporal features of road traffic flow based on the traffic flow data matrix: use a one-dimensional convolutional network to extract spatial features from the traffic flow data of different road sections at the same time in the traffic flow data matrix to obtain sequence data with spatial features, and then use NLSTMs The neural network extracts the time series features in the sequence data, so as to obtain the spatiotemporal features of road traffic flow;

3)、基于道路交通流时空特征构建道路交通流预测模型:采用全连接层对得到的道路交通流时空特征作回归预测,得到未来时刻未经过反归一化的道路交通流的预测结果,并根据均方误差的结果利用反向传播算法不断优化模型参数,最终通过反归一化将结果映射为实际交通流量值;3) Construct a road traffic flow prediction model based on the spatio-temporal characteristics of road traffic flow: use the fully connected layer to perform regression prediction on the obtained spatio-temporal characteristics of road traffic flow, and obtain the prediction result of road traffic flow without de-normalization in the future time. According to the result of the mean square error, the model parameters are continuously optimized by the back-propagation algorithm, and finally the result is mapped to the actual traffic flow value through inverse normalization;

4)、验证道路交通流预测模型:使用训练完成的模型对测试集中的道路交通流数据进行预测,对比预测结果和实际值从而测试模型性能。4) Verify the road traffic flow prediction model: use the trained model to predict the road traffic flow data in the test set, and compare the predicted results with the actual values to test the performance of the model.

本发明的技术构思为:主要利用一维卷积网络(Conv1D)和Nested LSTMs(NLSTMs)神经网络,从道路交通流的空间关系和交通数据的时间序列两个方面提取特征,Conv1D提取了道路交通流数据的空间特征,而NLSTMs神经网络类似于在LSTM神经网络结构内部嵌入一个或多个LSTM神经网络,能够比LSTM神经网络更有效的提取时间序列特征,从而提高了道路交通流的预测精度The technical idea of the present invention is: mainly use one-dimensional convolutional network (Conv1D) and Nested LSTMs (NLSTMs) neural network to extract features from the spatial relationship of road traffic flow and the time series of traffic data. Conv1D extracts road traffic The spatial features of flow data, and NLSTMs neural network is similar to embedding one or more LSTM neural networks inside the LSTM neural network structure, which can extract time series features more effectively than LSTM neural network, thereby improving the prediction accuracy of road traffic flow

本发明的有益效果:一维卷积神经网络能从多条关联道路的交通流数据中有效提取空间特征,而且NLSTMs神经网络加强考虑了更长时间以前的交通流对未来时刻交通流的影响,从多个角度挖掘道路交通流的变化趋势,使得预测结果更准确。The beneficial effects of the present invention are as follows: the one-dimensional convolutional neural network can effectively extract spatial features from the traffic flow data of multiple associated roads, and the NLSTMs neural network strengthens the consideration of the influence of the traffic flow of a longer time ago on the traffic flow in the future, Mining the changing trend of road traffic flow from multiple angles makes the prediction result more accurate.

附图说明Description of drawings

图1是NLSTMs神经网络结构图;Figure 1 is the structure diagram of NLSTMs neural network;

图2是Conv1D-NLSTMs神经网络模型结构图;Figure 2 is the structure diagram of the Conv1D-NLSTMs neural network model;

图3是基于Conv1D-NLSTMs神经网络模型的交通流预测结果。Figure 3 shows the traffic flow prediction results based on the Conv1D-NLSTMs neural network model.

具体实施方式Detailed ways

下面结合附图对本发明作进一步描述。The present invention will be further described below in conjunction with the accompanying drawings.

参照图1~图3,一种基于Conv1D-NLSTMs神经网络结构的道路交通流预测方法,包括以下步骤:Referring to Figures 1 to 3, a road traffic flow prediction method based on the Conv1D-NLSTMs neural network structure includes the following steps:

1)、构建关联道路的交通流数据矩阵,并对数据进行预处理,过程如下:1), construct the traffic flow data matrix of the associated road, and preprocess the data, the process is as follows:

首先,假设对道路k的交通流量进行预测,则选取该道路及其相关联道路的交通流量数据,用于构建交通流数据矩阵X′,形式如下:First, assuming that the traffic flow of road k is predicted, the traffic flow data of this road and its associated roads are selected to construct a traffic flow data matrix X', in the following form:

其中,列向量分别代表m条不同路段的交通流序列数据,行向量代表不同道路n个时刻的交通流数据,则x′it为t时刻道路i的原始交通流数据;Among them, the column vector represents the traffic flow sequence data of m different road sections respectively, the row vector represents the traffic flow data of different roads at n times, then x'it is the original traffic flow data of road i at time t;

按照道路交通流的时间序列,将数据分为训练数据和测试数据,划分比例为8:2。According to the time series of road traffic flow, the data is divided into training data and test data, and the division ratio is 8:2.

然后采用最大最小标准化方法对道路交通流数据进行归一化处理,过程如下:Then, the maximum and minimum normalization method is used to normalize the road traffic flow data, and the process is as follows:

其中,x′max,x′min分别为原始交通流数据中的最大最小值,xit为预处理后t时刻道路i的交通流量,令Pt=[x1t,x2t,…,xmt],表示t时刻不同道路的交通流状态,则经过预处理后的交通流数据矩阵X为:Among them, x′ max , x′ min are the maximum and minimum values in the original traffic flow data respectively, x it is the traffic flow of road i at time t after preprocessing, let P t =[x 1t ,x 2t ,...,x mt ], representing the traffic flow state of different roads at time t, then the preprocessed traffic flow data matrix X is:

2)基于交通流数据矩阵提取道路交通流时空特征;2) Extract the spatiotemporal characteristics of road traffic flow based on the traffic flow data matrix;

对每一时刻的Pt作一维卷积操作,提取道路交通流数据的空间特征,其计算过程如下:One-dimensional convolution operation is performed on P t at each moment to extract the spatial characteristics of road traffic flow data. The calculation process is as follows:

st=f(Wp*Pt+bp) (4)s t =f(W p *P t +b p ) (4)

其中,Wp表示权重矩阵,bp表示偏置项,*表示卷积运算,f表示激活函数relu:max{x,0},st表示一维卷积运算得到的结果,则提取到的道路交通流数据的空间特征为S=[s1,s2,…,sn]TAmong them, W p represents the weight matrix, b p represents the bias term, * represents the convolution operation, f represents the activation function relu:max{x,0}, and s t represents the result obtained by the one-dimensional convolution operation, then the extracted The spatial feature of road traffic flow data is S=[s 1 , s 2 ,...,s n ] T ;

在将空间特征输入到NLSTMs神经网络之前,需要对空间特征S作形式上的转变,其变换形式如下:Before the spatial features are input into the NLSTMs neural network, the spatial feature S needs to be formally transformed, and the transformation form is as follows:

其中,d表示取道路交通流前d个连续数据来预测下一时刻的交通流量,S′=[xd,xd+1,…,xn-1]T,n≥d,表示空间特征变换后的结果,则NLSTMs神经网络的输入为xt,d≤t≤n-1,且其样本数为n-d;Among them, d represents taking the first d continuous data of road traffic flow to predict the traffic flow at the next moment, S′=[x d ,x d+1 ,…,x n-1 ] T ,n≥d, represents the spatial feature The transformed result, the input of the NLSTMs neural network is x t , d≤t≤n-1, and the number of samples is nd;

NLSTMs神经网络分为内外2个部分,其外部LSTM神经网络单元状态的更新和门控机制表示为以下方程式:The NLSTMs neural network is divided into two parts, the inner and outer parts, and the update and gating mechanism of the state of the outer LSTM neural network unit is expressed as the following equation:

it=σ(xtWxi+ht-1Whi+bi) (6)i t =σ(x t W xi +h t-1 W hi +b i ) (6)

ft=σ(xtWxf+ht-1Whf+bf) (7)f t =σ(x t W xf +h t-1 W hf +b f ) (7)

ot=σ(xtWxo+ht-1Who+bo) (9)o t =σ(x t W xo +h t-1 W ho +b o ) (9)

ht=ot·σ(ct) (10)h t =o t ·σ(c t ) (10)

其中,·表示点乘,σ()表示sigmoid函数,Wxf、Wxi、Wxo表示外部遗忘门、输入门、输出门的输入权重矩阵,Whf、Whi、Who表示外部遗忘门、输入门、输出门的前一时刻输出权重矩阵,bf、bi、bo表示外部遗忘门、输入门、输出门的偏置矩阵,it、ft、ct、ot、ht表示外部输入门、遗忘门、单元状态、输出门、记忆单元的输出,则表示内部记忆单元的输出;Among them, · represents the dot product, σ() represents the sigmoid function, W xf , W xi , W xo represent the input weight matrix of the external forget gate, input gate, and output gate, W hf , W hi , W ho represent the external forget gate, The output weight matrix of the input gate and the output gate at the previous moment, b f , b i , and b o represent the bias matrix of the external forget gate, input gate, and output gate, i t , f t , c t , o t , h t represents the output of the external input gate, forget gate, cell state, output gate, and memory cell, represents the output of the internal memory unit;

其内部嵌入LSTM神经网络单元的计算公式与LSTM神经网络的状态更新和门控机制计算公式相似,表达式如下:The calculation formula of the internal embedded LSTM neural network unit is similar to the calculation formula of the state update and gating mechanism of the LSTM neural network, and the expression is as follows:

其中,·表示点乘,σ(·)表示sigmoid函数,表示内部输入,Wxc表示内部输入的权重矩阵,Whc表示内部输入的前一时刻状态单元权重矩阵,bc表示内部输入的偏置矩阵,表示内部遗忘门、输入门、状态单元、输出门的输入权重矩阵, 表示内部遗忘门、输入门、状态单元、输出门的前一时刻输出权重矩阵,表示内部遗忘门、输入门、状态单元、输出门的偏置矩阵,表示内部输入门、遗忘门、单元状态、输出门、记忆单元的输出。故NLSTMs神经网络的最终输出,即道路交通流时空特征为H=htAmong them, · represents the dot product, σ(·) represents the sigmoid function, represents the internal input, W xc represents the weight matrix of the internal input, W hc represents the weight matrix of the state unit at the previous moment of the internal input, b c represents the bias matrix of the internal input, represents the input weight matrix of the internal forget gate, input gate, state unit, and output gate, represents the previous output weight matrix of the internal forget gate, input gate, state unit, and output gate, represents the bias matrix of the internal forget gate, input gate, state unit, and output gate, Represents the output of internal input gates, forget gates, cell states, output gates, and memory cells. Therefore, the final output of the NLSTMs neural network, that is, the spatiotemporal characteristics of road traffic flow is H=h t ;

3)基于道路交通流时空特征构建道路交通流预测模型,过程如下:3) Build a road traffic flow prediction model based on the spatiotemporal characteristics of road traffic flow. The process is as follows:

首先,将道路交通流时空特征H作为全连接层输入,预测基于输入交通流数据的下一时刻交通流量yt(未经过反归一化),全连接表达式如下所示:First, take the spatiotemporal feature H of road traffic flow as the input of the fully connected layer, and predict the next moment of traffic flow y t (without denormalization) based on the input traffic flow data. The fully connected expression is as follows:

yt=Wh·H (18)y t = W h · H (18)

其中,Wh为全连接层的权重矩阵,且yt对应的真实值Yt=xk,t+1,d≤t≤n-1;Among them, W h is the weight matrix of the fully connected layer, and the true value corresponding to y t Y t =x k, t+1 , d≤t≤n-1;

然后定义均方误差为损失函数L:Then define the mean squared error as the loss function L:

计算模型的损失函数L,然后利用反向传播算法实现对模型参数的不断优化,反向传播算法中的梯度计算与参数更新均通过Adam优化器实现;Calculate the loss function L of the model, and then use the back-propagation algorithm to continuously optimize the model parameters. The gradient calculation and parameter update in the back-propagation algorithm are implemented by the Adam optimizer;

最后,将全连接层的输出yt作反归一化操作,即可得到实际的交通流量预测值;Finally, by de-normalizing the output y t of the fully connected layer, the actual traffic flow prediction value can be obtained;

4)验证道路交通流预测模型4) Verify the road traffic flow prediction model

使用测试数据对模型进行验证,将预测结果和实际值作比较。本实验选取绝对值均方差(MAE)、均方根误差(RMSE)作为道路交通流预测精度的指标,其计算公式分别如下所示:Validate the model with test data and compare the predicted results with the actual values. In this experiment, absolute mean square error (MAE) and root mean square error (RMSE) are selected as the indicators of road traffic flow prediction accuracy. The calculation formulas are as follows:

其中,b为样本数,Yo为实际交通流量,Yo′为模型输出的预测流量。Among them, b is the number of samples, Y o is the actual traffic flow, and Y o ′ is the predicted flow output by the model.

实例:实际实验中的数据,预测过程如下:Example: The data in the actual experiment, the prediction process is as follows:

1)选取实验数据1) Select experimental data

原始道路交通流数据包含3条道路29天的交通流量数据,该道路交通流数据为北京市二环部分路段流量数据,采样间隔T为2min。将这3条道路前23天的道路交通流数据作为训练数据,进行模型参数训练,后6天的道路交通流数据作为测试数据,进行模型性能验证。The original road traffic flow data includes the traffic flow data of 3 roads for 29 days. The road traffic flow data is the traffic flow data of some sections of the Second Ring Road in Beijing, and the sampling interval T is 2min. The road traffic flow data of the first 23 days of these three roads are used as training data to train model parameters, and the road traffic flow data of the last 6 days are used as test data to verify the model performance.

2)参数确定2) parameter determination

本发明的实验是基于tensorflow环境实现的,使用keras完成了整个实验模型框架的搭建,一维卷积过程通过keras中的Conv1D函数实现,NLSTMs神经网络通过NestedLSTM层实现,全连接层通过Dense函数实现。故整个实验参数设定如下:一维卷积的层数为1,输入矩阵大小为10x3(道路总数为3,以前10个时刻的流量数据进行预测,既d=10,卷积核长度1,卷积核数量3,填充方式为“padding”以及激活函数为relu:max{x,0};NestedLSTM层输出单元均为64,层数设置为2;全连接层输出单元数量为1,即预测下一时刻的交通流量。The experiment of the present invention is implemented based on the tensorflow environment, and keras is used to complete the construction of the entire experimental model framework. The one-dimensional convolution process is implemented by the Conv1D function in keras, the NLSTMs neural network is implemented by the NestedLSTM layer, and the fully connected layer is implemented by the Dense function. . Therefore, the parameters of the whole experiment are set as follows: the number of layers of one-dimensional convolution is 1, the size of the input matrix is 10x3 (the total number of roads is 3, and the traffic data of the previous 10 moments is predicted, that is, d=10, the length of the convolution kernel is 1, The number of convolution kernels is 3, the filling method is "padding" and the activation function is relu:max{x,0}; the output units of the NestedLSTM layer are all 64, and the number of layers is set to 2; the number of output units of the fully connected layer is 1, that is, the prediction traffic flow at the next moment.

3)实验结果3) Experimental results

在实验中,分别对这3条道路的交通流量进行了预测,同时将本方法和LSTM神经网络、NLSTMs神经网络方法进行了比较,结果统计分析如表1所示:In the experiment, the traffic flow of these three roads was predicted respectively, and the method was compared with LSTM neural network and NLSTMs neural network method. The statistical analysis of the results is shown in Table 1:

表1。Table 1.

Claims (5)

1. a kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure, which is characterized in that the side Method the following steps are included:
(1), the traffic flow data matrix of associated road is constructed, and data are pre-processed: selection prediction road and its correlation Join the traffic flow data of road, constructs traffic flow data matrix, and it is normalized;
(2), road traffic flow space-time characteristic is extracted based on traffic flow data matrix: using one-dimensional convolutional network to traffic flow data The traffic flow data of synchronization different sections of highway extracts space characteristics in matrix, obtains the sequence data with space characteristics, then The temporal aspect in the sequence data is extracted using NLSTMs neural network, to obtain road traffic flow space-time characteristic;
(3), road traffic flow prediction model is constructed based on road traffic flow space-time characteristic: using full articulamentum to obtained road Traffic flow space-time characteristic makees regression forecasting, obtains future time instance without the prediction result of the road traffic flow of renormalization, and Model parameter is continued to optimize using back-propagation algorithm according to the result of mean square error, maps result eventually by renormalization For actual traffic flow value;
(4), verify road traffic flow prediction model: using training complete model to the road traffic flow data in test set into Row prediction compares prediction result and actual value to test model performance.
2. a kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure as described in claim 1, It is characterized in that, the process of the step (1) is as follows:
First, it is assumed that predicting the magnitude of traffic flow of road k, then the magnitude of traffic flow number of the road and its associated road is chosen According to for constructing traffic flow data matrix X ', form is as follows:
Wherein, column vector respectively represents the traffic flow sequence data of m different sections of highway, and row vector represents the n moment of different roads Traffic flow data, then x 'itFor the original traffic flow data of t moment road i;
According to the time series of road traffic flow, training data and test data, division proportion 8:2 are splitted data into;
Then road traffic flow data is normalized using maxmin criterion method, process is as follows:
Wherein, x 'max, x 'minMaximin respectively in original traffic flow data, xitFor t moment road i after pretreatment The magnitude of traffic flow enables Pt=[x1t,x2t,…,xmt], indicate the traffic flow modes of t moment difference road, then by pretreated Traffic flow data matrix X are as follows:
3. a kind of road traffic flow prediction side based on Conv1D-NLSTMs neural network structure as claimed in claim 1 or 2 Method, which is characterized in that in the step (2), to the P at each momenttMake one-dimensional convolution operation, extracts road traffic flow data Space characteristics, calculating process are as follows:
st=f (Wp*Pt+bp) (4)
Wherein, WpIndicate weight matrix, bpIndicating bias term, * indicates that convolution algorithm, f indicate activation primitive relu:max { x, 0 }, stIndicate that one-dimensional convolution algorithm obtains as a result, the space characteristics of the road traffic flow data then extracted are S=[s1,s2,…, sn]T
It before space characteristics are input to NLSTMs neural network, needs to make space characteristics S formal transformation, converts Form is as follows:
Wherein, d indicates to take d continuous data before road traffic flow to predict the magnitude of traffic flow of subsequent time, S '=[xd, xd+1,…,xn-1]T, n >=d, it is after representation space eigentransformation as a result, then the input of NLSTMs neural network be xt,d≤t≤n- 1, and its sample number is n-d;
NLSTMs neural network is divided into inside and outside 2 parts, the update of external LSTM neural network location mode and door control mechanism It is expressed as following equation:
it=σ (xtWxi+ht-1Whi+bi) (6)
ft=σ (xtWxf+ht-1Whf+bf) (7)
ot=σ (xtWxo+ht-1Who+bo) (9)
ht=ot·σ(ct) (10)
Wherein, dot product is indicated, σ () indicates sigmoid function, Wxf、Wxi、WxoIt indicates external and forgets door, input gate, out gate Input weight matrix, Whf、Whi、WhoIndicate the external previous moment output weight matrix for forgeing door, input gate, out gate, bf、bi、boIndicate the external bias matrix for forgeing door, input gate, out gate, it、ft、ct、ot、htIt indicates external input door, forget The output of door, location mode, out gate, memory unit,Then indicate the output of memory internal unit;
The state of its calculation formula for being internally embedded LSTM neural network unit and LSTM neural network updates and door control mechanism meter Calculation formula is similar, and expression formula is as follows:
Wherein, dot product is indicated, σ () indicates sigmoid function,Indicate internal input, WxcIndicate the internal weight inputted Matrix, WhcIndicate the internal previous moment state cell weight matrix inputted, bcIndicate the internal bias matrix inputted,Indicate the internal input weight matrix for forgeing door, input gate, state cell, out gate, Indicate the internal previous moment output weight for forgeing door, input gate, state cell, out gate Matrix,Indicate the internal bias matrix for forgeing door, input gate, state cell, out gate,The output for indicating internal input gate, forgeing door, location mode, out gate, memory unit, therefore The final output of NLSTMs neural network, i.e. road traffic flow space-time characteristic are H=ht
4. a kind of road traffic flow prediction side based on Conv1D-NLSTMs neural network structure as claimed in claim 1 or 2 Method, which is characterized in that the process of the step (3) is as follows:
Firstly, inputting road traffic flow space-time characteristic H as full articulamentum, lower a period of time based on input traffic flow data is predicted Carve magnitude of traffic flow yt, it is as follows that expression formula is connected entirely:
yt=Wh·H (18)
Wherein, WhFor the weight matrix of full articulamentum, and ytCorresponding true value Yt=xK, t+1,d≤t≤n-1;
Then defining mean square error is loss function L:
Then the loss function L of computation model continues to optimize model parameter using back-propagation algorithm realization, backpropagation Gradient in algorithm is calculated to be realized by Adam optimizer with parameter update;
Finally, by the output y of full articulamentumtMake renormalization operation, actual traffic flow forecasting value can be obtained.
5. a kind of road traffic flow prediction side based on Conv1D-NLSTMs neural network structure as claimed in claim 1 or 2 Method, which is characterized in that in the step (4), choose absolute value mean square deviation MAE, root-mean-square error RMSE as road traffic flow The index of precision of prediction, calculation formula difference are as follows:
Wherein, b is sample number, YoFor actual traffic flow, Yo' the predicted flow rate exported for model.
CN201910352267.XA 2019-04-29 2019-04-29 A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure Pending CN110070715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910352267.XA CN110070715A (en) 2019-04-29 2019-04-29 A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910352267.XA CN110070715A (en) 2019-04-29 2019-04-29 A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure

Publications (1)

Publication Number Publication Date
CN110070715A true CN110070715A (en) 2019-07-30

Family

ID=67369433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910352267.XA Pending CN110070715A (en) 2019-04-29 2019-04-29 A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure

Country Status (1)

Country Link
CN (1) CN110070715A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111009129A (en) * 2020-01-08 2020-04-14 武汉大学 A method and device for predicting urban road traffic flow based on a spatiotemporal deep learning model
CN111292525A (en) * 2019-12-30 2020-06-16 南京艾特斯科技有限公司 Traffic flow prediction method based on neural network
CN111639787A (en) * 2020-04-28 2020-09-08 北京工商大学 Spatio-temporal data prediction method based on graph convolution network
CN111862592A (en) * 2020-05-27 2020-10-30 浙江工业大学 A Traffic Flow Prediction Method Based on RGCN
CN112530157A (en) * 2020-10-16 2021-03-19 浙江工业大学 Road traffic congestion propagation prediction method based on knowledge graph and Conv1D-LSTM-D
CN112906945A (en) * 2021-01-27 2021-06-04 昭通亮风台信息科技有限公司 Traffic flow prediction method, system and computer readable storage medium
CN112990598A (en) * 2021-03-31 2021-06-18 浙江禹贡信息科技有限公司 Reservoir water level time sequence prediction method and system
CN113159372A (en) * 2021-01-29 2021-07-23 太原理工大学 Conv1D + LSTM-based multi-step traffic flow prediction method
CN114120652A (en) * 2021-12-21 2022-03-01 重庆邮电大学 Traffic flow prediction method based on dynamic graph neural network
CN114724386A (en) * 2022-03-31 2022-07-08 温州大学 Short-time traffic flow prediction method and system under intelligent traffic and electronic equipment
CN115116226A (en) * 2022-06-24 2022-09-27 云控智行(上海)汽车科技有限公司 Highway freight car flow prediction algorithm, software and device based on deep reinforcement learning model
CN115691151A (en) * 2022-12-29 2023-02-03 浙江大华技术股份有限公司 Lane congestion prompting method, lane congestion prompting system and terminal
CN116244281A (en) * 2022-09-28 2023-06-09 北京百度网讯科技有限公司 Lane traffic flow data complement and model training method and device thereof
CN116434531A (en) * 2022-12-15 2023-07-14 上海交通大学 Short-time traffic flow prediction method based on Conv1D-LSTM model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389980A (en) * 2015-11-09 2016-03-09 上海交通大学 Short-time traffic flow prediction method based on long-time and short-time memory recurrent neural network
CN108399749A (en) * 2018-03-14 2018-08-14 西南交通大学 A kind of traffic trip needing forecasting method in short-term
CN108510741A (en) * 2018-05-24 2018-09-07 浙江工业大学 A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures
CN108647834A (en) * 2018-05-24 2018-10-12 浙江工业大学 A kind of traffic flow forecasting method based on convolutional neural networks structure
KR101951595B1 (en) * 2018-05-18 2019-02-22 한양대학교 산학협력단 Vehicle trajectory prediction system and method based on modular recurrent neural network architecture
CN109410575A (en) * 2018-10-29 2019-03-01 北京航空航天大学 A kind of road network trend prediction method based on capsule network and the long Memory Neural Networks in short-term of nested type
CN109544911A (en) * 2018-10-30 2019-03-29 中山大学 A kind of city road net traffic state prediction technique based on LSTM-CNN

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389980A (en) * 2015-11-09 2016-03-09 上海交通大学 Short-time traffic flow prediction method based on long-time and short-time memory recurrent neural network
CN108399749A (en) * 2018-03-14 2018-08-14 西南交通大学 A kind of traffic trip needing forecasting method in short-term
KR101951595B1 (en) * 2018-05-18 2019-02-22 한양대학교 산학협력단 Vehicle trajectory prediction system and method based on modular recurrent neural network architecture
CN108510741A (en) * 2018-05-24 2018-09-07 浙江工业大学 A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures
CN108647834A (en) * 2018-05-24 2018-10-12 浙江工业大学 A kind of traffic flow forecasting method based on convolutional neural networks structure
CN109410575A (en) * 2018-10-29 2019-03-01 北京航空航天大学 A kind of road network trend prediction method based on capsule network and the long Memory Neural Networks in short-term of nested type
CN109544911A (en) * 2018-10-30 2019-03-29 中山大学 A kind of city road net traffic state prediction technique based on LSTM-CNN

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NICHOLAS G. POLSON: "Deep learning for short-term traffic flow prediction", 《TRANSPORTATION RESEARCH PART C: EMERGING TECHNOLOGIES》 *
康丹青: "基于深度学习的短时交通流预测方法研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111292525A (en) * 2019-12-30 2020-06-16 南京艾特斯科技有限公司 Traffic flow prediction method based on neural network
CN111292525B (en) * 2019-12-30 2023-01-13 南京艾特斯科技有限公司 Traffic flow prediction method based on neural network
CN111009129A (en) * 2020-01-08 2020-04-14 武汉大学 A method and device for predicting urban road traffic flow based on a spatiotemporal deep learning model
CN111009129B (en) * 2020-01-08 2021-06-15 武汉大学 Urban road traffic flow prediction method and device based on spatiotemporal deep learning model
CN111639787A (en) * 2020-04-28 2020-09-08 北京工商大学 Spatio-temporal data prediction method based on graph convolution network
CN111639787B (en) * 2020-04-28 2024-03-15 北京工商大学 Spatio-temporal data prediction method based on graph convolution network
CN111862592A (en) * 2020-05-27 2020-10-30 浙江工业大学 A Traffic Flow Prediction Method Based on RGCN
CN112530157B (en) * 2020-10-16 2022-05-03 浙江工业大学 Road traffic congestion propagation prediction method based on knowledge graph and Conv1D-LSTM-D
CN112530157A (en) * 2020-10-16 2021-03-19 浙江工业大学 Road traffic congestion propagation prediction method based on knowledge graph and Conv1D-LSTM-D
CN112906945A (en) * 2021-01-27 2021-06-04 昭通亮风台信息科技有限公司 Traffic flow prediction method, system and computer readable storage medium
CN113159372A (en) * 2021-01-29 2021-07-23 太原理工大学 Conv1D + LSTM-based multi-step traffic flow prediction method
CN112990598A (en) * 2021-03-31 2021-06-18 浙江禹贡信息科技有限公司 Reservoir water level time sequence prediction method and system
CN114120652A (en) * 2021-12-21 2022-03-01 重庆邮电大学 Traffic flow prediction method based on dynamic graph neural network
CN114724386A (en) * 2022-03-31 2022-07-08 温州大学 Short-time traffic flow prediction method and system under intelligent traffic and electronic equipment
CN114724386B (en) * 2022-03-31 2023-10-27 温州大学 Short-term traffic flow prediction methods, systems and electronic devices under smart transportation
CN115116226A (en) * 2022-06-24 2022-09-27 云控智行(上海)汽车科技有限公司 Highway freight car flow prediction algorithm, software and device based on deep reinforcement learning model
CN116244281A (en) * 2022-09-28 2023-06-09 北京百度网讯科技有限公司 Lane traffic flow data complement and model training method and device thereof
CN116244281B (en) * 2022-09-28 2023-11-21 北京百度网讯科技有限公司 Lane traffic flow data complement and model training method and device thereof
CN116434531A (en) * 2022-12-15 2023-07-14 上海交通大学 Short-time traffic flow prediction method based on Conv1D-LSTM model
CN115691151A (en) * 2022-12-29 2023-02-03 浙江大华技术股份有限公司 Lane congestion prompting method, lane congestion prompting system and terminal

Similar Documents

Publication Publication Date Title
CN110070715A (en) A kind of road traffic flow prediction method based on Conv1D-NLSTMs neural network structure
CN108510741B (en) A Traffic Flow Prediction Method Based on Conv1D-LSTM Neural Network Structure
CN110021165A (en) A kind of traffic flow forecasting method based on Autoencoder-LSTM Fusion Model
CN110070713B (en) A Traffic Flow Prediction Method Based on Bidirectional Nested LSTM Neural Network
CN113053115B (en) Traffic prediction method based on multi-scale graph convolution network model
CN112418547B (en) Bus stop passenger flow prediction method based on GCN-LSTM combination model
CN109685252B (en) Building energy consumption prediction method based on cyclic neural network and multi-task learning model
CN111292525B (en) Traffic flow prediction method based on neural network
CN110223517B (en) Short-term traffic flow prediction method based on space-time correlation
CN114611792B (en) A Prediction Method of Atmospheric Ozone Concentration Based on Hybrid CNN-Transformer Model
CN110516833A (en) A Method for Predicting Road Traffic Status Based on Feature Extraction Bi-LSTM
CN109242140A (en) A kind of traffic flow forecasting method based on LSTM_Attention network
CN108764460A (en) A kind of Time Series Forecasting Methods based on time convolution sum LSTM
CN113672865A (en) Traffic flow prediction method based on depth map Gaussian process
CN111324990A (en) Porosity prediction method based on multilayer long-short term memory neural network model
CN110599766B (en) Road traffic jam propagation prediction method based on SAE-LSTM-SAD
CN111798991B (en) LSTM-based method for predicting population situation of new coronary pneumonia epidemic situation
CN108009674A (en) Air PM2.5 concentration prediction methods based on CNN and LSTM fused neural networks
CN113808396B (en) Traffic speed prediction method and system based on traffic flow data fusion
CN112991721A (en) Urban road network traffic speed prediction method based on graph convolution network node association degree
CN112053560A (en) Method, system and storage medium for short-term traffic flow prediction based on neural network
CN113935513A (en) CEEMDAN-based short-term power load prediction method
CN111862592A (en) A Traffic Flow Prediction Method Based on RGCN
CN112766600B (en) Urban area crowd flow prediction method and system
CN115063972B (en) Traffic speed prediction method and system based on graph convolution and gating circulation unit

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: 20190730

RJ01 Rejection of invention patent application after publication