CN117789472A - Traffic situation prediction method based on LSTM model - Google Patents

Traffic situation prediction method based on LSTM model Download PDF

Info

Publication number
CN117789472A
CN117789472A CN202311843895.0A CN202311843895A CN117789472A CN 117789472 A CN117789472 A CN 117789472A CN 202311843895 A CN202311843895 A CN 202311843895A CN 117789472 A CN117789472 A CN 117789472A
Authority
CN
China
Prior art keywords
traffic situation
data
traffic
travel speed
map data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311843895.0A
Other languages
Chinese (zh)
Inventor
胡文
骆嫚
彭博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Yuexiang Technology Co Ltd
Original Assignee
Dongfeng Yuexiang Technology Co Ltd
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 Dongfeng Yuexiang Technology Co Ltd filed Critical Dongfeng Yuexiang Technology Co Ltd
Priority to CN202311843895.0A priority Critical patent/CN117789472A/en
Publication of CN117789472A publication Critical patent/CN117789472A/en
Pending legal-status Critical Current

Links

Landscapes

  • Traffic Control Systems (AREA)

Abstract

The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following steps: step 1: acquiring open map data at regular time and processing; step 2: calculating the travel speed of each road section according to the map data; step 3: training a traffic situation algorithm model through an LSTM model according to the map data and the travel speed; step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning. The method can help the automatic driving vehicle to effectively avoid the congestion road section, and improve the customer satisfaction.

Description

Traffic situation prediction method based on LSTM model
Technical Field
The application relates to a traffic situation prediction technology, in particular to a traffic situation prediction method based on an LSTM model.
Background
With the development of technology, the application of autopilot technology is also of great concern. Traffic prediction has very important practical significance for traffic scheduling and even management of smart cities, especially for unmanned vehicles operating on public roads. The delay time caused by the congestion brings serious trouble to the user, and the real-time traffic situation issued by the prior art is the real-time traffic situation of the current road section and cannot show the traffic situation prediction result for a period of time in the future. In real life, more and more users want to know the traffic conditions of certain road sections or certain areas in advance for future time in order to reasonably arrange travel paths in advance. The intelligent dispatching of the automatic driving vehicles is an important application, and particularly brings great revolution and promotion to urban public transportation. The intelligent dispatching of the automatic driving vehicle means that the automatic navigation and dispatching of the automatic driving vehicle are realized through an automatic driving technology and an intelligent dispatching system, so that the safety and the efficiency of the automatic driving vehicle are improved. The intelligent dispatching system of the automatic driving vehicle is based on traffic situation prediction. In the prior art, traffic data information of regional road sections is collected through a road side V2X device, and each intersection is divided into a group of adjacent rectangular areas; after the traffic situation prediction is triggered in a time or event mode, data reported by intelligent network-connected vehicles and related traffic data in intersection units are collected in real time, and then the speed and the position of the vehicles, the time for reaching a special road sign line, the sequence of the vehicles passing through intersection critical areas and the intersection passing time are predicted based on the data; and finally, based on the prediction result, carrying out overall prediction on traffic flow situations in the road network after a period of time in the future. However, the scheme is too dependent on the construction of road side equipment, road side data is used as traffic flow input, however, the cost for constructing the road side equipment on the public road is higher at present, and the scheme is not suitable for large-scale practical operation scene application. How to predict future traffic situation under low cost is one of the research hotspots in the current intelligent traffic field.
Disclosure of Invention
In view of the above, the invention provides a traffic situation prediction method based on an LSTM model, so as to solve the technical problem that the prior art is too dependent on the construction of road side equipment.
The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following steps: step 1: acquiring open map data at regular time and processing; step 2: calculating the travel speed of each road section according to the map data; step 3: training a traffic situation algorithm model through an LSTM model according to the map data and the travel speed; step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
Further, the step 1 includes: step 11: open map data were acquired every 1 minute: step 12: repairing the data missing by adopting the following functions:0<i<j, where x a+i For the missing data at time a+i, x a 、x a+j The original data values at the time a and the time a+j are respectively; step 13: the data were normalized using the following function: />x i Is normalized data of original data, x max 、x min Y is the maximum and minimum in the original data max 、y min Here, default data are-1 and 1, respectively.
Further, the step 3 includes: step 31: establishing traffic flow sequence t= (x) 1 ,x 2 ,x 3 ……,x T ) Wherein x is t The traffic flow of the road section in the t-th time period; step 32: the traffic situation algorithm model input and input sequences are respectively expressed as follows:where xi= (Xi-3 Δt, xi-2 Δt, xi- Δt, xi), yi= (xi+Δt, xi+2 Δt, xi+3 Δt), i=4, 5, … T; step 33: the input sequence is trained by LSTM model to make traffic situationThe algorithm model predicts traffic flow for 3 time periods in the future using 4 consecutive time period data.
Further, the map data and the travel speed according to the history include: step 331: acquiring a historical data set, wherein the historical data set comprises map data acquired in the past and travel speeds of all road sections calculated according to the map data; step 332: judging whether the data set is updated or not; step 333: when the data set is updated, selecting data for predicting future traffic situation according to the current situation.
Further, the LSTM model is set to: the input layer is 4 neurons, the hidden layer LSTM structure unit is 20, the output layer is 3 neurons, the maximum iteration number is 1000, and the loop is jumped out when the error is less than 10 < -5 >.
Further, the step 4 includes: step 41: predicting future traffic flow through a traffic situation prediction model and historical traffic flow obtained from open map data; step 42: calculating a travel speed according to a function v=k/Q, calculating a congestion condition according to a BPR formula tt=t0× (1+α (V/V0)/(β)), wherein V is the travel speed, K is a constant, Q is a future traffic flow, TT represents a total travel time, T0 represents the travel time in a free flow state, V0 represents the free flow speed, and α and β are empirical parameters; step 43: and selecting an optimal running path for the automatic driving vehicle according to the calculated travel speed and the congestion condition.
Further, the step 43 includes: step 431: comparing the calculated travel speed with the historical travel speed; step 432: when the calculated travel speed is reduced by more than 50%, judging that the traffic of the road section is abnormal, and re-planning a travel path according to the predicted traffic situation of the future time period; step 433: the vehicle travels according to the re-planned path.
Further, the traffic situation of the future time period comprises the congestion condition of each road section and the recommended speed of the vehicle of the future time period.
The invention provides a traffic situation prediction method based on an LSTM model, which is mainly used for solving the technical problem that the prior art is too dependent on the construction of road side equipment. According to the traffic situation prediction method, the traffic situation prediction is carried out by acquiring the map data provided by the third party, so that the construction cost of the road side equipment is effectively reduced; meanwhile, the LSTM (long and short term memory neural network prediction model) is utilized to better extract the characteristics of the long-time dependence of traffic flow data, the characteristics input in the previous time can be reflected into the network together with the content input in the current time to participate in training after being quantized, the application range of the data is improved, and therefore the traffic situation of a future time period is predicted more accurately.
Drawings
FIG. 1 is a flow chart of a traffic situation prediction method based on an LSTM model;
FIG. 2 is a flow chart of a method for regularly acquiring and processing open map data provided by the present invention;
FIG. 3 is a flow chart of a method for constructing an LSTM-based traffic situation model;
fig. 4 is a flow chart of a method for predicting traffic situation in future time period provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following specific steps as shown in figure 1.
Step 1: acquiring open map data at regular time and processing;
step 2: calculating the travel speed of each road section according to the map data;
step 3: training a traffic situation algorithm model through an LSTM model according to historical map data and travel speed;
LSTM (Long Short-Term Memory) is a Long-Short-Term Memory network, a type of time-recurrent neural network, adapted to process and predict important events with relatively Long intervals and delays in a time series; the LSTM model is a recurrent neural network model.
Step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
According to the technical scheme provided by the invention, the travel speed of each road section can be calculated by acquiring the open map data, then the traffic situation algorithm model is trained through the LSTM model according to the map data and the travel speed, and finally the traffic situation of the future time period is predicted through the traffic situation algorithm model and the historical dataset so as to be used for global path planning of the vehicle. The technical method can reduce and reduce the construction cost of road side equipment, and carry out global path planning through the prediction of traffic situation, so that the congestion road section is avoided, and the riding experience of passengers is improved while the traveling demands of the passengers are met.
Example two
The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following specific steps as shown in figure 1.
Step 1: acquiring open map data at regular time and processing;
according to the technical scheme, the model training is carried out by acquiring the open map data provided by the third party, and compared with the prior art, the road side V2X equipment is used for acquiring the traffic data information of the regional road section, the road side equipment construction cost is effectively reduced.
When the open map API is used for collecting data, network inadequacy or other human factors can occur, so that the conditions of data deficiency, data abnormality and the like of the collected original data can occur, and the dirty data can cause the increase of data processing cost and corresponding time, so that the data needs to be normalized, the characteristics of the vehicle flow are quantized in the range of < -1,1 >, and the influence caused by the characteristic values with larger unit limit and range of the data is eliminated, thereby improving the accuracy of model training and the convergence speed. As shown in fig. 2, the specific steps are as follows.
Step 11: open map data were acquired every 1 minute:
since the timing map acquisition is usually set to acquire the open map data every 1 minute, it is possible to obtain the open map data according to the actual situation
Step 12: repairing the data missing by adopting the following functions:0<i<j, where x a+i For the missing data at time a+i, x a 、x a+j The original data values at the time a and the time a+j are respectively;
step 13: the data were normalized using the following function:
x i is normalized data of original data, x max 、x min Y is the maximum and minimum in the original data max 、y min Here, default data are-1 and 1, respectively.
The accuracy and the convergence speed of model training are correspondingly improved through data restoration and normalization processing.
Step 2: calculating the travel speed of each road section according to the map data;
in practical applications, an autonomous vehicle generally obtains map data in a corresponding position range according to its own position, and calculates travel speeds of all road segments in the range.
Step 3: training a traffic situation algorithm model through an LSTM model according to historical map data and travel speed;
step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
According to the technical scheme provided by the invention, the travel speed of each road section can be calculated by acquiring the open map data, then the traffic situation algorithm model is trained through the LSTM model according to the map data and the travel speed, and finally the traffic situation of the future time period is predicted through the traffic situation algorithm model and the historical dataset so as to be used for global path planning of the vehicle. The technical method can reduce and reduce the construction cost of road side equipment, and carry out global path planning through the prediction of traffic situation, so that the congestion road section is avoided, and the riding experience of passengers is improved while the traveling demands of the passengers are met.
Example III
The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following specific steps as shown in figure 1.
Step 1: acquiring open map data at regular time and processing;
step 2: calculating the travel speed of each road section according to the map data;
step 3: training a traffic situation algorithm model through an LSTM model according to historical map data and travel speed;
as shown in fig. 3, the specific steps for constructing the LSTM-based traffic situation model are as follows.
Step 31: establishing traffic flow sequence t= (x) 1 ,x 2 ,x 3 ……,x T ) Wherein x is t The traffic flow of the road section in the t-th time period;
step 32: the traffic situation algorithm model input and input sequences are respectively expressed as follows:
where xi= (Xi-3 Δt, xi-2 Δt, xi- Δt, xi), yi= (xi+Δt, xi+2 Δt, xi+3 Δt), i=4, 5, … T;
step 33: the input sequence is trained by the LSTM model, so that the traffic situation algorithm model predicts the traffic flow of 3 time periods in the future by using the data of 4 continuous time periods which are used up.
The specific steps are as follows according to the historical map data and the travel speed.
Step 331: acquiring a historical data set, wherein the historical data set comprises map data acquired in the past and travel speeds of all road sections calculated according to the map data;
step 332: judging whether the data set is updated or not;
step 333: when the data set is updated, selecting data for predicting future traffic situation according to the current situation.
The LSTM model is set to: the input layer is 4 neurons, the hidden layer LSTM structure unit is 20, the output layer is 3 neurons, the maximum iteration number is 1000, and the loop is jumped out when the error is less than 10 < -5 >.
Step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
According to the technical scheme provided by the invention, the travel speed of each road section can be calculated by acquiring the open map data, then the traffic situation algorithm model is trained through the LSTM model according to the map data and the travel speed, and finally the traffic situation of the future time period is predicted through the traffic situation algorithm model and the historical dataset so as to be used for global path planning of the vehicle. The technical method can reduce and reduce the construction cost of road side equipment, and carry out global path planning through the prediction of traffic situation, so that the congestion road section is avoided, and the riding experience of passengers is improved while the traveling demands of the passengers are met.
Example IV
The invention provides a traffic situation prediction method based on an LSTM model, which is applied to an automatic driving vehicle, and comprises the following specific steps as shown in figure 1.
Step 1: acquiring open map data at regular time and processing;
step 2: calculating the travel speed of each road section according to the map data;
step 3: training a traffic situation algorithm model through an LSTM model according to historical map data and travel speed;
step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
As shown in fig. 4, the specific steps are as follows.
Step 41: predicting future traffic flow through a traffic situation prediction model and historical traffic flow obtained from open map data;
step 42: calculating the stroke speed according to the function v=k/Q, according to the BPR formula
Calculating congestion condition by TT=T0× (1+alpha (V/V0) ≡beta), wherein V is travel speed, K is constant, Q is future traffic flow, TT is total travel time, T0 is travel time in free flow state, V0 is free flow speed, alpha and beta are experience parameters;
in traffic, the flow and the speed are inversely related, i.e. the greater the flow, the lower the speed, and the function v=k/Q is used to estimate the stroke speed. The BPR formula is a classical algorithm model of the relation between traffic flow and road congestion, and the BPR formula considers that the slower the vehicle speed on the road is, the longer the travel time is, and the different congestion degrees of the road can be measured by adjusting two parameters of alpha and beta.
Step 43: and selecting an optimal running path for the automatic driving vehicle according to the calculated travel speed and the congestion condition.
As shown in fig. 4, the specific steps are as follows.
Step 431: comparing the calculated travel speed with the historical travel speed;
as is known from the above step 331, the history data set includes history map data and history travel speed. In step 42, the travel speed is calculated based on the predicted traffic flow, and the calculated travel speed is compared with the historical travel speed.
Step 432: when the calculated travel speed is reduced by more than 50%, judging that the traffic of the road section is abnormal, and re-planning a travel path according to the predicted traffic situation of the future time period;
the criterion for judging whether the traffic road section is abnormal is that the calculated travel speed is reduced by more than 50% compared with the historical travel speed, and when 50% of the travel speed is adjustable according to specific conditions.
And applying the judged result to a global path planning algorithm of the vehicle, and re-planning a driving path according to the predicted traffic situation of the future time period. For example, when an abnormal situation occurs on the currently planned road a, congestion may occur, but the traffic situation predicted by the other road B shows smooth communication, the vehicle can re-plan the path, and the vehicle is not on the road a, but is on the road B to go to the destination, so that the riding experience of the passenger is improved while the traveling requirement of the passenger is met.
Step 433: the vehicle travels according to the re-planned path.
At the re-planning of the global path through step 432, the vehicle is then driven in accordance with the re-planned path.
According to the technical scheme provided by the invention, the travel speed of each road section can be calculated by acquiring the open map data, then the traffic situation algorithm model is trained through the LSTM model according to the map data and the travel speed, and finally the traffic situation of the future time period is predicted through the traffic situation algorithm model and the historical dataset so as to be used for global path planning of the vehicle. The technical method can reduce and reduce the construction cost of road side equipment, and carry out global path planning through the prediction of traffic situation, so that the congestion road section is avoided, and the riding experience of passengers is improved while the traveling demands of the passengers are met.
In summary, the technical scheme provided by the embodiment of the invention is that the map data provided by the third party is applied to model training, so that the construction cost of road side equipment is reduced; meanwhile, the LSTM (long and short term memory neural network prediction model) is utilized, so that the characteristics of the long-time dependence of traffic flow data can be better extracted, the characteristics input in the last time are reflected into the network together with the content input in the current time to participate in training after being quantized, and the application range of the data is improved. The method can effectively predict future traffic situation, so that a global path is planned, a reasonable driving path is selected for passengers, congestion is avoided, and riding experience of the passengers is improved while the traveling demands of the passengers are met.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (8)

1. The traffic situation prediction method based on the LSTM model is applied to an automatic driving vehicle and is characterized by comprising the following steps of:
step 1: acquiring open map data at regular time and processing;
step 2: calculating the travel speed of each road section according to the map data;
step 3: training a traffic situation algorithm model through an LSTM model according to the map data and the travel speed;
step 4: and predicting the traffic situation of the future time period through the traffic situation algorithm model and the historical data set so as to enable the vehicle to conduct global path planning.
2. The traffic situation prediction method based on the LSTM model as claimed in claim 1, wherein the step 1 includes:
step 11: open map data were acquired every 1 minute:
step 12: repairing the data missing by adopting the following functions:wherein x is a+i For the missing data at time a+i, x a 、x a+j The original data values at the time a and the time a+j are respectively;
step 13: the data were normalized using the following function:x i is normalized data of original data, x max 、x min Y is the maximum and minimum in the original data max 、y min Here, default data, respectivelyAre-1 and 1.
3. The traffic situation prediction method based on the LSTM model as claimed in claim 1, wherein the step 3 includes:
step 31: establishing traffic flow sequence t= (x) 1 ,x 2 ,x 3 ……,x T ) Wherein x is t The traffic flow of the road section in the t-th time period;
step 32: the traffic situation algorithm model input and input sequences are respectively expressed as follows:
where xi= (Xi-3 Δt, xi-2 Δt, xi- Δt, xi), yi= (xi+Δt, xi+2 Δt, xi+3 Δt), i=4, 5, … T;
step 33: the input sequence is trained by the LSTM model, so that the traffic situation algorithm model predicts the traffic flow of 3 time periods in the future by using the data of 4 continuous time periods which are used up.
4. The traffic situation prediction method based on the LSTM model according to claim 3, wherein the map data and the travel speed according to the history include:
step 331: acquiring a historical data set, wherein the historical data set comprises map data acquired in the past and travel speeds of all road sections calculated according to the map data;
step 332: judging whether the data set is updated or not;
step 333: when the data set is updated, the data for predicting the future traffic situation is selected again according to the current situation.
5. The traffic situation prediction method based on the LSTM model as claimed in claim 3, wherein the LSTM model is set as follows: the input layer is 4 neurons, the hidden layer LSTM structure unit is 20, the output layer is 3 neurons, the maximum iteration number is 1000, and the loop is jumped out when the error is less than 10 to 5.
6. The traffic situation prediction method based on the LSTM model according to claim 1, wherein the step 4 includes:
step 41: predicting future traffic flow through a traffic situation prediction model and historical traffic flow obtained from open map data;
step 42: calculating a travel speed according to a function v=k/Q, calculating a congestion condition according to a BPR formula tt=t0× (1+α× (V/V) ∈β), wherein V is the travel speed, K is a constant, Q is a future traffic flow, TT represents a total travel time, T0 represents the travel time in a free flow state, V0 represents the free flow speed, and α and β are empirical parameters;
step 43: and selecting an optimal running path for the automatic driving vehicle according to the calculated travel speed and the congestion condition.
7. The traffic situation prediction method based on the LSTM model according to claim 6, wherein the step 43 includes:
step 431: comparing the calculated travel speed with the historical travel speed:
step 432: when the calculated travel speed is reduced by more than 50%, judging that the traffic of the road section is abnormal, and re-planning a travel path according to the predicted traffic situation of the future time period;
step 433: the vehicle travels according to the re-planned path.
8. The traffic situation prediction method based on the LSTM model according to claim 7, wherein the traffic situation of the future period of time includes congestion situations and recommended vehicle speeds of each road section of the future period of time.
CN202311843895.0A 2023-12-29 2023-12-29 Traffic situation prediction method based on LSTM model Pending CN117789472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311843895.0A CN117789472A (en) 2023-12-29 2023-12-29 Traffic situation prediction method based on LSTM model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311843895.0A CN117789472A (en) 2023-12-29 2023-12-29 Traffic situation prediction method based on LSTM model

Publications (1)

Publication Number Publication Date
CN117789472A true CN117789472A (en) 2024-03-29

Family

ID=90395997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311843895.0A Pending CN117789472A (en) 2023-12-29 2023-12-29 Traffic situation prediction method based on LSTM model

Country Status (1)

Country Link
CN (1) CN117789472A (en)

Similar Documents

Publication Publication Date Title
Jindal et al. Optimizing taxi carpool policies via reinforcement learning and spatio-temporal mining
US9776512B2 (en) Methods, circuits, devices, systems and associated computer executable code for driver decision support
US6539300B2 (en) Method for regional system wide optimal signal timing for traffic control based on wireless phone networks
CN112820108B (en) Self-learning road network traffic state analysis and prediction method
US20200135018A1 (en) Method of predicting traffic congestion and controlling traffic signals based on deep learning and server for performing the same
CN104121918A (en) Real-time path planning method and system
CN110274609B (en) Real-time path planning method based on travel time prediction
CN104123833A (en) Road condition planning method and device thereof
CN106816009B (en) Highway real-time traffic congestion road conditions detection method and its system
CN111815948B (en) Vehicle running condition prediction method based on condition characteristics
CN109612488B (en) Big data micro-service-based mixed travel mode path planning system and method
Monteiro et al. On-street parking prediction using real-time data
CN109191852B (en) Vehicle-road-cloud cooperative traffic flow situation prediction method
CN103366224B (en) Passenger demand prediction system and method based on public transport network
CN112784000B (en) Passenger searching method based on taxi track data
CN111724595A (en) Highway section flow estimation method based on charging data
EP4060642A1 (en) Method and system of predictive traffic flow and of traffic light control
CN113175939A (en) Pure electric vehicle travel planning method and system
CN112926768A (en) Ground road lane-level traffic flow prediction method based on space-time attention mechanism
CN109489679A (en) A kind of arrival time calculation method in guidance path
CN116050581A (en) Smart city subway driving scheduling optimization method and Internet of things system
JP7291252B2 (en) Processing route information
CN109754606B (en) Method for predicting road congestion condition based on taxi positioning
WO2023276420A1 (en) Distributed multi-task machine learning for traffic prediction
CN110674990B (en) Instant distribution path selection method and system with sliding window updating mechanism

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