A virtual-real traffic flow fusion method based on multi-source data
Patent Information
- Application Number
- CN202511987560.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-09-15
Smart Images

Figure CN122761589A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital transportation technology, specifically relating to a method for fusing virtual and real traffic flows based on multi-source data. Background Technology
[0002] With the development of intelligent transportation systems, the integrity and accuracy of traffic data are crucial for traffic monitoring and management. However, in practical applications, due to limitations in sensor technology, environmental interference, and the coverage limitations of data acquisition equipment, blind spots and gaps often appear in traffic data. These gaps not only affect the continuity and accuracy of traffic flow but also significantly impact traffic flow analysis, the establishment of prediction models, and traffic management decisions. Effectively filling these blind spots and gaps to ensure data continuity and consistency is of paramount importance. Therefore, this paper proposes a virtual-real traffic flow fusion method based on multi-source data. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies that often contain blind spots and gaps in traffic data, and to propose a virtual-real traffic flow fusion method based on multi-source data. This method intelligently identifies blind spots between two data sources and accurately compensates for these gaps. This process ensures seamless data flow connectivity and high consistency, providing a solid data foundation for traffic monitoring and management.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: Design a method for fusing virtual and real traffic flows based on multi-source data, including the following steps: Step 1: Data Preprocessing: Collect vehicle data from actual holographic road sections and simulated road sections, including vehicle longitude, latitude, heading angle, speed, and vehicle type, and convert the longitude and latitude into coordinates through UTM projection; Step 2, Data Instantiation: Based on the preprocessed data, select data from the past 10 seconds to predict the traffic flow status for the next second; Construct a vehicle trajectory dataset, including input data, target data, remaining time and destination data, to build a traffic flow prediction model; Step 3: Obtaining the lane centerline: Read the file containing lane line data, filter the line segments in the specified direction according to the vehicle's driving direction, connect the breakpoints in the lane lines to generate new line segment data, merge it with the original line segments for subsequent lane centerline calculation, convert the vehicle trajectory data into trajectory points, and classify them according to the regions in the lane lines for fitting the lane centerline. Step 4: Calculation of lane centerline: Process the trajectory points in batches to ensure that the roads in each batch are connected. Process the trajectory points of each batch into a continuous polygonal region, calculate the polygonal region and the centerline within the polygonal region, and finally merge the results of all batches. Step 5: Construction of Vehicle Trajectory Prediction and Fusion Model: The input to the vehicle trajectory prediction and fusion model is the processed vehicle trajectory data and lane centerline data, and the output is the predicted vehicle trajectory. The model structure is an LSTM network architecture, and the mean squared error is used as the loss function to measure the deviation between the predicted trajectory and the true trajectory.
[0005] Furthermore, in step one, the vehicle data of the actual holographic road segment is collected by roadside equipment and roadside units, and the vehicle data of the simulated road segment is generated by running the simulation algorithm through the SUMO engine.
[0006] Furthermore, in step two, the input data is the traffic flow data of the past 10 seconds, the target data is the traffic flow status of the next second, the remaining time refers to the time difference from the current time to the predicted time, and the endpoint data is the position or status of the vehicle at the predicted time point.
[0007] Furthermore, the traffic flow state prediction method involves inputting data from the past 10 seconds in the form of a sliding window, and using LSTM network time series modeling for prediction of the next second, with the output being the probability distribution of vehicle position and speed.
[0008] Furthermore, in step three, the lane line data is generated by fusing high-precision maps with lidar point clouds.
[0009] Furthermore, in step three, the original line segment is unprocessed lane line data. Points where the distance between adjacent lane line endpoints is greater than a threshold are identified as breakpoints. Interpolation is used to connect the breakpoints to generate new line segment data. Data interpolation is then used to merge the newly generated line segment with the original line segment into a continuous lane line data.
[0010] Furthermore, in step three, the region classification involves converting each location point in the trajectory data into point coordinates in a planar coordinate system and classifying the trajectory points according to lane type or road segment region.
[0011] Furthermore, in step four, the data of each batch is processed in parallel using a multi-core processor. The processing results include the vertex coordinates of the polygonal region and the geometric data of the lane centerline. All the lane centerline data of all batches are spliced together in spatial order to form a complete lane centerline.
[0012] Furthermore, in step five, the method for constructing the vehicle trajectory prediction and fusion model specifically includes the following steps: a. Set model parameters, including time series length, batch size, number of LSTM layers, and load the processed vehicle trajectory and lane centerline data; b. Load the vehicle trajectory dataset, divide the dataset into training and validation sets, and create a data loader; c. Instantiate the model, define the loss function and optimizer, and set the dynamic learning rate scheduler; d. Train and validate the model, record the loss, accuracy and error, and save the model locally; e. Visualize the training and validation loss, accuracy, and distance error.
[0013] Furthermore, the vehicle trajectory dataset includes lane line data, trajectory data, and auxiliary information such as timestamps and vehicle IDs, which are used for model training and validation.
[0014] This invention proposes a virtual-real traffic flow fusion method based on multi-source data. The beneficial effects are as follows: This invention achieves virtual-real fusion of multi-source traffic data, effectively filling blind spots and gaps in traffic data. The implementation of this technology is crucial for various traffic monitoring and management applications. Its main purpose is to provide an accurate and reliable data fusion method for traffic monitoring and management. By intelligently identifying and filling data gaps, it significantly improves the completeness and accuracy of traffic data, meeting the needs of various applications and enhancing the efficiency and safety of the traffic system. Specifically: (1) This invention establishes a prediction model to ensure the integrity and accuracy of the data, providing a solid data foundation for establishing an accurate traffic flow prediction model and improving the reliability of the prediction.
[0015] (2) This invention provides continuous and consistent traffic flow data by fusing vehicle trajectory data with simulated road segment data and actual holographic road segment data, which helps to analyze traffic flow patterns and optimize traffic flow management.
[0016] (3) This invention provides seamless traffic flow data through traffic management decision-making, helping traffic management departments to make more accurate decisions and improve traffic management efficiency.
[0017] (4) This invention can enhance the data support capability of intelligent transportation systems, improve the system's response speed and processing capability to traffic conditions, and enhance the overall intelligence level of the transportation system. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1This is a flowchart of the virtual-real traffic flow fusion of multi-source data in this invention; Figure 2 This is a flowchart of the data instantiation process of this invention; Figure 3 This is a flowchart of the process for obtaining the lane centerline in this invention; Figure 4 This is a flowchart of the vehicle trajectory prediction and fusion model construction of the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] The structural features of the present invention will now be described in detail with reference to the accompanying drawings.
[0021] See Figures 1-4 A method for fusing virtual and real traffic flows based on multi-source data, specifically including the following steps: S1. Data Preprocessing: Collect vehicle data from actual holographic road sections and simulated road sections, including vehicle longitude, latitude, heading angle, speed and vehicle type, and convert the longitude and latitude into coordinates through UTM projection.
[0022] The vehicle data for the actual holographic road section is collected by roadside equipment such as radar and checkpoint cameras, and roadside units (RSUs), while the vehicle data for the simulated road section is generated by running simulation algorithms through the SUMO engine.
[0023] S2, Data Instantiation: S21. Based on the preprocessed data, select data from the past 10 seconds to predict the traffic flow status for the next second; S22. Construct a vehicle trajectory dataset, including input data, target data, remaining time and destination data, to build a traffic flow prediction model.
[0024] The input data consists of traffic flow data from the past 10 seconds, the target data is the traffic flow state for the next second, the remaining time refers to the time difference from the current time to the prediction time, and the endpoint data is the position or state of vehicles at the prediction time. The traffic flow state prediction method uses the past 10 seconds of data as input in a sliding window format, and the prediction for the next second uses time series modeling with an LSTM network. The output is the probability distribution of vehicle position and speed.
[0025] S3, Obtaining the Lane Center Line: S31. Read the file containing lane line data and filter the line segments in the specified direction according to the vehicle's driving direction; S32. Connect the breakpoints in the lane lines to generate new line segment data, merge it with the original line segments, and use it for subsequent lane centerline calculations. S33. Convert vehicle trajectory data into trajectory points and classify them according to the area of the lane line for fitting the lane center line.
[0026] Lane line data is generated by fusing high-precision maps and LiDAR point clouds. This data is represented as a series of continuous point coordinates, with each lane line accompanied by attribute information, including lane type, lane number, and driving direction. Line segments in a specified direction are selected based on the vehicle's driving direction. The original line segments are unprocessed lane line data. Points where the distance between adjacent lane line endpoints exceeds a threshold are identified as breakpoints. Interpolation is used to connect these breakpoints, generating new line segment data. Data interpolation is then used to merge the newly generated line segments with the original line segments into a continuous lane line data set. A region-based classification method converts each location point in the vehicle trajectory data into point coordinates in a planar coordinate system. The trajectory points are then classified according to lane type (e.g., left turn, straight, right turn) or road segment region (e.g., intersection, main road). Lane line data describes the road geometry, while vehicle trajectory data describes the actual driving path of the vehicle.
[0027] S4. Calculation of lane centerline: The trajectory points are processed in batches to ensure that the roads in each batch are connected. Each batch of trajectory points is processed into a continuous polygonal region. The polygonal region and its centerline are calculated. Finally, the results of all batches are merged.
[0028] The trajectory points are divided into batches to form continuous polygonal regions, representing the possible range of vehicle travel. A multi-core processor is used to process each batch of data in parallel. Each batch of trajectory points is processed into a continuous polygonal region, and the processing results include the vertex coordinates of the polygonal regions and the geometric data of the lane centerlines. The points within each region are sorted and connected to form the lane centerlines. All batches of lane centerline data are then spliced together in spatial order to form complete lane centerlines. The generated road centerline data is saved as a file for later use, and visualization tools can be used to display the original line segments, generated polygonal regions, and new centerlines for analysis and verification.
[0029] S5. Construction of Vehicle Trajectory Prediction and Fusion Model: Specifically, the steps include the following: S51. Set model parameters, including time series length, batch size, number of LSTM layers, etc., and load the processed vehicle trajectory and lane centerline data; S52. Load the vehicle trajectory dataset, divide the dataset into training and validation sets, and create a data loader, including simplifying the geometry of the centerline and sorting the centerlines according to their positions. S53. Instantiate the model, define the loss function and optimizer, and set the dynamic learning rate scheduler; S54. Perform model training and validation, record loss, accuracy and error, and save the model locally; S55. Visualize the training and validation loss, accuracy, and distance error for results analysis and presentation.
[0030] The vehicle trajectory prediction and fusion model includes a temporal convolutional network, an encoder, a decoder, and a vehicle speed negative feedback correction module. The vehicle trajectory dataset contains lane line data, trajectory data, and auxiliary information such as timestamps and vehicle IDs, which are used for model training and validation. The input of the vehicle trajectory prediction and fusion model is the processed vehicle trajectory data and lane centerline data, and the output is the predicted vehicle trajectory. The model structure is an LSTM network architecture, and the mean squared error (MSE) is used as the loss function to measure the deviation between the predicted trajectory and the true trajectory. Euclidean distance calculation, accuracy evaluation, and point-to-centerline distance calculation are used to accurately predict and correct the vehicle trajectory.
[0031] The present invention provides a virtual-real traffic flow fusion method based on multi-source data. This method integrates virtual and real traffic flow data, calculates lane centerlines, and predicts vehicle trajectories using machine learning methods. This is achieved through loading lane line data, adding breakpoint line segment data, trajectory point transformation, trajectory point sorting, line segment merging, batch processing, multi-process calculation, polygon region generation, point set region partitioning, point set sorting and connection, result merging, data storage, data visualization, and a comprehensive model. This not only improves the accuracy of traffic flow prediction but also provides fundamental data support and technical implementation for further traffic management and intelligent transportation systems. Specifically: Load lane line data: Read lane line data from a file and filter out line segments in the specified direction.
[0032] Add breakpoint line segment data: Connect breakpoints to generate new line segment data, which are used to complete the road centerline.
[0033] Trajectory point conversion: Convert each location point in the vehicle trajectory data into point coordinates in a planar coordinate system to obtain the vehicle's trajectory coordinates, and then convert it into a geometric point object.
[0034] Trajectory point sorting: The acquired trajectory points are sorted according to spatial order, and duplicate points are removed to form a clear trajectory line.
[0035] Segment merging: Merges the original segment data with the newly added breakpoint segment data to provide a basis for generating a complete road centerline.
[0036] Batch processing: The processed trajectory points are processed in batches to meet the computational needs of large-scale datasets.
[0037] Multi-process computing: Utilizes multi-core processors to process batches of data in parallel, improving computational efficiency.
[0038] Polygon region generation: For each batch of trajectory points, polygon regions are generated, which represent the possible range of vehicle travel.
[0039] Point set region division: Group the trajectory points according to the polygon region they belong to.
[0040] Point sorting and connection: Sort the points in each region and connect them into a line to form the lane centerline.
[0041] Results merging: Merge the centerlines and polygon regions of all batches to obtain complete road centerline data.
[0042] Data saving: Save the generated road centerline data as a file for later use.
[0043] Data visualization: Visualization tools are used to display the original line segments, the generated polygonal regions, and the new centerline to facilitate analysis and verification of the results.
[0044] The batch processing and multi-process computation described above improve the efficiency of large-scale data processing, and the accuracy of centerlines is improved through precise geometric operations and region division. It can process large-scale traffic trajectory data and generate accurate road centerlines.
[0045] A comprehensive model is constructed by integrating a temporal convolutional network, encoder, decoder, and vehicle speed negative feedback correction module to build a comprehensive vehicle trajectory prediction and fusion model for extracting time-series features and predicting vehicle trajectories. When outputting the prediction results, data inverse normalization and coordinate projection are used to correct scattered trajectory points to the road centerline and convert them into latitude and longitude coordinates, outputting the predicted trajectory data.
[0046] Through the comprehensive model and vehicle trajectory prediction described above, high-precision prediction and rapid correction of vehicle trajectories are achieved. It has the ability to process multi-source data and fill data gaps, which can meet the needs of data continuity and consistency in traffic monitoring and management, and improve the accuracy and reliability of traffic flow prediction.
[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for fusing virtual and real traffic flows based on multi-source data, characterized in that, The steps include the following: Step 1: Data Preprocessing Collect vehicle data from actual holographic road sections and simulated road sections, including vehicle longitude, latitude, heading angle, speed and vehicle type, and convert the longitude and latitude into coordinates through UTM projection; Step 2, Data Instantiation: Based on the preprocessed data, the traffic flow status for the next second is predicted by selecting data from the past 10 seconds. Construct a vehicle trajectory dataset, including input data, target data, remaining time and destination data, to build a traffic flow prediction model; Step 3: Obtaining the lane center line: Read the file containing lane line data and filter the line segments in the specified direction based on the vehicle's direction of travel; Connect the breakpoints in the lane lines to generate new line segment data, merge them with the original line segments, and use them for subsequent lane centerline calculations; Vehicle trajectory data is converted into trajectory points and classified according to lane line regions for fitting lane center lines; Step 4: Calculation of lane center line: The trajectory points are processed in batches to ensure that the roads in each batch are connected. Each batch of trajectory points is processed into a continuous polygonal region. The polygonal region and the center line within the polygonal region are calculated. Finally, the results of all batches are merged. Step 5: Construction of vehicle trajectory prediction and fusion model: The input to the vehicle trajectory prediction and fusion model is the processed vehicle trajectory data and lane centerline data, and the output is the predicted vehicle trajectory. The model structure is an LSTM network architecture, and the mean squared error is used as the loss function to measure the deviation between the predicted trajectory and the true trajectory.
2. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step one, the vehicle data of the actual holographic road segment is collected by roadside equipment and roadside units, and the vehicle data of the simulated road segment is generated by running the simulation algorithm through the SUMO engine.
3. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step two, the input data is the traffic flow data of the past 10 seconds, the target data is the traffic flow status of the next second, the remaining time refers to the time difference from the current time to the predicted time, and the endpoint data is the position or status of the vehicle at the predicted time point.
4. The virtual-real traffic flow fusion method based on multi-source data according to claim 3, characterized in that, The traffic flow state prediction method involves inputting data from the past 10 seconds in the form of a sliding window, and using LSTM network time series modeling for prediction of the next second, with the output being the probability distribution of vehicle position and speed.
5. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step three, the lane line data is generated by fusing high-precision maps with lidar point clouds.
6. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step three, the original line segment is unprocessed lane line data. Points where the distance between adjacent lane line endpoints is greater than a threshold are identified as breakpoints. Interpolation is used to connect the breakpoints to generate new line segment data. Data interpolation is then used to merge the newly generated line segment with the original line segment into a continuous lane line data.
7. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step three, the area classification involves converting each location point in the trajectory data into point coordinates in a planar coordinate system and classifying the trajectory points according to lane type or road segment area.
8. The virtual-real traffic flow fusion method based on multi-source data according to claim 1, characterized in that, In step four, a multi-core processor is used to process the data of each batch in parallel. The processing results include the vertex coordinates of the polygonal region and the geometric data of the lane centerline. All the lane centerline data of all batches are spliced together in spatial order to form a complete lane centerline.
9. A method for fusing virtual and real traffic flows based on multi-source data according to claim 1, characterized in that, In step five, the method for constructing the vehicle trajectory prediction and fusion model specifically includes the following steps: Set the model parameters, including time series length, batch size, number of LSTM layers, and load the processed vehicle trajectory and lane centerline data; Load the vehicle trajectory dataset, divide the dataset into training and validation sets, and create a data loader; Instantiate the model, define the loss function and optimizer, and set the dynamic learning rate scheduler; Perform model training and validation, record loss, accuracy and error, and save the model locally; Visualize the training and validation loss, accuracy, and distance error.
10. A method for fusing virtual and real traffic flows based on multi-source data according to claim 9, characterized in that, The vehicle trajectory dataset includes lane line data, trajectory data, and auxiliary information such as timestamps and vehicle IDs, which are used for model training and validation.