Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a traffic accident scene restoration method.
The purpose of the invention can be realized by the following technical scheme:
a traffic accident scene restoration method comprises the following steps:
s1, drawing the driving track of the vehicle one minute before the accident by using the data collected by the GPS device and the sensor arranged on the vehicle;
and S2, taking the drawn driving track of the vehicle one minute before the accident and the data in the vehicle recorder at the moment of the accident as input, and obtaining the restored driving track of the vehicle by applying a deep learning algorithm.
Preferably, in step S1, the traveling direction of the vehicle is determined by the correspondence between the difference between the tension sensors mounted on both sides of the wheel and the turning direction and angle of the vehicle, and the emergency braking of the vehicle is determined by the pressure sensors mounted on the wheel.
Preferably, data acquired by the sensor in the method is filtered by a Kalman filtering algorithm and then is subjected to other processing.
Preferably, the deep learning algorithm is specifically a neural network algorithm.
Preferably, the neural network algorithm specifically adopts LSTM to build a recurrent neural network.
Preferably, the data collected by the GPS device and the sensor includes: position of vehicle, vehicle speed, acceleration, course angle, tire pressure, tire surface tension, yaw rate, angular acceleration.
Preferably, the restored vehicle driving track is specifically obtained through simulation of an OpenCv algorithm.
Preferably, the restored vehicle driving track is sent to a traffic police or a mobile terminal of an owner of the vehicle.
Compared with the prior art, the invention has the following advantages:
1. by using data acquired by a vehicle-mounted device installed and deployed on a vehicle and a repeatedly trained deep learning algorithm, random errors and interference of human subjective factors can be effectively removed, and accident misjudgment rate is greatly reduced; the mobile phone terminal is matched to directly generate a simulation reproduction picture of the vehicle running track of an accident scene, so that two accident parties do not need to wait for traffic polices in situ, congestion possibly caused by the accident is greatly reduced, unnecessary waste of time and manpower is saved, and good social order maintenance is greatly promoted.
2. High accuracy: the method completely avoids subjective assumption during accident responsibility confirmation from the realization method, eliminates random errors and is beneficial to treating traffic accidents fairly and equitably.
3. High adaptability: the method adopts a neural network model with large data flow, so that the adaptability of the method is greatly improved, and after full training, the method can be competent for route prediction under any condition; meanwhile, each successful prediction can be brought into a new data set, so that the neural network is continuously updated, and the accuracy of the neural network can be ensured without spending manpower on maintenance.
4. High real-time performance: the wireless communication technology used by the method has small transmission time delay, can ensure that the acquired motion state information and the position information of the vehicle are always real-time, has low algorithm complexity and small time consumption, and can draw a conclusion as soon as possible.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
Examples
As shown in fig. 1, the present application provides a traffic accident scene restoration method, which records a driving track of a vehicle in real time through a vehicle-mounted device, can automatically extract the driving track of the vehicle within one minute before a car accident occurs after the car accident occurs, generates an original driving track of the vehicle on the basis of the image, and finally outputs a final image. The method comprises the following steps:
s1, installing a pressure sensor and a tension sensor on a vehicle wheel, starting a vehicle-mounted GPS device, and drawing a driving track of the vehicle one minute before an accident occurs by using data collected by the GPS device and the sensor provided on the vehicle, where the data collected by the GPS device and the sensor is transmitted to a microprocessor unit in the vehicle in this embodiment, and the method specifically includes:
acquiring data such as longitude and latitude, vehicle speed, course angle and the like of a vehicle through a GPS device, and mapping the vehicle coordinate to a two-dimensional rectangular coordinate system by utilizing coordinate system conversion;
judging the vehicle traveling direction: when the vehicle turns in the advancing process, the tension force applied to the left surface and the right surface of the wheel is different due to the action of centripetal force, based on the principle, tension sensors can be arranged on the two sides of the wheel, and then the advancing direction of the vehicle is determined according to the corresponding relation between the difference value of the tension force on the two sides of the wheel and the turning direction and angle of the vehicle;
judging whether the vehicle is suddenly braked: the real-time speed of the vehicle can be reflected, the pressure between a front side tire and the ground can be increased when the vehicle is braked emergently under the normal condition, and the pressure can be obtained through a pressure sensor arranged on the wheel; the tire is slightly deformed under the action of pressure, so that the trace left on the ground by the wheel is wider than that of the wheel in normal running, and based on the principle, the change of the running trace of the wheel of the vehicle can be simulated in a computer through the acceleration during the braking of the vehicle;
drawing an image: and drawing the running track of the vehicle one minute before the accident through the values measured by the GPS device, the tension sensor and the pressure sensor.
And S2, obtaining a restored vehicle running track by applying a deep learning algorithm by taking the drawn vehicle running track one minute before the accident and data such as speed, acceleration and the like in a vehicle recorder at the moment of the accident as input.
Because the data collected by the sensors is accompanied by a lot of noise, the data must first be filtered using a Kalman (Kalman) filtering algorithm.
The Kalman filter estimates the process state by a feedback control method: the filter estimates the state of the process at a certain moment and then obtains feedback in the form of a (noisy) measured variable. The final Kalman estimation algorithm becomes a kind of pre-estimation-correction algorithm with numerical solution.
Kalman filter for estimating state variable x ∈ R of discrete time processn. The state equation of the discrete linear steady-state system is as follows:
xk=Axk-1+Buk-1+wk-1 (1)
defining an observed variable z ∈ RmAnd obtaining a measurement equation:
zk=Hxk+vk (2)
wherein wkAnd vkRepresenting process excitation noise and observation noise, respectively. Assuming that they are normally distributed white noises independent of each other, the Kalman filter estimates the next state mainly by equation (1), according to zkCorrecting the estimator:
wherein x ∈ Rn-represents prior and ^ represents estimation) is prior state estimation of the kth step under the condition that the prior state of the kth step is known; x is formed by RnFor a known measured variable zkEstimating the posterior state of the kth step; pkEstimating error covariance for the prior; pk -Estimating covariance for the posteriori; r is the variance of the observed noise.
Matlab is used for establishing a Kalman filter model with Gaussian random noise as noise for simulation, the effect is shown in figure 2, it can be seen that the measured data of the sensor can not be directly used for calculation in practical application, the deviation between the data result filtered by Kalman and the theoretical predicted value is not large, the precision requirement of calculation is met, and the filtering effect is good.
The deep learning algorithm adopted by the method is specifically a neural network algorithm. In the practical application scenario of the method, the controlled object is a running vehicle, if the parameters (coordinates) of the traveling track of the vehicle without an accident are regarded as the output of the neural network, and the parameters (the track before the accident, the speed, the acceleration, the course angle, the data of each sensor and the like) of the running state of the vehicle are regarded as the input of the neural network. The coordinates of each moment of the vehicle are determined by the coordinates of the previous moment and the operation state parameters, and a causal relationship exists between the moments, so that the neural network is not suitable for being built by a common full-connection layer neural network DNN, but is suitable for being built by a recurrent neural network RNN.
A multilayer feedback RNN (Recurrent neural Network) neural Network is an artificial neural Network with nodes directionally connected into a ring. The internal state of such a network may exhibit dynamic timing behavior. Unlike feed-forward neural networks, the RNN can use its internal memory to process an input sequence at an arbitrary timing, highlighting the logical relationship between time points and time points.
As known from the major forward and backward algorithms of RNN, a big problem faced by RNN is that there may be gradient vanishing or bursting for long span time. In this embodiment, a Long Short-Term Memory network (LSTM) is used to build the RNN network, so as to solve the above problem.
The LSTM is one in which the cell has its own state and can change its state by internal update, and the gate structure adds or deletes information to or from the state of the cell, and the gate is divided into an input gate, an output gate, and a forgetting gate. Through the LSTM, the time information of the input sequence can be guaranteed not to be lost, the situation of gradient explosion or disappearance under the long-span time condition of the RNN can be solved, and the robustness of the neural network is guaranteed.
The input and output data of the neural network are as follows:
the input data is divided into two parts: the running track parameters (coordinates) of one minute before the accident and various parameters (including position, speed, acceleration, course angle, yaw rate, angular acceleration, tire pressure and tire surface tension) of the filtered running state of the vehicle, which are obtained by real-time positioning through a GPS device, are in the form of a sequence consisting of digital streams and containing time logic. The output data is the predicted vehicle travel trajectory (coordinates) without an accident, and is also a series of sequences including time logic.
The training result of the neural network is as follows:
training uses a TensorFlow deep learning framework and GPU rendering + CUDA accelerated training under a Ubuntu 16.04LTS system. The training data sets are 2500 groups in total, each group uses Numpy to generate data to simulate various parameters in the vehicle running process, and matplotlib is used to simulate the vehicle running track within one minute before the accident happens and draw the track.
In this embodiment, after 1000 rounds of training are performed on the training data set, the accuracy of the test on 50 verification data sets with the same structure is as high as 98.3%. The random error can be greatly eliminated by 1000 groups of training data sets, and the accuracy of the deep learning method is proved by repeated verification of 50 different verification data sets.
In order to verify the feasibility of the method as much as possible under the conditions of ensuring safety and avoiding property loss, the obtained model is simulated under the framework of the OpenCv algorithm. The simulation result shows that the preset particle motion track and the prediction motion track at every moment calculated according to the deep learning network model almost have no deviation. The simulation well proves that the track predicted by the network can well approach the track of the vehicle without accidents under the real condition.
The restored track obtained by the method can be sent to a mobile terminal application program (APP) of a user:
1) APP main function design: there is the communication function between this APP and the car-mounted device. After an accident occurs, a user logs in the APP and clicks a key to operate, and a driving track of the vehicle before the accident occurs and an image simulated by the original driving track are obtained.
The car owner and the traffic police can log in the APP platform to perform related operations. The basic logical framework is: the vehicle owner enters the operation interface of the APP to upload the related data and the pictures, and then the background program uploads the data to the database. When the traffic police enters the operation interface to process the traffic accident, the background program calls the corresponding data from the database.
2) The use process comprises the following steps:
registering: when using this APP, user registration is first required. The user only needs to download the APP in the mobile phone APP store, click to register and operate according to the following operation flow, and fig. 3 is a registration flow chart.
The specific operation sequence is as follows: for car owners, the operation of the entire application after an accident is shown in fig. 4, and for traffic police, the operation of the entire application after an accident is shown in fig. 5.
In the present embodiment, it is assumed that there are two vehicles at the first vehicle (121.21348E,31.28772N) and the second vehicle (121.21352E,31.28771N), respectively. And the microprocessor unit performs Kalman filtering on the read sensor data and records the sensor data, and the GPS synchronizes the running position information of the vehicle in real time. FIG. 6 shows real-time readings of the angular acceleration of the vehicle over the horizon and Kalman filtered data, which is used as input data to the neural network along with the GPS recorded trajectory. And (3) assuming that the two vehicles collide with each other, quickly calculating according to input data by the neural network, drawing a preset running track of the two vehicles when no accident occurs after the calculation is completed, and finally obtaining that the first vehicle is in a straight-going state before the collision and the second vehicle turns right before the collision.