A highway traffic safety monitoring and prediction method and system in a vehicle networking environment
By using information acquisition and comprehensive evaluation methods in the context of vehicle networking, the shortcomings of existing technologies such as single data sources and simple rule matching are overcome. This enables in-depth analysis of vehicle interaction relationships and multi-type early warnings, thereby improving the accuracy and effectiveness of traffic safety monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2026-03-31
AI Technical Summary
Existing traffic safety monitoring methods in the Internet of Vehicles environment mostly rely on a single data source or simple rule matching, making it difficult to capture complex spatiotemporal dependencies and lacking the ability to comprehensively assess safety risks, resulting in large prediction errors and a lack of specificity.
The connected vehicle obtains real-time information on the driving environment, driver status, and vehicle operation, which is then uploaded to the cloud for preliminary prediction. The cloud uses an interactive relationship prediction model and correction factors for comprehensive evaluation, and the connected vehicle issues multiple types of warnings based on the comprehensive evaluation results.
It enables accurate traffic monitoring and early warning in a dynamic, high-dimensional vehicle-to-everything (V2X) environment, improving the accuracy and relevance of traffic safety warnings and reducing the accident rate.
Smart Images

Figure CN121053799B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic safety monitoring technology, and in particular to a method and system for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment. Background Technology
[0002] In a vehicle-to-everything (V2X) environment, vehicles can collaborate with roadside units to acquire real-time information on surrounding vehicles, road conditions, and traffic signals, forming an integrated "vehicle-road-cloud" perception network. This technological shift transforms traffic safety monitoring from traditional passive accident response to proactive risk warning. For example, by analyzing data such as vehicle trajectory deviations and sudden speed changes, dangerous behaviors like sudden braking, driving against traffic, and lane departures can be identified in advance, thereby reducing the accident rate.
[0003] However, existing monitoring methods mostly rely on a single data source or simple rule matching, making it difficult to cope with the dynamic and high-dimensional traffic scenarios in the vehicle-to-everything (V2X) environment. On the one hand, most methods use static models or shallow neural networks, which struggle to capture the complex spatiotemporal dependencies in V2X data, resulting in large prediction errors in complex scenarios. On the other hand, existing technologies mostly focus on single monitoring tasks (such as anomaly detection) and lack the ability to comprehensively assess safety risks. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment. The method includes the following steps: a connected vehicle acquires driving environment information, driver status information, and vehicle driving information in real time and uploads them to the cloud; the cloud obtains a preliminary prediction result of traffic safety status based on the vehicle driving information, the traffic safety status including local traffic safety values and global traffic safety values; the cloud corrects the preliminary prediction result based on the driving environment information and the driver status information to obtain a comprehensive evaluation result, which is then transmitted to the connected vehicle; the connected vehicle issues a traffic safety warning based on the driving environment information, the driver status information, and the comprehensive evaluation result. This invention enables accurate monitoring of the traffic environment in a dynamic, high-dimensional V2X environment.
[0006] Optionally, the vehicle driving information includes the vehicle's coordinates, driving lane, vehicle speed, and vehicle acceleration.
[0007] Optionally, the connected vehicle acquires driving environment information, driver status information, and vehicle driving information in real time and uploads them to the cloud, including the following steps:
[0008] The connected vehicle captures environmental images, road surface images, and driver facial images using a camera, and then obtains the driving environment information, the driving lane, and driver status information through a corresponding image recognition model;
[0009] The connected vehicle collects the vehicle's coordinates, speed, and acceleration using onboard sensors.
[0010] The connected vehicle packages the driving environment information, the driver status information, and the vehicle driving information and uploads them to the cloud.
[0011] Optionally, the cloud platform obtains a preliminary prediction of traffic safety status based on the vehicle driving information. The traffic safety status includes local traffic safety values and global traffic safety values, and includes the following steps:
[0012] The cloud platform obtains the interaction relationships and vehicle interaction features of the networked vehicles at different time steps based on the vehicle driving information, and obtains the interaction relationship sequence and the vehicle interaction feature sequence.
[0013] Obtain the vehicle feature sequence, and input the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence into the interaction relationship prediction model to obtain the interaction relationship prediction result;
[0014] Based on the prediction results of the interaction relationship, the cloud platform obtains a preliminary prediction result of the traffic safety status.
[0015] Optionally, the cloud platform obtains the interaction relationships and vehicle interaction features of the connected vehicles at different time steps based on the vehicle driving information, and obtains an interaction relationship sequence and a vehicle interaction feature sequence, including the following steps:
[0016] Adjacency decision conditions are set based on the vehicle coordinates and the driving lane, thereby constructing the adjacency matrix and interaction relationship of the networked vehicles, and obtaining the interaction relationship sequence using the interaction relationship at different time steps;
[0017] Calculate the Euclidean distance between any two of the networked vehicles based on the vehicle coordinates, and calculate the standard deviation of the Euclidean distance;
[0018] The ratio of the Euclidean distance to its standard deviation is used as the independent variable of a monotonically decreasing exponential function to calculate the state transfer value between any two of the networked vehicles, thereby constructing a state transfer matrix.
[0019] The horizontal and vertical positional correlation values of any two connected vehicles are obtained based on the ratio of the difference in vehicle speed to the difference in vehicle coordinate position.
[0020] Calculate the standard deviation of the location association values, combine the location association values of any two connected vehicles to calculate the vehicle interaction risk, and then construct an interaction risk matrix;
[0021] The weighted sum of the adjacency relationship matrix and the state transfer matrix at the current time step is used as the first interaction feature of the current time step;
[0022] The weighted sum of the interaction risk matrices of the current time step and the previous time step is used as the second interaction feature of the current time step;
[0023] The weighted sum of the first interaction feature and the second interaction feature is used as the vehicle interaction feature, and then the vehicle interaction features at different time steps are used to form the vehicle interaction feature sequence.
[0024] This method obtains vehicle interaction feature sequences based on the adjacency relation matrix, state transfer matrix, and interaction risk matrix of adjacent time steps. It comprehensively considers multiple factors such as vehicle position and speed, and deeply mines the interaction features between vehicles from multiple dimensions. It can more comprehensively and accurately reflect the interaction of connected vehicles during driving, which helps to improve the accuracy and reliability of the preliminary prediction results of traffic safety status.
[0025] Optionally, the step of setting adjacent decision conditions based on the vehicle coordinates and the driving lane, thereby constructing the adjacent relationship matrix and interaction relationship of the networked vehicles, and obtaining the interaction relationship sequence using the interaction relationship at different time steps includes the following steps:
[0026] Based on the vehicle coordinates and the driving lane, adjacent judgment conditions are set, and a high-precision map is used to determine whether any two networked vehicles are adjacent.
[0027] If two connected vehicles are adjacent, they are represented by the number 1; otherwise, they are represented by the number 0, thereby constructing an adjacency matrix of the connected vehicles.
[0028] The connected vehicles are treated as nodes and assigned numbers. Adjacent connected vehicles are connected by straight lines to obtain the interaction relationships of the connected vehicles.
[0029] The interaction relationship sequence is obtained using the interaction relationships at different time steps.
[0030] The method described above is simple and clear in its approach to constructing the adjacency matrix and obtaining the interaction sequence. It can quickly and accurately determine the adjacency relationship between vehicles and clearly present the interaction relationship between vehicles at different time steps. This provides clear and effective data support for analyzing vehicle interaction characteristics and predicting traffic safety status.
[0031] Optionally, the step of obtaining the vehicle feature sequence and inputting the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence into the interaction relationship prediction model to obtain the interaction relationship prediction result includes the following steps:
[0032] The vehicle driving information of each of the networked vehicles is used to construct corresponding feature vectors, and then all feature vectors at the same time step are used to construct a vehicle feature matrix.
[0033] The vehicle feature sequence is obtained using the vehicle feature matrix at different time steps;
[0034] The vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence are input into the interaction relationship prediction model;
[0035] The interaction relationship prediction model obtains the node embedding representation at each time step through a GNN encoder, and then inputs the node embedding representation into a Transformer encoder after serialization and position encoding to obtain the embedding prediction.
[0036] Based on the embedding prediction, the inner product decoder is used to output the interaction relationship prediction result.
[0037] This method uses vehicle driving information to construct feature vectors and matrices to obtain vehicle feature sequences. These, along with interaction relationship sequences and vehicle interaction feature sequences, are input into an interaction relationship prediction model. The model uses structures such as GNN and Transformer to deeply mine the complex spatiotemporal dependencies in vehicle network data, which helps to improve the accuracy of prediction and provides stronger protection for highway traffic safety.
[0038] Optionally, the cloud platform corrects the preliminary prediction result based on the driving environment information and the driver status information to obtain a comprehensive evaluation result, which is then transmitted to the connected vehicle, including the following steps:
[0039] The cloud platform obtains a first correction factor and a second correction factor based on the driving environment information and the driver status information, respectively.
[0040] The cloud platform uses the first correction factor and the second correction factor to correct the preliminary prediction results to obtain the comprehensive evaluation results.
[0041] This method obtains the first and second correction factors based on driving environment information and driver status information, and uses them to correct the preliminary prediction results. This method, which comprehensively considers the impact of multiple factors on traffic safety, can make the comprehensive assessment results more accurate and comprehensive, and make the final comprehensive assessment results closer to the actual situation, thereby improving the accuracy and effectiveness of traffic safety early warning.
[0042] Optionally, the traffic safety warning includes driving environment warning, driving status warning, risky vehicle warning, and overall risk warning;
[0043] The connected vehicle issues a traffic safety warning based on the driving environment information, the driver status information, and the comprehensive evaluation result, including the following steps:
[0044] The connected vehicle issues a driving environment warning based on the driving environment information;
[0045] The connected vehicle issues the driving status warning based on the driver status information;
[0046] The connected vehicle issues the risk vehicle warning and the global risk warning based on the comprehensive assessment results.
[0047] This method can issue targeted warnings for different safety risk factors, enabling drivers to better understand potential safety threats. This multi-type, targeted warning approach can improve the effectiveness of traffic safety warnings and reduce the incidence of traffic accidents.
[0048] Secondly, the present invention provides a highway traffic safety monitoring and prediction system in a vehicle-to-everything (V2X) environment. This system utilizes a highway traffic safety monitoring and prediction method provided by the present invention. The system includes: an onboard data acquisition device installed on a connected vehicle for real-time acquisition of driving environment information, driver status information, and vehicle driving information; and a cloud platform that acquires preliminary prediction results of traffic safety status based on the vehicle driving information, including local and global traffic safety values. The system corrects the preliminary prediction results to obtain a comprehensive evaluation result, which is then transmitted to the connected vehicle. A data transmission device, installed on the connected vehicle, uploads the driving environment information, driver status information, and vehicle driving information to the cloud, and receives the comprehensive evaluation result. A data display device, also installed on the connected vehicle, displays the driving environment information, driver status information, and the comprehensive evaluation result. A warning device, installed on the connected vehicle, issues traffic safety warnings based on the driving environment information, driver status information, and the comprehensive evaluation result. This system improves the practicality of the method and facilitates its promotion. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a flowchart illustrating a method for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment, according to an embodiment of the present invention.
[0051] Figure 2 This is a schematic diagram illustrating the interaction relationships of connected vehicles according to an embodiment of the present invention;
[0052] Figure 3 This is an embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram of the framework of a highway traffic safety monitoring and prediction system in a vehicle-to-everything (V2X) environment according to an embodiment of the present invention. Detailed Implementation
[0054] Specific embodiments of the present invention will now be described in detail. It should be noted that the embodiments described herein are for illustrative purposes only and are not intended to limit the invention. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be apparent to those skilled in the art that these specific details are not necessary to practice the invention. In other instances, well-known circuits, software, or methods have not been specifically described to avoid obscuring the invention.
[0055] Throughout this specification, references to "an embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in connection with that embodiment or example is included in at least one embodiment of the invention. Therefore, the phrases "in an embodiment," "in an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily refer to the same embodiment or example. Furthermore, specific features, structures, or characteristics can be combined in one or more embodiments or examples in any suitable combination and / or sub-combination. Moreover, those skilled in the art will understand that the illustrations provided herein are for illustrative purposes and are not necessarily drawn to scale.
[0056] It should be noted in advance that, in one alternative embodiment, except for independent descriptions, the same symbols or letters appearing in all formulas have the same meaning and value.
[0057] In one optional embodiment, please refer to Figure 1This invention provides a method for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment, the method comprising the following steps:
[0058] S1. Connected vehicles obtain real-time information on the driving environment, driver status, and vehicle driving, and upload this information to the cloud.
[0059] The driving environment information refers to weather conditions such as sunny, rainy, snowy, and foggy conditions; vehicle driving information includes vehicle coordinates, driving lane, vehicle speed, and vehicle acceleration; and driver status information includes driving states such as normal, fatigued, and distracted. Step S1 specifically includes the following steps:
[0060] S11. The connected vehicle captures environmental images, road surface images, and driver facial images through a camera, and then obtains the driving environment information, the driving lane, and driver status information through a corresponding image recognition model.
[0061] Specifically, in this embodiment, the connected vehicle first continuously captures environmental and road images of its surroundings using a camera array deployed around the vehicle, while simultaneously capturing the driver's facial image using an in-vehicle driver monitoring camera. These raw image data are then processed in real-time by multiple pre-built YOLOv5-based image recognition models within the onboard computing unit. These image recognition models include an environment recognition model, a lane detection model, and a driver state recognition model. The environment recognition model identifies current weather conditions from the environmental images; the lane detection model confirms the vehicle's current lane from the road image; and the driver state recognition model identifies the driver's state information from the driver's facial image.
[0062] It should be noted that in this embodiment, all connected vehicles travel in adjacent lanes. Furthermore, building an image recognition model based on YOLOv5 includes several steps: image acquisition and annotation, dataset construction and partitioning, and model training and validation. These are existing technologies and will not be described in detail here.
[0063] S12, the connected vehicle collects the vehicle's coordinate position, vehicle speed, and vehicle acceleration through onboard sensors.
[0064] Specifically, in this embodiment, the connected vehicle uses a high-precision onboard positioning device to continuously acquire its coordinates; wheel speed sensors, steering angle sensors, and inertial measurement units (IMUs) speed sensors measure the vehicle's speed in the lateral and longitudinal directions in real time; and accelerometers capture the vehicle's acceleration in the longitudinal and lateral directions. The onboard positioning device is a GNSS receiver.
[0065] S13. The connected vehicle packages the driving environment information, the driver status information, and the vehicle driving information and uploads them to the cloud.
[0066] Specifically, in this embodiment, the connected vehicle standardizes and encapsulates the acquired driving environment information, driver status information, and vehicle driving information according to a predefined message set (BSM message format), packaging them into a complete data packet. During the encapsulation process, a high-precision UTC timestamp and vehicle number provided by the GNSS module are embedded in the data packet header. Subsequently, the connected vehicle establishes a secure connection with the cloud platform through C-V2X communication technology and efficiently and reliably uploads the data packet to the cloud, providing a complete data foundation for subsequent cloud-based intelligent analysis.
[0067] S2. The cloud obtains a preliminary prediction result of the traffic safety status based on the vehicle driving information. The traffic safety status includes local traffic safety values and global traffic safety values.
[0068] Step S2 specifically includes the following steps:
[0069] S21. The cloud obtains the interaction relationship and vehicle interaction features of the networked vehicles at different time steps based on the vehicle driving information, and obtains the interaction relationship sequence and the vehicle interaction feature sequence.
[0070] Specifically, step S21 includes the following steps:
[0071] S211. Based on the vehicle coordinates and the driving lane, set adjacent decision conditions, and then construct the adjacent relationship matrix and interaction relationship of the networked vehicles, and use the interaction relationship at different time steps to obtain the interaction relationship sequence.
[0072] Specifically, step S211 includes the following steps:
[0073] S2111. Based on the vehicle coordinates and the driving lane, set adjacent judgment conditions, and combine with a high-precision map to determine whether any two networked vehicles are adjacent.
[0074] Specifically, in this embodiment, the adjacent decision conditions include the distance proximity decision conditions and the lane proximity decision conditions. Any two connected vehicles must simultaneously meet both the distance proximity decision conditions and the lane proximity decision conditions to be considered adjacent.
[0075] For the proximity determination condition, the Euclidean distance between any two connected vehicles is calculated based on their coordinate positions. If this distance is less than a set distance threshold, the proximity determination condition is met. The distance threshold is adjustable and can be determined jointly by the average speed of all connected vehicles and driving environment information. In this embodiment, the distance threshold can be calculated using the following formula:
[0076]
[0077] Where L is the distance threshold. The average speed of all connected vehicles. n is the number of connected vehicles. Let be the speed of the i-th connected vehicle in the lateral direction. Let be the longitudinal speed of the i-th connected vehicle. For driver reaction time, The value can range from 1.5s to 2s. The coefficient of friction of the road surface during rain and snow. A value of 0.4 is acceptable, depending on other weather conditions. 0.8 is acceptable.
[0078] Regarding the lane proximity determination criteria, the cloud-based system uses a high-precision map of the connected vehicle's driving area and the connected vehicle's driving lane to determine whether two connected vehicles are in the same lane or adjacent lanes. If so, the lane proximity determination criteria are met; otherwise, they are not.
[0079] S2112. If two connected vehicles are adjacent, they are represented by the number 1; otherwise, they are represented by the number 0, thereby constructing an adjacency matrix of the connected vehicles.
[0080] Specifically, in this embodiment, the adjacency matrix can be represented as:
[0081]
[0082] in, This is an adjacency relation matrix. This represents the adjacency relationship between the i-th connected vehicle and the j-th connected vehicle. , Let n be the number of connected vehicles. When two connected vehicles are adjacent, ,otherwise .
[0083] S2113. The connected vehicles are treated as nodes and assigned numbers. Adjacent connected vehicles are connected by straight lines to obtain the interaction relationship of the connected vehicles.
[0084] Specifically, in this embodiment, such as Figure 2 As shown, for the seven connected vehicles numbered 1 to 7, they are treated as nodes, and the vehicle numbers are used as the corresponding node numbers. Adjacent connected vehicles are connected by straight lines to obtain the interaction relationship of the connected vehicles.
[0085] S2114. Obtain the interaction relationship sequence using the interaction relationship at different time steps.
[0086] The method of constructing the adjacency matrix and obtaining the interaction sequence in this embodiment is simple and clear, which can quickly and accurately determine the adjacency relationship between vehicles. It is conducive to clearly presenting the interaction relationship of vehicles at different time steps, and provides clear and effective data support for analyzing vehicle interaction characteristics and predicting traffic safety status.
[0087] S212. Calculate the Euclidean distance between any two networked vehicles based on the vehicle coordinates, and calculate the standard deviation of the Euclidean distance.
[0088] S213. Using the ratio of the Euclidean distance to its standard deviation as the independent variable of a monotonically decreasing exponential function, calculate the state transfer value between any two of the networked vehicles, and then construct a state transfer matrix.
[0089] Specifically, in this embodiment, the state transition matrix can be represented as:
[0090]
[0091] in, For the state transfer matrix, This refers to the state transfer value between the i-th connected vehicle and the j-th connected vehicle. h represents the independent variable. Let be the Euclidean distance between the i-th connected vehicle and the j-th connected vehicle. denoted as the standard deviation of the Euclidean distance.
[0092] S214. Obtain the horizontal and vertical positional correlation values of any two networked vehicles based on the ratio of the difference between their vehicle speeds and the difference between their vehicle coordinate positions.
[0093] Specifically, in this embodiment, if the difference in speed between two connected vehicles in the lateral direction is not greater than 0, they are considered to be unrelated in the lateral position; otherwise, they are considered to be related in the lateral position. When two connected vehicles are considered to be related in the lateral position, their lateral positional association value can be calculated using the following formula:
[0094]
[0095] in, Let be the horizontal position association value between the i-th connected vehicle and the j-th connected vehicle. Let the speed of the j-th connected vehicle be in the lateral direction. Let x be the x-coordinate of the i-th connected vehicle. The x-coordinate of the j-th connected vehicle can be calculated. Similarly, the longitudinal positional correlation value between the i-th and j-th connected vehicles can also be calculated. .
[0096] S215. Calculate the standard deviation of the location association value, combine the location association values of any two of the networked vehicles to calculate the vehicle interaction risk, and then construct an interaction risk matrix.
[0097] Specifically, in this embodiment, the interaction risk matrix can be represented as:
[0098]
[0099] in, For interactive risk matrix, Let be the combined location association value between the i-th connected vehicle and the j-th connected vehicle. , It is a symbolic representation. , This represents the standard deviation of the location-related values.
[0100] S216. The weighted sum of the adjacency relationship matrix and the state transfer matrix at the current time step is taken as the first interaction feature of the current time step.
[0101] Specifically, in this embodiment, the weights corresponding to the adjacency relation matrix and the state transition matrix can be respectively used... and It means, and Their values can be obtained through particle swarm optimization algorithms.
[0102] S217. The weighted sum of the interaction risk matrices of the current time step and the previous time step is taken as the second interaction feature of the current time step.
[0103] Specifically, in this embodiment, the weights corresponding to the interaction risk matrices between the current time step and the previous time step can be respectively used... and It means, and Their values can be obtained through particle swarm optimization algorithms.
[0104] The operation of acquiring the second interaction feature reflects the temporal inertia of interaction risk, that is, the formation and dissipation of risk have a certain degree of continuity.
[0105] S218. The weighted sum of the first interaction feature and the second interaction feature is taken as the vehicle interaction feature, and then the vehicle interaction features at different time steps are used to form the vehicle interaction feature sequence.
[0106] Specifically, in this embodiment, the weights corresponding to the first interaction feature and the second interaction feature can be respectively used... and It means, and Their values can be obtained through particle swarm optimization. Furthermore, by acquiring vehicle interaction features at different time steps, a vehicle interaction feature sequence can be constructed.
[0107] This embodiment obtains vehicle interaction feature sequences based on the adjacency relationship matrix, state transfer matrix, and interaction risk matrix of adjacent time steps. It comprehensively considers multiple factors such as vehicle position and speed, and deeply mines the interaction features between vehicles from multiple dimensions. It can more comprehensively and accurately reflect the interaction of connected vehicles during driving, which helps to improve the accuracy and reliability of the preliminary prediction results of traffic safety status.
[0108] S22. Obtain the vehicle feature sequence, and input the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence into the interaction relationship prediction model to obtain the interaction relationship prediction result.
[0109] Specifically, step S22 includes the following steps:
[0110] S221. Construct corresponding feature vectors using the vehicle driving information of each of the networked vehicles, and then construct a vehicle feature matrix using all feature vectors at the same time step.
[0111] Specifically, in this embodiment, the feature vector of the connected vehicle includes seven features, which are as follows: , , , , , and The feature vector can be represented as:
[0112]
[0113] in, Let i be the feature vector of the i-th connected vehicle. Let be the ordinate of the i-th connected vehicle. Let be the longitudinal speed of the i-th connected vehicle. Let be the lateral acceleration of the i-th connected vehicle. Let be the longitudinal acceleration of the i-th connected vehicle. Let be the lane number corresponding to the driving lane of the i-th connected vehicle. The lane number is determined based on the driving lane of the connected vehicle and the high-precision map. For three adjacent lanes that can travel in the same direction, their lane numbers can be 1, 2, and 3, respectively.
[0114] Furthermore, the feature vector of a connected vehicle is used as a row in the vehicle feature matrix, and then the feature vectors of all connected vehicles at the same time step are used to construct the vehicle feature matrix.
[0115] S222. Obtain the vehicle feature sequence using the vehicle feature matrix at different time steps.
[0116] S223. Input the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence into the interaction relationship prediction model.
[0117] Specifically, in this embodiment, the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence can be respectively used , and express. Let be the vehicle feature matrix at time step t. For the interaction relationship at time step t, Let T represent the vehicle interaction features at time step t, where T is the number of time steps. .
[0118] S224. The interaction relationship prediction model obtains the node embedding representation at each time step through the GNN encoder, and after serializing and positionally encoding the node embedding representation, it is input into the Transformer encoder to obtain the embedding prediction.
[0119] Specifically, in this embodiment, GNN is a graph neural network. Please refer to [link to relevant documentation]. Figure 3 For each time step, the interaction relationship prediction model uses vehicle features as node features, interaction relationships as topological connections, and vehicle interaction features as the adjacency matrix of a graph neural network. It then uses a GNN encoder to perform message passing and feature aggregation. During this process, each connected vehicle collects and merges the state information of its neighboring vehicles, thereby generating a novel hidden state rich in contextual relationships—a node embedding representation.
[0120] The node embeddings at each time step of the GNN output are arranged in chronological order to form a node embedding sequence. , Let be the node embedding representation at time step t. To ensure the model understands the chronological order, positional encoding is added to the node embedding representation at each time step using sine and cosine functions. The node embedding sequence is then fed into the Transformer encoder. Leveraging its self-attention mechanism, the Transformer efficiently analyzes this sequence, capturing the evolution patterns and dependencies of connected vehicle states and interactions over a long time horizon, and ultimately predicting the embedding for the next time step.
[0121] The loss function of the interaction relationship prediction model satisfies the following relationship:
[0122]
[0123] in, For the total loss, The number of time steps for predicting interaction relationships. The characteristic coefficient of the k-th feature. For the i-th connected vehicle in the future The loss of the k-th feature at each time step.
[0124] In this embodiment, to The empirical values are taken as follows: 1, 1, 1, 1, 2, 2, and 2. For... its losses The cross-entropy loss function can be used for calculation; for features , , , , and Assuming they all follow a univariate Gaussian distribution, their losses can be calculated according to the following formula:
[0125]
[0126] in, Let k be the standard deviation of the k-th feature of the i-th connected vehicle. For the i-th connected vehicle in the future The k-th feature at each time step Let be the mean of the k-th feature of the i-th connected vehicle.
[0127] This embodiment uses vehicle driving information to construct feature vectors and matrices to obtain vehicle feature sequences. These, along with interaction relationship sequences and vehicle interaction feature sequences, are input into an interaction relationship prediction model. The model uses structures such as GNN and Transformer to deeply mine the complex spatiotemporal dependencies in vehicle network data, which helps improve the accuracy of prediction and provides stronger protection for road traffic safety.
[0128] S225. Based on the embedding prediction, output the interaction relationship prediction result using the inner product decoder.
[0129] Specifically, in this embodiment, please refer to Figure 3 After obtaining the node embedding predictions for future time steps, this step transforms them into specific interaction relationship prediction results using an inner product decoder. Specifically, for any two connected vehicles, their inner product in the predicted embedding vector space is calculated. This inner product value, after being normalized by the Sigmoid function, represents the probability that the two connected vehicles will have an interaction relationship in the future. By setting a probability threshold of 0.5, continuous probability values are converted into a binary adjacency matrix, thereby obtaining the interaction relationship prediction results for multiple future time steps. This allows for the clear determination of which connected vehicles will be adjacent and interact, providing a forward-looking basis for traffic safety assessment.
[0130] It should be noted that before using the interaction relationship prediction model, it is necessary to obtain vehicle driving information from historical real-world vehicle-to-everything (V2X) scenarios. This information is then used to obtain corresponding interaction relationship sequences, vehicle interaction feature sequences, and vehicle feature sequences to construct a dataset. The dataset is divided into a dataset and a validation set in a 7:3 ratio to complete the training and validation of the interaction relationship prediction model. The sampling frequency of the vehicle driving information is 10Hz, and the interaction relationship sequences, vehicle interaction feature sequences, and vehicle feature sequences are obtained using the sliding window method. Each sequence has a length of 50, and the sliding step size is 15. The model is implemented using the PyTorch framework. The GNN encoder uses a 2-layer GCN with a hidden layer dimension of 128; the Transformer encoder uses a 2-layer structure with 4 attention heads and a feedforward network dimension of 512. Model training uses the Adam optimizer with an initial learning rate of 0.001 and a batch size of 32. The training objective is to minimize the total loss. Furthermore, during model training, the particle swarm optimization algorithm is used to optimize the weights described in steps S216 to S218.
[0131] When using the particle swarm optimization algorithm to optimize the weights described in steps S216 to S218, the particle size is 50, and each particle represents a set of weight combinations. The individual learning factor and the social learning factor are set to 1.5. The inertia weight uses a linear decreasing strategy, with initial and final values of 0.9 and 0.4, respectively. The fitness function of the particle swarm optimization algorithm is:
[0132]
[0133] Where Fitness is the fitness value. It is a very small positive number. The value can be 0.0001.
[0134] The particle swarm optimization algorithm outputs the optimal weight combination when the maximum number of iterations is reached or the convergence condition is met. The maximum number of iterations is 100, and the convergence condition is that the optimal weight combination is satisfied after 5 consecutive iterations. , The fitness value for the current iteration step. This is the fitness value of the previous iteration.
[0135] S23. The cloud platform obtains a preliminary prediction result of the traffic safety status based on the prediction result of the interaction relationship.
[0136] Specifically, in this embodiment, the loss function is typically used to measure the deviation between the actual result and the predicted result. When vehicle behavior is stable, the prediction of the interaction relationship is more accurate, and the corresponding loss is smaller. If vehicle behavior is abnormal, the accuracy of the interaction relationship prediction result will also decrease, and the corresponding loss will be greater. Considering this, this embodiment calculates the local traffic safety value and the global traffic safety value using the following relationship:
[0137]
[0138]
[0139] in, Let be the local traffic safety value corresponding to the i-th connected vehicle, and D be the global traffic safety value. This indicates taking the maximum value.
[0140] S3. The cloud platform corrects the preliminary prediction result based on the driving environment information and the driver status information to obtain a comprehensive evaluation result, which is then transmitted to the connected vehicle.
[0141] Specifically, step S3 includes the following steps:
[0142] S31. The cloud platform obtains a first correction factor and a second correction factor based on the driving environment information and the driver status information, respectively.
[0143] Specifically, in this embodiment, the cloud selects a first correction factor and a second correction factor from a predefined environmental risk mapping table and a state risk mapping table based on driving environment information and driver status information. Partial contents of the environmental risk mapping table and the state risk mapping table are shown in Table 1 and Table 2, respectively.
[0144] Table 1 Environmental Risk Mapping Table
[0145]
[0146] Table 2 State Risk Mapping Table
[0147]
[0148] It should be noted that the first and second correction factors need to take into account the overall condition of the highway and are set based on the expert evaluation method, and their values are not fixed.
[0149] S32. The cloud uses the first correction factor and the second correction factor to correct the preliminary prediction result to obtain the comprehensive evaluation result.
[0150] Specifically, in this embodiment, the comprehensive evaluation results include local traffic safety evaluation results and global traffic safety evaluation results, which sequentially satisfy the following relationship:
[0151]
[0152]
[0153] in, This represents the local traffic safety assessment result for the i-th connected vehicle. As the first correction factor, As the second correction factor, This represents the overall traffic safety assessment result. The above formula assumes that the environment and driver status are equally important to the traffic safety assessment. In other alternative embodiments, relevant personnel can adjust the relative importance of the environment and driver status to the traffic safety assessment according to actual needs.
[0154] In this embodiment, the first correction factor and the second correction factor are obtained based on driving environment information and driver status information, respectively, and they are used to correct the preliminary prediction results. This method, which comprehensively considers the impact of multiple factors on traffic safety, can make the comprehensive assessment results more accurate and comprehensive, and make the final comprehensive assessment results closer to the actual situation, thereby improving the accuracy and effectiveness of traffic safety early warning.
[0155] S4. The connected vehicle issues a traffic safety warning based on the driving environment information, the driver status information, and the comprehensive evaluation results.
[0156] The traffic safety warning system includes driving environment warnings, driving status warnings, high-risk vehicle warnings, and overall risk warnings. This embodiment can issue targeted warnings for different safety risk factors, enabling drivers to better understand potential safety threats. This multi-type, targeted warning method can improve the effectiveness of traffic safety warnings and reduce the incidence of traffic accidents. Step S4 specifically includes the following steps:
[0157] S41. The connected vehicle issues a driving environment warning based on the driving environment information.
[0158] Specifically, in this embodiment, the connected vehicle issues driving environment warnings to the driver via voice prompts based on real-time driving environment information it acquires. The warnings include weather conditions and recommended measures. For example, when the driving environment information indicates heavy snow, the connected vehicle will inform the driver that the current weather is heavy snow and suggest that the driver reduce speed, maintain a safe distance, and increase attention.
[0159] S42. The connected vehicle issues a driving status warning based on the driver status information.
[0160] Specifically, in this embodiment, the connected vehicle issues driving status warnings to the driver via voice prompts based on the driver's real-time status information it acquires, aiming to improve the driver's attention and avoid fatigue driving. For example, if the driver's status information indicates fatigue, the connected vehicle informs the driver via voice prompt that the current driving is tiring and the driving risk is high, suggesting that the driver take a rest immediately.
[0161] S43. The connected vehicle issues the risk vehicle warning and the global risk warning based on the comprehensive evaluation results.
[0162] Specifically, in this embodiment, after receiving the comprehensive evaluation results, the connected vehicle filters out connected vehicles whose local traffic safety evaluation results are greater than the local risk threshold as high-risk vehicles. These high-risk vehicles are then highlighted with a red box on the in-vehicle central control screen, allowing the driver to visually see the source of the risk. If the vehicle itself is also a high-risk vehicle, the connected vehicle will also provide voice prompts to the driver to drive cautiously.
[0163] In addition, connected vehicles compare the global traffic safety assessment results with the global risk threshold, and when the global traffic safety assessment result is greater than the global risk threshold, they will give the driver a voice prompt that the current traffic environment is risky and that he should drive with caution.
[0164] In this embodiment, the initial values of the local risk threshold and the global risk threshold can be set to 0.8 and 0.7, respectively. Subsequently, these two thresholds can be adjusted according to the probability of traffic accidents under different local traffic safety assessment results and global traffic safety assessment results.
[0165] It should be noted that in some cases, the actions described in the specification can be performed in different orders and still achieve the desired results. In this embodiment, the order of steps is given only to make the embodiment clearer and easier to explain, and not to limit it.
[0166] In one optional embodiment, please refer to Figure 4To improve the practicality of this method and facilitate its promotion, the present invention also provides a highway traffic safety monitoring and prediction system in a vehicle-to-everything (V2X) environment. The highway traffic safety monitoring and prediction system in a V2X environment uses the method described in steps S1 to S4. The system includes an onboard data acquisition device 1, a cloud platform 2, a data transmission device 3, a data display device 4, and an early warning device 5.
[0167] The vehicle-mounted data acquisition device 1 is installed on the connected vehicle and is used to acquire driving environment information, driver status information, and vehicle driving information in real time. The cloud platform 2 obtains a preliminary prediction result of traffic safety status based on the vehicle driving information; the traffic safety status includes local traffic safety values and global traffic safety values. The cloud platform corrects the preliminary prediction result based on the driving environment information and driver status information to obtain a comprehensive evaluation result, which is then transmitted to the connected vehicle. The data transmission device 3 is installed on the connected vehicle and is used to upload the driving environment information, driver status information, and vehicle driving information to the cloud, and to receive the comprehensive evaluation result. The data display device 4 is installed on the connected vehicle and is used to display the driving environment information, driver status information, and comprehensive evaluation result. The early warning device 5 is installed on the connected vehicle and is used to issue traffic safety warnings based on the driving environment information, driver status information, and comprehensive evaluation result.
[0168] The vehicle-mounted data acquisition device 1 includes a sensor, a vehicle-mounted data processing device, and a vehicle-mounted storage device. The sensor is used to collect environmental images, road images, facial images, and vehicle driving information. The vehicle-mounted storage device stores an image recognition model. The vehicle-mounted data processing device is used to use the image recognition model to acquire driving environment information and driver status information.
[0169] In summary, this method firstly acquires the adjacency relation matrix, state transfer matrix, and interaction risk matrix for adjacent time steps after collecting vehicle driving information. Then, based on these matrices, it obtains vehicle interaction feature sequences, comprehensively considering factors such as vehicle position and speed. This multi-dimensional approach delves into the interaction features between vehicles, providing a more comprehensive and accurate reflection of the interactions between connected vehicles during driving, thus improving the accuracy and reliability of preliminary traffic safety state predictions. Furthermore, an interaction relationship prediction model is constructed based on GNN, Transformer, and inner product decoder. The vehicle feature sequence, interaction relationship sequence, and vehicle interaction feature sequence are input into this model. The interaction relationship prediction model, through GNN and Transformer structures, delves into the complex spatiotemporal dependencies in the vehicle network data, further enhancing the accuracy of preliminary traffic safety state predictions and providing stronger guarantees for highway traffic safety. Then, this method obtains a first correction factor and a second correction factor based on driving environment information and driver status information, and uses them to correct the preliminary prediction results. This method, which comprehensively considers the impact of multiple factors on traffic safety, makes the comprehensive assessment results more accurate and comprehensive, and makes the final comprehensive assessment results closer to the actual situation, thereby improving the accuracy and effectiveness of traffic safety early warning. Finally, this method can issue targeted warnings for different safety risk factors, enabling drivers to have a clearer understanding of potential safety threats. This multi-type, targeted early warning approach can improve the effectiveness of traffic safety early warning and reduce the incidence of traffic accidents. In addition, this solution provides a system adapted to this method, which is conducive to improving the practicality of this method and facilitating its promotion.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A method for monitoring and predicting highway traffic safety in a vehicle-to-everything (V2X) environment, characterized in that, The method comprises the following steps: The connected vehicle captures environment images, road surface images and driver face images through a camera, and then obtains driving environment information, a driving lane and driver state information through a corresponding image recognition model; The connected vehicle collects vehicle coordinate positions, vehicle speeds and vehicle accelerations through vehicle-mounted sensors; The connected vehicle packs and uploads the driving environment information, the driver state information and vehicle driving information to the cloud, wherein the vehicle driving information comprises vehicle coordinate positions, a driving lane, vehicle speeds and vehicle accelerations; Adjacent decision conditions are set according to the vehicle coordinate positions and the driving lane, and then an adjacent relationship matrix and an interaction relationship of the connected vehicle are constructed, and an interaction relationship sequence is obtained using the interaction relationship at different time steps; The Euclidean distance between any two connected vehicles is calculated according to the vehicle coordinate positions, and the standard deviation of the Euclidean distance is calculated; The ratio of the Euclidean distance to the standard deviation thereof is taken as the independent variable of a monotonically decreasing exponential function, and a state transmission value between any two connected vehicles is calculated, and then a state transmission matrix is constructed; The position correlation value of any two connected vehicles in the lateral and longitudinal directions is obtained based on the ratio of the difference between the vehicle speeds to the difference between the vehicle coordinate positions; The standard deviation of the position correlation value is calculated, and the vehicle interaction risk is calculated in combination with the position correlation value of any two connected vehicles, and then an interaction risk matrix is constructed; The weighted sum of the adjacent relationship matrix and the state transmission matrix at the current time step is taken as the first interaction feature at the current time step; The weighted sum of the interaction risk matrix at the current time step and the previous time step is taken as the second interaction feature at the current time step; The weighted sum of the first interaction feature and the second interaction feature is taken as a vehicle interaction feature, and then the vehicle interaction feature sequence is composed of the vehicle interaction features at different time steps; A vehicle feature sequence is obtained, and the vehicle feature sequence, the interaction relationship sequence and the vehicle interaction feature sequence are input into an interaction relationship prediction model to obtain an interaction relationship prediction result; The cloud obtains a preliminary prediction result of a traffic safety state based on the interaction relationship prediction result; The cloud corrects the preliminary prediction result according to the driving environment information and the driver state information to obtain a comprehensive evaluation result, and transmits the comprehensive evaluation result to the connected vehicle; The connected vehicle issues a traffic safety warning according to the driving environment information, the driver state information and the comprehensive evaluation result. 2.The road traffic safety monitoring and prediction method in a vehicle-to-everything environment according to claim 1, characterized in that, The method of setting adjacent decision conditions according to the vehicle coordinate positions and the driving lane, and then constructing an adjacent relationship matrix and an interaction relationship of the connected vehicle, and obtaining the interaction relationship sequence using the interaction relationship at different time steps comprises the following steps: Adjacent decision conditions are set according to the vehicle coordinate positions and the driving lane, and whether any two connected vehicles are adjacent is determined in combination with a high-precision map; If the two connected vehicles are adjacent, a number 1 is used to represent, otherwise a number 0 is used to represent, and then an adjacent relationship matrix of the connected vehicle is constructed. The connected vehicles are taken as nodes and numbered, and adjacent connected vehicles are connected by straight lines to obtain the interaction relationship of the connected vehicles; The interaction relationship sequence is obtained using the interaction relationship at different time steps. 3.The road traffic safety monitoring and predicting method in a vehicle-to-everything environment according to claim 1, wherein, The vehicle feature sequence is obtained, and the vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence are input into an interaction relationship prediction model to obtain an interaction relationship prediction result, including the following steps: A feature vector is constructed using the vehicle driving information of each connected vehicle, and then all feature vectors at the same time step are used to construct a vehicle feature matrix; The vehicle feature sequence is obtained using the vehicle feature matrix at different time steps; The vehicle feature sequence, the interaction relationship sequence, and the vehicle interaction feature sequence are input into an interaction relationship prediction model; The interaction relationship prediction model obtains a node embedding representation at each time step through a GNN encoder, and inputs the node embedding representation after being sequenced and position-encoded into a Transformer encoder to obtain an embedding prediction; According to the embedding prediction, an inner product decoder is used to output an interaction relationship prediction result. 4.The road traffic safety monitoring and prediction method in a vehicle-to-everything environment according to claim 1, wherein, The cloud corrects the preliminary prediction result according to the driving environment information and the driver state information to obtain a comprehensive evaluation result, and transmits the comprehensive evaluation result to the connected vehicles, including the following steps: The cloud obtains a first correction factor and a second correction factor according to the driving environment information and the driver state information, respectively; The cloud corrects the preliminary prediction result using the first correction factor and the second correction factor to obtain the comprehensive evaluation result.
5. The highway traffic safety monitoring and prediction method in the Internet of Vehicles environment according to claim 1, characterized in that: The traffic safety warning includes driving environment warning, driver state warning, risk vehicle warning, and global risk warning; The connected vehicles issue a traffic safety warning according to the driving environment information, the driver state information, and the comprehensive evaluation result, including the following steps: The connected vehicles issue the driving environment warning according to the driving environment information; The connected vehicles issue the driver state warning according to the driver state information; The connected vehicles issue the risk vehicle warning and the global risk warning according to the comprehensive evaluation result. 6.A highway traffic safety monitoring and prediction system in a vehicle Internet environment, the highway traffic safety monitoring and prediction system in the vehicle Internet environment using the highway traffic safety monitoring and prediction method in any one of claims 1-5, characterized in that, It includes: A vehicle-mounted data acquisition device is installed on the connected vehicles to acquire driving environment information, driver state information, and vehicle driving information in real time, and the vehicle driving information includes vehicle coordinate position, driving lane, vehicle speed, and vehicle acceleration; The connected vehicles capture environment images, road surface images, and driver face images through cameras, and then acquire driving environment information, driving lanes, and driver state information through corresponding image recognition models; The connected vehicles collect vehicle coordinate positions, vehicle speeds, and vehicle accelerations through vehicle-mounted sensors; The cloud end sets adjacent judgment conditions according to the vehicle coordinate positions and the driving lanes, and further constructs an adjacent relationship matrix and an interaction relationship of the connected vehicles, and obtains an interaction relationship sequence using the interaction relationship at different time steps; Euclidean distances between any two connected vehicles are calculated according to the vehicle coordinate positions, and a standard deviation of the Euclidean distances is calculated; a state transmission value between any two connected vehicles is calculated by taking a ratio of the Euclidean distance to the standard deviation thereof as an independent variable of a monotonically decreasing exponential function, and a state transmission matrix is further constructed; a position correlation value of any two connected vehicles in a lateral direction and a longitudinal direction is obtained based on a ratio of a difference between the vehicle speeds to a difference between the vehicle coordinate positions; a standard deviation of the position correlation value is calculated, a vehicle interaction risk is calculated by combining the position correlation values of any two connected vehicles, and an interaction risk matrix is further constructed; a weighted sum of the adjacent relationship matrix at a current time step and the state transmission matrix is taken as a first interaction feature at the current time step; a weighted sum of the interaction risk matrix at the current time step and a previous time step is taken as a second interaction feature at the current time step; a weighted sum of the first interaction feature and the second interaction feature is taken as a vehicle interaction feature, and a vehicle interaction feature sequence is further composed using the vehicle interaction features at different time steps; a vehicle feature sequence is obtained, and the vehicle feature sequence, the interaction relationship sequence and the vehicle interaction feature sequence are input into an interaction relationship prediction model to obtain an interaction relationship prediction result; the cloud end obtains a preliminary prediction result of a traffic safety state based on the interaction relationship prediction result; the cloud end corrects the preliminary prediction result according to the driving environment information and the driver state information to obtain a comprehensive evaluation result, and transmits the comprehensive evaluation result to the connected vehicles; a data transmission device is installed on the connected vehicles, and is used to upload the driving environment information, the driver state information and the vehicle driving information to the cloud end, and receive the comprehensive evaluation result; a data display device is installed on the connected vehicles, and is used to display the driving environment information, the driver state information and the comprehensive evaluation result; a warning device is installed on the connected vehicles, and is used to issue a traffic safety warning according to the driving environment information, the driver state information and the comprehensive evaluation result.
Citation Information
Patent Citations
Open environment automatic driving danger early warning method and system based on Internet of Things
CN120503813A