WO2022241802A1 - Short-term traffic flow prediction method under complex road network, storage medium, and system - Google Patents

Short-term traffic flow prediction method under complex road network, storage medium, and system Download PDF

Info

Publication number
WO2022241802A1
WO2022241802A1 PCT/CN2021/095955 CN2021095955W WO2022241802A1 WO 2022241802 A1 WO2022241802 A1 WO 2022241802A1 CN 2021095955 W CN2021095955 W CN 2021095955W WO 2022241802 A1 WO2022241802 A1 WO 2022241802A1
Authority
WO
WIPO (PCT)
Prior art keywords
traffic flow
short
data
term
prediction
Prior art date
Application number
PCT/CN2021/095955
Other languages
French (fr)
Chinese (zh)
Inventor
黄社阳
陈建良
黄宇恒
金晓峰
杨振
Original Assignee
广州广电运通金融电子股份有限公司
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 广州广电运通金融电子股份有限公司 filed Critical 广州广电运通金融电子股份有限公司
Publication of WO2022241802A1 publication Critical patent/WO2022241802A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • 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/044Recurrent networks, e.g. Hopfield networks
    • 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
    • G06Q50/40

Definitions

  • the invention belongs to the field of smart cities and smart security, relates to smart traffic technology, and specifically relates to a short-term traffic flow prediction method, storage medium and system under complex road networks.
  • the Intelligent Transportation System (ITS for short) is a real-time, accurate and efficient comprehensive transportation management system that functions in a wide range and in all directions and is effectively integrated and applied to the entire ground traffic management system. Constructing the traffic flow guidance subsystem in ITS is one of the most effective ways to solve urban traffic congestion and improve the efficiency of road network traffic. To achieve real-time traffic control and guidance in ITS, it is necessary to have timely and accurate short-term traffic information.
  • Flow prediction provides support for it, so short-term traffic flow prediction has become a research hotspot in intelligent transportation systems.
  • Short-term traffic flow prediction is a kind of prediction in a microscopic sense, and it is one of the core contents of intelligent transportation systems. It has the characteristics of high nonlinearity and uncertainty, and is correlated with time and space.
  • the research shows that the traffic volume at a certain moment on a traffic section in the urban AC road network is related to the traffic flow of the previous sections of this section, and the traffic flow has quasi-periodic characteristics. related to traffic flow.
  • the commonly used short-term traffic flow forecasting methods include hidden Markov forecasting, BP neural network model forecasting, CNN neural network forecasting, etc.
  • This method uses the traffic flow information of the predicted road section, based on the current traffic flow information and historical traffic flow information, and uses the hidden Markov algorithm to predict the traffic flow information of the area in the next time period.
  • Short-term traffic flow forecasting method based on BP neural network
  • This method uses the traffic flow information of the predicted road section, based on the current traffic flow information and historical traffic flow information, and uses the BP neural network algorithm to predict the traffic flow information of the area in the next time period.
  • Short-term traffic flow forecasting method based on convolutional neural network :
  • This method uses the historical traffic data of the predicted road section and its upstream and downstream sections in the data set to form an input matrix.
  • the flow data of the upstream section is used as the upper half of the input matrix
  • the flow data of the downstream section is used as the lower half of the input matrix.
  • the traffic data is placed in the middle, and the convolutional neural network algorithm is used to predict the traffic flow.
  • the factors that affect the traffic flow forecasting results mainly include time factor and space factor.
  • the existing traffic flow forecasting methods consider more time factors than space factors, which affects the accuracy of traffic flow forecasting.
  • the existing short-term traffic flow forecasting methods mainly include traditional neural network forecasting algorithms such as BP, and the deep learning algorithm is rarely introduced, and the algorithm has limited ability to express data.
  • the present invention provides a short-term traffic flow prediction method, storage medium and system under complex road networks, which can solve the problem of insufficient consideration of spatial internal factors in existing traffic flow prediction methods .
  • a short-term traffic flow prediction method under a complex road network comprising:
  • step S2 Perform data cleaning and time slicing on the multi-section traffic flow obtained in step S1 to obtain multi-dimensional traffic flow data;
  • step S1 includes: S11, selecting N road sections, where N is a positive integer ⁇ 2, and the road sections include intersections and/or road section points; S12, triggering the selected road sections through ground induction coils, video triggers or GPS The data collects the traffic flow data of the N road sections.
  • step S2 includes: S21, performing data cleaning on the traffic flow data collected in step 1; S22, time slicing the data after data cleaning at a set time interval t, and cutting the data of each road section into M time intervals segment to generate N*M traffic flow data matrix.
  • step S3 includes:
  • x i ′ is the normalized traffic flow at the current moment
  • x max is the maximum value of the traffic flow at the historical moment
  • x min is the minimum value of the traffic flow at the historical moment
  • step S32 includes:
  • the attention-based long-short-term memory network LSTM layer processing of step S325 includes:
  • the output o of the long-term short-term memory network LSTM is weighted and summed with the layer weight W, and the attention coefficient a is obtained through softmax, and a is mapped to the output value through the fully connected layer:
  • o is the output of LSTM
  • W is the weight of the first layer.
  • step S326 adopts the mean square error loss, and this statistical parameter is the mean value of the sum of squares of the corresponding point errors between the predicted data and the original data, and the calculation formula is:
  • y i represents the true value of the i-th sample
  • f( xi ) represents the predicted value of the i-th sample
  • n is the number of samples.
  • the short-term traffic flow model prediction in step S4 includes:
  • the present invention also provides a computer-readable storage medium, on which computer-executable program instructions are stored, and the instructions are executed by a processor and a memory, so as to realize the foregoing method.
  • the present invention also provides a short-term traffic flow prediction system under a complex road network, the system includes a data acquisition module connected by telecommunication, a data preprocessing module, a short-term traffic flow training prediction module, a prediction effect evaluation module and a traffic flow display module ;
  • the data acquisition module includes a data acquisition unit and a timer; the data acquisition unit includes a ground sensing coil, a video monitor or a GPS assembly, and under the control of the timer, the acquisition unit synchronously collects a plurality of road sections at equal time intervals traffic flow data;
  • the data preprocessing module receives the traffic flow data of the data acquisition module, and performs data cleaning and time slicing to obtain a traffic flow data matrix;
  • the short-term traffic flow training prediction module includes a long-short-term memory network training unit and a prediction unit based on the attention mechanism, the training unit is used to train the historical traffic flow data matrix, and the prediction unit receives the current traffic flow data matrix Predict the traffic flow data in the next period;
  • the prediction effect evaluation module evaluates the accuracy of the short-term traffic flow training prediction module through a loss function
  • the traffic flow display module visually displays historical data, current real data, forecast data and forecast effects of multiple road sections.
  • the long-short-term memory network algorithm based on the attention mechanism is used to conduct model training and prediction on the collected traffic flow data, which improves the expression ability of the prediction model and the effect of model prediction.
  • Fig. 1 is the overall flowchart of the short-term traffic flow prediction method under the complex road network of the present invention
  • Figure 2 is a short-term traffic flow data collection diagram under the complex urban road network
  • Fig. 3 is a flow chart of long short-term memory network model training
  • Fig. 4 is the prediction flow chart of long short-term memory network model based on attention mechanism
  • Fig. 5 is a schematic diagram of a short-term traffic flow prediction system under a complex road network.
  • system means for distinguishing different components, elements, parts, parts or assemblies of different levels.
  • the words may be replaced by other expressions if other words can achieve the same purpose.
  • a short-term traffic flow prediction method under a complex road network see Fig. 1, the method includes the following steps.
  • Step S1 Multi-section traffic flow data collection.
  • Step S1 includes:
  • the methods of traffic flow data collection include: ground sense coil trigger collection, video trigger collection and GPS data collection and other methods. Due to the complex urban road network, wide monitoring scenarios, and various subjects involved in traffic, it is difficult to use traditional methods to accurately collect traffic flow. Considering that the infrastructure for real-time video monitoring of current traffic conditions is relatively mature, this method uses video trigger The collection method collects and monitors the traffic flow data in the road network.
  • step S2 Perform data cleaning and time slicing on the multi-section traffic flow obtained in step S1 to obtain multi-dimensional traffic flow data.
  • step S2 includes:
  • step 1 Perform data cleaning on the traffic flow data collected in step 1.
  • data cleaning includes: analyzing the number of vehicles in the data, time information, whether the collection points are valid, etc., and removing invalid data in the data set.
  • data collection is performed on the monitored N road sections at an interval of 5 seconds; finally, data preprocessing is performed to obtain N-dimensional traffic flow data.
  • step S3 short-term traffic flow model training, using a long-term short-term memory network to train the traffic flow data; step S3 includes:
  • x i ′ is the normalized traffic flow at the current moment
  • x max is the maximum value of the traffic flow at the historical moment
  • x min is the minimum value of the traffic flow at the historical moment
  • step S32 Input the normalized N*M traffic flow data matrix as a training sample into the long-term short-term memory network model for training, specifically using the traffic flow data of the previous M moments and N road sections to obtain the N*M data matrix as Training sample input; advanced features are extracted through the convolutional layer, the pooling layer reduces the number of parameters and controls overfitting, the ReLU activation function avoids mode collapse, Dropout alleviates the occurrence of overfitting, and the long-term short-term memory network (LSTM) is better Learn the associated information of time series data, and evaluate the prediction effect of model training through a mean square loss function.
  • the training steps of step S32 include:
  • the attention-based long-short-term memory network LSTM layer processing of step S325 includes:
  • the output o of the long-term short-term memory network LSTM is weighted and summed with the layer weight W, and the attention coefficient a is obtained through softmax, and a is mapped to the output value through the fully connected layer:
  • o is the output of LSTM
  • W is the weight of the first layer.
  • step S326 Evaluate the prediction effect of the model training on the data through a loss function.
  • the loss function of step S326 adopts the mean square error loss, and this statistical parameter is the mean value of the sum of squares of the corresponding point errors of the predicted data and the original data, and the calculation formula is:
  • y i represents the true value of the i-th sample
  • f( xi ) represents the predicted value of the i-th sample
  • n is the number of samples.
  • step S4 Prediction of short-term traffic flow model. Based on the trained short-term traffic flow model, long-short-term memory network is used to predict short-term traffic flow of multiple road sections under complex road network.
  • the trained model is used as a prediction model, see Fig. 4, the short-term traffic flow model prediction of step S4 includes:
  • This method can directly predict the short-term traffic flow of N predicted road sections through the long-short-term memory network classifier in the case of a complex road network, and is not limited to the traffic flow prediction of a single upstream and downstream road section.
  • the processing method is simple and effective.
  • the method proposed in this program has strong learning, memory and prediction effects for short-term traffic flow training and prediction of predicted road sections under complex road networks.
  • the short-term traffic flow prediction method under the complex road network proposed in the scheme has strong algorithm robustness, can achieve real-time performance, and has strong practicability.
  • the present invention also provides a computer-readable storage medium, on which computer instructions are stored, and the steps of the aforementioned method are executed when the computer instructions are run.
  • a computer-readable storage medium on which computer instructions are stored, and the steps of the aforementioned method are executed when the computer instructions are run.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
  • the present invention also provides a short-term traffic flow prediction system under a complex road network, as shown in Figure 5, the system includes a telecommunications-connected data acquisition module 1, a data preprocessing module 2, a short-term traffic flow training prediction module 3, and prediction effects An evaluation module 4 and a traffic flow display module 5 . in:
  • the data collection module includes a data collection unit and a timer.
  • the data acquisition unit includes a ground induction coil, a video monitor or a GPS component, and under the control of a timer, the acquisition unit collects traffic flow data of multiple road sections synchronously at equal intervals.
  • the data preprocessing module receives the traffic flow data from the data acquisition module, and performs data cleaning and time slicing to obtain a traffic flow data matrix.
  • the short-term traffic flow training prediction module includes a long-short-term memory network training unit and a prediction unit based on the attention mechanism, the training unit is used to train the historical traffic flow data matrix, and the prediction unit receives the current traffic flow data matrix Predict traffic flow data for the next period.
  • the prediction effect evaluation module evaluates the accuracy of the short-term traffic flow training prediction module through a loss function.
  • the traffic flow display module visually displays historical data, current real data, forecast data and forecast effects of multiple road sections.
  • the method of collecting N-dimensional traffic flow data of N predicted road sections is combined with the short-term traffic flow prediction method based on the long-term short-term memory network algorithm based on the attention mechanism, making full use of the long-term short-term memory network algorithm in time and space
  • the powerful learning ability of data improves the forecasting effect, is simple and effective, and has strong practicability.
  • the possible beneficial effects may be any one or a combination of the above, or any other possible beneficial effects.

Abstract

Provided are a short-term traffic flow prediction method under a complex road network, a storage medium, and a system. The method comprises: collecting traffic flow data of a plurality of road segments; performing data cleaning and time slicing on the traffic flow of the plurality of road segments to obtain multi-dimensional traffic flow data; on the basis of short-term traffic flow model training, training the traffic flow data using a long short-term memory network; and on the basis of a trained short-term traffic flow model, performing short-term traffic flow prediction on the plurality of road segments under the complex road network using the long short-term memory network. The method, under the complex road network, can directly perform, by means of a long short-term memory network classifier, short-term traffic flow prediction on N road segments to be predicted, and is not limited to traffic flow prediction of a single upstream or downstream road segment, and the processing method is simple and effective; the method has strong learning and memory capacities and a good prediction effect for short-term traffic flow training and prediction, and has strong algorithm robustness, real-time performance, and strong applicability.

Description

复杂路网下的短时交通流量预测方法、存储介质和系统Short-term traffic flow prediction method, storage medium and system under complex road network 技术领域technical field
本发明属于智慧城市及智能安全领域,涉及智能交通技术,具体为一种复杂路网下的短时交通流量预测方法、存储介质和系统。The invention belongs to the field of smart cities and smart security, relates to smart traffic technology, and specifically relates to a short-term traffic flow prediction method, storage medium and system under complex road networks.
背景技术Background technique
智能交通系统(Intelligent Transportation System,简称ITS)是有效地集成运用于整个地面交通管理系统而建立的一种在大范围内、全方位发挥作用的,实时、准确、高效的综合交通运输管理系统。构建ITS中的交通流诱导子系统,是解决城市交通拥堵和提高路网通行效率的最有效方式之一,而ITS要实现实时的交通控制和诱导,就必须要有及时、准确的短时交通流预测为其提供支持,因此短时交通流预测已经成为智能交通系统的研究热点。短期交通流量预测是一种微观意义上的预测,是智能交通系统的核心内容之一,具有高度非线性和不确定性等特点,并且与时间和空间都有相关性。研究表明,城市交流路网中交通路段上某时刻的交通量与本路段前几个时段的交通流量有关,交通流量具有准周期的特性,另外,在复杂路网中还与汇入的路网交通流量有关。The Intelligent Transportation System (ITS for short) is a real-time, accurate and efficient comprehensive transportation management system that functions in a wide range and in all directions and is effectively integrated and applied to the entire ground traffic management system. Constructing the traffic flow guidance subsystem in ITS is one of the most effective ways to solve urban traffic congestion and improve the efficiency of road network traffic. To achieve real-time traffic control and guidance in ITS, it is necessary to have timely and accurate short-term traffic information. Flow prediction provides support for it, so short-term traffic flow prediction has become a research hotspot in intelligent transportation systems. Short-term traffic flow prediction is a kind of prediction in a microscopic sense, and it is one of the core contents of intelligent transportation systems. It has the characteristics of high nonlinearity and uncertainty, and is correlated with time and space. The research shows that the traffic volume at a certain moment on a traffic section in the urban AC road network is related to the traffic flow of the previous sections of this section, and the traffic flow has quasi-periodic characteristics. related to traffic flow.
比较常用的短期交通流量预测方法包括隐马尔可夫预测、BP神经网络模型预测、CNN神经网络预测等。The commonly used short-term traffic flow forecasting methods include hidden Markov forecasting, BP neural network model forecasting, CNN neural network forecasting, etc.
基于隐马尔可夫的短期交通流量预测方法:Short-term traffic flow forecasting method based on hidden Markov:
该方法使用预测路段交通流量信息,基于当前的交通流量信息和历史交通流量信息,采用隐马尔可夫算法预测下一时间段该区域的交通流量信息。This method uses the traffic flow information of the predicted road section, based on the current traffic flow information and historical traffic flow information, and uses the hidden Markov algorithm to predict the traffic flow information of the area in the next time period.
基于BP神经网络的短期交通流量预测方法:Short-term traffic flow forecasting method based on BP neural network:
该方法使用预测路段交通流量信息,基于当前的交通流量信息和历史交通 流量信息,采用BP神经网络算法预测下一时间段该区域的交通流量信息。This method uses the traffic flow information of the predicted road section, based on the current traffic flow information and historical traffic flow information, and uses the BP neural network algorithm to predict the traffic flow information of the area in the next time period.
基于卷积神经网络的短期交通流量预测方法:Short-term traffic flow forecasting method based on convolutional neural network:
该方法使用数据集中预测路段及其上下游路段的历史流量数据构成输入矩阵,将上游路段的流量数据作为输入矩阵的上半部分,下游路段的流量数据作为输入矩阵的下半部分,预测路段的流量数据放在中间,采用卷积神经网络算法预测交通流量。This method uses the historical traffic data of the predicted road section and its upstream and downstream sections in the data set to form an input matrix. The flow data of the upstream section is used as the upper half of the input matrix, and the flow data of the downstream section is used as the lower half of the input matrix. The traffic data is placed in the middle, and the convolutional neural network algorithm is used to predict the traffic flow.
影响交通流量预测结果的因素主要有时间因素和空间因素。目前已有的交通流量预测方法,考虑较多的是时间因素,在空间因素方面考虑的较少,影响了交通流量预测准确率。The factors that affect the traffic flow forecasting results mainly include time factor and space factor. The existing traffic flow forecasting methods consider more time factors than space factors, which affects the accuracy of traffic flow forecasting.
其次,在城市复杂路网下,只考虑一条路段的短时交通流量,并预测下一时间段的交通流量,存在信息利用不完整而影响预测准确率的问题。现有的短时交通流量预测方法主要有BP等传统神经网络预测算法,在深度学习算法方面引入较少,算法对数据的表达能力有限。Secondly, under the complex urban road network, only considering the short-term traffic flow of one road section and predicting the traffic flow of the next time period, there is a problem that the information utilization is incomplete and affects the prediction accuracy. The existing short-term traffic flow forecasting methods mainly include traditional neural network forecasting algorithms such as BP, and the deep learning algorithm is rarely introduced, and the algorithm has limited ability to express data.
发明内容Contents of the invention
为了克服现有技术的不足,本发明提供了一种复杂路网下的短时交通流量预测方法、存储介质和系统,其能解决目前已有的交通流量预测方法在空间内在因素考虑不足的问题。In order to overcome the deficiencies of the prior art, the present invention provides a short-term traffic flow prediction method, storage medium and system under complex road networks, which can solve the problem of insufficient consideration of spatial internal factors in existing traffic flow prediction methods .
设计原理:由于短时交通流量预测受两方面影响:时间因素,空间因素。故本方案提出采用N个预测路段的历史流量数据,采用长短期记忆网络对交通流量数据进行预测。Design principle: Because the short-term traffic flow prediction is affected by two aspects: time factor and space factor. Therefore, this scheme proposes to use the historical flow data of N predicted road sections, and use the long-term short-term memory network to predict the traffic flow data.
设计方案:为解决前述问题,本发明的具体方案如下。Design scheme: in order to solve the aforementioned problems, the specific scheme of the present invention is as follows.
一种复杂路网下的短时交通流量预测方法,方法包括:A short-term traffic flow prediction method under a complex road network, the method comprising:
S1、多路段交通流量数据采集;S1. Multi-section traffic flow data collection;
S2、对步骤S1获得的多路段交通流量进行数据清洗和时间切片,获得多维车流量数据;S2. Perform data cleaning and time slicing on the multi-section traffic flow obtained in step S1 to obtain multi-dimensional traffic flow data;
S3、短时交通流量模型训练,采用长短期记忆网络对交通流量数据进行训练;S3. Short-term traffic flow model training, using long-term short-term memory network to train traffic flow data;
S4、短时交通流量模型预测,基于训练好的短时交通流量模型,采用长短期记忆网络对复杂路网下的多个路段进行短时交通流量预测。S4. Prediction of short-term traffic flow model. Based on the trained short-term traffic flow model, long-short-term memory network is used to predict short-term traffic flow of multiple road sections under complex road network.
进一步的,步骤S1包括:S11、选取N个路段,N为≥2的正整数,所述路段包括路口和/或路段点位;S12、对选取的路段通过地感线圈触发、视频触发或GPS数据采集所述N个路段的交通流量数据。Further, step S1 includes: S11, selecting N road sections, where N is a positive integer ≥ 2, and the road sections include intersections and/or road section points; S12, triggering the selected road sections through ground induction coils, video triggers or GPS The data collects the traffic flow data of the N road sections.
进一步的,步骤S2包括:S21、对步骤1采集的交通流量数据进行数据清洗;S22、以设定的时间间隔t对数据清洗后的数据进行时间切片,每个路段的数据切割成M个时间段,以此生成N*M车流量数据矩阵。Further, step S2 includes: S21, performing data cleaning on the traffic flow data collected in step 1; S22, time slicing the data after data cleaning at a set time interval t, and cutting the data of each road section into M time intervals segment to generate N*M traffic flow data matrix.
进一步的,步骤S3包括:Further, step S3 includes:
S31、交通流量数据预处理,对步骤S2获得的交通流量数据进行归一化处理,归一化后的当前时刻的交通流量x i'为: S31. Traffic flow data preprocessing, normalize the traffic flow data obtained in step S2, the normalized traffic flow x i ' at the current moment is:
Figure PCTCN2021095955-appb-000001
Figure PCTCN2021095955-appb-000001
式中,x i′为归一化后的当前时刻的交通流量,x max为历史时刻的交通流量最大值,x min为历史时刻的交通流量最小值; In the formula, x i ′ is the normalized traffic flow at the current moment, x max is the maximum value of the traffic flow at the historical moment, and x min is the minimum value of the traffic flow at the historical moment;
S32、将归一化后的N*M车流量数据矩阵作为训练样本输入长短期记忆网络模型进行训练。S32. Input the normalized N*M traffic flow data matrix as a training sample into the long-short-term memory network model for training.
进一步的,步骤S32包括:Further, step S32 includes:
S321、矩阵通过卷积层提取高级特征;S321, the matrix extracts advanced features through the convolution layer;
S322、池化层处理,以减少参数的数量和控制过拟合;S322, pooling layer processing, to reduce the number of parameters and control overfitting;
S323、激活函数处理,采用ReLU激活函数处理,以避免模式崩溃;S323, activation function processing, using ReLU activation function processing to avoid mode collapse;
S324、Dropout层处理,以缓解过拟合的发生;S324, Dropout layer processing, to alleviate the occurrence of overfitting;
S325、基于注意力机制,通过长短期记忆网络LSTM层的学习时间序列数据的关联信息,以提升模型训练效果;S325. Based on the attention mechanism, learn the associated information of the time series data through the LSTM layer of the long short-term memory network to improve the model training effect;
S326、数据经损失函数评定模型训练的预测效果。S326. Evaluate the prediction effect of the model training on the data through a loss function.
进一步的,步骤S325的基于注意力机制的长短期记忆网络LSTM层处理包括:Further, the attention-based long-short-term memory network LSTM layer processing of step S325 includes:
将长短期记忆网络LSTM的输出o与层权重W加权求和,并通过softmax得到注意力系数a,通过全连接层将a映射到输出值:The output o of the long-term short-term memory network LSTM is weighted and summed with the layer weight W, and the attention coefficient a is obtained through softmax, and a is mapped to the output value through the fully connected layer:
a=softmax(w Tsigmoid(o))………………………………………式2 a=softmax(w T sigmoid(o))……………………………Formula 2
output=sigmoid(w T(oa T))………………………………………式3 output=sigmoid(w T (oa T ))……………………………Formula 3
式中,o为LSTM的输出,W为第一层权重。In the formula, o is the output of LSTM, and W is the weight of the first layer.
进一步的,步骤S326的损失函数采用均方方差损失,该统计参数是预测数据和原始数据对应点误差的平方和的均值,计算公式为:Further, the loss function in step S326 adopts the mean square error loss, and this statistical parameter is the mean value of the sum of squares of the corresponding point errors between the predicted data and the original data, and the calculation formula is:
Figure PCTCN2021095955-appb-000002
Figure PCTCN2021095955-appb-000002
式中,y i表示第i个样本的真实值; In the formula, y i represents the true value of the i-th sample;
f(x i)表示第i个样本的预测值; f( xi ) represents the predicted value of the i-th sample;
n为样本个数。n is the number of samples.
进一步的,步骤S4的短时交通流量模型预测包括:Further, the short-term traffic flow model prediction in step S4 includes:
S41、采集前M个时间段的车流量数据,并进行数据归一化处理;S41. Collect the traffic flow data of the previous M time periods, and perform data normalization processing;
S42、将归一化后车流量数据矩阵输入长短期记忆网络模型进行多路段的短时交通流量预测。S42. Input the normalized traffic flow data matrix into the long-short-term memory network model to predict the short-term traffic flow of multiple road sections.
本发明还提供了一种计算机可读存储介质,其上存储有计算机可执行程序指令,通过处理器和存储器执行所述指令,用于实现前述方法。The present invention also provides a computer-readable storage medium, on which computer-executable program instructions are stored, and the instructions are executed by a processor and a memory, so as to realize the foregoing method.
本发明还提供了一种复杂路网下的短时交通流量预测系统,系统包括电讯连接的数据采集模块、数据预处理模块、短时交通流量训练预测模块、预测效果评估模块和交通流量显示模块;The present invention also provides a short-term traffic flow prediction system under a complex road network, the system includes a data acquisition module connected by telecommunication, a data preprocessing module, a short-term traffic flow training prediction module, a prediction effect evaluation module and a traffic flow display module ;
所述数据采集模块包括数据采集单元和计时器;所述数据采集单元包括地感线圈、视频监测器或GPS组件,在计时器的控制下所述采集单元等时段间隔的同步采集多个路段的交通流量数据;The data acquisition module includes a data acquisition unit and a timer; the data acquisition unit includes a ground sensing coil, a video monitor or a GPS assembly, and under the control of the timer, the acquisition unit synchronously collects a plurality of road sections at equal time intervals traffic flow data;
所述数据预处理模块接收数据采集模块的交通流量数据,并进行数据清洗和时间切片,以获得车流量数据矩阵;The data preprocessing module receives the traffic flow data of the data acquisition module, and performs data cleaning and time slicing to obtain a traffic flow data matrix;
所述短时交通流量训练预测模块包括基于注意力机制的长短期记忆网络训练单元和预测单元,所述训练单元用于将历史车流量数据矩阵进行训练,所述预测单元接收当前车流量数据矩阵预测下一时段的车流量数据;The short-term traffic flow training prediction module includes a long-short-term memory network training unit and a prediction unit based on the attention mechanism, the training unit is used to train the historical traffic flow data matrix, and the prediction unit receives the current traffic flow data matrix Predict the traffic flow data in the next period;
所述预测效果评估模块通过损失函数评估所述短时交通流量训练预测模块的准确性;The prediction effect evaluation module evaluates the accuracy of the short-term traffic flow training prediction module through a loss function;
所述交通流量显示模块可视化显示多路段的历史数据、当前真实数据、预测数据和预测效果。The traffic flow display module visually displays historical data, current real data, forecast data and forecast effects of multiple road sections.
相比现有技术,本发明的有益效果在于:Compared with the prior art, the beneficial effects of the present invention are:
1、提出加入相交路网的N个路段的交通流量数据,包括多个交通路口的数据,充分考虑了交通流量不但与上下游道路上流量值的变化有关,还与其相连的其他道路交通流量数据,较好的解决了城市复杂路网下的短时交通流量预测空间因素方面考虑较少的问题,对交通流量预测具有积极的作用。1. Proposed to add the traffic flow data of N sections of the intersecting road network, including the data of multiple traffic intersections, fully considering that the traffic flow is not only related to the change of flow value on the upstream and downstream roads, but also the traffic flow data of other roads connected to it , it better solves the problem of less consideration of spatial factors in short-term traffic flow prediction under urban complex road network, and has a positive effect on traffic flow prediction.
2、采用基于注意力机制的长短期记忆网络算法对采集的交通流量数据进行模型训练和预测,提升了预测模型的表达能力和模型预测的效果。2. The long-short-term memory network algorithm based on the attention mechanism is used to conduct model training and prediction on the collected traffic flow data, which improves the expression ability of the prediction model and the effect of model prediction.
附图说明Description of drawings
图1为本发明复杂路网下的短时交通流量预测方法总体流程图;Fig. 1 is the overall flowchart of the short-term traffic flow prediction method under the complex road network of the present invention;
图2为城市复杂路网下的短时交通流量数据采集图;Figure 2 is a short-term traffic flow data collection diagram under the complex urban road network;
图3为长短期记忆网络模型训练流程图;Fig. 3 is a flow chart of long short-term memory network model training;
图4为基于注意力机制的长短期记忆网络模型预测流程图;Fig. 4 is the prediction flow chart of long short-term memory network model based on attention mechanism;
图5为复杂路网下的短时交通流量预测系统的示意图。Fig. 5 is a schematic diagram of a short-term traffic flow prediction system under a complex road network.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
应当理解,本说明书中所使用的“系统”、“装置”、“单元”和/或“模组”是用于区分不同级别的不同组件、元件、部件、部分或装配的一种方法。然而,如果其他词语可实现相同的目的,则可通过其他表达来替换所述词语。It should be understood that "system", "device", "unit" and/or "module" used in this specification is a method for distinguishing different components, elements, parts, parts or assemblies of different levels. However, the words may be replaced by other expressions if other words can achieve the same purpose.
第一实施例first embodiment
一种复杂路网下的短时交通流量预测方法,参见图1,方法包括以下步骤。A short-term traffic flow prediction method under a complex road network, see Fig. 1, the method includes the following steps.
S1、多路段交通流量数据采集。步骤S1包括:S1. Multi-section traffic flow data collection. Step S1 includes:
S11、选取N个路段,N为≥2的正整数,所述路段包括路口和/或路段点位;S11. Select N road sections, where N is a positive integer ≥ 2, and the road sections include intersections and/or road section points;
S12、对选取的路段通过地感线圈触发、视频触发或GPS数据采集所述N个路段的交通流量数据。S12. Collect the traffic flow data of the N road sections for the selected road sections through ground induction coil triggering, video triggering or GPS data.
交通流量数据采集的方法有:地感线圈触发采集、视频触发采集和GPS数据采集等方法。由于城市路网复杂、监控场景广阔、参与交通的主体多样,较难采用传统的方法对车流量进行较准确的采集,考虑到当前交通路况实时视频监控的基础设施比较成熟,本方法采用视频触发采集的方法采集监控路网中的交通流量数据。The methods of traffic flow data collection include: ground sense coil trigger collection, video trigger collection and GPS data collection and other methods. Due to the complex urban road network, wide monitoring scenarios, and various subjects involved in traffic, it is difficult to use traditional methods to accurately collect traffic flow. Considering that the infrastructure for real-time video monitoring of current traffic conditions is relatively mature, this method uses video trigger The collection method collects and monitors the traffic flow data in the road network.
S2、对步骤S1获得的多路段交通流量进行数据清洗和时间切片,获得多维车流量数据。参见图2,步骤S2包括:S2. Perform data cleaning and time slicing on the multi-section traffic flow obtained in step S1 to obtain multi-dimensional traffic flow data. Referring to Fig. 2, step S2 includes:
S21、对步骤1采集的交通流量数据进行数据清洗。其中,数据清洗包括:对数据中的车辆数量、时间信息、采集点位是否有效等进行分析,去除数据集中的无效数据。S21. Perform data cleaning on the traffic flow data collected in step 1. Among them, data cleaning includes: analyzing the number of vehicles in the data, time information, whether the collection points are valid, etc., and removing invalid data in the data set.
S22、以设定的时间间隔t对数据清洗后的数据进行时间切片,每个路段的数据切割成M个时间段,以此生成N*M车流量数据矩阵。S22. Perform time slicing on the cleaned data at a set time interval t, and cut the data of each road segment into M time segments, so as to generate an N*M traffic flow data matrix.
具体的,以5秒为一个间隔对监控的N个路段进行数据采集;最后,数据预处理得到N维交通流量数据。Specifically, data collection is performed on the monitored N road sections at an interval of 5 seconds; finally, data preprocessing is performed to obtain N-dimensional traffic flow data.
S3、短时交通流量模型训练,采用长短期记忆网络对交通流量数据进行训练;步骤S3包括:S3, short-term traffic flow model training, using a long-term short-term memory network to train the traffic flow data; step S3 includes:
S31、交通流量数据预处理,对步骤S2获得的交通流量数据进行归一化处理,归一化后的当前时刻的交通流量x i'为: S31. Traffic flow data preprocessing, normalize the traffic flow data obtained in step S2, the normalized traffic flow x i ' at the current moment is:
Figure PCTCN2021095955-appb-000003
Figure PCTCN2021095955-appb-000003
式中,x i′为归一化后的当前时刻的交通流量,x max为历史时刻的交通流量最大值,x min为历史时刻的交通流量最小值; In the formula, x i ′ is the normalized traffic flow at the current moment, x max is the maximum value of the traffic flow at the historical moment, and x min is the minimum value of the traffic flow at the historical moment;
S32、将归一化后的N*M车流量数据矩阵作为训练样本输入长短期记忆网络模型进行训练,具体为采用前M个时刻和N个路段的交通流量数据,得到N*M数据矩阵作为训练样本输入;通过卷积层提取高级特征,池化层减少参数的数量和控制过拟合,ReLU激活函数避免模式崩溃,Dropout缓解过拟合的发生,长短期记忆网络(LSTM)较好的学习时间序列数据的关联信息,经过一个均方损失函数评定模型训练的预测效果。参见图3,步骤S32的训练步骤包括:S32. Input the normalized N*M traffic flow data matrix as a training sample into the long-term short-term memory network model for training, specifically using the traffic flow data of the previous M moments and N road sections to obtain the N*M data matrix as Training sample input; advanced features are extracted through the convolutional layer, the pooling layer reduces the number of parameters and controls overfitting, the ReLU activation function avoids mode collapse, Dropout alleviates the occurrence of overfitting, and the long-term short-term memory network (LSTM) is better Learn the associated information of time series data, and evaluate the prediction effect of model training through a mean square loss function. Referring to Fig. 3, the training steps of step S32 include:
S321、矩阵通过卷积层提取高级特征;S321, the matrix extracts advanced features through the convolution layer;
S322、池化层处理,以减少参数的数量和控制过拟合;S322, pooling layer processing, to reduce the number of parameters and control overfitting;
S323、激活函数处理,采用ReLU激活函数处理,以避免模式崩溃;S323, activation function processing, using ReLU activation function processing to avoid mode collapse;
S324、Dropout层处理,以缓解过拟合的发生;S324, Dropout layer processing, to alleviate the occurrence of overfitting;
S325、基于注意力机制,通过长短期记忆网络LSTM层的学习时间序列数据的关联信息,以提升模型训练效果。这是因为在交通流量预测中,考虑到长序列时,依赖关系就会陷入瓶颈,因此需要引进注意力机制后的模型。具体的,步骤S325的基于注意力机制的长短期记忆网络LSTM层处理包括:S325. Based on the attention mechanism, learn the association information of the time series data through the LSTM layer of the long short-term memory network, so as to improve the model training effect. This is because in traffic flow prediction, when long sequences are considered, the dependencies will be bottlenecked, so the model after the introduction of attention mechanism is required. Specifically, the attention-based long-short-term memory network LSTM layer processing of step S325 includes:
将长短期记忆网络LSTM的输出o与层权重W加权求和,并通过softmax 得到注意力系数a,通过全连接层将a映射到输出值:The output o of the long-term short-term memory network LSTM is weighted and summed with the layer weight W, and the attention coefficient a is obtained through softmax, and a is mapped to the output value through the fully connected layer:
a=softmax(w Tsigmoid(o))………………………………………式2 a=softmax(w T sigmoid(o))……………………………Formula 2
output=sigmoid(w T(oa T))………………………………………式3 output=sigmoid(w T (oa T ))……………………………Formula 3
式中,o为LSTM的输出,W为第一层权重。In the formula, o is the output of LSTM, and W is the weight of the first layer.
S326、数据经损失函数评定模型训练的预测效果。步骤S326的损失函数采用均方方差损失,该统计参数是预测数据和原始数据对应点误差的平方和的均值,计算公式为:S326. Evaluate the prediction effect of the model training on the data through a loss function. The loss function of step S326 adopts the mean square error loss, and this statistical parameter is the mean value of the sum of squares of the corresponding point errors of the predicted data and the original data, and the calculation formula is:
Figure PCTCN2021095955-appb-000004
Figure PCTCN2021095955-appb-000004
式中,y i表示第i个样本的真实值; In the formula, y i represents the true value of the i-th sample;
f(x i)表示第i个样本的预测值; f( xi ) represents the predicted value of the i-th sample;
n为样本个数。n is the number of samples.
S4、短时交通流量模型预测,基于训练好的短时交通流量模型,采用长短期记忆网络对复杂路网下的多个路段进行短时交通流量预测。将训练好的模型作为预测模型,参见图4,步骤S4的短时交通流量模型预测包括:S4. Prediction of short-term traffic flow model. Based on the trained short-term traffic flow model, long-short-term memory network is used to predict short-term traffic flow of multiple road sections under complex road network. The trained model is used as a prediction model, see Fig. 4, the short-term traffic flow model prediction of step S4 includes:
S41、采集前M个时间段的车流量数据,并进行数据归一化处理;S41. Collect the traffic flow data of the previous M time periods, and perform data normalization processing;
S42、将归一化后车流量数据矩阵输入长短期记忆网络模型进行多路段的短时交通流量预测。S42. Input the normalized traffic flow data matrix into the long-short-term memory network model to predict the short-term traffic flow of multiple road sections.
本方法可以对复杂路网的情况下,通过长短期记忆网络分类器直接对N个预测路段进行短时交通流量预测,不限于上下游单一路段的交通流量预测,处理方法简单有效。本方案提出的方法对复杂路网下预测路段的短时交通流量训练和预测具有强大的学习、记忆能力和预测效果。方案中提出的复杂路网下 的短时交通流量预测方法,算法鲁棒性较强,可以达到实时性,具有较强的实用性。This method can directly predict the short-term traffic flow of N predicted road sections through the long-short-term memory network classifier in the case of a complex road network, and is not limited to the traffic flow prediction of a single upstream and downstream road section. The processing method is simple and effective. The method proposed in this program has strong learning, memory and prediction effects for short-term traffic flow training and prediction of predicted road sections under complex road networks. The short-term traffic flow prediction method under the complex road network proposed in the scheme has strong algorithm robustness, can achieve real-time performance, and has strong practicability.
第二实施例second embodiment
本发明还提供了一种计算机可读存储介质,其上存储有计算机指令,所述计算机指令运行时执行前述方法的步骤。其中,所述方法请参见前述部分的详细介绍,此处不再赘述。The present invention also provides a computer-readable storage medium, on which computer instructions are stored, and the steps of the aforementioned method are executed when the computer instructions are run. Wherein, for the method, please refer to the detailed introduction in the foregoing part, and details will not be repeated here.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the computer-readable medium includes permanent Both non-permanent and non-permanent, removable and non-removable media can be implemented by any method or technology for information storage. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
第三实施例third embodiment
本发明还提供了一种复杂路网下的短时交通流量预测系统,参见图5,系统包括电讯连接的数据采集模块1、数据预处理模块2、短时交通流量训练预测模块3、预测效果评估模块4和交通流量显示模块5。其中:The present invention also provides a short-term traffic flow prediction system under a complex road network, as shown in Figure 5, the system includes a telecommunications-connected data acquisition module 1, a data preprocessing module 2, a short-term traffic flow training prediction module 3, and prediction effects An evaluation module 4 and a traffic flow display module 5 . in:
所述数据采集模块包括数据采集单元和计时器。所述数据采集单元包括地 感线圈、视频监测器或GPS组件,在计时器的控制下所述采集单元等时段间隔的同步采集多个路段的交通流量数据。The data collection module includes a data collection unit and a timer. The data acquisition unit includes a ground induction coil, a video monitor or a GPS component, and under the control of a timer, the acquisition unit collects traffic flow data of multiple road sections synchronously at equal intervals.
所述数据预处理模块接收数据采集模块的交通流量数据,并进行数据清洗和时间切片,以获得车流量数据矩阵。The data preprocessing module receives the traffic flow data from the data acquisition module, and performs data cleaning and time slicing to obtain a traffic flow data matrix.
所述短时交通流量训练预测模块包括基于注意力机制的长短期记忆网络训练单元和预测单元,所述训练单元用于将历史车流量数据矩阵进行训练,所述预测单元接收当前车流量数据矩阵预测下一时段的车流量数据。The short-term traffic flow training prediction module includes a long-short-term memory network training unit and a prediction unit based on the attention mechanism, the training unit is used to train the historical traffic flow data matrix, and the prediction unit receives the current traffic flow data matrix Predict traffic flow data for the next period.
所述预测效果评估模块通过损失函数评估所述短时交通流量训练预测模块的准确性。The prediction effect evaluation module evaluates the accuracy of the short-term traffic flow training prediction module through a loss function.
所述交通流量显示模块可视化显示多路段的历史数据、当前真实数据、预测数据和预测效果。The traffic flow display module visually displays historical data, current real data, forecast data and forecast effects of multiple road sections.
综上,本发明的设计要点为:In summary, the design points of the present invention are:
1.提出N个预测路段的N维交通流量数据采集;1. Propose N-dimensional traffic flow data collection for N predicted road sections;
2.提出基于长短期记忆网络的短时交通流量预测;2. Proposed short-term traffic flow prediction based on long short-term memory network;
3.提出采用基于注意力机制的长短期记忆网络的短时交通流量预测;3. Propose short-term traffic flow prediction using long short-term memory network based on attention mechanism;
4.其中N个预测路段的N维交通流量数据采集的方法和基于注意力机制的长短期记忆网络算法的短时交通流量预测方法相结合,充分利用了长短期记忆网络算法在时间和空间上对数据的强大学习能力,提升了预测效果,实现简单且有效,具有较强的实用性。4. The method of collecting N-dimensional traffic flow data of N predicted road sections is combined with the short-term traffic flow prediction method based on the long-term short-term memory network algorithm based on the attention mechanism, making full use of the long-term short-term memory network algorithm in time and space The powerful learning ability of data improves the forecasting effect, is simple and effective, and has strong practicability.
需要说明的是,不同实施例可能产生的有益效果不同,在不同的实施例里,可能产生的有益效果可以是以上任意一种或几种的组合,也可以是其他任何可能获得的有益效果。It should be noted that different embodiments may have different beneficial effects. In different embodiments, the possible beneficial effects may be any one or a combination of the above, or any other possible beneficial effects.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

  1. 一种复杂路网下的短时交通流量预测方法,其特征在于,方法包括:A short-term traffic flow prediction method under a complex road network, characterized in that the method includes:
    S1、多路段交通流量数据采集;S1. Multi-section traffic flow data collection;
    S2、对步骤S1获得的多路段交通流量进行数据清洗和时间切片,获得多维车流量数据;S2. Perform data cleaning and time slicing on the multi-section traffic flow obtained in step S1 to obtain multi-dimensional traffic flow data;
    S3、短时交通流量模型训练,采用长短期记忆网络对交通流量数据进行训练;S3. Short-term traffic flow model training, using long-term short-term memory network to train traffic flow data;
    S4、短时交通流量模型预测,基于训练好的短时交通流量模型,采用长短期记忆网络对复杂路网下的多个路段进行短时交通流量预测。S4. Prediction of short-term traffic flow model. Based on the trained short-term traffic flow model, long-short-term memory network is used to predict short-term traffic flow of multiple road sections under complex road network.
  2. 根据权利要求1所述的短时交通流量预测方法,其特征在于,步骤S1包括:The short-term traffic flow forecasting method according to claim 1, wherein step S1 comprises:
    S11、选取N个路段,N为≥2的正整数,所述路段包括路口和/或路段点位;S11. Select N road sections, where N is a positive integer ≥ 2, and the road sections include intersections and/or road section points;
    S12、对选取的路段通过地感线圈触发、视频触发或GPS数据采集所述N个路段的交通流量数据。S12. Collect the traffic flow data of the N road sections for the selected road sections through ground induction coil triggering, video triggering or GPS data.
  3. 根据权利要求2所述的短时交通流量预测方法,其特征在于,步骤S2包括:The short-term traffic flow forecasting method according to claim 2, wherein step S2 comprises:
    S21、对步骤1采集的交通流量数据进行数据清洗;S21. Perform data cleaning on the traffic flow data collected in step 1;
    S22、以设定的时间间隔t对数据清洗后的数据进行时间切片,每个路段的数据切割成M个时间段,以此生成N*M车流量数据矩阵。S22. Perform time slicing on the cleaned data at a set time interval t, and cut the data of each road segment into M time segments, so as to generate an N*M traffic flow data matrix.
  4. 根据权利要求3所述的短时交通流量预测方法,其特征在于,步骤S3包括:The short-term traffic flow forecasting method according to claim 3, wherein step S3 comprises:
    S31、交通流量数据预处理,对步骤S2获得的交通流量数据进行归一化处 理,归一化后的当前时刻的交通流量x i'为: S31. Traffic flow data preprocessing, normalize the traffic flow data obtained in step S2, the normalized traffic flow x i ' at the current moment is:
    Figure PCTCN2021095955-appb-100001
    Figure PCTCN2021095955-appb-100001
    式中,x′ i为归一化后的当前时刻的交通流量,x max为历史时刻的交通流量最大值,x min为历史时刻的交通流量最小值; In the formula, x′ i is the normalized traffic flow at the current moment, x max is the maximum value of the traffic flow at the historical moment, and x min is the minimum value of the traffic flow at the historical moment;
    S32、将归一化后的N*M车流量数据矩阵作为训练样本输入长短期记忆网络模型进行训练。S32. Input the normalized N*M traffic flow data matrix as a training sample into the long-short-term memory network model for training.
  5. 根据权利要求4所述的短时交通流量预测方法,其特征在于,步骤S32包括:The short-term traffic flow forecasting method according to claim 4, wherein step S32 comprises:
    S321、矩阵通过卷积层提取高级特征;S321, the matrix extracts advanced features through the convolution layer;
    S322、池化层处理,以减少参数的数量和控制过拟合;S322, pooling layer processing, to reduce the number of parameters and control overfitting;
    S323、激活函数处理,采用ReLU激活函数处理,以避免模式崩溃;S323, activation function processing, using ReLU activation function processing to avoid mode collapse;
    S324、Dropout层处理,以缓解过拟合的发生;S324, Dropout layer processing, to alleviate the occurrence of overfitting;
    S325、基于注意力机制,通过长短期记忆网络LSTM层的学习时间序列数据的关联信息,以提升模型训练效果;S325. Based on the attention mechanism, learn the associated information of the time series data through the LSTM layer of the long short-term memory network to improve the model training effect;
    S326、数据经损失函数评定模型训练的预测效果。S326. Evaluate the prediction effect of the model training on the data through a loss function.
  6. 根据权利要求5所述的短时交通流量预测方法,其特征在于,步骤S325的基于注意力机制的长短期记忆网络LSTM层处理包括:The short-term traffic flow prediction method according to claim 5, wherein the long-short-term memory network LSTM layer processing based on the attention mechanism of step S325 comprises:
    将长短期记忆网络LSTM的输出o与层权重W加权求和,并通过softmax得到注意力系数a,通过全连接层将a映射到输出值:The output o of the long-term short-term memory network LSTM is weighted and summed with the layer weight W, and the attention coefficient a is obtained through softmax, and a is mapped to the output value through the fully connected layer:
    a=softmax(w Tsigmoid(o))………………………………………式2 a=softmax(w T sigmoid(o))……………………………Formula 2
    output=sigmoid(w T(oa T))………………………………………式3 式中,o为LSTM的输出,W为第一层权重。 output=sigmoid(w T (oa T ))………………………………………Formula 3 In the formula, o is the output of LSTM, and W is the weight of the first layer.
  7. 根据权利要求5或6所述的短时交通流量预测方法,其特征在于,步骤S326的损失函数采用均方方差损失,该统计参数是预测数据和原始数据对应点误差的平方和的均值,计算公式为:According to the short-term traffic flow prediction method described in claim 5 or 6, it is characterized in that the loss function of step S326 adopts the mean square error loss, and the statistical parameter is the mean value of the sum of squares of the corresponding point errors of the predicted data and the original data, calculated The formula is:
    Figure PCTCN2021095955-appb-100002
    Figure PCTCN2021095955-appb-100002
    式中,y i表示第i个样本的真实值; In the formula, y i represents the true value of the i-th sample;
    f(x i)表示第i个样本的预测值; f( xi ) represents the predicted value of the i-th sample;
    n为样本个数。n is the number of samples.
  8. 根据权利要求7所述的短时交通流量预测方法,其特征在于,步骤S4的短时交通流量模型预测包括:The short-term traffic flow prediction method according to claim 7, wherein the short-term traffic flow model prediction of step S4 comprises:
    S41、采集前M个时间段的车流量数据,并进行数据归一化处理;S41. Collect the traffic flow data of the previous M time periods, and perform data normalization processing;
    S42、将归一化后车流量数据矩阵输入长短期记忆网络模型进行多路段的短时交通流量预测。S42. Input the normalized traffic flow data matrix into the long-short-term memory network model to predict the short-term traffic flow of multiple road sections.
  9. 一种计算机可读存储介质,其上存储有计算机可执行程序指令,其特征在于:通过处理器和存储器执行所述指令,用于实现权利要求1~8任一项所述的方法。A computer-readable storage medium, on which computer-executable program instructions are stored, is characterized in that: the instructions are executed by a processor and a memory, so as to realize the method described in any one of claims 1-8.
  10. 一种复杂路网下的短时交通流量预测系统,其特征在于:系统包括电讯连接的数据采集模块、数据预处理模块、短时交通流量训练预测模块、预测效果评估模块和交通流量显示模块,其中,A short-term traffic flow prediction system under a complex road network is characterized in that: the system includes a data acquisition module connected by telecommunication, a data preprocessing module, a short-term traffic flow training prediction module, a prediction effect evaluation module and a traffic flow display module, in,
    所述数据采集模块包括数据采集单元和计时器;所述数据采集单元包括地感线圈、视频监测器或GPS组件,在计时器的控制下所述采集单元等时段间 隔的同步采集多个路段的交通流量数据;The data acquisition module includes a data acquisition unit and a timer; the data acquisition unit includes a ground sensing coil, a video monitor or a GPS assembly, and under the control of the timer, the acquisition unit synchronously collects a plurality of road sections at equal time intervals traffic flow data;
    所述数据预处理模块接收数据采集模块的交通流量数据,并进行数据清洗和时间切片,以获得车流量数据矩阵;The data preprocessing module receives the traffic flow data of the data acquisition module, and performs data cleaning and time slicing to obtain a traffic flow data matrix;
    所述短时交通流量训练预测模块包括基于注意力机制的长短期记忆网络训练单元和预测单元,所述训练单元用于将历史车流量数据矩阵进行训练,所述预测单元接收当前车流量数据矩阵预测下一时段的车流量数据;The short-term traffic flow training prediction module includes a long-short-term memory network training unit and a prediction unit based on the attention mechanism, the training unit is used to train the historical traffic flow data matrix, and the prediction unit receives the current traffic flow data matrix Predict the traffic flow data in the next period;
    所述预测效果评估模块通过损失函数评估所述短时交通流量训练预测模块的准确性;The prediction effect evaluation module evaluates the accuracy of the short-term traffic flow training prediction module through a loss function;
    所述交通流量显示模块可视化显示多路段的历史数据、当前真实数据、预测数据和预测效果。The traffic flow display module visually displays historical data, current real data, forecast data and forecast effects of multiple road sections.
