Dynamic calibration vehicle collision risk real-time prediction model construction method, platform, medium and terminal
By obtaining vehicle trajectory data through perceptual equipment and using logistic regression models for dynamic calibration, the problem that the vehicle collision risk prediction model in the prior art cannot adapt to the traffic environment in real time is solved, and efficient vehicle collision risk prediction and safety control are achieved.
Patent Information
- Application Number
- CN202411017376.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-29
AI Technical Summary
The existing technology cannot adapt to the rapid changes in traffic environment and traffic flow in real time, resulting in the inability to adaptively correct the vehicle collision risk prediction model and the inability to complete real-time data processing and prediction in sub-second level.
Vehicle trajectory data is obtained through perceptual equipment, vehicle characteristics and traffic flow characteristics are extracted, extended distance collision time is calculated, logistic regression model is constructed using multiple interval sampling methods, and model parameters are dynamically calibrated through the online gradient descent algorithm to realize real-time vehicle collision risk predict.
Real-time prediction and safety control of vehicle collision risks is achieved, prediction accuracy and efficiency are improved, suitable for rapidly changing traffic environments, and data processing pressure is reduced.
Smart Images

Figure CN119049336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic safety technology, and in particular to a method, platform, medium and terminal for constructing a dynamically calibrated real-time prediction model of vehicle collision risk. Background Art
[0002] As traffic volume continues to grow, the frequency of vehicle collisions continues to rise, and the road system faces serious traffic safety problems. Among them, road safety control sections or nodes are major accident black spots on the road, and their safety issues have also attracted much attention. Due to limited space and complex lane configurations, drivers need to make many quick decisions, which may cause drivers to quickly change the speed of the vehicle and suddenly change lanes, greatly increasing the risk of collisions in road safety control sections or nodes.
[0003] The existing technology predicts the collision risk of road safety control sections or nodes mainly based on large sample high-frequency offline data. This type of method is based on a large amount of continuous data and uses an offline static model for prediction to obtain high-precision prediction results. That is, all video information within a certain time and space is extracted and analyzed offline. The amount of data obtained by this method is large, up to sub-second level (that is, not reaching the speed of seconds), which is similar to continuous data. When the data is large sample continuous data, the prediction accuracy is undoubtedly higher when the offline static model is used for estimation. However, this type of method has obvious limitations in the application of safety management practice: first, the estimated high-precision model is only applicable to the corresponding large sample data. When the sample data changes, the portability of the model may not meet the requirements, which may lead to the estimated model having poor data prediction performance for new samples and cannot be used. Secondly, the offline static estimation method cannot provide assistance for real-time risk prediction and safety control of road safety control sections or nodes. Under the actual operation of the vehicle, the entire process of video image recognition, data acquisition, data cleaning, data analysis, and model estimation cannot be completed in sub-seconds, and it is impossible to estimate vehicle conflicts and perform static estimation of the model by acquiring a large amount of continuous data in real time. Finally, estimating vehicle accident risks based on historical data cannot adapt to the rapid changes in the traffic environment and traffic flow, especially for toll stations that are in the stage of changing their operating modes. The correction of the accident risk prediction model with data calibration helps to capture the dynamic changes in vehicle safety and accurately and effectively complete the safety monitoring tasks at each stage of development.
[0004] Therefore, there is an urgent need to construct a method for real-time prediction of vehicle collision risks at road safety control sections or nodes that can reflect the spatiotemporal variation characteristics of traffic conditions and whose model can be adaptively corrected in real time as data is calibrated. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a method, platform, medium and terminal for constructing a dynamically calibrated real-time prediction model of vehicle collision risk. The method solves the problem that estimating vehicle accident risk based on historical data cannot adapt to the traffic environment and rapid changes in traffic flow, and the model cannot be adaptively corrected in real time with data calibration.
[0006] In a first aspect, the present invention provides a method for constructing a real-time prediction model of vehicle collision risk at a road safety control section or node, comprising:
[0007] S1: Obtain vehicle trajectory data of safety-controlled sections or nodes through sensing devices, and extract vehicle characteristic parameters and traffic flow characteristic parameters;
[0008] S2: Based on vehicle characteristic parameters and traffic flow characteristic parameters, the extended distance collision time between each vehicle and the nearest preceding vehicle is calculated at each moment, the collision risk between each vehicle and the nearest preceding vehicle is determined, and the factors affecting the collision risk are extracted;
[0009] S3: performing interval sampling in various ways on the vehicle characteristic parameters, traffic flow characteristic parameters and collision risks obtained from all vehicle trajectory data to obtain corresponding multiple discrete data sets;
[0010] S4: taking the collision risk influencing factors in the discrete data set as input and the collision risk between each vehicle and the nearest preceding vehicle as output, constructing vehicle collision risk prediction models based on the multiple discrete data sets obtained in step S3, and dynamically calibrating the parameters of each model to obtain multiple vehicle collision risk real-time prediction models;
[0011] S5: The ROC curve area is used to evaluate the prediction effect of each vehicle collision risk real-time prediction model, and the optimal sampling method and learning rate suitable for safety prediction of safety-controlled sections or nodes are obtained to determine the final vehicle collision risk real-time prediction model.
[0012] Furthermore, the specific process of S1 is:
[0013] S11: by setting up sensing devices at road safety control sections or nodes, collect vehicle trajectory sample data at safety control sections or nodes, extract the complete motion trajectory of the vehicle, and perform data preprocessing on it;
[0014] S12: extracting the vehicle trajectory data of each vehicle after data preprocessing, including the position coordinates O of the vehicle at each moment, the vehicle ID, and the time series identifier;
[0015] S13: Based on the vehicle trajectory data of S12, further processing is performed to obtain vehicle characteristic parameters and traffic flow characteristic parameters of all vehicles; wherein the vehicle characteristic parameters include but are not limited to the vehicle length L i 、Vehicle width Wi , vehicle speed V, vehicle speed direction V i , vehicle speed change rate V a , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type Traffic flow characteristic parameters include but are not limited to average traffic flow F, average traffic density K, and headway H.
[0016] Furthermore, factors affecting the collision risk include but are not limited to: vehicle length L i 、Vehicle width W i 、Speed of the vehicle ahead L v , speed of the following vehicle F v , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type , average traffic density K.
[0017] Furthermore, the specific process of S2 is:
[0018] S21: Establish a coordinate axis based on the vehicle trajectory data, match each vehicle with its nearest preceding vehicle at time t, and calculate the instantaneous traffic conflict ETTC between the matching vehicles, that is, the extended distance collision time; the calculation formula of ETTC is as follows:
[0019]
[0020] Among them, L i and L j are the lengths of vehicles i and j respectively; D ij is the distance between the center points of the two vehicles; d ij is the distance between the closest points of the two vehicles; O and V are the two-dimensional coordinates and velocity vectors of the center points of the vehicles;
[0021] S22: judging the collision risk of all matching vehicles according to the instantaneous traffic conflict judgment condition obtained by calculation;
[0022] The discrimination conditions are:
[0023] When ETTC is less than or equal to the preset threshold ETTC', the collision risk of the matching vehicle is that there is a collision risk;
[0024] When ETTC is greater than a preset threshold ETTC', the collision risk of the matching vehicle is , and there is no collision risk.
[0025] Furthermore, the specific process of S3 is:
[0026] S31: setting n different sampling time intervals and dividing the continuous data into equal intervals;
[0027] S32: selecting sampling points for each interval data on the basis of equally spaced data;
[0028] There are two types of sampling point selection: one is to select the data with time series number 1 in each sampling interval as the sampling data; the other is to randomly select the data with any time series number in each sampling interval as the sampling data;
[0029] S33: Based on n different sampling time intervals and 2 sampling points, K different sampling methods are obtained, where K = A2 n , the vehicle characteristic parameters, traffic flow characteristic parameters and collision risk data obtained from all vehicle trajectory data samples are sampled to obtain K discrete data sets.
[0030] Further, S41: based on each discrete data set obtained in S3, a logistic regression model is defined using a preset proportion of data in the data set, that is, a vehicle collision risk prediction model is constructed to predict the probability of vehicle collision under the influence of multiple factors;
[0031] S42: Using the remaining data in the data set to sequentially input the vehicle collision risk prediction model for dynamic calibration, a plurality of vehicle collision risk real-time prediction models are obtained, wherein each discrete data set corresponds to a vehicle collision risk real-time prediction model; the specific process of dynamic calibration is:
[0032] S421: Set the time when the last data of the input definition logistic regression model is set to time t-1, and set this sample data to S t-1 , then the model parameters are Based on the current model parameters Sample data S at time t t , vehicle collision risk data y at time t t , calculate the sample loss function value L(y t ,p(y t )). Then, according to the loss function value L(y t ,p(y t )) Calculate sample S t About each vehicle collision risk prediction model parameters The gradient value Among them, the loss function is cross entropy loss, and its formula is:
[0033] L(y t ,p(y t ))=-y t log(p(y t ))-(1-y t )log(1-p(y t ))
[0034] Among them, p(y t ) is S t The probability of collision occurring under the sample;
[0035] The gradient value calculation formula is:
[0036]
[0037] in, For parameters The gradient value of , j = 1, 2, ..., n, n is the number of independent variables;
[0038] S422: Calculate the model parameters at time t based on the gradient descent algorithm That is to complete a dynamic parameter calibration, the calculation formula is:
[0039]
[0040] in, is the logistic regression model parameter at time t; α is the learning rate;
[0041] S423: Determine whether the remaining data in the data set are traversed and input in sequence: if so, end the calibration; if not, then t+1 and return to S421.
[0042] Furthermore, the specific process of S5 is:
[0043] S51: constructing a ROC curve based on the true positive rate and the false positive rate determined by comparing the prediction result of the real-time prediction model for vehicle collision risk with the actual result of collision risk calculated in S2; calculating the area under the ROC curve based on the real-time prediction model for vehicle collision risk dynamically calibrated at each moment, and obtaining a series of AUC values of the results of each real-time prediction model for vehicle collision risk constructed by multiple discrete data sets;
[0044] S52: Compare the numerical values and stability of the AUC values corresponding to the real-time prediction models of vehicle collision risks:
[0045] S521: Determine whether the AUC value is higher than a preset AUC threshold: if so, it indicates that the prediction performance of the model is good; if not, it indicates that the prediction performance of the model is poor;
[0046] S522: inputting a plurality of continuous sample data into the real-time prediction model for vehicle collision risk, and determining whether the change in the AUC value is less than a preset standard threshold value: if so, it indicates that the stability of the real-time prediction model for vehicle collision risk is good; if not, it indicates that the stability of the real-time prediction model for vehicle collision risk is poor;
[0047] The interval sampling method corresponding to the real-time prediction model of vehicle collision risk with good prediction performance and stability is selected as the optimal interval sampling method;
[0048] S53: Based on the loss function value and AUC value, a sensitivity analysis is performed on the learning rate in the online gradient descent algorithm to determine the optimal learning rate;
[0049] S54: Combining the optimal interval sampling method and the optimal learning rate, a vehicle risk prediction model suitable for the road safety control section or node is obtained.
[0050] In a second aspect, the present invention provides a road risk monitoring and early warning platform, characterized in that the platform deploys the steps of the method described above.
[0051] In a third aspect, the present invention provides an electronic terminal, comprising a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the above method.
[0052] In a fourth aspect, the present invention provides a readable storage medium storing a computer program, wherein the computer program is used to execute the steps of the method described above when called by a processor.
[0053] Beneficial Effects
[0054] The present invention proposes a method, platform, medium and terminal for constructing a dynamically calibrated real-time prediction model of vehicle collision risk. The method establishes a collision risk prediction model based on an online gradient descent algorithm, and realizes dynamic calibration of parameters as the sample size increases, so that the model reflects the state of the actual traffic flow and improves the prediction accuracy, breaking through the limitation that traditional methods cannot adapt to the rapid changes in traffic environment and traffic flow; the method does not require large sample data, and can process continuous data streams in real time, improve prediction efficiency, realize real-time risk prediction and safety management and control, and reduce the data processing pressure of the safety monitoring system; the method can calibrate model parameters in real time, improve model prediction accuracy, and is suitable for real-time prediction scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 It is a flow chart of a method for constructing a dynamic calibrated real-time prediction model of vehicle collision risk provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0058] Example 1
[0059] like Figure 1 As shown, this embodiment provides a method for constructing a dynamic calibrated vehicle collision risk real-time prediction model, including:
[0060] S1: Obtain vehicle trajectory data of safety-controlled sections or nodes through sensing devices, and extract vehicle characteristic parameters and traffic flow characteristic parameters.
[0061] S11: Collect vehicle trajectory data of safety control sections or nodes through sensing devices set up at road safety control sections or nodes, including but not limited to RSU, cameras, millimeter wave radars, laser radars, radar vision integrated devices, etc., and perform data preprocessing on them. In the specific implementation, the form of the vehicle trajectory data is closely related to the sensing device used, including video or image data, signal data, coordinate data, etc., which are not limited; and then convert the original data into data that conforms to standard formats such as CSV through image processing, signal processing, data structuring and other technologies. In this embodiment, the vehicle trajectory data is video data as an example, and the complete motion trajectory of the vehicle is obtained through image recognition, data structuring and other technologies.
[0062] S12: extracting the vehicle trajectory data of each vehicle after data preprocessing, including the position coordinates O of the vehicle at each moment, the vehicle ID, and the time series identifier (in this embodiment, the time series identifier is the frame number ID of the video);
[0063] S13: Based on the vehicle trajectory data of S12, further processing is performed to obtain characteristic parameters of all vehicles. In this embodiment, coordinate conversion is performed on each frame of the video data, the image coordinates are converted into world coordinates, and characteristic parameters of all vehicles are obtained by calculation between coordinates. The characteristic parameters of vehicles include vehicle characteristic parameters and traffic flow characteristic parameters; the vehicle characteristic parameters include but are not limited to the vehicle length L i 、Vehicle width W i , vehicle speed V, vehicle speed direction V i , vehicle speed change rate V a , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type Traffic flow characteristic parameters include but are not limited to average traffic flow F, average traffic density K, and headway H.
[0064] S2: Based on vehicle characteristic parameters and traffic flow characteristic parameters, the extended distance collision time between each vehicle and the nearest preceding vehicle is calculated at each moment, the collision risk between each vehicle and the nearest preceding vehicle is determined, and the factors affecting the collision risk are extracted.
[0065] S21: Establish a coordinate axis based on the vehicle trajectory data, match each vehicle in each frame of the video at time t with its nearest preceding vehicle, and calculate the instantaneous traffic conflict ETTC between the matching vehicles, that is, the extended distance collision time; the calculation formula of ETTC is as follows:
[0066]
[0067] Among them, L i and L j are the lengths of vehicles i and j respectively; D ij is the distance between the center points of the two vehicles; d ij is the distance between the closest points of the two vehicles; O and V are the two-dimensional coordinates and velocity vectors of the center points of the vehicles;
[0068] S22: judging the collision risk of all matching vehicles according to the instantaneous traffic conflict judgment condition obtained by calculation;
[0069] The discrimination conditions are:
[0070] When ETTC is less than or equal to the preset threshold ETTC', the collision risk of the matching vehicle is that there is a collision risk;
[0071] When ETTC is greater than a preset threshold ETTC', the collision risk of the matching vehicle is , and there is no collision risk.
[0072] In this embodiment, when ETTC≤3 seconds, there is a collision risk; when ETTC>3 seconds, there is no collision risk.
[0073] Specifically, according to the principle of vehicle interaction, the impact factors of collision risk are selected from four aspects: vehicle size and type, vehicle speed, headway, and traffic flow fluctuation. The impact factors of collision risk include but are not limited to: vehicle length L i 、Vehicle width W i 、Speed of the vehicle ahead L v , speed of the following vehicle F v , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type, average traffic density K. The impact factor of collision risk is obtained by removing variables with obvious correlation through Pearson correlation test. The impact factor index is obtained by processing vehicle characteristic parameters and traffic flow characteristic parameters. Specifically, based on the coordinate position of each vehicle i, the surrounding vehicles and their vehicle types, speeds, and distances between the two vehicles are determined and used as the impact factor index of the model collision risk.
[0074] S3: Perform interval sampling in various ways on the vehicle characteristic parameters, traffic flow characteristic parameters and collision risks obtained from all vehicle trajectory data to obtain corresponding multiple discrete data sets.
[0075] S31: Set n different sampling time intervals, and divide the continuous data into equal intervals; in specific implementation, the number n can be adjusted according to actual conditions. In this embodiment, the number n is set to 3: ΔT1, ΔT2, ΔT3, that is, the sampling time interval can be selected from ΔT1 seconds, ΔT2 seconds, and ΔT3 seconds.
[0076] S32: selecting sampling points for each interval data on the basis of equally spaced data;
[0077] There are two types of sampling point selection: one is to select the data with time sequence number 1 in each sampling interval as the sampling data. In this embodiment, the data of the first frame in the sampling interval is selected as the sampling data; the other is to randomly select the data with any time sequence number in each sampling interval as the sampling data. In this embodiment, any frame in the sampling interval is selected as the sampling data. In specific implementation, the random sampling method can be selected according to actual needs, and it is not limited.
[0078] Preferably, the random selection uses the random.choice() function in Python;
[0079] S33: Based on n different sampling time intervals and 2 sampling points, K different sampling methods are obtained, where K = A2 n , the vehicle characteristic parameters, traffic flow characteristic parameters and collision risk data obtained from all vehicle trajectory data are sampled to obtain K discrete data sets. The data in the discrete data set obtained after sampling is the sample data. In this embodiment, since the set sampling time is 3, specifically 1 second, 2 seconds and 3 seconds, there are 6 sampling methods, namely C1, C2, C3, C4, C5 and C6, and finally 6 discrete data sets are obtained.
[0080] S4: Taking the collision risk influencing factors in the discrete data set as input and the collision risk between each vehicle and the nearest preceding vehicle as output, respectively construct vehicle collision risk prediction models based on the multiple discrete data sets obtained in step S3, and dynamically calibrate the parameters of each model to obtain multiple vehicle collision risk real-time prediction models.
[0081] S41: Based on each discrete data set obtained in S3, a logistic regression model is defined using a preset proportion of data in the data set, that is, a vehicle collision risk prediction model is constructed to predict the probability of vehicle collision under the influence of multiple factors. The vehicle collision risk prediction model formula is as follows:
[0082] y~Bernoulli(P)
[0083]
[0084]
[0085] Where y is the prediction index, i.e., the vehicle collision risk, with a value ranging from 0 to 1, where 0 means no collision risk and 1 means 100% collision risk; logit(P) is the logarithmic probability function, which converts the probability of collision into logarithmic probability; P is the probability of collision; p(y n ) is the probability mass function, which represents the probability of each value of y; y n is the prediction index of all sample data; n is the number of all samples; X is the influencing factor of collision risk; θ is the corresponding coefficient of each influencing factor, which means the average change of logit(p) when X changes by a unit amount; k is the number of independent variables; ε n is a random error that follows a normal distribution with a mean of zero.
[0086] In this embodiment, the preset ratio of the data set is set to 20%. During implementation, it can be adjusted according to actual needs and is not limited thereto.
[0087] S42: Using the remaining data in the data set to sequentially input the vehicle collision risk prediction model for dynamic calibration, a plurality of vehicle collision risk real-time prediction models are obtained, wherein each discrete data set corresponds to a vehicle collision risk real-time prediction model; the specific process of dynamic calibration is:
[0088] S421: Set the time when the last data of the input definition logistic regression model is set to time t-1, and set this sample data to S t-1 , then the model parameters are Based on the current model parameters Sample data S at time t t , vehicle collision risk data y at time t t , calculate the sample loss function value L(y t ,p(y t )). Then, according to the loss function value L(y t ,p(y t )) Calculate sample S t About each vehicle collision risk prediction model parameters The gradient value Among them, the loss function is cross entropy loss, and its formula is:
[0089] L(y t ,p(y t ))=-y t log(p(y t ))-(1-y t )log(1-p(y t ))
[0090] Among them, p(y t ) is S t The probability of collision occurring under the sample;
[0091] The gradient value calculation formula is:
[0092]
[0093] in, For parameters The gradient value of , j = 1, 2, ..., n, n is the number of independent variables;
[0094] S422: Calculate the model parameters at time t based on the gradient descent algorithm That is to complete a dynamic parameter calibration, the calculation formula is:
[0095]
[0096] in, is the logistic regression model parameter at time t; α is the learning rate;
[0097] S423: Determine whether the remaining data in the data set are traversed and input in sequence: if so, end the calibration; if not, then t+1 and return to S421.
[0098] S5: The ROC curve area is used to evaluate the prediction effect of each vehicle collision risk real-time prediction model, and the optimal sampling method and learning rate suitable for safety prediction of specific safety control sections or nodes are obtained to determine the final dynamic vehicle risk prediction model.
[0099] S51: Construct an ROC curve based on the true positive rate (TPR) and false positive rate (FPR) determined by comparing the prediction results of the real-time prediction model for vehicle collision risk with the actual results of collision risk calculated in S2; wherein the horizontal axis is the true positive rate and the vertical axis is the false positive rate. Based on the real-time prediction model for vehicle collision risk dynamically calibrated at each moment, calculate the area under the ROC curve to obtain a series of AUC values of the results of each real-time prediction model for vehicle collision risk constructed by multiple discrete data sets;
[0100] S52: Compare the numerical values and stability of the AUC values corresponding to the real-time prediction models of vehicle collision risks:
[0101] S521: Determine whether the AUC value is higher than a preset AUC threshold: if yes, it indicates that the prediction performance of the model is good; if no, it indicates that the prediction performance of the model is poor. In specific implementation, the preset AUC threshold can be adjusted according to actual needs and is not limited. In this embodiment, the preset AUC threshold is set to 0.9.
[0102] S522: Input multiple continuous sample data into the real-time prediction model for vehicle collision risk, and determine whether the AUC value change is less than a preset standard threshold: if so, it indicates that the real-time prediction model for vehicle collision risk has good stability; if not, it indicates that the real-time prediction model for vehicle collision risk has poor stability.
[0103] The interval sampling method corresponding to the real-time prediction model of vehicle collision risk with good prediction performance and stability is selected as the optimal interval sampling method;
[0104] S53: Based on the loss function value and AUC value, a sensitivity analysis is performed on the learning rate α in the online gradient descent algorithm.
[0105] For sensitivity analysis, this embodiment uses a learning rate of 0.001 to 0.01 for prediction, and compares the model prediction effect based on the loss function value and the AUC value. When the loss function value decreases too slowly, the learning rate is increased; when the loss function value fluctuates, the learning rate is reduced. A high AUC value indicates that the learning rate is better. Based on this, the optimal learning rate α' is determined.
[0106] S54: Combining the optimal interval sampling method and the optimal learning rate, a vehicle risk prediction model suitable for the road safety control section or node is obtained.
[0107] Example 2
[0108] This embodiment provides a system for constructing a dynamic calibrated vehicle collision risk real-time prediction model, including:
[0109] Data acquisition and preprocessing module: obtains vehicle trajectory data of safety-controlled sections or nodes through sensing devices, and extracts vehicle characteristic parameters and traffic flow characteristic parameters;
[0110] Collision risk module: Based on vehicle characteristic parameters and traffic flow characteristic parameters, it calculates the extended distance collision time between each vehicle and the nearest preceding vehicle at each moment, determines the collision risk between each vehicle and the nearest preceding vehicle, and extracts the factors affecting the collision risk;
[0111] Data sampling and discretization module: Perform interval sampling in various ways on the vehicle characteristic parameters, traffic flow characteristic parameters and collision risks obtained from all vehicle trajectory data to obtain corresponding multiple discrete data sets;
[0112] Model building module: taking the collision risk influencing factors in the discrete data set as input and the collision risk between each vehicle and the nearest preceding vehicle as output, building vehicle collision risk prediction models based on the multiple discrete data sets obtained in step S3, and dynamically calibrating the parameters of each model to obtain multiple vehicle collision risk real-time prediction models;
[0113] Model parameter optimization module: The ROC curve area is used to evaluate the prediction effect of each vehicle collision risk real-time prediction model, obtain the optimal sampling method and learning rate suitable for safety prediction of safety-controlled sections or nodes, and determine the final vehicle collision risk real-time prediction model.
[0114] Example 3
[0115] This embodiment provides a road risk monitoring and early warning platform, which deploys the steps of the method described above.
[0116] Example 4
[0117] This embodiment provides an electronic terminal, which includes a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the above method.
[0118] Example 4
[0119] This embodiment provides a readable storage medium: a computer program is stored in the medium, and when the computer program is called by a processor, the steps of the method described above are executed.
[0120] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.
[0121] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the controller described in any of the foregoing embodiments, such as a hard disk or memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Furthermore, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0122] Based on this understanding, the technical solution of the present invention, in essence or in other words, the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0123] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0124] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for constructing a dynamic calibrated real-time prediction model for vehicle collision risk, characterized in that: include: S1: Obtain vehicle trajectory data of safety-controlled sections or nodes through sensing devices, and extract vehicle characteristic parameters and traffic flow characteristic parameters; S2: Based on vehicle characteristic parameters and traffic flow characteristic parameters, the extended distance collision time between each vehicle and the nearest preceding vehicle is calculated at each moment, the collision risk between each vehicle and the nearest preceding vehicle is determined, and the factors affecting the collision risk are extracted; S3: performing interval sampling in various ways on the vehicle characteristic parameters, traffic flow characteristic parameters and collision risks obtained from all vehicle trajectory data to obtain corresponding multiple discrete data sets; S4: taking the collision risk influencing factors in the discrete data set as input and the collision risk between each vehicle and the nearest preceding vehicle as output, constructing vehicle collision risk prediction models based on the multiple discrete data sets obtained in step S3, and dynamically calibrating the parameters of each model to obtain multiple vehicle collision risk real-time prediction models; S5: The ROC curve area is used to evaluate the prediction effect of each vehicle collision risk real-time prediction model, and the optimal sampling method and learning rate suitable for safety prediction of safety-controlled sections or nodes are obtained to determine the final vehicle collision risk real-time prediction model.
2. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 1, characterized in that: The specific process of S1 is: S11: by setting up sensing devices at road safety control sections or nodes, collect vehicle trajectory sample data at safety control sections or nodes, extract the complete motion trajectory of the vehicle, and perform data preprocessing on it; S12: extracting the vehicle trajectory data of each vehicle after data preprocessing, including the position coordinates O of the vehicle at each moment, the vehicle ID, and the time series identifier; S13: Based on the vehicle trajectory data of S12, further processing is performed to obtain vehicle characteristic parameters and traffic flow characteristic parameters of all vehicles; wherein Vehicle characteristic parameters include but are not limited to vehicle length L i 、Vehicle width W i , vehicle speed V, vehicle speed direction V i , vehicle speed change rate V a , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type Traffic flow characteristic parameters include but are not limited to average traffic flow F, average traffic density K, and headway H.
3. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 1, characterized in that: Factors affecting collision risk include but are not limited to: Vehicle length L i 、Vehicle width W i 、Speed of the vehicle ahead L v , speed of the following vehicle F v , vehicle travel distance D, distance between vehicles D ij 、Vehicle Type V type , average traffic density K.
4. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 1, characterized in that: The specific process of S2 is: S21: Establish a coordinate axis based on the vehicle trajectory data, match each vehicle with its nearest preceding vehicle at time t, and calculate the instantaneous traffic conflict ETTC between the matching vehicles, that is, the extended distance collision time; the calculation formula of ETTC is as follows: Among them, L i and L j are the lengths of vehicles i and j respectively; D ij is the distance between the center points of the two vehicles; d ij is the distance between the closest points of the two vehicles; O and V are the two-dimensional coordinates and velocity vectors of the center points of the vehicles; S22: judging the collision risk of all matching vehicles according to the instantaneous traffic conflict judgment condition obtained by calculation; Among them, the judgment conditions are: When ETTC is less than or equal to the preset threshold ETTC', the collision risk of the matching vehicle is that there is a collision risk; When ETTC is greater than a preset threshold ETTC', the collision risk of the matching vehicle is , and there is no collision risk.
5. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 1, characterized in that: The specific process of S3 is: S31: setting n different sampling time intervals and dividing the continuous data into equal intervals; S32: selecting sampling points for each interval data on the basis of equally spaced data; There are two types of sampling point selection: one is to select the data with time series number 1 in each sampling interval as the sampling data; the other is to randomly select the data with any time series number in each sampling interval as the sampling data; S33: Based on n different sampling time intervals and 2 sampling points, K different sampling methods are obtained, where The vehicle characteristic parameters, traffic flow characteristic parameters and collision risk data obtained from all vehicle trajectory data are sampled to obtain K discrete data sets.
6. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 1, characterized in that: The specific process of S4 is: S41: Based on each discrete data set obtained in S3, a logistic regression model is defined using a preset proportion of data in the data set, that is, a vehicle collision risk prediction model is constructed to predict the probability of vehicle collision under the influence of multiple factors; S42: Using the remaining data in the data set to sequentially input the vehicle collision risk prediction model for dynamic calibration, a plurality of vehicle collision risk real-time prediction models are obtained, wherein each discrete data set corresponds to a vehicle collision risk real-time prediction model; the specific process of dynamic calibration is: S421: Set the time when the last data of the input definition logistic regression model is set to time t-1, and set this sample data to S t-1 , then the model parameters are Based on the current model parameters Sample data S at time t t , vehicle collision risk data y at time t t , calculate the sample loss function value L(y t ,p(y t )); According to the loss function value L(y t ,p(y t )) Calculate sample S t About each vehicle collision risk prediction model parameters The gradient value Among them, the loss function is cross entropy loss, and its formula is: L(and t ,p(and t ))=-y t log(p(y t ))-(1-and t )log(1-p(y t )) Among them, p(y t ) is S t The probability of collision occurring under the sample; The gradient value calculation formula is: in, For parameters The gradient value of , j = 1, 2, ..., n, n is the number of independent variables; S422: Calculate the model parameters at time t based on the gradient descent algorithm That is to complete a dynamic parameter calibration, the calculation formula is: in, is the logistic regression model parameter at time t; α is the learning rate; S423: Determine whether the remaining data in the data set are traversed and input in sequence: if so, end the calibration; if not, then t+1 and return to S421.
7. The method for constructing a dynamic calibrated vehicle collision risk real-time prediction model according to claim 6, characterized in that: The specific process of S5 is as follows: S51: constructing a ROC curve based on the true positive rate and false positive rate determined by comparing the prediction result of the vehicle collision risk real-time prediction model with the actual collision risk result calculated in S2; Based on the real-time prediction model of vehicle collision risk dynamically calibrated at each moment, the area under the ROC curve is calculated to obtain a series of AUC values of the results of each real-time prediction model of vehicle collision risk constructed by multiple discrete data sets; S52: Compare the numerical values and stability of the AUC values corresponding to the real-time prediction models of vehicle collision risks: S521: Determine whether the AUC value is higher than a preset AUC threshold: if so, it indicates that the prediction performance of the model is good; if not, it indicates that the prediction performance of the model is poor; S522: inputting a plurality of continuous sample data into the real-time prediction model for vehicle collision risk, and determining whether the change in the AUC value is less than a preset standard threshold value: if so, it indicates that the stability of the real-time prediction model for vehicle collision risk is good; if not, it indicates that the stability of the real-time prediction model for vehicle collision risk is poor; The interval sampling method corresponding to the real-time prediction model of vehicle collision risk with good prediction performance and stability is selected as the optimal interval sampling method; S53: Based on the loss function value and AUC value, a sensitivity analysis is performed on the learning rate in the online gradient descent algorithm to determine the optimal learning rate; S54: Combining the optimal interval sampling method and the optimal learning rate, a vehicle risk prediction model suitable for the road safety control section or node is obtained.
8. A road risk monitoring and early warning platform, characterized in that: The platform implements the steps of the method according to any one of claims 1 to 7.
9. An electronic terminal, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: A computer program is stored, and when the computer program is called by a processor, the computer program is used to execute: the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Risk evaluation model-based traffic accident happening probability acquiring method and system
CN106355883A
Calibration method and device, electronic equipment and computer readable storage medium
CN116167846A
Automatic driving vehicle predictive safety control method and system based on vehicle infrastructure cooperation
CN116714579A
Risk assessment-based expressway lane marking dynamic control method and control device
CN118280130A
