Short-time road network MFD parameter prediction method based on LSTM

By using the LSTM-based short-term road network MFD parameter prediction method and the GA-MOPSO algorithm in traffic state prediction, the problem of insufficient accuracy in short-term road network MFD parameter prediction in the existing technology is solved, and the traffic state of the road network is realized. Accurate prediction and improvement of travel efficiency.

CN118644986APending Publication Date: 2024-09-13GUANGDONG COMM POLYTECHNIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410926351.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing traffic state prediction methods lack accuracy in short-term road network MFD parameter prediction, and are difficult to effectively represent the road network state, resulting in inaccurate traffic state prediction.

Method used

A short-term road network MFD parameter prediction method based on LSTM is used to create two LSTM models to predict the weighted traffic and weighted density of the road network respectively, and use the GA-MOPSO algorithm to perform multi-objective optimization to find the best LSTM structure and hyperparameter combination. , to improve prediction accuracy.

Benefits of technology

It achieves accurate prediction of short-term road network MFD parameters, can detect changes in traffic status in a timely manner, improve travel efficiency, avoid over-aggregation defects, and improve the accuracy of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644986A
    Figure CN118644986A
Patent Text Reader

Abstract

The invention provides a short-time road network MFD parameter prediction method based on LSTM, and belongs to the field of traffic state prediction. Comprising the following steps: respectively creating respective LSTM models by taking two parameters of road network weighted flow qw and road network weighted density kw in short-time road network MFD parameters as prediction targets so as to determine a loss function; initializing parameters in the loss function, and continuously updating the parameters in the loss function until the loss function is converged to complete model training; the method comprises the following steps: establishing a multi-objective optimization model by using a multi-objective optimization algorithm GAMOPSO, importing data trained by the model into the multi-objective optimization model for prediction to obtain two groups of optimal LSTM structures and hyper-parameters, and applying the two groups of optimal LSTM structures and hyper-parameters to obtain two parameter combinations of optimal road network weighted flow qw and road network weighted density kw, namely a final prediction result. According to the invention, the parameters of the short-time road network MFD can be accurately predicted, the defect of over-metering is effectively avoided, the potential traffic state can be found in time, and the travel efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic state prediction, and more specifically, relates to a short-term road network MFD parameter prediction method based on LSTM. Background Art

[0002] The research on traffic state prediction has always been a hot topic in the field of transportation. At present, the prediction of traffic states such as speed and flow has become relatively mature, and there are rich research works in object modeling, algorithm design, and algorithm optimization. In the early research process, the model that processes time series became the mainstream method of traffic prediction, such as historical average method and Kalman filter. These methods are all weighted processing of historical information. Their advantages are simple structure and easy calculation; their disadvantages are low accuracy and insufficient ability to fit nonlinearity. With the development of machine learning models, many researchers have begun to try to apply machine learning and deep learning methods to traffic state prediction. Among them, the Macroscopic Fundamental Diagram (MFD) is often used to predict traffic states. It can objectively reflect the intrinsic connection between the road network operation state and the cumulative number of vehicles, and also reflect the relationship between the weighted flow of the road network and the total traffic volume. Therefore, some existing prediction methods usually predict the traffic state in the road network by predicting the parameters of MFD.

[0003] When predicting traffic conditions, one of the researchers designed a Bayesian combined with Gaussian mixture model network to predict traffic conditions, and the performance of this model exceeded other models of the same period. Another researcher also proposed an online SVR (support vector regression) model for short-term prediction of highway traffic flow. This method can achieve real-time updates of model parameters, but the disadvantage is that it will face insufficient computing power in large-scale data scenarios. To this end, the researchers used the TensorFlow platform to train a deep neural network to predict traffic conditions and achieved good prediction results. In addition, the researchers used RNN (recurrent neural network) to predict traffic congestion and achieved excellent results. However, due to the simple structure of RNN and its inability to process time series with multiple steps, its effect on medium- and long-term traffic status prediction is not significant.

[0004] After analyzing and comparing the various methods for predicting traffic conditions mentioned above, it is found that the existing prediction methods usually use aggregate indicators such as average speed and density to cover up the details of the road section, which makes it difficult to effectively characterize the road network status. As a result, the prediction of short-term road network MFD parameters often lacks accuracy. Summary of the invention

[0005] The main purpose of this application is to provide a short-term road network MFD parameter prediction method based on LSTM, which can accurately predict the parameters of short-term road network MFD, effectively avoid the defects of over-aggregation, so as to grasp the short-term change trend of road network traffic status, timely discover potential traffic status, and improve travel efficiency. Among them, LSTM is defined as a long short-term memory network (LongShortTermMemory).

[0006] In order to achieve the above purpose, the present application proposes a short-term road network MFD parameter prediction method based on LSTM, comprising: using the road network weighted flow q in the short-term road network MFD parameter w , road network weighted density k w The two parameters are used as prediction targets to create their own LSTM models to determine the loss function; Initialize the parameters in the loss function and continuously update the parameters in the loss function until the loss function converges to complete the model training; The multi-objective optimization algorithm GAMOPSO is used to establish a multi-objective optimization model. The data trained by the model is imported into the multi-objective optimization model for prediction. The best two sets of LSTM structures and hyperparameters are obtained, and then the optimal road network weighted flow q is obtained. w , road network weighted density k w The combination of the two parameters is the final prediction result.

[0007] Furthermore, the optimal road network weighted flow q is obtained w , road network weighted density k w The process of combining the two parameters includes: Step 1: After reading the training set in model training, initialize the size of the particle swarm and the initial solution set, and set the maximum number of iterations and convergence conditions; Step 2: The particle swarm calls LSTM for two trainings based on the model structure and hyperparameters, and outputs the predicted road network weighted flow q w , road network weighted density k w Two parameters, and get the corresponding objective function value; Step 3: Perform non-dominated sorting on the historical solutions of each particle. The top solution set of each particle is recorded as pbest, and the top solution set of all particles in the historical sorting is recorded as gbest. Step 4: Update the position and velocity of each particle; Step 5: Perform a selection operation in a roulette wheel manner and select one of the particles to reassign parameters; Step 6: Perform crossover operation by selecting real crossover method; Step 7: Randomly assign values ​​to chromosomes again with probability Pm to perform mutation operation; Step 8: Repeat steps 2 to 7, and check whether the convergence condition constraints are met in each iteration. When the convergence condition is met, the solution is terminated. The parameter value combination with the highest ranking is the best parameter combination, which is the best road network weighted flow q obtained. w , road network weighted density k w Two parameter combinations.

[0008] Furthermore, in step 4, the position and velocity of each particle are updated according to the following formula: ; (1) In the formula, w is the inertia factor, C is the learning factor, r is a random number between 0 and 1, pbest is the best position of the particle fitness value, gbest is the best position of the particle swarm fitness value, and pbest and gbest are updated in each cycle.

[0009] Furthermore, the process of the crossover operation in step 6 is as follows: Assume that the mth particle am and the nth particle an are at position j, then the two chromosomes ranked last in the parent population are crossed, as shown in the following formula: ; (2) Where R is a random number between the interval [0, 1].

[0010] Furthermore, in the process of determining the loss function, the mean square error MSE is used as the loss function, and its formula is as follows: ; (3) Where n is the number of samples, Xp is the predicted value of the i-th sample, and X is the actual value.

[0011] Furthermore, the mathematical expression of the target optimization is: (4); Where: is the i-th sample q w The actual value of is the i-th sample q w The predicted value of is the i-th sample k w The actual value of is the i-th sample k w The predicted value of .

[0012] Furthermore, the method of importing the model training data into the multi-objective optimization model for prediction is to use the weighted traffic flow q of the road network under the first three time series w , road network weighted density k wThe time period ratio T to be predicted is used as the input of the prediction algorithm to predict the subsequent road network weighted flow q w , road network weighted density k w ; The formula for T is as follows: ; (5) Where: is the statistical time interval.

