A traffic event digital twin reproduction method based on V2X data communication network
Through the V2X data communication network and machine learning technology, structured data is collected directly from vehicles and roadside equipment, solving the high cost and redundancy problems of relying on video surveillance, and achieving efficient and accurate traffic event detection and reproduction.
Patent Information
- Application Number
- CN202510040386.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-01-10
AI Technical Summary
Existing traffic incident detection and reconstruction systems rely on video surveillance data, which leads to high costs, large resource consumption and a lot of redundant information, making it difficult to achieve accurate event reconstruction.
A method based on the V2X data communication network is adopted to collect structured data through the vehicle-mounted unit and roadside unit, and convolutional neural network and bidirectional long short-term memory network are used to detect and reproduce traffic events. The Open Street Map and SUMO simulation software are combined to perform high-precision scene reconstruction.
It achieves low-cost and efficient traffic event detection and reproduction, improves the efficiency and accuracy of the system, and avoids the high cost of video stream processing and errors caused by redundant information.
Smart Images

Figure CN119811090B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation systems and relates to a digital twin reproduction method of traffic events based on a V2X data communication network. Background Art
[0002] Current traffic incident detection and reconstruction systems typically rely on large-scale video surveillance data collection and analysis. These systems require the deployment of numerous cameras on roads and intersections, capturing behavioral data on vehicles, pedestrians, and other road users. In this approach, traffic incident detection relies on image processing techniques and computer vision algorithms, typically involving complex processes such as object recognition, trajectory tracking, and behavior prediction. However, these systems suffer from several significant limitations.
[0003] First, the processing and analysis of video surveillance data requires significant human and material resources. For example, accurately extracting traffic behavior from video often requires specialized personnel to label and verify the video data. Second, the storage and transmission costs of video data are extremely high. Especially when long-term monitoring and storage are required, storage device and bandwidth requirements can rapidly increase. Furthermore, video data analysis requires high-performance computing resources to process large video streams in real time, which increases the system's financial burden.
[0004] When it comes to generating structured data, video data processing often includes a significant amount of unnecessary information, such as background information and noise. This results in highly redundant structured data, hindering subsequent digital twin scene reconstruction. This large amount of redundant information complicates the reconstruction of traffic incidents and hinders accurate event reproduction. In digital twin systems, this redundant information can affect the true reconstruction of events, obscuring key details and compromising system efficiency and accuracy.
[0005] In contrast, traffic incident detection and reconstruction methods based on V2X (Vehicle-to-Everything) data can effectively avoid these problems. By directly collecting structured data from vehicles and roadside equipment, they can accurately record vehicle status and environmental information, reducing the generation of redundant data. This approach also avoids the high cost of video systems, lowers the barrier to entry for traffic incident detection and reconstruction, and improves system efficiency and accuracy. Summary of the Invention
[0006] In light of this, the present invention aims to provide a traffic event digital twin reconstruction method based on a V2X data communication network to address issues such as inaccurate traffic event detection and the difficulty of reconstructing traffic accidents. The system consists of two main components: a module for detecting traffic events using V2X data and a module for reconstructing traffic accidents.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] A traffic event digital twin replay method based on a V2X data communication network, the method comprising the following steps:
[0009] S1: The OBUs at the intersection where the accident occurred collect driving data in real time through the vehicle Ethernet. The OBUs establish a vehicle-to-everything (V2X) communication connection with the roadside RSUs within their signal coverage, collect traffic light and map-related data, and transmit the acquired V2X data to the local server via the RSUs.
[0010] S2: In the local server, the obtained V2X data is pre-processed;
[0011] S3: The processed data of each vehicle is first input into the convolutional block attention module to learn the important features of each vehicle;
[0012] S4: The feature-extracted data is then fed into a bidirectional long short-term memory network to learn the global temporal correlation between each vehicle.
[0013] S5: The learned data is passed through the multi-layer perceptron module to determine what kind of traffic event it belongs to;
[0014] S6: Based on the traffic event that is detected, a digital twin is generated in the simulator for scenes and dynamic objects, and the traffic event is restored based on previous data.
[0015] Furthermore, in S1, the V2X data includes parameters such as the vehicle's position, speed, acceleration, direction, throttle status, brake status, and steering angle, which fully reflect the vehicle's driving status and driving behavior. Through this V2X connection, the OBU can receive and integrate status information from traffic lights, surrounding road conditions, and map data in real time, ensuring that driving data and key information about the traffic environment are updated synchronously.
[0016] Furthermore, in S2, the obtained V2X raw data is decoded and the data of each vehicle is classified in chronological order. V2X data consists of three types: basic safety message BSM, signal light status and timing SPaT, and map data MAP. Each type of data works closely together in time and space dimensions to jointly realize the detection and reproduction of traffic events. BSM data describes the dynamic state of the vehicle and is the core data source reflecting vehicle behavior, including timestamp, latitude and longitude and altitude, speed, acceleration, direction angle, azimuth speed, braking status, and historical path point information. BSM also records Vehicle size information provides a geometric basis for accurate modeling of traffic events; SPaT data is used to reflect the dynamic status of traffic lights, including intersection ID and signal group ID, current light status, and minimum and maximum green light durations; SPaT data is linked to vehicle status data in the BSM through timestamps, supporting in-depth analysis of the interaction between vehicles and lights; MAP data provides a geographic basis for spatial modeling of traffic events, including reference points for setting map base coordinates, point sets for defining road geometry, lane IDs for matching the specific lanes where vehicles are located, and continuous lane indices.
[0017] Furthermore, in S3, in the convolutional block attention module, in the channel attention module, for a given feature map F∈R C×H×W ; First perform average pooling and maximum pooling to obtain two feature maps: and The resulting formula is as follows:
[0018]
[0019] Where H and W are the length and width of the input image respectively. is the feature vector after average pooling, is the feature vector after maximum pooling, F(i, j) represents the calculation of the number in the i-th row and j-th column;
[0020] The pooled feature map is then input into a shared fully connected layer to generate the channel attention weight, as follows:
[0021]
[0022] Among them, σ is the Sigmoid activation function, M c Channel attention weight, FC means full connection layer calculation; then the attention weight M c Applied to the original feature image, we get the weighted output, which is as follows:
[0023] F'=M c ·F
[0024] Where F is the original feature map, and F is the feature map obtained after calculation;
[0025] Given the input feature F∈R in the temporal attention module T×C , first perform average pooling and maximum pooling along the channel dimension, the formula is as follows:
[0026]
[0027] Among them, C is the number of channels of input features, F(t, k) represents the calculation of the t-th feature channel, and the obtained and are two vectors of length T, representing the feature average and feature maximum in the time dimension;
[0028] Then you will get and Concatenate to form a T×2 vector, and use a convolution kernel to convolve the concatenated features to generate the time attention weight. The formula is as follows:
[0029]
[0030] Among them, σ is the Sigmoid activation function, M t is the temporal attention weight, Conv represents the convolution calculation; then the temporal attention weight is applied to the features of each time step to obtain the temporal weighted graph, the formula is as follows:
[0031] F'=M t ·F
[0032] Where F is the original feature map, and F is the feature map obtained after calculation.
[0033] Furthermore, in the above S4, for the bidirectional long short-term memory network, the given input sequence X=(x1, x2, ..., x t ), where x t Is the input of time step t, the bidirectional long short-term memory network calculates the forward hidden state and backward hidden state of each time step and combines them together;
[0034] The calculation formula for the hidden state in the forward long short-term memory network is as follows:
[0035]
[0036] in, Represents the hidden state of the forward long short-term memory network at time t-1, LSTM forward Indicates that the forward calculation of LSTM is performed. represents the hidden state of the forward long short-term memory network at time t;
[0037] The calculation formula for the hidden state in the backward long short-term memory network is as follows:
[0038]
[0039] in, Represents the hidden state of the forward long short-term memory network at time t+1, LSTM backward Indicates that the backward calculation of LSTM is performed. represents the hidden state of the backward long short-term memory network at time t;
[0040] The forward and backward hidden states are concatenated at the output layer as the final hidden state of the bidirectional long short-term memory network at time t:
[0041]
[0042] Among them, h t is the hidden state of the bidirectional long short-term memory network at time t, which contains the context information obtained from the algorithm;
[0043] The internal calculations in the bidirectional long short-term memory network include input gate, forget gate, output gate, candidate memory gate, updating memory state and updating hidden state. The specific formula is as follows:
[0044]
[0045] The above formula is the calculation formula for input gate, forget gate, output gate, candidate memory gate, update memory state and update hidden state, where σ, x t 、W x 、W h 、h t-1 , b, and tanh represent the Sigmoid activation function, the input matrix, the weight matrix between the current gate and the input matrix, the weight matrix between the current gate and the hidden state of the previous time step, the hidden state of the previous time step, the bias term of the current gate, and the Tanh activation function, respectively; i t 、f t 、o t 、 ct and ht represent the calculation result after the input gate, the calculation result after the forget gate, the calculation result after the output gate, the calculation result after the candidate memory gate, the calculation result after the memory state update algorithm, and the calculation result after the hidden state update algorithm, respectively.
[0046] Furthermore, in S5, the multilayer perceptron package includes three hidden layers and one output layer, and the calculation formula is as follows:
[0047]
[0048] Among them, h is the hidden layer output, f uses the ReLU activation function, W 1,2 represents the weight matrix, b 1,2 represents the bias value; y is the final output, and g uses the softmax activation function for multi-classification;
[0049] The output is a 3D vector, which represents the probability of three traffic events: vehicle accidents, traffic congestion, and failure to comply with traffic regulations.
[0050] Furthermore, in S6, after a vehicle traffic accident is detected, time information is used to backtrack, extract information from the original data, and restore the traffic event in the simulator. First, after the system detects the specific time, location, and related entities of the accident, the system backtracks forward or backward based on the timestamp information to extract information before and after the accident from the recorded original data. The information includes the vehicle speed, acceleration, lane position, and motion state at the time of the accident. The extracted information is organized and structured and imported into the simulator as input data.
[0051] To recreate a traffic event scenario, Open Street Map is first used to obtain base map data for the target area, including geographic information such as the road network, lane information, and the locations of traffic signs and signals. This data is then imported into the Road Runner tool for editing and optimization. Traffic infrastructure information, including precise lane distribution, lane widths, signal logic, crosswalks, and the locations of static roadside objects, is added manually or automatically to generate a high-precision map model capable of supporting simulation. Next, the generated map is imported into the SUMO simulation software. Using dynamic information extracted from V2X data, namely the location, speed, acceleration of vehicles and traffic lights, as well as changes in signal status, traffic flow parameters and simulation configurations are set to recreate the dynamic process of the traffic event in SUMO, generating simulated vehicle and interaction behavior data. The SUMO simulation trajectory data is then imported into the CARLA simulation platform, where the high-precision map environment is simultaneously loaded and dynamic entities are generated in the scene based on the trajectory data. Through CARLA's physical simulation, the details of the relative motion and interaction behaviors of vehicles in the traffic event are reproduced.
[0052] The beneficial effects of the present invention lie in: This method implements V2X communication-based data collection through onboard units (OBUs) and roadside units (RSUs), acquiring high-precision target information directly from vehicles and traffic infrastructure. The OBUs collect dynamic information such as vehicle speed, acceleration, heading, and position. Combined with traffic light status (SPaT) (e.g., current state, minimum and maximum green light duration) and map scene data (MAP) (e.g., road geometry, lane ID, and continuous lane index) broadcast by the RSUs, this method enables efficient collection of multi-source traffic data at a lower cost and with higher real-time performance. Unlike video streaming, V2X communication directly provides structured data, eliminating the need for complex target recognition and information extraction processes. This significantly reduces system resource consumption and avoids data loss or errors caused by environmental interference. The collected V2X data is decoded and preprocessed to extract vehicle, traffic light, and map information. A convolutional neural network (CNN) combined with an attention mechanism extracts local features for comprehensive analysis of vehicle dynamics and the traffic environment. Subsequently, a bidirectional long short-term memory (BiLSTM) network is used to model the temporal dependencies between vehicles, traffic lights, and road scenes. Finally, a multi-layer perceptron (MLP) classification model was used to identify traffic event types. Combined with Open Street Map and Road Runner, an accurate road network model was constructed. The V2X data was then fed into the SUMO simulation software to restore and dynamically recreate the event scene. This method leverages the accuracy, structured nature, and real-time nature of V2X broadcast data, significantly improving the efficiency and accuracy of traffic event detection and reconstruction while avoiding the high costs and limitations of traditional video stream processing. This provides an efficient and reliable solution for intelligent transportation and accident analysis.
[0053] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:
[0055] Figure 1 This is a system structure diagram of the present invention;
[0056] Figure 2 The present invention is a framework for traffic event detection and traffic event reproduction;
[0057] Figure 3 Reproduce the flow chart for the traffic incident. DETAILED DESCRIPTION
[0058] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0059] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.
[0060] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0061] V2X data consists of three types: BSM (Basic Safety Messages), SPaT (Signal State and Timing), and MAP (Map Data). These types of data work closely together in time and space to detect and reconstruct traffic events. Table 1 shows the V2X data used.
[0062] Table 1
[0063]
[0064]
[0065] BSM data is the core data source for describing a vehicle's dynamic state, primarily used to reflect the vehicle's real-time behavior and status during traffic events. It contains several key fields, such as a timestamp, which records the specific time the data was generated, ensuring temporal alignment of events; latitude, longitude, and altitude information, which precisely identify the vehicle's current location; speed and acceleration fields, which describe the vehicle's motion, such as sudden braking or rapid acceleration; and heading angle and azimuth velocity, which characterize the vehicle's direction and rotation, making them particularly useful for analyzing turning or lane changes. Furthermore, BSM includes information on the vehicle's braking status, used to determine whether an emergency brake has occurred, and historical trajectory points, which record the vehicle's past motion trajectory for subsequent trajectory tracing and analysis. Vehicle dimensional data (such as length, width, and height) provides the physical foundation for geometric modeling of traffic events. This information is not only used to recreate the vehicle's dynamics but also provides data support for analyzing its interactions with other traffic elements.
[0066] SPaT data is used to describe the dynamic state of traffic lights and their changing patterns, providing key information for signal control analysis in traffic event detection and reproduction. SPaT data contains intersection IDs and signal group IDs, which clearly identify the specific location and grouping of traffic lights, facilitating spatial association with vehicle status in BSM data. The current state field of the traffic light records the real-time state of the traffic light, such as the changes in red, green, or yellow lights, which is an important basis for determining whether a vehicle has violated the traffic light regulations. The minimum and maximum green light time fields predict the duration range of the traffic light in its current state, providing data support for traffic signal optimization analysis. By matching with the timestamps in the BSM data, SPaT data can help analyze the dynamic interaction of vehicles with traffic lights within a specific time period, especially in traffic events such as running red lights and sudden braking.
[0067] MAP data is used to provide the geographical and road structure basis of traffic event scenarios, mainly describing the geometry and topological relationships of the road network. MAP data includes a reference point field, which serves as the base coordinate of the map and is used to locate all road elements; the point set field defines the geometry of the road and describes the connection relationship between multiple segments of coordinate points, providing a basis for high-precision road modeling; the lane ID and continuous lane index are used to identify specific roads and their continuity, making it easier to determine the spatial relationship between vehicles and roads. In the re-enactment of traffic events, MAP data is combined with the vehicle position information of BSM and the signal light position of SPaT to achieve accurate positioning of vehicles in the road environment, while supporting the re-enactment of road network characteristics (such as complex scenarios such as multiple lanes and intersections). This information provides a complete geographical background and scenario support for the digital twin re-enactment of traffic events.
[0068] Figure 1The overall structure framework of the system is mainly divided into three modules: data collection, event detection and event reproduction. The overall description is as follows:
[0069] The data collection module collects data from each vehicle (such as speed, location, acceleration, and direction of travel) as well as surrounding environmental data (such as traffic light status) monitored by roadside units (RSUs). All of this data is transmitted in real time to a local server via onboard Ethernet and V2X network forwarding devices for integration and analysis. This real-time collection and integration of multi-source data enables the system to obtain comprehensive traffic information, ensuring accurate event detection and complete scene reconstruction.
[0070] Before entering the event detection module, the received data first undergoes a rigorous data preprocessing step. This step cleans, removes noise, and converts the raw data to ensure data quality and consistency. The system then categorizes and extracts various types of information, including key driving data such as vehicle speed, position, and acceleration; traffic light status and cycle; and map information. The structured data generated by the preprocessing module provides accurate, de-redundant input for the event detection algorithm, reducing data noise during the calculation process.
[0071] In the event detection module, processed data is fed into a machine learning or rule-based event detection algorithm for computation. This algorithm determines whether a potential traffic incident exists based on characteristics such as the relative position, direction, and speed of vehicles. Once a potential traffic incident is detected, the system extracts key information about the incident, including the specific data of the vehicles involved, the geographic location of the incident, and relevant spatiotemporal information. This structured event data provides reliable support for subsequent scene reconstruction.
[0072] In the traffic incident reconstruction module, the system first utilizes the open-source map resource Open Street Map (OSM) and the traffic simulation modeling tool Road Runner to create a high-precision map of the incident area. Open Street Map provides the system with detailed geographic information such as road structure, traffic signs, and surrounding buildings, while Road Runner provides map customization and fine-tuning capabilities to ensure the modeling matches the actual traffic environment. The map model generated in this stage provides a realistic and accurate 3D scene for traffic incident simulation.
[0073] After completing map modeling, the system imports the map data and extracted traffic event data into the traffic simulation platform SUMO (Simulation of Urban Mobility). In the SUMO simulation environment, the system recreates the process of traffic events, reproducing details such as vehicle movement trajectories, collision scenarios, and traffic light changes.
[0074] Figure 2 The traffic incident detection model architecture of the system is described as follows:
[0075] During model training, the system first performs comprehensive preprocessing on the collected V2X data. This data includes status information such as vehicle speed, acceleration, location, and direction of travel, as well as key environmental information such as map geodata and traffic light status. Because these data sources come from various vehicles and roadside equipment, the raw data must first be decoded to ensure that each data item is correctly parsed and key information is extracted from it, preparing for subsequent data processing and feature extraction.
[0076] Next, the decoded data is processed for dimensionality reduction to reduce data redundancy and feature complexity. The system performs One-Hot encoding on the categorical feature of the traffic light status, converting the character features of the traffic light into integer values. This not only retains the characteristic differences between different traffic light states, but also avoids the misunderstanding that the categorical data has a sequential relationship in terms of values. In addition, for missing data in the dataset, the system will use appropriate filling methods based on business needs and data characteristics to ensure data integrity and consistency. In the last step of data preprocessing, the system uses data normalization to map all feature data to the range of 0 to 1. This not only helps to reduce the differences between data, but also accelerates the convergence of the model and improves training efficiency and stability.
[0077] In the feature extraction stage, the system constructs a convolution block-attention module to extract local features of V2X data. In this module, each vehicle data will be combined with the corresponding map and traffic light data, and the local perception mechanism of the convolution layer will be used to extract key spatial features, and the weights of important features will be enhanced through the attention mechanism. The reason for using the Sigmoid activation function here is that the Sigmoid function can compress the output to between 0 and 1, which is suitable for emphasizing or weakening the weight of features in the attention mechanism. The smooth curve of Sigmoid enables the model to gently highlight or suppress each feature, thereby obtaining a richer feature expression. In the convolution block attention module, for a given feature map F∈R in the channel attention module C×H×W ; First perform average pooling and maximum pooling to obtain two feature maps: and The resulting formula is as follows:
[0078]
[0079] The pooled feature map is then input into a shared fully connected layer to generate the channel attention weight, as follows:
[0080]
[0081] Among them, σ is the Sigmoid activation function, M c Channel attention weight. Then the attention weight M c Applied to the original feature image, we get the weighted output, which is as follows:
[0082] F'=M c ·F
[0083] Given the input feature F∈R in the temporal attention module T×C , first perform average pooling and maximum pooling along the channel dimension, the formula is as follows:
[0084]
[0085] Among them, the obtained and They are two vectors of length T, representing the feature average and feature maximum in the time dimension.
[0086] Then you will get and Concatenate to form a T×2 vector, and use a convolution kernel to convolve the concatenated features to generate the time attention weight. The formula is as follows:
[0087]
[0088] Among them, σ is the Sigmoid activation function, M t is the temporal attention weight. Then the temporal attention weight is applied to the features of each time step to obtain the temporal weighted graph, which is as follows:
[0089] F'=M t ·F
[0090] Based on the extracted local features, the system feeds the data into a bidirectional long short-term memory (BiLSTM) network to learn the temporal relationships between vehicles by combining map and traffic light data. Bidirectional LSTM can capture complex dependencies in the temporal dimension, enabling the model to simultaneously focus on past and future states, thereby more accurately describing the interactions between vehicles in traffic events.
[0091] To balance model performance and computational resources, the following carefully designed hyperparameter configurations were employed when training the BiLSTM model: First, the number of neurons in the model's hidden layer was set to 128. This dimension balances the richness of feature expression with computational efficiency, ensuring effective capture of complex features in the input data. To further enhance the model's temporal learning capabilities, the network was designed as a bidirectional structure consisting of two stacked LSTM layers. This stacked design enables the model to extract information from deeper time steps and adapt to dependencies spanning larger timescales.
[0092] Furthermore, we set the time step length to 50, which captures medium-length temporal dependencies and is sufficiently perceptive for longer patterns in time series. Furthermore, the learning rate was set to 0.001, and the Adam optimizer was used. Adam adaptively adjusts the learning rate, enabling more robust parameter updates and accelerating convergence. The batch size was set to 128, suitable for larger training data sets. This ensures that each update reflects the characteristics of the overall data while improving the utilization of parallel resources such as GPUs.
[0093] For regularization, a dropout ratio of 0.2 was used to prevent overfitting and ensure the model maintains good generalization performance when exposed to new data. To avoid exploding gradients, the model's gradient clipping threshold was set to 5 to ensure that gradients do not become excessively large during backpropagation, maintaining a stable training process. Furthermore, the model's weight initialization used the Xavier initialization method, which ensures a more reasonable distribution of initial weights, accelerating early convergence of the network and improving training efficiency.
[0094] For the bidirectional long short-term memory network, the given input sequence X=(x1,x2,…,x t ), where x t Is the input of time step t, the bidirectional long short-term memory network calculates the forward hidden state and backward hidden state of each time step and combines them together.
[0095] The calculation formula for the hidden state in the forward long short-term memory network is as follows:
[0096]
[0097] in represents the hidden state of the forward LSTM network at time t.
[0098] The calculation formula for the hidden state in the backward long short-term memory network is as follows:
[0099]
[0100] in represents the hidden state of the backward long short-term memory network at time t.
[0101] The forward and backward hidden states are concatenated at the output layer as the final hidden state of the bidirectional long short-term memory network at time t:
[0102]
[0103] Among them, h t is the hidden state of the bidirectional long short-term memory network at time t, which contains the context information obtained from the algorithm.
[0104] The internal calculation in the bidirectional long short-term memory network includes the following parts: input gate, forget gate, output gate, candidate memory gate, update memory state and update hidden state. The specific formula is as follows:
[0105]
[0106] The above formulas are the calculation formulas for input gate, forget gate, output gate, candidate memory gate, update memory state and update hidden state from top to bottom, where σ, x t 、W x 、W h 、h t-1 , b, and tanh represent the Sigmoid activation function, the input matrix, the weight matrix of the current gate and the input matrix, the weight matrix of the current gate and the hidden state of the previous time step, the hidden state of the previous time step, the bias term of the current gate, and the Tanh activation function, respectively.
[0107] Here, BiLSTM uses both Sigmoid and Tanh activation functions. The Tanh function maps data to the range of -1 to 1, helping to capture both positive and negative changes. The Sigmoid function, with an output range of 0 to 1, is suitable for "gating" operations within the model, controlling the flow of information within a time series and thus optimizing the representation of time series data. This combination enables BiLSTM to better learn complex nonlinear relationships in the time dimension and accurately capture important time series features in traffic events.
[0108] After the BiLSTM module completes processing, the system inputs the learned high-dimensional features into the multi-layer perceptron (MLP) for final traffic event type identification.
[0109] The multilayer perceptron package contains 3 hidden layers and one output layer. The calculation formula is as follows:
[0110]
[0111] Among them, h is the hidden layer output, f uses the ReLU activation function, W represents the weight matrix, b represents the bias value; y is the final output, and g uses the softmax activation function for multi-classification.
[0112] 128 neurons are used in the hidden layer, and the output is a 3D vector, which represents the probability of three traffic events: vehicle accidents, traffic congestion, and failure to comply with traffic regulations.
[0113] The MLP maps multidimensional features to an output space through fully connected layers, thereby determining whether a specific traffic event occurred within a specific time period and the type of event. The final judgment result is returned to the original data for time search to find the relevant time period and the vehicle data involved.
[0114] After completing the event identification, the system extracts the vehicles within the time period when the event occurred and imports this data into the traffic event restoration module to achieve accurate reproduction of the actual traffic event.
[0115] To recreate a traffic event scenario, Open Street Map is first used to obtain basic map data for the target area, including geographic information such as the road network, lane information, and the locations of traffic signs and signals. This data is then imported into the Road Runner tool for editing and optimization. Detailed traffic infrastructure information, such as precise lane layout and width, signal logic, crosswalks, and the location of static roadside objects, is added manually or automatically to generate a high-precision map model suitable for simulation. Next, the generated map is imported into the SUMO simulation software. Using dynamic information extracted from V2X data (such as vehicle and vehicle position, speed, acceleration, and signal state changes), traffic flow parameters and simulation configurations are set to recreate the dynamic process of the traffic event in SUMO, generating simulated vehicle and interaction behavior data. The SUMO simulation trajectory data is then imported into the CARLA simulation platform, where the high-precision map environment is simultaneously loaded. Dynamic entities (including vehicles) are then generated in the scene based on the trajectory data. CARLA's high-fidelity physics simulation allows for realistic reproduction of the detailed relative motion and interaction behaviors of vehicles involved in the traffic event.
[0116] Figure 3 Reproduce the flow chart for traffic events, the details are as follows:
[0117] First, at time t1, the system receives a MAP message (map scene data), which contains static scene data such as road geometry, lane identification information, and continuous lane indexes. This data is used to build an accurate road network model as the basis for reproducing the entire scene.
[0118] Subsequently, starting at time t2, the system receives a series of Basic Safety Messages (BSMs). These BSMs contain dynamic information about the vehicle, such as speed, acceleration, heading, and position. At each time step, t2, t3, t4, and t5, the BSM data is updated in real time, describing the vehicle's changing state within the scene. By gradually overlaying the BSM data at each time step, the system accurately reconstructs the vehicle's trajectory and dynamic behavior within the scene.
[0119] Figure 2 As shown in the figure, at each time step, dynamic data is superimposed on the static scene data (provided by MAP), thus realizing the dynamic evolution of vehicles in the real road environment. For example, at time t2, a small number of vehicles enter the scene. As time progresses to t3 and t4, the number and position of vehicles change, simulating the changing process of traffic flow. Finally, at t5, some vehicles approach or collide.
[0120] In this way, the system, driven by V2X data, combines static road network scenarios with dynamic traffic behavior to reconstruct the accident process step by step. Compared to traditional methods that rely on video streams, this method offers higher data accuracy and real-time performance. It also provides a detailed depiction of the spatiotemporal evolution of traffic events, providing strong support for traffic accident analysis and research.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.
Claims
1. A traffic event digital twin reconstruction method based on a V2X data communication network, characterized by: The method comprises the following steps: S1: The OBUs at the intersection where the accident occurred collect driving data in real time through the vehicle Ethernet. The OBUs establish a V2X communication connection with the RSUs within the RSU signal coverage area, collect traffic light and map-related data, and transmit the acquired V2X data to the local server through the RSU devices. S2: In the local server, the obtained V2X data is pre-processed; S3: The processed data of each vehicle is first input into the convolutional block attention module to learn the important features of each vehicle; in the convolutional block attention module, for the given feature map F∈R C×H×W ; First perform average pooling and maximum pooling to obtain two feature maps: and The resulting formula is as follows: Where H and W are the length and width of the input image respectively. is the feature vector after average pooling, For the feature vector after maximum pooling, F(i,j) represents the calculation of the number in the i-th row and j-th column; The pooled feature map is then input into a shared fully connected layer to generate the channel attention weight, as follows: Among them, σ is the Sigmoid activation function, M c is the channel attention weight, FC represents the fully connected layer calculation; then the attention weight M c Applied to the original feature image, we get the weighted output, which is as follows: F’=M c ·F Where F is the original feature map, and F, is the feature map obtained after calculation; Given the input feature F∈R in the temporal attention module T×C , first perform average pooling and maximum pooling along the channel dimension, the formula is as follows: Among them, C is the number of channels of input features, F(t′,k) represents the calculation of the t′th feature channel, and the obtained and They are two vectors of length T, representing the feature average and feature maximum in the time dimension; Then you will get and Concatenate to form a T×2 vector, and use a convolution kernel to convolve the concatenated features to generate the temporal attention weight. The formula is as follows: Among them, σ is the Sigmoid activation function, M t′ is the temporal attention weight, Conv represents the convolution calculation; then the temporal attention weight is applied to the features of each time step to obtain the temporal weighted graph, the formula is as follows: F’=M t′ ·F Where F is the original feature map, and F' is the feature map obtained after calculation; S4: The feature-extracted data is then fed into a bidirectional long short-term memory network to learn the global temporal correlation between each vehicle. S5: The learned data is passed through the multi-layer perceptron module to determine what kind of traffic event it belongs to; S6: Based on the traffic event that is detected, a digital twin is generated in the simulator for scenes and dynamic objects, and the traffic event is restored based on previous data.
2. The traffic event digital twin reproduction method based on the V2X data communication network according to claim 1 is characterized by: In S1, the V2X data includes parameters such as the vehicle's position, speed, acceleration, direction, throttle status, brake status, and steering angle, reflecting the vehicle's driving status and behavior. Through this V2X connection, the OBU can receive and integrate status information from traffic lights, surrounding road conditions, and map data in real time, ensuring that driving data and key information about the traffic environment are updated synchronously.
3. The traffic event digital twin reproduction method based on the V2X data communication network according to claim 1 is characterized in that: In S2, the obtained V2X raw data is decoded and the data of each vehicle is classified in chronological order. V2X data consists of three types: basic safety messages (BSM), signal light status and timing (SPaT), and map data (MAP). These types of data work closely together in time and space to detect and reproduce traffic events. BSM data describes the dynamic state of the vehicle and is the core data source reflecting vehicle behavior. It includes timestamps, latitude and longitude, altitude, speed, acceleration, heading angle, azimuth velocity, braking status, and historical path points. BSM also records vehicle dimensions, providing a geometric basis for accurate modeling of traffic events. SPaT data is used to reflect the dynamic state of traffic lights, including intersection ID and signal group ID, the current state of the light, and the minimum and maximum green light durations. Through timestamps, SPaT data is associated with vehicle status data in the BSM, supporting in-depth analysis of the interaction between vehicles and traffic lights; MAP data provides a geographical basis for spatial modeling of traffic events, including reference points for setting map base coordinates, point sets for defining road geometry, lane IDs for matching the specific lanes where vehicles are located, and continuous lane indices.
4. The traffic event digital twin reproduction method based on the V2X data communication network according to claim 1 is characterized in that: In S4, for the bidirectional long short-term memory network, the given input sequence X=(x1,x2,…,x t ), where x t Is the input of time step t, the bidirectional long short-term memory network calculates the forward hidden state and backward hidden state of each time step and combines them together; The calculation formula for the hidden state in the forward long short-term memory network is as follows: in, Represents the hidden state of the forward long short-term memory network at time t-1, LSTM forward Indicates that the forward calculation of LSTM is performed. represents the hidden state of the forward long short-term memory network at time t; The calculation formula for the hidden state in the backward long short-term memory network is as follows: in, Represents the hidden state of the backward long short-term memory network at time t+1, LSTM backward Indicates that the backward calculation of LSTM is performed. represents the hidden state of the backward long short-term memory network at time t; The forward and backward hidden states are concatenated at the output layer as the final hidden state of the bidirectional long short-term memory network at time t: Among them, h t is the hidden state of the bidirectional long short-term memory network at time t, which contains the context information obtained from the algorithm; The internal calculations in the bidirectional long short-term memory network include input gate, forget gate, output gate, candidate memory gate, updating memory state and updating hidden state. The specific formula is as follows: The above formula is the calculation formula for input gate, forget gate, output gate, candidate memory gate, update memory state and update hidden state, where σ, x t 、h t-1 , tanh represent the Sigmoid activation function, input matrix, hidden state of the previous time step and Tanh activation function respectively; W xi 、W xf 、W xo 、W xc Represents the weight matrices of the input gate, forget gate, output gate, candidate memory gate and input matrix respectively; W hi 、W hf 、W ho 、W hc Represents the weight matrices of the input gate, forget gate, output gate, candidate memory gate and the hidden state of the previous time step respectively; b i 、b f 、b o 、b c Represent the bias items of input gate, forget gate, output gate and candidate memory gate respectively; i t 、f t 、o t 、 c t and h t They respectively represent the calculation results after passing through the input gate, the calculation results after passing through the forget gate, the calculation results after passing through the output gate, the calculation results after passing through the candidate memory gate, the calculation results after the memory state update algorithm, and the calculation results after the hidden state update algorithm.
5. The traffic event digital twin reproduction method based on the V2X data communication network according to claim 1 is characterized in that: In S5, the multilayer perceptron package contains three hidden layers and one output layer. The calculation formula is as follows: Among them, h is the hidden layer output, f uses the ReLU activation function, W1 and W2 represent weight matrices, b1 and b2 represent bias values; y is the final output, and g uses the softmax activation function for multi-classification; The output is a 3D vector, which represents the probability of three traffic events: vehicle accidents, traffic congestion, and failure to comply with traffic regulations.
6. The traffic event digital twin reproduction method based on the V2X data communication network according to claim 1 is characterized in that: In S6, after a vehicle traffic accident is detected, time information is used to backtrack, extract information from the original data, and restore the traffic event in the simulator. First, after the system detects the specific time, location, and related entities of the accident, the system backtracks forward or backward based on the timestamp information to extract information before and after the accident from the recorded original data. The information includes the vehicle speed, acceleration, lane position, and motion state at the time of the accident. The extracted information is organized and structured and imported into the simulator as input data. In the process of recreating traffic incident scenarios, we first use Open Street Map to obtain basic map data of the target area, including geographic information of the road network, lane information, and the locations of traffic signs and signals; This data is then imported into the Road Runner tool for editing and optimization. Traffic infrastructure information, including precise lane layout, lane width, signal logic, crosswalks, and the location of static roadside objects, is added manually or automatically to generate a high-precision map model capable of supporting simulation. Next, the generated map is imported into the SUMO simulation software. Using dynamic information extracted from V2X data, namely vehicle position, speed, acceleration, and signal state changes, traffic flow parameters and simulation configurations are set to reproduce the dynamic process of traffic events in SUMO and generate simulated vehicle and interaction behavior data. Subsequently, SUMO's simulation trajectory data was imported into the CARLA simulation platform, a high-precision map environment was loaded simultaneously, and dynamic entities were generated in the scene based on the trajectory data. Through CARLA's physical simulation, the details of the relative motion and interactive behavior of vehicles in traffic events were reproduced.
Citation Information
Patent Citations
Method for predicting intersection traffic flow based on stabilized short and long term memory network model
CN109741604A
Automobile behavior prediction method based on long-term and short-term memory and multi-graph convolutional network fusion
CN115062529A