A vehicle fault diagnosis method based on OBD data
By constructing a data structure conversion model and various algorithms, the problems of inconsistent data formats and low intelligence in vehicle fault diagnosis were solved, realizing the universality and diagnostic accuracy of the OBD system, providing efficient fault repair strategy generation, and improving the intelligence and automation level of vehicle fault diagnosis.
Patent Information
- Application Number
- CN202510226312.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Existing vehicle fault diagnosis technologies suffer from poor universality, low accuracy, and low intelligence. In particular, the inconsistent OBD data formats of different vehicle models and manufacturers make it difficult to uniformly process heterogeneous data. The generalization ability of a single algorithm is insufficient, and the generation of repair strategies relies on human experience, which is inefficient and makes it difficult to guarantee the optimality of the strategy.
We construct a data structure transformation model, a vehicle fault knowledge graph, a named entity and entity relationship recognition model, a vehicle fault diagnosis model, and a fault repair strategy generation model. Through deep learning and reinforcement learning algorithms, we uniformly process OBD data of different vehicle models, achieve consistency of data structure and comprehensiveness of information, and improve diagnostic accuracy and automated generation of repair strategies.
It enables unified processing of OBD data from different vehicle models, improves the versatility of the OBD system and the accuracy of fault diagnosis, reduces misdiagnosis and missed diagnosis, generates efficient and optimal maintenance strategies, and provides valuable references and tips for drivers and maintenance personnel.
Smart Images

Figure CN120065998B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of vehicle fault diagnosis, and particularly relates to a vehicle fault diagnosis method based on OBD data. BACKGROUND
[0002] With the rapid development of the automobile industry, the accuracy and efficiency of vehicle fault diagnosis have become the key to ensuring the safe operation of vehicles. The on-board diagnostic system (OBD) for monitoring the state of the vehicle and the system for controlling the emission system monitors the engine, catalytic converter, oxygen sensor and other key components in real time to ensure the normal operation of the vehicle emission system. Once an anomaly is found, the system will record the fault information and related codes and issue a warning through the fault light to remind the driver. OBD data is obtained through the OBD interface of the vehicle. These data not only include fault codes, but also cover a wealth of vehicle operating state information, including various operating condition data of the vehicle, such as fuel pressure, engine air flow, vehicle speed, etc.
[0003] Although the OBD system has been applied to a certain extent in vehicle fault diagnosis, the existing vehicle fault diagnosis technology still has the following defects:
[0004] 1) Poor universality: the OBD data formats of different vehicle models and different manufacturers are different, resulting in inconsistent data structures, and existing technologies are difficult to uniformly process these heterogeneous data, limiting the universality of the OBD system;
[0005] 2) Poor fault diagnosis accuracy: existing fault diagnosis is often based on a single algorithm or simple rules, which is difficult to cope with complex and variable vehicle faults, and the generalization ability and robustness of the single algorithm are insufficient, which is prone to misdiagnosis or missed diagnosis;
[0006] 3) Low degree of intelligence: in existing technologies, the generation of fault repair strategies mainly relies on manual experience, lacks intelligence and automation, which leads to low efficiency of repair strategy generation and difficulty in ensuring the optimality of the strategy. SUMMARY
[0007] In order to solve the problems of poor universality, poor fault diagnosis accuracy and low degree of intelligence in the existing technology, the application aims to provide a vehicle fault diagnosis method based on OBD data.
[0008] The technical solution adopted by the application is:
[0009] A vehicle fault diagnosis method based on OBD data, comprising the following steps:
[0010] The cloud data center constructs a data structure conversion model, a vehicle fault knowledge graph, a named entity and entity relationship recognition model, a vehicle fault diagnosis model, and a fault repair strategy generation model, and deploys them to all OBD systems.
[0011] The OBD system collects real-time OBD data of the current vehicle, and uses the data structure conversion model to convert the real-time OBD data into converted real-time OBD data.
[0012] The OBD system uses the named entity and entity relationship recognition model to map the converted real-time OBD data according to the vehicle fault knowledge graph, and obtains mapped real-time OBD data.
[0013] The OBD system uses the vehicle fault diagnosis model to diagnose vehicle faults according to the mapped real-time OBD data, and obtains real-time vehicle fault diagnosis results.
[0014] The OBD system uses the fault repair strategy generation model to generate a fault repair strategy according to the real-time vehicle fault diagnosis results, and obtains a real-time fault repair strategy.
[0015] Further, the cloud data center constructs a data structure conversion model, a vehicle fault knowledge graph, a named entity and entity relationship recognition model, a vehicle fault diagnosis model, and a fault repair strategy generation model, and deploys them to all OBD systems, including the following steps:
[0016] The cloud data center collects a plurality of historical OBD data and a plurality of historical vehicle fault knowledge, and pre-processes them to obtain a plurality of pre-processed historical OBD data and a plurality of pre-processed vehicle fault knowledge.
[0017] The plurality of pre-processed historical OBD data is converted into a plurality of converted historical OBD data.
[0018] According to the plurality of pre-processed vehicle fault knowledge, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained.
[0019] According to the plurality of pre-processed historical OBD data and the corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm.
[0020] According to the plurality of converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated.
[0021] According to the plurality of historical vehicle fault diagnosis results, a fault repair strategy generation model is constructed using a reinforcement learning algorithm, and a plurality of historical fault repair strategy generation experiences are generated.
[0022] The data structure conversion model, the vehicle fault knowledge graph, the named entity and entity relationship recognition model, the vehicle fault diagnosis model, and the fault repair strategy generation model are deployed to all OBD systems.
[0023] Further, the named entity and entity relationship recognition model is constructed based on a BERT-CRF-SVM algorithm, and the named entity and entity relationship recognition model comprises a semantic feature extraction module constructed based on a BERT algorithm, a named entity recognition module constructed based on a CRF algorithm, and an entity relationship recognition module constructed based on a SVM algorithm connected in sequence.
[0024] Further, according to the vehicle fault knowledge after pre-processing, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained, comprising the following steps:
[0025] An initial named entity and entity relationship recognition model is constructed using a BERT-CRF-SVM algorithm.
[0026] According to the vehicle fault knowledge after pre-processing, the initial named entity and entity relationship recognition model is optimized and trained to obtain a final named entity and entity relationship recognition model, and a plurality of knowledge named entities and a plurality of knowledge entity relationships are generated.
[0027] According to the plurality of knowledge named entities and the plurality of knowledge entity relationships, a knowledge graph is constructed to obtain a vehicle fault knowledge graph.
[0028] Further, the data structure conversion model is constructed based on an LSTM-cGAN algorithm, and the data structure conversion model comprises a sequence feature extraction module constructed based on an LSTM algorithm and a data structure conversion module constructed based on a cGAN algorithm connected in sequence, the data structure conversion module comprises a generator and a discriminator connected in sequence, and the generator and the discriminator are connected with the sequence feature extraction module.
[0029] Further, according to the historical OBD data after pre-processing and the corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm, comprising the following steps:
[0030] An initial data structure conversion model is constructed using an LSTM-cGAN algorithm; the initial data structure conversion model comprises an initial sequence feature extraction module and an initial data structure conversion module.
[0031] According to a first loss function of the initial generator in the initial data structure conversion module and a second loss function of the initial discriminator, a comprehensive loss function is obtained.
[0032] According to a plurality of pre-processed historical OBD data, the initial sequence feature extraction module is trained and optimized to obtain a final sequence feature extraction module, and a plurality of historical OBD data sequence features are generated;
[0033] According to a plurality of historical OBD data sequence features, the initial generator is trained and optimized to obtain an optimized generator, and a plurality of converted generated OBD data are generated;
[0034] According to a plurality of converted historical OBD data and corresponding converted generated OBD data sequences, the initial discriminator is trained and optimized to obtain an optimized discriminator, and a plurality of historical discrimination results are generated;
[0035] According to the converted generated OBD data of each historical OBD data and the corresponding historical discrimination result, a real-time comprehensive loss value in the training and optimization process is obtained using a comprehensive loss function;
[0036] If the real-time comprehensive loss value is less than the loss value threshold, the final generator and the final discriminator are output, and the final data structure conversion module is obtained according to the final generator and the final discriminator;
[0037] The final sequence feature extraction module and the final data structure conversion module are integrated to obtain a final data structure conversion model.
[0038] Further, the vehicle fault diagnosis model is constructed based on the GAT-Droput-MLP algorithm, and the vehicle fault diagnosis model includes a graph structure feature extraction module constructed based on the GAT-Droput algorithm and a vehicle fault diagnosis module constructed based on the MLP algorithm.
[0039] Further, according to a plurality of converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated, including the following steps:
[0040] An initial vehicle fault diagnosis model is constructed using the GAT-Droput-MLP algorithm; the initial vehicle fault diagnosis model includes an initial graph structure feature extraction module and an initial vehicle fault diagnosis module;
[0041] According to a plurality of converted historical OBD data, the initial graph structure feature extraction module is trained and optimized, and in the training and optimization process, the Droput algorithm is used to prune the initial graph structure feature extraction module to obtain a final graph structure feature extraction module, and a plurality of historical graph structure features are generated;
[0042] According to a plurality of historical graph structure features, the initial vehicle fault diagnosis module is trained and optimized to obtain a final vehicle fault diagnosis module, and a plurality of historical vehicle fault diagnosis results are generated.
[0043] Integrate the final graph structure feature extraction module and the final vehicle fault diagnosis module to obtain a final vehicle fault diagnosis model.
[0044] Further, the fault repair strategy generation model is constructed based on the MOGRPO-FFWA algorithm, and the fault repair strategy generation model comprises a fault repair strategy generation module constructed based on the MOGRPO algorithm and a network parameter optimization module constructed based on the FFWA algorithm connected in sequence, the fault repair strategy generation module comprises a target function set, an experience replay pool, a strategy network and an agent, the agent is connected with the target function set, the experience replay pool and the strategy network respectively, and the strategy network is connected with the network parameter optimization module.
[0045] Further, according to a plurality of historical vehicle fault diagnosis results, a reinforcement learning algorithm is used to construct a fault repair strategy generation model, and a plurality of historical fault repair strategy generation experiences are generated, comprising the following steps:
[0046] An initial fault repair strategy generation model is constructed using the MOGRPO-FFWA algorithm, and the initial fault repair strategy generation model comprises an initial fault repair strategy generation module and a network parameter optimization module;
[0047] The initial network parameters of the initial strategy network of the initial fault repair strategy generation module are optimized using the network parameter optimization module with the optimization target of minimizing the prediction error, to obtain an optimized strategy network;
[0048] The initial fault repair strategy generation module provided with the optimized strategy network is provided with a target function set and an experience replay pool, and the agent is provided with an action space and a state space, and the fault repair strategy generation problem is used as a simulation environment of the initial fault repair strategy generation module;
[0049] According to the historical vehicle fault diagnosis results, the initial fault repair strategy generation module is optimized and trained based on any target function in the target function set, to obtain a final fault repair strategy generation module, and a plurality of historical fault repair strategy generation experiences are generated;
[0050] The plurality of historical fault repair strategy generation experiences are stored in the experience replay pool of the final fault repair strategy generation module, and the final fault repair strategy generation module and the network parameter optimization module are integrated to obtain a final fault repair strategy generation model.
[0051] The beneficial effects of the present application are:
[0052] The application discloses a vehicle fault diagnosis method based on OBD data.
[0053] Other benefits of the application will be further described in the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1 is a flow chart of the vehicle fault diagnosis method based on OBD data in the application. DETAILED DESCRIPTION
[0055] The application will be further explained in combination with the drawings and specific embodiments.
[0056] Embodiment:
[0057] As shown in the drawings, the embodiment provides a vehicle fault diagnosis method based on OBD data, including the following steps: Figure 1
[0058] S1: cloud data center, construct data structure conversion model, vehicle fault knowledge graph, named entity and entity relationship recognition model, vehicle fault diagnosis model and fault repair strategy generation model, and deploy to all OBD systems, including the following steps:
[0059] S1-1: cloud data center, collect a plurality of historical OBD data and a plurality of historical vehicle fault knowledge, and pre-process to obtain a plurality of pre-processed historical OBD data and a plurality of pre-processed vehicle fault knowledge;
[0060] The preprocessing includes format processing to ensure that the data meets the input requirements of subsequent model training, and data cleaning to remove redundant and irrelevant information, thereby improving the quality of the data and the training efficiency;
[0061] S1-2: data structure conversion is performed on the plurality of pre-processed historical OBD data to obtain a plurality of converted historical OBD data;
[0062] The sequence format historical OBD data is manually converted into the converted historical OBD data in a graph structure, thereby providing data support for subsequent model training;
[0063] S1-3: According to the vehicle fault knowledge after pre-processing, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained.
[0064] The named entity and entity relationship recognition model is constructed based on a Bidirectional Encoder Representations from Transformers (BERT)-Conditional Random Fields (CRF)-Support Vector Machine (SVM) algorithm, and the named entity and entity relationship recognition model comprises a semantic feature extraction module constructed based on the BERT algorithm, a named entity recognition module constructed based on the CRF algorithm, and an entity relationship recognition module constructed based on the SVM algorithm connected in sequence.
[0065] The BERT of the semantic feature extraction module can capture deep semantic information in the knowledge text, which is very useful for recognizing different types of knowledge named entities (such as clinical test terms and clinical test component names). The CRF of the named entity recognition module can consider the dependency relationship between adjacent knowledge named entity labels, which can help the model learn the sequence dependency of entity labels, thereby improving the accuracy of named entity annotation and realizing the extraction of knowledge named entities. The SVM of the entity relationship recognition module is mainly used for relationship classification of the extracted named entity pairs, judges whether there is a specific relationship between them, and the type of the relationship, converts the named entity and its context information into a high-dimensional feature vector, and these vectors can effectively represent the relationship between entities. By combining the deep semantic information extracted by BERT and the sequence dependency considered by CRF, complex entity relationships can be processed more effectively.
[0066] According to the vehicle fault knowledge after pre-processing, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained, comprising the following steps:
[0067] S1-3-1: An initial named entity and entity relationship recognition model is constructed using a BERT-CRF-SVM algorithm.
[0068] S1-3-2: According to the vehicle fault knowledge after pre-processing, the initial named entity and entity relationship recognition model is optimized and trained to obtain the final named entity and entity relationship recognition model, and a plurality of knowledge named entities and a plurality of knowledge entity relationships are generated, including the following steps:
[0069] S1-3-2-1: Using the initial semantic feature extraction module of the initial named entity and entity relationship recognition model, the historical semantic features of the pre-processed vehicle fault knowledge are extracted;
[0070] S1-3-2-2: According to the historical semantic features, using the initial named entity recognition module, the named entity recognition is performed to obtain a plurality of knowledge named entities;
[0071] S1-3-2-3: According to the historical semantic features of the plurality of knowledge named entities, using the initial entity relationship recognition module, the entity relationship recognition is performed to obtain a plurality of corresponding knowledge entity relationships;
[0072] S1-3-2-4: All pre-processed vehicle fault knowledge is traversed to obtain the final semantic feature extraction module, the final named entity recognition module and the final entity relationship recognition module;
[0073] S1-3-2-5: The final semantic feature extraction module, the final named entity recognition module and the final entity relationship recognition module are integrated to obtain the final named entity and entity relationship recognition model, and a plurality of knowledge named entities and a plurality of knowledge entity relationships are generated;
[0074] S1-3-3: According to the plurality of knowledge named entities and the plurality of knowledge entity relationships, the knowledge graph is constructed to obtain the vehicle fault knowledge graph;
[0075] S1-4: According to a plurality of pre-processed historical OBD data and corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm;
[0076] The data structure conversion model is constructed based on a Long Short-Term Memory (LSTM)-Conditional Generative Adversarial Network (cGAN) algorithm, and the data structure conversion model includes a sequence feature extraction module constructed based on the LSTM algorithm and a data structure conversion module constructed based on the cGAN algorithm connected in sequence. The data structure conversion module includes a generator and a discriminator connected in sequence, and the generator and the discriminator are connected with the sequence feature extraction module;
[0077] The LSTM of the sequence feature extraction module is used to process and predict long-term dependencies in time series data. In vehicle fault diagnosis, the original OBD data is often time series data. LSTM can effectively capture the time sequence features in these data, extract useful sequence features from the original OBD data, and these features may include engine operating state, vehicle speed, fuel consumption and other parameters that change over time; The task of the generator of the data structure conversion module is to generate graph structure data that conforms to the target data structure according to the sequence features extracted from the LSTM, and the task of the discriminator is to judge whether the data output by the generator is real, that is, whether it conforms to the real data distribution. Through such adversarial training, the generator continuously optimizes its generation ability until it can generate high-quality data, so that the converted OBD data can better adapt to subsequent vehicle fault diagnosis;
[0078] According to the pre-processed historical OBD data and the corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm, including the following steps:
[0079] S1-4-1: Use the LSTM-cGAN algorithm to construct an initial data structure conversion model; The initial data structure conversion model includes an initial sequence feature extraction module and an initial data structure conversion module;
[0080] S1-4-2: Obtain a comprehensive loss function according to the first loss function of the initial generator and the second loss function of the initial discriminator in the initial data structure conversion module;
[0081] S1-4-3: According to the pre-processed historical OBD data, the initial sequence feature extraction module is trained and optimized to obtain the final sequence feature extraction module, and a plurality of historical OBD data sequence features are generated;
[0082] S1-4-4: According to a plurality of historical OBD data sequence features, the initial generator is trained and optimized to obtain an optimized generator, and a plurality of converted generated OBD data are generated;
[0083] S1-4-5: According to a plurality of converted historical OBD data and corresponding converted generated OBD data sequences, the initial discriminator is trained and optimized to obtain an optimized discriminator, and a plurality of historical discrimination results are generated;
[0084] S1-4-6: According to the converted generated OBD data of each historical OBD data and the corresponding historical discrimination result, the real-time comprehensive loss value in the training and optimization process is obtained using the comprehensive loss function;
[0085] S1-4-7: If the real-time comprehensive loss value is less than the loss value threshold, output the final generator and the final discriminator, and obtain a final data structure conversion module according to the final generator and the final discriminator;
[0086] S1-4-8: Integrate the final sequence feature extraction module and the final data structure conversion module to obtain a final data structure conversion model;
[0087] S1-5: According to the converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated;
[0088] The vehicle fault diagnosis model is constructed based on a Graph Attention Network (GAT)-Droput-Multi-Layer Perceptron (MLP) algorithm, and the vehicle fault diagnosis model includes a graph structure feature extraction module constructed based on the GAT-Droput algorithm and a vehicle fault diagnosis module constructed based on the MLP algorithm.
[0089] The GAT of the graph structure feature extraction module can learn the features of different nodes and the complex interaction features between different nodes in the converted historical OBD data, and use the attention mechanism to assign different weights to the node features and edge features of different nodes, thereby highlighting the parameter nodes and edge relationships that are more important for fault diagnosis. The Dropout technology is used to reduce the risk of model overfitting and improve the generalization ability of the model; the vehicle fault diagnosis module is used to fuse the features obtained by the graph structure feature extraction module, and perform classification or regression analysis on the fused features to identify whether the vehicle has a fault, and possibly further determine the type and severity of the fault, etc.
[0090] According to the converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated, including the following steps:
[0091] S1-5-1: An initial vehicle fault diagnosis model is constructed using a GAT-Droput-MLP algorithm; the initial vehicle fault diagnosis model includes an initial graph structure feature extraction module and an initial vehicle fault diagnosis module.
[0092] S1-5-2: The initial graph structure feature extraction module is trained and optimized according to the converted historical OBD data, and in the training and optimization process, the Droput algorithm is used to prune the initial graph structure feature extraction module to obtain a final graph structure feature extraction module, and generate a plurality of historical graph structure features.
[0093] S1-5-3: According to a plurality of historical graph structure features, the initial vehicle fault diagnosis module is trained and optimized to obtain a final vehicle fault diagnosis module, and a plurality of historical vehicle fault diagnosis results are generated;
[0094] S1-5-4: The final graph structure feature extraction module and the final vehicle fault diagnosis module are integrated to obtain a final vehicle fault diagnosis model;
[0095] S1-6: According to a plurality of historical vehicle fault diagnosis results, a reinforcement learning algorithm is used to construct a fault repair strategy generation model, and a plurality of historical fault repair strategy generation experiences are generated;
[0096] The fault repair strategy generation model is constructed based on a Multi-Objective Group Relative Policy Optimization (MOGRPO)-Fast Fireworks Optimization Algorithm (FFWA), and the fault repair strategy generation model includes a fault repair strategy generation module constructed based on the MOGRPO algorithm and a network parameter optimization module constructed based on the FFWA algorithm connected in sequence. The fault repair strategy generation module includes a target function set, an experience replay pool, a strategy network, and an agent. The agent is connected with the target function set, the experience replay pool, and the strategy network, respectively. The strategy network is connected with the network parameter optimization module.
[0097] The target function set of the fault repair strategy generation module can handle multiple conflicting objectives such as repair cost, time, efficiency, etc., and generate repair strategies that balance these objectives. The agent learns historical repair strategies through the experience replay pool and continuously optimizes its strategy generation capabilities. The agent updates the strategy network based on the learned experience to generate more effective repair strategies. The design of the experience replay pool and the agent enables the model to continuously learn and optimize, improving the quality of strategy generation. The fault repair strategy generation module uses a group exploration approach to avoid getting stuck in local optimal solutions to some extent. The strategy network outputs the distribution probability of actions under a given state. The fault repair strategy generation module directly updates the strategy network through gradients, eliminating the Critic model in traditional reinforcement learning, making the algorithm structure more concise. The network parameter optimization module uses the FFWA algorithm to optimize the initial network parameters of the strategy network, improving the accuracy and efficiency of fault repair strategy generation.
[0098] According to a plurality of historical vehicle fault diagnosis results, a reinforcement learning algorithm is used to construct a fault repair strategy generation model, and a plurality of historical fault repair strategy generation experiences are generated, including the following steps:
[0099] S1-6-1: using MOGRPO-FFWA algorithm, an initial fault repair strategy generation model is constructed, and the initial fault repair strategy generation model includes an initial fault repair strategy generation module and a network parameter optimization module;
[0100] S1-6-2: using the network parameter optimization module, the initial network parameters of the initial strategy network of the initial fault repair strategy generation module are optimized to obtain an optimized strategy network, with the optimization target of minimizing the prediction error, including the following steps:
[0101] S1-6-2-1: encode the initial network parameters of the initial strategy network into an individual vector of a health assessment result optimization model, and initialize using a Circle chaotic mapping sequence to obtain an initial FFWA population according to the individual vector, the initial FFWA population including a plurality of initial FFWA individuals;
[0102] The formula is:
[0103]
[0104] In the formula, q l is the initial FFWA individual of the Circle chaotic mapping; is a randomly generated initial FFWA individual; l is an FFWA individual indicator; mod(*) is a remainder function;
[0105] S1-6-2-2: set the fitness function according to the optimization target of minimizing the prediction error;
[0106] The formula is:
[0107] Fit(x) = minMSN
[0108] In the formula, Fit(x) is the fitness function; and MSN is the prediction error value;
[0109] S1-6-2-3: according to the fitness function, the fitness values of the initial FFWA individuals in the initial FFWA population are obtained, and according to the fitness values, the explosion radius and the number of sparks of the initial FFWA individuals are obtained;
[0110] The formula is:
[0111]
[0112] In the formula, S l' is the number of sparks of the initial FFWA individual q l' ; M' is a number constant; f max is the maximum fitness value in the initial FFWA population; f(q l'is the initial FFWA individual q l' ; τ is an infinitesimal constant; a" is a convergence factor; σ is a positive real number not equal to 0;
[0113]
[0114] wherein R l' is the explosion radius of the initial FFWA individual q l' ; σ is an explosion radius adjustment constant; f min is the minimum fitness value in the initialized FFWA population; L is the total number of FFWA individuals;
[0115] wherein a" is a convergence factor; tanh(.) is a hyperbolic tangent function; t is an iteration indicator; t max is the maximum number of iterations; a max , a min are the maximum and minimum values of the convergence factor, respectively; λ is a decreasing rate parameter, k" is a decreasing period parameter, λ = -2π, k' = π;
[0116] The number of sparks determines the number of sub-fireworks generated after each explosion of the fireworks, and the explosion radius determines the distribution range of the sparks in the solution space after the explosion of the fireworks. In the early stage of iteration, the value of a" is larger, the number of sparks of the FFWA individual is smaller, and the explosion radius is larger, which helps to reduce the computational burden and distribute more widely, and helps to explore more solution space. In the later stage of iteration, the smaller explosion radius helps to perform fine search in the local area, and the larger number of sparks helps to increase the diversity of search;
[0117] S1-6-2-4: According to the explosion radius, the number of sparks, and the fitness value, the fireworks explosion is performed to obtain a plurality of updated FFWA individuals of the updated FFWA population;
[0118] The formula is:
[0119] q' l' = q l' + S l' × rand(-1, 1)
[0120] wherein q' l' is the updated FFWA individual; rand(-1, 1) is a random number between -1 and 1;
[0121] S1-6-2-5: A Gaussian mutation algorithm is used to perform Gaussian mutation on the initialized FFWA population to generate a plurality of Gaussian mutated FFWA individuals of the Gaussian mutated FFWA population;
[0122]
[0123] The formula is:
[0124] q" l' = q l' + S l' × G(1, 1)
[0125] In the formula, q" l' is a FFWA individual with Gaussian variation; G(1, 1) is a random number of Gaussian distribution with mean and variance of 1;
[0126] S1-6-2-6: using a dynamic back learning algorithm, performing dynamic back learning on the initialized FFWA population to obtain a plurality of back FFWA individuals of the back FFWA population;
[0127] The formula is:
[0128] q' l' = γ × (L max + L min ) - q l'
[0129] In the formula, q' l' is a back FFWA individual; γ is a decreasing inertia coefficient; L max , L min are maximum and minimum values of a vector space respectively;
[0130] S1-6-2-7: using a fitness function, obtaining fitness values of each updated FFWA individual, a FFWA individual with Gaussian variation, and a back FFWA individual, and taking a FFWA individual with a minimum fitness value as an optimal individual;
[0131] S1-6-2-8: if the number of iterations is greater than or equal to a threshold value of the number of iterations or a fitness value of the optimal individual is less than a threshold value of fitness, decoding an individual vector of the optimal individual to obtain optimal initial network parameters;
[0132] S1-6-2-9: according to the optimal initial network parameters, optimizing an initial strategy network of the initial fault repair strategy generation module to obtain an optimized strategy network;
[0133] S1-6-3: setting a target function set and an experience replay pool for the initial fault repair strategy generation module with the optimized strategy network, setting an action space and a state space for an agent, and taking a fault repair strategy generation problem as a simulation environment of the initial fault repair strategy generation module;
[0134] S1-6-4: Based on any objective function in the objective function set, the initial fault repair strategy generation module is optimized and trained according to the historical vehicle fault diagnosis result, to obtain a final fault repair strategy generation module, and a plurality of historical fault repair strategy generation experiences are generated;
[0135] S1-6-5: Store the plurality of historical fault repair strategy generation experiences to an experience replay pool of the final fault repair strategy generation module, integrate the final fault repair strategy generation module and the network parameter optimization module, and obtain a final fault repair strategy generation model;
[0136] S1-7: Deploy the data structure conversion model, the vehicle fault knowledge graph, the named entity and entity relationship recognition model, the vehicle fault diagnosis model, and the fault repair strategy generation model to all OBD systems, including the following steps:
[0137] S1-7-1: Extract the metadata of the data structure conversion model, the vehicle fault knowledge graph, the named entity and entity relationship recognition model, the vehicle fault diagnosis model, and the fault repair strategy generation model;
[0138] S1-7-2: Send the metadata to all OBD systems connected to the cloud data center;
[0139] S1-7-3: Based on the OBD system, reconstruct according to the metadata to obtain a reconstructed data structure conversion model, a reconstructed vehicle fault knowledge graph, a reconstructed named entity and entity relationship recognition model, a reconstructed vehicle fault diagnosis model, and a reconstructed fault repair strategy generation model;
[0140] S2: The OBD system collects real-time OBD data of the current vehicle, and uses the data structure conversion model to convert the real-time OBD data to obtain converted real-time OBD data, including the following steps:
[0141] S2-1: The OBD system collects real-time OBD data of the current vehicle, and inputs the real-time OBD data into the data structure conversion model;
[0142] S2-2: Use the sequence feature extraction module of the data structure conversion model to extract real-time OBD data sequence features of the real-time OBD data;
[0143] S2-3: According to the real-time OBD data sequence features, use the generator of the data structure conversion module of the data structure conversion model to generate corresponding converted real-time OBD data;
[0144] The converted real-time OBD data is converted into graph structure data, including a plurality of nodes and edges between the nodes, wherein the nodes include parameter nodes of engine-related data (engine speed, engine temperature, fuel pressure, air flow, ignition time, knock sensor data), parameter nodes of emission control system data (oxygen sensor data, nitrogen oxide sensor data, catalytic converter efficiency, particulate filter status, exhaust gas recirculation system status), parameter nodes of vehicle status data (vehicle speed, wheel speed, vehicle acceleration, brake system status), the attributes of the nodes are corresponding parameter values, and the edges are relationships between the nodes, such as engine speed-engine temperature edges, engine-related data-fuel pressure edges, and the like;
[0145] S3: The OBD system uses a named entity and entity relationship recognition model to map the converted real-time OBD data according to the vehicle fault knowledge graph, and obtains mapped real-time OBD data, including the following steps:
[0146] S3-1: The OBD system uses a semantic feature extraction module of the named entity and entity relationship recognition model to extract real-time semantic features of the converted real-time OBD data;
[0147] The real-time semantic features are semantic features of the parameter nodes, which are generally parameter name semantic features;
[0148] S3-2: According to the real-time semantic features of the converted real-time OBD data, a named entity recognition module of the named entity and entity relationship recognition model is used to perform named entity recognition, and a plurality of data named entities are obtained;
[0149] S3-3: The similarity between each data named entity and a plurality of knowledge named entities of the vehicle fault knowledge graph is obtained, and the knowledge named entity with the highest similarity is taken as the first target knowledge named entity of the data named entity;
[0150] S3-4: A plurality of knowledge entity relationships of the first target knowledge named entity are taken as a plurality of target knowledge entity relationships of the data named entity, and the knowledge named entities on the other side of the target knowledge entity relationships are taken as a plurality of second target knowledge named entities of the data named entity;
[0151] S3-5: According to the first target knowledge named entity, the plurality of target knowledge entity relationships, and the plurality of second target knowledge named entities of each data named entity, the real-time OBD data is mapped, and the mapped real-time OBD data is obtained;
[0152] S4: The OBD system uses a vehicle fault diagnosis model to perform vehicle fault diagnosis according to the mapped real-time OBD data, and obtains real-time vehicle fault diagnosis results, including the following steps:
[0153] S4-1: OBD system, input the mapped real-time OBD data into the vehicle fault diagnosis model;
[0154] S4-2: using the graph structure feature extraction module of the vehicle fault diagnosis model, extract the real-time graph structure features of the mapped real-time OBD data;
[0155] S4-3: according to the real-time graph structure features, using the vehicle fault diagnosis module of the vehicle fault diagnosis model, vehicle fault diagnosis is carried out, and real-time vehicle fault diagnosis results are obtained;
[0156] The real-time vehicle fault diagnosis result includes real-time fault code (when the vehicle has a problem, the electronic control unit will record the corresponding fault code, which is usually presented in the form of a combination of letters and numbers), real-time fault description information (each fault code has a corresponding detailed description, which explains the specific content of the fault, for example, P0123 may indicate that the engine coolant temperature sensor circuit range / performance problem), real-time fault severity prediction result (the fault code indicates its severity, some minor problems may only cause the warning light to light up, while other critical errors, such as engine overheating, may directly affect driving safety), real-time fault prediction location (the fault diagnosis result indicates the specific location of the fault, such as the engine, transmission, sensor or actuator, etc.), real-time warning and alarm information (OBD system can also provide warning and alarm information, such as battery high temperature alarm, single battery high voltage alarm, insulation alarm, etc.);
[0157] S5: OBD system, according to the real-time vehicle fault diagnosis result, using the fault repair strategy generation model, fault repair strategy generation is carried out, and real-time fault repair strategy is obtained, including the following steps:
[0158] S5-1: analyze the real-time vehicle fault diagnosis result to obtain a plurality of real-time vehicle fault states, and update the state space of the agent of the fault repair strategy generation module in the fault repair strategy generation model according to the plurality of real-time vehicle fault states to obtain an updated state space;
[0159] S5-2: randomly extract a plurality of historical fault repair strategy generation experiences from the experience replay pool of the fault repair strategy generation module, and generate a plurality of possible fault repair actions according to the plurality of historical fault repair strategy generation experiences;
[0160] S5-3: update the action space of the agent of the fault repair strategy generation module according to the plurality of possible fault repair actions to obtain an updated action space;
[0161] S5-4: Select a real-time objective function in the objective function set of the fault repair strategy generation module, and based on the real-time objective function, use the agent to control the policy network to generate a probability distribution of all possible fault repair actions in the updated action space corresponding to each real-time vehicle fault state in the updated state space;
[0162] S5-5: Take the possible fault repair action with the highest probability distribution in the updated action space as the execution fault repair action corresponding to the real-time vehicle fault state;
[0163] S5-6: Integrate the execution fault repair actions of all real-time vehicle fault states in the updated state space to obtain a real-time fault repair strategy;
[0164] The real-time fault repair strategy includes a real-time fault isolation decision (when a fault is detected, the OBD system will first attempt to isolate the fault to prevent it from affecting other systems or components, which may include shutting down certain functions or subsystems to avoid fault propagation), a real-time fault repair decision (based on the fault diagnosis result, the OBD system will provide specific repair decisions, which may include replacing faulty components, adjusting system parameters, or performing other necessary maintenance operations), a real-time alarm and notification decision (the OBD system will notify the driver or maintenance personnel of the fault diagnosis and repair recommendations in real time so that they can take timely action, such as displaying warning information on the vehicle instrument panel, sending repair recommendations to the driver's mobile phone, etc.).
[0165] The application discloses a vehicle fault diagnosis method based on OBD data, which constructs a data structure conversion model to uniformly process OBD data of different vehicle models and manufacturers, ensures the consistency of the data structure, and improves the universality of the OBD system; converts the OBD data of the sequence structure into a graph structure, enhances the representation ability of the OBD data for deep information, adopts a vehicle fault knowledge graph and a named entity and entity relationship recognition model for knowledge mapping, improves the information comprehensiveness of the OBD data, and constructs a vehicle fault diagnosis model, combines various algorithms and rules, improves the generalization ability and robustness of the model, reduces misdiagnosis and missed diagnosis, and improves the fault diagnosis accuracy; the fault repair strategy generation model realizes the automatic generation of the repair strategy, improves the efficiency and optimality of the strategy generation, and provides high-value reference and prompts for the driver or maintenance personnel.
[0166] The application is not limited to the above-mentioned optional embodiments, and anyone can derive other various forms of products under the inspiration of the application. The above-mentioned specific embodiments should not be understood as limiting the protection scope of the application, and the protection scope of the application should be defined by the claims, and the specification can be used to explain the claims.
Claims
1. A vehicle fault diagnosis method based on OBD data, characterized in that: It comprises the following steps: The cloud data center builds a data structure conversion model, a vehicle fault knowledge graph, a named entity and entity relationship recognition model, a vehicle fault diagnosis model, and a fault repair strategy generation model, and deploys them to all OBD systems; The named entity and entity relationship recognition model is built based on a BERT-CRF-SVM algorithm, and comprises a semantic feature extraction module built based on a BERT algorithm, a named entity recognition module built based on a CRF algorithm, and an entity relationship recognition module built based on a SVM algorithm connected in sequence; The data structure conversion model is built based on an LSTM-cGAN algorithm, and comprises a sequence feature extraction module built based on an LSTM algorithm and a data structure conversion module built based on a cGAN algorithm connected in sequence, wherein the data structure conversion module comprises a generator and a discriminator connected in sequence, and both the generator and the discriminator are connected with the sequence feature extraction module; The vehicle fault diagnosis model is built based on a GAT-Droput-MLP algorithm, and comprises a graph structure feature extraction module built based on a GAT-Droput algorithm and a vehicle fault diagnosis module built based on an MLP algorithm; The fault repair strategy generation model is built based on a MOGRPO-FFWA algorithm, and comprises a fault repair strategy generation module built based on a MOGRPO algorithm and a network parameter optimization module built based on a FFWA algorithm connected in sequence, wherein the fault repair strategy generation module comprises a target function set, an experience replay pool, a policy network, and an agent, the agent is connected with the target function set, the experience replay pool, and the policy network respectively, and the policy network is connected with the network parameter optimization module; The OBD system collects real-time OBD data of the current vehicle, and uses the data structure conversion model to convert the data structure of the real-time OBD data to obtain converted real-time OBD data; The OBD system uses the named entity and entity relationship recognition model to map the converted real-time OBD data based on the vehicle fault knowledge graph to obtain mapped real-time OBD data; The OBD system uses the vehicle fault diagnosis model to diagnose vehicle faults based on the mapped real-time OBD data to obtain real-time vehicle fault diagnosis results, comprising the following steps: The OBD system inputs the mapped real-time OBD data into the vehicle fault diagnosis model; The OBD system uses the graph structure feature extraction module of the vehicle fault diagnosis model to extract real-time graph structure features of the mapped real-time OBD data; The OBD system uses the vehicle fault diagnosis module of the vehicle fault diagnosis model to diagnose vehicle faults based on the real-time graph structure features to obtain real-time vehicle fault diagnosis results; The OBD system uses the fault repair strategy generation model to generate a fault repair strategy based on the real-time vehicle fault diagnosis results to obtain a real-time fault repair strategy, comprising the following steps: The real-time vehicle fault diagnosis results are analyzed to obtain a plurality of real-time vehicle fault states, and the state space of the agent of the fault repair strategy generation module in the fault repair strategy generation model is updated according to the plurality of real-time vehicle fault states to obtain an updated state space; A plurality of historical fault repair strategy generation experiences are randomly extracted from the experience replay pool of the fault repair strategy generation module, and a plurality of possible fault repair actions are generated according to the plurality of historical fault repair strategy generation experiences; The action space of the agent of the fault repair strategy generation module is updated according to the plurality of possible fault repair actions to obtain an updated action space; A real-time target function is selected from the target function set of the fault repair strategy generation module, and the probability distribution of all possible fault repair actions in the updated action space corresponding to each real-time vehicle fault state in the updated state space is generated by using the agent to control the policy network based on the real-time target function; The possible fault repair action with the highest probability distribution in the updated action space is taken as the execution fault repair action corresponding to the real-time vehicle fault state; The execution fault repair actions of all real-time vehicle fault states in the updated state space are integrated to obtain a real-time fault repair strategy. The real-time fault repair strategy includes a real-time fault isolation decision, a real-time fault repair decision, and a real-time alarm and notification decision.
2. The vehicle fault diagnosis method based on OBD data according to claim 1, characterized in that: The cloud data center constructs a data structure conversion model, a vehicle fault knowledge graph, a named entity and entity relationship recognition model, a vehicle fault diagnosis model, and a fault repair strategy generation model, and deploys them to all OBD systems, including the following steps: The cloud data center collects a plurality of historical OBD data and a plurality of historical vehicle fault knowledge, and pre-processes them to obtain a plurality of pre-processed historical OBD data and a plurality of pre-processed vehicle fault knowledge; The data structure conversion is performed on the plurality of pre-processed historical OBD data to obtain a plurality of converted historical OBD data; According to the plurality of pre-processed vehicle fault knowledge, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained; According to the plurality of pre-processed historical OBD data and the corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm; According to the plurality of converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated; According to the plurality of historical vehicle fault diagnosis results, a fault repair strategy generation model is constructed using a reinforcement learning algorithm, and a plurality of historical fault repair strategy generation experiences are generated; The data structure conversion model, the vehicle fault knowledge graph, the named entity and entity relationship recognition model, the vehicle fault diagnosis model, and the fault repair strategy generation model are deployed to all OBD systems.
3. The vehicle fault diagnosis method based on OBD data according to claim 2, characterized in that: According to the plurality of pre-processed vehicle fault knowledge, a named entity and entity relationship recognition model is constructed using a natural language processing algorithm, and a vehicle fault knowledge graph is obtained, including the following steps: An initial named entity and entity relationship recognition model is constructed using a BERT-CRF-SVM algorithm; According to a plurality of pre-processed vehicle fault knowledge, the initial named entity and entity relationship recognition model is optimized and trained to obtain a final named entity and entity relationship recognition model, and a plurality of knowledge named entities and a plurality of knowledge entity relationships are generated; According to a plurality of knowledge named entities and a plurality of knowledge entity relationships, a knowledge graph is constructed to obtain a vehicle fault knowledge graph.
4. The vehicle fault diagnosis method based on OBD data according to claim 3, characterized in that: According to a plurality of pre-processed historical OBD data and corresponding converted historical OBD data, a data structure conversion model is constructed using a deep learning algorithm, including the following steps: An initial data structure conversion model is constructed using an LSTM-cGAN algorithm; the initial data structure conversion model includes an initial sequence feature extraction module and an initial data structure conversion module; According to a first loss function of an initial generator and a second loss function of an initial discriminator in the initial data structure conversion module, a comprehensive loss function is obtained; According to a plurality of pre-processed historical OBD data, the initial sequence feature extraction module is trained and optimized to obtain a final sequence feature extraction module, and a plurality of historical OBD data sequence features are generated; According to a plurality of historical OBD data sequence features, the initial generator is trained and optimized to obtain an optimized generator, and a plurality of converted generated OBD data are generated; According to a plurality of converted historical OBD data and corresponding converted generated OBD data sequences, the initial discriminator is trained and optimized to obtain an optimized discriminator, and a plurality of historical discrimination results are generated; According to the converted generated OBD data of each historical OBD data and the corresponding historical discrimination result, a real-time comprehensive loss value in the training and optimization process is obtained using the comprehensive loss function; If the real-time comprehensive loss value is less than the loss value threshold, the final generator and the final discriminator are output, and the final data structure conversion module is obtained according to the final generator and the final discriminator; The final sequence feature extraction module and the final data structure conversion module are integrated to obtain the final data structure conversion model.
5. The method of diagnosing vehicle faults based on OBD data according to claim 4, characterized in that: According to a plurality of converted historical OBD data, a vehicle fault diagnosis model is constructed using a deep learning algorithm, and a plurality of historical vehicle fault diagnosis results are generated, including the following steps: An initial vehicle fault diagnosis model is constructed using a GAT-Droput-MLP algorithm; the initial vehicle fault diagnosis model includes an initial graph structure feature extraction module and an initial vehicle fault diagnosis module; According to a plurality of converted historical OBD data, the initial graph structure feature extraction module is trained and optimized, and in the training and optimization process, the initial graph structure feature extraction module is pruned using a Droput algorithm to obtain a final graph structure feature extraction module, and a plurality of historical graph structure features are generated; According to a plurality of historical graph structure features, the initial vehicle fault diagnosis module is trained and optimized to obtain a final vehicle fault diagnosis module, and a plurality of historical vehicle fault diagnosis results are generated; The final graph structure feature extraction module and the final vehicle fault diagnosis module are integrated to obtain the final vehicle fault diagnosis model.
6. The method for diagnosing vehicle faults based on OBD data according to claim 5, characterized in that: According to a plurality of historical vehicle fault diagnosis results, using a reinforcement learning algorithm, a fault repair strategy generation model is constructed, and a plurality of historical fault repair strategy generation experiences are generated, including the following steps: Using the MOGRPO-FFWA algorithm, an initial fault repair strategy generation model is constructed, and the initial fault repair strategy generation model includes an initial fault repair strategy generation module and a network parameter optimization module; Using the network parameter optimization module, the initial network parameters of the initial strategy network of the initial fault repair strategy generation module are optimized to minimize the prediction error as the optimization target, and an optimized strategy network is obtained; The initial fault repair strategy generation module with the optimized strategy network is set with a target function set and an experience replay pool, and the agent is set with an action space and a state space, and the fault repair strategy generation problem is used as the simulation environment of the initial fault repair strategy generation module; Based on any target function in the target function set, the initial fault repair strategy generation module is optimized and trained according to the historical vehicle fault diagnosis results, and a final fault repair strategy generation module is obtained, and a plurality of historical fault repair strategy generation experiences are generated; The plurality of historical fault repair strategy generation experiences are stored in the experience replay pool of the final fault repair strategy generation module, and the final fault repair strategy generation module and the network parameter optimization module are integrated to obtain the final fault repair strategy generation model.
Citation Information
Patent Citations
Multi-mode fusion vehicle fault diagnosis method and system based on big data
CN114879632A
Vehicle fault reasoning method based on knowledge graph
CN115700512A
Vehicle fault diagnosis method, device, equipment, storage medium and program product
CN118938851A