PCT/CN2021/095955 2021-05-19 2021-05-26 Short-term traffic flow prediction method under complex road network, storage medium, and system WO2022241802A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110548100.8 2021-05-19
CN202110548100.8A CN113240182A (en) 2021-05-19 2021-05-19 Short-term traffic flow prediction method, storage medium and system under complex road network

Publications (1)

Publication Number Publication Date
WO2022241802A1 true WO2022241802A1 (en) 2022-11-24

Family

ID=77137789

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095955 WO2022241802A1 (en) 2021-05-19 2021-05-26 Short-term traffic flow prediction method under complex road network, storage medium, and system

Country Status (2)

Country Link
CN (1) CN113240182A (en)
WO (1) WO2022241802A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116153112A (en) * 2023-03-10 2023-05-23 淮阴工学院 Intelligent traffic and flexible lane regulation and control method and device
CN116542438A (en) * 2023-03-28 2023-08-04 大连海事大学 Bus passenger starting and stopping point estimation and repair method based on non-reference real phase
CN116978222A (en) * 2023-07-24 2023-10-31 重庆邮电大学 Short-time traffic flow prediction method based on space-time data
CN117058888A (en) * 2023-10-13 2023-11-14 华信纵横科技有限公司 Traffic big data processing method and system thereof
CN117096875A (en) * 2023-10-19 2023-11-21 国网江西省电力有限公司经济技术研究院 Short-term load prediction method and system based on ST-transducer model
CN117111540A (en) * 2023-10-25 2023-11-24 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117133116A (en) * 2023-08-07 2023-11-28 南京邮电大学 Traffic flow prediction method and system based on space-time correlation network
CN117152692A (en) * 2023-10-30 2023-12-01 中国市政工程西南设计研究总院有限公司 Traffic target detection method and system based on video monitoring
CN117533356A (en) * 2024-01-09 2024-02-09 北京市北太机电设备工贸有限公司 Intelligent driving assistance system and method
CN117688453A (en) * 2024-02-02 2024-03-12 山东科技大学 Traffic flow prediction method based on space-time embedded attention network

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570867B (en) * 2021-09-26 2021-12-07 西南交通大学 Urban traffic state prediction method, device, equipment and readable storage medium
CN114283584A (en) * 2021-12-31 2022-04-05 云控智行(上海)汽车科技有限公司 Expressway road condition prediction method under intelligent network connection environment and computer readable storage medium
CN114566046A (en) * 2022-03-01 2022-05-31 海南大学 Short-time traffic condition prediction system and method thereof
CN115037642B (en) * 2022-03-30 2023-11-21 武汉烽火技术服务有限公司 Method and device for identifying flow bottleneck
CN115563093A (en) * 2022-09-28 2023-01-03 北京百度网讯科技有限公司 Lane traffic flow data completion and model training method and device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510741A (en) * 2018-05-24 2018-09-07 浙江工业大学 A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures
CN110516833A (en) * 2019-07-03 2019-11-29 浙江工业大学 A method of the Bi-LSTM based on feature extraction predicts road traffic state
WO2019228848A1 (en) * 2018-05-31 2019-12-05 Vivacity Labs Limited Traffic management system
CN111275971A (en) * 2020-02-18 2020-06-12 山西交通控股集团有限公司 Expressway traffic flow prediction method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242140A (en) * 2018-07-24 2019-01-18 浙江工业大学 A kind of traffic flow forecasting method based on LSTM_Attention network
CN110675623B (en) * 2019-09-06 2020-12-01 中国科学院自动化研究所 Short-term traffic flow prediction method, system and device based on hybrid deep learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510741A (en) * 2018-05-24 2018-09-07 浙江工业大学 A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures
WO2019228848A1 (en) * 2018-05-31 2019-12-05 Vivacity Labs Limited Traffic management system
CN110516833A (en) * 2019-07-03 2019-11-29 浙江工业大学 A method of the Bi-LSTM based on feature extraction predicts road traffic state
CN111275971A (en) * 2020-02-18 2020-06-12 山西交通控股集团有限公司 Expressway traffic flow prediction method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PENG, PENG: "Deep Learning-based Road Traffic Flow Prediction Methods", CHINESE MASTER'S THESES FULL-TEXT DATABASE, ENGINEERING SCIENCE & TECHNOLOGY, no. 2, 15 February 2021 (2021-02-15), pages 1 - 68, XP093007756, ISSN: 1674-0246 *
ZHANG, JIUYUE ET AL.: "Short-Term Traffic Flow Forecast Based on RBF Neural Network", JOURNAL OF SHANDONG JIAOTONG UNIVERSITY, vol. 16, no. 3, 30 September 2008 (2008-09-30), pages 32 - 36, XP093007746, ISSN: 1672-0032 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116153112B (en) * 2023-03-10 2023-09-29 淮阴工学院 Intelligent traffic and flexible lane regulation and control method and device
CN116153112A (en) * 2023-03-10 2023-05-23 淮阴工学院 Intelligent traffic and flexible lane regulation and control method and device
CN116542438A (en) * 2023-03-28 2023-08-04 大连海事大学 Bus passenger starting and stopping point estimation and repair method based on non-reference real phase
CN116542438B (en) * 2023-03-28 2024-01-30 大连海事大学 Bus passenger starting and stopping point estimation and repair method based on non-reference real phase
CN116978222A (en) * 2023-07-24 2023-10-31 重庆邮电大学 Short-time traffic flow prediction method based on space-time data
CN116978222B (en) * 2023-07-24 2024-04-16 重庆邮电大学 Short-time traffic flow prediction method based on space-time data
CN117133116B (en) * 2023-08-07 2024-04-19 南京邮电大学 Traffic flow prediction method and system based on space-time correlation network
CN117133116A (en) * 2023-08-07 2023-11-28 南京邮电大学 Traffic flow prediction method and system based on space-time correlation network
CN117058888A (en) * 2023-10-13 2023-11-14 华信纵横科技有限公司 Traffic big data processing method and system thereof
CN117058888B (en) * 2023-10-13 2023-12-22 华信纵横科技有限公司 Traffic big data processing method and system thereof
CN117096875B (en) * 2023-10-19 2024-03-12 国网江西省电力有限公司经济技术研究院 Short-term load prediction method and system based on spatial-Temporal Transformer model
CN117096875A (en) * 2023-10-19 2023-11-21 国网江西省电力有限公司经济技术研究院 Short-term load prediction method and system based on ST-transducer model
CN117111540B (en) * 2023-10-25 2023-12-29 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117111540A (en) * 2023-10-25 2023-11-24 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117152692B (en) * 2023-10-30 2024-02-23 中国市政工程西南设计研究总院有限公司 Traffic target detection method and system based on video monitoring
CN117152692A (en) * 2023-10-30 2023-12-01 中国市政工程西南设计研究总院有限公司 Traffic target detection method and system based on video monitoring
CN117533356A (en) * 2024-01-09 2024-02-09 北京市北太机电设备工贸有限公司 Intelligent driving assistance system and method
CN117533356B (en) * 2024-01-09 2024-03-29 北京市北太机电设备工贸有限公司 Intelligent driving assistance system and method
CN117688453A (en) * 2024-02-02 2024-03-12 山东科技大学 Traffic flow prediction method based on space-time embedded attention network
CN117688453B (en) * 2024-02-02 2024-04-30 山东科技大学 Traffic flow prediction method based on space-time embedded attention network

