Expressway traffic condition prediction method using short-term prediction technology based on reliable constraint
By constructing a traffic state classification model and traffic state prediction model, clustering is performed using the I-FCM algorithm improved by entropy weight method and K-Means++ algorithm, and online learning is combined with the MTS-EnhanceNet model, which solves the problems of weakening periodicity and regularity, randomness and non-stationarity exposure in medium and short-term highway traffic flow prediction, and realizes reliable prediction of highway traffic conditions.
Patent Information
- Application Number
- CN202411272513.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively predict the problems of weakening periodicity and regularity, randomness and non-stationary exposure of medium and short-term expressway traffic flows.
The short-term prediction technology based on reliable constraints is adopted, and the traffic state classification model and traffic state prediction model are constructed, and the I-FCM algorithm improved by entropy weight method and K-Means++ algorithm are clustered. The MTS-EnhanceNet model is combined for online learning to capture the spatiotemporal correlation characteristics of traffic flow data and predict the short-term change trend of traffic characteristic parameters.
Reliable deduction and prediction of highway traffic conditions has been achieved, the problem of poor prediction results in the prior art has been overcome, and the accuracy and effectiveness of prediction have been significantly improved.
Smart Images

Figure CN119625971A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting highway traffic conditions by using a short-term prediction technology based on reliable constraints, and belongs to the technical field of traffic prediction. Background Art
[0002] With the advancement of urbanization in my country, the traffic flow characteristics in the road traffic network have become more complicated under the influence of multiple factors such as the increase in residents' travel demand and the rapid development of intelligent transportation technology. With the application of advanced scientific and technological means in transportation, new data mining methods, advanced traffic control strategies and real-time updated traffic information release technologies have gradually become popular and applied. Researchers have gradually begun to conduct research on dynamic traffic short-term prediction for large urban road networks in my country's actual situation. As the observation time scale decreases, the periodicity and regularity of traffic flow weaken, and randomness and non-stationarity gradually emerge. Therefore, short-term and medium-term traffic flow prediction has always been the focus and difficulty of traffic flow prediction.
[0003] After searching, it was found that the invention patent with patent number CN202111461029.6 and authorization announcement number CN114202917B discloses a construction area traffic control and induction method based on dynamic traffic flow short-term prediction, constructs the road network topological relationship around the construction area, and based on the analysis of the road network topological relationship, scientifically delineates the scope of the construction traffic impact area, collects traffic flow data in the construction traffic impact area, and conducts multi-source data fusion analysis, analyzes the traffic flow characteristics in the construction traffic impact area, and conducts a comprehensive analysis of the traffic flow data and the road network topological relationship to obtain the distribution of key points of spatiotemporal convergence of traffic flow in the construction traffic impact area. According to the analysis results of traffic flow characteristics, a short-term traffic flow prediction model for the key points of spatiotemporal convergence of traffic flow is constructed, and the short-term traffic flow prediction model is trained and iteratively optimized online; thereby overcoming the defects of not being able to optimize the timing of traffic lights at intersections prone to congestion around the construction area and not being able to effectively guide drivers.
[0004] The invention patent application with application number CN202211253782.0 and application publication number CN115547075A discloses a method for controlling traffic status in a highway toll station area, the method comprising: obtaining traffic data of the toll station and the upstream gantry; based on the traffic data of the toll station and the upstream gantry, using an LSTM neural network model to predict the traffic demand of the toll station within a period of time; based on the traffic demand, using a cellular transmission model to obtain the traffic flow operation status of the toll station within a period of time, the traffic flow operation status includes vehicle volume and traffic density; based on the traffic flow operation status, constructing an objective function of the total driving time of vehicles in the toll station area, combining constraints, using model predictive control, and rolling repeated optimization calculations to obtain the speed limit and lane configuration corresponding to the minimum total driving time, thereby significantly improving the traffic performance of the toll station and improving the traffic efficiency of the highway.
[0005] However, the existing technologies represented by the above-mentioned technical solutions are not specially designed for medium- and short-term traffic flows. They still cannot overcome the problems of weakened periodicity and regularity, and exposed randomness and non-stationarity in medium- and short-term traffic flows. It is urgent to develop prediction methods that can effectively solve this problem. Summary of the invention
[0006] The main purpose of the present invention is to overcome the problems existing in the prior art and provide a highway traffic condition prediction method using a short-term prediction technology based on reliable constraints, which realizes reliable deduction and prediction of traffic conditions by mining spatiotemporal correlation characteristics and using a short-term prediction technology based on reliable constraints.
[0007] The technical solution of the present invention to solve the technical problem is as follows:
[0008] A method for predicting highway traffic conditions using a short-term prediction technique based on reliable constraints comprises the following steps:
[0009] The first step is to build a traffic status classification model; in the traffic status classification model, the historical traffic flow data is preprocessed, and then the entropy weight method is used to calculate the weight. The I-FCM algorithm improved by the K-Means++ algorithm is used for clustering to obtain five cluster centers, and the state weight of each cluster center is calculated. Five traffic status levels are defined and the traffic status is assigned; the clusters are divided, the MSVM model is trained, and the traffic status prediction model is trained; among them, the K-Means++ algorithm optimizes the selection process of the initial cluster center.
[0010] The second step is to build a traffic state prediction model; in the traffic state prediction model, the MTS-EnhanceNet model is used for online learning, and the parameter method is used to predict the traffic flow parameters. The predicted values of the traffic flow data are then input into the pre-trained traffic state classification model to obtain the traffic flow state prediction values of the corresponding continuous step lengths.
[0011] The third step is to input the real-time traffic flow data into the traffic state classification model and the traffic state prediction model at the same time, obtain the traffic state corresponding to the real-time traffic flow data, and obtain the traffic flow state prediction value of the continuous step length h immediately after the real-time traffic flow data; at the same time, the traffic state prediction model uses the traffic flow data prediction value to update the model parameters for online learning.
[0012] The applicant found in practical research that most existing prediction methods are based on simple mathematical model construction and single traffic flow parameter analysis, which fail to fully utilize the spatiotemporal correlation characteristics of traffic flow data, and fail to accurately and effectively mine the laws and characteristics between traffic characteristic parameters, and predict the short-term change trend of traffic characteristic parameters. Therefore, the applicant specifically conducted research and development on the above points, and obtained the above technical solution of the present invention, and the prediction effect is good.
[0013] The technical solution further improved by the present invention is as follows:
[0014] Preferably, in the first step, the FCM algorithm optimized and improved by the K-Means++ algorithm is used for unsupervised instance selection, and the entropy weight method is used to calculate the weights and allocate the traffic status; the traffic status is divided into five categories: free flow, stable flow, mild congestion, moderate congestion, and severe congestion; the MSVM model optimized by the genetic algorithm and constructed by the SVM model is used for supervised learning to obtain a trained traffic status classification model.
[0015] Preferably, in the first step, in the offline stage, the historical time series data of traffic flow after 0:00 on a certain day and extending forward for 7 consecutive days are normalized and preprocessed to form a tensor, and cluster analysis is performed using the FCM algorithm improved by the K-Means++ algorithm; the cluster centers of five types of traffic states are obtained, and the weights and sums of the cluster centers are calculated by membership calculation, and then sorted and corresponded to the defined traffic states, so that the historical time series data of traffic flow are divided into five traffic state data sets carrying corresponding traffic state labels; at this time, the unsupervised instance selection is completed, so that each data is assigned a corresponding label; thereafter, the above five traffic state data sets carrying corresponding traffic state labels are used for supervised training of the multi-category classifier MSVM model, which is supervised learning.
[0016] Preferably, in the first step, the entropy weight method is used to calculate the weight according to the above-mentioned historical time series data of traffic flow, and the weight vector is obtained by optimizing the weighted distance formula and used for the FCM algorithm; the K-Means++ algorithm is used to optimize the process of selecting the initial cluster center of the FCM algorithm.
[0017] Preferably, the historical time series data of traffic flow includes: speed speed, traffic volume volume, occupancy rate occu; the calculated weights include: w_speed, w_volume, w_occu; wherein, the historical time series data of traffic flow is obtained by VISSIM processing.
[0018] By adopting the above preferred scheme, the specific technical details of the first step can be further optimized.
[0019] Preferably, in the second step, the traffic status prediction model adopts a neural network model, combined with time feature extraction, attention-enhanced convolutional layers, Transformer encoders, position encoding, and online learning techniques to process time series data, capture local and global dependencies in the data, and update the model in real time.
[0020] Preferably, in the second step, in the offline stage, the traffic state prediction model is trained with a tensor formed by the historical time series data of traffic flow after 0:00 on a certain day and extending forward for 7 consecutive days; the training process includes feature extraction for each time step of the above data, and then extracting the local features of these data to capture the short-term dependencies in the time series; then adding position information to the above data so that its sequential information can be captured by the traffic state prediction model, and at the same time its global features are also extracted by the multi-head attention mechanism and feedforward neural network of the traffic state prediction model.
[0021] Preferably, the neural network model used in the traffic status prediction model is the MTS-EnhanceNet model; the historical time series data of traffic flow includes: speed speed, traffic volume volume, occupancy rate occu; wherein, the historical time series data of traffic flow is obtained by VISSIM processing.
[0022] By adopting the above preferred scheme, the specific technical details of the second step can be further optimized.
[0023] Preferably, in the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state classification model trained in the first step to obtain its corresponding traffic state; wherein, VISSIM processing is used to obtain the real-time traffic flow data, and the real-time traffic flow data includes: speed, traffic volume, and occupancy rate.
[0024] Preferably, in the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state prediction model trained in the second step to obtain traffic flow data prediction values of continuous step length h immediately following the real-time data, and then these continuous traffic data prediction values are input into the traffic state classification model trained in the first step to obtain traffic flow state prediction values; wherein, VISSIM processing is used to obtain the real-time traffic flow data, and the real-time traffic flow data includes: speed, traffic volume, and occupancy rate.
[0025] By adopting the above preferred scheme, the specific technical details of the third step can be further optimized.
[0026] Compared with the prior art, the present invention makes full use of the spatiotemporal correlation characteristics of traffic flow data, explores the laws and characteristics between traffic characteristic parameters, predicts the short-term change trend of traffic characteristic parameters, and has a good prediction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the overall structure of the RNN model mentioned in the specific implementation manner of the present invention.
[0028] Figure 2 It is a schematic diagram of the overall structure of the LSTM model mentioned in the specific implementation manner of the present invention.
[0029] Figure 3 This is a main logical block diagram of the technical concept of the present invention.
[0030] Figure 4 This is a schematic diagram of the basic process of combined prediction adopted by the present invention.
[0031] Figure 5 It is a schematic diagram of the real-time data processing process of the present invention.
[0032] Figure 6 Schematic diagram of the overall technical route for traffic state classification and prediction in Example 1 of the present invention.
[0033] Figure 7 This is a schematic diagram of the technical route for traffic state classification in Example 2 of the present invention.
[0034] Figure 8 This is a schematic diagram of the technical route for traffic status prediction in Example 3 of the present invention.
[0035] Fig. 9 This is a schematic diagram of the specific operation flow of traffic status classification in Example 4 of the present invention.
[0036] Fig.10 This is a schematic diagram of the specific operation flow of traffic status prediction in Example 5 of the present invention.
[0037] Fig.11 This is a schematic diagram of the clustering results under the classification model of Example 6 of the present invention. DETAILED DESCRIPTION
[0038] The main research ideas of the present invention are as follows: Traffic congestion is mostly affected by road networks, traffic flow characteristics of urban roads, climate, events and other factors. It should be based on road network gantries, toll collection and other data and surrounding road multi-sensor data, such as vehicle type, speed, flow, climate and other data, to extract the traffic flow change characteristics in the area, as well as road network traffic distribution, climate factors, events (such as maintenance, accidents, local activities, toll discounts, holidays, etc.), and establish a "capillary feature" model.
[0039] Based on this model and combined with the precise detection of traffic status, a highway traffic flow prediction algorithm is proposed. Based on the indicators provided by the gantries and sensing facilities, such as flow, speed, time occupancy and space occupancy, the traffic operation status is analyzed and judged to determine the scope of traffic impact. By building models and algorithms to predict and quantitatively evaluate the degree of traffic congestion, the model is continuously adjusted and optimized by learning and training with a large amount of historical data and real-time data. At the same time, multiple congestion factors are used as input parameters of the prediction model to improve the flexibility and accuracy of the prediction model, and a traffic congestion warning trigger threshold is set for the road section. Once the traffic impact exceeds the threshold, the level of traffic congestion on the road section is determined, thereby providing a decision-making basis for traffic organization under saturated flow.
[0040] By mining the spatiotemporal correlation characteristics of highway traffic flow data, using VISSIM processing to obtain traffic flow data (speed, volume, occupancy), and using support vector machine (SVM) to detect the degree of congestion on the highway as an evaluation indicator of traffic efficiency, we develop a short-term prediction technology based on reliable constraints to achieve reliable deduction and prediction of traffic conditions.
[0041] The long short-term memory network (LSTM), VISSIM, and SVM congestion detection are explained one by one as follows.
[0042] 1. Long Short-Term Memory Network (LSTM)
[0043] As a traffic flow prediction model, the long short-term memory network (LSTM) performs well in processing sequence data, especially in processing time series data, with unique modeling capabilities. LSTM is suitable for processing traffic flow prediction problems due to its advantages in capturing long-term dependencies, adapting to different time scales, processing sequence data, and suppressing the gradient vanishing problem. These characteristics enable LSTM to better capture the dynamic changes and complex associations of data when predicting future traffic flow conditions.
[0044] LSTM is a variant of RNN. RNN can only have short-term memory due to gradient vanishing. LSTM attempts to overcome the problem of gradient vanishing or gradient exploding by introducing a gate structure and a well-defined memory unit.
[0045] RNN network structure: All RNNs have a chain-like recurrent module. In a standard RNN, the module has only a very simple structure, such as a tanh function. The overall structure of the RNN model is as follows: Figure 1 shown.
[0046] LSTM network structure: The repeating unit contains 4 interactive layers. LSTM also has this structure, but the loop module has been improved. In general, in addition to h flowing over time, the cell state c also flows over time. The cell state c represents long-term memory. The overall structure of the LSTM model is as follows: Figure 2 shown.
[0047] 2. VISSIM
[0048] Traffic flow data is obtained by VISSIM processing. Machine learning technology is used to analyze massive traffic flow data, capture, understand and learn the information reflected by traffic flow parameters, and build relevant models to process real-time traffic flow data and obtain real-time traffic status information.
[0049] 3. SVM congestion detection
[0050] Support vector machine (SVM) is a widely used pattern recognition method that can avoid the local extreme value problem that occurs in machine learning methods such as neural networks. It has a fast convergence speed and a certain ability to jump out of the local optimum. It is a strong classifier with high accuracy. It can solve the small sample problem well. When the training samples are limited, the decision rules obtained by this method can still obtain a small error for the independent test set. Compared with traditional artificial neural network and other pattern recognition methods, the most prominent feature of support vector machine is that it still has good generalization ability when the samples are relatively small and the feature dimension is high.
[0051] The present invention performs FCM clustering on the initial data set, uses the entropy weight method to calculate the weights of the three parameters, calculates the weights and of each cluster center to correspond to the divided traffic status, sets the status label of each category of data, uses the data carrying the label to train the SVM model optimized by the genetic algorithm, and uses the "one-to-many" strategy to build the M-SVM model. After the real-time data enters the multi-classifier model, the real-time status is obtained, the uncertainty of the new data is evaluated, and the active adaptive incremental learning of the model is used when the conditions are met. The main logic block diagram of the above process is as follows: Figure 3 shown.
[0052] Among them, using incremental learning to continuously update the prediction model can enable it to better capture the dynamic changes and complex correlations of the data.
[0053] The present invention also considers that although the model trained by historical data alone can learn the changing rules of traffic flow, it is often unable to respond to emergencies in a timely manner. Combining the model prediction results with the real-time data processing results to obtain the prediction value can better cope with abnormal changes in traffic flow. The basic process of this combined prediction is as follows: Figure 4 shown.
[0054] In addition, if Figure 5 As shown in the figure, when new data arrives, the previous category set is updated and the new data is classified by the current classification model. Using the new data and its classification results, the discriminant model is continuously updated using semi-supervised incremental learning, online learning and adaptive learning, so as to effectively detect traffic status and apply it to the actual environment. At the same time, machine learning technology is used to improve the detection accuracy.
[0055] The method for predicting highway traffic conditions using a short-term prediction technology based on reliable constraints specifically implemented by the present invention comprises the following steps:
[0056] The first step is to build a traffic status classification model; in the traffic status classification model, the historical traffic flow data is preprocessed, and then the entropy weight method is used to calculate the weight. The I-FCM algorithm improved by the K-Means++ algorithm is used for clustering to obtain five cluster centers, and the state weight of each cluster center is calculated. Five traffic status levels are defined and the traffic status is assigned; the clusters are divided, the MSVM model is trained, and the traffic status prediction model is trained; among them, the K-Means++ algorithm optimizes the selection process of the initial cluster center.
[0057] The second step is to build a traffic state prediction model; in the traffic state prediction model, the MTS-EnhanceNet model is used for online learning, and the parameter method is used to predict the traffic flow parameters. The predicted values of the traffic flow data are then input into the pre-trained traffic state classification model to obtain the traffic flow state prediction values of the corresponding continuous step lengths.
[0058] The third step is to input the real-time traffic flow data into the traffic state classification model and the traffic state prediction model at the same time, obtain the traffic state corresponding to the real-time traffic flow data, and obtain the traffic flow state prediction value of the continuous step length h immediately after the real-time traffic flow data; at the same time, the traffic state prediction model uses the traffic flow data prediction value to update the model parameters for online learning.
[0059] In the first step, the FCM algorithm optimized and improved by the K-Means++ algorithm is used for unsupervised instance selection, and the entropy weight method is used to calculate the weights and allocate traffic status; the traffic status is divided into five categories: free flow, stable flow, mild congestion, moderate congestion, and severe congestion; the MSVM model optimized by the genetic algorithm and constructed by the SVM model is used for supervised learning to obtain a trained traffic status classification model.
[0060] In the first step, in the offline stage, the historical time series data of traffic flow (speed, volume, occupancy) extending from 0:00 on a certain day to the previous 7 consecutive days are normalized and preprocessed to form a tensor, and cluster analysis is performed using the FCM algorithm improved by the K-Means++ algorithm; the cluster centers of the five types of traffic states are obtained, and the weights and sums of the cluster centers are calculated through membership calculation, and then sorted and corresponded to the defined traffic states, so that the historical time series data of traffic flow are divided into five traffic state data sets carrying corresponding traffic state labels; at this time, the unsupervised instance selection is completed, so that each data is assigned a corresponding label; then the above five traffic state data sets carrying corresponding traffic state labels are used for supervised training of the multi-category classifier MSVM model, which is supervised learning.
[0061] Among them, the entropy weight method is used to calculate the weights (w_speed, w_volume, w_occu) according to the above traffic flow historical time series data, and the weight vector is obtained by optimizing the weighted distance formula and used in the FCM algorithm; the K-Means++ algorithm is used to optimize the process of selecting the initial cluster center of the FCM algorithm. The traffic flow historical time series data is obtained by VISSIM processing.
[0062] In the second step, the traffic status prediction model uses a neural network model (MTS-EnhanceNet model), combined with temporal feature extraction, attention-enhanced convolutional layers, Transformer encoders, position encoding, and online learning techniques to process time series data, capture local and global dependencies in the data, and update the model in real time.
[0063] In the second step, in the offline stage, the traffic state prediction model is trained with the tensor formed by the historical time series data of traffic flow (speed, volume, occupancy rate) after 0:00 on a certain day and extending forward for 7 consecutive days; the training process includes feature extraction for each time step of the above data, and then extracting the local features of these data to capture the short-term dependencies in the time series; then adding position information to the above data so that its sequence information can be captured by the traffic state prediction model, and its global features are also extracted by the multi-head attention mechanism and feedforward neural network of the traffic state prediction model. The historical time series data of traffic flow are obtained by VISSIM processing.
[0064] In the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state classification model trained in the first step to obtain the corresponding traffic state. Among them, VISSIM is used to obtain the real-time traffic flow data, which includes: speed, volume, and occupancy.
[0065] In the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state prediction model trained in the second step to obtain the traffic flow data prediction value of the continuous step length h immediately following the real-time data, and then these continuous traffic data prediction values are input into the traffic state classification model trained in the first step to obtain the traffic flow state prediction value. Among them, VISSIM is used to obtain the real-time traffic flow data, which includes: speed, traffic volume, and occupancy rate.
[0066] The present invention will be described in further detail below with reference to the accompanying drawings and in combination with embodiments, but the present invention is not limited to the examples given.
[0067] Example 1
[0068] The overall technical route of traffic status classification and prediction involved in this embodiment is as follows: Figure 6 As shown in the figure, it includes traffic state classification model and traffic state prediction model. The traffic state prediction model is based on the traffic state classification model.
[0069] In the traffic state classification model, the historical traffic flow data is preprocessed, and then the entropy weight method is used to calculate the weight. The I-FCM algorithm improved by the K-Means++ algorithm is used for clustering to obtain five cluster centers, and the state weight of each cluster center is calculated. Five traffic state levels are defined and the traffic state is assigned; the clusters are divided, the MSVM model is trained, and the traffic state prediction model is trained. Among them, the K-Means++ algorithm optimizes the selection process of the initial cluster center.
[0070] The traffic status classification model uses multiple algorithms, such as K-Means++, FCM, and entropy weight method. Combining unsupervised learning algorithms with supervised learning algorithms can effectively utilize the characteristics of the former to improve the performance of the latter.
[0071] In the traffic state prediction model, the MTS-EnhanceNet model is used for online learning, and the parameter method is adopted. Its essence is to predict the traffic flow parameters, and then input the predicted values of traffic flow data into the pre-trained traffic state classification model to obtain the traffic flow state prediction values of the corresponding continuous step.
[0072] During the specific operation, the real-time traffic flow data is input into the traffic state classification model and the traffic state prediction model at the same time. On the one hand, the traffic state corresponding to the real-time traffic flow data is obtained, and on the other hand, the traffic flow state prediction value of the continuous step length h immediately after the real-time traffic flow data is obtained. At the same time, the traffic state prediction model uses the predicted value of the traffic flow data to update the model parameters, realize online learning, and better perform subsequent predictions.
[0073] Example 2
[0074] The technical route of traffic status classification involved in this embodiment is as follows Figure 7 As shown in the figure. The fuzzy C-means clustering (FCM) algorithm optimized and improved by the K-Means++ algorithm is used for unsupervised instance selection, and the entropy weight method is used to calculate the weights and allocate traffic status; the traffic status is divided into five levels: free flow, stable flow, mild congestion, moderate congestion, and severe congestion; the MSVM model optimized by the genetic algorithm (GA) and constructed by the SVM model is used for supervised learning to obtain a trained traffic status classification model. After the real-time data is input into the trained traffic status classification model, the corresponding real-time traffic status is output, thereby achieving the purpose of status classification.
[0075] Since the traffic state prediction model is based on the traffic state classification model, it is particularly important to build an accurate and robust traffic state classification model. The various algorithms contained in the traffic state classification model are improved by adding K-Means++ algorithm, entropy weight method and genetic algorithm.
[0076] FCM is a classic clustering algorithm, but one of its disadvantages is that it is very sensitive to the selection of the initial cluster center and is prone to fall into a local optimal solution. Therefore, the clustering effect can be improved by using the K-Means++ algorithm to better select the initial cluster center.
[0077] In the comprehensive evaluation of multiple indicators, different indicators have different degrees of influence on the final evaluation results. The entropy weight method is an objective weighting method that can determine the weight of indicators according to the degree of variation of the data. Introducing weight factors into the FCM algorithm and adjusting the distance calculation formula from the data point to the cluster center according to the weight of each indicator can make important indicators have greater influence in the clustering process.
[0078] Support vector machine (SVM) is a commonly used supervised learning method for classification and regression analysis. However, the performance of SVM is highly dependent on the selection of its parameters (such as penalty parameter C and kernel function parameters), and improper selection will lead to poor model performance. Genetic algorithm (GA) is a global search algorithm that simulates natural selection and genetic mechanisms to find the optimal solution, which is suitable for optimizing SVM parameters. With the addition of optimal parameters, the MSVM model constructed by the SVM model can better handle the above multi-classification tasks.
[0079] Through the above means, the performance of the final trained MSVM model can be improved to a greater extent, local optimality can be avoided, and better classification results can be obtained.
[0080] Example 3
[0081] The technical route of traffic state prediction involved in this embodiment is as follows Figure 8 The traffic status prediction model uses a neural network model (MTS-EnhanceNet model), combined with time feature extraction, attention-enhanced convolutional layers, Transformer encoders, position encoding, and online learning techniques, which can process complex time series data, capture local and global dependencies in the data, and update the model in real time to adapt to new data.
[0082] After the real-time data is input into the trained traffic state prediction model, the traffic flow data prediction value of the continuous step length h immediately following the real-time data is output, so as to prepare for the subsequent acquisition of the traffic flow state prediction value of the continuous step length h, thereby achieving the purpose of state prediction; at the same time, the traffic flow data prediction value is used to update the model parameters, so that the model can adapt to the changes in data distribution and improve the real-time and flexibility of the model.
[0083] Temporal feature extraction refers to extracting useful information and patterns from time series data for analysis and modeling. Time series data is time-dependent and sequential, so feature extraction methods usually take these characteristics into account. The attention mechanism is used in convolutional neural networks (CNNs) to dynamically adjust the weights of convolution kernels at different positions, thereby enhancing attention to important features, improving the generalization ability of the model, and enhancing the recognition and utilization of important features. The Transformer encoder is a component of the Transformer model and is mainly used to process sequence data. Unlike traditional recurrent neural networks (RNNs), Transformer uses self-attention mechanisms and fully connected layers for encoding. It contains multi-head self-attention mechanisms, feedforward neural networks, skip connections, and layer normalization to improve the parallel computing capabilities of the model and capture global dependencies. Position encoding can help the model capture position information in the sequence, enabling it to understand the order of the input sequence. At the same time, online learning technology is introduced, which is a step-by-step learning process. The model is updated when it receives each new data point, rather than learning once on the training set, so as to achieve real-time updates, improve the real-time and flexibility of the model, and can process large-scale data without storing all data in memory.
[0084] Example 4
[0085] The specific operation process of traffic status classification involved in this embodiment is as follows: Fig. 9 As shown, it is divided into offline stage and online stage.
[0086] In the offline stage, the historical time series data of traffic flow (speed, volume, occupancy) extending forward for 7 consecutive days after 0:00 on a certain day is normalized and preprocessed to form a tensor, and cluster analysis is performed using the FCM algorithm improved by the K-Means++ algorithm; the cluster centers of the five types of traffic states are obtained, and the weights and sums of the cluster centers are calculated through membership calculation, and then sorted and corresponding to the defined traffic states, so that the historical time series data of traffic flow are divided into five traffic state data sets carrying corresponding traffic state labels. At this point, the unsupervised instance selection is completed, so that each data is assigned a corresponding label. After that, the above five traffic state data sets carrying corresponding traffic state labels are used for supervised training of the multi-category classifier MSVM model, which is supervised learning, and the obtained model is used as the traffic state classification model for subsequent identification of traffic states.
[0087] Among them, the entropy weight method is used to calculate the weights (w_speed, w_volume, w_occu) according to the above traffic flow historical time series data, and the weight vector is obtained by optimizing the weighted distance formula and used in the FCM algorithm; the K-Means++ algorithm is used to optimize the process of selecting the initial cluster center of the FCM algorithm. The FCM algorithm is improved with the help of the entropy weight method and the K-Means++ algorithm to improve the clustering accuracy and robustness. The improvement measures include the entropy weight method to calculate the weights, optimize the weighted distance formula, and the subsequent state allocation uses the entropy weight method.
[0088] In the online stage, the real-time data is preprocessed to form an input feature vector, which is then input into the MSVM model that has been trained in the offline stage to obtain its traffic status.
[0089] Example 5
[0090] The specific operation process of traffic state prediction involved in this embodiment is as follows: Fig.10 As shown, it is divided into offline stage and online stage.
[0091] In the offline phase, the traffic state prediction model is trained with a tensor formed by the historical time series data of traffic flow (speed, volume, occupancy) extending forward for 7 consecutive days after 0:00 on a certain day. The training process includes feature extraction for each time step of the above data, and then extracting the local features of these data to capture the short-term dependencies in the time series; then adding position information to the above data so that its order information can be captured by the model, and its global features are also extracted by the multi-head attention mechanism and feedforward neural network.
[0092] In the online stage, real-time data is preprocessed to form an input feature vector, which is then input into the traffic state prediction model trained in the offline stage to obtain the traffic flow data prediction value of the continuous step length h immediately following the real-time data. These continuous traffic data prediction values are then input into the previously trained traffic state classification model (MSVM model) to obtain the traffic flow state prediction value, thus achieving traffic state prediction. At the same time, the traffic state prediction model uses the traffic flow data prediction value for online learning, so that it can adapt to new data in real time, keep the model updated and accurate, and ensure that the online stage can continue.
[0093] Example 6
[0094] This embodiment is an operating example based on the above embodiments, and the specific contents are as follows:
[0095] 1. Implementation process
[0096] Traffic status classification model training: historical data -> I-FCM clustering -> each labeled data -> classification model MSVM.
[0097] Traffic status classification: real-time data->classification model MSVM->traffic status.
[0098] Traffic status prediction model training: historical data -> EnhanceNet model.
[0099] Traffic status prediction: real-time data->EnhanceNet model->parameter prediction value->classification model MSVM->traffic status value (prediction).
[0100] 2. Verify the instance
[0101] (1) Classification Model
[0102] The historical data set (7 days) used for training is shown in the following table:
[0103]
[0104] The normalized data are shown in the following table:
[0105] 1 time Speed Traffic volume Occupancy rate 2 12 / 1 / 2023 0:00 0.341038 0.133531 0.067729 3 12 / 1 / 2023 0:05 0.24618 0.151335 0.05852 4 12 / 1 / 2023 0:10 0.222035 0.151335 0.054226 5 12 / 1 / 2023 0:15 0.204274 0.121662 0.042101 6 12 / 1 / 2023 0:20 0.225849 0.136499 0.050121 7 12 / 1 / 2023 0:25 0.232746 0.139466 0.052228 8 12 / 1 / 2023 0:30 0.252919 0.160237 0.062814 9 12 / 1 / 2023 0:35 0.263315 0.142433 0.058385 10 12 / 1 / 2023 0:40 0.341085 0.130564 0.06646 11 12 / 1 / 2023 0:45 0.276241 0.097923 0.044126 12 12 / 1 / 2023 0:50 0.230191 0.121662 0.04599 13 12 / 1 / 2023 0:55 0.256904 0.086053 0.037483 14 12 / 1 / 2023 1:00 0.231971 0.127596 0.048204 15 12 / 1 / 2023 1:05 0.151632 0.10089 0.02895 16 12 / 1 / 2023 1:10 0.153895 0.109792 0.031515 17 12 / 1 / 2023 1:15 0.175788 0.091988 0.029652 18 12 / 1 / 2023 1:20 0.219572 0.094955 0.035944 19 12 / 1 / 2023 1:25 0.155173 0.059347 0.018769 20 12 / 1 / 2023 1:30 0.179617 0.068249 0.023494 21 12 / 1 / 2023 1:35 0.326065 0.062315 0.035674 22 12 / 1 / 2023 1:40 0.227658 0.083086 0.033108
[0106] The clustering results are as follows Fig.11 shown.
[0107] The classification results of the new data are shown in the following table:
[0108] Speed Traffic volume Occupancy rate Predicted_Status 0.10948 0.228571 0.044337 2 0.124619 0.292857 0.061259 3 0.12892 0.207143 0.044506 2 0.144227 0.285714 0.065659 3 0.095903 0.178571 0.032209 1 0.222077 0.292857 0.093355 3 0.050178 0.178571 0.023522 1 0.177339 0.25 0.066279 2 0.061399 0.3 0.04287 3 0.209042 0.264286 0.078802 2 0.140059 0.192857 0.043772 2 0.033085 0.192857 0.021886 1 0.110883 0.15 0.029558 1 0.128341 0.107143 0.023353 1 0.061758 0.135714 0.01963 1
[0109] (2) Prediction Model
[0110] The historical data set (7 days) used for training is shown in the following table:
[0111] 1 time Speed Traffic volume Occupancy rate 2 12 / 1 / 2023 0:00 67.834247 253 22.545556 3 12 / 1 / 2023 0:05 62.852993 287 22.276333 4 12 / 1 / 2023 0:10 63.123484 286 22.147 5 12 / 1 / 2023 0:15 64.252212 300 21.663333 6 12 / 1 / 2023 0:20 66.065637 287 21.665333 7 12 / 1 / 2023 0:25 72.137068 273 20.716333 8 12 / 1 / 2023 0:30 65.177497 276 21.974667 9 12 / 1 / 2023 0:35 69.735928 289 20.442667 10 12 / 1 / 2023 0:40 65.796501 290 21.222667 11 12 / 1 / 2023 0:45 69.511287 292 19.700333 12 12 / 1 / 2023 0:50 67.305592 289 19.359667 13 12 / 1 / 2023 0:55 68.932875 275 18.897 14 12 / 1 / 2023 1:00 68.09939 264 18.665 15 12 / 1 / 2023 1:05 72.534127 273 16.898333 16 12 / 1 / 2023 1:10 73.380537 265 16.516667 17 12 / 1 / 2023 1:15 72.04602 246 15.246667 18 12 / 1 / 2023 1:20 76.690864 273 14.858 19 12 / 1 / 2023 1:25 77.022612 253 15.319333 20 12 / 1 / 2023 1:30 78.304489 243 13.709 21 12 / 1 / 2023 1:35 69.584141 242 15.026667 22 12 / 1 / 2023 1:40 80.744473 224 11.94
[0112] The predicted lookback window data (288 records) and prediction step data (12 records) are shown in the following table:
[0113]
[0114]
[0115] Then input the predicted data into the classification model to obtain the state value, as shown in the following table:
[0116] Prediction data Prediction status [77.85623043575818,391.5463533806535,14.480786884089582] 2 [77.92375536291551,350.14198259700873,16.128647761999506] 2 [79.05712931700329,383.80393480224353,16.411133765140555] 1 [78.75837925162413,400.3620834631544,19.073175469678127] 2 [77.2850587603921,375.9911800831276,17.770811737734665] 3 [76.91524146076823,351.6747318110948,15.911124554142688] 1 [79.16369934159553,369.7711101426342,15.905393340817893] 2 [78.592833627944,352.2961008645782,18.474375172010458] 2 [78.56319541644069,370.21086978417287,15.209842844271833] 2 [79.05359307968396,366.277357657591,18.423868632320566], 1 [79.33753334111154,361.2459659644755,16.34311642137161] 1 [79.83031248024703,345.3464746699883,16.239322360718653] 1
[0117] (3) Prediction effect verification
[0118] Compare some of the predicted data with the corresponding real data, as shown in the following table:
[0119]
[0120]
[0121] Through the above verification, it can be known that according to the trained classification model, this embodiment inputs the predicted three parameters of traffic flow (speed, volume, occupancy) into the model, and finally obtains the prediction result of traffic status. Through the analysis of these parameters and the calculation of the model, this embodiment can effectively judge the current or future traffic status. The prediction results of this embodiment can help identify traffic congestion, smooth traffic or other specific states, thereby providing data support for traffic management and scheduling, improving traffic operation efficiency, and reducing congestion time. This embodiment makes full use of the spatiotemporal correlation characteristics of traffic flow data, explores the laws and characteristics between traffic characteristic parameters, predicts the short-term change trend of traffic characteristic parameters, and has a good prediction effect. This prediction method has important application value in the traffic system and helps to take measures in advance to alleviate potential traffic problems.
[0122] In addition to the above embodiments, the present invention may also have other implementation modes. Any technical solution formed by equivalent replacement or equivalent transformation falls within the protection scope required by the present invention.
Claims
1. A method for predicting highway traffic conditions using a short-term prediction technique based on reliable constraints, characterized in that: The following steps are involved: The first step is to build a traffic status classification model. In the traffic status classification model, the historical traffic flow data is preprocessed, and then the entropy weight method is used to calculate the weight. The I-FCM algorithm improved by the K-Means++ algorithm is used for clustering to obtain five cluster centers. The state weight of each cluster center is calculated, and five traffic status levels are defined and assigned to the traffic status. Divide clusters, train MSVM models, and train traffic status prediction models; the K-Means++ algorithm optimizes the selection process of the initial cluster center; The second step is to build a traffic state prediction model. In the traffic state prediction model, the MTS-EnhanceNet model is used for online learning, and the parameter method is used to predict the traffic flow parameters. The predicted values of the traffic flow data are then input into the pre-trained traffic state classification model to obtain the traffic flow state prediction values of the corresponding continuous step lengths. The third step is to input the real-time traffic flow data into the traffic state classification model and the traffic state prediction model at the same time, obtain the traffic state corresponding to the real-time traffic flow data, and obtain the traffic flow state prediction value of the continuous step length h immediately after the real-time traffic flow data; at the same time, the traffic state prediction model uses the traffic flow data prediction value to update the model parameters for online learning.
2. According to claim 1, a method for predicting highway traffic conditions using short-term prediction technology based on reliable constraints is characterized in that, in the first step, the FCM algorithm optimized and improved by the K-Means++ algorithm is used for unsupervised instance selection, and the entropy weight method is used to calculate the weights and allocate traffic conditions; the traffic conditions are divided into five categories: free flow, stable flow, mild congestion, moderate congestion, and severe congestion; the MSVM model optimized by the genetic algorithm and constructed by the SVM model is used for supervised learning to obtain a trained traffic status classification model.
3. According to claim 2, a highway traffic condition prediction method using a short-term prediction technology based on reliable constraints is characterized in that, in the first step, in the offline stage, the historical time series data of traffic flow extending from 0:00 on a certain day to the front for 7 consecutive days are normalized and preprocessed to form a tensor, and cluster analysis is performed using the FCM algorithm improved by the K-Means++ algorithm; the cluster centers of five types of traffic states are obtained, and the weights and sums of the cluster centers are calculated by membership calculation, and then sorted and corresponded to the defined traffic states, so that the historical time series data of traffic flow are divided into five traffic state data sets carrying corresponding traffic state labels; at this time, the unsupervised instance selection is completed, so that each data is assigned a corresponding label; then the above five traffic state data sets carrying corresponding traffic state labels are used for supervised training of the multi-category classifier MSVM model, which is supervised learning.
4. According to claim 3, a method for predicting highway traffic conditions using short-term prediction technology based on reliable constraints is characterized in that, in the first step, the entropy weight method is used to calculate the weight based on the above-mentioned traffic flow historical time series data, and the weight vector is obtained by optimizing the weighted distance formula and used for the FCM algorithm; the K-Means++ algorithm is used to optimize the process of selecting the initial clustering center of the FCM algorithm.
5. The highway traffic condition prediction method using the short-term prediction technology based on reliable constraints according to claim 4 is characterized in that: The historical time series data of traffic flow include: speed speed, traffic volume volume, occupancy rate occu; the calculated weights include: w_speed, w_volume, w_occu; wherein, the historical time series data of traffic flow is obtained by VISSIM processing.
6. According to the method for predicting highway traffic conditions using short-term prediction technology based on reliable constraints as described in claim 1, it is characterized in that in the second step, the traffic status prediction model adopts a neural network model, combined with time feature extraction, attention-enhanced convolutional layers, Transformer encoders, position encoding, and online learning technology to process time series data, capture local and global dependencies in the data, and update the model in real time.
7. The method for predicting highway traffic conditions using a short-term prediction technique based on reliable constraints according to claim 6, characterized in that: In the second step, in the offline stage, the traffic state prediction model is trained with the tensor formed by the historical time series data of traffic flow after 0:00 on a certain day and extending forward for 7 consecutive days; the training process includes feature extraction for each time step of the above data, and then extracting the local features of these data to capture the short-term dependencies in the time series; then adding location information to the above data so that its sequential information can be captured by the traffic state prediction model, and its global features are also extracted by the multi-head attention mechanism and feedforward neural network of the traffic state prediction model.
8. The method for predicting highway traffic conditions using a short-term prediction technique based on reliable constraints according to claim 7, characterized in that: The neural network model used in the traffic status prediction model is the MTS-EnhanceNet model; the historical time series data of traffic flow includes: speed, traffic volume, and occupancy rate; among them, VISSIM processing is used to obtain the historical time series data of traffic flow.
9. The method for predicting highway traffic conditions using a short-term prediction technology based on reliable constraints according to claim 1 is characterized in that, in the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state classification model trained in the first step to obtain the corresponding traffic state; wherein, VISSIM is used to obtain real-time traffic flow data, including speed, volume, and occupancy.
10. A method for predicting highway traffic conditions using a short-term prediction technology based on reliable constraints according to claim 9, characterized in that, in the third step, the real-time traffic flow data is preprocessed to form an input feature vector, which is input into the traffic state prediction model trained in the second step to obtain the traffic flow data prediction value of the continuous step length h immediately after the real-time data, and then these continuous traffic data prediction values are input into the traffic state classification model trained in the first step to obtain the traffic flow state prediction value; wherein, VISSIM is used to obtain real-time traffic flow data, including speed, volume, and occupancy.
Citation Information
Patent Citations
Construction area traffic control and induction method based on dynamic traffic flow short-time prediction
CN114202917A
Traffic control and guidance methods for construction areas based on short-term dynamic traffic flow prediction
CN114202917B
Expressway toll station area traffic state management and control method and system
CN115547075A
Cited By
Smart city traffic optimization method and system based on 5G network
CN120088986A