Online vehicle speed prediction method and system based on V2X data collection
By using V2X data acquisition and regression neural network in stages, and combining the speed information of the main car and forward car to optimize the vehicle speed prediction model, the adaptability and accuracy of the existing model in complex environments is solved, and more accurate vehicle speed prediction and efficient resource utilization are achieved.
Patent Information
- Application Number
- CN202510486645.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-04-18
AI Technical Summary
When facing complex and changing driving environments, existing vehicle speed prediction models are difficult to adapt to dynamic changes, resulting in poor generalization performance and reduced prediction accuracy, and ignore the interaction relationship between vehicles in traffic flow, making it impossible to fully capture the dynamic characteristics of the traffic system.
The online vehicle speed prediction method based on V2X data acquisition is adopted to obtain vehicle speed information in stages, and a vehicle speed prediction model is constructed using a regression neural network, combining the vehicle flow speed information of the main car and the front car for training and prediction, and gradually optimizing the model to adapt to vehicle speed changes at different time spans.
It improves the accuracy and adaptability of vehicle speed prediction, can update and learn traffic conditions in real time, adapt to various traffic scenarios, avoid resource waste and difficult model convergence problems, and provides reliable vehicle speed information to support traffic management and autonomous driving.
Smart Images

Figure CN120014841B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle speed prediction, and in particular to an online vehicle speed prediction method and system based on V2X data acquisition. Background Art
[0002] Vehicle speed prediction, a key technology, aims to accurately estimate a vehicle's speed within a specific timeframe based on its current traffic environment, its own dynamic state, and other relevant information. With the development of intelligent transportation systems and V2X communication technology, vehicles can efficiently access a vast and diverse array of traffic environment information.
[0003] Currently, most vehicle speed prediction models employ a traditional offline training and online application model. This model is relatively simple to implement and, for vehicles with relatively fixed routes and operating conditions, such as buses traveling along established routes and during fixed operating hours, can achieve relatively good speed prediction results to a certain extent based on pre-set training data and model parameters. However, in real-world driving scenarios, the future driving conditions of different vehicles are highly susceptible to the interaction of numerous complex factors, such as the driver's operating habits, underlying driving intentions, real-time road conditions, dynamic changes in the route, characteristics of different operating times, and variable weather conditions. Therefore, even with a very large number of training samples for offline training, the speed prediction models constructed through offline training cannot effectively adapt to the dynamic changes in real-world driving scenarios because they cannot fully capture these complex and changing driving environment factors. This not only leads to poor generalization performance and the inability to accurately predict vehicle speed under diverse operating conditions, but also significantly reduces prediction accuracy when faced with unexpected situations or atypical driving environments. In addition, most current vehicle speed prediction models have limitations in the selection of training data. They often only focus on their own vehicle speed information and ignore the interaction between vehicles in the traffic flow. This makes the model unable to fully capture the dynamic characteristics of the traffic system, further limiting the accuracy of vehicle speed prediction. Summary of the Invention
[0004] To achieve online vehicle speed prediction and improve speed prediction accuracy, the present invention provides an online vehicle speed prediction method and system based on V2X data collection. The technical solutions adopted are as follows:
[0005] The technical solution of the first aspect of the present invention provides an online vehicle speed prediction method based on V2X data collection, the method comprising:
[0006] Obtaining a vehicle speed data set of vehicles in the first stage and calculating first vehicle speed prediction data;
[0007] Construct a vehicle speed prediction model based on regression neural network;
[0008] Obtaining a first traffic flow speed information data matrix of vehicles in the second stage, using the first traffic flow speed information data matrix to train and optimize a vehicle speed prediction model and calculate second vehicle speed prediction data;
[0009] A second traffic flow speed information data matrix of vehicles in the third stage is obtained, and the second traffic flow speed information data matrix is used to train and optimize the vehicle speed prediction model and calculate third vehicle speed prediction data.
[0010] Furthermore, obtaining a vehicle speed data set of the vehicle in the first stage and calculating the first vehicle speed prediction data includes:
[0011] Obtain the main vehicle speed data before the prediction time in the first stage;
[0012] The predicted speed of the main vehicle at the next moment is calculated based on the current speed data of the main vehicle and the speed data of the main vehicle at the previous moment.
[0013] Furthermore, building a vehicle speed prediction model based on a regression neural network includes:
[0014] Configure the number of input layer neurons according to the dimension of the training sample input vector;
[0015] Configure the number of neurons in the pattern layer according to the number of training samples, and use the transfer function to extract the output of the pattern layer;
[0016] The number of neurons in the summation layer and the output layer is configured according to the prediction duration. The summation layer sums the output of the pattern layer, and the output layer outputs the predicted vehicle speed data.
[0017] Furthermore, obtaining the first traffic flow speed information data matrix of vehicles in the second stage includes:
[0018] The vehicle status acquisition module of the main vehicle is used to collect the vehicle speed data of the main vehicle at the current moment;
[0019] Use the host vehicle's V2X communication module to establish communication with the preceding vehicle's V2X communication module to obtain the preceding vehicle's current speed data;
[0020] Construct the first traffic speed information matrix.
[0021] Furthermore, using the first traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the second vehicle speed prediction data includes:
[0022] Extracting a training sample input vector and a training sample output vector based on the first traffic flow data information matrix, and updating a training sample matrix of a vehicle speed prediction model;
[0023] Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error;
[0024] The prediction sample input vector is input into the optimal vehicle speed prediction model, and the second vehicle speed prediction data is output.
[0025] Furthermore, the training sample matrix for updating the vehicle speed prediction model includes:
[0026] The extracted training sample input vector and training sample output vector are placed in the last column of the training sample input matrix and output matrix of the previous moment respectively, so as to update the training sample matrix.
[0027] Furthermore, obtaining the second traffic flow speed information data matrix of vehicles in the third stage includes:
[0028] Obtain the historical speed data of the main vehicle, and use the main vehicle's V2X communication module to establish communication with the V2X communication module of the preceding vehicle to obtain the current speed data of the preceding vehicle;
[0029] Constructing a second traffic speed information matrix;
[0030] Extracting a training sample input vector and a training sample output vector based on the second traffic flow data information matrix, and updating a training sample matrix of a vehicle speed prediction model;
[0031] Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error;
[0032] The prediction sample input vector is input into the optimal vehicle speed prediction model, and the third vehicle speed prediction data is output.
[0033] The technical solution of the second aspect of the present invention provides an online vehicle speed prediction system based on V2X data collection, which adopts the online vehicle speed prediction method based on V2X traffic flow information collection described in the technical solution of the first aspect of the present invention. The system includes:
[0034] a data acquisition module configured to obtain vehicle speed data;
[0035] A first-stage vehicle speed prediction module configured to calculate first vehicle speed prediction data based on a vehicle speed data set of the vehicle in the first stage;
[0036] The second-stage vehicle speed prediction module is configured to use the first traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the second vehicle speed prediction data;
[0037] The third stage vehicle speed prediction module is configured to use the second traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
[0038] Furthermore, the second-stage vehicle speed prediction module is used to calculate second vehicle speed prediction data based on the vehicle speed data of the host vehicle and the preceding vehicle at the current moment in the second stage.
[0039] Furthermore, the third stage vehicle speed prediction module is used to calculate third vehicle speed prediction data based on the historical vehicle speed data of the host vehicle in the third stage and the vehicle speed data of the preceding vehicle at the current moment.
[0040] The present invention has the following beneficial effects:
[0041] The present invention provides an online vehicle speed prediction method and system based on V2X data collection. By collecting V2X data in stages and combining it with a regression neural network to construct and optimize a vehicle speed prediction model, the system gradually transitions from a simple initial prediction in the first stage to a complex prediction that incorporates more vehicle speed data. The speed prediction model constructed based on the regression neural network has strong nonlinear mapping capabilities and can handle complex speed variations. In the second and third stages, the method utilizes speed information from the host vehicle and the preceding traffic flow, enabling the model to capture vehicle interactions and the dynamic characteristics of traffic flow, more comprehensively reflecting the actual traffic scenario. By considering speed variations over different time spans, the second and third stages enable more accurate speed predictions, providing reliable speed information for traffic management, autonomous driving, and other applications. The speed prediction model provided by this method can be updated in real time and learn online based on vehicle conditions. It can adjust its parameters and structure according to changing traffic conditions, adapting to various traffic scenarios and avoiding prediction bias caused by changing vehicle conditions, thereby effectively improving the accuracy of vehicle speed prediction. Furthermore, the method rationally utilizes computing resources, avoiding problems such as resource waste and model convergence difficulties caused by processing too much complex data at once. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A flowchart of an online vehicle speed prediction method based on V2X data collection provided by one embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the structure of an online vehicle speed prediction system based on V2X data collection provided by one embodiment of the present invention;
[0045] Figure 3 A schematic diagram of an online vehicle speed prediction method provided by one embodiment of the present invention;
[0046] Figure 4A schematic diagram of vehicle speed prediction results for the time period 8:00-8:40 provided by one embodiment of the present invention;
[0047] Figure 5 A schematic diagram of vehicle speed prediction results for the time period of 13:40-14:20 provided by one embodiment of the present invention;
[0048] Figure 6 This is a schematic diagram of vehicle speed prediction results for the 17:20-18:00 time period provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] To further illustrate the technical means and effectiveness of the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of an online vehicle speed prediction method and system based on V2X data collection proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0051] The following describes in detail a method and system for online vehicle speed prediction based on V2X data collection provided by the present invention with reference to the accompanying drawings.
[0052] See also Figure 1 , which shows a method flow chart of an online vehicle speed prediction method based on V2X data collection provided by one embodiment of the present invention, the method comprising:
[0053] This embodiment uses the preset training time domain length of the third stage and the predicted time domain length The system divides the process into stages and sets a time node of 2 seconds as the first stage, i.e. when the main vehicle starts the speed prediction, For the first stage, For the second stage, For the third stage, use the main vehicle history Actual vehicle speed in seconds and The current actual speed of the preceding vehicle is used to predict the future speed of the host vehicle. The data acquisition process can be found in Figure 3 As shown, the main vehicle communicates with the V2X communication module of the preceding vehicle through the V2X communication module to obtain the The speed of the vehicle; V2X (Vehicle to Everything), V represents the vehicle, and X represents all connected devices such as roads, people, vehicles, and equipment; the V2X communication module is a key component of the Internet of Vehicles. V2X is the technology that enables vehicles to communicate with other vehicles, infrastructure, networks, and other entities;
[0054] Step S100: obtaining a vehicle speed data set of a vehicle in a first stage and calculating first vehicle speed prediction data;
[0055] Step S100 specifically includes:
[0056] Step S110: Obtaining the speed data of the host vehicle before the prediction time in the first stage; specifically, storing the host vehicle speed data collected in the first stage in a data structure to form a first data set. An array, list, or other suitable data structure can be used to store the speed information of each vehicle in a certain order, and also store the corresponding timestamp and vehicle identifier. In this embodiment, the host vehicle refers to the vehicle whose speed is being predicted.
[0057] Step S120: Calculate the predicted speed of the host vehicle at the next moment based on the current speed data of the host vehicle and the speed data of the host vehicle at the previous moment. Specifically, it can be expressed as:
[0058]
[0059] Where, express The predicted speed of the host vehicle at the moment; express The speed of the host vehicle at the moment; express The speed of the host vehicle at the moment.
[0060] Step S200: Constructing a vehicle speed prediction model based on a recurrent neural network. Specifically, the vehicle speed prediction module in this embodiment is preferably a generalized recurrent neural network (GRNN), which includes an input layer, a pattern layer, a summation layer, and an output layer. In this embodiment, the input vectors of the GRNN model are the historical speed data of the host vehicle and the current actual speeds of multiple preceding vehicles, and the output vector is the predicted future speed of the host vehicle. A training sample of the GRNN model consists of a training sample input vector and a training sample output vector. The training sample input vector and output vector are extracted from the historical speed according to the model input and output vectors according to a sliding time window. Several training samples form a training sample matrix.
[0061] Step S200 specifically includes:
[0062] Step S210: configuring the number of neurons in the input layer according to the dimension of the training sample input vector; the number of neurons in the input layer is equal to the dimension of the training sample input vector, and the neurons in the input layer act as simple distribution units, whose function is to directly pass the input vector to the pattern layer;
[0063] Step S220: Configure the number of neurons in the pattern layer according to the number of training samples, and use the transfer function to extract the output of the pattern layer. Specifically, the number of neurons in the pattern layer is equal to the number of training samples, and each neuron corresponds to a different training sample. This implementation uses the transfer function to calculate the similarity relationship between the input vector and each training sample. By calculating the distance between the input vector and the corresponding training sample and performing mathematical transformation, the output of the pattern layer is obtained. The transfer function can be expressed as:
[0064]
[0065] Where, represents the input vector of the GRNN model, Presentation mode layer The training samples corresponding to neurons are Represents the smoothing factor; this transfer function can reflect the similarity between the input vector and the training sample, providing a basis for subsequent summation layer calculations;
[0066] Step S230: Configure the number of neurons in the summation layer and the output layer according to the prediction duration, the summation layer sums the output of the pattern layer, and the output layer outputs the predicted vehicle speed data; specifically, the number of neurons in the summation layer is the prediction duration plus 1; in this embodiment, the summation layer performs two summation operations, one is to perform arithmetic summation on the outputs of all neurons in the pattern layer, and the connection weight between the pattern layer and the summation neuron is 1; the other is to perform weighted summation on the neurons in the pattern layer, and the weight is determined by the elements of the training sample output vector; finally, the output layer calculates the output value based on the two summation results of the summation layer, and for each neuron in the output layer, the weighted summation result is divided by the arithmetic summation result to obtain the predicted vehicle speed data, thereby completing the construction and prediction process of the vehicle speed prediction model.
[0067] Step S300: obtaining a first traffic flow speed information data matrix of vehicles in the second phase, using the first traffic flow speed information data matrix to train and optimize a vehicle speed prediction model and calculate second vehicle speed prediction data;
[0068] Step S300 specifically includes:
[0069] Step S310: The vehicle status acquisition module of the host vehicle is used to collect the current speed data of the host vehicle; the V2X communication module of the host vehicle establishes communication with the V2X communication module of the preceding vehicle to obtain the current speed data of the preceding vehicle; and a first traffic flow speed information matrix is constructed, which can be expressed as:
[0070]
[0071] Where, represents the first traffic flow speed information matrix; express td-p+ The actual speed of the host vehicle at time 1; express td-p+ 1st moment The actual speed of the vehicle; Indicates the training time domain length, that is, the data time span used to train the GRNN model; Indicates the length of the prediction time domain, that is, how long in the future the main vehicle's speed is predicted. It is the dimension of the output vector, indicating how many time points in the future the model will provide predictions. The first traffic flow speed information matrix includes the main vehicle and the front vehicle. The actual speed information of the vehicle at the target time; and The preferred value is 1, which means that the information of the current moment and the previous second is taken into account; is a dimensional matrix, which provides the data basis for subsequent training and prediction and is the starting point of the entire vehicle speed prediction process in the second stage;
[0072] Step S320: Extracting a training sample input vector and a training sample output vector based on the first traffic flow data information matrix, and updating the training sample matrix of the vehicle speed prediction model; specifically, placing the extracted training sample input vector and training sample output vector in the last column of the training sample input matrix and output matrix at the previous moment, respectively, to update the training sample matrix;
[0073] The second stage of updating the training sample matrix can be expressed as:
[0074]
[0075] Where, Represents the second-stage training sample input matrix, where each row stores the actual speed from the main vehicle to the first preceding vehicle at a specific time point. is a data structure that stores the time from time 1 to The matrix of different vehicle speed information will be Placed in The last column of , can realize the update of training sample matrix, so Contains the latest Speed information at the moment.
[0076]
[0077] Where, Represents the second stage training sample output matrix, which stores the main vehicle from time 2 to The column vector of the actual vehicle speed, as time progresses, Continuously update and Y ot Placed in The last column reflects the speed change of the main vehicle at different times and provides an output sequence for model training.
[0078]
[0079] Where, Indicates the second stage Training sample input vectors of different vehicles at different times; express The actual speed of the host vehicle at that moment.
[0080]
[0081] Where, Represents the output vector of the second stage training sample, and the main vehicle is selected The actual speed of the vehicle at the moment is output, the purpose is to The actual speed is used as the desired output for comparison with the predicted vehicle speed or as the target output when training the GRNN model.
[0082]
[0083] Where, Indicates that the second stage will be the main vehicle and the vehicle in front at the current time The actual speeds of the vehicles are combined together as the prediction sample input vector, which contains the speed data of all relevant vehicles at the current moment and will be used in subsequent prediction steps.
[0084] In the second stage of prediction, The input of each model varies according to the number of vehicles, from considering only the main vehicle to considering the main vehicle and different numbers of preceding vehicles; for example, the first GRNN model only considers the current actual speed of the main vehicle, the second The first GRNN model considers the actual speed of the main vehicle and the K preceding vehicles; A GRNN model, we start from Extract new training sample input vector and the output vector , Included in Time master car and The actual speed of the vehicle ahead, combining this information into a The dimension column vector reflects the speed information of different vehicles one second before the current moment; The main car is The actual vehicle speed at the moment is used as output to compare with the model's prediction results or as the expected output of training; Provide basic data, 、 、 and Used to update the training sample matrix and provide input and output data for model training. It is used as the final prediction input vector;
[0085] Step S330: Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error; specifically, the updated and right GRNN models are trained and the updated As input matrix, As the output matrix, it provides the model with training data of historical speed information. After the training is completed, the new training sample input vector is input into the trained model to obtain the corresponding predicted output. The performance of the model is then evaluated by the root mean square error, which can be expressed as:
[0086]
[0087] Where, express The actual speed of the host vehicle at the moment; express The predicted speed of the main vehicle at time arrive The difference between the predicted speed and the actual speed of the main vehicle at the moment; the model with the smallest root mean square error is selected as the optimal model;
[0088] Step S340: Input the prediction sample input vector into the optimal vehicle speed prediction model and output the second vehicle speed prediction data; finally, Input into the optimal GRNN model, and use the model to predict the future of the main vehicle Predictions are made in seconds.
[0089] Step S400: obtaining a second traffic flow speed information data matrix of vehicles in the third stage, using the second traffic flow speed information data matrix to train and optimize a vehicle speed prediction model and calculate third vehicle speed prediction data;
[0090] Step S400 specifically includes:
[0091] Step S410: Obtain the historical speed data of the main vehicle, and use the main vehicle V2X communication module to establish communication with the front vehicle V2X communication module to obtain the current speed data of the front vehicle, and construct the second traffic flow speed information matrix; specifically, obtain the speed data of the vehicle in the third stage and the set parameters. and The historical speed data of the main vehicle under That is, the length of time the historical speed data of the main vehicle is considered during the training process. Determines the length of time for which future vehicle speeds are to be predicted;
[0092] At the same time, the main vehicle V2X communication module is used to obtain the current front The actual speed data of the vehicle is compared with the previous The traffic flow speed information at the time is combined, and the second traffic flow speed information matrix can be expressed as:
[0093]
[0094] Where, Represents the second traffic speed information matrix.
[0095] Step S420: extracting a training sample input vector and a training sample output vector based on the second traffic flow data information matrix, and updating the training sample matrix of the vehicle speed prediction model;
[0096] The third stage of updating the training sample matrix can be expressed as:
[0097]
[0098] Where, Indicates that the third stage Time has come The main vehicle speed data at the moment and The speed data of the preceding vehicle at the moment is used as the third stage The training sample input vector of the GRNN model.
[0099]
[0100] Where, Represents the output vector of the third stage training sample, as the third stage The expected output vector of the GRNN model provides the model with the target sequence to be predicted.
[0101]
[0102] Where, Represents the third stage training sample input matrix, Placed in The last column of can be used to update the training sample matrix and ensure that the matrix contains the latest historical and current speed information.
[0103]
[0104] Where, Represents the output matrix of the third stage training samples, Add to The last column of updates the output sample matrix and provides the model with a series of vehicle speeds at time points as the expected output to evaluate the model’s ability to predict the future speed of the vehicle. The number of training samples is determined by Control, when When deleting and The first column and ,This control mechanism ensures that the training sample matrix does not grow indefinitely, keeping its size within a reasonable range, while ensuring that the data in the ,matrix is always the latest and most relevant to adapt to the constantly updated data, and avoids overfitting or ,excessive computational burden caused by excessive historical data.
[0105]
[0106] Where, Represents the predicted sample input vector of the third stage.
[0107] Step S430: Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error; and right A GRNN model is trained; the new training sample input vector is input into the trained model to obtain the predicted output; then, as in the second stage, the performance of the model is evaluated by calculating the root mean square error, and the model with the smallest root mean square error is selected as the optimal model;
[0108] Step S440: Input the prediction sample input vector into the optimal vehicle speed prediction model and output the third vehicle speed prediction data; Input the prediction sample input vector into the optimal vehicle speed prediction model and output the third vehicle speed prediction data. Input into the optimal GRNN model, and use the model to predict the future of the main vehicle Predictions are made at a speed of seconds; The latest speed information is included, and the speed pattern and relationship learned by the optimal model in the third stage are combined to realize the prediction of future vehicle speed. It should be noted that in this embodiment, when transitioning from the second stage to the third stage, although the new data collection and processing will refer to the previous data, the third stage needs to consider a longer time span and different training and prediction requirements (by setting different and The traffic speed information matrix constructed by the third phase will reorganize the data according to the new parameters. The matrix of the third phase focuses more on combining historical data and current data over a longer period of time. It reshapes the matrix of the second phase, including adding new historical speed information and updating the time range and dimension of the data to meet more complex and long-term traffic speed prediction needs.
[0109] In summary, this application divides online vehicle speed prediction into three stages. First, in the initial The first stage has a shorter time frame and mainly uses the actual speed data of the main vehicle to perform simple speed prediction, providing an initial and relatively simple prediction starting point for the entire prediction process. In the first stage, with limited data acquisition and only a small amount of the main vehicle's own early speed data, the trend of speed change is preliminarily explored, providing a basic reference for the subsequent more complex prediction stage;
[0110] As time goes by, after accumulating a certain amount of main vehicle speed data and being able to obtain the actual speed data of the preceding vehicle, the second stage begins. The second stage sets the training time domain length. , predict the time domain length , start using the main vehicle and The advantage of this division is that it takes into account the current actual speed of the preceding vehicle to predict the main vehicle's speed in the next 1 second. The advantage of this division is that it takes into account the important influence of the preceding vehicle's status on the main vehicle's speed during driving. For example, the deceleration of the preceding vehicle may cause the main vehicle to decelerate as well. By introducing the preceding vehicle's speed data, it is possible to more comprehensively consider the interaction factors in the traffic flow, making the speed prediction more in line with the actual traffic scene. Compared with the first stage, the setting of the prediction time domain and training time domain in the second stage means that the prediction in this stage is no longer limited to the simple calculation of the main vehicle's own historical speed, but integrates the information of multiple vehicles at the current moment, improving the timeliness and accuracy of the prediction.
[0111] when After the time reaches the third stage, take 、 , using the actual historical speed of the main vehicle and K The third phase further deepens data utilization by using the current actual speed of the preceding vehicle to predict the future speed of the host vehicle. In traffic scenarios, the host vehicle's historical speed contains a lot of information about its driving habits, road conditions, and so on. Therefore, by combining the host vehicle's long-term historical speed with the preceding vehicle's current speed, the third phase can better capture the long-term trend of speed changes and the complex interaction of traffic flows. For example, when the host vehicle passes a gentle slope, its historical speed changes can reflect the impact of the slope on the speed. Combined with the preceding vehicle's current speed, it can more accurately predict the host vehicle's speed changes over a long period of time in the future.
[0112] In summary, the stage division provided by the present invention enables the prediction model to gradually incorporate more relevant factors based on the accumulation of time and data, thereby continuously optimizing the quality of vehicle speed prediction. In traffic flow, the speed of a vehicle may change in a short period of time due to the driver's instantaneous operation (such as slight braking or acceleration). The simple prediction method of the first stage can quickly adapt to such short-term fluctuations; as time enters the second stage, the role of mutual influence between vehicles in vehicle speed changes gradually becomes prominent. At this time, the introduction of the front vehicle speed data can better cope with such mid-term traffic interaction situations; for example, in the following vehicle scenario on the highway, the distance maintained between the main vehicle and the front vehicle and the change in the front vehicle speed will directly affect the speed of the main vehicle. The prediction method of the second stage can take into account such interaction between vehicles and more accurately predict the speed of the main vehicle in the next 1 second, thereby better adapting to the characteristics of frequent vehicle interactions in mid-term traffic flow; finally Over longer time spans, traffic flow is influenced by a variety of factors, including road type, traffic volume fluctuations, and weather. The third stage leverages the long-term historical speed of the primary vehicle and the current speed of the preceding vehicle to understand the impact of these long-term factors on vehicle speed. For example, during long-distance driving, factors such as uphill and downhill roads and varying speed limits on different road sections can cause vehicle speed to exhibit certain patterns of change over a long period of time. The third stage prediction can identify these patterns by analyzing the primary vehicle's historical speed and, combined with the preceding vehicle's current speed, more accurately predict the primary vehicle's future speed over a longer period of time to adapt to long-term traffic trends. This phased approach, from simple to complex, allows computing resources to be allocated incrementally based on actual needs, avoiding the waste of overly complex calculations in the early stages of prediction. This phased training process improves model training efficiency and avoids problems such as difficulty converging or overfitting the model due to processing too much complex data at once.
[0113] A specific embodiment of the present invention is provided below:
[0114] S1: First stage vehicle speed prediction
[0115] S11: Initialization parameters 、 、 、 、 ;
[0116] S12: Collect the current actual speed of the main vehicle , predict the Speed per second: ;
[0117] S13: Delay 1 second, update , ;
[0118] S14: Determine whether to stop the vehicle speed prediction, if yes, end the prediction, if no, proceed to the next step;
[0119] S15: Collect traffic speed information and collect the current actual speed of the main vehicle through the vehicle status acquisition module , obtain the front through the communication between the main vehicle V2X communication module and the front vehicle V2X communication module The vehicle's current actual speed;
[0120] S16: Predicted vehicle speed in seconds: ;
[0121] S17: Delay 1 second, ;
[0122] S18: Determine whether to stop vehicle speed prediction, if yes, stop prediction, if no, proceed to the next stage;
[0123] S2: Second stage vehicle speed prediction
[0124] S21: Settings , ;
[0125] S22: The current actual speed of the main vehicle is collected through the vehicle status collection module of the main vehicle, and the forward speed is obtained through the communication between the main vehicle V2X communication module and the V2X communication module of the preceding vehicle. The current actual speed of the vehicle and the speed of the preceding vehicle The traffic speed information collected at every second is combined into a traffic speed information data matrix:
[0126]
[0127] Where, is 2 2D matrix, Indicates the current actual speed of the host vehicle. Indicates the current actual speed of the first vehicle in front.
[0128] S23: Update the training sample matrix and use the traffic speed information data matrix to complete the training sample matrix update of the two GRNN models; the input of the first GRNN model is the current actual speed of the main vehicle, and the input of the second GRNN model is the current actual speed of the main vehicle and the one preceding vehicle; for the second GRNN model, extract new training sample input and output vectors from the traffic speed information data set 、 and place them in Training sample input at time , output matrix The last column of the prediction sample input vector is as follows As shown, the number of training samples :
[0129]
[0130]
[0131]
[0132]
[0133]
[0134] Where, is a 2-dimensional vector, Dimension is 2 (t-1)-dimensional matrix, 1 (t-1)-dimensional matrix, is a 2-dimensional vector.
[0135] S24: Use the updated training sample matrix to GRNN models are trained; the new training sample input vectors are input into the trained GRNN models respectively, the predicted output of the training sample input vectors is obtained, the root mean square error of the corresponding model is calculated, and the GRNN model with the smallest root mean square error is selected as the optimal model;
[0136] S25: Vehicle speed prediction: input the prediction sample input vector into the optimal GRNN model to obtain the future speed of the main vehicle. Speed of seconds;
[0137] S26: Delay 1 second, .
[0138] S27: Determine whether to stop vehicle speed prediction, if yes, stop prediction, if no, proceed to the next step;
[0139] S28: Judgment Is it less than , if yes, return to S22, if no, go to the next stage;
[0140] S3: The third stage of vehicle speed prediction
[0141] S31: Settings 、 ;
[0142] S32: Collect traffic speed information. The vehicle status acquisition module of the main vehicle collects the current actual speed of the main vehicle, and the V2X communication module of the main vehicle and the V2X communication module of the preceding vehicle communicate to obtain the speed of the preceding vehicle. The current actual speed of the vehicle and the speed of the preceding vehicle The traffic speed information collected every second is combined into a traffic speed information data matrix:
[0143]
[0144] Where, is 10 2D matrix, Indicates the current actual speed of the host vehicle. Indicates the current actual speed of the first vehicle in front.
[0145] S33: Using the traffic speed information data matrix, complete the update of the training sample matrix of the two GRNN models; for the second GRNN model, extract new training sample input from the traffic speed information data set , output vector , and place them in the training sample input of the previous moment , output matrix The last column of the prediction sample input vector is , the number of training samples .when When , delete the first column of the training sample input and output matrices; :
[0146]
[0147]
[0148]
[0149]
[0150]
[0151] Where, is a 6-dimensional vector, is a 5-dimensional vector, 6 (t-9)-dimensional matrix, 5 (t-9)-dimensional matrix, is a 6-dimensional vector.
[0152] S34: Use the updated training sample matrix to train the two GRNN models respectively; then, input the new training sample input vectors into the trained GRNN models respectively, obtain the predicted output of the training sample input vectors, calculate the root mean square error of the corresponding models, and select the GRNN model with the smallest root mean square error as the optimal model;
[0153] S35: Input the predicted sample input vector into the optimal GRNN model to obtain the future Speed of seconds;
[0154] S36: Delay 1 second, ;
[0155] S37: Determine whether to stop vehicle speed prediction. If yes, stop prediction. If not, return to S32.
[0156] See Figures 4 to 6 As shown, through the above method, this embodiment selects three time periods of 8:00-8:40, 13:40-14:20 and 17:20-18:00 on the G213 section from Chengdu Xipu East Station to Chengdu Sanda Professional Club (a total length of 19.2 kilometers, including 22 traffic lights), and uses the technical solution of the present invention to conduct online vehicle speed prediction tests. The speed prediction results of the three stages are as follows: Figure 4 、 Figure 5 and Figure 6 shown; according to Figure 4-Figure 6 It can be understood that the online prediction method based on V2X data collection provided by the present invention has high vehicle speed prediction accuracy in all three stages;
[0157] In summary, the online speed prediction method based on V2X data collection provided by the present invention collects V2X data in stages, constructs and optimizes a speed prediction model using a regression neural network, and gradually transitions from a simple initial prediction in the first stage to a complex prediction that incorporates more vehicle speed data. The speed prediction model constructed based on the regression neural network has strong nonlinear mapping capabilities and can handle complex speed variations. In the second and third stages, the method utilizes speed information of the host vehicle and the preceding traffic flow, enabling the model to capture vehicle interactions and the dynamic characteristics of traffic flow, more comprehensively reflecting the actual traffic scene. By considering speed variations over different time spans, the second and third stages can more accurately predict vehicle speeds, providing reliable speed information for traffic management, autonomous driving, and other applications. The speed prediction model provided by this method can be updated in real time and learn online based on vehicle conditions. It can promptly adjust its parameters and structure according to changing traffic conditions, adapt to various traffic scenarios, and avoid prediction bias caused by changing vehicle conditions, thereby effectively improving the accuracy of speed prediction. It also rationally utilizes computing resources, avoiding problems such as resource waste and model convergence difficulties caused by processing too much complex data at once.
[0158] See also Figure 2 , which shows a schematic structural diagram of an online vehicle speed prediction system based on V2X data collection provided by an embodiment of the present invention, the system includes:
[0159] a data acquisition module configured to obtain vehicle speed data;
[0160] A first-stage vehicle speed prediction module configured to calculate first vehicle speed prediction data based on a vehicle speed data set of the vehicle in the first stage;
[0161] The second-stage vehicle speed prediction module is configured to use the first traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the second vehicle speed prediction data;
[0162] The third stage vehicle speed prediction module is configured to use the second traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
[0163] Furthermore, the second-stage vehicle speed prediction module is used to calculate second vehicle speed prediction data based on the vehicle speed data of the host vehicle and the preceding vehicle at the current moment in the second stage.
[0164] Furthermore, the third stage vehicle speed prediction module is used to calculate third vehicle speed prediction data based on the historical vehicle speed data of the host vehicle in the third stage and the vehicle speed data of the preceding vehicle at the current moment.
[0165] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0166] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. An online vehicle speed prediction method based on V2X data collection is characterized by: The method comprises: Obtain the vehicle speed data set in the first stage and calculate the first vehicle speed prediction data, including: Obtain the main vehicle speed data before the prediction time in the first stage; Calculate the predicted speed of the main vehicle at the next moment based on the current speed data of the main vehicle and the speed data of the main vehicle at the previous moment; Construct a vehicle speed prediction model based on regression neural network; Obtaining a first traffic flow speed information data matrix of vehicles in the second stage, using the first traffic flow speed information data matrix to train and optimize a speed prediction model and calculate second speed prediction data, including: The vehicle status acquisition module of the main vehicle is used to collect the speed data of the main vehicle at different times; The V2X communication module of the host vehicle establishes communication with the V2X communication module of the preceding vehicle to obtain the speed data of the preceding vehicle at different times; Constructing a first traffic flow speed information matrix; Extracting the speed data of the host vehicle and the preceding vehicle at the previous moment as a training sample input vector and the speed data of the host vehicle at the current moment as a training sample output vector based on the first traffic flow data information matrix, and updating the training sample matrix of the speed prediction model; Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error; Inputting the prediction sample input vector into the optimal vehicle speed prediction model and outputting the second vehicle speed prediction data; Obtaining a second traffic flow speed information data matrix of vehicles in the third stage, using the second traffic flow speed information data matrix to train and optimize a vehicle speed prediction model and calculate third vehicle speed prediction data, including: Obtain the historical speed data of the main vehicle, and use the main vehicle's V2X communication module to establish communication with the V2X communication module of the preceding vehicle to obtain the speed data of the preceding vehicle at different times; Constructing a second traffic speed information matrix; Extracting the historical speed data of the host vehicle and the speed data of the preceding vehicle as a training sample input vector and the current speed data of the host vehicle as a training sample output vector based on the second traffic flow data information matrix, and updating the training sample matrix of the speed prediction model; Based on the updated training sample matrix, the optimal vehicle speed prediction model is extracted with the goal of minimizing the root mean square error; The prediction sample input vector is input into the optimal vehicle speed prediction model, and the third vehicle speed prediction data is output.
2. The online vehicle speed prediction method according to claim 1, wherein: Building a vehicle speed prediction model based on regression neural network includes: Configure the number of input layer neurons according to the dimension of the training sample input vector; Configure the number of neurons in the pattern layer according to the number of training samples, and use the transfer function to extract the output of the pattern layer; The number of neurons in the summation layer and the output layer is configured according to the prediction duration. The summation layer sums the output of the pattern layer, and the output layer outputs the predicted vehicle speed data.
3. The online vehicle speed prediction method according to claim 1, wherein: The training sample matrix for updating the vehicle speed prediction model includes: The extracted training sample input vector and training sample output vector are placed in the last column of the training sample input matrix and output matrix of the previous moment respectively, so as to update the training sample matrix.
4. The online vehicle speed prediction system based on V2X data collection is characterized by: The online vehicle speed prediction method based on V2X data collection according to any one of claims 1 to 3 is adopted, and the system includes: a data acquisition module configured to obtain vehicle speed data; A first-stage vehicle speed prediction module configured to calculate first vehicle speed prediction data based on a vehicle speed data set of the vehicle in the first stage; The second-stage vehicle speed prediction module is configured to use the first traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the second vehicle speed prediction data; The third stage vehicle speed prediction module is configured to use the second traffic flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
5. The online vehicle speed prediction system based on V2X data collection according to claim 4, characterized in that: The second-stage vehicle speed prediction module is used to calculate second vehicle speed prediction data based on the vehicle speed data of the host vehicle and the preceding vehicle at the current moment in the second stage.
6. The online vehicle speed prediction system based on V2X data collection according to claim 5, characterized in that: The third stage vehicle speed prediction module is used to calculate the third vehicle speed prediction data based on the historical vehicle speed data of the host vehicle in the third stage and the vehicle speed data of the preceding vehicle at the current moment.
Citation Information
Patent Citations
based on incremental learning Energy management method for extended-range electric logistics vehicle
CN112959921A
Apparatus and method for predictively controlling the speed of a vehicle
DE102018210065A1