CN115376308B - A method for predicting vehicle travel time - Google Patents
A method for predicting vehicle travel time Download PDFInfo
- Publication number
- CN115376308B CN115376308B CN202210589772.8A CN202210589772A CN115376308B CN 115376308 B CN115376308 B CN 115376308B CN 202210589772 A CN202210589772 A CN 202210589772A CN 115376308 B CN115376308 B CN 115376308B
- Authority
- CN
- China
- Prior art keywords
- road
- time
- data
- discriminator
- traffic
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/40—Business processes related to the transportation industry
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
- G08G1/0129—Traffic data processing for creating historical data or processing based on historical data
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0137—Measuring and analyzing of parameters relative to traffic conditions for specific applications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/052—Detecting movement of traffic to be counted or controlled with provision for determining speed or overspeed
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/065—Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Analytical Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Strategic Management (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Marketing (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Development Economics (AREA)
- Evolutionary Computation (AREA)
- Game Theory and Decision Science (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Entrepreneurship & Innovation (AREA)
- Biophysics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Primary Health Care (AREA)
- Traffic Control Systems (AREA)
Abstract
本发明公开了一种汽车行驶时间的预测方法,通过建立基于LSTM‑GAN模型来预测未来时间段内不同道路上的交通速度,根据预测的交通速度,将道路分成速度不同的路段,以及不同的路段的速度对应的时间段,根据不同路段的速度以及对应的时间段从而计算出汽车到达目的地需要的总行驶时间;模型包括生成器与鉴别器;生成器捕获交通流数据的时空特性输出初预测的交通速度数据至鉴别器;鉴别器同时输入对应的实际的交通流数据用以学习两者潜在交通流数据的特征向量,最后利用特征向量构建分类模型,并且判断输入的初预测的交通流数据的真假,并且输出判断为真的初预测的交通流数据作为预测的交通流数据。本发明能够提高预测精度。
The present invention discloses a method for predicting the driving time of a car, by establishing a LSTM-GAN model to predict the traffic speed on different roads in the future time period, according to the predicted traffic speed, the road is divided into sections with different speeds, and the time periods corresponding to the speeds of different sections, and the total driving time required for the car to reach the destination is calculated according to the speeds of different sections and the corresponding time periods; the model includes a generator and a discriminator; the generator captures the spatiotemporal characteristics of traffic flow data and outputs the initially predicted traffic speed data to the discriminator; the discriminator simultaneously inputs the corresponding actual traffic flow data to learn the feature vectors of the potential traffic flow data of the two, and finally uses the feature vectors to construct a classification model, and judges the truth of the input initially predicted traffic flow data, and outputs the initially predicted traffic flow data judged to be true as the predicted traffic flow data. The present invention can improve the prediction accuracy.
Description
技术领域Technical Field
本发明涉及路径规划技术领域,具体涉及一种汽车行驶时间的预测方法。The invention relates to the technical field of path planning, and in particular to a method for predicting vehicle travel time.
背景技术Background technique
城市车辆拥堵导致大量的时间花费在路途中,使人们工作效率降低。能源消耗在运输行业、交通行业处于上升阶段,并且走走停停和长时间低挡位行驶易造成油耗上升,道路不畅成为油耗上升的主要原因,交通运输路线的规划变的越来越重要。Traffic congestion in cities leads to a lot of time spent on the road, which reduces people's work efficiency. Energy consumption in the transportation industry is on the rise, and stop-and-go and long-term low-gear driving can easily cause increased fuel consumption. Poor roads have become the main reason for the increase in fuel consumption, and the planning of transportation routes has become increasingly important.
汽车前往目的地的行驶时间是路径选择的一个重要因素,可以通过预测交通流来计算行驶时间。现有的交通流预测方法忽略了相邻道路交通流之间的时空交互作用以及不同路段的交通拥堵差异,行驶时间的预测误差会影响路径选择的决策。考虑到不同道路之间交通流的时空相互作用,提出了一种长短期记忆-生成对抗网络(LSTM-GAN)深度学习算法来预测交通流,提高了预测精度。The travel time of a car to its destination is an important factor in route selection, and the travel time can be calculated by predicting traffic flow. Existing traffic flow prediction methods ignore the spatiotemporal interaction between traffic flows on adjacent roads and the difference in traffic congestion on different road sections. The prediction error of travel time will affect the decision of route selection. Considering the spatiotemporal interaction of traffic flows between different roads, a long short-term memory-generative adversarial network (LSTM-GAN) deep learning algorithm is proposed to predict traffic flow, which improves the prediction accuracy.
发明内容Summary of the invention
1.所要解决的技术问题:1. Technical problems to be solved:
针对上述技术问题,本发明提供一种汽车行驶时间的预测方法,能够精确计算汽车的行 驶时间,有助于计算能量消耗成本,尤其有助于电动汽车的路径规划。In view of the above technical problems, the present invention provides a method for predicting the driving time of a car, which can accurately calculate the driving time of the car, help calculate the energy consumption cost, and is particularly helpful for the route planning of electric vehicles.
2.技术方案:2. Technical solution:
一种汽车行驶时间的预测方法,其特征在于:通过建立基于LSTM-GAN模型来预测未来时 间段内道路上的交通速度,根据预测的交通速度,将道路分成速度不同的路段,以及不同的 路段的速度对应的时间段,根据不同路段的速度以及对应的时间段从而计算出汽车到达目的 地需要的总行驶时间;A method for predicting the driving time of a car, characterized in that: by establishing an LSTM-GAN model to predict the traffic speed on the road in the future time period, according to the predicted traffic speed, the road is divided into sections with different speeds and time periods corresponding to the speeds of different sections, and the total driving time required for the car to reach the destination is calculated according to the speeds of different sections and the corresponding time periods;
所述LSTM-GAN模型包括生成器H与鉴别器D;所述生成器H捕获输入的交通流数据的时 空特性输出初预测的交通速度数据至鉴别器D;鉴别器D输入初预测的交通流数据以及其预测对应的实际的交通流数据用以学习两者潜在交通流数据的特征向量,最后利用特征向量构 建分类模型,并且判断输入的初预测的交通流数据的真假,并且输出判断为真的初预测的交 通流数据作为预测的交通流数据;The LSTM-GAN model includes a generator H and a discriminator D; the generator H captures the temporal and spatial characteristics of the input traffic flow data and outputs the initially predicted traffic speed data to the discriminator D; the discriminator D inputs the initially predicted traffic flow data and the actual traffic flow data corresponding to its prediction to learn the feature vectors of the potential traffic flow data of the two, and finally uses the feature vectors to construct a classification model, and judges the truth of the input initially predicted traffic flow data, and outputs the initially predicted traffic flow data judged to be true as the predicted traffic flow data;
所述的交通流数据采用交通速度矩阵序列,将相同道路上不同时段交通速度矩阵按照预 设的周期进行排列;所述LSTM-GAN模型的生成器H为三层结构;交通速度矩阵序列输入第一层CNN层,第一层CNN层将其学习到的所有道路上交通速度矩阵序列的空间特性输入第 二层LSTM层;第二层LSTM层将其捕获的连续交通速度矩阵的时间特性输入第三层CNN层,第三层CNN层生成下一时段的交通速度矩阵的初预测数据;鉴别器D为三层结构;生 成器H生成的下一时段的交通速度矩阵的初预测数据与真实的交通速度矩阵均输入到第四层CNN层;第四层CNN层将其学习到的潜在的空间特征输入第五层双向LSTM层;第五层双 向LSTM层将其捕获潜在的时间特征输入到第六层的;第六层通过损失函数优化生成器和鉴别器的精度,获得全局最优解,输出交通速度的预测结果。The traffic flow data adopts a traffic speed matrix sequence, and the traffic speed matrices of different time periods on the same road are arranged according to a preset period; the generator H of the LSTM-GAN model is a three-layer structure; the traffic speed matrix sequence is input into the first CNN layer, and the first CNN layer inputs the spatial characteristics of the traffic speed matrix sequences on all roads learned by it into the second LSTM layer; the second LSTM layer inputs the temporal characteristics of the continuous traffic speed matrix captured by it into the third CNN layer, and the third CNN layer generates the initial prediction data of the traffic speed matrix of the next time period; the discriminator D is a three-layer structure; the initial prediction data of the traffic speed matrix of the next time period generated by the generator H and the real traffic speed matrix are both input into the fourth CNN layer; the fourth CNN layer inputs the potential spatial features learned by it into the fifth bidirectional LSTM layer; the fifth bidirectional LSTM layer inputs the potential temporal features captured by it into the sixth layer; the sixth layer optimizes the accuracy of the generator and the discriminator through the loss function, obtains the global optimal solution, and outputs the prediction result of the traffic speed.
进一步地,具体包括一下步骤:Furthermore, the following steps are specifically included:
步骤一:获取历史交通流数据,将交通流数据预处理为交通速度矩阵序列;所述交通速 度矩阵序列为以预设的周期排列得一条道路的交通速度矩阵序列{vt}=(v(t0),v(t1),…,v(tn)), 其中t时刻的交通速度矩阵为:Step 1: Obtain historical traffic flow data and preprocess the traffic flow data into a traffic speed matrix sequence; the traffic speed matrix sequence is a traffic speed matrix sequence of a road arranged in a preset period {v t } = (v(t 0 ), v(t 1 ), …, v(t n )), where the traffic speed matrix at time t is:
式(A1)中,vn,1表示t时间,道路中(n,1)节点对应的速度大小;In formula (A1), v n,1 represents the speed corresponding to the (n, 1) node on the road at time t;
步骤二:将交通速度矩阵序列输入LSTM-GAN模型的生成器H,生成器H经过多次的训练, 预测并生成对应的道路t+1时刻的初预测速度矩阵序列;Step 2: Input the traffic speed matrix sequence into the generator H of the LSTM-GAN model. After multiple trainings, the generator H predicts and generates the initial predicted speed matrix sequence of the corresponding road at time t+1.
步骤三:将生成器H生成的t+1时刻的初预测速度矩阵序列与之对应的真实的t+1时刻 的速度矩阵序列同时输入鉴别器D,鉴别器D对初预测的矩阵序列进行鉴别。在开始预测时, 让鉴别器先学习真实数据的分布情况,并做到有效识别,如果经过鉴别器D输出的概率为1, 则判断初预测的矩阵序列为真实的矩阵序列,如果经过鉴别器D输出的概率为0,则判断初 预测的矩阵序列为生成的矩阵序列;生成器在大量数据的基础上,学习交通流历史数据的概 率分布,生成的数据接近真实数据,并通过鉴别器识别,预测得到交通速度。Step 3: The initial predicted speed matrix sequence at time t+1 generated by the generator H and the corresponding real speed matrix sequence at time t+1 are simultaneously input into the discriminator D, and the discriminator D discriminates the initial predicted matrix sequence. At the beginning of the prediction, let the discriminator first learn the distribution of the real data and achieve effective recognition. If the probability output by the discriminator D is 1, the initial predicted matrix sequence is judged to be the real matrix sequence. If the probability output by the discriminator D is 0, the initial predicted matrix sequence is judged to be the generated matrix sequence; the generator learns the probability distribution of the historical data of traffic flow on the basis of a large amount of data, and the generated data is close to the real data, and is recognized by the discriminator to predict the traffic speed.
步骤四:根据步骤三预测的交通速度大小,将道路分成不同交通速度的路段及其对应的 时段,从而计算出汽车到达目的地的行驶时间。Step 4: Based on the traffic speed predicted in step 3, divide the road into sections with different traffic speeds and their corresponding time periods, so as to calculate the driving time for the car to reach the destination.
进一步地,步骤二中生成器H通过大量历史数据学习真实交通流数据的概率分布,然后 使用学习到的概率分布预测未来的交通流;生成器H在学习初期,生成数据时无法通过鉴别 器D的识别,被鉴别为生成的数据,当生成器经过多次的迭代训练后,生成的数据接近真实 数据,并通过鉴别器D识别;迭代优化过程提高了生成器H和鉴别器D的性能;当鉴别器D 无法正确识别生成器生成的数据和真实数据时,即生成器H已经学习到了真实数据的分布, 提高了预测精度。Furthermore, in step 2, the generator H learns the probability distribution of real traffic flow data through a large amount of historical data, and then uses the learned probability distribution to predict future traffic flow; in the early stage of learning, the generator H cannot pass the recognition of the discriminator D when generating data, and is identified as generated data. After the generator has undergone multiple iterative training, the generated data is close to the real data and is recognized by the discriminator D; the iterative optimization process improves the performance of the generator H and the discriminator D; when the discriminator D cannot correctly identify the data generated by the generator and the real data, it means that the generator H has learned the distribution of the real data, which improves the prediction accuracy.
进一步地,步骤三中鉴别器D采用交叉熵作为损失函数判断真实的交通速度矩阵序列和 步骤二初预测出的交通速度矩阵序列分布之间的相似性;所述交叉熵作为损失函数具体为:Furthermore, in step 3, the discriminator D uses cross entropy as a loss function to judge the similarity between the real traffic speed matrix sequence and the distribution of the traffic speed matrix sequence initially predicted in step 2; the cross entropy as a loss function is specifically:
(1)式中:表示真实矩阵序列,其中的i,j表示该道路对应的节点编号;/>为真实数据分布;pv(v)为先验分布;Δt为时间间隔;/>为取自真实数据的概率;H(v)为来自生成器H输出的初预测的数据;D(H(v))为从 H(v)到鉴别器D的概率;/>表示初预测的数据分布的期望;(1) Where: Represents a real matrix sequence, where i and j represent the node numbers corresponding to the road; /> is the real data distribution; p v (v) is the prior distribution; Δt is the time interval; /> for The probability of being taken from the real data; H(v) is the initial predicted data from the output of the generator H; D(H(v)) is the probability from H(v) to the discriminator D;/> Represents the expectation of the initial predicted data distribution;
通过生成器H,将式(1)最小化以获得最优解;在连续空间中,将式(1)改写为式(2):Through the generator H, equation (1) is minimized to obtain the optimal solution; in the continuous space, equation (1) is rewritten as equation (2):
鉴别器D的预期输出在0到1之间,当其输入数据来自真实数据的分布时,鉴 别器D的目标是使输出的概率/>尽可能接近1;当其输入数据来自生成的数据 H(v)时,鉴别器D尝试正确判断数据源,使D(H(v))尽可能接近0,而生成器H的目标是通 过迭代训练使D(H(v))尽可能接近1;这意味着生成器H生成的数据越来越接近真实数据; 即通过生成器H和鉴别器D之间的零和博弈,使生成器H的损失函数 ObjH(θH)=-ObjD(θD,θH);The expected output of the discriminator D is between 0 and 1. When the distribution of the real data is derived, the goal of the discriminator D is to make the output probability As close to 1 as possible; when its input data comes from the generated data H(v), the discriminator D tries to correctly judge the data source and make D(H(v)) as close to 0 as possible, while the goal of the generator H is to make D(H(v)) as close to 1 as possible through iterative training; this means that the data generated by the generator H is getting closer and closer to the real data; that is, through the zero-sum game between the generator H and the discriminator D, the loss function of the generator H is Obj H (θ H ) = -Obj D (θ D ,θ H );
从而建立整个LSTM-GAN模型的目标函数如式(3)所示:Thus, the objective function of the entire LSTM-GAN model is established as shown in formula (3):
进一步地,步骤四中所述不同交通速度的路段为与该道路的历史平均速度进行比较,具 体为:将有排队车辆的路段以及小于历史平均速度的路段定义为下游路段、将大于历史平均 速度的路段定义为上游路段、将需要通过红绿灯的路口定义为等待路段;其中汽车到达目的地至少途径有一条道路,计算出途径的每条道路的需要行驶的时间,并将每条路需要的时间 进行求和即为预测的汽车到达目的地的需要的总时间;所述计算出途径的每条道路的需要行 驶的时间具体包括以下步骤:Further, the road sections with different traffic speeds in step 4 are compared with the historical average speed of the road, specifically: the road sections with queued vehicles and the road sections with speeds lower than the historical average speed are defined as downstream sections, the road sections with speeds higher than the historical average speed are defined as upstream sections, and the intersections that need to pass through traffic lights are defined as waiting sections; wherein the car reaches the destination via at least one road, the required travel time for each road on the route is calculated, and the time required for each road is summed up to be the predicted total time required for the car to reach the destination; the calculation of the required travel time for each road on the route specifically includes the following steps:
S41:将汽车在对应的道路上行驶时间的划分自由行驶时间、排队等待时间和通过路口时 间;所述自由行驶时间为在该条道路上位于上游路段的行驶时间;所述排队等待时间为在该 条道路上处于下游路段以及等待红绿灯需要的时间;所述通过路口时间为车辆通过路口进入下一个道路需要的平均时间,并且一条道路对应一个通过路口的时间;其表达式具体如下式 (4)所示:S41: Divide the driving time of the car on the corresponding road into free driving time, queuing waiting time and intersection passing time; the free driving time is the driving time on the upstream section of the road; the queuing waiting time is the time required for being on the downstream section of the road and waiting for the traffic light; the intersection passing time is the average time required for the vehicle to pass through the intersection and enter the next road, and one road corresponds to one intersection passing time; its specific expression is shown in the following formula (4):
(4)式中:(t)表示随时间变化的函数;为在该条道路上需要行驶的时间函数;/>和/>分别为自由行驶时间、排队等待时间和通过路口时间的时间段长度;(4)Where: (t) represents the function that changes with time; is the time function required to travel on the road; /> and/> The lengths of the time periods are free travel time, queue waiting time, and intersection passing time, respectively;
S42:其中,自由行驶时间如式(5)所示:S42: Free travel time As shown in formula (5):
(5)式中:di,j该条道路需要行驶的总路程;为该条道路中下游路段排队车辆长 度;/>为预测出的道路上的平均速度;(5)Where: d i,j is the total distance that needs to be traveled on this road; The length of the queued vehicles in the middle and downstream section of the road; /> is the predicted average speed on the road;
所述下游路段中排队车辆的长度如下式(6)所示:The length of the queued vehicles in the downstream section As shown in the following formula (6):
(6)式中:Ni,j(t)为道路上的车辆数量;为排队车辆的平均车头间距;μi,j为道路的 最大车辆流量;λi,j为路口的绿信比;(6)Where: N i,j (t) is the number of vehicles on the road; is the average headway between queued vehicles; μ i,j is the maximum vehicle flow on the road; λ i,j is the green signal ratio at the intersection;
由于道路阻塞密度由道路上最大车辆流量μi,j与限制车速的比值得到;根据道路堵 塞密度与平均速度之间的关系;所述道路上的车辆数量Ni,j(t)如式(7)所示:Since the road congestion density is determined by the maximum vehicle flow μ i,j on the road and the speed limit The ratio of is obtained; according to the relationship between road congestion density and average speed; the number of vehicles Ni ,j (t) on the road is shown in formula (7):
根据式(5)、(6)和(7),和/>分别如式(8)和(9)所示:According to equations (5), (6) and (7), and/> As shown in formula (8) and (9) respectively:
S43:其中,排队等待时间 S43: Among them, waiting time in queue
当车辆到达有红绿灯的交叉口时,排队等待时间为等待绿灯时间或者等待红 灯时间/>分别如(10)和(11)所示:When a vehicle arrives at an intersection with a traffic light, the waiting time in the queue is the waiting time for the green light. Or wait for the red light time/> As shown in (10) and (11) respectively:
(10)式中:αi,j表示道路交叉口的信号周期;(10) Where: α i,j represents the signal period of the road intersection;
则排队等待时间如下式(12)近似得出:Waiting time in queue The following equation (12) approximates:
(12)式中,pj为车辆在绿灯期间到达交叉口的概率;(12)In the formula, pj is the probability that a vehicle arrives at the intersection during the green light period;
S44:其中,通过路口时间 S44: The time of crossing the intersection
车辆通过路口的平均时间如式(13)所示:The average time for a vehicle to pass through an intersection is shown in formula (13):
式中:βj(t)为预设的基于统计数据得到的路口结束转弯的时间。Where: β j (t) is the preset time for ending the turn at the intersection based on statistical data.
3.有益效果:3. Beneficial effects:
(1)本发明通过长短期记忆-生成对抗网络(LSTM-GAN)深度学习算法,建立交通流预 测模型。该预测模型在面对不同时段的交通速度变化时能够获得更准确的预测结果,有效提高了预测的准确性,同时也证明了时变特性在交通速度预测中的重要作用。(1) The present invention establishes a traffic flow prediction model through the long short-term memory-generative adversarial network (LSTM-GAN) deep learning algorithm. This prediction model can obtain more accurate prediction results when facing traffic speed changes in different time periods, effectively improving the accuracy of the prediction, and also proving the important role of time-varying characteristics in traffic speed prediction.
(2)本发明根据交通流预测模型的预测结果,将道路分成不同的路段,从而计算出汽车 到达目的地的时间。本方案通过仿真验证证明其的有效性,有助于行驶时间的精确计算,表 明了行驶时间的预测与交通拥堵程度是密切相关的。(2) The present invention divides the road into different sections according to the prediction results of the traffic flow prediction model, thereby calculating the time it takes for a car to reach its destination. This solution has been proven to be effective through simulation, which helps to accurately calculate the travel time and shows that the prediction of travel time is closely related to the degree of traffic congestion.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明中的LSTM-GAN模型的结构示意图;FIG1 is a schematic diagram of the structure of the LSTM-GAN model in the present invention;
图2为本发明中采用LSTM-GAN模型进行交通速度预测的流程图;FIG2 is a flow chart of traffic speed prediction using the LSTM-GAN model in the present invention;
图3为本发明中对道路段划分的示意图;FIG3 is a schematic diagram of dividing road segments in the present invention;
图4为具体实施例中的交通路网图。FIG. 4 is a traffic network diagram in a specific embodiment.
具体实施方式Detailed ways
如附图1至3所示,一种汽车行驶时间的预测方法,其特征在于:通过建立基于LSTM-GAN 模型来预测未来时间段内不同道路上的交通速度,根据预测的交通速度,将道路分成速度不 同的路段,以及不同的路段的速度对应的时间段,根据不同路段的速度以及对应的时间段从 而计算出汽车到达目的地需要的总行驶时间;As shown in Figures 1 to 3, a method for predicting the driving time of a car is characterized by: by establishing an LSTM-GAN model to predict the traffic speed on different roads in the future time period, according to the predicted traffic speed, the road is divided into sections with different speeds and time periods corresponding to the speeds of different sections, and the total driving time required for the car to reach the destination is calculated according to the speeds of different sections and the corresponding time periods;
所述LSTM-GAN模型包括生成器H与鉴别器D;所述生成器H捕获输入的交通流数据的时 空特性输出初预测的交通速度数据至鉴别器D;鉴别器D输入初预测的交通流数据以及其预测对应的实际的交通流数据用以学习两者潜在交通流数据的特征向量,最后利用特征向量构 建分类模型,并且判断输入的初预测的交通流数据的真假,并且输出判断为真的初预测的交 通流数据作为预测的交通流数据;The LSTM-GAN model includes a generator H and a discriminator D; the generator H captures the temporal and spatial characteristics of the input traffic flow data and outputs the initially predicted traffic speed data to the discriminator D; the discriminator D inputs the initially predicted traffic flow data and the actual traffic flow data corresponding to its prediction to learn the feature vectors of the potential traffic flow data of the two, and finally uses the feature vectors to construct a classification model, and judges the truth of the input initially predicted traffic flow data, and outputs the initially predicted traffic flow data judged to be true as the predicted traffic flow data;
所述的交通流数据采用交通速度矩阵序列,将相同道路上不同时段交通速度矩阵按照预 设的周期进行排列;所述LSTM-GAN模型的生成器H为三层结构;交通速度矩阵序列输入第一层CNN层,第一层CNN层将其学习到的所有道路上交通速度矩阵序列的空间特性输入第 二层LSTM层;第二层LSTM层将其捕获的连续交通速度矩阵的时间特性输入第三层CNN层,第三层CNN层生成下一时段的交通速度矩阵的初预测数据;鉴别器D为三层结构;生 成器H生成的下一时段的交通速度矩阵的初预测数据与真实的交通速度矩阵均输入到第四层CNN层;第四层CNN层将其学习到的潜在的空间特征输入第五层双向LSTM层;第五层双 向LSTM层将其捕获潜在的时间特征输入到第六层的;第六层通过损失函数优化生成器和鉴别器的精度,获得全局最优解,输出交通速度的预测结果。The traffic flow data adopts a traffic speed matrix sequence, and arranges the traffic speed matrices of different time periods on the same road according to a preset period; the generator H of the LSTM-GAN model is a three-layer structure; the traffic speed matrix sequence is input into the first CNN layer, and the first CNN layer inputs the spatial characteristics of the traffic speed matrix sequences on all roads learned by it into the second LSTM layer; the second LSTM layer inputs the temporal characteristics of the continuous traffic speed matrix captured by it into the third CNN layer, and the third CNN layer generates the initial prediction data of the traffic speed matrix of the next time period; the discriminator D is a three-layer structure; the initial prediction data of the traffic speed matrix of the next time period generated by the generator H and the real traffic speed matrix are both input into the fourth CNN layer; the fourth CNN layer inputs the potential spatial features learned by it into the fifth bidirectional LSTM layer; the fifth bidirectional LSTM layer inputs the potential temporal features captured by it into the sixth layer; the sixth layer optimizes the accuracy of the generator and the discriminator through the loss function, obtains the global optimal solution, and outputs the prediction result of the traffic speed.
具体实施例:如附图4所示本实施例中汽车的出发点为节点43,终点为节点17,其需要 通过其中的7条道路虚线部分为例,预测其未来一天不同路段的速度以及对应的每15分钟后 的平均速度。其中的道路相关参数如表1所示:Specific embodiment: As shown in Figure 4, in this embodiment, the starting point of the car is node 43 and the end point is node 17. The car needs to pass through the dotted line parts of 7 roads as an example to predict the speed of different sections in the next day and the corresponding average speed every 15 minutes. The road related parameters are shown in Table 1:
表1Table 1
为了验证所提出的LSTM-GAN模型预测未来时间段内不同道路上的交通速度的有效性, 本实施例中采用平均绝对误差(MAE)、平均相对误差(MRE)和均方根误差(RMSE)作为评估例。将采用本申请的LSTM-GAN模型与包括LSTM、ARIMA和SVR的预测方法进行比较。并且由于LSTM是一种RNN,因此添加了RNN-GAN作为比较方法,用以验证LSTM 和GAN结合的是否有显著的优点。通过这些方法预测了未来15分钟的平均速度,预测精度 的结果对比如表2所示。很明显,提出的LSTM-GAN得到了最低的MAE、MRE和RMSE 值,并具有最高的预测精度。In order to verify the effectiveness of the proposed LSTM-GAN model in predicting the traffic speed on different roads in the future time period, the mean absolute error (MAE), mean relative error (MRE) and root mean square error (RMSE) are used as evaluation examples in this embodiment. The LSTM-GAN model of the present application is compared with the prediction methods including LSTM, ARIMA and SVR. And because LSTM is a RNN, RNN-GAN is added as a comparison method to verify whether the combination of LSTM and GAN has significant advantages. The average speed in the next 15 minutes is predicted by these methods, and the comparison of the prediction accuracy results is shown in Table 2. Obviously, the proposed LSTM-GAN obtains the lowest MAE, MRE and RMSE values, and has the highest prediction accuracy.
表2Table 2
虽然本发明已以较佳实施例公开如上,但它们并不是用来限定本发明的,任何熟习此技 艺者,在不脱离本发明之精神和范围内,自当可作各种变化或润饰,因此本发明的保护范围 应当以本申请的权利要求保护范围所界定的为准。Although the present invention has been disclosed as above in terms of preferred embodiments, they are not intended to limit the present invention. Anyone skilled in the art can make various changes or modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection defined by the claims of this application.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210589772.8A CN115376308B (en) | 2022-05-26 | 2022-05-26 | A method for predicting vehicle travel time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210589772.8A CN115376308B (en) | 2022-05-26 | 2022-05-26 | A method for predicting vehicle travel time |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115376308A CN115376308A (en) | 2022-11-22 |
CN115376308B true CN115376308B (en) | 2024-06-04 |
Family
ID=84061689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210589772.8A Active CN115376308B (en) | 2022-05-26 | 2022-05-26 | A method for predicting vehicle travel time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115376308B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118609373B (en) * | 2024-08-08 | 2024-11-05 | 华能信息技术有限公司 | Arrival time prediction method for fuel dispatching vehicle |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101438334A (en) * | 2006-03-03 | 2009-05-20 | 因瑞克斯有限公司 | Dynamic time series prediction of future traffic conditions |
WO2016192668A1 (en) * | 2015-06-05 | 2016-12-08 | 刘光明 | Traffic condition and vehicle travelling time prediction |
CN108510741A (en) * | 2018-05-24 | 2018-09-07 | 浙江工业大学 | A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures |
US10127496B1 (en) * | 2017-11-23 | 2018-11-13 | Beijing Didi Infinity Technology And Development | System and method for estimating arrival time |
CN110299011A (en) * | 2019-07-26 | 2019-10-01 | 长安大学 | A kind of traffic flow forecasting method of the highway arbitrary cross-section based on charge data |
JP2019169028A (en) * | 2018-03-26 | 2019-10-03 | 東日本高速道路株式会社 | Traffic congestion prediction system, traffic congestion prediction method, learning device, prediction device, program and learned model |
CN112265546A (en) * | 2020-10-26 | 2021-01-26 | 吉林大学 | Speed Prediction Method of Connected Vehicles Based on Spatio-temporal Sequence Information |
CN113591380A (en) * | 2021-07-28 | 2021-11-02 | 浙江大学 | Traffic flow prediction method, medium and equipment based on graph Gaussian process |
CN113744526A (en) * | 2021-08-25 | 2021-12-03 | 江苏大学 | A Expressway Risk Prediction Method Based on LSTM and BF |
CN114463977A (en) * | 2022-02-10 | 2022-05-10 | 北京工业大学 | Path planning method based on vehicle-road collaborative multi-source data fusion traffic flow prediction |
JP7065246B1 (en) * | 2021-12-02 | 2022-05-11 | 中日本ハイウェイ・エンジニアリング東京株式会社 | Travel time estimation method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI623920B (en) * | 2016-04-28 | 2018-05-11 | 財團法人資訊工業策進會 | Speed prediction method |
CN109410575B (en) * | 2018-10-29 | 2020-05-01 | 北京航空航天大学 | A Road Network State Prediction Method Based on Capsule Network and Nested Long Short-Term Memory Neural Network |
EP3971780A1 (en) * | 2020-07-24 | 2022-03-23 | Tata Consultancy Services Limited | Method and system for dynamically predicting vehicle arrival time using a temporal difference learning technique |
-
2022
- 2022-05-26 CN CN202210589772.8A patent/CN115376308B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101438334A (en) * | 2006-03-03 | 2009-05-20 | 因瑞克斯有限公司 | Dynamic time series prediction of future traffic conditions |
WO2016192668A1 (en) * | 2015-06-05 | 2016-12-08 | 刘光明 | Traffic condition and vehicle travelling time prediction |
US10127496B1 (en) * | 2017-11-23 | 2018-11-13 | Beijing Didi Infinity Technology And Development | System and method for estimating arrival time |
JP2019169028A (en) * | 2018-03-26 | 2019-10-03 | 東日本高速道路株式会社 | Traffic congestion prediction system, traffic congestion prediction method, learning device, prediction device, program and learned model |
CN108510741A (en) * | 2018-05-24 | 2018-09-07 | 浙江工业大学 | A kind of traffic flow forecasting method based on Conv1D-LSTM neural network structures |
CN110299011A (en) * | 2019-07-26 | 2019-10-01 | 长安大学 | A kind of traffic flow forecasting method of the highway arbitrary cross-section based on charge data |
CN112265546A (en) * | 2020-10-26 | 2021-01-26 | 吉林大学 | Speed Prediction Method of Connected Vehicles Based on Spatio-temporal Sequence Information |
CN113591380A (en) * | 2021-07-28 | 2021-11-02 | 浙江大学 | Traffic flow prediction method, medium and equipment based on graph Gaussian process |
CN113744526A (en) * | 2021-08-25 | 2021-12-03 | 江苏大学 | A Expressway Risk Prediction Method Based on LSTM and BF |
JP7065246B1 (en) * | 2021-12-02 | 2022-05-11 | 中日本ハイウェイ・エンジニアリング東京株式会社 | Travel time estimation method |
CN114463977A (en) * | 2022-02-10 | 2022-05-10 | 北京工业大学 | Path planning method based on vehicle-road collaborative multi-source data fusion traffic flow prediction |
Also Published As
Publication number | Publication date |
---|---|
CN115376308A (en) | 2022-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111080029B (en) | Urban traffic road speed prediction method and system based on multi-path segment space-time correlation | |
Wang et al. | Fine-grained traffic flow prediction of various vehicle types via fusion of multisource data and deep learning approaches | |
CN107591011B (en) | Adaptive control method for intersection traffic signal considering supply-side constraints | |
CN104464310B (en) | Cooperative optimization control method and system for multi-intersection signals in urban areas | |
CN110570672B (en) | A method of regional traffic light control based on graph neural network | |
CN117975736B (en) | Unmanned vehicle road cooperative application scene test method and system | |
CN114202120A (en) | An urban traffic travel time prediction method for multi-source heterogeneous data | |
CN105096643A (en) | Real-time bus arrival time prediction method based on operation data of former buses in multiple lines | |
CN113421439B (en) | Single intersection traffic signal timing optimization method based on Monte Carlo algorithm | |
CN113780665B (en) | A method and system for predicting the parking location of private cars based on enhanced recurrent neural network | |
CN111797768B (en) | A method and system for automatic real-time identification of multiple causes of urban road traffic congestion | |
CN106910350B (en) | A method for finding the critical path of signal-controlled intersection group | |
CN115206092B (en) | Traffic prediction method of BiLSTM and LightGBM models based on attention mechanism | |
CN114202917A (en) | Construction area traffic control and induction method based on dynamic traffic flow short-time prediction | |
CN116884223B (en) | Smart city traffic guiding system | |
CN115376308B (en) | A method for predicting vehicle travel time | |
CN115100848A (en) | A travel traceability method and system for ground traffic congestion | |
CN113140108B (en) | Cloud traffic situation prediction method in internet-connected intelligent traffic system | |
CN108133329A (en) | Consider the electric vehicle trip of charging feedback effect and charge requirement analysis method | |
CN118334869A (en) | Traffic state estimation method and equipment based on traffic flow theory and CTM | |
Zou et al. | City-level traffic flow prediction via LSTM networks | |
CN114169615A (en) | Electric vehicle charging load prediction system, method and storage medium | |
Hu et al. | SOUP: A fleet management system for passenger demand prediction and competitive taxi supply | |
CN107092988B (en) | Method for predicting station-parking time of bus on special lane | |
Li et al. | Construction of intelligent transportation information management system based on artificial intelligence technology |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |