Traffic speed prediction method based on multi-moment traffic flow
By building a matrix on traffic flow and vehicle speed data and using machine learning models to predict traffic speed, the problems of high cost of hardware equipment and low detection accuracy in the existing technology are solved, and low-cost and accurate traffic speed prediction and congestion points are achieved. Identify.
Patent Information
- Application Number
- CN202411504234.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-03
AI Technical Summary
The existing traffic speed measurement methods require the installation of hardware equipment on road facilities, resulting in high costs and target occlusion problems of speed measurement equipment, resulting in low detection accuracy and inability to accurately predict traffic flow trends.
By collecting vehicle traffic and vehicle speed data at the modeled position and the position to be tested, the flow matrix and the speed matrix are constructed, and the traffic flow-speed matching relationship model is trained using machine learning models (such as long-term and short-term memory networks) to predict the vehicle speed at the position to be tested.
Traffic speed prediction based on traffic flow data is realized, detection costs are reduced, road network operation status can be quickly perceived, road managers can plan routes and identify congestion points, formulate mitigation strategies, and there is no need to set up expensive traffic speed measurement instruments.
Smart Images

Figure CN119252045A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of traffic engineering, and in particular relates to a traffic speed prediction method based on multi-time traffic flow. Background Art
[0002] With the rapid development of social economy and the continuous improvement of people's living standards, the number of vehicles on urban roads has continued to increase. Although it has brought convenience to travel, it has also caused serious traffic congestion problems. As an efficient transportation management system, Intelligent Traffic System (ITS) can make full use of existing transportation infrastructure to achieve pre-traffic diversion. Among them, traffic speed prediction is an important part of ITS, which can dynamically capture the development trend of traffic flow status. Accurate traffic speed prediction not only helps road traffic management, but also provides guidance for personal travel. For example, road traffic management departments can determine and predict congestion locations based on traffic speed prediction results, analyze the causes of traffic congestion, and propose corresponding solutions. In addition, individuals can also reasonably plan travel time and itinerary based on the prediction results before traveling.
[0003] In fact, many cities’ existing road infrastructure is not equipped with traffic speed measuring instruments. On the one hand, traffic speed detection equipment such as drones and lidar are expensive. On the other hand, traffic detection equipment is usually blocked by vehicles and trees when collecting data, resulting in low accuracy of traffic speed data, inability to accurately judge traffic flow trends, and difficulty in formulating and implementing accurate traffic control strategies. Therefore, most cities only choose relatively low-cost camera equipment with flow detection functions. At the same time, in order to adapt to the intelligent upgrade of urban traffic, some cities choose to use floating car data or add traffic flow data monitoring equipment to perceive traffic operation status. However, whether it is floating car data or camera detection data, the core component is flow detection, resulting in the lack of speed data that most directly represents traffic status. Therefore, how to use machine learning algorithms to mine complex correlation patterns between flow and speed based on traffic flow data is a research focus. The current traffic speed measurement method also requires the installation of hardware equipment on road facilities for speed monitoring, resulting in the problem of high cost; and the speed measuring equipment has target occlusion, resulting in low speed detection accuracy. Summary of the invention
[0004] In order to solve at least one of the above problems existing in the prior art, the present invention provides a traffic speed prediction method based on multi-time traffic flow.
[0005] The present invention provides a traffic speed prediction method based on multi-time traffic flow, which predicts the vehicle speed of a location to be tested at the current moment and its previous and next moments according to the vehicle flow and vehicle speed of a modeling location at the current moment and its previous and next moments, and the vehicle flow of a location to be tested at the current moment and its previous and next moments.
[0006] Preferably, the method comprises the following steps:
[0007] Data collection step: collecting time data, vehicle flow data, and speed data at the modeling location on the road; collecting time data and vehicle flow data at the location to be tested on the road;
[0008] Matrix construction steps: in the time data collected at the modeling location and the location to be tested, assuming that the current state is M, n represents the time step of the state at the previous moment, and m represents the time step of the state at the next moment; at the modeling location, construct a flow matrix according to its vehicle flow data, and construct a speed matrix according to its speed data; at the location to be tested, construct a flow matrix according to its vehicle flow data;
[0009] Training step: inputting the flow matrix and speed matrix of the modeling location into the machine learning model for training to obtain a traffic flow-speed matching relationship model;
[0010] Speed prediction step: input the vehicle flow matrix of the position to be tested into the machine learning model, and calculate the predicted speed of the position to be tested at each detection moment through the traffic flow-speed matching relationship model.
[0011] Preferably, in the matrix construction step, the values of n and m are the same or different.
[0012] Preferably, in the matrix construction step, the value range of n is 0-5, and the value range of m is 0-5.
[0013] Preferably, in the matrix construction step, the value range of n is 1-4, and the value range of m is 1-4.
[0014] Preferably, in the matrix construction step, the value range of n is 2-4, and the value range of m is 2-4.
[0015] Preferably, in the matrix construction step, the value range of n is 2-5, and the value range of m is 2-5.
[0016] Preferably, in the matrix construction step, the value range of n is 3-5, and the value range of m is 3-5.
[0017] Preferably, in the matrix construction step, the value of n is 3 and the value of m is 3.
[0018] Preferably, in the training step, the machine learning model is selected from: a long short-term memory network model, a back propagation network, a classification regression tree, a k-nearest neighbor network, a support vector regression network, and preferably a long short-term memory network model.
[0019] The method predicts the vehicle speed of the location to be tested at the current moment and the moments before and after according to the vehicle flow and vehicle speed of the modeling location at the current moment and the moments before and after, and the vehicle flow of the location to be tested at the current moment and the moments before and after.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] 1. The present invention is a short-term traffic speed prediction method based on flow information, which can solve the technical problems that the cost of installing hardware equipment for speed monitoring on road facilities is too high, and the speed measuring equipment has target occlusion, resulting in low speed detection accuracy.
[0022] 2. The method proposed in the present invention can quickly perceive the operation status of the road network only by relying on traffic flow data, which can help travelers plan their travel routes and also help road managers identify congestion points and formulate congestion relief strategies. For example, the electronic toll collection system (ETC) on the highway can obtain traffic flow data, but cannot obtain vehicle speed information. The flow data alone cannot fully reflect the operation status of the highway. However, the flow data based on the ETC system in the present invention can predict the vehicle speed and then evaluate the operation status of the highway.
[0023] 3. The present invention does not need to install expensive traffic speed measuring instruments such as laser radar on the road. The future traffic speed can be predicted only by traffic data flow, and the detection cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the relationship between speed and flow rate curve in the prior art.
[0025] Figure 2 Schematic diagram of detection positions 1-5 of Example 1 and Comparative Example.
[0026] Figure 3 This is a schematic diagram of the APE value prediction results for detection location 1 on all dates in Example 1.
[0027] Figure 4 This is a schematic diagram of the APE value prediction results for all detection locations in Example 1 on the same day.
[0028] Figure 5 This is a schematic diagram of the MAPE value prediction results for all detection locations in Example 1 on different dates.
[0029] Figure 6The flowchart of the screening process of the traffic flow-based speed prediction method for comparison.
[0030] Figure 7 Generate a schematic diagram of the flow-velocity characteristic matrix for the comparative example.
[0031] FIG8( a ) is a schematic diagram of the speed prediction results of the detection position 1 of the comparative example on a certain working day.
[0032] FIG8( b ) is a schematic diagram of the speed prediction result of the detection position 1 of the comparative example on a rest day.
[0033] Fig. 9 Schematic diagram of MAPE values under different traffic flow pattern combinations for comparison; n represents the time step of the previous state, and m represents the time step of the subsequent state.
[0034] Fig.10 Schematic diagram of MAPE prediction results under different traffic flow pattern combinations within 15 days for comparison; the horizontal axis 3 / 3 represents the mode "n=3 and m=3". DETAILED DESCRIPTION
[0035] To make the technical solution, purpose and advantages of the present invention clearer, the present invention is further described in detail below through specific implementation examples. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0036] The present invention provides a traffic speed prediction method based on multi-time traffic flow. The present invention predicts the speed of the position to be tested at the current moment and the moments before and after the current moment based on the traffic volume and speed of the modeling position at the current moment and the moments before and after the current moment, and the traffic volume of the position to be tested at the current moment and the moments before and after the current moment. The method includes: for a certain position on the road (i.e. the modeling position) within a period of time, the traffic volume and speed of each detection moment and several detection moments before and after are input into a machine learning model for training to obtain a traffic flow-speed matching relationship model, and then the traffic volume of several other positions on the same road (i.e. the position to be tested) within the same time period, the same detection moment and several detection moments before and after are substituted into the traffic flow-speed matching relationship model to obtain the speed of the position to be tested at the corresponding moment. The prediction method includes the following steps:
[0037] Step 1: Data collection: collect time data, traffic flow data, and speed data at the modeling location on the road; collect time data and traffic flow data at the location to be tested on the road. The location to be tested can be one or more geographical locations.
[0038] Step 2, flow-speed characteristic matrix construction: In the time data collected at the modeling position and the test position, it is assumed that the current state is M, n represents the time step of the state at the previous moment, and m represents the time step of the state at the next moment. At the modeling position, a flow matrix is constructed according to the vehicle flow data, and a speed matrix is constructed according to the speed data; at the test position, a flow matrix is constructed according to the vehicle flow data. Wherein: the value range of n can be 0-5, such as any one of 0, 1, 2, 3, 4, 5 or a range between two, such as 1-4, 2-4, 2-5, 1-3, 3-5, preferably 3; the value range of m can be 0-5, such as any one of 0, 1, 2, 3, 4, 5 or a range between two, such as 1-4, 2-4, 2-5, 1-3, 3-5, preferably 3. The values of n and m can be the same or different, preferably the same.
[0039] The traffic matrix is:
[0040]
[0041] The velocity matrix is:
[0042]
[0043] Step 3: Machine learning model training:
[0044] The flow matrix and speed matrix of the modeling location are input into a machine learning model, such as a long short-term memory network (LSTM) model, a back propagation network (BP), a classification regression tree, a k-nearest neighbor network, a support vector regression network, etc. for training, preferably using an LSTM model to obtain a traffic flow-speed matching relationship model.
[0045] Step 4: Prediction of the speed of the position to be measured:
[0046] The flow matrix of the location to be tested is input into the above-mentioned machine learning model, and the predicted speed of the location at each detection is calculated through the traffic flow-speed matching relationship model.
[0047] In the field of traffic forecasting, the speed-flow curve in traffic flow theory is an important tool in the field of traffic engineering, which is used to describe the operating characteristics of road traffic flow. The speed-flow curve reflects the relationship between traffic flow and driving speed, such as Figure 1As shown. It can be seen that there is a complex, nonlinear correlation between traffic flow and speed. For example, the same flow value corresponds to different speed values, and the same speed value also corresponds to different flow values. Therefore, it is unreasonable to use only the traffic flow data at the current moment to predict the speed, and a specific method is needed to extract the traffic pattern. The inventor of the present invention found that the speed at the current moment is related to the state of the previous and next moments, and after a lot of creative work, proposed a method for predicting traffic speed based on the flow at the previous and next moments.
[0048] Unless otherwise specified, the various instruments and equipment used in the following embodiments are products that can be obtained from commercial channels; unless otherwise specified, the various algorithms and training methods used in the following embodiments are conventional methods in the art and can be obtained from textbooks, reference books or academic journals.
[0049] Example 1
[0050] This embodiment predicts the traffic speed based on the traffic flow data of the Third Ring Expressway in Beijing. The detection data within 15 days at the Lize Bridge location (modeling location) is used as training data to obtain the prediction data within 15 days at the other four detection locations, and the prediction data within 15 days at the other four detection locations (locations to be tested) are compared with the detection data.
[0051] S1: Traffic data collection and storage:
[0052] like Figure 2 As shown in the figure, the coil detector was used to collect and store data for 15 days at 5 detection locations on the Third Ring Expressway in Beijing (1: Lize Bridge, 2: Fengyi Bridge, 3: Zhaogongkou Bridge, 4: Fangzhuang Bridge, 5: Anzhen Bridge). The data was collected continuously for 24 hours a day, every 2 minutes, including data on weekdays and weekends. Detailed data includes time, flow, number of lanes, speed, vehicle type, etc.
[0053] S2: Flow-speed characteristic matrix construction:
[0054] The time, flow and speed data of all detection moments within 15 days at the five detection locations collected above are used to construct the traffic flow matrix and speed matrix of each location. Among them, the traffic flow matrix and speed matrix of detection location 1 are used for LSTM model learning to obtain the traffic flow-speed matching relationship model; the traffic flow matrix of detection locations 2-5 is used to substitute into the traffic flow-speed matching relationship model to obtain the predicted speed matrix; the actual measured speed matrix of detection locations 2-5 is compared with the predicted speed matrix to verify the correctness of the traffic flow-speed matching relationship model.
[0055] Assume that the current state is M, n represents the time step of the state at the previous moment, and m represents the time step of the state at the next moment. For example: because the detection is performed every 2 minutes, when the time of M is 15:30 on the first day, then when n=1, the time of Mn is 15:28, when n=2, the time of Mn is 15:26; when m=1, the time of M+m is 15:32, when m=2, the time of M+m is 15:34.
[0056] Among them, the optimal traffic mode is adopted, and the values of n and m are both 3.
[0057] Therefore, the flow vector is:
[0058] M-3 M-2 M-1 M M+1 M+2 M+3
[0059] The velocity vector is:
[0060] M-3 M-2 M-1 M M+1 M+2 M+3
[0061] The traffic flow matrix is constructed as follows:
[0062]
[0063] The speed matrix is constructed as:
[0064]
[0065] S3, machine learning model training:
[0066] The traffic flow matrix and speed matrix constructed from the detection data of Lize Bridge at detection location 1 are input into the long short-term memory network (LSTM) model for training, that is, the matching relationship feature data of flow (X) and speed (Y) are constructed for the LSTM model to learn, and the traffic flow-speed matching relationship model is obtained.
[0067] S4: Other position speed prediction:
[0068] The traffic flow matrix constructed with the detection data of the other four detection locations (Fengyi Bridge, Zhaogongkou Bridge, Fangzhuang Bridge, and Anzhen Bridge) is input into the above-mentioned LSTM model, and the speed matrix of the other four detection locations within 15 days is calculated through the above-mentioned traffic flow-speed matching relationship model (the traffic flow matrix is used as the prediction model input, and the speed matrix is used as the prediction target), that is, the predicted speed (i.e., predicted data) of the other four detection locations at each detection.
[0069] S5: Best traffic pattern robustness detection:
[0070] The above optimal traffic mode "n=3 and m=3" was subjected to robustness test: the robustness of the optimal traffic mode at different detection locations and on different days was tested and evaluated. At the same time, the correctness and stability of the above traffic flow-speed matching relationship model were also verified at detection locations 1-4.
[0071] Figure 3 The forecast results for all days at detection location 1 under the optimal traffic mode "n=3 and m=3" are shown. It can be observed that the forecast accuracy for all days is relatively stable, and most of the absolute pose errors (APE) are less than 15%.
[0072] In addition, optimal traffic patterns are also applied to other detected location data. Figure 4 The APE distribution of all detection locations on the first day is shown. It can be seen that the prediction accuracy of all detection locations is relatively good.
[0073] In addition, the model prediction results for all detection locations and all dates were statistically analyzed, e.g. Figure 5 As shown. Figure 5 It can be seen that the mean absolute percentage error (MAPE) of the model predictions for all detection locations and all dates is less than 9%, which further illustrates the robustness of the optimal transportation mode in both temporal and spatial dimensions.
[0074] Comparative Example:
[0075] This comparison explains why the LSTM model is selected for training and why both n and m values of 3 are selected as the best traffic mode; the above screening process is as follows Figure 6 shown.
[0076] S1. Collect the detection data of detection locations 1-5 within 15 days according to the method of Example 1.
[0077] S2. Construction of flow-speed characteristic matrix: According to the method of Example 1, the time, flow and speed data of the five detection locations collected above are used to construct the traffic flow matrix and speed matrix of each location respectively:
[0078] First, the continuous time series data of the current state M and the nth and mth states are extracted.
[0079] Secondly, the traffic flow (flow vector) and speed pattern vector (speed vector) of M+1, M+2, …, M+K (K is an integer greater than 1) states are gradually constructed through the sliding window method, and finally the traffic flow matrix and speed matrix are formed, as shown in Figure 7 shown.
[0080] Flow vector:
[0081] Mn … M-2 M-1 M M+1 M+2 … M+m
[0082] Velocity vector:
[0083] Mn … M-2 M-1 M M+1 M+2 … M+m
[0084] Traffic flow matrix:
[0085]
[0086] Velocity Matrix:
[0087]
[0088] S3. Performance method comparison:
[0089] 1. Machine learning model training:
[0090] After the data collection at the five detection locations in Example 1 is completed and the traffic flow matrix and speed matrix in Example 1 are constructed, the traffic flow matrix is used as the prediction model input, and the speed matrix is used as the prediction target. The long short-term memory network (LSTM) model, back propagation network (BP), classification regression tree, k-nearest neighbor network, and support vector regression network are used to train the traffic flow matrix and the speed matrix.
[0091] In order to select the best machine learning model, first select the values of n and m in the range of 0-5, randomly select n=3, m=3 (other values can also be selected), substitute the values of n and m into the traffic flow matrix, and input the machine learning model for training. The reason for selecting n and m between 0-5 is as follows: the time interval between the first time point Mn and the last time point M+m is set to a maximum of 20 minutes, and data is collected every 2 minutes, so a total of 10 data are collected between the time points Mn and M+m, so the maximum value of n and m is 5.
[0092] 1.1. The LSTM training method is as follows:
[0093] 1) Forward calculation: At each time step, LSTM calculates the values of the input gate, forget gate, output gate, and unit state, thereby updating the hidden state of the current time step; this process starts from the input layer and passes backward layer by layer until the output layer.
[0094] 2) Error back propagation: Calculate the error of the output layer and propagate the error back along time to each layer through the back propagation algorithm; the error signal is propagated along the time direction and the network layer direction at the same time to calculate the gradient of each weight and bias term.
[0095] 3) Weight update: Based on the calculated gradient, use the gradient descent method or other optimization algorithms to update the weights and bias items in the LSTM network to reduce the output error of the network.
[0096] 1.2. The BP training method is as follows:
[0097] 1) Forward propagation: The input signal is transmitted from the input layer, processed by the weighted and activated functions of the hidden layer, and finally reaches the output layer. The signal of the output layer is the prediction result of the network.
[0098] 2) Error calculation: Calculate the error between the network output and the expected output. Commonly used error functions include mean square error (MSE).
[0099] 3) Back propagation: Use the chain rule to calculate the gradient of the error with respect to the weights of each layer; the gradient represents the degree to which the change in weights affects the reduction in error.
[0100] 4) Weight update: Based on the calculated gradient information, use the gradient descent method or other optimization algorithms to update the weights and bias items in the network to reduce the error.
[0101] 1.3. The classification regression tree training method is as follows:
[0102] 1) Select the best feature to be split: traverse all features and feature values, calculate the error (such as mean square error) of splitting the data set according to the feature value, and select the feature with the smallest error and its corresponding value as the best feature to be split.
[0103] 2) Split the data set: Split the data set into left and right subtrees based on the best features to be split.
[0104] 3) Recursively construct subtrees: Repeat the above process for the left and right subtrees until the stopping condition is met (such as the number of samples in the subtree is less than a predetermined threshold, the error is less than a predetermined threshold, etc.).
[0105] 1.4. The k-nearest neighbor network training method is as follows:
[0106] 1) Calculate the distance: For a given test sample, calculate the distance between it and all training samples (commonly used Euclidean distance, Manhattan distance, etc.).
[0107] 2) Select k nearest neighbors: Sort the training samples according to the distance and select the k samples with the smallest distance as the nearest neighbors.
[0108] 3) Prediction: Make predictions based on the categories or values of these k nearest neighbors (for classification problems, the category with the most occurrences is usually selected; for regression problems, the average of these k values is usually calculated).
[0109] 1.5. The support vector regression training method is as follows:
[0110] 1) Select kernel function: SVR maps input data to high-dimensional space through kernel function. Commonly used kernel functions include linear kernel, polynomial kernel, RBF kernel, etc.
[0111] 2) Construct an optimization problem: The SVR problem is transformed into a mathematical optimization problem, the goal of which is to minimize a loss function that includes an error term and a regularization term.
[0112] 3) Solve the optimization problem: Use optimization algorithms (such as SMO algorithm, gradient descent method, etc.) to solve the optimization problem and obtain the parameters of the model (such as support vector coefficients, bias terms, etc.).
[0113] 4) Prediction: Predict new input data based on the trained model parameters and kernel function.
[0114] 2. Model performance comparison: Select evaluation indicators such as mean absolute percentage error (MAPE) and absolute pose error (APE), and use different data sets to compare and analyze the prediction performance of each model.
[0115] The prediction results for working days and rest days at detection location 1 are shown in Figure 8. Figure 8(a) shows the speed prediction results for a certain working day, and Figure 8(b) shows the speed prediction results for a certain rest day. According to the MAPE formula, the true value is the measured data, and the model outputs the predicted data. The MAPE results of the measured data and the predicted data are compared. According to the MAPE value formula, Figure 8(a) shows that the MAPE of LSTM is about 3.83%, which is much lower than BP (6.12%), CART (7.43%), KNN (15.67%) and SVR (16.06%). Figure 8(b) shows that the MAPE of LSTM is about 2.05%, which is much lower than BP (4.12%), CART (4.40%), KNN (13.08%) and SVR (15.31%).
[0116] From the MAPE of all methods, we can see that in some cases, simple machine learning methods (such as CART) can produce better prediction results than deep learning methods. Therefore, it is necessary to compare the performance of prediction models in time and space dimensions to fully evaluate the model effect.
[0117] Table 1 below shows the prediction results of all models on all days at detection location 1. It can be found that the average MAPE of the LSTM model is 3.29%, which is lower than other models. Table 2 shows the prediction results of all models at all detection locations on the first day. It can be found that the average MAPE of the LSTM model is 3.06%, which is also lower than other models. It can be seen that the average MAPE of LSTM is better than other methods, indicating that the LSTM model has good stability. Therefore, the LSTM model is selected to determine the optimal traffic pattern.
[0118] Table 1: Prediction results of all models for all days at detection location 1 (MAPE values)
[0119]
[0120]
[0121] Table 2 Prediction results of all models at all detection locations on the first day (MAPE values)
[0122] Detection location LSTM BP CART KNN SVR Detection position 1 1.43% 3.45% 4.01% 18.16% 20.03% Detection position 2 1.32% 3.65% 3.12% 3.86% 5.34% Detection position 3 3.95% 4.06% 7.31% 14.26% 16.46% Detection position 4 2.83% 4.91% 6.68% 8.86% 9.23% Detection position 5 5.77% 6.79% 15.51% 23.64% 24.97% average value 3.06% 4.57% 7.33% 13.76% 15.21%
[0123] S4. Determination of the optimal mode
[0124] 1. Traffic mode sensitivity test: After determining the LSTM model with the best effect, we tested the impact of different traffic flow modes on speed prediction results by changing the values of n and m. The maximum interval was set to 20 minutes, that is, the maximum traffic mode was "n = 5 and m = 5". On this basis, we conducted a random combination experiment of traffic characteristics before and after, with a total of 36 combination modes (the values of n and m were 0, 1, 2, 3, 4, 5, a total of 6 modes, and a total of 6 × 6 = 36 combinations of n and m).
[0125] 36 traffic modes are input into the LSTM prediction model, and the model prediction results are as follows Fig. 9 shown. Fig. 9 It is a contour map under different traffic flow mode combinations, and the colors represent the MAPE under different traffic modes. Fig. 9 It shows that for the mode of "n = 2-5, m = 2-5", the MAPE is small. However, for the LSTM prediction results of "n = 0, m = 0-5" or "n = 0-5, m = 0", the prediction results are generally poor. This is because the traffic flow at the previous moment or the next moment cannot effectively represent the current speed operation state.
[0126] In order to determine the optimal traffic mode, the traffic modes before and after 15 days were compared. The prediction results are as follows: Fig.10 As shown, the horizontal axis is the combination of n / m, and 19 of the above 36 combinations are selected. By analyzing and comparing the average MAPE of all days, it can be seen that the MAPE with n / m of 3 is the most ideal: the mean MAPE is 3.2%, and the upper and lower ranges are 2.6% and 4.3% respectively; the MAPE mean is the smallest, indicating the best prediction accuracy, and the upper and lower ranges of its box plot are smaller, indicating better prediction stability; so the best traffic mode is finally determined to be "n = 3 and m = 3".
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A traffic speed prediction method based on multi-time traffic flow, characterized by: The method predicts the vehicle speed of the location to be tested at the current moment and the moments before and after according to the vehicle flow and vehicle speed of the modeling location at the current moment and the moments before and after, and the vehicle flow of the location to be tested at the current moment and the moments before and after.
2. The method according to claim 1, characterized in that: The method comprises the following steps: Data collection step: collecting time data, vehicle flow data, and speed data at the modeling location on the road; collecting time data and vehicle flow data at the location to be tested on the road; Matrix construction steps: in the time data collected at the modeling location and the location to be tested, assuming that the current state is M, n represents the time step of the state at the previous moment, and m represents the time step of the state at the next moment; at the modeling location, construct a flow matrix according to its vehicle flow data, and construct a speed matrix according to its speed data; at the location to be tested, construct a flow matrix according to its vehicle flow data; Training step: inputting the flow matrix and speed matrix of the modeling location into the machine learning model for training to obtain a traffic flow-speed matching relationship model; Speed prediction step: input the vehicle flow matrix of the position to be tested into the machine learning model, and calculate the predicted speed of the position to be tested at each detection moment through the traffic flow-speed matching relationship model.
3. The method according to claim 2, characterized in that: In the matrix construction step, the values of n and m are the same or different.
4. The method according to claim 3, characterized in that: In the matrix construction step, the value range of n is 0-5, and the value range of m is 0-5.
5. The method according to claim 3, characterized in that: In the matrix construction step, the value range of n is 1-4, and the value range of m is 1-4.
6. The method according to claim 3, characterized in that: In the matrix construction step, the value range of n is 2-4, and the value range of m is 2-4.
7. The method according to claim 3, characterized in that: In the matrix construction step, the value range of n is 2-5, and the value range of m is 2-5.
8. The method according to claim 3, characterized in that: In the matrix construction step, the value range of n is 3-5, and the value range of m is 3-5.
9. The method according to claim 3, characterized in that: In the matrix construction step, the value of n is 3, and the value of m is 3.
10. The method according to any one of claims 3 to 9, characterized in that: In the training step, the machine learning model is selected from: a long short-term memory network model, a back propagation network, a classification regression tree, a k-nearest neighbor network, and a support vector regression network, preferably a long short-term memory network model.
Citation Information
Patent Citations
Highway vehicle speed prediction model training method based on toll station flow
CN111063204A
Real-time traffic flow prediction method and device for target road
CN113724497A
Traffic speed prediction method based on traffic flow data fusion and system
CN113808396A
Traffic state detection device, traffic state detection method and program
JP2021117678A
