A vehicle trajectory prediction method and system for detector-free road sections
By using the XGBoost model and historical data to predict exit times and lanes, the problem of vehicle trajectory prediction on detector-free roads is solved, high-accuracy trajectory fusion is achieved, and it adapts to the data sparsity and computing resource limitations of real-world scenarios.
Patent Information
- Application Number
- CN202310767701.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-06-27
AI Technical Summary
On road sections without detectors, existing technologies find it difficult to achieve highly accurate and easy-to-implement vehicle trajectory prediction, which makes it difficult to merge the positions of virtual vehicles and real vehicles.
The XGBoost model is used for training, and the historical data of real vehicles is used to predict the exit time and target lane. The vehicle speed is calculated based on the driving duration, and trajectory fusion is achieved by controlling the speed and lane adjustment of the virtual vehicle.
The accuracy of vehicle trajectory prediction on detector-free road sections is improved, the position deviation between virtual vehicles and real vehicles is reduced, and it adapts to the data sparsity and computing resource limitations of real-world scenarios.
Smart Images

Figure CN116740936B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic digital twin technology, and in particular to a vehicle trajectory prediction method and system for a detector-free road section. Background Art
[0002] Traffic digital twin technology primarily relies on historical and real-time vehicle data and algorithmic models to digitally create a virtual vehicle entity and simulate, verify, predict, and control the vehicle's entire lifecycle. Data acquisition primarily comes from the automated collection of vehicle data by detectors such as radar and cameras. However, due to cost constraints, detectors are only deployed on major roads and intersections, resulting in many detector-free sections of the road network. Faced with data gaps caused by detector-free sections, traffic digital twin technology requires predictive completion of vehicle trajectory data for such sections when performing tasks such as real-time simulation and traffic flow forecasting. This allows the trajectory data of virtual vehicles at the end of such sections to be easily integrated with the subsequent trajectory data of the corresponding real vehicles.
[0003] A vehicle's trajectory is primarily determined by its speed and lane. Frequent lane changes within the same road section are relatively rare. Errors in predicting vehicle speed on sections without sensors are a key factor in the difficulty in merging the virtual vehicle's current trajectory with the corresponding real vehicle's trajectory on subsequent sections with sensors. Prediction methods based on historical speed, instantaneous speed, and other factors are relatively crude, easily leading to significant deviations between the virtual vehicle's position and its real-world counterpart. Prediction methods based on similar object matching and pattern discovery are overly complex, requiring consideration of numerous factors and complex scenario modeling. These methods are costly to implement and struggle to guarantee optimal results.
[0004] Therefore, it is necessary to provide a vehicle trajectory prediction method and system for detector-free sections, so as to achieve high-accuracy and easy-to-implement vehicle trajectory prediction on detector-free sections, and meet the urgent needs in the field of traffic digital twin technology. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and system for predicting vehicle trajectories on detector-free road sections, so as to achieve highly accurate and easy-to-implement vehicle trajectory prediction on detector-free road sections, and meet the urgent needs in the field of traffic digital twin technology.
[0006] In order to solve the problems existing in the prior art, the present invention provides a vehicle trajectory prediction method for a detector-free road section, comprising the following steps:
[0007] S1: Collect historical data of real vehicles on the target detector-free road section. The real vehicle historical data includes the last data before the real vehicle enters the target detector-free road section and the first data after the real vehicle leaves the target detector-free road section.
[0008] S2: Initialize the first training parameters of the XGBoost model for predicting the exit time and the second training parameters of the XGBoost model for predicting the target lane based on the real vehicle historical data;
[0009] S3: Inputting the first training parameter and the second training parameter into the XGBoost model for predicting the departure time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the departure time outputs the predicted departure time of the virtual vehicle, and the XGBoost model for predicting the target lane outputs the predicted target lane of the virtual vehicle;
[0010] S4: Input actual parameters, calculate the driving time of the virtual vehicle on the target detector-free road section according to the predicted exit time output by the XGBoost model for predicting the exit time, and obtain the predicted target lane of the virtual vehicle according to the XGBoost model for predicting the target lane;
[0011] S5: Calculating the speed of the virtual vehicle according to the total distance of the target detector-free road section and the driving time;
[0012] S6: Control the virtual vehicle to travel according to the calculated speed and predicted target lane.
[0013] Optionally, in the vehicle trajectory prediction method for the detector-free road section, real vehicle historical data is updated in real time;
[0014] The last data before the real vehicle enters the target detector-free road section includes: time, longitude, latitude, speed and lane;
[0015] The first data of the real vehicle after leaving the target detector-free road section includes: longitude, latitude and lane.
[0016] Optionally, in the vehicle trajectory prediction method for the detector-free road section,
[0017] The real vehicle historical data is divided into a training set and a verification set; the training set participates in training, and the verification value calculated according to the verification set participates in verification.
[0018] Optionally, in the vehicle trajectory prediction method for the detector-free road section, S3 further includes the following steps: regularly verifying the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane.
[0019] Optionally, in the vehicle trajectory prediction method for the detector-free road section, the verification method is as follows:
[0020] If the mean square error of the output predicted departure time is less than or equal to the first preset error threshold, then the XGBoost model of the current predicted departure time is saved;
[0021] If the mean square error of the output predicted departure time is greater than the first preset error threshold, repeat steps S2 and S3;
[0022] If the accuracy of the output predicted target lane is greater than or equal to the second preset threshold, the XGBoost model of the current predicted target lane is saved;
[0023] If the accuracy of the output predicted target lane is less than the second preset threshold, repeat steps S2 and S3;
[0024] The first preset error threshold and the second preset threshold belong to the verification value.
[0025] Optionally, in the vehicle trajectory prediction method for the detector-free road section, the driving time in S4 is calculated as follows: the driving time is equal to the predicted exit time minus the time in the last data before the actual vehicle enters the target detector-free road section.
[0026] Optionally, the method for predicting vehicle trajectories on a detector-free road section further includes the following steps:
[0027] After the real vehicle exits the target detector-free section, the positions of the real vehicle and the virtual vehicle are compared. If the real vehicle is ahead of the virtual vehicle, the virtual vehicle increases its speed. If the real vehicle is behind the virtual vehicle, the virtual vehicle slows down. If the real vehicle and the virtual vehicle are at the same position, the speed of the virtual vehicle remains unchanged, so that the speeds of the virtual vehicle and the real vehicle are synchronized. At the same time, the lanes of the real vehicle and the virtual vehicle are compared, and the virtual vehicle is changed to the lane where the real vehicle is located, so that the virtual vehicle and the real vehicle are in the same lane; thus completing the trajectory fusion of the virtual vehicle and the real vehicle.
[0028] Optionally, in the vehicle trajectory prediction method for the detector-free road section, when the virtual vehicle increases its speed, the target speed is calculated as follows:
[0029] Among them, V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标 If it is greater than the maximum speed limit of the target detector-free road section, update V 目标 is the maximum speed limit of the target detector-free road section;
[0030] When the virtual vehicle slows down, the target speed is calculated as follows:
[0031] Among them, V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标 If it is less than the minimum speed limit of the target detector-free road section, update V 目标 is the minimum speed limit of the target detector-free road section.
[0032] The present invention also provides a vehicle trajectory prediction system for a detector-free road section, comprising:
[0033] a data module configured to collect historical data of a real vehicle on a target detector-free road section, the historical data of the real vehicle including the last data before the real vehicle enters the target detector-free road section and the first data after the real vehicle leaves the target detector-free road section;
[0034] A model module is configured to initialize a first training parameter of an XGBoost model for predicting an exit time and a second training parameter of an XGBoost model for predicting a target lane based on historical data of a real vehicle;
[0035] Inputting the first training parameter and the second training parameter into the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the exit time outputs the predicted exit time of the virtual vehicle, and the XGBoost model for predicting the target lane outputs the predicted target lane of the virtual vehicle;
[0036] Input actual parameters, calculate the driving time of the virtual vehicle on the target detector-free road section based on the predicted exit time output by the XGBoost model for predicting the exit time, and obtain the predicted target lane of the virtual vehicle based on the XGBoost model for predicting the target lane;
[0037] It is also configured to calculate the speed of the virtual vehicle based on the total distance of the target detector-free road section and the driving time;
[0038] The control module is configured to control the virtual vehicle to travel according to the calculated speed and the predicted target lane.
[0039] Optionally, in the vehicle trajectory prediction system for the detector-free road section, the data module is updated in real time;
[0040] The last data before the real vehicle enters the target detector-free road section includes: time, longitude, latitude, speed and lane;
[0041] The first data of the real vehicle after leaving the target detector-free road section includes: longitude, latitude and lane.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] 1) Core Technology: For long-distance road sections, a speed prediction method based on driving duration has been developed. This solves the problem of severe positional deviation between virtual and real vehicles caused by large speed discrepancies during driving on sensorless sections.
[0044] 2) Sample construction: The method uses only the last data point before a real vehicle enters the target detector-free section and the first data point after leaving the target detector-free section from historical data. No other data is required. This avoids potential issues such as sparse and inaccurate historical data for real vehicles in real-world scenarios. It also avoids the problem that commonly used trajectory prediction models such as recurrent neural networks and long-short-term memory networks cannot be implemented due to missing data on detector-free sections.
[0045] 3) Model selection: XGBoost was used for the first time as a prediction model, overcoming the underfitting or overfitting problems caused by the difficulty of parameter adjustment in artificial intelligence models such as support vector machines, decision trees, and deep neural networks. It also adapts to the processing speed required for predicting massive amounts of data in real-world scenarios.
[0046] 4) Technical Details: After the vehicle leaves the detector-free section, a fusion solution is used to control the virtual vehicle. This solution enables the virtual vehicle to smoothly adjust its position in the shortest possible time, based on the required fusion time, to minimize the gap with the real vehicle's position.
[0047] 5) Effect maintenance: By setting thresholds to maintain model effects, we can adapt to the ever-changing demand for model updates in real-world scenarios and avoid the large consumption of computer resources by real-time update mechanisms such as reinforcement learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flow chart of a vehicle trajectory prediction method provided by an embodiment of the present invention;
[0049] Figure 2 This is a module flow chart of the vehicle trajectory prediction system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following is a more detailed description of the specific embodiments of the present invention with reference to schematic diagrams. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are greatly simplified and not to exact scale, and are only used for the purpose of conveniently and clearly illustrating the embodiments of the present invention.
[0051] Hereinafter, if the method described herein includes a series of steps, the order in which the steps are presented herein is not necessarily the only order in which the steps may be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.
[0052] In existing technologies, inaccurate predictions of vehicle speeds on sections without sensors are a major factor in the difficulty in merging the virtual vehicle's current trajectory with the corresponding real vehicle's trajectory on subsequent sections with sensors. Prediction methods based on historical and instantaneous speeds are relatively crude, easily leading to significant deviations between the virtual and real vehicle positions. Furthermore, prediction methods based on similar object matching and pattern discovery are overly complex, requiring consideration of numerous factors and complex scenario modeling. This leads to high implementation costs and limited assurance of final results.
[0053] In order to solve the problems existing in the prior art, the present invention provides a vehicle trajectory prediction method for a detector-free road section, such as Figure 1 As shown, the vehicle trajectory prediction method includes the following steps:
[0054] S1: Collect historical data of the real vehicle on the target detector-free section. The real vehicle historical data includes the last data before the real vehicle enters the target detector-free section and the first data after the real vehicle leaves the target detector-free section. The last data before the real vehicle enters the target detector-free section includes: time, longitude, latitude, speed, and lane. The first data after the real vehicle leaves the target detector-free section includes: longitude, latitude, and lane. The real vehicle historical data is updated in real time and stored in the database.
[0055] S2: Initialize the first training parameters of the XGBoost model for predicting the exit time and the second training parameters of the XGBoost model for predicting the target lane based on the real vehicle historical data;
[0056] S3: Inputting the first training parameter and the second training parameter into the XGBoost model for predicting the departure time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the departure time outputs the predicted departure time of the virtual vehicle, and the XGBoost model for predicting the target lane outputs the predicted target lane of the virtual vehicle;
[0057] S4: Input actual parameters, calculate the driving time of the virtual vehicle in the target detector-free section according to the predicted exit time output by the XGBoost model of the predicted exit time, and obtain the predicted target lane of the virtual vehicle according to the XGBoost model of the predicted target lane; wherein, the actual parameters are the last data before the real vehicle enters the target detector-free section, such as the time, longitude, latitude, speed and lane obtained before the real vehicle enters the target detector-free section; input the actual parameters into the XGBoost model of the predicted exit time and the XGBoost model of the predicted target lane, and the models calculate the predicted exit time and the predicted target lane of the virtual vehicle respectively; further, the driving time is calculated as follows: the driving time is equal to the predicted exit time minus the time in the last data before the real vehicle enters the target detector-free section.
[0058] S5: Calculating the speed of the virtual vehicle based on the total distance of the target detector-free road section and the driving time, wherein the total distance is calculated based on the longitude and latitude in the last data before the real vehicle enters the target detector-free road section and the longitude and latitude in the first data after the real vehicle leaves the target detector-free road section; the speed of the virtual vehicle is the quotient of the total distance divided by the driving time;
[0059] S6: Control the virtual vehicle to travel according to the calculated speed and predicted target lane.
[0060] Optionally, in the vehicle trajectory prediction method for the detector-free road section, the real vehicle historical data is divided into a training set and a verification set; the training set participates in training, and the verification value calculated according to the verification set participates in verification.
[0061] Preferably, S3 also includes the following steps: regularly verifying the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane. The verification method is as follows: if the mean square error of the output predicted exit time is less than or equal to the first preset error threshold, then save the current XGBoost model for predicting the exit time and participate in the application in step S4; if the mean square error of the output predicted exit time is greater than the first preset error threshold, then repeat steps S2 and S3. Of course, it is also possible to only repeat the initialization of the first training parameter of the XGBoost model for predicting the exit time in S2, and input the real vehicle historical data into the XGBoost model for predicting the exit time in S3, and the XGBoost model for predicting the exit time outputs the predicted exit time; if the output predicted target lane is If the accuracy of the predicted target lane is greater than or equal to the second preset threshold, the XGBoost model of the current predicted target lane is saved and used in step S4; if the accuracy of the output predicted target lane is less than the second preset threshold, steps S2 and S3 are repeated. Of course, only the second training parameter of the XGBoost model for initializing the predicted target lane in S2 and the input of the real vehicle historical data into the XGBoost model for predicting the target lane in S3 can be repeated, and the XGBoost model for predicting the target lane outputs the predicted target lane; wherein, the first preset error threshold and the second preset threshold belong to the aforementioned verification values.
[0062] Preferably, the method for predicting vehicle trajectories on a detector-free road section further includes the following steps:
[0063] After the real vehicle exits the target detector-free section, the positions of the real and virtual vehicles are compared. If the real vehicle is ahead of the virtual vehicle, the virtual vehicle increases its speed. If it is behind the virtual vehicle, the virtual vehicle slows down. If the real and virtual vehicles are in the same position, the virtual vehicle's speed remains unchanged, thus synchronizing their speeds. Simultaneously, the virtual and real vehicle's lanes are compared at every moment. If they are inconsistent, the virtual vehicle changes lanes to the real vehicle's lane; if they are consistent, the virtual vehicle subsequently drives in the real vehicle's lane. This completes the trajectory fusion of the virtual and real vehicles.
[0064] Furthermore, when the virtual vehicle increases its speed, the target speed is calculated as follows:
[0065] Among them, V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标If it is greater than the maximum speed limit of the target detector-free road section, update V 目标 The maximum speed limit for the target detector-free road section until the trajectories of the virtual vehicle and the real vehicle converge;
[0066] When the virtual vehicle slows down, the target speed is calculated as follows:
[0067] Among them, V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标 If it is less than the minimum speed limit of the target detector-free road section, update V 目标 is the minimum speed limit on the target detector-free road section until the trajectories of the virtual vehicle and the real vehicle merge.
[0068] In one embodiment, the nouns are defined as follows:
[0069]
[0070] The implementation process of this embodiment is as follows:
[0071] 1) Collect historical data: For a real vehicle A, collect the last data before it enters the W zone (assuming that the position of A at this time is before P) and the first data after it leaves the W zone (assuming that the position of A at this time is after P).
[0072] 2) Construct a sample: Select feature items and target values from the above historical data (the last two columns of the table below), delete other data items, and obtain a sample in the following format.
[0073] <![CDATA[t P前 ]]> <![CDATA[X P前 ]]> <![CDATA[Y P前 ]]> <![CDATA[V P前 ]]> <![CDATA[L P前 ]]> <![CDATA[X P后 ]]> <![CDATA[Y P后 ]]> <![CDATA[t P后 ]]> <![CDATA[L P后 ]]> … … … … … … … … …
[0074] 3) Obtain sample set: Divide all constructed samples into training set and validation set.
[0075] 4) Model Initialization: Initialize the parameters of the two XGBoost models. XGBoost uses distributed gradient boosting technology, employs Newton's method to find the extreme value of the loss function, expands the loss function to the second order Taylor, and adds a regularization term to the loss function to make the model more flexible and robust.
[0076] 5) Train the XGBoost model for predicting departure time: The feature item data of the training set (t P前 , X P前 , Y P前 , V P前 , LP前 , X P后 , Y P后 ) and target value t P后 Input into the XGBoost model for predicting departure time for fitting training, so that the model output value is as close to t as possible P后 The value is close.
[0077] 6) Verify the XGBoost model for predicting departure time: The feature item data of the validation set (t P前 , X P前 , Y P前 , V P前 , L P前 , X P后 , Y P后 ) is input into the fitted XGBoost model for predicting departure time, and t P后 The mean square error (MSE) is selected as the evaluation indicator. If the MSE value is less than or equal to the first preset error threshold, the model is saved; otherwise, the model is retrained by returning to step 5).
[0078] 7) Train the XGBoost model to predict the target lane: P前 , X P前 , Y P前 , V P前 , L P前 , X P后 , Y P后 ) and target value L P后 Input it into the XGBoost model for predicting the target lane for fitting training, so that the model output value is as close as possible to L P后 The value is close.
[0079] 8) Verify the XGBoost model for predicting the target lane: P前 , X P前 , Y P前 , V P前 , L P前 , X P后 , Y P后 ) is input into the fitted XGBoost model of the predicted target lane to predict L P后 , select Precision as the evaluation indicator. If the Precision value is greater than or equal to the second preset threshold, save the model; otherwise, return to step 7) and retrain the model.
[0080] 9) Put into application: When the real application is running, the data module will compare the real vehicle A and the virtual vehicle A. * Continuously monitor and store A data in the database in real time.
[0081] 10) Prediction duration: When A enters zone W, the last feature item data of A before zone W (before P) and the longitude and latitude of the end point of zone W P are input into the XGBoost model for predicting exit time, and the time when A arrives after P (tP after) is predicted. Then, the driving distance S (before P, after P) and driving duration T (before P, after P) of A in zone W are calculated, which are: S (before P, after P) = (after XP, after YP) - (before XP, after YP), T (before P, after P) = predicted tP after - actual tP before.
[0082] 11) Predicted lane: When A enters zone W, the last feature item data of A before zone W (before P) and the longitude and latitude of zone W end point P are input into the XGBoost model of the predicted target lane, and the lane after A reaches P (LW) is predicted.
[0083] 12) Control vehicle: Calculate the average speed of A in zone W: Vw = S(P before, P after) / T(P before, P after), and control the virtual vehicle A. * Press Vw, Lw to drive in the W zone.
[0084] 13) Fusion adjustment: After A has completed the W zone, compare A at each moment * With A's location, * The lane where the vehicle is located is adjusted to keep it consistent with the lane where A is located, and A is controlled according to the following fusion scheme * The minimum speed limit of the target detector-free road section is Vmin, the maximum speed limit is Vmax, the current speed of the real vehicle is V, and the expected time to complete the fusion is Texpected.
[0085] If A is in A * forward:
[0086] (1) According to the type of fusion desired, the control module selects the speed set (Vmax, V+|S(t, A, A) * )| / TDesired) to select a speed and control A * Drive at that speed.
[0087] (2) Return to step 10) and continue monitoring and judging until the application runs to the end.
[0088] If A is in A * back:
[0089] (1) According to the type of fusion expectation, the control module selects the speed set (Vmin, V-|S(t, A, A) * )| / TDesired) to select a speed and control A * Drive at that speed.
[0090] (2) Return to step 10) and continue monitoring and judging until the application runs to the end.
[0091] If A and A * In the same location:
[0092] (1) Control A * Drive at speed V set by A.
[0093] (2) Return to step 10) and continue monitoring and judging until the application runs to the end.
[0094] 14) Update model: The model module periodically imports new data from the database for prediction. If the predicted MSE is greater than a first preset error threshold and / or the Precision value is less than a second preset threshold, the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane are retrained.
[0095] The present invention also provides a vehicle trajectory prediction system for a detector-free road section, such as Figure 2 The vehicle trajectory prediction system includes:
[0096] A data module, which is updated in real time and configured to collect historical data of a real vehicle on a target detector-free road section, wherein the historical data of the real vehicle includes the last data before the real vehicle enters the target detector-free road section and the first data after the real vehicle leaves the target detector-free road section; wherein the last data before the real vehicle enters the target detector-free road section includes: time, longitude, latitude, speed, and lane; and the first data after the real vehicle leaves the target detector-free road section includes: longitude, latitude, and lane;
[0097] The model module is configured to initialize a first training parameter of an XGBoost model for predicting a departure time and a second training parameter of an XGBoost model for predicting a target lane based on historical data of a real vehicle; input the first training parameter and the second training parameter into the XGBoost model for predicting the departure time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the departure time outputs a predicted departure time of a virtual vehicle, and the XGBoost model for predicting the target lane outputs a predicted target lane of the virtual vehicle;
[0098] Input actual parameters, calculate the driving time of the virtual vehicle on the target detector-free section based on the predicted exit time output by the XGBoost model for predicting the exit time, and obtain the predicted target lane of the virtual vehicle based on the XGBoost model for predicting the target lane, wherein the actual parameters are the last data before the real vehicle enters the target detector-free section;
[0099] It is also configured to calculate the speed of the virtual vehicle based on the total distance of the target detector-free road section and the driving time;
[0100] Furthermore, the model module is also configured with a verification function, which divides the real vehicle historical data into a training set and a verification set; the training set participates in training, and the verification value calculated according to the verification set participates in verification. For example, the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane are verified regularly. The verification method is as follows: if the mean square error of the output predicted exit time is less than or equal to the first preset error threshold, the XGBoost model for the current predicted exit time is saved and used; if the mean square error of the output predicted exit time is greater than the first preset error threshold, retrain and establish the model; if the accuracy of the output predicted target lane is greater than or equal to the second preset threshold, the XGBoost model for the current predicted target lane is saved and used; if the accuracy of the output predicted target lane is less than the second preset threshold, retrain and establish the model; wherein, the first preset error threshold and the second preset threshold belong to the aforementioned verification values.
[0101] The control module is configured to control the virtual vehicle to travel according to the calculated speed and the predicted target lane.
[0102] Furthermore, the control module is equipped with a trajectory fusion function, which is implemented as follows: after the real vehicle exits the target detector-free section, the positions of the real vehicle and the virtual vehicle are compared. If the real vehicle is ahead of the virtual vehicle, the virtual vehicle increases its speed. If the real vehicle is behind the virtual vehicle, the virtual vehicle slows down. If the real vehicle and the virtual vehicle are in the same position, the virtual vehicle's speed remains unchanged, thus synchronizing the speeds of the virtual and real vehicles. At the same time, the lanes of the virtual and real vehicles are compared at each moment. If the two do not match, the virtual vehicle changes lanes to the real vehicle's lane; if they match, the virtual vehicle subsequently drives in the real vehicle's lane. This completes the trajectory fusion of the virtual and real vehicles.
[0103] In summary, compared with the prior art, the present invention has the following advantages:
[0104] 1) Core Technology: For long-distance road sections, a speed prediction method based on driving duration has been developed. This solves the problem of severe positional deviation between virtual and real vehicles caused by large speed discrepancies during driving on sensorless sections.
[0105] 2) Sample construction: The method uses only the last data point before a real vehicle enters the target detector-free section and the first data point after leaving the target detector-free section from historical data. No other data is required. This avoids potential issues such as sparse and inaccurate historical data for real vehicles in real-world scenarios. It also avoids the problem that commonly used trajectory prediction models such as recurrent neural networks and long-short-term memory networks cannot be implemented due to missing data on detector-free sections.
[0106] 3) Model selection: XGBoost was used for the first time as a prediction model, overcoming the underfitting or overfitting problems caused by the difficulty of parameter adjustment in artificial intelligence models such as support vector machines, decision trees, and deep neural networks. It also adapts to the processing speed required for predicting massive amounts of data in real-world scenarios.
[0107] 4) Technical Details: After the vehicle leaves the detector-free section, a fusion solution is used to control the virtual vehicle. This solution enables the virtual vehicle to smoothly adjust its position in the shortest possible time, based on the required fusion time, to minimize the gap with the real vehicle's position.
[0108] 5) Effect maintenance: By setting thresholds to maintain model effects, we can adapt to the ever-changing demand for model updates in real-world scenarios and avoid the large consumption of computer resources by real-time update mechanisms such as reinforcement learning.
[0109] The above description is merely a preferred embodiment of the present invention and does not limit the present invention in any way. Any person skilled in the art who, without departing from the scope of the present invention, makes any equivalent substitution, modification, or other changes to the technical solution and technical content disclosed in the present invention shall be deemed to be within the scope of the present invention and still fall within the scope of protection of the present invention.
Claims
1. A method for predicting vehicle trajectories on a road section without a detector, characterized in that: The following steps are involved: S1: Collect historical data of real vehicles on the target detector-free road section. The real vehicle historical data includes the last data before the real vehicle enters the target detector-free road section and the first data after the real vehicle leaves the target detector-free road section. S2: Initialize the first training parameters of the XGBoost model for predicting the exit time and the second training parameters of the XGBoost model for predicting the target lane based on the real vehicle historical data; S3: Inputting the first training parameter and the second training parameter into the XGBoost model for predicting the departure time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the departure time outputs the predicted departure time of the virtual vehicle, and the XGBoost model for predicting the target lane outputs the predicted target lane of the virtual vehicle; S4: Input actual parameters, calculate the driving time of the virtual vehicle on the target detector-free road section according to the predicted exit time output by the XGBoost model for predicting the exit time, and obtain the predicted target lane of the virtual vehicle according to the XGBoost model for predicting the target lane; S5: Calculating the speed of the virtual vehicle according to the total distance of the target detector-free road section and the driving time; S6: Control the virtual vehicle to travel according to the calculated speed and predicted target lane.
2. The method for predicting vehicle trajectories on a detector-free road section according to claim 1, wherein: Real car historical data is updated in real time; The last data before the real vehicle enters the target detector-free road section includes: time, longitude, latitude, speed and lane; The first data of the real vehicle after leaving the target detector-free road section includes: longitude, latitude and lane.
3. The method for predicting vehicle trajectories on a detector-free road section according to claim 2, wherein: The real vehicle historical data is divided into a training set and a verification set; the training set participates in training, and the verification value calculated according to the verification set participates in verification.
4. The method for predicting vehicle trajectories on a detector-free road section according to claim 3, wherein: S3 further includes the following steps: regularly verifying the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane.
5. The method for predicting vehicle trajectories on a detector-free road section according to claim 4, wherein: The verification method is as follows: If the mean square error of the output predicted departure time is less than or equal to the first preset error threshold, then the XGBoost model of the current predicted departure time is saved; If the mean square error of the output predicted departure time is greater than the first preset error threshold, repeat steps S2 and S3; If the accuracy of the output predicted target lane is greater than or equal to the second preset threshold, the XGBoost model of the current predicted target lane is saved; If the accuracy of the output predicted target lane is less than the second preset threshold, repeat steps S2 and S3; The first preset error threshold and the second preset threshold belong to the verification value.
6. The method for predicting vehicle trajectories on a detector-free road section according to claim 2, wherein: The calculation method of the driving time in S4 is: the driving time is equal to the predicted exit time minus the time in the last data before the actual vehicle enters the target detector-free road section.
7. The method for predicting vehicle trajectories on a detector-free road section according to claim 2, wherein: The following steps are also included: After the real vehicle exits the target detector-free road section, the positions of the real vehicle and the virtual vehicle are compared. If the real vehicle is ahead of the virtual vehicle, the virtual vehicle increases its speed. If the real vehicle is behind the virtual vehicle, the virtual vehicle slows down. If the real vehicle and the virtual vehicle are at the same position, the speed of the virtual vehicle remains unchanged, so that the speeds of the virtual and real vehicles are synchronized. At the same time, the lanes of the real and virtual vehicles are compared, and the virtual vehicle is caused to change lanes to the lane of the real vehicle, so that the virtual and real vehicles are in the same lane. To complete the trajectory fusion of virtual vehicles and real vehicles.
8. The method for predicting vehicle trajectories on a detector-free road section according to claim 7, wherein: When the virtual vehicle increases its speed, the target speed is calculated as follows: V 目标 =V 当前 +|S (t,A,A*) |T 期望 , where V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标 If it is greater than the maximum speed limit of the target detector-free road section, update V 目标 is the maximum speed limit of the target detector-free road section; When the virtual vehicle slows down, the target speed is calculated as follows: V 目标 =V 当前 -|S (t,A,A*) |T 期望 , where V 目标 is the target speed of the virtual vehicle; V 当前 is the actual vehicle current speed; S (t,A,A*) is the position difference between the real vehicle and the virtual vehicle at time t, where t is the current time: T 期望 is the expected trajectory fusion time; if V 目标 If it is less than the minimum speed limit of the target detector-free road section, update V 目标 is the minimum speed limit of the target detector-free road section.
9. A vehicle trajectory prediction system for a detector-free road section, characterized in that: include: a data module configured to collect historical data of a real vehicle on a target detector-free road section, the historical data of the real vehicle including the last data before the real vehicle enters the target detector-free road section and the first data after the real vehicle leaves the target detector-free road section; A model module is configured to initialize a first training parameter of an XGBoost model for predicting an exit time and a second training parameter of an XGBoost model for predicting a target lane based on historical data of a real vehicle; Inputting the first training parameter and the second training parameter into the XGBoost model for predicting the exit time and the XGBoost model for predicting the target lane, respectively, for training, so that the XGBoost model for predicting the exit time outputs the predicted exit time of the virtual vehicle, and the XGBoost model for predicting the target lane outputs the predicted target lane of the virtual vehicle; Input actual parameters, calculate the driving time of the virtual vehicle on the target detector-free road section based on the predicted exit time output by the XGBoost model for predicting the exit time, and obtain the predicted target lane of the virtual vehicle based on the XGBoost model for predicting the target lane; It is also configured to calculate the speed of the virtual vehicle based on the total distance of the target detector-free road section and the driving time; The control module is configured to control the virtual vehicle to travel according to the calculated speed and the predicted target lane.
10. The vehicle trajectory prediction system for a detector-free road section according to claim 9, wherein: Data modules are updated in real time; The last data before the real vehicle enters the target detector-free road section includes: time, longitude, latitude, speed and lane; The first data of the real vehicle after leaving the target detector-free road section includes: longitude, latitude and lane.
Citation Information
Patent Citations
Prediction method for rapid road travel time
CN101436347A
Traffic flow parameter deletion filling method based on multi-source detector data
CN107919016A