Fault prediction method, device, equipment and storage medium
Patent Information
- Application Number
- CN202610786231.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-08-18
AI Technical Summary
然而这种方法依赖于专业人员对车辆机械和电气系统的理解和维修经验,诊断准确性不稳定,平均准确率较低
[0020]本申请提供的技术方案带来的有益效果至少包括:
Smart Images

Figure CN122594731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle engineering, and in particular to a fault prediction method, apparatus, device, and storage medium. Background Technology
[0002] Because hybrid electric vehicles integrate an internal combustion engine and an electric motor, their energy management, multimodal control, and complex sensor networks place higher demands on fault diagnosis technology.
[0003] In related technologies, vehicle fault diagnosis involves professionals using diagnostic equipment to read vehicle fault codes (DTCs) and perform on-site inspections and assessments based on their personal experience. However, this method relies on the professional's understanding of the vehicle's mechanical and electrical systems and their repair experience, resulting in inconsistent diagnostic accuracy and a low average accuracy rate. Summary of the Invention
[0004] This application provides a fault prediction method, apparatus, device, and storage medium, which can improve the accuracy of fault diagnosis. The technical solution is as follows: According to one aspect of this application, a fault prediction method is provided, the method comprising: The fault prediction model is invoked, and the target fault is output based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1. Using an association rule mining algorithm, the vehicle data and the target fault are analyzed to determine a combination of target dimensions for explaining the cause of the fault; the combination of target dimensions includes at least one of the k dimensions. Output fault diagnosis results, which include the target fault and the target dimension combination.
[0005] Optionally, the vehicle data includes n sets of data, each of the n sets of data including data from the k dimensions; n is an integer greater than 1. The process of using association rule mining algorithms to analyze the vehicle data and the target fault to determine the target dimension combination used to explain the cause of the fault includes: From the n sets of data, determine m sets of data that are identified as the target fault by the fault prediction model, where m is a positive integer not greater than n; Based on the k dimensions and their values, candidate dimension combinations are determined; For each of the alternative dimension combinations, the correlation degree between the alternative dimension combination and the target fault is calculated based on the occurrence of the alternative dimension combination in the n sets of data and the occurrence of the alternative dimension combination in the m sets of data. Based on the correlation degree, the target dimension combination is determined from the candidate dimension combinations.
[0006] Optionally, the correlation degree includes support and confidence. The calculation of the correlation between the candidate dimension combination and the target fault includes: The quotient of the number of occurrences of the candidate dimension combination in the m sets of data and n is determined as the support of the candidate dimension combination. The confidence level of the candidate dimension combination is determined by the quotient of the number of occurrences of the candidate dimension combination in the m sets of data and the number of occurrences of the candidate dimension combination in the n sets of data.
[0007] Optionally, determining the target dimension combination from the candidate dimension combinations based on the correlation degree includes: Obtain the preset minimum support threshold and minimum confidence threshold; The candidate dimension combinations that have a support greater than the minimum support threshold and a confidence level greater than the minimum confidence threshold are determined as the target dimension combinations.
[0008] Optionally, determining the candidate dimension combination whose support is greater than the minimum support threshold and whose confidence is greater than the minimum confidence threshold as the target dimension combination includes: The candidate dimension combinations whose support is greater than the minimum support threshold and whose confidence is greater than the minimum confidence threshold are determined as qualified dimension combinations; the number of qualified dimension combinations is greater than 1. Calculate the weighted score corresponding to each qualified dimension combination, wherein the weighted score is the weighted sum of the confidence and support of the qualified dimension combination; the weights corresponding to the confidence and support are preset weights. The qualified dimension combination with the highest weighted score is determined as the target dimension combination.
[0009] Optionally, the data in the k dimensions includes at least one vehicle operation data and at least one derived data; the derived data is calculated based on the vehicle operation data. The vehicle data includes n sets of data, each set of data including data from the k dimensions; the n sets of data have a time series; the derived data includes at least one of the following: rolling average data obtained by calculating the average using window rolling, and fluctuation data obtained by calculating the first difference.
[0010] Optionally, the vehicle operating data includes at least one of the following: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load. The derived data includes at least one of the following: rolling average speed data calculated based on the speed; speed fluctuation data calculated based on the speed.
[0011] Optionally, the fault prediction model includes a first model for handling nonlinear relationships between data and a second model for capturing temporal dependencies between data. The fault prediction model is invoked, and the target fault is output based on the vehicle data of the target vehicle, including: Invoke the first model and output the first fault based on the vehicle data of the target vehicle; The second model is invoked, and a second fault is output based on the vehicle data of the target vehicle; If the first fault and the second fault are the same, the first fault or the second fault is determined as the target fault.
[0012] Optionally, the first model includes a gradient boosting tree model, wherein the gradient boosting tree includes 600 decision trees; The second model includes a Long Short-Term Memory (LSTM) network model, which comprises a three-layer LSTM network.
[0013] Optionally, the method further includes: If the first fault and the second fault are different, an association rule mining algorithm is used to analyze the vehicle data and the first fault to determine a first dimension combination for explaining the cause of the fault; the first dimension combination includes a dimensions from the k dimensions; a is a positive integer not greater than k; Set the data of ka dimensions other than the a-th dimension in the vehicle data to mask values to obtain the first focus data corresponding to the vehicle data; The first model is invoked, and a third fault is output based on the first focused data. If the third fault is the same as the first fault, then the first fault or the third fault is identified as the target fault.
[0014] Optionally, the method further includes: If the first fault and the third fault are not the same, an association rule mining algorithm is used to analyze the vehicle data and the second fault to determine a second dimension combination to explain the cause of the fault; the second dimension combination includes b dimensions from the k dimensions; b is a positive integer not greater than k; Set the data of kb dimensions other than the b dimensions in the vehicle data to mask values to obtain the second focus data corresponding to the vehicle data; The second model is invoked, and a fourth fault is output based on the second focused data. If the fourth fault is the same as the second fault, the second fault or the fourth fault is identified as the target fault. If the fourth fault is different from the second fault, a fuzzy diagnostic result is output, which includes the first fault and the second fault.
[0015] Optionally, the fault prediction model is also used to output the contribution of the data in each of the k dimensions to the prediction result, as well as the probability value corresponding to the target fault; The diagnostic results also include: the contribution ranking of the data in the k dimensions; and the probability value corresponding to the target fault.
[0016] According to another aspect of this application, a fault prediction device is provided, the device comprising: The prediction module is used to call the fault prediction model and output the target fault based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1. An analysis module is used to analyze the vehicle data and the target fault using an association rule mining algorithm to determine a combination of target dimensions for explaining the cause of the fault; the combination of target dimensions includes at least one of the k dimensions. The output module is used to output fault diagnosis results, which include the target fault and the target dimension combination.
[0017] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the fault prediction method as described above.
[0018] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the fault prediction method as described above.
[0019] According to another aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the fault prediction method provided in various alternative implementations of the above aspects.
[0020] The beneficial effects of the technical solution provided in this application include at least the following: By calling a fault prediction model to output the target fault based on the vehicle data, and using an association rule mining algorithm to mine the correlation between data in each dimension of the vehicle data and the occurrence of the target fault, the system identifies the target dimension combination that can explain the cause of the fault. This overcomes the shortcomings of related technologies, which rely on human experience for diagnosis, are inefficient, and cannot provide diagnostic evidence. It not only achieves rapid and accurate fault identification but also provides interpretable evidence for the diagnostic results, enabling users to intuitively understand the cause or symptoms of the fault, improving the efficiency of fault location and facilitating maintenance decisions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application; Figure 2 This is a flowchart of a fault prediction method provided in an exemplary embodiment of this application; Figure 3 This is a flowchart of a fault prediction method provided in an exemplary embodiment of this application; Figure 4 This is a schematic diagram of a fault prediction method provided in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of a fault prediction method provided in an exemplary embodiment of this application; Figure 6 This is a schematic diagram of the structure of a fault prediction device provided in an exemplary embodiment of this application; Figure 7 This is a schematic diagram of the structure of an in-vehicle terminal provided in an exemplary embodiment of this application.
[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation
[0024] To make the technical solution and advantages of this application clearer, the embodiments of this application will be described in further detail below.
[0025] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0026] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0027] Figure 1 A block diagram of a computer device provided in an exemplary embodiment of this application is shown. The computer device may be an in-vehicle terminal 110 or a server 140.
[0028] The vehicle-mounted terminal 110 has a fault prediction program installed and running. The fault prediction program can run to implement the fault prediction method provided in the embodiments of this application. Alternatively, the fault prediction program in the vehicle-mounted terminal 110 can report vehicle data to a server, enabling the server to implement the fault prediction method provided in the embodiments of this application. Alternatively, the fault prediction program in the vehicle-mounted terminal 110 can transmit vehicle data to a mobile terminal, enabling the mobile terminal to implement the fault prediction method provided in the embodiments of this application; or, the mobile terminal can report vehicle data to a server, enabling the server to implement the fault prediction method provided in the embodiments of this application.
[0029] The vehicle-mounted terminal 110 includes a first memory and a first processor. The first memory stores a fault prediction program; the fault prediction program is invoked and executed by the first processor to implement the fault prediction method provided in this application. The first memory may include, but is not limited to, the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM).
[0030] The first processor can consist of one or more integrated circuit chips. Optionally, the first processor can be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor can implement the fault prediction method provided in this application by running programs or code.
[0031] The vehicle terminal 110 can be connected to the server 140 via a wireless network or a wired network.
[0032] Server 140 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 140 has a fault prediction program installed and running, which can be executed to implement the fault prediction method provided in the embodiments of this application.
[0033] Optionally, server 140 includes a second memory and a second processor. The second memory stores a fault prediction program; the fault prediction program is invoked by the second processor to implement the fault prediction method provided in this application. Optionally, the second memory may include, but is not limited to, the following: RAM, ROM, PROM, EPROM, EEPROM. Optionally, the second processor may be a general-purpose processor, such as a CPU or NP.
[0034] Those skilled in the art will understand that the number of the aforementioned vehicle-mounted terminals can be more or less. For example, there may be only one vehicle-mounted terminal, or there may be dozens or hundreds, or even more, vehicle-mounted terminals. This application does not limit the number or type of vehicle-mounted terminals.
[0035] Figure 2This is a flowchart illustrating a fault prediction method provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The method includes the following steps: (The vehicle-mounted terminal or server is shown.)
[0036] Step 210: Call the fault prediction model and output the target fault based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1.
[0037] For example, the method can be executed by at least one of an in-vehicle terminal or a server. Vehicle data is collected by the in-vehicle terminal through an in-vehicle diagnostic system (such as OBD-II (the Second On-Board Diagnostics)). The in-vehicle terminal can directly run the method provided in the embodiments of this application to complete fault prediction and output diagnostic results; or, the in-vehicle terminal can upload the collected vehicle data to the server, and the server can call the fault prediction model and association rule mining algorithm deployed on it to execute the method provided in the embodiments of this application, and return the diagnostic results to the in-vehicle terminal or mobile terminal for visualization. Optionally, the in-vehicle terminal can also transmit vehicle data to the user's mobile terminal (such as a mobile phone), and the mobile terminal can execute the method provided in the embodiments of this application, or further report the vehicle data to the server to call more computing power to complete the analysis.
[0038] Fault prediction models are intelligent diagnostic models used to identify potential vehicle faults. Based on multi-dimensional vehicle data (including k-dimensional data such as engine coolant temperature, engine speed, vehicle speed, and derived data such as engine speed fluctuations), they output the probability that the target vehicle has at least one preset fault type, thus determining the target fault based on the probability. Fault prediction models can include various types, such as gradient boosting tree models (e.g., XGBoost models) for handling nonlinear relationships between features, and Long Short-Term Memory (LSTM) models for capturing temporal dependencies. Furthermore, other neural network structures (such as Recurrent Neural Networks (RNNs) and Gated Recurrent Units (GRUs)) or ensemble learning models (such as Random Forests and Gradient Boosting Machines) can also be used to implement fault prediction functions.
[0039] For example, the k-dimensional data includes at least one vehicle operation data (or raw data) and at least one derived data; the derived data is calculated based on the vehicle operation data.
[0040] Vehicle operating data includes at least one of the following: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load.
[0041] Engine coolant temperature is a parameter that reflects the thermal state of the engine. It can be measured by the temperature sensor of the engine cooling system and is usually used to diagnose engine overheating, cooling system malfunctions (such as thermostat failure, water pump failure, radiator blockage), and abnormal combustion or knocking caused by abnormal temperature.
[0042] The intake manifold absolute pressure reflects the engine's intake air volume and load status. It is commonly used to diagnose intake system leaks, turbocharger or supercharger malfunctions, throttle body contamination, and incomplete combustion problems caused by air-fuel ratio imbalance.
[0043] Actual ignition advance angle is the ignition timing angle data set by the engine control unit (ECU) based on the current operating conditions. It is usually used to diagnose ignition system faults (such as spark plug aging, ignition coil performance degradation), knocking caused by carbon deposits in the combustion chamber, and power reduction and excessive emissions caused by improper ignition timing.
[0044] Misfire torque is instantaneous torque fluctuation data caused by misfire in one or more cylinders of an engine. It is usually used to diagnose engine misfire faults (such as fuel injector blockage, valve sealing failure, spark plug misfire) and can determine the quality of combustion.
[0045] Actual roughness is calculated from the crankshaft angular velocity fluctuation and is usually used to diagnose combustion instability caused by uneven fuel injection, abnormal valve clearance, or asymmetry in the intake and exhaust systems.
[0046] The downstream oxygen sensor voltage is the voltage signal output by the oxygen sensor installed after the three-way catalytic converter. It is used to monitor the oxygen storage capacity and conversion efficiency of the catalytic converter. It is usually used to diagnose the decline in efficiency of the three-way catalytic converter, aging or poisoning of the oxygen sensor, and emission system failures caused by long-term deviations in the air-fuel ratio.
[0047] Engine speed is the number of revolutions per minute (RPM) of the engine crankshaft. It is commonly used to diagnose unstable idling, abnormal engine mechanical resistance (such as belt slippage or abnormal generator load), and transmission matching problems of CVT (Continuously Variable Transmission) or gearbox.
[0048] Vehicle speed is the speed at which a vehicle travels, measured by wheel speed sensors or transmission output shaft sensors. It is typically used to diagnose transmission slippage, vehicle speed sensor malfunctions, and, in conjunction with engine speed, to analyze abnormal transmission shifting logic (such as shift shock or poor lock-up).
[0049] Engine load is calculated by the ECU based on throttle opening, intake air volume, and engine speed. It is typically used to diagnose catalytic converter inefficiency, clutch overheating, and non-obvious faults caused by abnormal powertrain matching.
[0050] Optionally, the vehicle data includes n sets of data, each set of data includes k dimensions of data; the n sets of data have a time series.
[0051] For example, during the first time period, the target vehicle collects data every 0.1 seconds through the on-board OBD-II diagnostic system, recording a total of 5 sets of vehicle data with temporal relationship (i.e., n=5). Each set of data contains 9 dimensions of raw features (i.e., k=9), specifically including: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load. For example, at time T1 (second 0.0), the vehicle data is: engine coolant temperature 85.2°C, intake manifold absolute pressure 32.1 kPa, actual ignition advance angle 10.5°, misfire torque 0.0 Nm, actual surface roughness 0.12, downstream oxygen sensor voltage 0.45 V, engine speed 1200 rpm, vehicle speed 30 km / h, and engine load 25%. Then at time T2 (second 0.1), the data changes to: engine coolant temperature 85.3°C, intake manifold absolute pressure 32.3 kPa, actual ignition advance angle 10.4°, misfire torque 0.1 Nm, actual surface roughness 0.15, downstream oxygen sensor voltage 0.44 V, engine speed 1215 rpm, vehicle speed 31 km / h, and engine load 26%. This continues until time T5. The five sets of data are arranged in chronological order to form the vehicle data used for fault prediction.
[0052] Derivative data includes at least one of the following: rolling average data obtained by calculating the average using window rolling, and fluctuation data obtained by calculating using first-order differencing. Rolling average data and fluctuation data can indicate long-term trends and short-term anomalies in vehicle operating status.
[0053] Rolling average data can smooth out instantaneous noise and random fluctuations in the original data. By calculating the average value of multiple consecutive time points, it reflects the steady-state trend and overall direction of change of the data over time, which helps to identify progressive failure symptoms caused by long-term wear, temperature accumulation, etc.
[0054] Fluctuation data can capture the instantaneous changes in raw data between adjacent moments. By calculating the difference between adjacent time points, it can reflect the short-term instability and sudden events of the engine (such as single misfire or uneven fuel injection).
[0055] Optionally, the derived data includes at least one of the following: rolling average speed data calculated based on engine speed; and speed fluctuation data calculated based on engine speed. Rolling average speed data smooths instantaneous fluctuations in engine speed and is used to reflect the steady-state trend of engine speed changes. Speed fluctuation data reflects the degree of instantaneous jumps in engine speed between adjacent moments and is used to detect instability in engine operation or potential misfires and other abnormal events.
[0056] For example, setting the window size to 5, the average speed is calculated based on the current speed and the speed values of the previous four times. The current speed at time T5 is 1200 rpm, and the speeds at the previous four times T1 to T4 are 1195 rpm, 1205 rpm, 1198 rpm, and 1202 rpm, respectively. Therefore, the rolling average speed at time T5 is (1195 + 1205 + 1198 + 1202 + 1200) / 5 = 1200 rpm. This value smooths out the instantaneous fluctuations in speed and is used to reflect the steady-state trend of engine speed.
[0057] For example, the first-order difference can be used to calculate the speed fluctuation data. The speed at the current time T5 is 1200 rpm, and the speed at the previous time T4 was 1198 rpm. Therefore, the speed fluctuation value at time T5 is 1200-1198=2 rpm.
[0058] A target fault refers to the type of fault that a fault prediction model automatically identifies, through classification analysis, based on vehicle data of the target vehicle, as currently existing or about to occur. Optionally, the fault prediction model is a classification model that can calculate the probability value of each fault type among preset fault types based on the input vehicle data, and determine the final target fault based on the probability value. For example, the target fault can be the preset fault type with the highest probability value (e.g., if the model outputs an engine misfire probability of 98.88%, and other fault probabilities are all below 1%, then the target fault is determined to be engine misfire); it can also be the preset fault type with the highest probability value that is greater than a preset threshold (e.g., if the threshold is set to 50%, and the model outputs an engine misfire probability of 98.88% and a catalytic converter efficiency reduction probability of 51%, then only the engine misfire with the highest probability greater than 50% is identified as the target fault); or it can be at least one preset fault type with a probability value greater than a preset threshold (e.g., if the threshold is set to 30%, and the model simultaneously outputs an engine misfire probability of 98.88% and a catalytic converter efficiency reduction probability of 35%, then both engine misfire and catalytic converter efficiency reduction are identified as target faults, achieving multi-fault type output).
[0059] Optionally, if the probability values corresponding to each preset fault type output by the fault prediction model are all less than the preset threshold, then the diagnostic result that the target vehicle has no fault is output.
[0060] For example, the target fault may include at least one of the following: engine misfire, catalytic converter efficiency degradation, clutch overheating, intake system leakage, and oxygen sensor aging. These are merely examples of target faults; those skilled in the art can train fault prediction models to identify other types of faults.
[0061] Step 220: Use an association rule mining algorithm to analyze vehicle data and target faults to determine the target dimension combination used to explain the cause of the fault; the target dimension combination includes at least one of the k dimensions.
[0062] Association rule mining is an unsupervised machine learning algorithm used to discover frequent itemsets and generate valuable association rules from large-scale data. It can uncover potential relationships between different items in a dataset. By calculating the support and confidence of various dimension combinations, association rule mining can select high-frequency dimension combinations from all n sets of vehicle data that meet preset minimum support and minimum confidence thresholds. These high-frequency combinations are then used as target dimension combinations to explain the causes of faults, providing interpretable causal evidence for fault diagnosis and enabling users to intuitively understand the reasoning behind the fault occurrence.
[0063] The target dimension combination is a set of dimensions selected from the k dimensions included in the vehicle data that have a strong correlation with the target fault. The target dimension combination includes data from at least one dimension. The data in the target dimension combination has a strong correlation with the target fault; it may be a cause of the target fault or a symptom of the target fault.
[0064] It should be noted that the target dimension combination includes at least one dimension (i.e., at least one dimension name among k data dimensions) and its specific feature values on that dimension (i.e., the actual numerical value or state label of that dimension). For example, when the target fault is "engine misfire", the association rule mining algorithm analyzes and finds the target dimension combination to be "abnormal actual roughness" and "large speed fluctuation", where "actual roughness" and "speed fluctuation" are dimensions (dimensional names), and "abnormal" and "large" are the feature values (state descriptions) on that dimension.
[0065] For example, the fault prediction model outputs the target fault as engine misfire. An association rule mining algorithm is used to perform association analysis on five sets of time-series vehicle data containing nine dimensions and the target fault of "engine misfire." The analysis reveals that when both "abnormal actual roughness" and "large speed fluctuation" occur simultaneously in all data records, there is a 94.34% probability of an "engine misfire" fault. Therefore, "abnormal actual roughness" and "large speed fluctuation" are identified as the target dimension combination for explaining the cause of the fault, illustrating to the user that the engine misfire fault is caused by the combined effect of abnormal actual roughness and large speed fluctuation.
[0066] Step 230: Output the fault diagnosis results, which include the target fault and the combination of target dimensions.
[0067] After identifying the target fault and its corresponding target dimension combination, this can be output as the fault diagnosis result. Optionally, the fault diagnosis result can be visualized on an in-vehicle terminal or mobile terminal.
[0068] Optionally, the fault prediction model also outputs the contribution of each of the k dimensions to the prediction result, as well as the probability value corresponding to the target fault. The diagnostic results also include: the ranking of the contributions of the k dimensions; and the probability value corresponding to the target fault.
[0069] For example, when the fault prediction model outputs an "engine misfire" fault based on the vehicle data of the target vehicle, its fault probability is 98.88%. At the same time, the model also outputs the contribution ranking of each dimension of data: the contribution of actual roughness is the highest, at 68.64% (the first important feature); the contribution of speed fluctuation is the second highest, at 17.70% (the second important feature); the contribution of the remaining 7 data (such as engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, downstream oxygen sensor voltage, speed, vehicle speed, and engine load) is approximately 13.66% in total.
[0070] In summary, the method provided in this application, by calling a fault prediction model to output the target fault based on the vehicle data of the target vehicle, and using an association rule mining algorithm to mine the correlation between the data of each dimension in the vehicle data and the occurrence of the target fault, determines the target dimension combination that can explain the cause of the fault. This overcomes the shortcomings of related technologies, which rely on human experience for diagnosis, are inefficient, and cannot provide diagnostic evidence. It not only achieves rapid and accurate fault identification but also provides interpretable evidence for the diagnostic results, enabling users to intuitively understand the cause of the fault or the symptoms of the fault, improving the efficiency of fault location and facilitating maintenance decisions.
[0071] The method provided in this application includes not only original vehicle operation data, but also derived data (such as window rolling average and first-order difference fluctuation data) calculated based on the original data. The derived data can more accurately capture the temporal changes and trend characteristics related to faults, making up for the shortcomings of single original features in reflecting dynamic fault modes and improving the fault prediction model's ability to identify non-obvious faults.
[0072] The method provided in this application uses vehicle operating data that includes at least nine key features: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load. Rolling average and fluctuation data calculated based on engine speed are also included as derived features. Practice shows that actual roughness and engine speed fluctuations account for over 85% of the total importance and are the core basis for diagnosing engine misfires. This dataset provides the fault prediction model with comprehensive data dimensions required for diagnosis, ensuring high accuracy and low false alarm rate in fault identification.
[0073] The method provided in this application's embodiments not only outputs the target fault, but also the contribution ranking of each dimension to the prediction result and the probability value corresponding to the target fault. The contribution ranking intuitively shows which data has the greatest impact on the diagnostic results, providing a clear priority for users to understand the cause of the fault; the probability value quantifies the credibility of the fault. This enables the system to provide more comprehensive and reliable diagnostic feedback, enhancing the readability and practical value of the diagnostic results.
[0074] In one alternative embodiment, the fault prediction model may include two types of models; and / or, provide a method for determining a combination of target dimensions.
[0075] Figure 3 This is a flowchart illustrating a fault prediction method provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The vehicle-mounted terminal or server shown. Based on... Figure 2 In the illustrated embodiment, step 220 may include steps 221 to 224.
[0076] Step 210: Call the fault prediction model and output the target fault based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1.
[0077] For example, vehicle data includes n sets of data, and each set of data includes data in k dimensions.
[0078] For example, the fault prediction model includes a first model for handling nonlinear relationships between data and a second model for capturing temporal dependencies between data. Optionally, the first model includes a gradient boosting tree model comprising 600 decision trees. The second model includes a Long Short-Term Memory (LSTM) network model comprising a three-layer LSTM network.
[0079] Gradient boosting tree models train multiple decision trees sequentially. Each new tree contributes to compensate for the shortcomings of the preceding models, and the contributions of all trees are summed to obtain the prediction result. For example, in the first model, each tree makes a judgment based on the input vehicle data, outputting a preliminary classification result. The prediction results of all decision trees are weighted and summed using an ensemble learning algorithm (XGBoost). The weighted sum is converted into a probability value using a function such as Sigmoid or Softmax, and the target fault is determined based on the probability value. For example, the model ultimately outputs a 98.88% probability of "engine misfire" and a 1.12% probability of "normal" state, and thus identifies "engine misfire" as the target fault.
[0080] During the training of the first model, it first calculates an initial prediction value for all samples. This initial prediction value can be the majority class of the true labels of all samples in the training set, serving as the baseline for the entire iterative process. Then, in the first iteration, the model calculates the residual between the initial prediction and the true value. Next, it constructs the first decision tree, whose fitting target is this residual. The residual is modeled based on the input features, outputting a correction value. This correction value is multiplied by a learning rate less than 1 (to control the contribution of each tree and avoid overfitting) and added to the initial prediction value to obtain the updated prediction value. In the second iteration, the new residual between the updated prediction and the true value is calculated again. A second decision tree is then constructed to fit this new residual, outputting another correction value, which is again multiplied by the learning rate and added to the current prediction value. This process is repeated continuously. Each tree uses the residual from the previous iteration as its fitting target, and the output correction values are used to gradually reduce the gap between the predicted and true values. After iterations through a predetermined number of decision trees (e.g., 600), the final prediction result equals the sum of the initial prediction value plus the correction values of all trees multiplied by the learning rate. The sum is then converted into a probability value between 0 and 1 through an activation function, compared with a predetermined threshold, and output as a class label. During training, the initial prediction value provides a global baseline, the input data determines how each tree splits and corrects for the residuals of the training samples, the learning rate controls the step size of each correction, and the sequential accumulation of multiple trees allows the model to approximate the true target from coarse to fine.
[0081] The second model consists of a three-layer LSTM network. Each LSTM layer includes a forget gate, an input gate, and an output gate. It processes vehicle data at each time step (e.g., T1 to T5) sequentially, extracting hidden state features from temporal dependencies. After layer-by-layer feature abstraction and sequence information transfer through the three LSTM layers, the model connects the final hidden state output by the last LSTM layer to a fully connected layer and a Softmax classification layer. The final output is the probability value that the vehicle has at least one preset fault type, and the target fault is determined based on the probability value.
[0082] During the training of the second model, historical time-series vehicle datasets are first used as training samples. During training, the LSTM network receives a set of vehicle data (e.g., vehicle data across nine dimensions at a given time step) as input at each time step. The network learns to minimize the loss function between the predicted and true labels using backpropagation and gradient descent optimizers. Furthermore, Batch Normalization and Dropout regularization are employed to prevent overfitting, and an Early Stopping strategy is used to terminate training early when the validation set loss no longer decreases. The model is iteratively trained until convergence. After training, the model parameters are saved as a model file (e.g., a .h5 file).
[0083] The first model is invoked, and a first fault is output based on the vehicle data of the target vehicle. The second model is invoked, and a second fault is output based on the vehicle data of the target vehicle. If the first fault and the second fault are the same, either the first fault or the second fault is identified as the target fault.
[0084] For example, the first fault may include at least one fault, and the second fault may also include at least one fault. When there is a duplicate fault in the first fault and the second fault (i.e., the intersection of the first fault and the second fault), the duplicate fault is output as the target fault. When there is a non-duplicate fault in the first fault and the second fault, an association rule mining algorithm is used for verification processing.
[0085] Optionally, if the first fault and the second fault are different, an association rule mining algorithm is used to analyze the vehicle data and the first fault to determine the first dimension combination used to explain the cause of the fault. The first dimension combination includes 'a' dimensions out of k dimensions, where 'a' is a positive integer not greater than k. The data of 'ka' dimensions other than 'a' in the vehicle data are set to masked values to obtain the first focus data corresponding to the vehicle data. The first model is called, and the third fault is output based on the first focus data. If the third fault is the same as the first fault, either the first fault or the third fault is identified as the target fault.
[0086] For example, vehicle data for the target vehicle is input into a first model and a second model. The first model outputs "engine misfire" as the first fault and "catalytic converter efficiency degradation" as the second fault, while the second model outputs "engine misfire" as the second fault. Since both models have the same fault, "engine misfire," the system directly identifies "engine misfire" as the target fault. For "catalytic converter efficiency degradation," an association rule mining algorithm is used to analyze the target dimension combinations. Based on these combinations, the vehicle data is processed to obtain focused data. This focused data is then input into the first model again. If the first model still outputs "catalytic converter efficiency degradation," then "catalytic converter efficiency degradation" is also included as a target fault. If it does not output "catalytic converter efficiency degradation," then the target faults only include "engine misfire."
[0087] If the first model outputs "engine misfire" as the first fault and the second model outputs "catalytic converter efficiency decline" as the second fault, meaning they are different (no overlap), the system calls an association rule mining algorithm to analyze the vehicle data and the first fault. It determines that the first dimension combination used to explain the fault's cause is "actual roughness" and "speed fluctuation." Then, it sets all data in the vehicle data for the remaining seven dimensions (such as engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, downstream oxygen sensor voltage, speed, vehicle speed, and engine load) to mask values (e.g., set to 0 or preset default values), obtaining the first focused data. Subsequently, the first model is called to re-predict based on this first focused data, outputting the third fault as {"engine misfire"}. Since the third fault is the same as the first fault, the system ultimately identifies the first fault, "engine misfire," as the target fault.
[0088] Similarly, the prediction results output by the second model can also be validated using an association rule mining algorithm, and the validated prediction results can be used as the final target fault output.
[0089] Optionally, if the first fault and the third fault are different, an association rule mining algorithm is used to analyze the vehicle data and the second fault to determine a second dimension combination to explain the cause of the fault. The second dimension combination includes b dimensions out of k dimensions, where b is a positive integer not greater than k. Data in the kb dimensions other than b dimensions in the vehicle data are masked to obtain the second focus data corresponding to the vehicle data. The second model is then called, and a fourth fault is output based on the second focus data. If the fourth fault is the same as the second fault, either the second fault or the fourth fault is identified as the target fault. If the fourth fault is different from the second fault, a fuzzy diagnostic result is output, which includes both the first and second faults.
[0090] For example, vehicle data for the target vehicle is input into a first model and a second model. The first model outputs "engine misfire" as the first fault, while the second model outputs "catalytic converter efficiency degradation" as the second fault, which are different. The system first performs a first round of verification: it calls an association rule mining algorithm to analyze the vehicle data and the first fault "engine misfire," determining the first dimension combination as "actual roughness" and "speed fluctuation." The remaining seven dimensions in the vehicle data, excluding these two dimensions, are set to masked values. After obtaining the first focused data, the first model is called, outputting "normal" as the third fault. Since the third fault is different from the first fault, the first round of verification fails. The system then performs a second round of verification: it uses an association rule mining algorithm to analyze the vehicle data and the second fault "catalytic converter efficiency degradation," determining the second dimension combination as "downstream oxygen sensor voltage" and "engine coolant temperature" (i.e., b=2 dimensions). The remaining seven dimensions in the vehicle data, excluding these two dimensions, are set to masked values. After obtaining the second focused data, the second model is called, outputting "intake system leak" as the fourth fault. Since the fourth fault is different from the second fault, the system ultimately cannot confirm any fault, therefore outputting a fuzzy diagnostic result that includes both "engine misfire" and "catalytic converter efficiency degradation."
[0091] It should be noted that in the above example, the third fault ("normal") is based on the output of the "first fault" and the "first focus data", while the fourth fault ("intake system leak") is based on the output of the "second fault" and the "second focus data". Since both of these outputs failed the verification (the third fault is different from the first fault, and the fourth fault is different from the second fault), it indicates that the initial fault prediction results of "engine misfire" and "catalytic converter efficiency reduction" are unreliable. Therefore, the third and fourth faults based on inaccurate results are not output. Instead, the first and second faults are output as fuzzy diagnostic results, prompting the user to need manual intervention or to obtain more data for re-diagnosis.
[0092] Step 221: From the n sets of data, determine the m sets of data that are identified as the target fault by the fault prediction model, where m is a positive integer not greater than n.
[0093] For example, the OBD-II system of the target vehicle collected 10 sets of time-series vehicle data (i.e., n=10), each set containing 9 vehicle operation data and 2 derived data. After these 10 sets of data were input into the fault prediction model, the model determined the fault for each set of data. For example, the model determined that the output of the 5 sets of data (sets 1, 3, 5, 7, and 9) was "engine misfire" (with a probability exceeding 98%), while the remaining 5 sets of data were determined to be "normal". Therefore, the system determined m=5 sets of data from the n=10 sets of data (i.e., the 5 sets of data determined to be the target fault "engine misfire") for subsequent association rule mining analysis.
[0094] Step 222: Determine the alternative dimension combinations based on the k dimensions and their values.
[0095] Based on k dimensions and their specific values in the vehicle data, an exhaustive list of all combinations of dimensions and values that actually appear in the vehicle data is compiled as candidate dimension combinations. Specifically, each candidate dimension combination can include one or more dimensions and their values (e.g., single-dimensional combinations such as {dimension A = value a}, {dimension B = value d}, and multi-dimensional combinations such as {dimension A = value a, dimension B = value c}, {dimension A = value b, dimension B = value d}, etc.). Candidate dimension combinations are those that have appeared together in n sets of vehicle data (e.g., if "dimension A = value a" and "dimension B = value d" never appear simultaneously in the data, then that combination is not included as a candidate). This ensures that all possible, data-supported feature-value combinations are included in subsequent correlation calculations, thereby comprehensively covering diagnostic criteria potentially related to the target fault.
[0096] For example, vehicle data contains two dimensions: dimension A (e.g., engine coolant temperature) and dimension B (e.g., actual roughness), and the collected n=4 sets of data are as follows: Group 1: Dimension A = 85°C, Dimension B = 0.12 Group 2: Dimension A = 85°C, Dimension B = 0.12 Group 3: Dimension A = 90°C, Dimension B = 0.12 Group 4: Dimension A = 90°C, Dimension B = 0.18 Alternative dimension combinations include: Single-dimensional combinations: {Dimension A = 85°C}, {Dimension A = 90°C}, {Dimension B = 0.12}, {Dimension B = 0.18} (4 combinations in total) Two-dimensional combinations: {Dimension A = 85°C, Dimension B = 0.12}, {Dimension A = 90°C, Dimension B = 0.12}, {Dimension A = 90°C, Dimension B = 0.18} (3 combinations in total) A total of 7 alternative dimension combinations were obtained.
[0097] Step 223: For each alternative dimension combination, calculate the correlation between the alternative dimension combination and the target fault based on the occurrence of the alternative dimension combination in n sets of data and the occurrence of the alternative dimension combination in m sets of data.
[0098] For example, correlation includes support and confidence.
[0099] Support is used to describe the prevalence of alternative dimension combinations in all n sets of vehicle data, that is, the proportion of the number of times the alternative dimension combination appears in m sets of fault data to the total number of data sets n.
[0100] The quotient of the number of occurrences of the candidate dimension combinations in m sets of data and n is determined as the support of the candidate dimension combinations.
[0101] The confidence level is used to describe the reliability of the vehicle actually having the target fault when the candidate dimension combination appears in the vehicle data. It is the ratio of the number of times the combination appears in m sets of fault data to the total number of times it appears in n sets of data.
[0102] The confidence level of a candidate dimension combination is determined by the quotient of the number of occurrences of the candidate dimension combination in m sets of data and the number of occurrences of the candidate dimension combination in n sets of data.
[0103] For example, given n=10 sets of vehicle data, m=5 sets are identified by the fault prediction model as the target fault "engine misfire". Now, let's calculate the support for the candidate dimension combination {dimension A=85°C, dimension B=0.12}: This combination appears 4 times in all n=10 sets of data (e.g., in sets 1, 3, 5, and 8), and 3 times in the m=5 sets of fault data (in sets 1, 3, and 5). Therefore, the support is 3 / 10 = 0.3 (meaning this combination occurs 30% of the total fault data); the confidence is 3 / 4 = 0.75 (meaning that when this combination occurs, there is a 75% probability that the vehicle actually has an engine misfire). Thus, the support for this candidate dimension combination is 0.3, and the confidence is 0.75.
[0104] Step 224: Determine the target dimension combination from the candidate dimension combinations based on the relevance.
[0105] For example, a preset minimum support threshold and minimum confidence threshold are obtained; the candidate dimension combinations with support greater than the minimum support threshold and confidence greater than the minimum confidence threshold are determined as the target dimension combination.
[0106] For example, the candidate dimension combination {Dimension A = 85°C, Dimension B = 0.12} has a support of 0.4. In n = 10 data sets, this combination appears 4 times in m = 5 sets of fault data, so its support is 4 / 10 = 0.4 and its confidence is 0.8. This combination appears 5 times in the total data and 4 times in the fault data, so its confidence is 4 / 5 = 0.8. The combination {Dimension A = 90°C, Dimension B = 0.18} has a support of 0.1 and a confidence of 0.5. The system's preset minimum support threshold is 0.3 and minimum confidence threshold is 0.7. Therefore, only {Dimension A = 85°C, Dimension B = 0.12}, with a support of 0.4 greater than 0.3 and a confidence of 0.8 greater than 0.7, is determined as the target dimension combination to explain the cause of the fault.
[0107] If multiple dimension combinations meet the above conditions, the candidate dimension combinations with support greater than the minimum support threshold and confidence greater than the minimum confidence threshold are determined as qualified dimension combinations; the number of qualified dimension combinations is greater than one. Calculate the weighted score for each qualified dimension combination. The weighted score is the weighted sum of the confidence and support of the qualified dimension combination; the weights for confidence and support are preset weights. The qualified dimension combination with the highest weighted score is determined as the target dimension combination.
[0108] For example, the preset minimum support threshold is 0.3, and the minimum confidence threshold is 0.7. After the calculation in step 223, three candidate dimension combinations meet the conditions and are determined to be qualified dimension combinations: Combination A {Dimension A = 85°C, Dimension B = 0.12}: Support = 0.4, Confidence = 0.8 Combination B {Dimension A = 90°C, Dimension B = 0.18}: Support = 0.5, Confidence = 0.75 Combination C {Dimension A = 85°C, Dimension B = 0.18}: Support = 0.35, Confidence = 0.9 The system defaults to a confidence weight of 0.6 and a support weight of 0.4. The weighted scores for each combination are calculated as follows: The weighted score for combination A is 0.8 * 0.6 + 0.4 * 0.4 = 0.64 The weighted score for combination B is calculated as follows: 0.75 * 0.6 + 0.5 * 0.4 = 0.65 The weighted score for combination C is 0.9 * 0.6 + 0.35 * 0.4 = 0.68 Since combination C has the highest weighted score (0.68), the system determines {dimension A=85°C, dimension B=0.18} as the target dimension combination to explain the cause of the fault. When the engine coolant temperature is 85°C and the actual roughness is 0.18, the correlation with engine misfire fault is the strongest.
[0109] Step 230: Output the fault diagnosis results, which include the target fault and the combination of target dimensions.
[0110] In summary, the method provided in this application, by calling a fault prediction model to output the target fault based on the vehicle data of the target vehicle, and using an association rule mining algorithm to mine the correlation between the data of each dimension in the vehicle data and the occurrence of the target fault, determines the target dimension combination that can explain the cause of the fault. This overcomes the shortcomings of related technologies, which rely on human experience for diagnosis, are inefficient, and cannot provide diagnostic evidence. It not only achieves rapid and accurate fault identification but also provides interpretable evidence for the diagnostic results, enabling users to intuitively understand the cause of the fault or the symptoms of the fault, improving the efficiency of fault location and facilitating maintenance decisions.
[0111] The method provided in this application involves selecting m sets of data from n sets of time-series vehicle data that are identified as target faults by a fault prediction model. Then, it exhaustively enumerates candidate dimension combinations based on k dimensions and their specific values, and calculates the correlation between each combination and the target fault, thereby determining the final target dimension combination. This method can uncover feature combination patterns strongly correlated with faults, avoiding the subjectivity and limitations of manual experience analysis and improving the accuracy of fault cause analysis.
[0112] The method provided in this application quantifies the correlation strength between combinations and faults from two dimensions: prevalence and reliability. This is achieved by calculating the support (i.e., the proportion of the frequency of occurrence of the combination in the fault data to the total data) and confidence (i.e., the conditional probability that the vehicle actually has a fault when the combination occurs) of each candidate dimension combination. The support and confidence provide an objective and quantifiable basis for subsequent screening of the most explanatory target dimension combinations, thus providing data support for the reliability of the diagnostic results.
[0113] The method provided in this application uses preset minimum support and minimum confidence thresholds to select candidate dimension combinations that simultaneously meet the requirements of "universality" and "reliability" as target dimension combinations. This enables the system to automatically exclude combinations that occur too infrequently or have insufficient correlation reliability, avoiding redundant or misleading diagnostic information and ensuring that the output fault explanation information is significant and practical.
[0114] The method provided in this application, when multiple candidate dimension combinations all meet the threshold conditions, calculates the weighted score (a weighted sum of confidence and support) of each qualified dimension combination, and finally selects the combination with the highest weighted score as the target dimension combination. This method allows users to flexibly adjust the weights according to actual business needs (such as prioritizing the reliability or universality of the diagnosis), achieving intelligent selection of the optimal explanatory features, and further improving the accuracy and flexibility of the diagnostic results.
[0115] The method provided in this application simultaneously calls a first model and a second model to predict vehicle data for the same target vehicle. When both models output the same fault, the result is determined as the target fault. This dual-model verification mechanism effectively reduces the risk of misjudgment by a single model and improves the accuracy and robustness of fault prediction by utilizing the complementarity of different algorithms on data features.
[0116] The method provided in this application, XGBoost, integrates a large number of decision trees and combines class weight balancing to handle the sample imbalance problem (e.g., normal:fire = 1:8), achieving high accuracy in fault classification. A 3-layer LSTM network, combined with BatchNormalization, Dropout, and Early Stopping strategies, effectively prevents overfitting and accurately captures temporal feature changes. This model combination scheme is an experimentally validated preferred architecture, achieving excellent performance with a single prediction time of less than 0.001 seconds, an accuracy of 98.88%, and a fire fault recall rate of 100%.
[0117] The method provided in this application, when the faults output by the first model and the second model are inconsistent, analyzes vehicle data and the first fault using an association rule mining algorithm to determine the key first dimension combination. Then, data from other irrelevant dimensions are set as masked values to form first focused data, and the first model is called again for prediction. If the result of the re-prediction (the third fault) is consistent with the initial first fault, the validity of the fault is confirmed. This verification mechanism can eliminate interfering data, focus on core features, effectively verify the reliability of the initial fault judgment, avoid misjudgments caused by multiple fault interference or data noise, and further improve the accuracy of diagnosis.
[0118] The method provided in this application, after the first verification fails, further analyzes vehicle data and the second fault through association rule mining to determine the key second dimension combination and generate second focused data. Then, it calls the second model again for prediction (outputting the fourth fault). If the fourth fault is consistent with the second fault, the second fault is confirmed; if they are still inconsistent, a fuzzy diagnostic result containing both the first and second faults is output, prompting the user to require manual intervention or obtain more data. This two-level verification mechanism maximizes the complementarity of the two models for cross-validation, avoiding erroneous conclusions caused by misjudgments from a single model. The fuzzy diagnostic result mechanism ensures that misleading conclusions are not output when the fault cannot be confirmed, thus guaranteeing the safety and reliability of the diagnostic system.
[0119] In one alternative embodiment, such as Figure 4As shown, the method provided in this application embodiment adopts a layered architecture, including: a user interface layer 401, an application service layer 402, an algorithm engine layer 403, and a data storage layer 404.
[0120] Data storage layer 404: Used to store training data, model files, and result files. For example, historical fault data used for model training, datasets used for testing, ground truth labels, trained model files, and diagnostic result files.
[0121] Algorithm Engine Layer 403: Integrates XGBoost ensemble learning algorithm, LSTM deep learning algorithm, and association rule mining algorithm. The algorithm engine layer is the core of this system, integrating multiple algorithms, mainly including: XGBoost ensemble learning algorithm: used for fault prediction. In this embodiment, a gradient boosting-based algorithm can be used, such as an ensemble of 600 decision trees. For imbalanced sample problems (e.g., normal:failure = 1:8), class weight balancing can be employed.
[0122] Building an XGboost prediction model By integrating multiple decision trees and using gradient descent to optimize the binary classification loss function, multi-dimensional input features are mapped to the probability output of fault occurrence.
[0123] During the prediction phase, a pre-trained tree structure is used (including splitting features and splitting thresholds for each internal node, and weights for each leaf node). For a new sample, starting from the root node, the left or right subtree is selected based on the feature values until a leaf node is reached. The weight of that leaf node is then taken as the output of the tree. The outputs of all trees are summed to obtain the original predicted value (i.e., log odds) for the sample, which is then converted into a probability using the sigmoid function.
[0124] For a single sample, the predicted value is a weighted sum of the outputs of all decision trees:
[0125] Where: K is the total number of trees (n_estimators); f is the k-th decision tree; x is the input feature vector (i.e., vehicle data).
[0126] For each tree, recursively traverse it starting from the root node:
[0127] Continue until a leaf node is reached, then output the weight value of that node. The weight of the leaf nodes of each tree It is determined by minimizing the objective function (loss function + regularization term).
[0128] For fault prediction, it is ultimately converted into probability using the sigmoid function:
[0129] in, It is the probability that sample i belongs to the positive class (such as "fire failure"). It is the unnormalized log odds (i.e., the sum of the outputs of all trees).
[0130] LSTM deep learning algorithm: used for temporal feature modeling. In this embodiment, a 3-layer LSTM network structure can be used, combined with BatchNormalization and Dropout regularization, as well as the EarlyStopping strategy to prevent overfitting.
[0131] Association rule mining (Apriori algorithm): used to discover combined patterns of fault dimensions and provide interpretable diagnostic prediction rules.
[0132] The Apriori algorithm consists of two main steps: 1) Generate frequent itemsets.
[0133] Step 1: Generate candidate 1 itemsets (C1).
[0134] Iterate through all transactions and count the frequency (support) of each individual item (e.g., "temperature > 380℃").
[0135] Step 2: Filter frequent 1-itemsets (L1).
[0136] Based on the set minimum support threshold (e.g., 0.1), retain itemsets with support ≥ the threshold.
[0137] Step 3: Generate candidate k-itemsets (Ck) By concatenating frequent itemsets in L(k-1), a possible candidate k-itemset set is generated.
[0138] Step 4: Pruning. Prune the candidate set and delete itemsets that contain infrequent subsets.
[0139] Step 5: Filter frequent k-itemsets (Lk).
[0140] 2) Calculate the support of the candidate sets and retain the itemsets that meet the threshold.
[0141] Extract all possible non-empty subsets from the frequent itemset and calculate the confidence score.
[0142]
[0143] Here, Support(X∪Y) represents the probability that itemset X and itemset Y both appear in the same set of data; Support(X) only represents the probability that itemset X appears alone. By dividing Support(X∪Y) by Support(X), we can obtain the confidence level that feature Y also occurs if feature X occurs.
[0144] Based on the set minimum confidence threshold (e.g., 0.7), valid association rules are filtered out.
[0145] By combining business logic and statistical indicators to rank the importance of rules, the rules with the greatest impact on the normal state are selected, which complement the results of association rule mining and enhance the credibility of the model.
[0146] Application Service Layer 402: Based on the Flask Web framework, it provides an Application Programming Interface (API) and handles business logic. It is responsible for processing business logic, responding to frontend requests via the RESTful API, invoking the algorithm engine layer to execute diagnostic and prediction tasks, and uploading the visualized results to the user's web interface.
[0147] User Interface Layer 401: Used for data uploading and displaying diagnostic results using a web browser. It provides users with an interactive interface (such as a web browser) that supports data uploading, model comparison analysis, feature importance ranking, association rule display, and visualization of diagnostic results.
[0148] The algorithm engine layer is configured to execute a vehicle intelligent fault prediction method, such as Figure 5 As shown, a diagnostic prediction method is provided. This method can run in the algorithm engine layer of the above system (Example 1) (taking a fire fault as an example). The method includes the following steps: Step 501: Feature Engineering: Acquire vehicle operating data, including at least 9 raw features (such as engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load), and generate at least 2 derived data (such as rolling average of engine speed and engine speed fluctuation).
[0149] Data preparation and feature engineering are performed to acquire vehicle operating data, which can be sourced from the vehicle's OBD-II (Second On-Board Diagnostics) system. Feature engineering is then applied to the raw data.
[0150] The original characteristics include: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load.
[0151] Derivative features: To more accurately capture fault characteristics, derived features are generated, such as: rolling average of speed (set window=5) and speed fluctuation (e.g., using first-order difference).
[0152] Step 502: Prediction by different algorithms: Input the features into the pre-trained XGBoost model and LSTM model, and output the failure probability.
[0153] The model training (offline) uses a prepared training dataset to train the algorithm model.
[0154] XGBoost model training: Automatic parameter tuning and cross-validation are employed.
[0155] LSTM model training: Construct a 3-layer LSTM network and train it for approximately 50 epochs until convergence. After training, save the model file (e.g., .pkl or .h5 file).
[0156] Optionally, the system receives user-uploaded data to be diagnosed. It then performs feature engineering as described in step 501. The processed feature data is input into the pre-trained XGBoost and LSTM models, respectively. The models output fault probabilities, and the system determines whether a fire fault exists based on these probabilities.
[0157] Step 503: Association rule mining: Use association rule mining algorithms to discover fault dimension combination patterns, providing interpretable basis for diagnosis and prediction.
[0158] Analysis shows that "actual roughness" is the most important indicator for diagnosing engine smoothness (importance reaches 68.64%), while "speed fluctuation" is the second most important feature (importance reaches 17.70%). Together, they account for more than 85% and are the core basis for diagnosis.
[0159] The diagnostic interpretation provides interpretable diagnostic evidence; the system executes the following: Feature importance analysis: Shows the key features (such as “actual roughness”) identified in step 501 and their contribution to the diagnostic results.
[0160] Association rule mining: The Apriori algorithm is used to analyze feature combinations and generate high-confidence diagnostic rules to facilitate subsequent fault prediction. For example: Rule 1 (normal): "Low engine load" AND "Low misfire torque" → "Normal operation" (confidence 99.69%). Rule 2 (misfire): "Abnormal actual roughness" AND "Large speed fluctuation" → "Possible misfire" (confidence 94.34%).
[0161] Step 504: Visualization: The results visualization system visualizes the diagnostic results, fault probabilities, feature importance charts, and association rules at the user interface layer, and supports report generation and download.
[0162] In summary, the method provided in this application embodiment can improve diagnostic efficiency. This method has a fast diagnostic speed, with a single prediction time of less than 0.001 seconds, which is significantly more efficient than the 2 hours of traditional diagnosis.
[0163] The method provided in this application embodiment can improve the diagnostic accuracy. Based on the fusion and comparison of multiple algorithms such as XGBoost and LSTM, the diagnostic accuracy can reach 98.88%, which is significantly higher than the 85% of the traditional method.
[0164] The method provided in this application embodiment can achieve high recall and low false alarm, with a recall rate of up to 100% for engine misfire faults, a false negative rate of 0.00%, and a false alarm rate as low as 0.41%.
[0165] The method provided in this application embodiment can provide an explanation for the diagnostic results. Through association rule mining and feature importance analysis, it provides an interpretable basis for AI (Artificial Intelligence) diagnosis, such as clarifying that "actual roughness" and "rotation speed fluctuation" are the core indicators for diagnosis.
[0166] The method provided in this application can enhance the readability of predictions and simplify the analysis process of fault prediction through data visualization on a cloud web platform.
[0167] Exemplary embodiments of this application have been described in detail above. It should be understood that those skilled in the art can make detailed modifications and variations based on the concept of this application without creative effort. Therefore, any technical solutions that can be obtained by those skilled in the art based on the concept of this application through logical analysis, theoretical deduction, or limited experimentation on the basis of the prior art are intended to fall within the protection scope defined by this application.
[0168] Figure 6 This is a schematic diagram of the structure of a fault prediction device provided in an exemplary embodiment of this application. The device includes: The prediction module 1001 is used to call the fault prediction model and output the target fault based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1. Analysis module 1002 is used to analyze the vehicle data and the target fault using an association rule mining algorithm to determine a target dimension combination for explaining the cause of the fault; the target dimension combination includes at least one of the k dimensions; The output module 1003 is used to output fault diagnosis results, which include the target fault and the target dimension combination.
[0169] In one optional embodiment, the vehicle data includes n sets of data, each of the n sets of data including data from the k dimensions; n is an integer greater than 1. The analysis module 1002 is used to determine m sets of data from the n sets of data that are identified as the target fault by the fault prediction model, where m is a positive integer not greater than n. The analysis module 1002 is used to determine the candidate dimension combination based on the k dimensions and their values; The analysis module 1002 is used to calculate the correlation between the alternative dimension combination and the target fault for each alternative dimension combination based on the occurrence of the alternative dimension combination in the n sets of data and the occurrence of the alternative dimension combination in the m sets of data. The analysis module 1002 is used to determine the target dimension combination from the candidate dimension combinations based on the correlation degree.
[0170] In one optional embodiment, the correlation degree includes support and confidence. The analysis module 1002 is used to determine the support of the candidate dimension combination by dividing the number of occurrences of the candidate dimension combination in the m sets of data by n. The analysis module 1002 is used to determine the confidence level of the candidate dimension combination by the quotient of the number of occurrences of the candidate dimension combination in the m sets of data and the number of occurrences of the candidate dimension combination in the n sets of data.
[0171] In an optional embodiment, the analysis module 1002 is used to obtain a preset minimum support threshold and a minimum confidence threshold. The analysis module 1002 is used to determine the candidate dimension combination that has a support greater than the minimum support threshold and a confidence level greater than the minimum confidence threshold as the target dimension combination.
[0172] In an optional embodiment, the analysis module 1002 is used to determine the candidate dimension combinations whose support is greater than the minimum support threshold and whose confidence is greater than the minimum confidence threshold as qualified dimension combinations; the number of qualified dimension combinations is greater than 1. The analysis module 1002 is used to calculate the weighted score corresponding to each qualified dimension combination. The weighted score is the weighted sum of the confidence and support of the qualified dimension combination. The weights corresponding to the confidence and support are preset weights. The analysis module 1002 is used to determine the qualified dimension combination with the highest weighted score as the target dimension combination.
[0173] In one optional embodiment, the k-dimensional data includes at least one vehicle operation data and at least one derived data; the derived data is calculated based on the vehicle operation data. The vehicle data includes n sets of data, each set of data including data from the k dimensions; the n sets of data have a time series; the derived data includes at least one of the following: rolling average data obtained by calculating the average using window rolling, and fluctuation data obtained by calculating the first difference.
[0174] In one optional embodiment, the vehicle operating data includes at least one of the following: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load. The derived data includes at least one of the following: rolling average speed data calculated based on the speed; speed fluctuation data calculated based on the speed.
[0175] In one optional embodiment, the fault prediction model includes a first model for handling nonlinear relationships between data and a second model for capturing temporal dependencies between data. The prediction module 1001 is used to call the first model and output a first fault based on the vehicle data of the target vehicle; The prediction module 1001 is used to call the second model and output a second fault based on the vehicle data of the target vehicle; If the first fault and the second fault are the same, the first fault or the second fault is determined as the target fault.
[0176] In one alternative embodiment, the first model includes a gradient boosting tree model, wherein the gradient boosting tree includes 600 decision trees; The second model includes a Long Short-Term Memory (LSTM) network model, which comprises a three-layer LSTM network.
[0177] In an optional embodiment, the analysis module 1002 is used to analyze the vehicle data and the first fault using an association rule mining algorithm when the first fault and the second fault are not the same, and to determine a first dimension combination for explaining the cause of the fault; the first dimension combination includes a dimensions from the k dimensions; a is a positive integer not greater than k; The prediction module 1001 is used to set the data of ka dimensions other than the a-th dimension in the vehicle data to mask values, so as to obtain the first focus data corresponding to the vehicle data. The prediction module 1001 is used to call the first model and output a third fault based on the first focus data; The prediction module 1001 is used to determine the first fault or the third fault as the target fault when the third fault is the same as the first fault.
[0178] In an optional embodiment, the analysis module 1002 is used to analyze the vehicle data and the second fault using an association rule mining algorithm when the first fault and the third fault are not the same, and to determine a second dimension combination for explaining the cause of the fault; the second dimension combination includes b dimensions from the k dimensions; b is a positive integer not greater than k. The prediction module 1001 is used to set the data of kb dimensions other than the b dimensions in the vehicle data to mask values, so as to obtain the second focus data corresponding to the vehicle data. The prediction module 1001 is used to call the second model and output the fourth fault based on the second focus data; The prediction module 1001 is used to determine the second fault or the fourth fault as the target fault when the fourth fault is the same as the second fault. The output module 1003 is used to output a fuzzy diagnostic result when the fourth fault is different from the second fault, and the fuzzy diagnostic result includes the first fault and the second fault.
[0179] In an optional embodiment, the fault prediction model is further configured to output the contribution of the data in each of the k dimensions to the prediction result, as well as the probability value corresponding to the target fault. The diagnostic results also include: the contribution ranking of the data in the k dimensions; and the probability value corresponding to the target fault.
[0180] It should be noted that the fault prediction device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the fault prediction device and the fault prediction method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0181] Figure 7 This is a schematic diagram of the structure of a vehicle-mounted terminal according to an embodiment of this application.
[0182] Typically, the vehicle terminal 1100 includes: a main control module 1101, a CAN interface 1102, a hard-wired input interface 1103, and a hard-wired output interface 1104. The main control module 1101 is connected to the CAN interface 1102, the hard-wired input interface 1103, and the hard-wired output interface 1104, respectively.
[0183] The main control module 1101 typically includes a processor and memory. The processor may include one or more processing cores, such as an 11-core processor or an 8-core processor. The processor can be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the vehicle's display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning. The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, a non-transitory computer-readable storage medium in the memory is used to store at least one piece of program code, which is executed by a processor to implement the fault prediction method provided in the method embodiments of this application.
[0184] The CAN interface 1102 may include a powertrain CAN interface, a motor CAN interface, and a diagnostic CAN interface. The powertrain CAN interface is used to communicate with the vehicle's powertrain module, the motor CAN interface is used to communicate with the vehicle's motor controller, and the diagnostic CAN interface is used to communicate with diagnostic equipment.
[0185] The hard-wired input interface 1103 is used to receive hard-wired control signals. The hard-wired output interface 1104 is used to send control commands to the vehicle's electronic control components, causing the vehicle's electronic control components to perform corresponding actions. The vehicle's electronic control components include a power management system, a motor controller, an on-board charger, and a body control system.
[0186] The main control module 1101 can communicate with the vehicle's powertrain module, motor controller, and diagnostic equipment via the CAN interface 1102, and generate control commands based on the hard-wired control signals received by the hard-wired input interface 1103, so as to send the control commands to the vehicle's electronic control components via the hard-wired output interface 1104.
[0187] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on the vehicle terminal 1100, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0188] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. When the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor of a computer device, the fault prediction method provided in the above-described method embodiments is implemented.
[0189] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the fault prediction method provided in the above-described method embodiments.
[0190] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0191] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A fault prediction method, characterized in that, The method includes: The fault prediction model is invoked, and the target fault is output based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1. Using an association rule mining algorithm, the vehicle data and the target fault are analyzed to determine a combination of target dimensions for explaining the cause of the fault; the combination of target dimensions includes at least one of the k dimensions. Output fault diagnosis results, which include the target fault and the target dimension combination.
2. The method according to claim 1, characterized in that, The vehicle data includes n sets of data, and each set of data includes data from the k dimensions; n is an integer greater than 1. The process of using association rule mining algorithms to analyze the vehicle data and the target fault to determine the target dimension combination used to explain the cause of the fault includes: From the n sets of data, determine m sets of data that are identified as the target fault by the fault prediction model, where m is a positive integer not greater than n; Based on the k dimensions and their values, candidate dimension combinations are determined; For each of the alternative dimension combinations, the correlation degree between the alternative dimension combination and the target fault is calculated based on the occurrence of the alternative dimension combination in the n sets of data and the occurrence of the alternative dimension combination in the m sets of data. Based on the correlation degree, the target dimension combination is determined from the candidate dimension combinations.
3. The method according to claim 2, characterized in that, The correlation degree includes support and confidence. The calculation of the correlation between the candidate dimension combination and the target fault includes: The quotient of the number of occurrences of the candidate dimension combination in the m sets of data and n is determined as the support of the candidate dimension combination. The confidence level of the candidate dimension combination is determined by the quotient of the number of occurrences of the candidate dimension combination in the m sets of data and the number of occurrences of the candidate dimension combination in the n sets of data.
4. The method according to claim 2, characterized in that, The step of determining the target dimension combination from the candidate dimension combinations based on the correlation degree includes: Obtain the preset minimum support threshold and minimum confidence threshold; The candidate dimension combinations that have a support greater than the minimum support threshold and a confidence level greater than the minimum confidence threshold are determined as the target dimension combinations.
5. The method according to claim 4, characterized in that, The step of determining the candidate dimension combination whose support is greater than the minimum support threshold and whose confidence is greater than the minimum confidence threshold as the target dimension combination includes: The candidate dimension combinations whose support is greater than the minimum support threshold and whose confidence is greater than the minimum confidence threshold are determined as qualified dimension combinations; the number of qualified dimension combinations is greater than 1. Calculate the weighted score corresponding to each qualified dimension combination, wherein the weighted score is the weighted sum of the confidence and support of the qualified dimension combination; the weights corresponding to the confidence and support are preset weights. The qualified dimension combination with the highest weighted score is determined as the target dimension combination.
6. The method according to any one of claims 1 to 5, characterized in that, The data in the k dimensions includes at least one vehicle operation data and at least one derived data; the derived data is calculated based on the vehicle operation data. The vehicle data includes n sets of data, each set of data including data from the k dimensions; the n sets of data have a time series; the derived data includes at least one of the following: rolling average data obtained by calculating the average using window rolling, and fluctuation data obtained by calculating the first difference.
7. The method according to claim 6, characterized in that, The vehicle operating data includes at least one of the following: engine coolant temperature, intake manifold absolute pressure, actual ignition advance angle, misfire torque, actual roughness, downstream oxygen sensor voltage, engine speed, vehicle speed, and engine load. The derived data includes at least one of the following: rolling average speed data calculated based on the speed; speed fluctuation data calculated based on the speed.
8. The method according to any one of claims 1 to 5, characterized in that, The fault prediction model includes a first model for handling nonlinear relationships between data and a second model for capturing temporal dependencies between data. The fault prediction model is invoked, and the target fault is output based on the vehicle data of the target vehicle, including: Invoke the first model and output the first fault based on the vehicle data of the target vehicle; The second model is invoked, and a second fault is output based on the vehicle data of the target vehicle; If the first fault and the second fault are the same, the first fault or the second fault is determined as the target fault.
9. The method according to claim 8, characterized in that, The first model includes a gradient boosting tree model; The second model includes the Long Short-Term Memory (LSTM) network model.
10. The method according to claim 8, characterized in that, The method further includes: If the first fault and the second fault are different, an association rule mining algorithm is used to analyze the vehicle data and the first fault to determine a first dimension combination for explaining the cause of the fault; the first dimension combination includes a dimensions from the k dimensions; a is a positive integer not greater than k; Set the data of ka dimensions other than the a-th dimension in the vehicle data to mask values to obtain the first focus data corresponding to the vehicle data; The first model is invoked, and a third fault is output based on the first focused data. If the third fault is the same as the first fault, then the first fault or the third fault is identified as the target fault.
11. The method according to claim 10, characterized in that, The method further includes: If the first fault and the third fault are not the same, an association rule mining algorithm is used to analyze the vehicle data and the second fault to determine a second dimension combination to explain the cause of the fault; the second dimension combination includes b dimensions from the k dimensions; b is a positive integer not greater than k; Set the data of kb dimensions other than the b dimensions in the vehicle data to mask values to obtain the second focus data corresponding to the vehicle data; The second model is invoked, and a fourth fault is output based on the second focused data. If the fourth fault is the same as the second fault, the second fault or the fourth fault is identified as the target fault. If the fourth fault is different from the second fault, a fuzzy diagnostic result is output, which includes the first fault and the second fault.
12. The method according to any one of claims 1 to 5, characterized in that, The fault prediction model is also used to output the contribution of the data in each of the k dimensions to the prediction result, as well as the probability value corresponding to the target fault. The diagnostic results also include: the contribution ranking of the data in the k dimensions; and the probability value corresponding to the target fault.
13. A fault prediction device, characterized in that, The device includes: The prediction module is used to call the fault prediction model and output the target fault based on the vehicle data of the target vehicle; the vehicle data includes data in k dimensions; k is an integer greater than 1. An analysis module is used to analyze the vehicle data and the target fault using an association rule mining algorithm to determine a combination of target dimensions for explaining the cause of the fault; the combination of target dimensions includes at least one of the k dimensions. The output module is used to output fault diagnosis results, which include the target fault and the target dimension combination.
14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the fault prediction method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one program, which is loaded and executed by a processor to implement the fault prediction method as described in any one of claims 1 to 12.
16. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform the fault prediction method as described in any one of claims 1 to 12.