Also Published As

Publication number Publication date
CN113240182A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
WO2022241802A1 (en) Short-term traffic flow prediction method under complex road network, storage medium, and system
CN109448361B (en) Resident traffic travel flow prediction system and prediction method thereof
US20220092418A1 (en) Training method for air quality prediction model, prediction method and apparatus, device, program, and medium
CN114664091A (en) Early warning method and system based on holiday traffic prediction algorithm
CN113988359A (en) Wind power prediction method and system based on asymmetric Laplace distribution
CN115148019A (en) Early warning method and system based on holiday congestion prediction algorithm
CN112329997A (en) Power demand load prediction method and system, electronic device, and storage medium
Li Predicting short-term traffic flow in urban based on multivariate linear regression model
CN112288172A (en) Prediction method and device for line loss rate of transformer area
CN114266602A (en) Deep learning electricity price prediction method and device for multi-source data fusion of power internet of things
Lei et al. Prediction of PM2. 5 concentration considering temporal and spatial features: A case study of Fushun, Liaoning Province
Wang et al. A two-stage convolution network algorithm for predicting traffic speed based on multi-feature attention mechanisms
CN116976702A (en) Urban digital twin platform and method based on large-scene GIS lightweight engine
Gao et al. Short-term traffic flow prediction based on time-Space characteristics
Huang et al. EV charging load profile identification and seasonal difference analysis via charging sessions data of charging stations
Feng et al. AGCN-T: a traffic flow prediction model for spatial-temporal network dynamics
Miao et al. A queue hybrid neural network with weather weighted factor for traffic flow prediction
Liu et al. Growth scale prediction of big data for information systems based on a deep learning SAEP method
Jiang Design and implementation of smart community big data dynamic analysis model based on logistic regression model
Ragapriya et al. Machine Learning Based House Price Prediction Using Modified Extreme Boosting
CN114566048A (en) Traffic control method based on multi-view self-adaptive space-time diagram network
Zhang et al. Traffic flow forecasting of graph convolutional network based on spatio-temporal attention mechanism
Bao-yu et al. Research on prediction of short-term passenger flow of urban rail transit based on deep neural network
CN111127892A (en) Intersection timing parameter optimization model construction and intersection signal optimization method
Keyan et al. Anomaly detection method of distribution network line loss based on hybrid clustering and LSTM

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21940255

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE