A scenario-adaptive traffic flow prediction method

By classifying traffic conditions into three categories and constructing corresponding models, the problem of the inability of existing technologies to accurately predict traffic flow in all scenarios is solved, and accurate prediction under different traffic conditions is achieved.

CN115238984BActive Publication Date: 2026-03-10TRAFFIC MANAGEMENT RES INST OF THE MIN OF PUBLIC SECURITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods cannot accurately predict traffic flow in all scenarios, especially when traffic flow changes drastically due to unforeseen events, where the prediction performance is poor.

Method used

Traffic conditions are categorized into normal traffic conditions without emergencies, non-periodic traffic congestion caused by emergencies, and sharp reduction in traffic flow. ARIMA, LSTM, and KF models are constructed for prediction in each category. The appropriate model is selected for prediction based on real-time traffic condition assessment.

Benefits of technology

It can achieve accurate traffic flow prediction in any traffic scenario, improving the applicability and accuracy of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115238984B_ABST
    Figure CN115238984B_ABST
Patent Text Reader

Abstract

This invention provides a scenario-adaptive traffic flow prediction method that categorizes traffic states into three scenarios and selects different traffic flow algorithms for each scenario, constructing separate traffic flow prediction models to ensure coverage of all traffic states. During traffic flow prediction, the current traffic flow is compared with historical data over a specified monitoring period. The current traffic state is determined by using upper and lower thresholds for comparison with the traffic flow aggregate of the same period. Then, different traffic flow prediction models are used to predict the traffic flow for the next moment, ensuring accurate traffic flow prediction results in any scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent traffic control technology, specifically to a scenario-adaptive traffic flow prediction method. Background Technology

[0002] Traffic flow refers to the number of traffic entities passing through a specific location, cross-section, or lane of a road within a selected time period. It is a crucial indicator characterizing traffic flow. In real-world scenarios, for travelers, knowing real-time and accurate traffic flow forecasts can prevent impulsive travel and the time and economic losses caused by traffic congestion. For administrators, knowing real-time and accurate traffic flow forecasts helps in formulating traffic control strategies to alleviate traffic congestion, thereby achieving smooth and efficient road network operation. Research on traffic flow forecasting is a key focus for technical personnel, especially traffic flow forecasting under unforeseen circumstances.

[0003] In existing technologies, machine learning prediction models are commonly used for traffic flow prediction. These models can achieve good prediction results under normal traffic conditions and non-periodic congestion scenarios. However, they do not consider scenarios where traffic flow decreases sharply due to factors such as traffic control during major events. Therefore, existing traffic flow prediction methods cannot ensure accurate prediction results in all traffic scenarios. Summary of the Invention

[0004] To address the issue that existing traffic flow prediction methods are not applicable to all traffic scenarios, this invention provides a scenario-adaptive traffic flow prediction method that can cover all traffic scenarios and ensure accurate traffic flow prediction results in any scenario.

[0005] The technical solution of this invention is as follows: a scenario-adaptive traffic flow prediction method, characterized by comprising the following steps:

[0006] S1: Determine the road segment to be predicted and divide the traffic situation into three traffic states, including:

[0007] Normal traffic conditions without emergencies, non-periodic traffic congestion caused by emergencies, and sharp reduction in traffic flow caused by emergencies;

[0008] S2: Construct traffic flow prediction models for the three traffic conditions respectively:

[0009] For the normal traffic conditions without any emergencies, a conventional traffic flow prediction model is constructed based on the autoregressive integral moving average model, denoted as: ARIMA model;

[0010] To address the non-periodic traffic congestion caused by the aforementioned sudden events, a non-periodic congestion traffic flow prediction model is constructed based on the Long Short-Term Memory (LSTM) neural network model, denoted as: LSTM model;

[0011] To address the sharp decline in traffic flow caused by the aforementioned sudden event, a non-periodic sharp decline traffic flow prediction model is constructed based on the Kalman filter algorithm, denoted as the KF model.

[0012] S3: Using historical data of the checkpoint trajectory data of the road segment to be predicted as training data, train the three traffic flow prediction models respectively to obtain the trained traffic flow prediction models.

[0013] S4: Specify the start time for traffic flow prediction and collect traffic flow data for the road segment to be predicted in real time;

[0014] S5: Run the trained LSTM, ARIMA, and KF models in real time;

[0015] S6: Real-time determination of the traffic state of the collected traffic flow data, and prediction of the traffic flow for the next moment based on the selected traffic flow prediction model.

[0016] The detailed steps include:

[0017] a1: Pre-specify a time period td as a monitoring time point, and set the start time of the traffic flow prediction to monitoring time 0;

[0018] a2: Obtain the traffic flow data at the current time t and compare it with the traffic flow data at the same time period in history, set Q. t ;

[0019] Traffic Comparison Set Q t =[q t-1*T ,q t-2*T ,...,q t-m*T ]

[0020] Where: T is the monitoring period, T = n * td, that is, the traffic flow data at the current time t is compared horizontally with the data from n times td in the past to determine the traffic status at the current time t, where n is a positive integer;

[0021] q t The current traffic flow is monitored; m represents the number of historical monitoring periods to be compared; q represents the current traffic flow. t-m*T The traffic flow rate before m monitoring cycles;

[0022] a3: Real-time traffic comparison set Q t upper quartile q t 3 and lower quartile q t1;

[0023] Let IOR = q t 3-q t 1;

[0024] The upper limit threshold q of the traffic comparison is calculated. tup Compared with the lower limit threshold q of the traffic volume tdo :

[0025] Traffic comparison upper limit threshold q tup =q t 3 + 1.5 * IOR

[0026] Traffic comparison lower limit threshold q tdo =q t 1-1.5*IOR;

[0027] a4: q t The values ​​of q are respectively tup and q tdo Compare the values;

[0028] If q t ≥q tdo And q t ≤q tup If the traffic flow data at the current time t is under the normal traffic condition without any sudden events, then the traffic flow prediction value at time t+1 is the prediction value of the ARIMA model.

[0029] If q t >q tup , indicating that the traffic flow data at the current time t is in a non-periodic traffic congestion state caused by the sudden event, then: the traffic flow prediction value at time t+1 is the prediction value of the LSTM model;

[0030] If q t tdo If t indicates that the traffic flow data at the current time t is under the state of sharp reduction in traffic flow caused by the sudden event, then: the traffic flow prediction value at time t+1 is the prediction value of the KF model.

[0031] Its further features are:

[0032] It also includes step S8: whenever t is divisible by T, the traffic flow from time tT to T is used as historical data to retrain the ARIMA model, and the latest trained ARIMA model is used to predict the traffic flow in the next cycle.

[0033] The units for the monitoring time td and the monitoring period T include: minutes, hours, days, weeks, months or years;

[0034] ​The monitoring time td = 15 minutes, the monitoring period T = 1 day, and m = 7.

[0035] This invention provides a scenario-adaptive traffic flow prediction method that categorizes traffic states into three scenarios and selects different traffic flow algorithms for each scenario, constructing separate traffic flow prediction models to ensure coverage of all traffic states. During traffic flow prediction, the current traffic flow is compared with historical data over a specified monitoring period. The current traffic state is determined by using upper and lower thresholds for comparison with the traffic flow aggregate of the same period. Then, different traffic flow prediction models are used to predict the traffic flow for the next moment, ensuring accurate traffic flow prediction results in any scenario. Attached Figure Description

[0036] Figure 1 This is a flowchart of the scene-adaptive traffic flow prediction method in this invention. Detailed Implementation

[0037] like Figure 1 As shown, the present invention includes a scenario-adaptive traffic flow prediction method, which includes the following steps.

[0038] S1: Identify the road segment to be predicted, and divide the traffic state scenario into three traffic states to ensure coverage of all traffic states of the road segment, specifically including:

[0039] Normal traffic conditions without any emergencies, such as periodic congestion caused by commuting to and from get off work;

[0040] Non-periodic traffic congestion caused by unforeseen events, such as traffic accidents.

[0041] And the sharp decline in traffic flow caused by emergencies, such as the reduction in traffic flow under epidemic control measures.

[0042] S2: Construct traffic flow prediction models for the three traffic conditions respectively:

[0043] For normal traffic conditions without emergencies, a conventional traffic flow prediction model, denoted as ARIMA model, is constructed based on the autoregressive integral moving average model. The autoregressive integral moving average model is simple and very suitable for predicting periodically changing phenomena, but its prediction effect is not good for nonlinear data. Therefore, this model is used to predict traffic flow under normal traffic conditions. Normal traffic conditions without emergencies usually account for the largest proportion of traffic conditions. Therefore, using the ARIMA model to predict traffic flow under normal traffic conditions has low requirements for server hardware performance and is fast.

[0044] To address non-periodic traffic congestion caused by unforeseen events, a traffic flow prediction model for non-periodic congestion is constructed based on a Long Short-Term Memory (LSTM) neural network model, denoted as the LSTM model. LSTM is a machine learning algorithm well-suited for predicting non-linear data with spatiotemporal correlations; however, the model is complex, and its prediction accuracy largely depends on the training data. Among other methods, the LSTM model is chosen for predicting traffic flow in non-periodic traffic congestion caused by unforeseen events, particularly suitable for traffic flow prediction where the training data is continuously updated. Updating the training data ensures that the prediction accuracy increases over time.

[0045] To address the sharp decline in traffic flow caused by unforeseen events, a non-periodic sharp decline traffic flow prediction model, denoted as the KF model, is constructed based on the Kalman filter algorithm. In traffic conditions, sharp declines caused by unforeseen events account for a relatively small percentage. This invention uses the Kalman filter algorithm to construct the prediction model, eliminating the need for extensive data training. By fusing observed and estimated data, real-time traffic flow prediction can be achieved, making this model particularly suitable for predicting scenarios of sudden traffic flow reductions.

[0046] S3: Using historical data of checkpoint trajectory data of the road segment to be predicted as training data, train three traffic flow prediction models respectively to obtain a trained traffic flow prediction model.

[0047] When constructing training data, historical data and three traffic states are classified and defined using labels and other methods.

[0048] Training an ARIMA model involves the following steps:

[0049] The first step is to test the stationarity of the time series. This is typically done using the ADF or PP test to perform a unit root test on the original series. If the series does not meet the stationarity condition, it can be transformed into a stationary time series through differencing or logarithmic differencing, and then an ARIMA model can be constructed for the stationary time series.

[0050] The second step is to determine the order of the model. By using some statistics that can describe the characteristics of the sequence, such as the autocorrelation (AC) coefficient and the partial autocorrelation (PAC) coefficient, the possible forms of the model are initially identified. Then, according to the order determination criteria such as AIC, the best model is selected from the available models.

[0051] The third step is parameter estimation and diagnostic testing. This includes testing the significance of the model parameters, the validity of the model itself, and whether the residual sequence is white noise. If the model passes the tests, the model specification is basically correct; otherwise, the model form must be redefined and diagnostic tests performed until a correctly specified model form is obtained.

[0052] Training an LSTM model includes the following steps:

[0053] During the training phase, the state space vector is first defined. Assuming the current time is t (t is an integer greater than or equal to 0), the state space vector at time t is defined as: Z(t) = [q...]. t ,q t-1 ,…,q t-p ], where q t It is the current flow rate, q t-1 It is the flow of the previous time step in the current time step, q t-p It represents the traffic of the previous p time steps.

[0054] During the training phase of the model, let y t The data is equal to the flow observation value at time t+1, resulting in a dataset S with a sample size of l; a prediction function f is trained based on the LSTM model.

[0055] During the prediction phase of the model, the current flow q is continuously collected. t This forms a new state space vector Z(t), which is then used as input to f to obtain the predicted flow rate for the next time step.

[0056] Regarding the KF model, the Kalman filter algorithm is a data fusion algorithm that combines observed and estimated data without requiring extensive data training.

[0057] The Kalman filter algorithm estimates the true value in two processes: prediction and update.

[0058] The prediction process is as follows:

[0059] X(t+1,t)=AX(t)+BU(t) (Formula 1)

[0060] P(t+1,t)=AP(t)A T +Q (Formula 2)

[0061] The update process is as follows:

[0062] K(t+1)=P(t+1,t)H T [HP(t+1,t)H T +R] -1 (Formula 3)

[0063] X(t+1)=X(t+1,t)+K(t+1)[Z(t)-HX(t+1,t)] (Formula 4)

[0064] P(t+1)=[IK(t+1)H]P(t+1,t) (Formula 5)

[0065] Where the current time is t, X(t+1,t) is the predicted state space vector at time t+1, x(t) represents the estimated value of the predicted state space vector, P(t+1,t) is the covariance between the predicted value and the true value, and P(t+1) is the next time step of P(t).

[0066] A is the state transition matrix, BU(t) is the external input component, R is the covariance of the observation noise; K(t+1) is the Kalman gain, Z(t) is the state space vector at time t, and the observed value is consistent with the state space vector defined in the LSTM model. I is the identity matrix.

[0067] In this embodiment, the variable matrices A, P, Q, and R are all taken as identity matrices.

[0068] The prediction process of the KF model is as follows:

[0069] First, set A, P, Q, and R to be identity matrices, X(0) = Z(0), BU(t) = 0, and start the algorithm:

[0070] ① Calculate X(t+1,t) and the covariance matrix P(t+1,t) between the predicted and actual values ​​according to Formula 1 and Formula 2;

[0071] ② Calculate the Kalman gain K(t+1) according to Formula 3, and then estimate the state space vector estimate X(t+1) at time t+1 according to Formula 4;

[0072] ③ Calculate the error covariance matrix P between the estimated value and the true value at the next time step according to Formula 5, and use it for the next recursion.

[0073] Repeat steps ① to ③ to obtain the predicted values ​​for all state spaces. Take the first value in the state space vector of each prediction as the predicted flow rate.

[0074] Depending on the road conditions, traffic characteristics, or required prediction accuracy of the road segment to be predicted, the monitoring time td and monitoring period T can be set to a time period in units of minutes, hours, days, weeks, months, or years; for example, the monitoring time td is 1 hour or 1 day, and the monitoring period T is set to 1 day or 1 week.

[0075] In traffic control theory and practice, a minimum time requirement for a traffic state is usually defined, namely, the minimum stable period of traffic flow is generally 15 minutes. In other words, the traffic flow must remain stable for at least 15 minutes before it can be confirmed that the road segment has entered a certain traffic state. Therefore, in this embodiment, the monitoring time td = 15 minutes, the monitoring period T = 1 day, and m is set to 7.

[0076] Table 1 shows an example of vehicle passage data collected by checkpoint equipment:

[0077] Table 1: Example of vehicle passage data

[0078] time Vehicle license plate number 2021-05-01 12:10:10 A 2021-05-01 12:12:10 B 2021-05-01 12:17:10 C 2021-05-01 12:18:10 D 2021-05-01 12:19:10 E 2021-05-01 12:27:10 F 2021-05-01 12:28:10 G 2021-05-01 12:30:10 H 2021-05-01 12:50:10 I

[0079] In this method, the calculation method for traffic flow data is the same for both the training data collection and the prediction data collection. Let the monitoring time td = 15 minutes; then the traffic flow data for each hour is the traffic flow data corresponding to each monitoring time td multiplied by 4. The calculation method for traffic flow is illustrated using the data in Table 1 as an example.

[0080] Starting from 12:10:10, the traffic flow corresponding to each monitoring time td is calculated at intervals of td = 15 minutes.

[0081] The traffic flow corresponding to the first monitoring time is 5 * 4 = 20;

[0082] The traffic flow corresponding to the second monitoring time is 3*4=12;

[0083] The traffic flow corresponding to the third monitoring time is 1*4=4.

[0084] When constructing the training dataset for the LSTM model using the data in Table 1, p = 2 is set. Then, the state space vector Z(2) = [q2, q1, i.e. [12, 20] at the second time step, and its corresponding y2 = q3 = 4. The state space vector corresponding to each time step and the corresponding flow observation value at the next time step are calculated in turn to form the training dataset for the LSTM model.

[0085] The training dataset is input into the constructed LSTM model to complete the training. After training, the LSTM model does not need to be updated. It only needs to continuously input the state space vector at the current time step during the prediction phase to obtain the traffic flow prediction value at the next time step.

[0086] When constructing the training dataset for the ARIMA model using the data in Table 1, historical data corresponding to normal traffic scenarios are extracted, processed, and used to form the training dataset for the ARIMA model. Still using td = 15 minutes as the time interval, the training data for the ARIMA model is [20, 12, 4…]. This data is then input into the constructed ARIMA model for training. Once training is complete, the trained ARIMA model is obtained.

[0087] When using a trained ARIMA model for specific predictions, input the number of output values ​​NT that you need from the model each time. The model will then output NT consecutive predicted values ​​starting from the current time. Taking a monitoring period T of 1 day and td = 15 as an example, if you expect the model to output predicted values ​​for all monitoring times within a day, simply input: 96. The trained ARIMA model will then output the traffic prediction values ​​for 96 consecutive monitoring times starting from the current time.

[0088] The process of traffic flow prediction using the KF model. The KF model only requires initial input at the beginning of the prediction stage, and then the algorithm automatically iterates and continuously outputs the predicted values. Assume that the current time is 2 and the traffic flow at the third time is predicted. First, set A, P, Q, R, and H to be identity matrices, X(2)=Z(2)=[12,20], BU(t)=0, and substitute them into formula 1 and formula 2 to obtain X(3,2) and P(3,2) respectively;

[0089] The first element of X(3,2) is the predicted flow rate at time 3. When time 3 arrives, X(3,2), P(3,2) and the observed Z(3) are substituted into formulas 3, 4 and 5 to obtain X(3) and P(3). Then, they are substituted back into formulas 1 and 2 to obtain X(4,3) and P(4,3). The first element of the obtained X(4,3) matrix is ​​the predicted flow rate at time 4. The prediction is then iterated continuously.

[0090] S4: When using this method to predict traffic flow, first specify the start time of traffic flow prediction, and then collect traffic flow data in real time for the road segment to be predicted based on the checkpoint monitoring equipment.

[0091] S5: Run the trained LSTM, ARIMA, and KF models in real time.

[0092] S6: Real-time determination of the traffic state of the collected traffic flow data, and prediction of the traffic flow for the next moment based on the selected traffic flow prediction model, including the following steps.

[0093] a1: Pre-specify a time period td as a monitoring time, and set the start time of traffic flow prediction to monitoring time 0.

[0094] a2: Obtain the traffic flow data at the current time t and compare it with the traffic flow data at the same time period in history, set Q. t ;

[0095] Traffic Comparison Set Q t =[q t-1*T ,q t-2*T ,...,q t-m*T ]

[0096] Where: T is the monitoring period, T = n * td, that is, the traffic flow data at the current time t is compared horizontally with the data from n times td in the past to determine the traffic status at the current time t, where n is a positive integer;

[0097] q t The current traffic flow is monitored; m represents the number of historical monitoring periods to be compared; q represents the current traffic flow. t-m*T The traffic flow is the traffic volume monitored m monitoring cycles ago.

[0098] a3: Real-time traffic comparison set Q t upper quartile q t 3 and lower quartile q t 1;

[0099] Let the quarterback difference IOR = q t 3-q t 1;

[0100] The upper limit threshold q of the traffic comparison is calculated. tup Compared with the lower limit threshold q of the traffic volume tdo :

[0101] Traffic comparison upper limit threshold q tup =q t 3 + 1.5 * IOR

[0102] Traffic comparison lower limit threshold q tdo =q t 1-1.5*IOR.

[0103] a4: q t The values ​​of q are respectively tup and q tdo Compare the values;

[0104] If q t ≥q tdo And q t ≤q tup If t indicates that the traffic flow data at the current time t is under normal traffic conditions without any emergencies, then the traffic flow prediction value at time t+1 is the prediction value of the ARIMA model.

[0105] If q t>q tup If t indicates that the traffic flow data at the current time t is in a non-periodic traffic congestion state caused by a sudden event, then the traffic flow prediction value at time t+1 is the prediction value of the LSTM model.

[0106] If q t tdo If t indicates that the traffic flow data at the current time t is under a state of sharp reduction in traffic flow caused by a sudden event, then the traffic flow prediction value at time t+1 is the prediction value of the KF model.

[0107] In the technical solution of this invention, the traffic flow data q at the current time t is... t The collection of historical traffic flow data for the same period of the road segment to be predicted (Q) t The upper and lower thresholds are compared to determine q. t The current traffic condition is considered, and the predicted value of the corresponding traffic flow prediction model is selected as the predicted value of the traffic flow for the next moment; this is achieved by using the historical traffic flow aggregation Q from the same period. t The current traffic condition is assessed to ensure that the assessment results match the actual road conditions of the road segment to be predicted, thereby ensuring that the selection of the traffic flow prediction model matches the actual situation of the road segment to be predicted.

[0108] Meanwhile, to ensure the accuracy of the ARIMA model's predictions, this method also includes step S8: whenever t is divisible by T, the traffic flow from time tT to T is used as historical data to retrain the ARIMA model, and the latest trained ARIMA model is used to predict the traffic flow in the next cycle.

[0109] In this embodiment, the monitoring time td = 15 minutes, that is, the traffic flow data is calculated every 15 minutes. The monitoring period T is divided into 96 time periods, that is: period T = 96 monitoring time periods, and m is 7.

[0110] Assuming the current time t is 1, and q1 is the monitored traffic at the current time, assuming it is 1000, calculate the traffic comparison set Q using historical data. t =[q 1-1*96 ,q 1-2*96 ,q 1-3*96 ,q 1-4*96 ,q 1-5*96 ,q 1-6*96 ,q 1-7*96 ].

[0111] Assuming the first case is Q1 = [1000, 1001, 1002, 1003, 1004, 1005, 1006], then the upper quartile of Q1 is calculated to be q13 = 1004.5, and the lower quartile is calculated to be q11 = 1001.5. ​

[0112] Therefore: Q1's IOR = q13 - q11 = 3, and the flow rate is compared to the upper limit threshold q. 1up =q13 + 1.5 * IOR = 1009, where q is the lower limit threshold for flow comparison. 1do =q11-1.5*IOR=997;

[0113] Because q 1do ≤q1≤q 1up Therefore, the ARIMA model is used to predict traffic flow at time 2.

[0114] Assuming the second case is Q1 = [990, 991, 992, 993, 994, 995, 996], the upper quartile of Q1 is calculated to be q13 = 994.5, and the lower quartile is calculated to be q11 = 991.5.

[0115] Therefore, the IOR of Q1 is q13 - q11 = 3, and the flow rate is compared to the upper limit threshold q. 1up =q13 + 1.5 * IOR = 999, the lower limit threshold for flow comparison q 1do =q11-1.5*IOR=987;

[0116] Because q1>q 1up Therefore, the LSTM model is selected to predict the traffic flow at time 2.

[0117] In the third case, Q1 = [1010, 1011, 1012, 1013, 1014, 1015, 1016]. The upper quartile of Q1 is calculated to be q13 = 1014.5, and the lower quartile is calculated to be q11 = 1011.5.

[0118] Therefore, the IOR of Q1 is q13 - q11 = 3, and the flow rate is compared to the upper limit threshold q. 1up =q13 + 1.5 * IOR = 1019, the lower limit threshold for flow rate comparison q 1do =q11-1.5*IOR=1007;

[0119] Because q1 1do Therefore, the KF model is used to predict traffic flow at time 2.

[0120] When t is 96, then t is divisible by T. Therefore, the flow from time 0 to 96 is used as historical data to train and retrain the ARIMA model. After training is completed, the flow prediction in step 4 is executed again, and this process is repeated continuously.

[0121] ​After using the technical solution of this invention, traffic conditions are divided into three scenarios based on actual conditions: normal traffic conditions without emergencies, such as periodic congestion caused by commuting; non-periodic traffic congestion caused by emergencies, such as congestion caused by traffic accidents; and sharp reduction in traffic flow due to emergencies, such as traffic control. Different traffic flow algorithms are selected for the characteristics of each scenario, and the real-time monitored traffic flow is compared with the historical traffic flow set Q. t The system can autonomously select the most suitable model for traffic prediction based on the upper and lower threshold values.

Claims

1. A scene-adaptive traffic flow prediction method, characterized in that, It comprises the following steps: S1: determining a to-be-predicted road section, dividing a traffic state scene into three traffic states, including: a normal traffic state under no emergency, a non-periodic traffic congestion state caused by an emergency, and a traffic flow sharp reduction state caused by an emergency; S2: constructing traffic flow prediction models for the three traffic states respectively: for the normal traffic state under no emergency, a conventional state flow prediction model is constructed based on an autoregressive integrated moving average model, denoted as: an ARIMA model; for the non-periodic traffic congestion state caused by an emergency, a non-periodic congestion state flow prediction model is constructed based on a long short-term memory neural network model, denoted as: an LSTM model; for the traffic flow sharp reduction state caused by an emergency, a non-periodic sharp reduction state flow prediction model is constructed based on a Kalman filter algorithm, denoted as: a KF model; S3: training the three traffic flow prediction models respectively based on historical data of the to-be-predicted road section as training data; S4: specifying a traffic flow prediction start time, and collecting vehicle flow data of the to-be-predicted road section in real time; S5: running the trained LSTM model, ARIMA model, and KF model in real time; S6: judging the traffic state of the collected vehicle flow data in real time, and selecting a traffic flow prediction model to predict the traffic flow of the next moment; in detail, comprising the following steps: a1: pre-specifying a time period td as a monitoring time, and setting the traffic flow prediction start time as monitoring time 0; a2: obtaining the traffic flow data of the current time t and the flow comparison set Q of the same time period in history t ; Flow contrast set Q t = [q t-1*T , q t-2*T ,..., q t-m*T ] wherein: T is a monitoring period, T=n*td, that is, the vehicle flow data at the current time t is compared with the data n td ago in history to judge the traffic state at the current time t, wherein n is a positive integer; q t monitoring traffic flow at the current time; m is the number of historical monitoring periods to be compared; q t-m*T monitoring traffic flow before m monitoring periods; a3: real-time computed flow contrast set Q t upper quartile q t 3 and lower quartile q t 1; Let IOR = q t 3 - q t 1 ; The flow rate contrast upper threshold value q tup and the flow rate contrast lower threshold value q tdo : flow rate contrast upper threshold value q tup = q t 3 + 1.5 * IOR, flow rate contrast lower threshold value q tdo = q t 1 - 1.5 * IOR; a4: compare the value of q t with the value of q tup and q tdo respectively; if q t ≥ q tdo and q t ≤ q tup , it indicates that the traffic flow data at the current time t is in the normal traffic state without the sudden event, then the traffic flow prediction value at the time t+1 is selected as the prediction value of the ARIMA model; If q t > q tup , it indicates that the traffic flow data at the current time t is in the non-periodic traffic congestion state caused by the sudden event, then: the traffic prediction value at time t+1 is selected from the prediction value of the LSTM model; If q t <q tdo , it indicates that the traffic flow data at the current time t is in the sharp decrease state caused by the sudden event, then the traffic prediction value at time t+1 is selected as the prediction value of the KF model.

2. The method of claim 1, wherein: it further comprises step S8: whenever t is divisible by T, the flow from t-T to T is taken as historical data to retrain the ARIMA model, and the latest trained ARIMA model is used to predict the traffic flow in the next period. 3.The scene-adaptive traffic flow prediction method of claim 1, wherein: The units of the monitoring time td and the monitoring period T include: minutes, hours, days, weeks, months, or years.

4. The method of claim 1, wherein: The monitoring time td is 15 minutes, the monitoring period T is 1 day, and m is 7.

Citation Information

Patent Citations

  • Method and device for predicting vehicle flow

    CN109300310A

  • Road traffic flow condition prediction method in data sparse time period

    CN110738855A