Truck accident identification method, device, storage medium and program product
By filtering, correlating and stratifying sampling of truck data, the isolation forest model is used to identify truck accidents, which solves the problem of data imbalance and lack of labeled samples, achieves efficient truck accident identification, and reduces the cost of data set construction.
Patent Information
- Application Number
- CN202210262059.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-17
AI Technical Summary
In the existing technology, the truck accident recognition model suffers from overfitting and high cost problems due to data imbalance and lack of labeled samples, and fails to fully consider the static attributes of the vehicle and external environmental factors.
By obtaining the overall data for filtering, association and stratified sampling, a sample data set is constructed, and the isolated forest model is used to train feature dimensions to determine whether a truck has been involved in an accident, which reduces the cost of data set construction and improves identification efficiency.
Without the need for a large number of labeled samples, the well-trained isolated forest model achieves an ideal truck accident recognition effect, improves the recognition efficiency, and takes into account the consistency of data distribution.
Smart Images

Figure CN114677254B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent identification technology, and more specifically, to a truck accident identification method, device, storage medium and program product. Background Art
[0002] Current accident identification technologies mostly train various identification models based on supervised learning algorithms. However, the probability of accidents occurring during truck operations, especially major accidents, is often extremely low, and the generated data is extremely unbalanced. This does not meet the use conditions of the supervised learning algorithms used in existing technical solutions, resulting in overfitting and inaccurate prediction results.
[0003] In addition, the supervised learning algorithms used in existing technical solutions rely on labeled data. However, it is often difficult to collect a certain amount of truck accident samples, and it costs a lot to complete the construction of the data set. Summary of the invention
[0004] Based on the above technical problems, the present invention aims to obtain overall data, filter, correlate, and stratify the overall data to obtain a sample data set, and then use the sample data set to train an isolation forest model, thereby using the isolation forest model to identify the truck data to be identified.
[0005] A first aspect of the present invention provides a method for identifying a truck accident, the method comprising:
[0006] Acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0007] Filtering, correlating, and stratified sampling the overall data to obtain a sample data set;
[0008] Integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics;
[0009] Training an isolation forest model using the feature dimensions under the multiple topics;
[0010] The truck data to be identified is input into the trained isolation forest model to determine whether the truck has an accident.
[0011] In some embodiments of the present invention, the multiple topics include: basic attribute information of the vehicle, driving behavior information of the driver, collision attribute information of the vehicle, parking attribute information of the vehicle, alarm attribute information of the vehicle, road attribute information associated with the vehicle, information of surrounding parked vehicles, holiday information where the vehicle is operating, and weather information where the vehicle is operating.
[0012] In some embodiments of the present invention, filtering, associating, and stratified sampling the overall data to obtain a sample data set includes:
[0013] The vehicle operation trajectory information is sorted by time, and the parking behaviors that may cause accidents are filtered out based on the information of adjacent trajectory points;
[0014] The basic attribute information of the vehicle is associated with the vehicle operation trajectory information through the vehicle ID, and the proportion of each vehicle type is obtained based on group aggregation;
[0015] According to the proportion of each vehicle type, sampling without replacement is performed on the parking behaviors that may cause accidents to obtain a sample data set.
[0016] In some embodiments of the present invention, the step of sorting the vehicle operation trajectory information by time and filtering out parking behaviors that may cause accidents based on adjacent trajectory point information includes:
[0017] Sort vehicle operation trajectory information by time;
[0018] For any vehicle, if the speeds of two adjacent trajectory points are all 0, and the time difference between the two adjacent trajectory points is within a preset time range, the previous trajectory point of the two adjacent trajectory points is used as the starting stop point;
[0019] If the subsequent stops of the vehicle are all within the first preset distance from the starting stop and the duration of this state exceeds the preset time, it is determined whether the vehicle is parked at a gas station, service area, highway parking strip, checkpoint, parking lot or within a second preset distance from the gas station, service area, highway parking strip, checkpoint, parking lot;
[0020] If the vehicle is not parked at a gas station, service area, highway parking strip, checkpoint, or parking lot, or is located beyond a second preset distance from a gas station, service area, highway parking strip, checkpoint, or parking lot, it is determined that the vehicle has parked in a manner that may result in an accident.
[0021] In some embodiments of the present invention, the characteristic dimensions under the multiple topics are calculated, including: calculating the acceleration of the vehicle, the average speed of the vehicle, the standard deviation of the vehicle's speed, the number of rapid accelerations per 100 kilometers, the number of rapid decelerations per 100 kilometers, the speeding mileage per 100 kilometers, the average daily fatigue driving time, the number of dangerous road passes per 100 kilometers, the number of turn signals per 100 kilometers, the number of brakes per 100 kilometers, the number of parked vehicles in the surrounding area before stopping, the number of parked vehicles in the surrounding area after stopping, the average speed of the surrounding vehicles before stopping, and the average speed of the surrounding vehicles after stopping.
[0022] In some embodiments of the present invention, the expression of the isolation forest model is:
[0023]
[0024] Among them, s(x,n) represents the anomaly index of the iTree constructed by recording x in the training data of n samples, h(x) represents the average path from the leaf node to the root node, and c(n) represents the average path length when the number of samples is n.
[0025] In some embodiments of the present invention, the method further includes: comparing the ratio of the number of abnormal samples to the total number of samples with the prior probability of accident occurrence, and selecting the abnormality rate closest to the prior probability of accident occurrence as the output result of the isolation forest model.
[0026] A second aspect of the present invention provides a truck accident identification device, the device comprising:
[0027] An acquisition module, used to acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0028] A sample acquisition module is used to filter, associate, and stratify the overall data to obtain a sample data set;
[0029] An integration module, used to integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics;
[0030] A training module, used for training an isolation forest model using the feature dimensions under the multiple topics;
[0031] The recognition module is used to input the truck data to be recognized into the trained isolation forest model to determine whether the truck has an accident.
[0032] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0033] Acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0034] Filtering, correlating, and stratified sampling the overall data to obtain a sample data set;
[0035] Integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics;
[0036] Training an isolation forest model using the feature dimensions under the multiple topics;
[0037] The truck data to be identified is input into the trained isolation forest model to determine whether the truck has an accident.
[0038] A fourth aspect of the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0039] Acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0040] Filtering, correlating, and stratified sampling the overall data to obtain a sample data set;
[0041] Integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics;
[0042] Training an isolation forest model using the feature dimensions under the multiple topics;
[0043] The truck data to be identified is input into the trained isolation forest model to determine whether the truck has an accident.
[0044] The beneficial effects of the present application are as follows: the present application obtains overall data, filters, correlates, and performs stratified sampling on the overall data to obtain a sample data set, uses the feature dimensions under the multiple topics to train an isolation forest model, and inputs the truck data to be identified into the trained isolation forest model to determine whether the truck has an accident. This fully takes into account the current situation of extremely unbalanced data on truck accidents, does not require the collection of labeled samples, and thus reduces the cost of data set construction. It uses stratified sampling to obtain samples from the overall data set, and ensures distribution consistency with the overall data. It achieves a relatively ideal recognition effect through a trained isolation forest model without using a large amount of sample data, thereby improving the efficiency of truck identification.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.
[0047] The present application can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0048] Figure 1 A schematic diagram of the method steps of an exemplary embodiment of the present application is shown;
[0049] Figure 2A schematic diagram of the device structure of an exemplary embodiment of the present application is shown;
[0050] Figure 3 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown;
[0051] Figure 4 A schematic diagram of a storage medium provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present application. It is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described.
[0053] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of the features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0054] Now, exemplary embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in a variety of different forms and should not be construed as being limited to the embodiments described herein. The accompanying drawings are not drawn to scale, and certain details may be magnified and certain details may be omitted for the purpose of clear expression. The shapes of the various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are merely exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0055] The following is attached to the instruction manual Figure 1-4 Several embodiments are given to describe exemplary implementations according to the present application. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementations of the present application are not limited in this regard. On the contrary, the implementations of the present application can be applied to any applicable scenario.
[0056] At present, the existing technologies mostly use supervised learning algorithms to train various recognition models. However, there are many problems. First, the probability of accidents, especially major accidents, occurring during the operation of trucks is often extremely low, and the data generated is extremely unbalanced, which does not meet the use conditions of the supervised learning algorithms used in the existing technical solutions, resulting in overfitting and inaccurate prediction results. Secondly, the supervised learning algorithms used in the existing technical solutions rely on labeled data, but it is often difficult to collect a certain amount of truck accident samples, and it takes a lot of cost to complete the construction of the data set. Thirdly, due to the small amount of sample data collected, there are data deviations, which are inconsistent with the overall data distribution, resulting in poor representativeness of the data set samples, and other problems, affecting the final accuracy of the model. Finally, the existing technical solutions only consider the dynamic attribute information of the vehicle, and do not consider the static attribute information of the vehicle, the driving behavior information of the driver, and the impact of related factors such as holidays and weather information on the model.
[0057] Therefore, in some exemplary embodiments of the present application, a truck accident identification method is provided, which is implemented based on the isolation forest model, such as Figure 1 As shown, the method includes:
[0058] S1. Obtaining overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0059] S2, filtering, associating, and stratified sampling the overall data to obtain a sample data set;
[0060] S3, integrating the sample data set, determining multiple topics, and calculating feature dimensions under the multiple topics;
[0061] S4, training an isolation forest model using the feature dimensions under the multiple topics;
[0062] S5. Input the truck data to be identified into the trained isolation forest model to determine whether the truck has an accident.
[0063] In the specific implementation, S2 filters, associates, and performs stratified sampling on the overall data to obtain a sample data set, including: sorting the vehicle operation trajectory information by time, filtering out parking behaviors that may cause accidents based on the information of adjacent trajectory points; associating the basic attribute information of the vehicle with the vehicle operation trajectory information through the vehicle ID, and obtaining the proportion of each vehicle type based on group aggregation; sampling the parking behaviors that may cause accidents without replacement based on the proportion of each vehicle type to obtain a sample data set.
[0064] In some preferred embodiments, the vehicle operation trajectory information is sorted by time, and the stopping behaviors that may cause accidents are filtered out based on the information of adjacent trajectory points, including: sorting the vehicle operation trajectory information by time; for any vehicle, if the speeds of two adjacent trajectory points are all 0 and the time difference between the two adjacent trajectory points is within a preset time range, the previous trajectory point of the two adjacent trajectory points is used as the starting stopping point; if the subsequent stopping points of the vehicle are all within a first preset distance from the starting stopping point and the duration of this state exceeds a preset time length, it is determined whether the vehicle is parked at a gas station, service area, highway parking strip, checkpoint, parking lot or the distance from the gas station, service area, highway parking strip, checkpoint, parking lot is within a second preset distance; if the vehicle is not parked at a gas station, service area, highway parking strip, checkpoint, parking lot or the distance from the gas station, service area, highway parking strip, checkpoint, parking lot is outside the second preset distance, it is determined that the vehicle has a stopping behavior that may cause an accident.
[0065] In some preferred embodiments, integrating the sample data set includes: integrating the stop information of the sample data set with other data information in the overall data collected by S1. For example, the sample data set is associated with the vehicle ID and vehicle information and the driver's driving behavior information, the latitude and longitude of the starting stop point and the geographic information and road information, the starting stop time point and the holiday information, and the latitude and longitude and the starting stop time point and the weather information. The null value rate of each field is counted, and the abnormal values are identified by the upper and lower bounds of the box plot, etc. For the field whose null value rate exceeds a certain threshold, a deletion operation is performed, and the field with a low null value rate is filled by the median of the field, and the field with more abnormal values is deleted. For the field with fewer abnormal values, a bin conversion is performed to improve the distribution of the field.
[0066] In some preferred embodiments, multiple themes are determined for the integrated data, and the multiple themes include: basic attribute information of the vehicle, driving behavior information of the driver, collision attribute information of the vehicle, parking attribute information of the vehicle, alarm attribute information of the vehicle, vehicle-associated road attribute information, information on surrounding parked vehicles, holiday information where the vehicle operates, and weather information where the vehicle operates.
[0067] The basic attribute information of the vehicle includes the vehicle type, vehicle brand, vehicle age, whether it is domestically produced, vehicle gross mass, etc. The characteristic dimensions that need to be calculated in the driver's driving behavior information include the number of rapid accelerations per 100 kilometers, the number of rapid decelerations per 100 kilometers, the mileage of speeding per 100 kilometers, the average daily fatigue driving time, the number of dangerous road passes per 100 kilometers, the number of turn signals per 100 kilometers, the number of brakes per 100 kilometers, etc. The characteristic dimensions that need to be calculated under the collision attribute information of the vehicle include the parking information of the vehicle, the acceleration of the vehicle, the average speed of the vehicle, the standard deviation of the speed of the vehicle, etc.; among them, the acceleration can be calculated by dividing the speed difference before and after a period of time by the time difference, the average speed of the vehicle is equal to the speed of the vehicle trajectory point divided by the number of vehicle trajectory points, and the standard deviation of the speed of the vehicle is equal to the arithmetic square root of the variance of the vehicle speed. The characteristic dimensions that need to be calculated under the information of the surrounding parked vehicles of the vehicle include: the number of parked vehicles in the surrounding area before the parking, the number of parked vehicles in the surrounding area after the parking, the average speed of the surrounding vehicles before the parking, and the average speed of the surrounding vehicles after the parking, etc.
[0068] Vehicle-associated road attribute information, for example, can be associated with time and space information, and the types of associated roads such as highways, national roads, provincial roads, county roads, etc. In addition, the characteristic dimensions of the holiday information and weather information of the vehicle operation can also be obtained through the trajectory location. Of course, it is not limited to the data listed above. The data accumulated by truck operation and maintenance and calculated during the accumulation can be classified as the so-called characteristic dimensions of this application, which will not be elaborated here.
[0069] It should be noted here that the English name of the isolation forest is IsolationForest, which is composed of multiple binary trees. The tree in iForest is called isolation tree, or iTree for short. Assuming that there are Z data in the data set, when constructing an iTree, multiple samples are uniformly sampled (generally without replacement) from the Z data as training samples for this tree. In the sample, a feature is randomly selected, and a value is randomly selected from the range of all values of this feature (between the minimum and maximum values), and the sample is binary divided, and the samples with values less than the value are divided to the left of the node, and the samples with values greater than or equal to the value are divided to the right of the node. In this way, a split condition and left and right data sets are obtained, and then the above process is repeated on the left and right data sets respectively until the data set has only one record or the limited height of the tree is reached.
[0070] In a preferred embodiment, the isolation forest model is expressed as:
[0071]
[0072] Among them, s(x,n) represents the anomaly index of the iTree constructed by recording x in the training data of n samples, h(x) represents the average path from the leaf node to the root node, and c(n) represents the average path length when the number of samples is n.
[0073] Further preferably, c(n) can be expressed as:
[0074] c(n)=2H(n-1)-(2(n-1) / n)
[0075] H(k)=ln(k)+ζ,ζ=0.5772156649
[0076] Among them, H(k) represents the harmonic function, ζ represents the Euler constant. Finally, the value range of s(x,n) is [0,1]. The closer to 1, the higher the possibility of an abnormal point, and the closer to 0, the higher the possibility of a normal point.
[0077] In the specific training process, the method further includes: using grid hyperparameters to train the isolation forest model. Grid search hyperparameters refers to enumerating possible values of each parameter, such as the number of trees, the maximum number of samples, the selection of feature ratios, etc., and then combining the possible values of all parameters to train the model, and finally selecting the parameter with the best evaluation result as the final parameter.
[0078] In another preferred embodiment, the method further comprises: comparing the ratio of the number of abnormal samples to the total number of samples with the prior probability of accident occurrence, and selecting the abnormal rate closest to the prior probability of accident occurrence as the output result of the isolation forest model. After a preset number of training times, the model is considered to be trained, and the trained model can be used in a specific application scenario to identify the target data. "Trained" and "trained" in this application have the same meaning, and the training method of the isolation forest model can be carried out according to the prior art, and no specific limitation is made. The present application obtains the overall data, filters, associates, and stratifies the overall data to obtain a sample data set, trains the isolation forest model using the feature dimensions under the multiple topics, and inputs the truck to be identified data into the trained isolation forest model to determine whether the truck has an accident, fully considering the current situation of extremely unbalanced data on truck accidents, without collecting labeled samples, thereby reducing the cost of data set construction, and using stratified sampling to obtain samples from the overall data set to ensure the distribution consistency with the overall data, and achieves a relatively ideal recognition effect through the trained isolation forest model without using a large amount of sample data, thereby improving the efficiency of truck identification.
[0079] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0080] In some exemplary embodiments of the present application, a truck accident identification device is also provided, such as Figure 2 As shown, the device comprises:
[0081] The acquisition module 301 is used to acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information;
[0082] The sample acquisition module 302 is used to filter, associate, and stratify the overall data to obtain a sample data set;
[0083] An integration module 303 is used to integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics;
[0084] A training module 304 is used to train an isolation forest model using the feature dimensions under the multiple topics;
[0085] The identification module 305 is used to input the truck data to be identified into the trained isolation forest model to determine whether the truck has an accident.
[0086] In a preferred embodiment, the isolation forest model is expressed as:
[0087]
[0088] Among them, s(x,n) represents the anomaly index of the iTree constructed by recording x in the training data of n samples, h(x) represents the average path from the leaf node to the root node, and c(n) represents the average path length when the number of samples is n.
[0089] Further preferably, c(n) can be expressed as:
[0090] c(n)=2H(n-1)-(2(n-1) / n)
[0091] H(k)=ln(k)+ζ,ζ=0.5772156649
[0092] Among them, H(k) represents the harmonic function, ζ represents the Euler constant. Finally, the value range of s(x,n) is [0,1]. The closer to 1, the higher the possibility of an abnormal point, and the closer to 0, the higher the possibility of a normal point.
[0093] The truck accident identification device can not only reduce the cost of data set construction, but also achieve a relatively ideal identification effect.
[0094] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.
[0095] It should also be emphasized that the system provided in the embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system of simulating, extending and expanding human intelligence, perceiving the environment, acquiring knowledge and using knowledge to obtain the best results using digital computers or machines controlled by digital computers. Basic artificial intelligence technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robotics, biometrics, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0096] Please refer to the following Figure 3 , which shows a schematic diagram of a computer device provided by some embodiments of the present application. Figure 3 As shown, the computer device 2 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, and the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and when the processor 200 runs the computer program, it executes the truck accident identification method provided in any of the aforementioned embodiments of the present application.
[0097] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0098] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs, and the processor 200 executes the programs after receiving execution instructions. The truck accident identification method disclosed in any implementation of the above-mentioned embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.
[0099] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.
[0100] The present application also provides a computer-readable storage medium corresponding to the truck accident identification method provided in the above embodiment. Figure 4 , Figure 4 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the truck accident identification method provided by any of the aforementioned embodiments will be executed.
[0101] In addition, examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0102] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method for allocating channels for quantum key distribution in a space-division multiplexed optical network provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0103] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the truck accident identification method provided in any of the aforementioned embodiments, including: obtaining overall data, the overall data including basic attribute information of the vehicle, the driver's driving behavior information, vehicle operation trajectory information, road information, holiday information and weather information; filtering, correlating and stratified sampling the overall data to obtain a sample data set; integrating the sample data set, determining multiple topics, and calculating the feature dimensions under the multiple topics; using the feature dimensions under the multiple topics to train an isolation forest model; and inputting the truck data to be identified into the trained isolation forest model to determine whether the truck has an accident.
[0104] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device or other device. Various general devices can also be used together with the teachings based thereon. According to the above description, it is obvious that the structure required for constructing such devices is constructed. In addition, the present application is not directed to any specific programming language. It should be understood that the content of the present application described herein can be implemented using various programming languages, and the above description of specific languages is to disclose the best implementation mode of the present application. In the specification provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this specification.
[0105] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.
[0106] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subassemblies. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise clearly stated, each feature disclosed in this specification can be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0107] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the creation device of the virtual machine according to the embodiment of the present application. The present application can also be implemented as a device or device program for executing part or all of the methods described herein. The program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0108] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A truck accident identification method, characterized in that: The method comprises: Acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information; Filtering, correlating, and stratified sampling the overall data to obtain a sample data set; Integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics; Training an isolation forest model using the feature dimensions under the multiple topics; The truck data to be identified is input into the trained isolation forest model to determine whether the truck has an accident. The multiple topics include: basic attribute information of the vehicle, driving behavior information of the driver, collision attribute information of the vehicle, parking attribute information of the vehicle, alarm attribute information of the vehicle, attribute information of the vehicle-related road, information of the surrounding parked vehicles, holiday information of the vehicle operation, and weather information of the vehicle operation; The filtering, associating, and stratified sampling of the overall data to obtain a sample data set includes: The vehicle operation trajectory information is sorted by time, and the parking behaviors that may cause accidents are filtered out based on the information of adjacent trajectory points; The basic attribute information of the vehicle is associated with the vehicle operation trajectory information through the vehicle ID, and the proportion of each vehicle type is obtained based on group aggregation; According to the proportion of each vehicle type, sampling without replacement is performed on the parking behaviors that may cause accidents to obtain a sample data set; The calculation of the characteristic dimensions under the multiple topics includes: calculating the acceleration of the vehicle, the average speed of the vehicle, the standard deviation of the vehicle's speed, the number of rapid accelerations per 100 kilometers, the number of rapid decelerations per 100 kilometers, the speeding mileage per 100 kilometers, the average daily fatigue driving time, the number of dangerous road passes per 100 kilometers, the number of turn signals per 100 kilometers, the number of brakes per 100 kilometers, the number of parked vehicles in the surrounding area before stopping, the number of parked vehicles in the surrounding area after stopping, the average speed of the surrounding vehicles before stopping, and the average speed of the surrounding vehicles after stopping.
2. The truck accident identification method according to claim 1, characterized in that: The vehicle operation trajectory information is sorted by time, and the parking behaviors that may cause accidents are filtered out based on the adjacent trajectory point information, including: Sort vehicle operation trajectory information by time; For any vehicle, if the speeds of two adjacent trajectory points are all 0, and the time difference between the two adjacent trajectory points is within a preset time range, the previous trajectory point of the two adjacent trajectory points is used as the starting stop point; If the subsequent stops of the vehicle are all within the first preset distance from the starting stop and the duration of this state exceeds the preset time, it is determined whether the vehicle is parked at a gas station, service area, highway parking strip, checkpoint, parking lot or within a second preset distance from the gas station, service area, highway parking strip, checkpoint, parking lot; If the vehicle is not parked at a gas station, service area, highway parking strip, checkpoint, or parking lot, or is located beyond a second preset distance from a gas station, service area, highway parking strip, checkpoint, or parking lot, it is determined that the vehicle has parked in a manner that may result in an accident.
3. The truck accident identification method according to claim 1 or 2, characterized in that: The expression of the isolation forest model is: Among them, s(x,n) represents the anomaly index of the iTree constructed by recording x in the training data of n samples, h(x) represents the average path from the leaf node to the root node, and c(n) represents the average path length when the number of samples is n.
4. The truck accident identification method according to claim 3, characterized in that: The method further includes: comparing the ratio of the number of abnormal samples to the total number of samples with the prior probability of accident occurrence, and selecting the abnormality rate closest to the prior probability of accident occurrence as the output result of the isolation forest model.
5. A truck accident identification device, characterized in that: The device comprises: An acquisition module, used to acquire overall data, wherein the overall data includes basic attribute information of the vehicle, driving behavior information of the driver, vehicle operation track information, road information, holiday information and weather information; A sample acquisition module is used to filter, associate, and stratify the overall data to obtain a sample data set; An integration module, used to integrate the sample data set, determine multiple topics, and calculate feature dimensions under the multiple topics; A training module, used for training an isolation forest model using the feature dimensions under the multiple topics; The recognition module is used to input the truck data to be recognized into the trained isolation forest model to determine whether the truck has an accident; The multiple topics include: basic attribute information of the vehicle, driving behavior information of the driver, collision attribute information of the vehicle, parking attribute information of the vehicle, alarm attribute information of the vehicle, attribute information of the vehicle-related road, information of the surrounding parked vehicles, holiday information of the vehicle operation, and weather information of the vehicle operation; The filtering, associating, and stratified sampling of the overall data to obtain a sample data set includes: The vehicle operation trajectory information is sorted by time, and the parking behaviors that may cause accidents are filtered out based on the information of adjacent trajectory points; The basic attribute information of the vehicle is associated with the vehicle operation trajectory information through the vehicle ID, and the proportion of each vehicle type is obtained based on group aggregation; According to the proportion of each vehicle type, sampling without replacement is performed on the parking behaviors that may cause accidents to obtain a sample data set; The calculation of the characteristic dimensions under the multiple topics includes: calculating the acceleration of the vehicle, the average speed of the vehicle, the standard deviation of the vehicle's speed, the number of rapid accelerations per 100 kilometers, the number of rapid decelerations per 100 kilometers, the speeding mileage per 100 kilometers, the average daily fatigue driving time, the number of dangerous road passes per 100 kilometers, the number of turn signals per 100 kilometers, the number of brakes per 100 kilometers, the number of parked vehicles in the surrounding area before stopping, the number of parked vehicles in the surrounding area after stopping, the average speed of the surrounding vehicles before stopping, and the average speed of the surrounding vehicles after stopping.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Automobile CAN bus network data exception detection method based on isolated forest
CN110149258A
Operating vehicle risk monitoring method and device, storage medium and computer equipment
CN113743815A
