Online vehicle speed prediction method and system based on V2X data acquisition
Through the online vehicle speed prediction method based on V2X data acquisition, regression neural network and phased data acquisition are used to solve the problem of neglecting the adaptability and interaction relationship of the existing vehicle speed prediction model in dynamic scenarios, and achieve higher accuracy and flexibility of vehicle speed prediction.
Patent Information
- Application Number
- CN202510486645.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-18
AI Technical Summary
The existing vehicle speed prediction model is difficult to effectively adapt to the actual driving scenarios with dynamic changes, and the model has limitations in the selection of training data, ignoring the interaction relationship between vehicles, resulting in low prediction accuracy.
The online vehicle speed prediction method based on V2X data acquisition is adopted, and V2X data is collected in stages, combined with regression neural network to build and optimize the vehicle speed prediction model, and the speed information of the main vehicle itself and the vehicle flow in front is gradually transitioned to more complex predictions.
The accuracy of vehicle speed prediction is improved, and the actual situation of traffic scenarios can be reflected more comprehensively, adapt to various traffic scenarios, avoid prediction deviations, and make rational use of computing resources.
Smart Images

Figure CN120014841A_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 collection. Background Art
[0002] As a key technology, vehicle speed prediction aims to accurately estimate the vehicle speed in a specific period of time in the future based on the vehicle's 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 obtain massive and diversified traffic environment information.
[0003] At present, most vehicle speed prediction models generally adopt the traditional mode of offline training and online use. This mode is relatively simple in implementation. For vehicles with relatively fixed routes and working conditions, such as buses running along established routes and in fixed operating time periods, it can achieve a relatively ideal vehicle speed prediction effect to a certain extent by relying on pre-set training data and model parameters. However, in actual vehicle driving scenarios, the future driving conditions of different vehicles are easily affected by the interaction of many complex factors, such as the driver's operating habits, potential driving intentions, real-time road environment conditions, dynamic changes in driving routes, characteristics of different time periods during running time, and changeable weather conditions. Therefore, even if the number of training samples used in offline training is extremely large, the vehicle speed prediction model constructed through offline training is difficult to effectively adapt to the dynamic changes in actual driving scenarios because it cannot fully cover the above complex and changeable driving environment factors. This not only leads to poor generalization performance of the model and the inability to accurately predict vehicle speed under diverse working conditions, but also greatly reduces the prediction accuracy when facing emergencies 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, making it impossible for the model to fully capture the dynamic characteristics of the traffic system, further limiting the accuracy of vehicle speed prediction. Summary of the invention
[0004] In order to realize online vehicle speed prediction and improve the accuracy of vehicle speed prediction, the present invention provides an online vehicle speed prediction method and system based on V2X data collection. The technical solutions adopted are as follows: 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: Obtaining a vehicle speed data set of vehicles in the first stage and calculating first vehicle speed prediction data; 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 vehicle speed prediction model and calculate second vehicle speed prediction data; A second traffic speed information data matrix of vehicles in the third stage is obtained, and a vehicle speed prediction model is optimized by using the second traffic speed information data matrix to calculate third vehicle speed prediction data.
[0005] Further, obtaining a vehicle speed data set of the vehicle in the first stage and calculating the first vehicle speed prediction data includes: Obtain the main vehicle speed data before the prediction time in the first stage; According to the current speed data of the main vehicle and the speed data of the main vehicle at the previous moment, the predicted speed of the main vehicle at the next moment is calculated.
[0006] Furthermore, constructing a vehicle speed prediction model based on a regression neural network includes: Configure the number of neurons in the input layer 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.
[0007] Further, obtaining the first traffic flow speed information data matrix of vehicles in the second stage includes: The vehicle status collection module of the main vehicle is used to collect the vehicle speed data of the main vehicle at the current moment; The V2X communication module of the main vehicle is used to establish communication with the V2X communication module of the front vehicle to obtain the speed data of the front vehicle at the current moment; Construct the first traffic speed information matrix.
[0008] Further, using the first vehicle flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the second vehicle speed prediction data includes: 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; 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 second vehicle speed prediction data is output.
[0009] Furthermore, 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.
[0010] Further, obtaining the second traffic flow speed information data matrix of vehicles in the third stage includes: Obtain the historical speed data of the main vehicle, and use the main vehicle's V2X communication module to establish communication with the front vehicle's V2X communication module to obtain the current speed data of the front vehicle; Constructing a second traffic speed information matrix; 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; 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.
[0011] The technical solution of the second aspect of the present invention provides an online vehicle speed prediction system based on V2X data collection, using the online vehicle speed prediction method based on V2X collected traffic flow information described in the technical solution of the first aspect of the present invention, 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 vehicle 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 vehicle flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
[0012] 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 leading vehicle at the current moment in the second stage.
[0013] 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.
[0014] The present invention has the following beneficial effects: The online vehicle speed prediction method and system based on V2X data collection provided by the present invention collects V2X data in stages, builds and optimizes the vehicle speed prediction model in combination with a regression neural network, and gradually transitions from the simple initial prediction in the first stage to the complex prediction combined with more vehicle speed data. The vehicle speed prediction model built based on the regression neural network has a strong nonlinear mapping ability and can handle complex vehicle speed change relationships; the method uses the speed information of the main vehicle itself and the front vehicle flow in the second and third stages, so that the model can capture the interaction between vehicles and the dynamic characteristics of traffic flow, and can more comprehensively reflect the actual situation of the traffic scene. Considering the speed change law of different time spans, the second and third stages can more accurately predict the vehicle speed, and provide reliable vehicle speed information for traffic management, automatic driving, etc. The vehicle speed prediction model provided by the method can be updated and learned online in real time with the vehicle condition, and can adjust its own parameters and structure in time according to the changing traffic conditions, adapt to various traffic scenes, avoid prediction deviations caused by changes in vehicle conditions, and effectively improve the accuracy of vehicle speed prediction; at the same time, the computing resources are reasonably used to avoid the waste of resources and the difficulty of model convergence caused by processing too much complex data at one time. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 creative work.
[0016] Figure 1 A method flow chart of an online vehicle speed prediction method based on V2X data collection provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of an online vehicle speed prediction system based on V2X data collection provided by an embodiment of the present invention; Figure 3 A schematic diagram of an online vehicle speed prediction method provided by an embodiment of the present invention; Figure 4 A schematic diagram of vehicle speed prediction results for the time period of 8:00-8:40 provided by an embodiment of the present invention; Figure 5 A schematic diagram of vehicle speed prediction results for the time period of 13:40-14:20 provided by an embodiment of the present invention; Figure 6 A schematic diagram of vehicle speed prediction results for the time period of 17:20-18:00 provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the online vehicle speed prediction method and system based on V2X data collection proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0018] 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.
[0019] The following specifically describes an online vehicle speed prediction method and system based on V2X data collection provided by the present invention in conjunction with the accompanying drawings.
[0020] See also Figure 1 , which shows a method flow chart of an online vehicle speed prediction method based on V2X data collection provided by an embodiment of the present invention, the method comprising: In this embodiment, the preset training time domain length of the third stage is and the predicted time domain length The system divides the vehicle into stages and sets a time node of 2 seconds as the first stage, i.e. when the 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 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 front vehicle through the V2X communication module to obtain the front of the main vehicle. The speed of the vehicle; V2X stands for Vehicle to Everything, where V stands for vehicle and X stands for roads, people, vehicles, equipment and other connected devices; V2X communication module is a key component in the Internet of Vehicles. V2X is a technology that enables vehicles to communicate with other vehicles, infrastructure, networks and other entities; Step S100: obtaining a vehicle speed data set of a vehicle in the first stage, and calculating first vehicle speed prediction data; Step S100 specifically includes: Step S110: obtaining the vehicle speed data of the host vehicle before the prediction time in the first stage; specifically, storing the vehicle speed data of the host vehicle collected in the first stage in a data structure to form a first data set, and an array, a list or other suitable data structure may be used to store the speed information of each vehicle in a certain order, and store the corresponding timestamp and vehicle identifier; the host vehicle in this embodiment refers to the vehicle whose speed is predicted; Step S120: Calculate the predicted speed of the host vehicle at the next moment according to 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:
[0021] In the formula, express The predicted speed of the host vehicle at the time; express The speed of the host vehicle at the time; express The speed of the host vehicle at the moment.
[0022] 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 (General Regression Neural Network), including an input layer, a pattern layer, a summation layer and an output layer; in this embodiment, the input vector of the GRNN model is the historical vehicle speed data of the main vehicle and the current actual speeds of multiple preceding vehicles, and the output vector is the predicted future vehicle speed of the main vehicle; a training sample of the GRNN model is composed of a training sample input vector and a training sample output vector, and the training sample input vector and output vector are extracted from the historical vehicle speed according to the model input and output vector according to the sliding time window, and a number of training samples form a training sample matrix; Step S200 specifically includes: 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 are simple distribution units, whose function is to directly pass the input vector to the pattern layer; Step S220: configure the number of neurons in the pattern layer according to the number of training samples, and extract the output of the pattern layer using the transfer function; 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, and obtains the output of the pattern layer by calculating the distance between the input vector and the corresponding training sample and performing mathematical transformation. The transfer function can be expressed as:
[0023] In the formula, 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; 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 second is to perform weighted summation on the neurons in the pattern layer, and the weight is determined by the elements of the output vector of the training sample; finally, the output layer calculates the output value according to 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.
[0024] Step S300: obtaining a first vehicle flow speed information data matrix of vehicles in the second stage, using the first vehicle flow speed information data matrix to train and optimize a vehicle speed prediction model and calculate second vehicle speed prediction data; Step S300 specifically includes: Step S310: Use the vehicle status acquisition module of the main vehicle to collect the speed data of the main vehicle at the current moment; use the main vehicle V2X communication module to establish communication with the front vehicle V2X communication module to obtain the speed data of the front vehicle at the current moment; construct a first traffic flow speed information matrix, which can be expressed as:
[0025] In the formula, represents the first vehicle 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 prediction time domain length, that is, how long in the future the main vehicle speed is predicted. It is the dimension of the output vector, indicating how many time points in the future the model will provide predictions for. The first traffic flow speed information matrix contains the main vehicle and the front vehicle speed information matrix. 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; 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; The second stage of updating the training sample matrix can be expressed as:
[0026] In the formula, represents the second-stage training sample input matrix, where each row stores the actual speed from the main vehicle to the first front vehicle at a specific time point. is a storage 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 that Contains the latest Speed information at the moment.
[0027]
[0028] In the formula, 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 goes on, 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.
[0029]
[0030] In the formula, 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.
[0031]
[0032] In the formula, Represents the output vector of the second stage training sample, and selects the main vehicle in The actual speed of the vehicle at the current time is used as the output. 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.
[0033]
[0034] In the formula, Indicates that the second stage will be the main vehicle and the front vehicle at the current time The actual speeds 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.
[0035] 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, and 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 main 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; 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, the model is provided 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 prediction output, and then the performance of the model is evaluated by the root mean square error, which can be expressed as:
[0036] In the formula, 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; 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 at speeds of seconds.
[0037] 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 the vehicle speed prediction model and calculate third vehicle speed prediction data; Step S400 specifically includes: 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 speed data of the front vehicle at the current moment, and construct the second traffic flow speed information matrix; specifically, obtain the speed information matrix of the third stage with the set parameters and The historical speed data of the main vehicle under That is, the length of time that 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; 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 speed information at the time is combined, and the second traffic speed information matrix can be expressed as:
[0038] In the formula, Represents the second traffic speed information matrix.
[0039] 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; The third stage updates the training sample matrix which can be expressed as:
[0040] In the formula, Indicates that the third stage Time has come The speed data of the main vehicle at the moment and The speed data of the preceding vehicle at the time is used as the third stage The training sample input vector of the GRNN model.
[0041]
[0042] In the formula, 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.
[0043]
[0044] In the formula, 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.
[0045]
[0046] In the formula, 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 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 ,continuously updated data and avoid overfitting or excessive ,computational burden caused by too much historical data.
[0047]
[0048] In the formula, Represents the predicted sample input vector of the third stage.
[0049] Step S430: Based on the updated training sample matrix, extract the optimal vehicle speed prediction model with the goal of minimizing the root mean square error; use the updated and right The GRNN model is trained; the new training sample input vector is input into the trained model to obtain the predicted output; then, the performance of the model is evaluated by calculating the root mean square error as in the second stage, and the model with the smallest root mean square error is selected as the optimal model; 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 Input into the optimal GRNN model, and use the model to predict the future of the main vehicle Predictions are made at speeds 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 when the embodiment transitions 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, and 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. In summary, this application divides online vehicle speed prediction into three stages. First, in the initial The first stage has a shorter time frame. The first stage 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 speed data of the main vehicle in the early stage, the trend of speed change is preliminarily explored, providing a basic reference for the subsequent more complex prediction stage; 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 state of the front vehicle during the driving process, which has an important impact on the speed of the main vehicle. For example, the deceleration of the front vehicle may cause the main vehicle to decelerate as well. By introducing the speed data of the front vehicle, the interaction factors in the traffic flow can be considered more comprehensively, 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 makes the prediction in this stage no longer limited to the simple calculation of the historical speed of the main vehicle itself, but integrates the information of multiple vehicles at the current moment, improving the timeliness and accuracy of the prediction; when After the time reaches the third stage, take , , using the actual historical speed of the host vehicle and K The third stage is a further deepening of data utilization. In traffic scenarios, the historical speed of the main vehicle contains a lot of information about its driving habits, road conditions, etc. Therefore, the third stage can better capture the long-term trend of speed changes and the complex interaction of traffic flows by combining the historical speed of the main vehicle over a long period of time with the current speed of the front vehicle. For example, when the main vehicle passes a gentle slope, its historical speed change can reflect the impact of the slope on the speed. Combined with the current speed of the front vehicle, it can more accurately predict the speed change of the main vehicle in the future for a long period of time. In summary, the stage division provided by the present invention enables the prediction model to gradually incorporate more relevant factors according to 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 in 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 speed of the front vehicle will directly affect the speed of the main vehicle. The prediction method in 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 In a long time span, traffic flow will be affected by a variety of factors such as road type, traffic flow changes, and weather. The third stage uses the long historical speed of the main vehicle and the current speed of the preceding vehicle to grasp the trend of the impact of these long-term factors on the speed. For example, during long-distance driving, factors such as the ups and downs of the road and the speed limit changes in different sections will cause the speed to show a certain change pattern over a long period of time. The prediction in the third stage can discover these patterns by analyzing the historical speed of the main vehicle, and combine the current speed of the preceding vehicle to more accurately predict the speed of the main vehicle in the future for a long time to adapt to long-term traffic trends. This stage division from simple to complex allows computing resources to be gradually invested according to actual needs, avoiding the waste of resources by performing overly complex calculations in the early stages of prediction. This staged training process can improve the efficiency of model training and avoid problems such as difficulty in model convergence or overfitting caused by processing too much complex data at one time.
[0050] A specific embodiment of the present invention is provided below: S1: First stage vehicle speed prediction S11: Initialization parameters , , , , ; S12: Collect the current actual speed of the main vehicle , predict Speed in seconds: ; S13: Delay 1 second, update , ; S14: Determine whether to stop the vehicle speed prediction, if yes, end the prediction, if no, proceed to the next step; S15: Collect traffic speed information and collect the current actual speed of the main vehicle through the vehicle status collection module , obtain the front through the communication between the main vehicle V2X communication module and the front vehicle V2X communication module The actual current speed of the vehicle; S16: Predicted vehicle speed in seconds: ; S17: Delay 1 second, ; S18: Determine whether to stop the vehicle speed prediction, if yes, stop the prediction, if no, proceed to the next stage; S2: Second stage vehicle speed prediction S21: Settings , ; S22: 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 front vehicle communicate to obtain the speed of the front vehicle. The actual speed of the vehicle and the The traffic speed information collected at every second is combined into a traffic speed information data matrix:
[0051] In the formula, For 2 2D matrix, Indicates the current actual speed of the host vehicle. Indicates the current actual speed of the first vehicle ahead.
[0052] S23: Update the training sample matrix, 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 a front 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 shown, the number of training samples :
[0053]
[0054]
[0055]
[0056]
[0057] In the formula, is a 2-dimensional vector, Dimension is 2 (t-1)-dimensional matrix, is 1 (t-1)-dimensional matrix, is a 2-dimensional vector.
[0058] 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 to obtain the predicted output of the training sample input vectors, the root mean square error of the corresponding models is calculated, and the GRNN model with the smallest root mean square error is selected as the optimal model; 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; S26: Delay 1 second, .
[0059] S27: Determine whether to stop the vehicle speed prediction, if yes, stop the prediction, if no, continue to the next step; S28: Judgment Is it less than , if yes, return to S22, if no, proceed to the next stage; S3: The third stage of vehicle speed prediction S31: Settings , ; S32: Collecting traffic speed information. The vehicle status acquisition module of the main vehicle collects the current actual speed of the main vehicle, and the communication between the main vehicle V2X communication module and the front vehicle V2X communication module obtains the speed of the front vehicle. The actual speed of the vehicle and the The traffic speed information collected every second is combined into a traffic speed information data matrix:
[0060] In the formula, For 10 2D matrix, Indicates the current actual speed of the host vehicle. Indicates the current actual speed of the first vehicle ahead.
[0061] 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 , delete the first column of the training sample input and output matrices; :
[0062]
[0063]
[0064]
[0065]
[0066] In the formula, is a 6-dimensional vector, is a 5-dimensional vector, For 6 (t-9)-dimensional matrix, For 5 (t-9)-dimensional matrix, is a 6-dimensional vector.
[0067] S34: using the updated training sample matrix, respectively training the two GRNN models; then, respectively inputting the new training sample input vectors into the trained GRNN models, obtaining the predicted output of the training sample input vectors, calculating the root mean square error of the corresponding models, and selecting the GRNN model with the smallest root mean square error as the optimal model; S35: Input the predicted sample input vector into the optimal GRNN model to obtain the future Speed of seconds; S36: Delay 1 second, ; S37: Determine whether to stop vehicle speed prediction, if yes, stop prediction, if no, return to S32.
[0068] See also 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 Chengdu Xipu East Station to Chengdu Sanda Professional Club section (a total length of 19.2 kilometers, including 22 traffic lights), and uses the technical solution of the present invention to perform online vehicle speed prediction tests. The vehicle speed prediction results of the three stages are as follows: Figure 4 , Figure 5 and Figure 6shown; 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; In summary, the online vehicle speed prediction method based on V2X data collection provided by the present invention collects V2X data in stages, builds and optimizes the vehicle speed prediction model in combination with a regression neural network, and gradually transitions from the simple initial prediction in the first stage to the complex prediction combined with more vehicle speed data. The vehicle speed prediction model built based on the regression neural network has a strong nonlinear mapping ability and can handle complex vehicle speed change relationships; the method uses the speed information of the main vehicle itself and the front vehicle flow in the second and third stages, so that the model can capture the interaction between vehicles and the dynamic characteristics of traffic flow, and can more comprehensively reflect the actual situation of the traffic scene. Considering the speed change law of different time spans, the second and third stages can more accurately predict the vehicle speed, and provide reliable vehicle speed information for traffic management, automatic driving, etc. The vehicle speed prediction model provided by the method can be updated and learned online in real time with the vehicle condition, and can adjust its own parameters and structure in time according to the changing traffic conditions, adapt to various traffic scenes, avoid prediction deviations caused by changes in vehicle conditions, and effectively improve the accuracy of vehicle speed prediction; at the same time, the computing resources are reasonably used to avoid the waste of resources and the difficulty of model convergence caused by processing too much complex data at one time.
[0069] See also Figure 2 , which shows a schematic diagram of the structure of an online vehicle speed prediction system based on V2X data collection provided by an embodiment of the present invention, the system comprising: 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 vehicle 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 vehicle flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
[0070] 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 leading vehicle at the current moment in the second stage.
[0071] 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.
[0072] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0073] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. An online vehicle speed prediction method based on V2X data collection is characterized in that: The method comprises: Obtaining a vehicle speed data set of vehicles in the first stage and calculating first vehicle speed prediction data; 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 vehicle speed prediction model and calculate second vehicle speed prediction data; A second traffic speed information data matrix of vehicles in the third stage is obtained, and a vehicle speed prediction model is optimized by using the second traffic speed information data matrix to calculate third vehicle speed prediction data.
2. The online vehicle speed prediction method according to claim 1, characterized in that: Obtaining the vehicle speed data set in the first stage and calculating the first vehicle speed prediction data includes: Obtain the main vehicle speed data before the prediction time in the first stage; According to the current speed data of the main vehicle and the speed data of the main vehicle at the previous moment, the predicted speed of the main vehicle at the next moment is calculated.
3. The online vehicle speed prediction method according to claim 1, characterized in that: The vehicle speed prediction model based on regression neural network includes: Configure the number of neurons in the input layer 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.
4. The online vehicle speed prediction method according to claim 1, characterized in that: The data matrix of the first traffic flow speed information of vehicles in the second stage is obtained including: The vehicle status collection module of the main vehicle is used to collect the vehicle speed data of the main vehicle at the current moment; The V2X communication module of the main vehicle is used to establish communication with the V2X communication module of the front vehicle to obtain the speed data of the front vehicle at the current moment; Construct the first traffic speed information matrix.
5. The online vehicle speed prediction method according to claim 4, characterized in that: 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: 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; 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 second vehicle speed prediction data is output.
6. The online vehicle speed prediction method according to claim 5, characterized in that: 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.
7. The online vehicle speed prediction method according to any one of claims 1 to 6, characterized in that: The second traffic flow speed information data matrix of the vehicles in the third stage is obtained including: Obtain the historical speed data of the main vehicle, and use the main vehicle's V2X communication module to establish communication with the front vehicle's V2X communication module to obtain the current speed data of the front vehicle; Constructing a second traffic speed information matrix; 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; 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.
8. The online vehicle speed prediction system based on V2X data collection is characterized by: The online vehicle speed prediction method based on V2X collected vehicle flow information according to any one of claims 1 to 7 is adopted, and the system comprises: 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 vehicle 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 vehicle flow speed information data matrix to train and optimize the vehicle speed prediction model and calculate the third vehicle speed prediction data.
9. The online vehicle speed prediction system based on V2X data collection as claimed in claim 8, characterized in that: The second-stage vehicle speed prediction module is used to calculate second vehicle speed prediction data according to the vehicle speed data of the host vehicle and the preceding vehicle at the current moment in the second stage.
10. The online vehicle speed prediction system based on V2X data collection according to claim 9, characterized in that: The third stage vehicle speed prediction module is used to calculate the third vehicle speed prediction data according to 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
Short-term vehicle speed working condition real-time prediction method based on interaction between preceding vehicle and self vehicle
CN111009134A
Vehicle cooperative following control system and method based on 5G V2X
CN112489431A
based on incremental learning Energy management method for extended-range electric logistics vehicle
CN112959921A
Vehicle-mounted networking energy-saving auxiliary driving control method and system
CN113012433A
Multi-stage and multi-mode vehicle track prediction method
CN114997484A
Cited By
Online gear decision-making method and system for electric automobile
CN120003489A