[0013] The present invention proposes a short-term road network MFD parameter prediction method based on LSTM, which has the following beneficial effects: The present invention establishes two LSTMs as prediction models, and performs short-term predictions on the two major MFD parameters: the weighted average density of the road network and the weighted average flow of the road network. The first three time intervals and the current time period are used as inputs, and the prediction results of the next time interval are output. Among them, in order to find two sets of better LSTM parameter configurations, GA-MOPSO is introduced as a multi-objective search algorithm, and a multi-objective particle swarm algorithm (GA-MOPSO) solution framework that integrates genetic algorithms is designed for synchronous search of MFD parameters. The final predicted weighted average density of the road network and the weighted average flow of the road network are highly accurate, effectively avoiding the defects of being too aggregated, so as to grasp the short-term change trend of the road network traffic status, timely discover potential traffic status, and improve travel efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The present invention is a flow chart of a method for predicting short-term road network MFD parameters based on LSTM; Figure 2 This is a flowchart of the LSTM search optimization using GA-MOPSO in the present invention; Figure 3 It is a framework diagram of a typical LSTM of the present invention; Figure 4 It is the structural diagram of LSTM of the present invention; Figure 5 A location diagram of the detector at Ting Kok Road, Tai Po District, Hong Kong of the present invention; Figure 6 It is the total flow change diagram of the road network of the present invention; Figure 7 The three traffic states and their boundary diagrams of the present invention; Figure 8 This is a comparison diagram of the actual and predicted values ​​of the MFD parameters of Tingjiao Road of the present invention; Fig. 9 This is a comparison chart of the MFD measured values ​​and predicted values ​​for the four test sets throughout the day of the present invention; Fig.10 This is the MFD point change diagram of the test group MFD part of the time period of the present invention; Fig.11 This is a road network macro traffic state prediction effect diagram of the present invention; Fig.12 This is the typical MFD form and its fitting effect of the present invention. DETAILED DESCRIPTION

[0015] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0016] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0017] Example By analyzing and comparing various methods of predicting traffic conditions in the existing technologies, it is found that the existing prediction methods usually use aggregate indicators such as average speed and density to cover up the details of the road section, which makes it difficult to effectively characterize the road network status. As a result, the prediction of short-term road network MFD parameters often lacks accuracy.

[0018] Based on this, in order to solve the above-mentioned short-term road network MFD parameter prediction lack of accuracy and excessive aggregation defects, this embodiment provides a short-term road network MFD parameter prediction method based on LSTM, referring to Figure 1 ,include: S1: The weighted flow rate q in the short-term network MFD parameters w , road network weighted density k w The two parameters are used as prediction targets to create their own LSTM models to determine the loss function; S2: Initialize the parameters in the loss function and continuously update the parameters in the loss function until the loss function converges to complete the model training; S3: Use the multi-objective optimization algorithm GAMOPSO to establish a multi-objective optimization model, import the model training data into the multi-objective optimization model for prediction, obtain the best two sets of LSTM structures and hyperparameters, and then obtain the best road network weighted flow q w , road network weighted density k w The combination of the two parameters is the final prediction result.

[0019] It should be noted that in the present invention, LSTM uses mean square error (MSE) as the loss function. The calculation formula is as follows: Where n is the number of samples, Xp is the predicted value of the i-th sample, and X is the actual value.

[0020] The present invention adopts the Adam optimization algorithm to optimize the parameters, wherein the Adam optimization algorithm is a first-order optimization algorithm that can replace the traditional stochastic gradient descent process, and iteratively updates the neural network weights based on the training data.

[0021] For ease of understanding, the LSTM referred to in the present invention, i.e., Long Short Term Memory Neural Network (Long short term memory), is a recurrent neural network. As a special recurrent neural network (RNN), it makes up for the shortcoming that the traditional RNN network can only remember short sequences. LSTM has the ability to add or delete the information of the "gate" and always reach the ideal cell state. This ability is achieved through a structure called gating. Gating is a way to allow information to pass selectively. It consists of a Sigmoid neural network layer and a point-by-point multiplier. LSTM includes 3 gates: input gate, forget gate and output gate, and each gate is a BP neural network. Such as Figure 3 As shown in the figure, it is the principle diagram of LSTM neural network, each time point corresponds to a state C t , this state records the previous state information, C at each time point t They can all be modified by controlling weights, forgetting, etc. The state of neurons is like a conveyor belt, allowing information to propagate on the conveyor belt without changing its state.

