A vehicle fault detection method and device, a vehicle terminal and a storage medium
By using the isolated forest model and clustering algorithm to construct a set of positive and negative samples in vehicle fault detection, the problem of low fault detection accuracy in existing EBD systems is solved, and high-precision detection is achieved in the absence of abnormal samples.
Patent Information
- Application Number
- CN202310895017.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-07-20
AI Technical Summary
Existing technologies for vehicle EBD system fault detection suffer from a lack of sufficient abnormal samples, resulting in low detection accuracy.
A fault detection method based on the isolated forest model is adopted. By clustering the sample dataset, positive and negative sample sets are constructed to improve the accuracy of model training.
In cases where abnormal samples are missing or few, the detection accuracy and precision of the fault detection model are improved, ensuring timely identification of vehicle faults.
Smart Images

Figure CN116910552B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of automobiles, and particularly relates to a vehicle fault detection method and device, a vehicle terminal, and a storage medium. BACKGROUND
[0002] Electric Brakeforce Distribution (EBD) is one of the commonly used safety technologies in modern automobiles. It is a braking system that automatically adjusts the braking force of each wheel when the automobile brakes to improve braking performance and stability. When EBD fails, it may pose a potential danger to the driver, and therefore, it is necessary to detect whether the EBD of the vehicle has failed in real time.
[0003] However, the prior art usually needs to train a detection model using a large number of labeled historical abnormal samples, and when the abnormal samples collected by the detection model are missing or less, the detection model cannot accurately determine whether the EBD system of the vehicle has failed. Therefore, the prior art has the problem of low accuracy in detecting the failure of the EBD system of the vehicle. SUMMARY
[0004] The embodiments of the application provide a vehicle fault detection method, device, vehicle terminal, and storage medium, which improve the detection accuracy of vehicle faults.
[0005] In a first aspect, the embodiments of the application provide a vehicle fault detection method, comprising:
[0006] obtaining target vehicle information of a vehicle to be detected;
[0007] inputting the target vehicle information into a trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected; wherein the fault detection model is obtained by training a pre-constructed isolation forest model based on a sample data set; the sample data set comprises a positive sample set and a negative sample set; the positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm.
[0008] Optionally, the sample vehicle information set is obtained by the following method:
[0009] obtaining a historical vehicle set composed of all vehicles that have failed in a historical time period;
[0010] selecting a sample vehicle from the historical vehicle set according to a preset strategy;
[0011] determining all vehicle information of the sample vehicle in the historical time period as the sample vehicle information set.
[0012] Optionally, the fault detection model is obtained by training in the following manner:
[0013] performing data cleaning processing and feature engineering processing on each sample vehicle information in the sample vehicle information set to obtain a standard sample information set;
[0014] inputting the standard sample information set into the isolation forest model for optimized training to obtain the fault detection model.
[0015] Optionally, the fault detection model is obtained by training in the following manner:
[0016] inputting the sample vehicle information set into the isolation forest model for processing to obtain an anomaly score corresponding to each sample vehicle information in the sample vehicle information set;
[0017] performing clustering processing on each sample vehicle information according to the anomaly score corresponding to the sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set;
[0018] determining a ratio between a first quantity and a total quantity of sample vehicle information in each cluster; wherein the first quantity refers to a quantity of first sample vehicle information in the each cluster whose anomaly score is less than a first threshold value;
[0019] dividing the plurality of clusters according to the ratio to obtain the positive sample set and the negative sample set;
[0020] performing optimized training on the isolation forest model according to the positive sample set and the negative sample set to obtain the fault detection model.
[0021] Optionally, the determination of the ratio between the first quantity and the total quantity of sample vehicle information in each cluster comprises:
[0022] calculating an inter-cluster sum of squares of the plurality of clusters;
[0023] if the inter-cluster sum of squares is greater than or equal to a second threshold value, determining the ratio of the each cluster.
[0024] Optionally, the dividing of the plurality of clusters according to the ratio to obtain the positive sample set and the negative sample set comprises:
[0025] if a ratio corresponding to a target cluster is less than a third threshold value, dividing the target cluster to the positive sample set; the target cluster is used to represent any one of the plurality of clusters;
[0026] if the ratio corresponding to the target cluster is greater than a fourth threshold value, dividing the target cluster to the negative sample set; the fourth threshold value is greater than the third threshold value.
[0027] Optionally, the target vehicle information is input into the trained fault detection model for processing to obtain the fault detection result of the vehicle to be detected.
[0028] The historical vehicle information is input into the fault detection model for processing to obtain a current detection result.
[0029] If the current detection result is consistent with a reference detection result corresponding to the historical vehicle information, the target vehicle information is input into the fault detection model for processing to obtain the fault detection result of the vehicle to be detected.
[0030] In a second aspect, an embodiment of the present application provides a vehicle fault detection device, comprising:
[0031] A first obtaining unit is configured to obtain target vehicle information of a vehicle to be detected.
[0032] A first processing unit is configured to input the target vehicle information into a trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected. The fault detection model is obtained by training a pre-constructed isolated forest model based on a sample data set. The sample data set includes a positive sample set and a negative sample set. The positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm.
[0033] In a third aspect, an embodiment of the present application provides a vehicle terminal, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the vehicle terminal implements the vehicle fault detection method according to any one of the first aspect.
[0034] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the vehicle fault detection method according to any one of the first aspect is implemented.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a vehicle terminal, the vehicle terminal can execute the vehicle fault detection method according to any one of the first aspect.
[0036] Compared with the prior art, the embodiment of the present application has the following beneficial effects:
[0037] The vehicle fault detection method provided in the embodiment of the application comprises the following steps: obtaining target vehicle information of a vehicle to be detected; inputting the target vehicle information into a trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected; wherein the fault detection model is obtained by training a pre-constructed isolated forest model based on a sample data set; the sample data set comprises a positive sample set and a negative sample set; the positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm. Compared with the detection model used in the prior art, the fault detection model in the application is obtained by training an isolated forest model, so that the detection accuracy of the fault detection model is not affected when abnormal samples are missing or few, and the sample data set of the fault detection model is obtained by clustering a sample vehicle information set based on a clustering algorithm, thereby ensuring the accuracy of the positive sample set and the negative sample set, improving the detection accuracy of the fault detection model, and further improving the detection accuracy of vehicle faults. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0039] Figure 1 is an implementation flowchart of the vehicle fault detection method provided by an embodiment of the application;
[0040] Figure 2 is an implementation flowchart of the vehicle fault detection method provided by another embodiment of the application;
[0041] Figure 3 is an implementation flowchart of the vehicle fault detection method provided by another embodiment of the application;
[0042] Figure 4 is a structural schematic diagram of the vehicle fault detection device provided by an embodiment of the application;
[0043] Figure 5 is a structural schematic diagram of the vehicle fault detection device provided by an embodiment of the application; DETAILED DESCRIPTION
[0044] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and
[0045] It will be understood that the term "includes," "including," "has," "having," "comprises," "comprising," "contains" or "containing," when used in this specification and in the following claims, specifies the presence of the stated features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0046] It will also be understood that the term "and / or," when used in this specification and in the following claims, can connote any conjunctive or disjunctive sense, in any combination, and can include any of the possible combinations of the items linked by the term.
[0047] As used in this specification and in the claims, the term "if" can be construed to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be construed to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]," depending on the context.
[0048] In addition, the terms "first," "second," "third," etc. are used herein only to describe different instances of an element, and do not imply relative importance of the elements.
[0049] The terms "one embodiment," "some embodiments," "an embodiment," "some embodiments," etc. as may be used herein, mean "one or more of the embodiments described herein," "one or more of the embodiments described herein with respect to one or more particular features, structures, or characteristics described herein," and / or "one or more specific embodiments described herein," but not necessarily all embodiments nor necessarily all particular features, structures, or characteristics described herein. Thus, when a particular feature, structure, or characteristic is described in one embodiment, this typically means that a combination of features, structures, or characteristics that includes the particular feature, structure, or characteristic is also considered one or more of the embodiments of the present application, unless otherwise specified.
[0050] It should be noted that in all embodiments of the present application, the vehicle fault refers to a fault generated by an electronic brake force distribution (EBD) system of the vehicle.
[0051] Please refer to Figure 1 , Figure 1 is an implementation flowchart of a vehicle fault detection method provided by an embodiment of the present application. In the embodiment of the present application, the execution subject of the vehicle fault detection method is a vehicle terminal.
[0052] As Figure 1 shown, the vehicle fault detection method provided by an embodiment of the present application can include S101-S102, which are described in detail as follows:
[0053] In S101, target vehicle information of a vehicle to be detected is acquired.
[0054] In actual application, in order to detect whether the vehicle has a fault in time and avoid danger, a user of the vehicle can trigger a fault detection request for the vehicle terminal.
[0055] In the embodiment of the present application, the vehicle terminal detecting the fault detection request sent by the user can be detecting a preset operation for the vehicle terminal. The preset operation can be set according to actual needs, which is not limited here. For example, the preset operation can be clicking a preset control in the vehicle. Based on this, when the vehicle terminal detects that the preset control in the vehicle is clicked, it means that the preset operation for the vehicle terminal is detected, that is, the fault detection request sent by the user is detected.
[0056] After detecting the above fault detection request, the vehicle terminal can acquire the target vehicle information of the vehicle to be detected in real time.
[0057] In some possible embodiments, in order to detect whether the vehicle to be detected has a fault in time, the vehicle terminal can continuously acquire the target vehicle information of the vehicle to be detected when the vehicle to be detected is running. The target vehicle information includes but is not limited to vehicle speed, lateral acceleration, longitudinal acceleration, brake pedal position, brake pedal position, left front wheel speed, right front wheel speed, left rear wheel speed, right rear wheel speed, etc.
[0058] When the vehicle fault is a fault generated by an electric brake force distribution (EBD) system of the vehicle, since the EBD system is a brake system for automatically adjusting the brake force of each wheel when the vehicle brakes to improve the stability of brake performance, that is, the EBD system can control the vehicle speed, the wheel speed of each wheel, and the brake pedal position, therefore, at this time, the target vehicle information of the vehicle to be detected can be: the vehicle speed, the brake pedal position, the left front wheel speed, the right front wheel speed, the left rear wheel speed, the right rear wheel speed, and the like.
[0059] In an implementation manner of the embodiment of the application, the vehicle terminal can obtain the target vehicle information in real time through the sensor in wireless communication connection with the vehicle terminal.
[0060] The sensor includes but is not limited to a speed sensor and a brake pedal sensor.
[0061] In S102, the target vehicle information is input to the trained fault detection model for processing to obtain the fault detection result of the vehicle to be detected; wherein the fault detection model is obtained by training a pre-constructed isolation forest model based on a sample data set; the sample data set includes a positive sample set and a negative sample set; the positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm.
[0062] In the embodiment of the application, after obtaining the target vehicle information, the vehicle terminal can input the target vehicle information to the trained fault detection model for processing to obtain the fault detection result of the vehicle to be detected.
[0063] The fault detection result includes but is not limited to a fault and no fault.
[0064] In actual application, isolation forest is an anomaly detection algorithm that can process large-scale multi-dimensional data. At the same time, isolation forest does not require a large number of abnormal samples, therefore, in order to improve the detection accuracy of the vehicle fault, the fault detection model can be obtained by training an isolation forest model based on a sample data set.
[0065] In an embodiment of the application, in order to improve the data quality of the sample data set and the goodness of fit of the fault detection model to improve the detection precision of the fault detection model, the vehicle terminal can train the isolation forest model through the following steps, which are described in detail as follows:
[0066] Data cleaning and feature engineering are performed on each sample vehicle information in the sample vehicle information set to obtain a standard sample information set;
[0067] inputting the standard sample information set into the isolation forest model for optimized training to obtain the fault detection model.
[0068] In actual application, data cleaning is a process of re-examining and checking data, aiming at deleting repeated information, correcting existing errors, and providing data consistency.
[0069] Feature engineering includes data preprocessing, feature extraction, feature construction, and feature selection, etc.
[0070] In this embodiment, the vehicle-mounted terminal performs data cleaning processing and feature engineering processing on each sample vehicle information in the sample vehicle information set, that is, completes operations such as abnormal data cleaning, feature integration, feature conversion, and data standardization on the sample vehicle information set, thereby obtaining a standard sample information set.
[0071] Based on this, the vehicle-mounted terminal can input the standard sample information set into the isolation forest model for optimized training to obtain the fault detection model.
[0072] It should be noted that, in order to improve the detection accuracy of the fault detection model and further improve the detection accuracy of vehicle faults, the above sample data set includes a positive sample set and a negative sample set, and the positive sample set and the negative sample set can be obtained by performing clustering processing on the sample vehicle information set based on a clustering algorithm. The clustering algorithm includes but is not limited to K-Means algorithm and FCM clustering algorithm, etc.
[0073] In another embodiment of the present application, the sample vehicle information set can be obtained by the following steps, which are described in detail as follows:
[0074] obtaining a historical vehicle set composed of all vehicles that have occurred faults in a historical time period;
[0075] selecting a sample vehicle from the historical vehicle set according to a preset strategy;
[0076] determining all vehicle information of the sample vehicle in the historical time period as the sample vehicle information set.
[0077] In this embodiment, since the amount of data from the time when the first fault of the vehicle occurs to now is too large, and the data that is too long ago does not have reference value, the vehicle-mounted terminal can obtain a historical vehicle set composed of all vehicles that have occurred faults in a historical time period. The historical time period can be set according to actual needs, which is not limited here.
[0078] In some possible embodiments, the preset strategy can be to select a sample vehicle according to vehicle fault occurrence frequency and vehicle factory date.
[0079] Based on this, the vehicle-mounted terminal can select a sample vehicle from the historical vehicle set according to the vehicle fault occurrence frequency and the vehicle factory date.
[0080] Then, the vehicle-mounted terminal can determine all vehicle information of the sample vehicle in the historical time period as a sample vehicle information set.
[0081] As can be seen from the above, the vehicle fault detection method provided by the embodiments of the present application comprises the following steps: obtaining target vehicle information of a vehicle to be detected; inputting the target vehicle information into a trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected; wherein the fault detection model is obtained by training a pre-constructed isolation forest model based on a sample data set; the sample data set comprises a positive sample set and a negative sample set; the positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm. Compared with the detection model used in the prior art, the fault detection model in the present application is obtained by training an isolation forest model, so that when the abnormal sample is missing or less, the detection accuracy of the fault detection model will not be affected, and the sample data set of the fault detection model is obtained by clustering the sample vehicle information set based on a clustering algorithm, thereby ensuring the accuracy of the positive sample set and the negative sample set, improving the detection accuracy of the fault detection model, and further improving the detection accuracy of the vehicle fault.
[0082] Please refer to Figure 2 , Figure 2 The vehicle fault detection method provided by another embodiment of the present application is described below. Figure 1 Compared with the corresponding embodiment, before S102, the fault detection model can also be obtained without S201-S205, which is described in detail as follows:
[0083] In S201, the sample vehicle information set is input into the isolation forest model for processing to obtain an abnormal score corresponding to each sample vehicle information in the sample vehicle information set.
[0084] In the embodiment, after the vehicle-mounted terminal inputs the sample vehicle information set into the isolation forest model, the sample vehicle information set can be processed according to the existing data processing process of the isolation forest algorithm, so as to obtain an abnormal score corresponding to each sample vehicle information in the sample vehicle information set.
[0085] In S202, each sample vehicle information is clustered based on the abnormal score corresponding to each sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set.
[0086] In this embodiment, the vehicle terminal can cluster each sample vehicle information according to the abnormal score corresponding to each sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set.
[0087] Specifically, the vehicle terminal can randomly select a plurality of initial clustering centers from the abnormal scores corresponding to each sample vehicle information. The initial clustering center is the abnormal score.
[0088] It should be noted that in actual application, one cluster center corresponds to one cluster, and one sample vehicle information can only be in one cluster.
[0089] After determining the plurality of initial clustering centers, the vehicle terminal needs to calculate the initial distance between the residual abnormal score of each residual sample vehicle information and the plurality of initial clustering centers. The initial distance refers to the Euclidean distance.
[0090] After calculating the initial distance between the residual abnormal score and the plurality of initial clustering centers, the vehicle terminal needs to determine the minimum initial distance in the initial distance, and cluster the residual sample vehicle information corresponding to the residual abnormal score into the cluster corresponding to the initial clustering center corresponding to the minimum initial distance.
[0091] In this embodiment, in order to improve the clustering accuracy and clustering effect, the terminal device needs to calculate the target clustering center of each cluster according to at least one abnormal score contained in each cluster after clustering the residual sample vehicle information corresponding to the plurality of residual abnormal scores into the corresponding cluster.
[0092] For example, the vehicle terminal can use the average value of at least one abnormal score contained in each cluster to recalculate the target clustering center of the cluster.
[0093] Based on this, the vehicle terminal can obtain a plurality of clusters corresponding to the sample vehicle information set.
[0094] In S203, the ratio between the first number and the total number of sample vehicle information in each cluster is determined; wherein the first number refers to the number of first sample vehicle information in each cluster whose abnormal score is less than the first threshold.
[0095] In this embodiment, for each cluster, the vehicle terminal can count the proportion of the first sample vehicle information in the cluster whose abnormal score is less than the first threshold, that is, determine the ratio between the first number and the total number of sample vehicle information in the cluster.
[0096] In one embodiment of the present application, the vehicle terminal can determine the ratio between the first number and the total number of sample vehicle information in each cluster by using the following formula: Figure 3The steps S301-S302 shown implement step S203, which is described as follows:
[0097] In S301, the inter-cluster sum of squares of the plurality of clusters is calculated.
[0098] In this embodiment, in order to evaluate the clustering effect of clustering processing on each sample vehicle information, so as to improve the clustering accuracy, the vehicle terminal can calculate the inter-cluster sum of squares of the plurality of clusters.
[0099] In actual application, the inter-cluster sum of squares is an index for evaluating the clustering result, which is used to measure the distance between different clusters. The greater the inter-cluster sum of squares, the farther the distance between different clusters, and the better the clustering effect.
[0100] Based on this, after the vehicle terminal calculates the inter-cluster sum of squares of the plurality of clusters, the vehicle terminal can compare the inter-cluster sum of squares with a second threshold. The second threshold can be determined according to actual needs, which is not limited here. For example, the second threshold can be 0.8.
[0101] In an embodiment of the present application, when the vehicle terminal detects that the inter-cluster sum of squares of the plurality of clusters is greater than or equal to the second threshold, the vehicle terminal can perform step S302.
[0102] In another embodiment of the present application, when the vehicle terminal detects that the inter-cluster sum of squares of the plurality of clusters is less than the second threshold, it indicates that the distance between the plurality of clusters is close, i.e., the clustering effect on the sample vehicle information set is poor. Therefore, the vehicle terminal can continue to cluster the sample vehicle information set until the inter-cluster sum of squares of the plurality of clusters of the latest sample vehicle information is greater than or equal to the second threshold.
[0103] In S302, if the inter-cluster sum of squares is greater than or equal to the second threshold, the ratio of the first number to the total number of sample vehicle information in each cluster is determined.
[0104] In this embodiment, when the vehicle terminal detects that the inter-cluster sum of squares of the plurality of clusters is greater than or equal to the second threshold, it indicates that the distance between the plurality of clusters, i.e., the clustering effect on the sample vehicle information set is good. Therefore, the vehicle terminal can determine the ratio of the first number to the total number of sample vehicle information in each cluster.
[0105] In S204, the plurality of clusters are divided according to the ratio, to obtain the positive sample set and the negative sample set.
[0106] In S205, the isolation forest model is optimized and trained according to the positive sample set and the negative sample set, to obtain the fault detection model.
[0107] In this embodiment, for each cluster, the vehicle terminal can divide the cluster according to the ratio corresponding to the cluster, thereby obtaining the positive sample set and the negative sample set.
[0108] Specifically, the vehicle terminal can compare the ratio corresponding to the target cluster with the third threshold value and the fourth threshold value, respectively. The third threshold value and the fourth threshold value can be set according to actual needs, which are not limited here, and the third threshold value is less than the fourth threshold value. For example, the third threshold value can be set to 0.08, and the fourth threshold value can be set to 0.9.
[0109] Based on this, when the vehicle terminal detects that the ratio corresponding to the target cluster is less than the third threshold value, it means that the first quantity is small, that is, the number of first sample vehicle information with an abnormal score less than the first threshold value in the target cluster is small. Therefore, the vehicle terminal can determine that the target cluster is normal, and based on this, the vehicle terminal can divide the target cluster into the positive sample set.
[0110] When the vehicle terminal detects that the ratio corresponding to the target cluster is greater than the fourth threshold value, it means that the first quantity is too large, that is, the number of first sample vehicle information with an abnormal score less than the first threshold value in the target cluster is too large. Therefore, the vehicle terminal can determine that the target cluster is abnormal, and based on this, the vehicle terminal can divide the target cluster into the negative sample set.
[0111] Then, the vehicle terminal can optimize and train the isolation forest model according to the positive sample set and the negative sample set to obtain the fault detection model.
[0112] As can be seen from the above, the vehicle fault detection method provided in this embodiment inputs the sample vehicle information set into the isolation forest model for processing to obtain an abnormal score corresponding to each sample vehicle information in the sample vehicle information set; performs clustering processing on each sample vehicle information according to the abnormal score corresponding to each sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set; determines a ratio between a first quantity and a total quantity of sample vehicle information in each cluster; wherein the first quantity refers to the number of first sample vehicle information with an abnormal score less than a first threshold value in each cluster; divides the plurality of clusters according to the ratio to obtain a positive sample set and a negative sample set; and optimizes and trains an isolation forest model according to the positive sample set and the negative sample set to obtain a fault detection model. The detection method provided in this embodiment improves the detection accuracy of the fault detection model, and further improves the detection accuracy of the vehicle fault.
[0113] In an embodiment of the present application, in order to further improve the detection accuracy of the vehicle fault, the vehicle terminal can perform S102 by the following steps, which are described as follows:
[0114] input the historical vehicle information into the fault detection model for processing to obtain a current detection result;
[0115] If the current detection result is consistent with the reference detection result corresponding to the historical vehicle information, the target vehicle information is input into the fault detection model for processing to obtain a fault detection result of the vehicle to be detected.
[0116] In this embodiment, the vehicle terminal can first input the historical vehicle information into the fault detection model for processing to obtain a current detection result corresponding to the historical vehicle information, and compare the current detection result with a reference detection result corresponding to the historical vehicle information to evaluate the detection effect of the fault detection model, before inputting the target vehicle information into the fault detection model for processing. The reference detection result corresponding to the historical vehicle information is used to describe the actual fault detection result of the historical vehicle information.
[0117] Based on this, when the vehicle terminal detects that the current detection result is consistent with the reference detection result corresponding to the historical vehicle information, it means that the detection effect of the fault detection model is good, and therefore the vehicle terminal can input the vehicle information into the fault detection model for processing to obtain a fault detection result of the vehicle to be detected.
[0118] When the vehicle terminal detects that the current detection result is not consistent with the reference detection result corresponding to the historical vehicle information, it means that the detection effect of the fault detection model is poor, and therefore the vehicle terminal can continue to optimize and train the fault detection model to improve the detection accuracy of the fault detection model.
[0119] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0120] A vehicle fault detection method is provided, Figure 4 A structure diagram of a vehicle fault detection device provided by an embodiment of the present application is shown, and only parts related to the embodiments of the present application are shown for ease of description. For details, refer to Figure 4 The vehicle fault detection device 400 includes a first acquisition unit 41 and a first processing unit 42. Wherein:
[0121] The first acquisition unit 41 is configured to acquire target vehicle information of a vehicle to be detected.
[0122] The first processing unit 42 is configured to input the target vehicle information into the trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected.
[0123] In an embodiment of the present application, the vehicle fault detection device 400 further comprises a second acquisition unit, a selection unit and a first determination unit. Wherein:
[0124] The second acquisition unit is configured to acquire a historical vehicle set composed of all vehicles that have occurred faults in a historical time period.
[0125] The selection unit is configured to select a sample vehicle from the historical vehicle set according to a preset strategy.
[0126] The first determination unit is configured to determine all vehicle information of the sample vehicle in the historical time period as the sample vehicle information set.
[0127] In an embodiment of the present application, the vehicle fault detection device 400 further comprises a second processing unit and a first training unit. Wherein:
[0128] The second processing unit is configured to perform data cleaning processing and feature engineering processing on each sample vehicle information in the sample vehicle information set to obtain a standard sample information set.
[0129] The first training unit is configured to input the standard sample information set into the isolation forest model for optimization training to obtain the fault detection model.
[0130] In an embodiment of the present application, the vehicle fault detection device 400 further comprises an input unit, a clustering unit, a second determination unit, a first division unit and a second training unit. Wherein:
[0131] The input unit is configured to input the sample vehicle information set into the isolation forest model for processing to obtain an abnormal score corresponding to each sample vehicle information in the sample vehicle information set.
[0132] The clustering unit is configured to perform clustering processing on each sample vehicle information according to the abnormal score corresponding to each sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set.
[0133] The second determining unit is configured to determine a ratio between a first quantity and a total quantity of sample vehicle information in each cluster, wherein the first quantity refers to a quantity of first sample vehicle information in each cluster, and the abnormal score of the first sample vehicle information is less than a first threshold.
[0134] The first dividing unit is configured to divide the plurality of clusters according to the ratio to obtain the positive sample set and the negative sample set.
[0135] The second training unit is configured to optimize training of the isolation forest model according to the positive sample set and the negative sample set to obtain the fault detection model.
[0136] In an embodiment of the present application, the second determining unit specifically comprises a calculating unit and a third determining unit, wherein:
[0137] The calculating unit is configured to calculate an inter-cluster sum of squares of the plurality of clusters.
[0138] The third determining unit is configured to determine the ratio of each cluster if the inter-cluster sum of squares is greater than or equal to a second threshold.
[0139] In an embodiment of the present application, the first dividing unit specifically comprises a second dividing unit and a third dividing unit, wherein:
[0140] The second dividing unit is configured to divide a target cluster to the positive sample set if a ratio corresponding to the target cluster is less than a third threshold, wherein the target cluster refers to any one of the plurality of clusters.
[0141] The third dividing unit is configured to divide the target cluster to the negative sample set if the ratio corresponding to the target cluster is greater than a fourth threshold, wherein the fourth threshold is greater than the third threshold.
[0142] In an embodiment of the present application, the first processing unit 42 specifically comprises a third processing unit and a fourth processing unit, wherein:
[0143] The third processing unit is configured to input historical vehicle information to the fault detection model for processing to obtain a current detection result.
[0144] The fourth processing unit is configured to input the target vehicle information to the fault detection model for processing to obtain a fault detection result of the vehicle to be detected if the current detection result is consistent with a reference detection result corresponding to the historical vehicle information.
[0145] It should be noted that the information interaction between the above-described apparatuses / units, the execution process, and the like, are based on the same concept as the method embodiments of the present application, and specific functions and technical effects brought by the same can be referred to the method embodiments part, which will not be described herein again.
[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0147] Figure 5 This is a schematic diagram of the structure of a vehicle-mounted terminal provided in one embodiment of this application. Figure 5 As shown, the vehicle-mounted terminal 5 in this embodiment includes: at least one processor 50 ( Figure 5 (Only one is shown) a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 executes the computer program 52 to implement the steps in any of the above-described vehicle fault detection method embodiments.
[0148] The vehicle-mounted terminal may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of vehicle terminal 5 and does not constitute a limitation on vehicle terminal 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0149] The processor 50 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0150] The memory 51 can be an internal storage unit of the vehicle terminal 5, such as a memory of the vehicle terminal 5, in some embodiments. The memory 51 can also be an external storage device of the vehicle terminal 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, and the like, equipped on the vehicle terminal 5, in other embodiments. Further, the memory 51 can include both an internal storage unit and an external storage device of the vehicle terminal 5. The memory 51 is used to store an operating system, an application program, a BootLoader, data, and other programs, such as program codes of the computer program, and the like. The memory 51 can also be used to temporarily store data that has been output or is to be output.
[0151] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned various method embodiments.
[0152] The embodiments of the present application provide a computer program product. When the computer program product is run on a vehicle terminal, the vehicle terminal is caused to implement the steps in the above-mentioned various method embodiments.
[0153] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such an understanding, the embodiments of the present application can implement all or part of the processes in the above-mentioned method embodiments by means of a computer program instructing relevant hardware. The computer program can be stored in a computer readable storage medium and can implement the steps in the above-mentioned various method embodiments when executed by a processor. The computer program includes computer program codes, which can be in the form of source codes, object codes, executable files, or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program codes to the vehicle terminal, a recording medium, a computer memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. For example, a U disk, a mobile hard disk, a magnetic disk or an optical disk, and the like. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunications signal.
[0154] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the relevant description of other embodiments.
[0155] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of detecting a vehicle malfunction, characterized by, The method comprises the following steps: obtaining target vehicle information of a vehicle to be detected; inputting the target vehicle information into a trained fault detection model for processing to obtain a fault detection result of the vehicle to be detected; wherein the fault detection model is obtained by training a pre-constructed isolation forest model based on a sample data set; the sample data set comprises a positive sample set and a negative sample set; the positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm; the fault detection model is trained in the following manner: inputting the sample vehicle information set into the isolation forest model for processing to obtain an anomaly score corresponding to each sample vehicle information in the sample vehicle information set; performing clustering processing on each sample vehicle information according to the anomaly score corresponding to the sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set; determining a ratio between a first quantity and a total quantity of sample vehicle information in each cluster; wherein the first quantity refers to a quantity of first sample vehicle information in the each cluster, the anomaly score of which is less than a first threshold value; dividing the plurality of clusters according to the ratio to obtain the positive sample set and the negative sample set; optimizing and training the isolation forest model according to the positive sample set and the negative sample set to obtain the fault detection model; the determination of the ratio between the first quantity and the total quantity of sample vehicle information in each cluster comprises: calculating an inter-cluster sum of squares of the plurality of clusters; if the inter-cluster sum of squares is greater than or equal to a second threshold value, determining the ratio of the each cluster.
2. The method of detecting a failure of a vehicle according to claim 1, characterized by, the sample vehicle information set is obtained in the following manner: obtaining a historical vehicle set composed of all vehicles that have occurred faults in a historical time period; selecting sample vehicles from the historical vehicle set according to a preset strategy; determining all vehicle information of the sample vehicles in the historical time period as the sample vehicle information set.
3. The method of claim 1, wherein the fault detection model is trained in the following manner: performing data cleaning processing and feature engineering processing on each sample vehicle information in the sample vehicle information set to obtain a standard sample information set; inputting the standard sample information set into the isolation forest model for optimization training to obtain the fault detection model.
4. The method of claim 1, wherein the division of the plurality of clusters according to the ratio to obtain the positive sample set and the negative sample set comprises: if a target cluster corresponds to a ratio less than a third threshold value, dividing the target cluster into the positive sample set; the target cluster is used to represent any one of the plurality of clusters; if the target cluster corresponds to a ratio greater than a fourth threshold value, dividing the target cluster into the negative sample set; the fourth threshold value is greater than the third threshold value.
5. The method of detecting a failure of a vehicle according to any one of claims 1 to 4, characterized in that, the inputting of the target vehicle information into the trained fault detection model for processing to obtain the fault detection result of the vehicle to be detected comprises: inputting historical vehicle information into the fault detection model for processing to obtain a current detection result; If the current detection result is consistent with the reference detection result corresponding to the historical vehicle information, the target vehicle information is input to the fault detection model for processing to obtain a fault detection result of the to-be-detected vehicle.
6. A device for detecting a failure of a vehicle, characterized by The method comprises the following steps: A first obtaining unit is configured to obtain target vehicle information of a to-be-detected vehicle. A first processing unit is configured to input the target vehicle information to a trained fault detection model for processing to obtain a fault detection result of the to-be-detected vehicle. The fault detection model is trained based on a sample data set on a pre-constructed isolation forest model. The sample data set comprises a positive sample set and a negative sample set. The positive sample set and the negative sample set are obtained by clustering a sample vehicle information set based on a clustering algorithm. The vehicle fault detection device further comprises: An input unit is configured to input the sample vehicle information set to the isolation forest model for processing to obtain an anomaly score corresponding to each sample vehicle information in the sample vehicle information set. A clustering unit is configured to cluster each sample vehicle information based on the anomaly score corresponding to the sample vehicle information to obtain a plurality of clusters corresponding to the sample vehicle information set. A second determining unit is configured to determine a ratio between a first quantity and a total quantity of sample vehicle information in each cluster; wherein the first quantity refers to a quantity of first sample vehicle information in the each cluster whose anomaly score is less than a first threshold value. A first dividing unit is configured to divide the plurality of clusters based on the ratio to obtain the positive sample set and the negative sample set. A second training unit is configured to optimize and train the isolation forest model based on the positive sample set and the negative sample set to obtain the fault detection model.
7. An in-vehicle terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The second determining unit specifically comprises:
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: A calculating unit is configured to calculate an inter-cluster sum of squares of the plurality of clusters. A third determining unit is configured to determine the ratio of the each cluster if the inter-cluster sum of squares is greater than or equal to a second threshold value. The processor executes the computer program to implement the vehicle fault detection method of any one of claims 1 to 5. The computer program is executed by the processor to implement the vehicle fault detection method of any one of claims 1 to 5.
Citation Information
Patent Citations
Automobile CAN bus network data exception detection method based on isolated forest
CN110149258A
Fault prediction method and system based on vehicle historical data, and storage medium
CN115563503A