Method and device for predicting short-term traffic flow on highways based on support vector regression
By applying support vector regression model and variational mode decomposition algorithm in highway traffic flow prediction, the problem of low prediction accuracy in the processing of nonlinear and noisy data is solved, and more efficient traffic flow prediction is achieved.
Patent Information
- Application Number
- CN202411755239.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The prior art is difficult to capture complex patterns when predicting highway traffic, resulting in limited prediction accuracy, especially when processing nonlinear and noise-prone data.
Using a method based on support vector regression, the historical data is decomposed into modal components of different frequency bands through a variational modal decomposition algorithm, and a support vector regression model is constructed for each component, and the model parameters are optimized using a slimycin optimization algorithm.
The modal aliasing phenomenon is effectively avoided, the adaptability and decomposition effect of data is improved, and the accuracy of short-term traffic flow prediction on highways is significantly improved.
Smart Images

Figure CN119229658B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of traffic flow prediction, and in particular to a method and a device for predicting short-term traffic flow on a highway based on support vector regression. Background Art
[0002] With the rapid development of social economy, highways play a vital role in transportation. Accurately predicting highway traffic volume is of great significance for traffic management departments to make reasonable traffic planning, resource allocation and improve road traffic efficiency.
[0003] At present, the traffic volume on highways presents the characteristics of nonlinearity, uncertainty and time-varying. When faced with complex traffic conditions, traditional traffic flow prediction methods often have difficulties in capturing complex patterns in traffic data, resulting in limited prediction accuracy. Commonly used statistical methods such as moving average method, exponential smoothing method, linear models such as linear regression model, etc., are not effective in processing nonlinear traffic flow data and have low prediction accuracy. Although deep learning models can improve prediction results, such as convolutional neural networks (CNN), recurrent neural networks (RNN) and their variants, long short-term memory networks (LSTM), etc., these models require a large amount of data for training, and the model parameters are numerous, which will occupy a lot of resources and have high requirements for equipment configuration, so they are not suitable for daily traffic management.
[0004] In order to meet the growing demand for traffic management and improve the accuracy of highway traffic flow prediction, the present invention proposes a method and device for highway short-term traffic flow prediction based on support vector regression. Summary of the invention
[0005] The purpose of the present invention is to provide a method and device for predicting short-term traffic flow on a highway based on support vector regression in view of the defects of the prior art.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A method for predicting short-term traffic flow on a highway based on support vector regression, comprising:
[0008] S1. Obtain historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set;
[0009] S2. Decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands;
[0010] S3. Performing linear normalization processing on modal components of different frequency bands corresponding to the training set, and constructing corresponding support vector regression models for the processed modal components of different frequency bands, respectively, to obtain multiple support vector regression models;
[0011] S4. The slime mold optimization algorithm is used to optimize and train multiple support vector regression models to obtain multiple optimal traffic flow prediction models;
[0012] S5. Inputting the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtaining the corresponding prediction values of the modal components of different frequency bands;
[0013] S6. Perform denormalization on the prediction values corresponding to the modal components of different frequency bands, and add and reconstruct the processed prediction values to obtain the final prediction result of the highway traffic section flow.
[0014] Furthermore, before step S5, the step further includes:
[0015] The evaluation index is used to evaluate the multiple traffic flow prediction models to determine whether the evaluation results meet the requirements. If not, step S3 is re-executed; if yes, the final multiple traffic flow prediction models are obtained.
[0016] Furthermore, after decomposing the processed historical data based on the variational modal decomposition algorithm in step S2, the step further includes: arranging the decomposed modal components in sequence from high frequency to low frequency.
[0017] Furthermore, the step S4 is specifically as follows:
[0018] The slime mold optimization algorithm is used to optimize the hyperparameter penalty coefficient, kernel function parameters, and insensitive loss function parameters in each support vector regression model. The mean square error between the predicted value and the true value of the support vector regression model training set is used as the objective function of the slime mold optimization algorithm. The objective function is brought into the training set to train the support vector regression model. The slime mold optimization algorithm is used to find the optimal hyperparameter combination. After multiple iterative calculations, the optimal multiple traffic flow prediction models are obtained.
[0019] Furthermore, the evaluation indicators include mean absolute error, root mean square error, and determination coefficient.
[0020] Furthermore, the evaluation result meets the requirement that the smaller the mean absolute error and the root mean square error are, the closer the determination coefficient is to 1.
[0021] Furthermore, the mean absolute error is calculated as follows:
[0022] ;
[0023] Where MAE stands for mean absolute error; y i represents the true value; Represents the predicted value; n represents the number of samples in the test set; i represents the subscript of the test set.
[0024] Furthermore, the root mean square error is calculated as follows:
[0025] ;
[0026] Here, RMSE stands for root mean square error.
[0027] Furthermore, the determination coefficient is calculated as follows:
[0028] ;
[0029] in, represents the coefficient of determination; represents the true data sample mean.
[0030] Accordingly, a device for predicting short-term traffic flow on a highway based on support vector regression is also provided, which is used to execute the method for predicting short-term traffic flow on a highway based on support vector regression. The prediction device includes a processor, and the processor is provided with:
[0031] An acquisition module is used to acquire historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set;
[0032] A decomposition module is used to decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands;
[0033] A processing module is used to perform linear normalization processing on modal components of different frequency bands corresponding to the training set, and respectively construct corresponding support vector regression models for the processed modal components of different frequency bands to obtain multiple support vector regression models;
[0034] The training module is used to optimize and train multiple support vector regression models using the slime mold optimization algorithm to obtain multiple optimal traffic flow prediction models;
[0035] The prediction module is used to input the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtain the corresponding prediction values of the modal components of different frequency bands;
[0036] The reconstruction module is used to perform denormalization processing on the predicted values corresponding to the modal components of different frequency bands, and to add and reconstruct the processed predicted values to obtain the final prediction result of the traffic section flow of the highway.
[0037] Compared with the prior art, the present invention uses the VMD algorithm to smooth the traffic flow time series data with nonlinearity and a lot of noise, obtains components with different bandwidths, can effectively avoid the modal aliasing phenomenon, and has good adaptability and decomposition effect. Through comparative analysis with other algorithms, it is shown that the SMA algorithm adopted by the present invention shows better results in finding the optimal hyperparameters. The present invention selects the SVR model as the prediction model, which has the characteristics of less parameter settings, fast model calculation speed and high prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of a method for predicting short-term traffic flow on a highway based on support vector regression provided in Example 1;
[0039] Figure 2 is a schematic diagram of data decomposition by the VMD algorithm provided in Example 1;
[0040] Figure 3 It is a schematic diagram of the comparison between the predicted value of the VMD-SMA-SVR model provided in Example 2 and the actual value of the data. DETAILED DESCRIPTION
[0041] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention 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 invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0042] The purpose of the present invention is to provide a method and device for predicting short-term traffic flow on a highway based on support vector regression in view of the defects of the prior art.
[0043] Embodiment 1
[0044] This embodiment provides a method for predicting short-term traffic flow on a highway based on support vector regression. Figure 1 As shown, including:
[0045] S1. Obtain historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set;
[0046] S2. Decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands;
[0047] S3. Performing linear normalization processing on modal components of different frequency bands corresponding to the training set, and constructing corresponding support vector regression models for the processed modal components of different frequency bands, respectively, to obtain multiple support vector regression models;
[0048] S4. The slime mold optimization algorithm is used to optimize and train multiple support vector regression models to obtain multiple optimal traffic flow prediction models;
[0049] S5. Inputting the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtaining the corresponding prediction values of the modal components of different frequency bands;
[0050] S6. Perform denormalization on the prediction values corresponding to the modal components of different frequency bands, and add and reconstruct the processed prediction values to obtain the final prediction result of the highway traffic section flow.
[0051] This embodiment uses the variational mode decomposition (VMD) algorithm to decompose the initial traffic flow data with nonlinearity and high noise into multiple modal components. A separate support vector regression (SVR) prediction model is constructed for each component, and the predicted values are summarized for the final traffic flow prediction. In addition, in order to improve the prediction accuracy of the model, the Slime Mold Optimization Algorithm (SMA) is used to optimize the SVR model. The core advantage of this method is that it can effectively capture the complex patterns in the traffic data. By combining SMA and VMD, the prediction accuracy can be significantly improved.
[0052] In step S1, historical data of the traffic flow of the expressway section at a preset time interval is obtained, the obtained historical data is processed, and the processed historical data is divided into a training set and a test set.
[0053] This embodiment obtains historical data of highway gantry traffic section flow at 5-minute intervals, cleans and completes the historical data through a data cleaning method to obtain a data set, and selects the first 60% of the data as the training set data, the middle 20% as the test set data, and the last 20% as the validation set data.
[0054] In step S2, the processed historical data is decomposed based on the variational mode decomposition (VMD) algorithm to obtain modal components (IMFs) in different frequency bands.
[0055] The VMD algorithm is used to decompose the above data sets (training set, test set, and validation set) to obtain five IMF components with similar center frequencies. The five IMF components are arranged in sequence from high frequency to low frequency to obtain IMF components of different frequency bands. Each component represents the information of different frequency bands in the original traffic flow data. The specific decomposition results are as follows: Figure 2 shown.
[0056] The variational mode decomposition (VMD) algorithm used in this embodiment is mainly used to decompose nonlinear and non-stationary time series signals into several intrinsic mode functions, which have different center frequencies. VMD has adaptive characteristics and is non-recursive. It can directly extract mode functions from the signal data itself without presetting basis functions, so that various signals can be processed more flexibly.
[0057] The main advantages of VMD are its ability to resist modal aliasing, solid mathematical theoretical foundation, reduced impact of endpoint effects, flexibility in parameter selection, and computational efficiency. It can effectively avoid the modal aliasing problem that occurs in traditional modal decomposition algorithms (EMD) and provide more stable and reliable decomposition results. In addition, VMD shows good stability in multi-step prediction and generalization performance tests, and is suitable for a wide range of signal types, especially for processing noise-contaminated signals, nonlinear signals, and non-stationary signals.
[0058] The decomposition process of the VMD algorithm is actually a process of solving the variational problem. Specifically, a signal f(t) is decomposed into K modal functions u k (t), and each modal function u k The sum of the estimated bandwidths of (t) is the smallest. The steps to implement the VMD algorithm are as follows:
[0059] 1. For each modal function u k (t) performing Hilbert transform to obtain a single-sided spectrum;
[0060] 2. Multiply each modal signal by the estimated center frequency , and then shift the spectrum to baseband;
[0061] 3. Gaussian smoothing is performed on the demodulated signal gradient to obtain the bandwidth of each modal function, and then a constrained variational model is constructed;
[0062] 4. Introduce the second penalty factor α and the Lagrange multiplier λ to ensure the reconstruction accuracy of the original signal s(t) and transform the constrained variational formula into an unconstrained variational formula;
[0063] ;
[0064] 5. Update component u by alternating direction multiplication method k (t) The corresponding center frequency ω k and the Lagrange multiplier λ, and find the minimum point of the extended Lagrangian function expression.
[0065] 6. Repeat step 5 until the iteration accuracy is met , thereby obtaining k narrow and wide components. The iteration termination condition can be expressed as:
[0066] ;
[0067] Due to the instability and randomness of truck traffic flow on highways, the direct use of regression models for prediction has low accuracy. In this embodiment, a multi-scale decomposition algorithm is introduced to decompose the truck traffic flow time series data, and the more stable data components after decomposition are modeled and predicted separately to improve the accuracy of model prediction.
[0068] In step S3, linear normalization processing is performed on the modal components of different frequency bands corresponding to the training set, and corresponding support vector regression models are constructed for the processed modal components of different frequency bands respectively to obtain multiple support vector regression models.
[0069] The IMF components of the five different frequency bands corresponding to the training set were normalized by Max-Min. Then, according to the time series, the first 12 bits of data of each IMF component were set as input features, and the 13th bit of data was used as the output target, and the model was built on this basis. The Gaussian function was selected as the kernel function, and the SMA algorithm was used to optimize the penalty factor, kernel function parameters and other hyperparameters. Five SVR models based on IMF component information were constructed through training with the training set data.
[0070] The Max-Min normalization process is as follows: The Max-Min normalization process is to scale the components to the [0,1] interval, thereby eliminating the influence of different dimensions and facilitating subsequent data processing and analysis.
[0071] Max-Min normalization is expressed as:
[0072] ;
[0073] Among them, x represents the original component, x min and x max They represent the minimum and maximum values of the components respectively, and x' represents the normalized component.
[0074] In step S4, the slime mold optimization algorithm is used to optimize and train multiple support vector regression models to obtain multiple optimal traffic flow prediction models.
[0075] The SVR model is a regression algorithm based on support vector machine (SVM) and is used to solve regression problems. Its core idea is to handle regression problems while maintaining the maximum margin principle similar to the support vector machine. The optimization problem of the SVR model is:
[0076] ;
[0077] ;
[0078] Among them, w represents the weight vector, C represents the penalty factor, n represents the number of samples in the SVR training set, ξ i and represents the slack variable, st represents the constraint condition, ε represents the tolerance deviation, x i Represented as the i-th input data, y i represents the response variable and b is the bias.
[0079] The final target decision function of the SVR model is:
[0080] ;
[0081] in, represents the introduced Lagrange multiplier, k(x i ,x) represents the kernel function, and the Gaussian function is used as the kernel function, so the predicted value y of the identified sample x pre for:
[0082] ;
[0083] Here, σ represents the parameter of the Gaussian function.
[0084] In this embodiment, the slime mold optimization algorithm SMA is used to optimize the hyperparameters of the five SVR models, and the SVR models are trained to obtain five optimized models.
[0085] The specific Slime Mold Optimization Algorithm SMA is:
[0086] The slime mold optimization algorithm is a meta-heuristic optimization algorithm. Its basic idea is to build a mathematical model based on a series of actions and body changes that occur in the slime mold Physarum polycephalum in the process of searching for food, including three stages: approaching food, surrounding food, and grabbing food. SMA has the characteristics of fast convergence and precise search.
[0087] When the slime mold approaches food, the mathematical model of the slime mold algorithm is expressed as follows:
[0088] ;
[0089] Among them, t represents the current iteration number, X b (t) represents the optimal position of the slime mold individual at the tth iteration; X A (t) and X B (t) represents the positions of two randomly selected slime mold individuals; v b As the control parameter range is [-a, a], v crepresents a parameter that decreases linearly from 1 to 0; r represents a random value between [0,1]; W represents the mass of the slime mold, which represents the fitness weight; and p represents a control variable. b As the control parameter range is [-a,a], the expression is as follows:
[0090] ;
[0091] ;
[0092] ;
[0093] Where i∈1,2,3⋯,n, S(i) is the fitness value of the i-th slime mold, DF is the best fitness value in all iterations, and the fitness weight W is expressed as follows:
[0094] ;
[0095] ;
[0096] Among them, bF represents the best fitness value obtained in the current iteration process, wF represents the worst fitness value obtained in the current iteration process, condition represents the individuals that S(i) can rank in the first half of the slime mold population, and SmellIndex represents the fitness value sequence of the slime mold. However, when solving the minimum value problem, it uses the ascending order method.
[0097] When slime mold wraps food, the mathematical model of the slime mold algorithm is as follows:
[0098] ;
[0099] Among them, rand and r are random values between [0,1], UB and LB represent the upper and lower bounds of the search space, and z represents the switching frequency, which determines whether SMA searches for other food sources or searches around the best individual.
[0100] When the slime mold grabs food, the slime mold's venous tissue and biological oscillator change. The higher the concentration of food the veins come into contact with, the stronger the waves produced by the biological oscillator. Relying on this change, the slime mold will grab food with higher concentrations.
[0101] The change of vein width of slime mold is measured by W, v b 、v c To achieve this, W simulates the oscillation frequency of slime mold in the vicinity under different food concentrations. b It changes randomly between [-a, a] and gradually approaches zero as the number of iterations increases. c The value of oscillates between [-1,1] and eventually tends to zero. When the slime mold selects food, v b and vc The mutual synergy between them plays an important role.
[0102] This embodiment introduces the SMA algorithm to optimize the hyperparameter penalty coefficient C, kernel function parameter gamma, and insensitive loss function parameter epsilon in each SVR model. The mean square error (MSE) between the predicted value and the true value of the SVR model on the training set is used as the objective function of the slime mold optimization algorithm. The training set data is introduced for model training, and the SMA algorithm is used to find the best hyperparameter combination. After multiple iterative calculations, the optimized SVR model, that is, the optimal 5 traffic flow prediction models, is obtained.
[0103] In this embodiment, the final prediction result is evaluated by using an evaluation index to determine whether the evaluation result meets the requirements. If not, step S3 is re-executed; if so, the final multiple traffic flow prediction models are obtained and step S5 is executed.
[0104] The modal components IMF of 5 different frequency bands corresponding to the validation set are input into 5 traffic flow prediction models for prediction, and the prediction performance is evaluated based on the prediction results. This embodiment selects mean absolute error (MAE), root mean square error (RMSE) and determination coefficient (R-Square) as evaluation indicators to evaluate the accuracy of model prediction. The smaller the mean absolute error and root mean square error values, and the closer the determination coefficient value is to 1, the better the prediction effect of the model.
[0105] The mean absolute error is calculated as:
[0106] ;
[0107] Where MAE stands for mean absolute error; y i represents the true value; Represents the predicted value; n represents the number of samples in the test set; i represents the subscript of the test set.
[0108] The root mean square error is calculated as:
[0109] ;
[0110] Here, RMSE stands for root mean square error.
[0111] The coefficient of determination is calculated as:
[0112] ;
[0113] in, represents the coefficient of determination; represents the true data sample mean.
[0114] In step S5, the modal components of different frequency bands corresponding to the test set are input into the corresponding traffic flow prediction model for prediction, and the prediction values corresponding to the modal components of different frequency bands are obtained.
[0115] The five IMF modal components of different frequency bands corresponding to the test set are input into the corresponding traffic flow prediction model for prediction. The five traffic flow prediction models output the predicted values of each component respectively.
[0116] In step S6, the predicted values corresponding to the modal components of different frequency bands are subjected to denormalization processing, and the processed predicted values are added and reconstructed to obtain the final prediction result of the traffic section flow of the expressway.
[0117] The predicted values of each component are denormalized, and the processed predicted values are added and reconstructed to obtain the final prediction result.
[0118] The Max-Min denormalization process is specifically to restore the normalized predicted value to the numerical range of the original data so that it has the same dimension and practical meaning as the original traffic flow data.
[0119] Max-Min denormalization is expressed as:
[0120] ;
[0121] Among them, y represents the predicted value after denormalization, y' represents the predicted value after normalization, and x min and x max Represent the minimum and maximum values in the original IMF components respectively.
[0122] Additive reconstruction means adding the denormalized predicted values of the five IMF components at the same time point predicted by the model to obtain a complete prediction result.
[0123] This embodiment uses the VMD algorithm to smooth traffic flow time series data with nonlinearity and a lot of noise to obtain components with different bandwidths, which can effectively avoid modal aliasing and has good adaptability and decomposition effect. The present invention selects the SVR model as the prediction model, which has the characteristics of less parameter settings, fast model calculation speed and high prediction accuracy.
[0124] Embodiment 2
[0125] The method for predicting short-term highway traffic flow based on support vector regression provided in this embodiment is different from that in the first embodiment in that:
[0126] This embodiment selects traffic flow data measured by a traffic checkpoint device on a certain highway section for model training and testing. The data covers the traffic flow of the highway section for five consecutive days from March 1, 2023 to March 5, 2023, and is organized into a data set after data cleaning. The data set collects data every 5 minutes, totaling 1440 data. Among them, the first 60% of the data is selected as the training set data, the middle 20% is the test set data, and the last 20% is the validation set data. The final traffic flow prediction model (i.e., VMD-SMA-SVR model) is obtained by the method of Example 1.
[0127] This embodiment compares the proposed VMD-SMA-SVR model with a VMD-SVR model without hyperparameter optimization, an SMA-SVR model without decomposition, a CEEMDAN-SMA-SVR model using the Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN), a VMD-SMA-LSTM model using the Long Short-Term Memory (LSTM), a VMD-SMA-RNN using the Recurrent Neural Network (RNN), and a VMD-SSA-SVR model using the Sparrow Search Algorithm (SSA).
[0128] Table 1 below shows the various performance indicators of different models in traffic flow prediction. It is obvious from the table that the proposed VMD-SMA-SVR model shows the best performance in all indicators such as MAE, RMSE and R2, showing its superiority in prediction accuracy and stability. This also shows that the accuracy of the model can be significantly improved by applying the VMD algorithm to decompose and predict traffic flow data separately. In addition, the applicability of VMD to traffic flow data is also better than that of the CEEMDAN decomposition algorithm. In addition, compared with other optimization algorithms, the SMA method has a higher applicability in hyperparameter optimization.
[0129] Table 1 Comparison of evaluation indicators of different models
[0130]
[0131] Figure 3 The comparison between the predicted values of the VMD-SMA-SVR model and the true values of the data is clearly shown. Figure 3It can be intuitively found that the predicted value and the true value obtained by the model of this embodiment show a good fit. This degree of fit shows that the model of this embodiment has high accuracy and reliability in predicting short-term traffic flow on highways. It reflects that the model can more accurately capture the complex patterns and changing trends in traffic flow data, thereby providing strong support for traffic management departments to carry out reasonable traffic planning, resource allocation and improve road traffic efficiency. At the same time, this also further verifies the effectiveness and superiority of the highway short-term traffic flow prediction method based on VMD-SMA-SVR proposed in this embodiment.
[0132] By comparing with other models, the highway short-term traffic flow prediction method based on the VMD-SMA-SVR model proposed in this embodiment has good prediction accuracy, fewer model parameters, and limited computing resources. Therefore, it can be well applied in actual traffic prediction.
[0133] Embodiment 3
[0134] This embodiment provides a device for predicting short-term traffic flow on a highway based on support vector regression, which is used to execute a method for predicting short-term traffic flow on a highway based on support vector regression in embodiment 1. The prediction device includes a processor, wherein the processor is provided with:
[0135] An acquisition module is used to acquire historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set;
[0136] A decomposition module is used to decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands;
[0137] A processing module is used to perform linear normalization processing on modal components of different frequency bands corresponding to the training set, and respectively construct corresponding support vector regression models for the processed modal components of different frequency bands to obtain multiple support vector regression models;
[0138] The training module is used to optimize and train multiple support vector regression models using the slime mold optimization algorithm to obtain multiple optimal traffic flow prediction models;
[0139] The prediction module is used to input the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtain the corresponding prediction values of the modal components of different frequency bands;
[0140] The reconstruction module is used to perform denormalization processing on the predicted values corresponding to the modal components of different frequency bands, and to add and reconstruct the processed predicted values to obtain the final prediction result of the traffic section flow of the highway.
[0141] The processor described in this embodiment may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present application.
[0142] The processor described in this embodiment is connected to a memory for storing data or instructions. The memory may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory may be inside or outside the data processing device. In a specific embodiment, the memory is a non-volatile memory. In a specific embodiment, the memory includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0143] The memory can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor. The processor reads and executes the computer program instructions stored in the memory.
[0144] The processor described in this embodiment is connected to a transmission device for transmitting data with an external device. The transmission device can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0145] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for predicting short-term traffic flow on highways based on support vector regression, characterized in that: include: S1. Obtain historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set; S2. Decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands; S3. Performing linear normalization processing on modal components of different frequency bands corresponding to the training set, and constructing corresponding support vector regression models for the processed modal components of different frequency bands, respectively, to obtain multiple support vector regression models; S4. The slime mold optimization algorithm is used to optimize and train multiple support vector regression models to obtain multiple optimal traffic flow prediction models; S5. Inputting the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtaining the corresponding prediction values of the modal components of different frequency bands; S6. Perform denormalization on the prediction values corresponding to the modal components of different frequency bands, and add and reconstruct the processed prediction values to obtain the final prediction result of the highway traffic section flow.
2. A method for predicting short-term highway traffic flow based on support vector regression according to claim 1, characterized in that: Before step S5, the following steps are also included: The evaluation index is used to evaluate the multiple traffic flow prediction models to determine whether the evaluation results meet the requirements. If not, step S3 is re-executed; if yes, the final multiple traffic flow prediction models are obtained.
3. The method for predicting short-term highway traffic flow based on support vector regression according to claim 1 is characterized in that: After decomposing the processed historical data based on the variational modal decomposition algorithm in step S2, the method further includes: arranging the decomposed modal components in sequence from high frequency to low frequency.
4. The method for predicting short-term highway traffic flow based on support vector regression according to claim 1 is characterized in that: The step S4 is specifically as follows: The slime mold optimization algorithm is used to optimize the hyperparameter penalty coefficient, kernel function parameters, and insensitive loss function parameters in each support vector regression model. The mean square error between the predicted value and the true value of the support vector regression model training set is used as the objective function of the slime mold optimization algorithm. The objective function is brought into the training set to train the support vector regression model. The slime mold optimization algorithm is used to find the optimal hyperparameter combination. After multiple iterative calculations, the optimal multiple traffic flow prediction models are obtained.
5. The method for predicting short-term highway traffic flow based on support vector regression according to claim 2 is characterized in that: The evaluation indicators include mean absolute error, root mean square error, and determination coefficient.
6. A method for predicting short-term highway traffic flow based on support vector regression according to claim 5, characterized in that: The evaluation results meet the requirement that the smaller the mean absolute error and the root mean square error, the closer the determination coefficient is to 1.
7. The method for predicting short-term highway traffic flow based on support vector regression according to claim 5 is characterized in that: The mean absolute error is calculated as: ; Where MAE stands for mean absolute error; y i represents the true value; Represents the predicted value; n represents the number of samples in the test set; i represents the subscript of the test set.
8. The method for predicting short-term highway traffic flow based on support vector regression according to claim 7 is characterized in that: The root mean square error is calculated as: ; Here, RMSE stands for root mean square error.
9. A method for predicting short-term highway traffic flow based on support vector regression according to claim 8, characterized in that: The determination coefficient is calculated as follows: ; in, represents the coefficient of determination; represents the true data sample mean.
10. A device for predicting short-term traffic flow on a highway based on support vector regression, used to execute a method for predicting short-term traffic flow on a highway based on support vector regression as claimed in any one of claims 1 to 9, the prediction device comprising a processor, characterized in that: The processor is provided with: An acquisition module is used to acquire historical data of traffic flow of a highway section at a preset time interval, process the acquired historical data, and divide the processed historical data into a training set and a test set; A decomposition module is used to decompose the processed historical data based on the variational mode decomposition algorithm to obtain modal components in different frequency bands; A processing module is used to perform linear normalization processing on modal components of different frequency bands corresponding to the training set, and respectively construct corresponding support vector regression models for the processed modal components of different frequency bands to obtain multiple support vector regression models; The training module is used to optimize and train multiple support vector regression models using the slime mold optimization algorithm to obtain multiple optimal traffic flow prediction models; The prediction module is used to input the modal components of different frequency bands corresponding to the test set into the corresponding traffic flow prediction model for prediction, and obtain the corresponding prediction values of the modal components of different frequency bands; The reconstruction module is used to perform denormalization processing on the predicted values corresponding to the modal components of different frequency bands, and to add and reconstruct the processed predicted values to obtain the final prediction result of the traffic section flow of the highway.
Citation Information
Patent Citations
Traffic flow prediction method based on KNN-SVR
CN114898560A
Electric vehicle short-term load prediction method and device based on similar weeks and deep learning model, and storage medium
CN118245739A