[0022] The update rule is as follows: Where: f t 、i t , o t are the forget gate unit, input gate unit and output gate unit of each LSTM unit respectively; W f , W i , W o is the weight of the recursive connection; h1, h2, h3....h t is the hidden layer state; x t b is input information; f 、b i 、b o 、b t are the bias of the function respectively; C t-1 , C tis the output layer of the hidden layer, It is a critical state. It can be seen that the entire LSTM unit selectively stores the critical state value based on the ratio of forgetting and memory on the basis of RNN to obtain the output result.

[0023] Therefore, the invention uses the advantage of LSTM having selective memory to calculate the weighted flow rate q of the road network. w , road network weighted density k w The prediction of two parameters is to use the weighted traffic flow q of the road network under the first three time series w , road network weighted density k w The time period ratio T to be predicted is used as the input of the prediction algorithm to predict the subsequent road network weighted flow q w , road network weighted density k w For details of the structure, please refer to Figure 4 The calculation of T is as follows: is the statistical time interval, i.e. 10 minutes, and T is actually the time position of the time interval in the entire period (12:00-18:00, 6 hours). The introduction of T adds time input to the model prediction, so that the model can better take into account the time characteristics of the MFD parameters.

[0024] .

[0025] Among them, the number of hidden layers of LSTM and the number of neurons in each hidden layer are still difficult to set. In practice, they can only be adjusted by trial-by-error. The update step size of each iteration of the learning rate is a hyperparameter. If it is too large, the result will be unstable, and if it is too small, the convergence speed will be too slow. The specific value needs to be obtained through multiple experiments within the empirical value range.

[0026] On the other hand, the weighted flow rate of the road network q w , road network weighted density k w Although the prediction process of the two parameters is independent, their values ​​will jointly determine the state of MFD. w , road network weighted density k w The objective training model is to minimize the error of the two parameters. The two parameters may not necessarily achieve the best results in MFD prediction performance. The present invention considers the weighted flow rate q w , road network weighted density k w The LSTM model training process of the two parameters is included in the synchronous training in the same framework, and a multi-objective optimization model is established with MFD state prediction as one of the goals. In order to quickly find the above parameter settings and improve the generalization performance of the model, the present invention will use the GA-MOPSO algorithm for parameter search.

[0027] Specifically, the multi-objective optimization model is established to predict the weighted flow rate q of the road network as accurately as possible. w , road network weighted density k w Two parameters, and the state of MFD, namely the weighted flow of the road network q w , road network weighted density k w The determined point position accuracy is a typical multi-objective optimization problem with 3 objectives. The mathematical expression of the optimization objective is as follows: In the formula, is the i-th sample q w The actual value of is the i-th sample q w The predicted value of is the i-th sample k w The actual value of is the i-th sample k w The predicted value of w , k w The two parameters have different dimensions and large numerical differences, so In All are normalized values, that is, the parameters need to be divided by the maximum value of historical data.

[0028] In the present invention, the parameter to be solved is q w , k w The two parameters correspond to the number of layers of the two LSTMs, with a value range of [1,3], as well as the dropout parameter of the model. The dropout operation is to abandon some neuron outputs in a certain proportion in LSTM, forcing the model to learn different feature combinations, which can reduce overfitting problems. The value range is [0.1,0.2]. In addition, the LSTM learning rate is also a parameter to be solved. The learning rate refers to the magnitude of the adjustment of the model parameters. It is a hyperparameter and has a value range of [0.01,0.1].

[0029] The objective function model includes the above three objectives, and the parameters to be solved are the structures and hyperparameters of the two LSTMs. The objective functions, the parameters to be solved, the constraints, etc. are closely related, and involve two independent LSTM solutions, which is a nonlinear relationship. Therefore, it is suitable to use non-dominated sorting and intelligent algorithms for solution. The present invention combines the multi-objective particle swarm optimization algorithm (Multi-Objective Particle Swarm Optimization, MOPSO) with the genetic algorithm (Genetic Algorithm, GA) operation, that is, based on the original particle swarm algorithm, a fast non-dominated, parto-solution-based multi-objective optimization algorithm with selection, crossover, and mutation strategies is used to finally determine the most advantageous solution set among the multiple objectives. Reference Figure 2 The solution process is as follows.

[0030] Step 1: Read the training set, initialize the size of the particle swarm (M=15) and the initial solution set, set the maximum number of iterations and convergence conditions; Step 2: The particle swarm calls LSTM for two trainings based on the model structure and hyperparameters, and outputs the predicted road network weighted flow q w , road network weighted density k w Two parameters, and get the corresponding objective function value; Step 3: Perform non-dominated sorting on the historical solutions of each particle. The top solution set of each particle is recorded as pbest, and the top solution set of all particles in the historical sorting is recorded as gbest. Step 4: Update the position and velocity of each particle as follows: In the formula, w is the inertia factor, C is the learning factor, r is a random number between 0 and 1, pbest is the best position of the particle fitness value, gbest is the best position of the particle swarm fitness value, and pbest and gbest are updated in each cycle.

[0031] Step 5: Select an operation and reassign parameters to one of the particles in a roulette wheel manner; Step 6: Crossover operation, select the real number crossover method, which means that the timing parameter combination of two chromosomes produces two new individuals through linear combination. For example, the crossover operation method of the mth particle am and the nth particle an at position j is: cross the two chromosomes ranked last in the parent population according to the following formula.

[0032] Where R is a random number between the interval [0, 1].

[0033] Step 7: Mutation operation, traverse the population and randomly reassign values ​​to chromosomes with probability Pm; Step 8: Repeat steps 2 to 7, and check whether the convergence condition constraints are met in each iteration. When the convergence condition is met, the solution is terminated. The parameter value combination with the highest ranking is the best parameter combination, which is the best road network weighted flow q obtained. w , road network weighted density k w Two parameter combinations.

[0034] For ease of understanding, the macro fundamental diagram (MFD) referred to in the present invention is a basic attribute of the road network. Any road network has a corresponding macro fundamental diagram. Taking the relationship model between the weighted flow in the road network and the total network traffic flow established by Daganzo et al. as an example, the typical mathematical model is as follows: In the formula, are the flow rate, length and traffic density of road section i respectively. The MFD curve can be modeled as a trapezoidal graph, including an ascending segment, a stable segment and a descending segment. The curve can also be fitted as a quadratic polynomial or a cubic polynomial, such as Fig.12 As shown. Although similar to the relationship curve between the flow-density-speed parameters of a road section, MFD reflects the status of the entire traffic network rather than a single road section. The flow and density of the entire road network, the outflow and the total number of vehicles in the area all present a parabolic graph, that is, when the total number of vehicles in an area reaches a fixed value, the outflow of the road network reaches the maximum; if the number of vehicles continues to increase, the outflow will drop rapidly. This provides a basis for using MFD to control the flow of the road network, especially in uniformly congested areas. Therefore, MFD can be used for the global management and control of urban transportation networks.

[0035] Experimental example In order to illustrate the technical effect of the present invention, the present invention uses the road detection data of the Hong Kong Special Administrative Region Government Open Dataset (DATA.GOV.HK, https: / / data.gov.hk / sc / ) as experimental data. The data set is collected and stored in real time 24 hours a day by highway roadside video detectors, and the traffic flow, speed, occupancy rate and other information of each lane section are stored every 30 seconds. The detectors are densely deployed and have good completeness.

[0036] refer to Figure 5 The study used Ting Kok Road in Tai Po District, Hong Kong as the experimental road network. Ting Kok Road is located in the eastern part of Tai Po District. It has four lanes in both directions and a total length of 10.61km in both directions. It is close to the intersection of Ting Kok Village and Ting Kok Road. It connects many main roads such as Tai Po Highway, Ting Kok Road, and Po Heung Bridge Road, and is an important part of the local transportation network. A total of 18 detectors were set up in both directions on this section of road to divide the road sections according to intersections and ramps. The length of the road section was measured by the center line of the road based on the Hong Kong road network geographic information data. The flow and density of each section were calculated based on the flow and average speed collected by the detector.

[0037] The 1,377 data from April 1 to April 17, 2023 after removing abnormal data are used as the training set, and the 462 data from April 18 to April 22 are used as the test set. Figure 6 The graph shows the changes in the total traffic volume of the road network at 10-minute intervals from April 1 to 3. It can be seen that the temporal distribution of the traffic volume varies greatly.

[0038] First, the historical data is MFD drawn and clustered. A total of 2364 data from 8:00-21:00 from March 1 to 31, 2023 are used to draw the MFD form of the road network and perform FCM clustering as the original MFD state of the road network, and the point set shown in the figure is obtained. For the number of clusters and traffic state classification, this experimental example adopts the idealized traffic state classification method proposed in the literature. This method defines the traffic state into 5 types by fitting a quadratic polynomial and dividing it by weighted density: free flow, stable flow, unstable flow, restricted flow, and forced flow. Among them, the restricted flow and forced flow states require the MFD form to have a descending segment to be achieved. The MFD form formed by this experimental data only has an ascending segment and a part of the stable segment. Therefore, the number of clusters in this experimental example is set to 3: free flow, stable flow, and unstable flow. It should be noted that clustering the collected and drawn MFD is a common means of dividing the road network status. This experimental example needs to identify and divide the MFD status through clustering. Fuzzy C-means clustering (FCM) is a clustering method. Fuzzy C-means clustering is a clustering method based on target optimization. It minimizes the weighted sum of the distance between the sample and the fuzzy cluster center through iteration. The target is set as shown in the following formula.

[0039] Where U is the degree of membership of each data point to the corresponding cluster center; v c is the i-th fuzzy cluster center, μ ij ∈[0,1] indicates the membership degree of the jth data point to the i-th cluster center; d ij is the Euclidean distance between the i-th cluster center and the j-th data point; m∈[1,∞] is a weighted index. As m increases, the fuzziness of clustering increases; and the formula satisfies .

[0040] The specific steps of the FCM algorithm are: Step 1: Given the number of cluster categories c, the fuzzy weighted index m, and the iteration stop threshold , the number of iterations of the algorithm is bmax, and the membership matrix is ​​initialized.

[0041] Step 2: Calculate the fuzzy cluster centers.

[0042] Step 3: Update the fuzzy clustering membership matrix U(b+1).

[0043] Step 4: Choose a suitable matrix norm to compare U (b) and U (b+1),if , the system reaches stability and the iteration is terminated; otherwise, let b=(b+1) and go to step 2 to continue.

[0044] Gaussian mixture clustering GMM, spectral clustering, k-means clustering, etc. are all common clustering methods of MFD. In comparison, FCM clustering has a better effect on the distribution of boundary points between clusters and has a very stable processing result for low-dimensional data. Therefore, this experimental example uses FCM as the main clustering method.

[0045] Therefore, FCM clustering is performed with the cluster number of 3, and we can obtain Figure 7 Three traffic states and their boundaries. The edge points between each two states are extracted to fit a binary linear equation, and we can get Figure 7 The two groups of demarcation lines provide a basis for the subsequent evaluation of the road network traffic status. This experiment uses Python as the programming language, TensorFlow as the development framework, 10 minutes as the statistical time interval, the previous three time intervals, the proportion of the time period T as input, the number of particles is 10, the maximum number of iterations is 10, and the number of iterations of each LSTM training is 50 rounds. Two important parameters of MFD are respectively: the weighted average density k of the road network w , weighted average flow rate of the road network q w Perform LSTM training. The LSTM structure is as follows: Table 1 MFD parameters and its LSTM structure Tested on the test set, the weighted average flow of the road network q w , weighted average density of road network k w The actual value and predicted value are compared. Figure 8 As shown in the figure, every 69 data points are for 1 day. It can be seen that the MSE error of the model's verification results is within 8%. The model has basically made a relatively accurate prediction of the time series fluctuation curve of the parameters, which is basically consistent with the trend of the actual curve, and has a good prediction for the time series changes in different periods.

