Vehicle speed prediction method and device, equipment and storage medium
The generalized regression neural network and Markov model are optimized through the crayfish optimization algorithm, and the problem of low accuracy of a single vehicle speed prediction method is solved, more accurate vehicle speed prediction is achieved, and vehicle fuel economy and vehicle performance are improved.
Patent Information
- Application Number
- CN202510291904.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-29
AI Technical Summary
The prediction accuracy of the existing single vehicle speed prediction method is low and cannot meet the precise adjustment requirements of vehicle energy management strategies.
The crayfish optimization algorithm is used to optimize the generalized regression neural network, combined with the Markov model, and the speed prediction accuracy is improved by training the initial vehicle speed prediction model and error model.
It effectively improves the accuracy of vehicle speed prediction, provides more accurate vehicle speed reference data, and improves vehicle fuel economy and vehicle performance.
Smart Images

Figure CN120387357A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicles, and particularly to a vehicle speed prediction method, apparatus, device, and storage medium. Background Art
[0002] Vehicle speed, as a key indicator reflecting the driving state of a vehicle under different working conditions, is of great significance in the energy distribution link of the energy management strategy (EMS). By pre-grasping the vehicle speed information, the EMS can adjust the distribution strategy accordingly, optimize the vehicle performance, and thus effectively improve the fuel economy of the vehicle. Therefore, it is particularly necessary and far-reaching to conduct in-depth research on vehicle speed prediction algorithms and strive to improve the prediction accuracy and practical application performance of the vehicle speed prediction module in the EMS. Existing technical solutions: Current vehicle speed prediction mainly relies on single methods, including the backpropagation neural network (BPNN) speed prediction model, the long short-term memory network (LSTM) speed prediction model, and the radial basis neural network (RBF) speed prediction model, etc. However, due to the single method, how to solve the problem of low prediction accuracy of the existing single vehicle speed prediction method has become an urgent problem to be solved. Summary of the Invention
[0003] The main purpose of the present application is to provide a vehicle speed prediction method, apparatus, device, and storage medium, aiming to solve the technical problem of low prediction accuracy of the existing single vehicle speed prediction method.
[0004] To achieve the above object, the present application proposes a vehicle speed prediction method, and the vehicle speed prediction method includes:
[0005] Training an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model;
[0006] Training an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model;
[0007] Inputting the vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; <A
[0008] Inputting the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error;
[0009] Calculating the vehicle speed according to the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed.
[0010] In one embodiment, the step of training an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model includes:
[0011] Obtain a predicted vehicle speed sequence and a historical vehicle speed sequence based on the vehicle speed training set and the target vehicle speed prediction model;
[0012] Divide the state intervals according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain target state intervals;
[0013] Calculate according to the number of state transitions and the number of state divisions corresponding to the target state intervals to obtain a state transition matrix;
[0014] Train the initial vehicle speed error model based on the target state intervals and the state transition matrix to obtain a target vehicle speed error model.
[0015] In one embodiment, the step of training the initial vehicle speed error model based on the target state intervals and the state transition matrix to obtain a target vehicle speed error model includes:
[0016] Calculate and determine target column data and target row-column data according to the state transition matrix;
[0017] Obtain a target statistic according to the target column data and the target row-column data;
[0018] Compare the target statistic with a statistic critical value to obtain a Mahalanobis test result;
[0019] When the Mahalanobis test result is a pass result, train the initial vehicle speed error model based on the target state intervals and the state transition matrix to obtain a target vehicle speed error model.
[0020] In one embodiment, the step of dividing the state intervals according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain target state intervals includes:
[0021] Calculate according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain a relative error value;
[0022] Normalize the relative error value to obtain a relative residual sequence;
[0023] Divide the relative residual sequence based on a preset segmentation rate to obtain target state intervals.
[0024] In one embodiment, the step of training the initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model includes:
[0025] Optimize the model width value of the initial vehicle speed prediction model based on the model optimization strategy to obtain a target width value;
[0026] An optimized vehicle speed prediction model is obtained based on the target width value and the initial vehicle speed prediction model;
[0027] The optimized vehicle speed prediction model is trained based on historical vehicle speed data to obtain a target vehicle speed prediction model.
[0028] In one embodiment, the step of optimizing the model width value of the initial vehicle speed prediction model based on the model optimization strategy to obtain the target width value includes:
[0029] Calculate the fitness of the model width value according to the mean square error objective function to obtain the current fitness;
[0030] Optimize the model width value based on the model optimization strategy and calculate the fitness to obtain the optimized fitness;
[0031] Compare the current fitness with the optimized fitness, and perform iterative optimization according to the comparison result to obtain the current iteration number;
[0032] When the current iteration number is not less than the iteration number threshold, the target width value is obtained.
[0033] In one embodiment, before the step of training the initial vehicle speed prediction model based on the model optimization strategy and historical vehicle speed data to obtain the target vehicle speed prediction model, it includes:
[0034] Collect data for the vehicle to be predicted based on a preset vehicle speed collection strategy to obtain the initial collected vehicle speed;
[0035] Perform filtering processing on the initial collected vehicle speed based on a filtering and fitting strategy to obtain historical vehicle speed data.
[0036] In addition, to achieve the above object, the present application also proposes a vehicle speed prediction device, and the vehicle speed prediction device includes:
[0037] A training module, configured to train an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model;
[0038] The training module is further configured to train an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model;
[0039] A prediction module, configured to input vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data;
[0040] The prediction module is further configured to input the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error;
[0041] The prediction module is further configured to calculate a vehicle speed based on the initial vehicle speed data and the vehicle speed prediction error, so as to obtain a target predicted vehicle speed.
[0042] In addition, to achieve the above object, the present application further provides a vehicle speed prediction device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program is configured to implement the steps of the vehicle speed prediction method as described above.
[0043] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the vehicle speed prediction method as described above are implemented.
[0044] In addition, to achieve the above object, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the vehicle speed prediction method as described above are implemented.
[0045] In the present application, an initial vehicle speed prediction model is trained based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; an initial vehicle speed error model is trained based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; the to-be-predicted vehicle speed data is input into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; the initial vehicle speed data is input into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; a vehicle speed is calculated based on the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed. By combining a generalized regression neural network and a Markov model, optimizing the generalized regression neural network using a crayfish optimization algorithm, and predicting the speed error with the Markov model to adjust the vehicle speed, the prediction accuracy of the vehicle speed is effectively improved. Description of the Drawings
[0046] The drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0047] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0048] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the vehicle speed prediction method of the present application;
[0049] Figure 2Schematic diagram of the Markov speed prediction process of the COA-GRNN neural network provided in the first embodiment of the vehicle speed prediction method of the present application;
[0050] Figure 3 Schematic diagram of the GRNN hierarchical structure provided in the first embodiment of the vehicle speed prediction method of the present application;
[0051] Figure 4 Schematic diagram of the process provided in the second embodiment of the vehicle speed prediction method of the present application;
[0052] Figure 5 Schematic diagram of the module structure of the vehicle speed prediction device in the embodiment of the present application;
[0053] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the vehicle speed prediction method in the embodiment of the present application.
[0054] The implementation, functional characteristics and advantages of the object of the present application will be further described in conjunction with the embodiments with reference to the accompanying drawings. Detailed implementation manners
[0055] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0056] For a better understanding of the technical solutions of the present application, the following will be described in detail in conjunction with the drawings of the specification and specific implementation manners.
[0057] The main solution of the embodiment of the present application is: training an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; training an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; inputting the vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; inputting the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; and calculating the vehicle speed according to the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed.
[0058] Vehicle speed, as a key indicator reflecting the driving states of a vehicle under different working conditions, is of great significance in the energy distribution link of an energy management strategy (EMS). By pre-grasping the vehicle speed information, the EMS can adjust the distribution strategy accordingly, optimize the vehicle performance, and thus effectively improve the fuel economy of the vehicle. Therefore, it is particularly necessary and far-reaching to deeply carry out research on vehicle speed prediction algorithms and strive to improve the prediction accuracy and practical application performance of the vehicle speed prediction module in the EMS. Existing technical solutions: Current vehicle speed prediction mainly relies on single methods, including backpropagation neural network (BPNN) speed prediction models, long short-term memory network (LSTM) speed prediction models, and radial basis function neural network (RBF) speed prediction models, etc. However, due to the single method, how to solve the problem of low prediction accuracy of the existing single vehicle speed prediction method has become an urgent problem to be solved.
[0059] In this application, an initial vehicle speed prediction model is trained based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; an initial vehicle speed error model is trained based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; the vehicle speed data to be predicted is input into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; the initial vehicle speed data is input into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; vehicle speed calculation is performed according to the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed. By combining a generalized regression neural network with a Markov model, the generalized regression neural network is optimized using a crayfish optimization algorithm, and the speed error is predicted by the Markov model to adjust the vehicle speed, effectively improving the prediction accuracy of the vehicle speed.
[0060] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a vehicle speed prediction device capable of implementing the above functions. Hereinafter, taking the vehicle speed prediction device as the execution subject as an example, this embodiment and the following embodiments will be described.
[0061] Based on this, the embodiment of this application provides a vehicle speed prediction method, referring to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the vehicle speed prediction method of this application.
[0062] In this embodiment, the vehicle speed prediction method includes steps S10 to S50:
[0063] Step S10, training an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model;
[0064] It should be noted that in this embodiment, the Generalized Regression Neural Network (GRNN) is first introduced. Compared with other neural networks, it has many advantages. Since the width of the Gaussian radial basis function has a great influence on the GRNN, the Crayfish Optimization Algorithm (COA) is used to optimize the width of the Gaussian radial basis function, thereby improving the performance of the GRNN. Secondly, a Markov combined prediction model based on COA-GRNN is established. First, the state interval is divided according to the relative error between the prediction sequence and the measured sequence, then the transition probability matrix is calculated, and whether the sequence conforms to the Markov property is judged through the Markov test. Finally, the prediction is carried out according to the relevant formula, so as to integrate the advantages of the two, aiming to improve the vehicle speed prediction accuracy and provide more accurate vehicle speed reference data for application scenarios such as vehicle energy management.
[0065] It can be understood that the model optimization strategy refers to the strategy of optimizing the width of the Generalized Regression Neural Network based on the Crayfish Optimization Algorithm. The historical vehicle speed data refers to the speed at which the vehicle has traveled in the past period of time. The initial vehicle speed prediction model refers to the Generalized Regression Neural Network without width optimization. The target vehicle speed prediction model refers to the Generalized Regression Neural Network with optimized width and training.
[0066] In the specific implementation, the Crayfish algorithm is used to optimize the width of the Gaussian radial basis function of the Generalized Regression Neural Network, and then the optimal width value of the Gaussian radial basis function is assigned to the Generalized Regression Neural Network to obtain the optimized Generalized Regression Neural Network. Then, based on the historical vehicle speed data, the optimized Generalized Regression Neural Network is trained to obtain the target vehicle speed prediction model.
[0067] It should be noted that the Markov speed prediction flowchart of the COA-GRNN neural network in this embodiment is as Figure 2As shown in the figure, its structure mainly consists of three parts, namely: the historical vehicle speed data input module, the COA-GRNN prediction model module, and the Markov combined prediction model module based on COA-GRNN. The historical vehicle speed data input module mainly conducts a one-month vehicle information experiment on a certain commercial vehicle and filters the collected data to reduce abnormal data. The COA-GRNN module mainly introduces the advantages of the GRNN neural network compared with other neural networks. Since the width of the Gaussian radial basis function has a great influence on GRNN, COA is used to optimize GRNN, thereby improving the prediction accuracy of GRNN. For the Markov combined prediction model based on COA-GRNN, first, the historical data is used to train the prediction model. Finally, the verification working condition is adopted. By inputting the vehicle speed data, the initial predicted vehicle speed is first predicted by COA-GRNN, and then the vehicle speed error is predicted by Markov. Thus, by combining the initial predicted vehicle speed, the final predicted vehicle speed is obtained, further improving the vehicle prediction accuracy.
[0068] In a feasible implementation manner, step S10 may include steps A11 to A13:
[0069] Step A11, optimizing the model width value of the initial vehicle speed prediction model based on the model optimization strategy to obtain the target width value;
[0070] It should be noted that the target width value refers to the optimal width value of the Gaussian radial basis function.
[0071] In specific implementation, this embodiment uses the crayfish optimization algorithm (COA) for optimization. The main optimization parameter is the width σ value of the Gaussian radial basis function of GRNN. Among them, the fitness function is designed according to the mean square error (MSE), that is, the fitness function selects the MSE error after training. And the smaller the MSE error, the greater the coincidence degree between the predicted data and the original data. The final optimized output is the optimal width of the Gaussian radial basis function.
[0072] In a feasible implementation manner, step A11 may include steps B11 to B14:
[0073] Step B11, calculating the fitness of the model width value according to the mean square error objective function to obtain the current fitness;
[0074] It can be understood that the mean square error objective function refers to the objective function established based on the mean square error, and the current fitness refers to the fitness corresponding to the width of the initial Gaussian radial basis function.
[0075] In specific implementation, the fitness corresponding to the width value of the Gaussian radial basis function is calculated through the objective function established based on the mean square error, and the fitness corresponding to the width of the current Gaussian radial basis function is obtained, that is, the current fitness.
[0076] Step B12: Optimize the model width value based on the model optimization strategy and calculate the fitness to obtain the optimized fitness.
[0077] It can be understood that the optimized fitness refers to the fitness after optimization by the crayfish optimization algorithm.
[0078] In specific implementation, the width value of the Gaussian radial basis function is optimized through the crayfish optimization algorithm, and the fitness corresponding to the optimized width value of the Gaussian radial basis function is calculated, that is, the optimized fitness.
[0079] Step B13: Compare the current fitness with the optimized fitness, and perform iterative optimization according to the comparison result to obtain the current iteration number.
[0080] It can be understood that the current iteration number refers to the number of times of iterative optimization performed by the current crayfish algorithm.
[0081] In specific implementation, the fitness corresponding to the width of the initial Gaussian radial basis function is compared with the fitness after optimization by the crayfish optimization algorithm, and it includes the width of the Gaussian radial basis function corresponding to the best fitness, and the number of times of iterative optimization performed by the current crayfish algorithm is recorded, that is, the current iteration number.
[0082] Step B14: When the current iteration number is not less than the iteration number threshold, obtain the target width value.
[0083] It can be understood that the iteration number threshold refers to the critical value of the number of times used to judge whether the optimal width value is obtained.
[0084] In specific implementation, the number of times of iterative optimization performed by the current crayfish algorithm is compared with the critical value of the number of times used to judge whether the optimal width value is obtained, and when the number of times of iterative optimization performed by the current crayfish algorithm is not less than the critical value of the number of times used to judge whether the optimal width value is obtained, it indicates that the best width value of the Gaussian radial basis function has been obtained, that is, the target width value.
[0085] Step A12: Obtain an optimized vehicle speed prediction model based on the target width value and the initial vehicle speed prediction model.
[0086] It can be understood that the optimized vehicle speed prediction model refers to the generalized regression neural network after optimizing the width value of the Gaussian radial basis function. Assign the optimal width value of the Gaussian radial basis function to the generalized regression neural network, that is, optimize the width value of the Gaussian radial basis function of the generalized regression neural network to obtain the optimized vehicle speed prediction model.
[0087] Step A13: training the optimized vehicle speed prediction model based on historical vehicle speed data to obtain a target vehicle speed prediction model.
[0088] In the specific implementation, in order to improve the accuracy of the generalized regression neural network in predicting vehicle speed, the generalized regression neural network with the optimized width value of the Gaussian radial basis function is trained based on historical vehicle speed data to obtain the target vehicle speed prediction model.
[0089] It should be noted that, in this embodiment, for the COA-GRNN prediction model module, GRNN is a type of radial basis neural network. GRNN has strong nonlinear mapping capabilities and flexible network structure as well as high fault tolerance and robustness, and is suitable for solving nonlinear problems. At the same time, GRNN has stronger advantages than RBF in terms of approximation ability and learning speed. Compared with GRNN, BP neural network has a slow learning rate and is prone to falling into local optimality. At the same time, LSTM neural network has a more complex structure than GRNN, and its training algorithm involves a nonlinear back propagation mechanism between every two layers. Among them, GRNN consists of four layers, namely input layer, pattern layer, summation layer and output layer, as shown in FIG. Figure 3 As shown. No weight matrix calculation is involved between layers; all weights are 1. The number of hidden layer nodes must be the same as the number of training samples. In this embodiment, the number of input layer nodes of the GRNN is equal to N, the number of historical vehicle speeds, and the number of output layer nodes is equal to P, the number of future vehicle speeds.
[0090] The transfer function (or activation function) used by the GRNN pattern layer nodes is also a radial basis function, generally a Gaussian radial basis function. The output of the j-th hidden layer node after the transfer function calculation is φ j :
[0091] c j is the center of the Gaussian radial basis function in the jth hidden layer node and is the same as the jth training sample. The summation layer nodes are divided into two categories. The first category is the denominator summation unit, which sums all φ j Perform arithmetic summation, and the connection weight between each hidden layer neuron and the summation layer neuron is 1, specifically:
[0092]
[0093] The second type is the molecular summation unit, which combines all φ j Perform weighted summation, as shown in Equation 3, the weight between the jth hidden layer node and the kth molecular summation unit is y jk The kth signal value in the jth output sample and the final kth output signal are calculated according to the following formula.
[0094]
[0095] y k = s j / s d #(4)
[0096] As can be analyzed from the above introduction, once the number of nodes N in the input layer, the number of nodes P in the output layer, and the training sample matrix of the GRNN are determined, the entire GRNN is immediately determined, without the need for complex calculations such as center selection and inverse of the weight matrix as in RBF. Therefore, in terms of the neural network learning principle, the computational efficiency of GRNN is higher than that of RBF. And it can be analyzed that the training samples are historical vehicle speed data, and the factors affecting GRNN are only the number of nodes N in the input layer, the number of nodes P in the output layer, and the width σ of the Gaussian radial basis function. Some research has proved that it is better to set the number of output nodes P to 5 and the number of historical nodes N to 10. For the width σ of the Gaussian radial basis function, in this embodiment, the crayfish optimization algorithm (COA) is used for optimization, and the optimization parameter is mainly the width σ value of the Gaussian radial basis function of GRNN, and the fitness function is designed as:
[0097] finteness = MSE[predict(train)] + MSE[predict(test)]#(5)
[0098] Among them, the fitness function selects the MSE error after training. The smaller the MSE error, the greater the coincidence degree between the predicted data and the original data. The finally optimized output is the optimal width of the Gaussian radial basis function. Finally, by using the historical vehicle speed data, the COA-GRNN model can be trained, that is, COA is used to optimize the width σ value of the Gaussian radial basis function of GRNN. For each σ, the MSE error after training can be obtained. The smaller the MSE error, the higher the coincidence degree between the predicted data and the original data, so that the optimal σ can be obtained.
[0099] In a feasible implementation manner, before step S10, steps C11 to C12 may further be included:
[0100] Step C11, collecting data for the vehicle to be predicted based on a preset vehicle speed collection strategy to obtain an initial collected vehicle speed;
[0101] It can be understood that the preset vehicle speed collection strategy refers to a strategy for collecting vehicle speed data set in advance, such as the autonomous driving method, and the initial collected vehicle speed refers to the vehicle speed data collected by the autonomous driving method.
[0102] In specific implementation, the driving speed of the vehicle to be predicted is collected through the preset strategy for collecting vehicle speed data, and then the vehicle speed data collected by the autonomous driving method, that is, the initial collected vehicle speed, is obtained.
[0103] Step C12: filtering the initially collected vehicle speed based on a filtering fitting strategy to obtain historical vehicle speed data.
[0104] It is understandable that the filter fitting strategy refers to a symmetric SG filtering method (Symmetric Savitzky-Golay filtering method).
[0105] In a specific implementation, the vehicle speed data collected by the autonomous driving method is filtered based on the symmetrical SG filtering method, that is, the noise data is filtered to obtain the historical vehicle speed data.
[0106] It should be noted that for the historical vehicle speed data input module, the first task is to collect vehicle speed. Currently, the commonly used methods for collecting vehicle speed are mainly vehicle tracking method, average traffic flow statistics method and autonomous driving method. The vehicle tracking method mainly requires the driver to closely track the target vehicle throughout the entire process, which places high demands on the driver's driving level. At the same time, factors such as complex and changeable traffic conditions and road conditions will have a significant impact on the vehicle's driving state. At the same time, the average traffic flow statistics method is limited to the selection of a specific road coverage range. The vehicle must travel within a pre-determined route and time interval, resulting in the need for comprehensive consideration of the planning of the test route to ensure the validity and representativeness of the data. The autonomous driving method is significantly random and does not need to follow fixed time nodes and route planning. The data collected by this method can fully and multi-dimensionally display the local traffic characteristics because it faithfully captures the driving conditions and road characteristics information in real scenarios. This embodiment adopts the autonomous driving method.
[0107] Due to equipment factors, there will be deviations between the collected values and the true values of the collected data, that is, noise data. If these noises are not processed, they will interfere with the accuracy of subsequent statistical analysis, so it is necessary to perform filtering operations on them. This embodiment implements filtering processing on the data through a symmetric SG filtering method. The SG filtering fitting method is essentially a weighted average algorithm for a sliding window of smoothed time series data. The determination of its weight coefficient depends on the number of least squares fittings of a given high-order polynomial within a specific filtering window. The specific formula is as follows:
[0108]
[0109] Where Y refers to the original time series; is the fitted value of time series data; C i is the coefficient used to filter the i-th time series data value; N is the number of convolutions; coefficient j is the coefficient of the original time series dataset; and m is the filter window size. Through the above operations, we can obtain the historical speed data input module, preparing for subsequent modules.
[0110] Step S20: Train the initial vehicle speed error model based on the vehicle speed training set and the target vehicle speed prediction model to obtain the target vehicle speed error model;
[0111] It can be understood that the vehicle speed training set refers to the set of vehicle speed data used for model training, the initial vehicle speed error model refers to the untrained Markov error prediction model, and the target vehicle speed error model refers to the trained Markov error prediction model.
[0112] In specific implementation, input the set of vehicle speed data for model training into the target vehicle speed prediction model for vehicle speed prediction to obtain the predicted vehicle speed data, and combine the actual vehicle speed data in the set of vehicle speed data for model training to train the untrained Markov error prediction model to obtain the trained Markov error prediction model, that is, the target vehicle speed error model.
[0113] Step S30: Input the vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain the initial vehicle speed data;
[0114] It can be understood that the vehicle speed data to be predicted refers to the vehicle driving speed data to be predicted, and the initial vehicle speed data refers to the vehicle speed predicted by the COA-GRNN neural network.
[0115] In specific implementation, input the vehicle driving speed data to be predicted into the generalized regression neural network with optimized width and trained (COA-GRNN neural network) for vehicle speed prediction to obtain the initial vehicle speed data. For example, input the vehicle driving speed within 180s into the COA-GRNN neural network for vehicle speed prediction, and then obtain the vehicle driving speed from 181s to 185s.
[0116] Step S40: Input the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain the vehicle speed prediction error;
[0117] It can be understood that the vehicle speed prediction error refers to the error between the predicted vehicle speed and the actual vehicle speed.
[0118] In specific implementation, input the vehicle speed predicted by the COA-GRNN neural network into the Markov error prediction model for error prediction, that is, predict the error between the vehicle speed predicted by the COA-GRNN neural network and the actual vehicle speed, and then obtain the vehicle speed prediction error.
[0119] Step S50: Calculate the vehicle speed based on the initial vehicle speed data and the vehicle speed prediction error to obtain the target predicted vehicle speed.
[0120] In a specific implementation, the target predicted vehicle speed refers to the finally predicted vehicle driving speed. In this embodiment, the vehicle speed is calculated based on the vehicle speed predicted by the COA-GRNN neural network and the vehicle speed error predicted by the Markov error prediction model, and then the accurate predicted vehicle speed, that is, the target predicted vehicle speed, is obtained.
[0121] It should be noted that there are many limitations in the existing speed prediction using a single method. For example, BPNN training is time-consuming and prone to falling into local minima, NARNN and LSTM backpropagation training takes a long time, and the training speed of RBF is also not as fast as GRNN. In this embodiment, a method combining the COA-GRNN neural network and the Markov model is adopted. The COA is used to optimize the GRNN to provide prediction accuracy, so as to obtain the predicted speed using the COA-GRNN. The speed can also be adjusted by predicting the speed error using the Markov model, effectively improving the speed prediction accuracy. This provides strong support for the subsequent formulation of EMS, and further helps to improve the overall performance of the vehicle, making up for the deficiencies of single-method prediction and having significant advantages.
[0122] In this embodiment, the initial vehicle speed prediction model is trained based on the model optimization strategy and historical vehicle speed data to obtain the target vehicle speed prediction model; the initial vehicle speed error model is trained based on the vehicle speed training set and the target vehicle speed prediction model to obtain the target vehicle speed error model; the vehicle speed data to be predicted is input into the target vehicle speed prediction model for vehicle speed prediction to obtain the initial vehicle speed data; the initial vehicle speed data is input into the target vehicle speed error model for error prediction to obtain the vehicle speed prediction error; the vehicle speed is calculated based on the initial vehicle speed data and the vehicle speed prediction error to obtain the target predicted vehicle speed. By combining the generalized regression neural network and the Markov model, the generalized regression neural network is optimized using the crayfish optimization algorithm, and the vehicle speed is adjusted by predicting the speed error using the Markov model, effectively improving the prediction accuracy of the vehicle speed.
[0123] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 4 , in step S20 of the vehicle speed prediction method, steps S21 to S24 are further included:
[0124] Step S21, obtaining a predicted vehicle speed sequence and a historical vehicle speed sequence according to the vehicle speed training set and the target vehicle speed prediction model;
[0125] It can be understood that the predicted vehicle speed sequence refers to the prediction result of the COA-GRNN prediction model (neural network), and the historical vehicle speed sequence refers to the actual vehicle speed sequence.
[0126] In specific implementation, the vehicle speed data set for model training is input into the COA-GRNN prediction model for vehicle speed prediction, and then the prediction result of the COA-GRNN prediction model, that is, the predicted vehicle speed sequence, is obtained. And the actual vehicle speed sequence corresponding to the prediction result of the COA-GRNN prediction model, that is, the historical vehicle speed sequence, is determined according to the vehicle speed data set for model training.
[0127] Step S22, divide the state intervals according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain the target state intervals;
[0128] It can be understood that the target state intervals refer to multiple divided state intervals.
[0129] In specific implementation, calculate the relative error value based on the prediction result of the COA-GRNN prediction model and the actual vehicle speed sequence, then map the relative error value to the range of [0, 1], and then divide the state intervals to obtain multiple state intervals, that is, the target state intervals.
[0130] In a feasible implementation manner, step S22 may include steps D11 to D13:
[0131] Step D11, calculate according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain the relative error value;
[0132] It can be understood that the relative error value is used to measure the difference degree between the predicted value and the actual value, and it provides the error ratio relative to the actual value.
[0133] In specific implementation, calculate the ratio of the difference between the actual vehicle speed sequence and the prediction result of the COA-GRNN prediction model to the actual vehicle speed sequence to obtain the relative error value.
[0134] Step D12, perform normalization processing on the relative error value to obtain the relative residual sequence;
[0135] It can be understood that the relative residual sequence refers to the normalized relative error value.
[0136] In specific implementation, map the relative error value to the range of [0, 1], that is, perform normalization processing on the relative error value, and then obtain the relative residual sequence.
[0137] Step D13, divide the relative residual sequence into state intervals based on a preset segmentation ratio to obtain the target state intervals.
[0138] It can be understood that the preset segmentation ratio refers to the preset golden ratio.
[0139] In a specific implementation, the present embodiment uses the golden ratio to divide the relative residual sequence into state intervals, that is, the relative residual sequence is divided into multiple intervals, and then the multiple state intervals are summarized to obtain the target state interval.
[0140] Step S23: Calculate according to the number of state transitions and the number of state divisions corresponding to the target state interval to obtain a state transition matrix.
[0141] It can be understood that the number of state transitions refers to the number of times that state E i transfers to state E j after K times. The number of state divisions refers to the number corresponding to the divided state intervals. The state transition matrix refers to the state transition probability matrix, and the state transition probability matrix is used to describe the probability that the system transfers from one state to another state.
[0142] In a specific implementation, according to the number of times that state E i transfers to state E j after K times, combined with the state data corresponding to multiple state intervals, calculate the transition probability matrix, and then obtain the matrix used to describe the probability that the system transfers from one state to another state, that is, the state transition probability matrix.
[0143] Step S24: Train the initial vehicle speed error model based on the target state interval and the state transition matrix to obtain the target vehicle speed error model.
[0144] It can be understood that based on the output result of the initial vehicle speed error model, combined with the state transition matrix, calculate the probability of the state interval where it is located, and then select the state interval corresponding to the maximum probability to determine the state interval of the output result. Based on the divided multiple state intervals and the state interval of the output result, determine the final predicted error value to complete the Markov error prediction model and obtain the target vehicle speed error model.
[0145] In a feasible implementation manner, step S24 may include steps E11 to E14:
[0146] Step E11: Calculate according to the state transition matrix to determine the target column data and the target row-column data.
[0147] It can be understood that the target column data refers to the sum of each column in the state transition matrix, and the target row-column data refers to the sum of each row and each column.
[0148] In a specific implementation, sum each column in the state transition matrix to obtain the sum of each column in the state transition matrix, and then sum each row and each column in the state transition matrix to obtain the sum of each row and each column.
[0149] Step E12: Obtain a target statistic based on the target column data and the target row-column data;
[0150] It can be understood that the target statistic refers to the statistic used for the Markov test.
[0151] In a specific implementation, the sum of each calculated column is divided by the total sum of each row and column, that is, the calculation of the statistic is performed, and then the statistic used for the Markov test, that is, the target statistic, is obtained.
[0152] Step E13: Compare the target statistic with a statistic critical value to obtain a Markov test result;
[0153] It can be understood that the statistic critical value refers to the critical value used to determine whether a sequence conforms to the Markov property. The Markov test result includes a test pass result and a test failure result.
[0154] In a specific implementation, the statistic used for the Markov test is compared with the critical value used to determine whether a sequence conforms to the Markov property. When the statistic used for the Markov test is greater than the critical value used to determine whether a sequence conforms to the Markov property, it indicates that the sequence conforms to the Markov property, and the Markov test result is determined to be a test pass result. Otherwise, the Markov test result is determined to be a test failure result.
[0155] Step E14: When the Markov test result is a test pass result, train an initial vehicle speed error model based on the target state interval and the state transition matrix to obtain a target vehicle speed error model.
[0156] It can be understood that when the Markov test result is a test pass result, it indicates that the sequence conforms to the Markov property. Then, the Markov error prediction model is trained through the divided state interval and the state transition probability matrix to obtain a target vehicle speed error model.
[0157] It should be noted that first, the Markov error prediction model is determined. The corresponding prediction sequence X can be obtained according to the COA-GRNN prediction model in S2. 实 and the actual sequence X 预 , and then the relative error value Q is determined, as shown in formula (7).
[0158]
[0159] Since the grading indicators are all positive values, the relative residual sequence Q is assigned to the interval [0, 1], and then further divided, that is, the state interval is divided, as shown in formula (8).
[0160]
[0161] where the mean of the sequence Establish the index grading standard, which is equivalent to determining the state space of the Markov chain. Here, the golden ratio is used to divide the error relative sequence Q into multiple intervals (the intervals can be divided according to the value of S. For example, when S = -1 and 1, the error sequence can be divided into 3 intervals [0, H s=1 , [H s=1 , H s=-1 , [H s=-1 , 1]. The subsequent steps can be analyzed step by step). The formula is as follows:
[0162]
[0163] In the formula, H is the division point, S and the number of levels T can be selected according to the value range of the index Q, D is the golden ratio, and D takes 0.618.
[0164] Secondly, calculate the transition probability matrix. The Markov chain transfers from state E i to state E j after K transfers. The number of transfers
[0165] ; m is the number of divided states. Then the one-step state transition probability matrix is as follows:
[0166]
[0167] Repeatedly use the Chapman-Kolmogorov equation (C-K), and the K-step transition probability matrix is:
[0168] P (k) =(P (1) ) k #(12)
[0169] Markov test: Usually, the Markov chain of a discrete sequence can be tested using the x 2 statistic. The specific processing method is as follows: Let m ij represent the number of times of transferring from state E of X 0 (t) to state E i after one step, and divide the sum of each column of the transition frequency matrix by the sum of each row and column. The obtained value is denoted as p j ′: j ′:
[0170]
[0171] Then the statistic follows the x 2 distribution with degrees of freedom (n - 1) 2 . Given the confidence level α, look up the table to obtain x a 2 ((n - 1) 2 ). If x2 >x a 2 ((n-1) 2 ) is considered that the sequence X 0 (t) conforms to the Markov property (Example: If it is calculated that x 2 , here the confidence level α = 0.05 is usually taken, and x can be calculated through the table a 2 ((n-1) 2 ), compare the magnitudes of these two values), otherwise it is not a Markov chain. From formulas (15 - 17), the state vector after k steps can be obtained, and based on this, the state interval at the k-th step can be judged, so as to obtain the final prediction result.
[0172] P k = P (0) ×P (k) = P (0) ×(P (1) ) k #(15)
[0173]
[0174] In the formula, X (0) (t) is the actual value, Φ (0) (t) is the predicted value, and q is the original state boundary value. That is, according to formula (16), formula (17) can be deduced. Since the COA - GRNN predicted value is known, and q is the boundary value of each interval of the error sequence obtained before, then the three interval ranges of the predicted value at this time can be obtained. Then, according to formula (15), it can be known which interval has the highest probability at the next moment, and usually the middle value is taken as the final result.
[0175] In this embodiment, a predicted vehicle speed sequence and a historical vehicle speed sequence are obtained by training a vehicle speed prediction model according to a vehicle speed training set and the target vehicle speed; the target state interval is obtained by dividing the state interval according to the predicted vehicle speed sequence and the historical vehicle speed sequence; a state transition matrix is obtained by calculating according to the state transition times and the number of state divisions corresponding to the target state interval; the initial vehicle speed error model is trained based on the target state interval and the state transition matrix to obtain the target vehicle speed error model. By the above method, the accuracy of the predicted vehicle speed error is improved, and thus the accuracy of the predicted vehicle speed is improved.
[0176] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the vehicle speed prediction method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0177] The present application also provides a vehicle speed prediction device. Please refer to Figure 5 , the vehicle speed prediction device includes:
[0178] A training module 10, configured to train an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model;
[0179] The training module 10 is further configured to train an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model;
[0180] A prediction module 20, configured to input data of a vehicle speed to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data;
[0181] The prediction module 20 is further configured to input the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error;
[0182] The prediction module 20 is further configured to calculate a vehicle speed according to the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed.
[0183] Optionally, the training module 10 is further configured to:
[0184] Obtain a predicted vehicle speed sequence and a historical vehicle speed sequence according to a vehicle speed training set and the target vehicle speed prediction model;
[0185] Divide state intervals according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain target state intervals;
[0186] Calculate according to the number of state transitions and the number of state divisions corresponding to the target state intervals to obtain a state transition matrix;
[0187] Train an initial vehicle speed error model based on the target state intervals and the state transition matrix to obtain a target vehicle speed error model.
[0188] Optionally, the training module 10 is further configured to:
[0189] Calculate and determine target column data and target row-column data according to a state transition matrix;
[0190] Obtain a target statistic according to the target column data and the target row-column data;
[0191] Compare the target statistic with a statistic critical value to obtain a Mahalanobis test result;
[0192] When the Mahalanobis test result is a passed test result, train an initial vehicle speed error model based on the target state intervals and the state transition matrix to obtain a target vehicle speed error model.
[0193] Optionally, the training module 10 is further configured to:
[0194] Calculate based on the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain a relative error value;
[0195] Normalize the relative error value to obtain a relative residual sequence;
[0196] Divide the relative residual sequence into state intervals based on a preset segmentation rate to obtain target state intervals.
[0197] Optionally, the training module 10 is further configured to:
[0198] Optimize the model width value of the initial vehicle speed prediction model based on a model optimization strategy to obtain a target width value;
[0199] Obtain an optimized vehicle speed prediction model based on the target width value and the initial vehicle speed prediction model;
[0200] Train the optimized vehicle speed prediction model based on historical vehicle speed data to obtain a target vehicle speed prediction model.
[0201] Optionally, the training module 10 is further configured to:
[0202] Calculate the fitness of the model width value according to the mean square error objective function to obtain the current fitness;
[0203] Optimize the model width value based on a model optimization strategy and calculate the fitness to obtain an optimized fitness;
[0204] Compare the current fitness with the optimized fitness and perform iterative optimization according to the comparison result to obtain the current iteration number;
[0205] When the current iteration number is not less than the iteration number threshold, obtain the target width value.
[0206] Optionally, the training module 10 is further configured to:
[0207] Collect data for the vehicle to be predicted based on a preset vehicle speed collection strategy to obtain an initial collected vehicle speed;
[0208] Perform filtering processing on the initial collected vehicle speed based on a filtering fitting strategy to obtain historical vehicle speed data.
[0209] The vehicle speed prediction device provided by this application adopts the vehicle speed prediction method in the above-mentioned embodiment, and can solve the technical problem of low prediction accuracy of the existing single vehicle speed prediction method. Compared with the prior art, the beneficial effects of the vehicle speed prediction device provided by this application are the same as those of the vehicle speed prediction method provided by the above-mentioned embodiment, and other technical features in the vehicle speed prediction device are the same as the features disclosed in the method of the above-mentioned embodiment, which will not be elaborated here.
[0210] This application provides a vehicle speed prediction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the vehicle speed prediction method in the first embodiment above.
[0211] Refer to the following Figure 6 , which shows a schematic structural diagram of a vehicle speed prediction device suitable for implementing the embodiments of this application. The vehicle speed prediction device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The vehicle speed prediction device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of this application.
[0212] As Figure 6As shown, the vehicle speed prediction device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the vehicle speed prediction device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the vehicle speed prediction device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a vehicle speed prediction device having various systems, it should be understood that it is not required to implement or include all the shown systems. More or fewer systems may be alternatively implemented or included.
[0213] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0214] The vehicle speed prediction device provided by the present application adopts the vehicle speed prediction method in the above embodiments, and can solve the technical problem of low prediction accuracy of the existing single vehicle speed prediction method. Compared with the prior art, the beneficial effects of the vehicle speed prediction device provided by the present application are the same as those of the vehicle speed prediction method provided by the above embodiments, and other technical features in the vehicle speed prediction device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated herein.
[0215] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0216] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claimed rights.
[0217] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the vehicle speed prediction method in the above embodiments.
[0218] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0219] The above computer-readable storage medium can be included in the vehicle speed prediction device; it can also exist alone and not be assembled into the vehicle speed prediction device.
[0220] The above computer-readable storage medium carries one or more programs, which, when executed by a vehicle speed prediction device, cause the vehicle speed prediction device to: train an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; train an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; input vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; input the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; and calculate a target predicted vehicle speed based on the initial vehicle speed data and the vehicle speed prediction error.
[0221] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0222] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0223] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0224] The readable storage medium provided by the present application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned vehicle speed prediction method, which can solve the technical problem of low prediction accuracy of the existing single vehicle speed prediction method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the vehicle speed prediction method provided by the above embodiment, and will not be elaborated here.
[0225] The present application also provides a computer program product, including a computer program, and the steps of the vehicle speed prediction method as described above are implemented when the computer program is executed by a processor.
[0226] The computer program product provided by the present application can solve the technical problem of low prediction accuracy of the existing single vehicle speed prediction method. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the vehicle speed prediction method provided by the above embodiment, and will not be elaborated here.
[0227] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A vehicle speed prediction method, characterized in that, The vehicle speed prediction method includes: Training an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; Training an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; Inputting the vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; Inputting the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; Calculating the vehicle speed according to the initial vehicle speed data and the vehicle speed prediction error to obtain a target predicted vehicle speed.
2. The method according to claim 1, wherein The step of training the initial vehicle speed error model based on the vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model includes: Obtaining a predicted vehicle speed sequence and a historical vehicle speed sequence according to the vehicle speed training set and the target vehicle speed prediction model; Dividing the state interval according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain a target state interval; Calculating according to the number of state transitions and the number of state divisions corresponding to the target state interval to obtain a state transition matrix; Training the initial vehicle speed error model based on the target state interval and the state transition matrix to obtain a target vehicle speed error model.
3. The method according to claim 2, wherein The step of training the initial vehicle speed error model based on the target state interval and the state transition matrix to obtain a target vehicle speed error model includes: Calculating according to the state transition matrix to determine target column data and target row-column data; Obtaining a target statistic according to the target column data and the target row-column data; Comparing the target statistic with a statistic critical value to obtain a Mahalanobis test result; When the Mahalanobis test result is a pass result, training the initial vehicle speed error model based on the target state interval and the state transition matrix to obtain a target vehicle speed error model.
4. The method according to claim 2, characterized in that, The step of dividing the state interval according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain a target state interval includes: Calculating according to the predicted vehicle speed sequence and the historical vehicle speed sequence to obtain an error relative value; Normalizing the error relative value to obtain a relative residual sequence; Dividing the relative residual sequence according to a preset segmentation rate to obtain a target state interval.
5. The method according to claim 1, characterized in that, The step of training the initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model includes: Optimizing the model width value of the initial vehicle speed prediction model based on a model optimization strategy to obtain a target width value; Obtaining an optimized vehicle speed prediction model based on the target width value and the initial vehicle speed prediction model; Training the optimized vehicle speed prediction model based on historical vehicle speed data to obtain a target vehicle speed prediction model.
6. The method according to claim 5, characterized in that, The step of optimizing the model width value of the initial vehicle speed prediction model based on a model optimization strategy to obtain a target width value includes: Calculating the fitness of the model width value according to the mean square error objective function to obtain the current fitness; Optimize the model width value based on the model optimization strategy and calculate the fitness to obtain the optimized fitness; Compare the current fitness with the optimized fitness and perform iterative optimization according to the comparison result to obtain the current iteration count; When the current iteration count is not less than the iteration count threshold, obtain the target width value.
7. The method according to claim 1, wherein Before the step of training the initial vehicle speed prediction model based on the model optimization strategy and historical vehicle speed data to obtain the target vehicle speed prediction model, it includes: Collect data for the vehicle to be predicted based on the preset vehicle speed collection strategy to obtain the initial collected vehicle speed; Perform filtering processing on the initial collected vehicle speed based on the filtering fitting strategy to obtain historical vehicle speed data.
8. A vehicle speed prediction device, characterized in that, The device includes: A training module, configured to train an initial vehicle speed prediction model based on a model optimization strategy and historical vehicle speed data to obtain a target vehicle speed prediction model; The training module is further configured to train an initial vehicle speed error model based on a vehicle speed training set and the target vehicle speed prediction model to obtain a target vehicle speed error model; A prediction module, configured to input the vehicle speed data to be predicted into the target vehicle speed prediction model for vehicle speed prediction to obtain initial vehicle speed data; The prediction module is further configured to input the initial vehicle speed data into the target vehicle speed error model for error prediction to obtain a vehicle speed prediction error; The prediction module is further configured to calculate the vehicle speed according to the initial vehicle speed data and the vehicle speed prediction error to obtain the target predicted vehicle speed.
9. A vehicle speed prediction device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the vehicle speed prediction method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by the processor, it implements the steps of the vehicle speed prediction method according to any one of claims 1 to 7.