A method for inferring and identifying the time of an accident based on big data of Internet of Vehicles
Through the Internet of Vehicles technology, vehicle driving data is collected in real time and the decision tree algorithm is used to build an emergency time prediction model, which solves the problems of low efficiency and inaccurate results in traditional methods, and achieves automated inference and improved accuracy of the emergency time.
Patent Information
- Application Number
- CN202410754949.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-06-12
AI Technical Summary
Traditional inference methods for risk time rely on manual collection and evaluation of information, are inefficient and prone to errors, lack real-time data processing and automated analysis capabilities, resulting in inaccurate inference results.
Vehicle driving data is collected in real time through Internet of Vehicles technology, and a decision tree algorithm is used to build a time-to-risk prediction model, which automatically analyzes and compares location data and vehicle speed data to determine parking behavior, and then infers the time to risk.
It realizes the automatic inference of the time of emergency, reduces the possibility of human intervention and errors, and improves the processing speed and the accuracy and consistency of the results.
Smart Images

Figure CN118587019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of accident time recognition, and in particular to an accident time inference and recognition method based on Internet of Vehicles big data. Background Art
[0002] Traditional methods of inferring the time of an accident usually rely on manual information collection and subjective assessment, which can be quite time-consuming and error-prone. Under this traditional framework, when an accident occurs, insurance companies must rely on accident reports submitted by customers, as well as third-party reports that may be involved, such as police reports or eyewitness testimony. These reports may not be immediately available, and in some cases may be incomplete or biased. Accident analysts must review all received information and infer the time and location of the accident by manually comparing various reports of the incident. This process is not only inefficient, but also prone to errors due to the subjectivity of personal judgment.
[0003] Because this approach relies on post-event reports rather than real-time data, it may lose important opportunities to process raw data, leading to inaccurate inference results. At the same time, there are no readily available data analysis tools or algorithms to automate the inference process or identify risk patterns from large amounts of historical data. This means that it is impossible to fully utilize the lessons learned from past events to improve future forecast accuracy.
[0004] In terms of data processing, traditional methods lack effective data cleaning tools and mechanisms, and often fail to distinguish differences in data quality, which may result in low-quality data affecting the inference of accident time. Moreover, traditional methods have weak iteration capabilities, and even if the initial inference results are inaccurate, there is a lack of effective mechanisms to continuously update and optimize the prediction model.
[0005] In short, traditional methods have great disadvantages in real-time performance, automation, data analysis capabilities, construction and optimization of prediction models, and economic benefits of accident handling. Summary of the invention
[0006] The purpose of the present invention is to provide a method for inferring and identifying the time of danger based on Internet of Vehicles big data to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for inferring and identifying the time of danger based on Internet of Vehicles big data, the method steps comprising:
[0008] S1. Collect basic accident information reported by customers and determine whether it is necessary to infer the time of the accident based on the cause of the accident; collect vehicle driving data in real time through the Internet of Vehicles, determine parking behavior by comparing and analyzing the location data uploaded by the vehicle with the accident location reported by the customer, and analyze the vehicle speed data; infer the point closest to the time of the accident based on multiple parking points, and determine the time and location of the accident;
[0009] S2. Collect real-time vehicle driving data and historical vehicle driving data through the Internet of Vehicles, use a decision tree algorithm to build a model that can predict the time of an accident based on the historical vehicle driving data, and use the built model to predict the time of an accident based on the real-time vehicle driving data;
[0010] S3. Compare whether the accident time of S1 and S2 is consistent. If they are consistent, determine the accident time as the final result, wherein the consistency of the comparison result is determined based on whether the difference between the two is less than one percent. Otherwise, perform data cleaning on the data required in S1 to improve data quality; modify the branching strategy of the decision tree algorithm in S2 to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. After optimization, the methods in S1 and S2 are used to predict and compare the accident time again until the final result is determined.
[0011] As a further improvement of the technical solution, the real-time collection of vehicle driving data through the Internet of Vehicles, the comparison and analysis of the location data uploaded by the vehicle and the accident location reported by the customer, and the analysis of the vehicle speed data to determine the parking behavior, specifically include:
[0012] For the vehicle location data included in the driving data, the accident location reported by the customer is compared with the location data uploaded by the vehicle. By calculating the distance d between the two points, if the distance d is less than 100 meters, the uploaded location data is considered to be the accurate accident location, and the accident time is the time when the vehicle uploaded these location information;
[0013] For the vehicle location data that is not included in the driving data, the parking behavior is mined by analyzing the vehicle speed data. The vehicle is considered to have stopped when the speed is 0km / h. If the vehicle stays within 10 minutes, moves no more than 100 meters and the speed is less than 30km / h, it is determined to be in a stopped state, and the location and time of the accident are inferred.
[0014] As a further improvement of the technical solution, the decision tree algorithm is used to construct a model capable of predicting the time of an accident based on historical vehicle driving data, specifically including:
[0015] Select a feature with the largest information gain in the data as the root node, and then continue to divide each child node under the root node according to the size of the information gain. Continue iterating until the samples in the node belong to the same category, then stop growing;
[0016] For each class in the data set, calculate the product of the probability of occurrence and the logarithm of this probability, add up all these products and take the negative value to get the entropy;
[0017] For each feature in the data set, the data set is divided into several subsets according to the different values of the feature, and the entropy of each subset is calculated. The weighted sum is taken by the size of each subset to obtain the overall entropy after the data set is divided by this feature.
[0018] Information gain is equal to the difference between the original entropy of the data set and the conditional entropy after partitioning according to the feature. The difference indicates the degree to which the randomness of this feature data is reduced;
[0019] Compare the information gain of all features and select the feature with the largest information gain as the split point;
[0020] Split the dataset using the selected features and repeat the above process for each subset until all instances belong to the same category.
[0021] As a further improvement of the technical solution, the prediction of the accident time based on the real-time vehicle driving data using the constructed model specifically includes:
[0022] Starting from the root node, according to the value of the eigenvalue, the corresponding branch is selected according to the judgment condition;
[0023] After entering the next node, according to the judgment condition of the current node and the value of the characteristic value, select the corresponding branch to enter the next node;
[0024] From the root node to the leaf node, branch selection is performed according to the value of the characteristic value until a leaf node is reached. The leaf node corresponds to the accident time result and the accident time result is output.
[0025] As a further improvement of the present technical solution, the comparison is made to see whether the accident time of S1 and S2 are consistent, and if they are relatively consistent, the accident time is determined as the final result, wherein the consistency of the comparison result is determined based on whether the difference between the two is less than 1%, and the comparison formula is X=|T1-T2| / |T1+T2| / 2*100%, X is less than or equal to 1%, the accident time results of S1 and S2 are relatively consistent, and the accident result is determined as the final result; otherwise, they are relatively inconsistent, wherein T1 and T2 represent the accident time results of S1 and S2 respectively.
[0026] As a further improvement of the technical solution, the data required in S1 is cleaned to improve the data quality, specifically including:
[0027] Missing value processing: Check the entire data set to determine the location of missing data values and directly delete the rows containing missing values;
[0028] Outlier processing: Use statistical methods to detect outliers in a data set, determine the location of outliers, and delete the rows containing outliers;
[0029] Duplicate value processing: Check whether there are duplicate values in the data, determine the location of the duplicate values, and delete the rows containing the duplicate values.
[0030] As a further improvement of the technical solution, the branching strategy of the decision tree algorithm in S2 is modified to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. The calculation formula of the Gini coefficient is Gini=1-∑pi 2 , where Gini is the Gini coefficient, which is used to measure the purity and uncertainty of the feature; pi is the probability of a certain category, indicating the probability that the sample belongs to this category; ∑ is the summation symbol, indicating the summation of the probabilities of all categories; pi 2 Represents the square of the probability of a category, which is the probability of the category multiplied by itself.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] 1. This method of inferring and identifying the time of an accident based on the big data of the Internet of Vehicles collects the basic accident report information provided by the customer, and determines whether the time of an accident needs to be inferred according to the cause of the accident. The Internet of Vehicles technology is used to monitor and collect the driving data of the vehicle in real time, and the parking behavior of the vehicle is determined by analyzing and comparing the location data uploaded by the vehicle and the accident location and speed data reported by the customer, and the time of the accident is inferred accordingly. The real-time and historical driving data of the vehicle are continuously collected through the Internet of Vehicles, and a decision tree algorithm is used to build a model that can predict the time of an accident based on these historical data. The model is then used to analyze the real-time driving data to predict the time of an accident, and the final result is determined by comparing the time of an accident between the two. This method can not only automatically infer the time of an accident, but also reduce the possibility of human intervention and errors, increase the processing speed, and accurately analyze the event by combining the results of the two algorithms.
[0033] 2. This method for inferring and identifying the time of accident based on the big data of the Internet of Vehicles performs data cleaning on the data required by the method when there is inconsistency in the comparison to improve the data quality. The branching strategy of the decision tree algorithm is modified to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. After the optimization processing, the time of accident is predicted and compared again until the final result is determined. Through the process of continuity and iterative improvement, the system can gradually optimize the data quality, improve the model performance and analysis algorithm, thereby improving the accuracy and consistency of the time of accident inference, ensuring the reliability of the results, and continuously iterating and improving so that the system can adapt and improve in changing data and situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of step S1 of the present invention;
[0035] Figure 2 It is a schematic diagram of the method steps of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] See also Figure 1-2 The present invention provides a technical solution: a method for inferring and identifying the time of an accident based on Internet of Vehicles big data, comprising the following method steps:
[0038] S1. Collect basic accident information reported by customers and determine whether it is necessary to infer the time of the accident based on the cause of the accident; collect vehicle driving data in real time through the Internet of Vehicles, determine parking behavior by comparing and analyzing the location data uploaded by the vehicle with the accident location reported by the customer, and analyze the vehicle speed data; infer the point closest to the time of the accident based on multiple parking points, and determine the time and location of the accident;
[0039] S2. Collect real-time vehicle driving data and historical vehicle driving data through the Internet of Vehicles, extract valuable features for predicting the time of accident from the data, use the decision tree algorithm to build a model that can predict the time of accident based on the historical vehicle driving data, and use the built model to predict the time of accident for the real-time vehicle driving data;
[0040] S3. Compare whether the accident time of S1 and S2 is consistent. If they are consistent, determine the accident time as the final result, wherein the consistency of the comparison result is determined based on whether the difference between the two is less than one percent. Otherwise, perform data cleaning on the data required in S1 to improve data quality; modify the branching strategy of the decision tree algorithm in S2 to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. After optimization, the methods in S1 and S2 are used to predict and compare the accident time again until the final result is determined.
[0041] The details are as follows:
[0042] S1. Collect basic accident information reported by customers, including but not limited to the time, location, cause and license plate number of the accident, etc., and input it into the system as preliminary accident data. According to the reported cause of the accident, decide whether to infer the time of the accident. In the case of an accident caused by disasters, the vehicle will not upload data, so no inference will be made for this part. That is, the vehicle whose accident time is inferred is the vehicle that uploaded data at the time of the accident.
[0043] Through the Internet of Vehicles technology, the system collects the vehicle's driving data in real time, including but not limited to the vehicle's location, speed, time and mileage information, determines whether the driving data contains the vehicle's location data, and analyzes and compares the accident location reported by the customer with the GPS location uploaded by the vehicle based on the location data, including:
[0044] For the vehicle location data included in the driving data, the accident location reported by the customer is compared with the location data uploaded by the vehicle. By calculating the distance between the two points: d = sqrt((x2-x1)2+(y2-y1)2), if the distance d is less than 100 meters, the uploaded location data is considered to be the accurate accident location, and the accident time is the time when the vehicle uploaded these location information, where x1 and y1 represent the coordinates of the accident location reported by the customer, x2 and y2 represent the coordinates of the GPS location uploaded by the vehicle, and sqrt refers to the square root function;
[0045] For driving data that does not include vehicle location data, parking behavior is mined by analyzing vehicle speed data. When the vehicle speed is 0 km / h, it is considered to be stopped. If the vehicle stops within 10 minutes, moves no more than 100 meters in a certain section, and the speed is less than 30 km / h, it is also considered to be in a stopped state, thereby inferring the time and location of the accident;
[0046] If the vehicle has multiple parking spots, the parking spot closest to the occurrence of the incident is taken as the location of the accident, and this time point is considered to be the inferred time of the accident. If there is no such parking spot, it is considered that the time of the accident cannot be inferred.
[0047] S2. Use the Internet of Vehicles system to collect real-time driving data from the vehicle, including but not limited to the vehicle's speed, acceleration, position, fuel consumption, braking intensity, steering angle, and vehicle fault information, etc. At the same time, historical driving data is also collected for training the prediction model. The historical driving data includes real-time driving data features and accident time label columns.
[0048] The decision tree algorithm is used to build a model based on historical driving data, including:
[0049] Select a feature with the largest information gain in the data as the root node, and continue to divide each child node under the root node according to the size of the information gain. Continue to iterate until the node reaches a pure state, that is, the samples in the node belong to the same category, then stop growing.
[0050] The calculation process of information gain is as follows:
[0051] Calculate the entropy of the entire dataset: Entropy is a measure of data impurity and determines how much randomness exists in the data. Entropy is expressed as: for each class in the dataset, calculate the product of the probability of occurrence and the logarithm of this probability, then add up all these products and take the negative value;
[0052] Calculate conditional entropy for each feature: For each feature in the data set, divide the data set into several subsets according to the different values of the feature, and calculate the entropy of each subset. Then, weight the sum of the sizes of each subset to obtain the overall entropy after the data set is divided by this feature.
[0053] Determine information gain: Information gain is equal to the difference between the original entropy of the data set and the conditional entropy after partitioning by feature. This difference indicates the degree to which the randomness of the data is reduced by considering this feature.
[0054] Select the best segmentation feature: compare the information gain of all features and select the feature with the largest information gain as the segmentation point;
[0055] Recursively subset: Split the dataset using the selected features and repeat the above process for each subset until all instances belong to the same class.
[0056] Use the built model to predict the time of accident based on real-time driving data, including:
[0057] Starting from the root node, according to the value of the eigenvalue, the corresponding branch is selected according to the judgment condition;
[0058] After entering the next node, according to the judgment condition of the current node and the value of the characteristic value, select the corresponding branch to enter the next node;
[0059] From the root node to the leaf node, branch selection is performed according to the value of the characteristic value until a leaf node is reached. The leaf node corresponds to the accident time result and the accident time result is output.
[0060] S3, comparing the accident time of S1 and S2, and determining the final accident time according to the comparison result, specifically including:
[0061] The comparison formula is X=|T1-T2| / |T1+T2| / 2*100%, and if X is less than or equal to 1%, the accident time results of S1 and S2 are relatively consistent, and the accident result is determined to be the final result; otherwise, if they are inconsistent, the methods in S1 and S2 are optimized, where T1 and T2 represent the accident time results of S1 and S2 respectively;
[0062] When there is inconsistency, the data used in S1 is cleaned and missing value processing is performed. The entire data set is checked to determine the location of missing data values, and the rows containing missing values are directly deleted. Outlier processing uses statistical methods to detect outliers in the data set, determine the location of outliers, and delete the rows containing outliers. Duplicate value processing checks whether there are duplicate values in the data, determines the location of duplicate values, and deletes the rows containing duplicate values, so as to improve data quality.
[0063] For the decision tree algorithm in S2, the original branching strategy based on information gain is modified to a branching strategy based on the Gini coefficient. The calculation formula of the Gini coefficient is: Gini = 1-∑pi 2 , where Gini is the Gini coefficient, which is used to measure the purity and uncertainty of the feature; pi is the probability of a certain category, indicating the probability that the sample belongs to this category; ∑ is the summation symbol, indicating the summation of the probabilities of all categories; pi 2 It represents the square of the probability of a category, which is the probability of the category multiplied by itself, so as to improve the performance and robustness of the algorithm.
[0064] After the optimization process, the methods in S1 and S2 perform another prediction and comparison of the accident time until the final result is determined.
[0065] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for inferring and identifying the time of an accident based on big data of Internet of Vehicles, characterized in that: The steps are as follows: S1. Collect basic accident information reported by customers and determine whether it is necessary to infer the time of the accident based on the cause of the accident; collect vehicle driving data in real time through the Internet of Vehicles, determine parking behavior by comparing and analyzing the location data uploaded by the vehicle with the accident location reported by the customer, and analyze the vehicle speed data; infer the point closest to the time of the accident based on multiple parking points, and determine the time and location of the accident; S2. Collect real-time vehicle driving data and historical vehicle driving data through the Internet of Vehicles, use a decision tree algorithm to build a model that can predict the time of an accident based on the historical vehicle driving data, and use the built model to predict the time of an accident based on the real-time vehicle driving data; S3, compare whether the accident time of S1 and S2 is consistent, and determine the accident time as the final result. The consistency of the comparison result is determined by whether the difference between the two is less than one percent. Otherwise, the data required in S1 is cleaned to improve the data quality; the branching strategy of the decision tree algorithm in S2 is modified to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. After optimization, the methods in S1 and S2 are used to predict and compare the accident time again until the final result is determined; The real-time collection of vehicle driving data through the Internet of Vehicles, comparison and analysis of the location data uploaded by the vehicle and the accident location reported by the customer, and analysis of the vehicle speed data to determine the parking behavior, specifically include: For the vehicle location data included in the driving data, the accident location reported by the customer is compared with the location data uploaded by the vehicle. By calculating the distance d between the two points, if the distance d is less than 100 meters, the uploaded location data is considered to be the accurate accident location, and the accident time is the time when the vehicle uploaded these location information; For the location data of the vehicle that is not included in the driving data, the parking behavior is mined by analyzing the vehicle speed data. When the vehicle speed is 0 km / h, it is considered to be stopped. If the vehicle stops within 10 minutes, moves no more than 100 meters and the speed is less than 30 km / h, it is determined to be in a stopped state, and the location and time of the accident are inferred; The method of using a decision tree algorithm to construct a model capable of predicting the time of an accident based on historical vehicle driving data specifically includes: Select a feature with the largest information gain in the data as the root node, and then continue to divide each child node under the root node according to the size of the information gain. Continue iterating until the samples in the node belong to the same category, then stop growing; For each class in the data set, calculate the product of the probability of occurrence and the logarithm of this probability, add up all these products and take the negative value to get the entropy; For each feature in the data set, the data set is divided into several subsets according to the different values of the feature, and the entropy of each subset is calculated. The weighted sum is taken by the size of each subset to obtain the overall entropy after the data set is divided by this feature. Information gain is equal to the difference between the original entropy of the data set and the conditional entropy after partitioning according to the feature. The difference indicates the degree to which the randomness of this feature data is reduced; Compare the information gain of all features and select the feature with the largest information gain as the split point; Split the dataset using the selected features and repeat the above process for each subset until all instances belong to the same category; The method of using the constructed model to predict the time of an accident based on real-time vehicle driving data specifically includes: Starting from the root node, according to the value of the eigenvalue, the corresponding branch is selected according to the judgment condition; After entering the next node, according to the judgment condition of the current node and the value of the characteristic value, select the corresponding branch to enter the next node; From the root node to the leaf node, branch selection is performed according to the value of the characteristic value until a leaf node is reached. The leaf node corresponds to the accident time result, and the accident time result is output; The comparison of whether the accident time of S1 and S2 is consistent, and the accident time is determined as the final result, wherein the consistency of the comparison result is determined according to whether the difference between the two is less than 1%, and the comparison formula is X=|T1-T2| / |T1+T2| / 2*100%, X is less than or equal to 1%, and the accident time results of S1 and S2 are relatively consistent, and the accident result is determined as the final result; otherwise, they are relatively inconsistent, wherein T1 and T2 represent the accident time results of S1 and S2 respectively; The data required in S1 is cleaned to improve the data quality, specifically including: Missing value processing: Check the entire data set to determine the location of missing data values and directly delete the rows containing missing values; Outlier processing: Use statistical methods to detect outliers in a data set, determine the location of outliers, and delete the rows containing outliers; Duplicate value processing: Check whether there are duplicate values in the data, determine the location of the duplicate values, and delete the rows containing the duplicate values; The branching strategy of the decision tree algorithm in S2 is modified to a branching strategy based on the Gini coefficient to improve the performance and robustness of the algorithm. The calculation formula of the Gini coefficient is Gini=1-∑pi 2 , where Gini is the Gini coefficient, which is used to measure the purity and uncertainty of the feature; pi is the probability of a certain category, indicating the probability that the sample belongs to this category; ∑ is the summation symbol, indicating the summation of the probabilities of all categories; pi 2 Represents the square of the probability of a category, which is the probability of the category multiplied by itself.
Citation Information
Patent Citations
Method for actively identifying accident based on Internet-of-vehicles
CN111914687A