[0046] For the prediction of MFD pattern, it can be seen Fig. 9 . Fig. 9 The prediction effect of the MFD morphology of the test set for 4 days is shown. It can be seen that most of the predicted MFD point sets overlap with the actual values, which provides a basis for short-term MFD morphology prediction and evaluation. From the traffic distribution diagram in the previous article, it can be seen that the overall fluctuation of road network traffic is large, the values ​​are more jumpy, and the MFD is more discrete. The predicted value span is more compact and conservative than the measured value, and it is difficult to predict some dense traffic peaks and low peaks.

[0047] Take the specific prediction results as an example. Fig.10The comparison between the predicted and measured MFD results on the morning of April 18 is shown, and the label numbers are the order of appearance of the points. Taking the MFD change trajectory of the first 20 time intervals of the day as an example, as time goes by, the morning peak gradually subsides, and the actual MFD points gradually shift from right to left, and the predicted MFD points also change according to this trend. It can be seen that the sparse distribution and change trajectory prediction of the MFD points are basically consistent with reality. In the forecast of the afternoon period, with the arrival of the evening peak, the MFD points gradually shift to the upper right corner and turn to an unstable flow state, which is in line with reality. The model's prediction of MFD points is generally not precise enough. To achieve accurate prediction of specific points, it is necessary to improve the optimization model while improving the quality of data collection in the future, or directly predict based on the running trajectory of the points.

[0048] In the present invention, the accuracy is calculated based on whether the predicted state is consistent with the actual state, and 4.18-4.30 is used as the test set. The results are shown in Table 2. Fig.11 The visualization results of state predictions for 4.18-4.30 are shown. It can be seen that there are large differences in prediction accuracy in specific traffic state predictions, and some prediction effects are not good. One of the reasons is that the present invention does not directly use "state accuracy" as the goal to optimize LSTM parameters. In later experiments, it is also proved that the prediction effect of the model obtained by taking accuracy as the direct goal is still poor. Therefore, the quantitative evaluation of MFD state prediction accuracy and how to integrate it into the search algorithm need further exploration. On the other hand, the root cause of state prediction errors lies in the deviation of MFD point predictions. Most of the erroneous predictions are concentrated at the junction of the two states. The small point deviations here will lead to different final state attributes. As mentioned above, the compact prediction values ​​make the MFD points more horizontally compressed as a whole, so that many points fail to enter the correct type range, especially at the junction of states 1 and 2. This needs to be optimized in subsequent experimental design and MFD state clustering.

[0049] Table 2 MFD status prediction accuracy In order to further consider the possibility of time period division, segmented prediction and improved accuracy, this paper also divides the dataset into two parts, morning and afternoon. Using the GA-MOPSO and LSTM methods in this paper, two sets of model parameter settings were found, and time period training and testing were performed. The results are shown in Table 3. It can be seen that the fluctuations during the afternoon and evening peak hours are still difficult to predict. On the other hand, the model has a high accuracy in predicting certain dates and periods. When the dataset is sufficient, using pattern recognition technology for date pre-classification, time period pre-classification and model training can improve the accuracy of model prediction.

[0050] Table 3. MFD state prediction accuracy under time segment prediction Finally, in order to verify the LSTM advantage of the GA-MOPSO search algorithm, traditional LSTM and RNN are used for comparison, and their hyperparameters are set to the default values. 4.18-4.22 are used as the test set for the experiment, and the results are shown in Table 4. It can be seen that the hyperparameters selected by the method of the present invention have higher accuracy in MFD parameters and state prediction accuracy, which proves the effectiveness and accuracy of the search algorithm.

[0051] Table 4 Comparison of prediction accuracy of each model The above is only for explaining the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention without creative work should be included in the protection scope of the present invention.

Claims

1. The LSTM-based short-term road network MFD parameter prediction method is characterized by: include: The weighted flow rate q in the short-term road network MFD parameters w , road network weighted density k w The two parameters are used as prediction targets to create their own LSTM models to determine the loss function; Initialize the parameters in the loss function and continuously update the parameters in the loss function until the loss function converges to complete the model training; The multi-objective optimization algorithm GAMOPSO is used to establish a multi-objective optimization model, and the data trained by the model is imported into the multi-objective optimization model for prediction. The best two sets of LSTM structures and hyperparameters are obtained to obtain the optimal road network weighted flow q w , road network weighted density k w The combination of the two parameters is the final prediction result.

2. The LSTM-based short-term road network MFD parameter prediction method according to claim 1, characterized in that: The optimal road network weighted flow q is obtained w , road network weighted density k w The process of combining the two parameters includes: Step 1: After reading the training set in model training, initialize the size of the particle swarm and the initial solution set, and set the maximum number of iterations and convergence conditions; Step 2: The particle swarm calls LSTM for two trainings based on the model structure and hyperparameters, and outputs the predicted road network weighted flow q w , road network weighted density k w Two parameters, and get the corresponding objective function value; Step 3: Perform non-dominated sorting on the historical solutions of each particle. The top solution set of each particle is recorded as pbest, and the top solution set of all particles in the historical sorting is recorded as gbest. Step 4: Update the position and velocity of each particle; Step 5: Perform a selection operation in a roulette wheel manner and select one of the particles to reassign parameters; Step 6: Perform crossover operation by selecting real crossover method; Step 7: Randomly assign values ​​to chromosomes again with probability Pm to perform mutation operation; Step 8: Repeat steps 2 to 7, and check whether the convergence condition constraints are met in each iteration. When the convergence condition is met, the solution is terminated. The parameter value combination with the highest ranking is the best parameter combination, which is the best road network weighted flow q obtained. w , road network weighted density k w Two parameter combinations.

3. The LSTM-based short-term road network MFD parameter prediction method according to claim 2, characterized in that: In step 4, the position and velocity of each particle are updated according to the following formula: ; In the formula, w is the inertia factor, C is the learning factor, r is a random number between 0 and 1, pbest is the best position of the particle fitness value, gbest is the best position of the particle swarm fitness value, and pbest and gbest are updated in each cycle.

4. The LSTM-based short-term road network MFD parameter prediction method according to claim 2, characterized in that: The process of the crossover operation in step 6 is as follows: Assume that the mth particle am and the nth particle an are at position j, then the two chromosomes ranked last in the parent population are crossed, as shown in the following formula: ; Where R is a random number between the interval [0, 1].

5. The LSTM-based short-term road network MFD parameter prediction method according to claim 1, characterized in that: In the process of determining the loss function, the mean square error MSE is used as the loss function, and its formula is as follows: ; Where n is the number of samples, Xp is the predicted value of the i-th sample, and X is the actual value.

6. The LSTM-based short-term road network MFD parameter prediction method according to claim 1, characterized in that: The mathematical expression of target optimization is: ; Where: is the i-th sample q w The actual value of is the i-th sample q w The predicted value of is the i-th sample k w The actual value of is the i-th sample k w The predicted value of .

7. The LSTM-based short-term road network MFD parameter prediction method according to claim 1, characterized in that:The data trained by the model is imported into the multi-objective optimization model for prediction using the weighted traffic flow q of the road network under the first three time series. w , road network weighted density k w The time period ratio T to be predicted is used as the input of the prediction algorithm to predict the subsequent road network weighted flow q w , road network weighted density k w ; The formula for T is as follows: ; Where: is the statistical time interval.

Citation Information

Cited By

  • Expressway short-time traffic flow prediction method and device based on support vector regression

    CN119229658A