CN109101010B - Automobile fault diagnosis method and related equipment - Google Patents

Automobile fault diagnosis method and related equipment Download PDF

Info

Publication number
CN109101010B
CN109101010B CN201811157510.4A CN201811157510A CN109101010B CN 109101010 B CN109101010 B CN 109101010B CN 201811157510 A CN201811157510 A CN 201811157510A CN 109101010 B CN109101010 B CN 109101010B
Authority
CN
China
Prior art keywords
fault
sequence
data
fault classification
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811157510.4A
Other languages
Chinese (zh)
Other versions
CN109101010A (en
Inventor
刘均
刘新
邓思超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201811157510.4A priority Critical patent/CN109101010B/en
Publication of CN109101010A publication Critical patent/CN109101010A/en
Application granted granted Critical
Publication of CN109101010B publication Critical patent/CN109101010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0243Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults model based detection method, e.g. first-principles knowledge model
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Abstract

The application provides an automobile fault diagnosis method and related equipment. The method comprises the following steps: acquiring data to be detected at fixed time intervals to form a data sequence to be detected, wherein the data to be detected is automobile fault data; coding the data sequence to be detected to obtain an observation sequence; inputting the observation sequence into a fault classification model, and outputting a fault classification sequence; and obtaining the automobile fault diagnosis result according to the fault classification sequence.

Description

Automobile fault diagnosis method and related equipment
Technical Field
The application relates to the field of computers, in particular to an automobile fault diagnosis method and related equipment.
Background
With the continuous development of the automobile industry, microcomputer control systems are increasingly applied to automobile electronic modules, and the performances of safety, reliability, power, economy, environmental protection and the like of automobiles are greatly improved. Meanwhile, with the application of various sensors and actuators, the electronic structure of the automobile is increasingly complex, and the automobile fault diagnosis and elimination are increasingly difficult.
Generally, after a maintenance person obtains a diagnostic instrument to obtain an automobile fault code and a system data stream, the maintenance person refers to a standard maintenance manual through the fault code to diagnose the automobile fault. For a complex system such as an automobile, a module which displays that an abnormal sensor is not specified by the sensor may be in fault, and a maintenance worker often needs to judge which module is in fault through experience, so that a lot of time is consumed in the process, and the accuracy and efficiency of maintenance of the automobile maintenance worker cannot be guaranteed.
Disclosure of Invention
The application provides an automobile fault diagnosis method and related equipment, which can be used for rapidly positioning the position of an automobile fault and the fault reason.
In a first aspect, a method for diagnosing a fault of a vehicle is provided, which includes the following steps:
acquiring data to be detected at fixed time intervals to form a data sequence to be detected, wherein the data to be detected is automobile fault data;
coding the data sequence to be detected to obtain an observation sequence;
inputting the observation sequence into a fault classification model, and outputting a fault classification sequence;
and obtaining the automobile fault diagnosis result according to the fault classification sequence.
Optionally, the fault classification sequence and the observation sequence have a corresponding relationship, the fault classification sequence includes a plurality of fault classification data, and the fault classification data belongs to an automobile fault classification set.
Optionally, before acquiring the data to be detected, the method further includes:
acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation;
encoding the sample input data to obtain a sample observation sequence;
inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence;
comparing and analyzing the predicted fault classification sequence and a sample fault classification sequence, and adjusting the preset model parameters according to the comparison and analysis result;
and repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model.
Optionally, after obtaining the vehicle fault diagnosis result, the method further includes:
under the condition that the received diagnosis result is correct, storing the data to be detected and the fault classification sequence as sample incremental data;
and adjusting the parameters of the fault classification model according to the sample incremental data to obtain an updated fault classification model.
Optionally, after obtaining the vehicle fault diagnosis result, the method further includes:
and acquiring a related maintenance scheme or a contact way of a maintenance worker according to the diagnosis result.
In a second aspect, there is provided a vehicle failure diagnosis apparatus, comprising an acquisition unit, a coding unit, a classification unit, and a diagnosis unit,
the acquisition unit is used for acquiring data to be detected at fixed time intervals to form a data sequence to be detected, and the data to be detected is automobile fault data;
the coding unit is used for coding the data sequence to be detected to obtain an observation sequence;
the classification unit is used for inputting the observation sequence into a fault classification model and outputting a fault classification sequence;
and the diagnosis unit is used for obtaining an automobile fault diagnosis result according to the fault classification sequence.
Optionally, the fault classification sequence and the observation sequence have a corresponding relationship, the fault classification sequence includes a plurality of fault classification data, and the fault classification data belongs to an automobile fault classification set.
Optionally, the apparatus further comprises a model building unit,
the model establishing unit is used for acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation;
the model establishing unit is further used for encoding the sample input data to obtain a sample observation sequence;
the model establishing unit is also used for inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence;
the model establishing unit is also used for comparing and analyzing the predicted fault classification sequence and the sample fault classification sequence and adjusting the preset model parameters according to the comparison and analysis result;
the model establishing unit is further used for repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model.
In a third aspect, a server is provided, which includes a processor, an input device, an output device, and a memory, where the memory is used to store a computer program that supports a terminal to execute the above method, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect.
In a fourth aspect, there is provided a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
According to the method, data to be detected are obtained at fixed time intervals to form a data sequence to be detected, the data sequence to be detected is coded to obtain an observation sequence, the observation sequence is input into a fault classification model, and the fault classification sequence is output, so that an automobile fault diagnosis result is obtained according to the fault classification sequence. By the scheme, the automobile fault data are input into the fault classification model to obtain the diagnosis result, so that the aim of diagnosing the automobile fault accurately in real time is fulfilled, and the efficiency and the accuracy of maintenance of automobile maintenance personnel are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a vehicle fault diagnosis method provided by the present application.
FIG. 2 is a schematic structural diagram of a hidden Markov model in a vehicle fault diagnosis method provided by the present application;
FIG. 3 is a schematic diagram illustrating a recursion process of hidden Markov model intermediate variables in the vehicle fault diagnosis method provided by the present application;
FIG. 4 is a schematic structural diagram of a vehicle fault diagnosis device provided by the present application;
fig. 5 is a schematic structural diagram of an apparatus provided in the present application.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings by way of specific embodiments. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted in different instances or may be replaced by other methods. In some instances, certain operations related to the present application have not been shown or described in the specification, in order not to obscure the core portions of the present application with excessive description. It is not necessary for those skilled in the art to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the field.
It will be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is to be understood that the terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only, and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The method and the device for diagnosing the automobile fault in the embodiment of the application can be applied to a plurality of fields, for example, automobile repair factories, automobile rental companies and other companies related to automobile repair services, can also be applied to automobile repair schools, training centers and the like as teaching guidance tools, can also be installed in private automobiles as private automobile repair guidance aids and the like, and are not limited in detail herein. .
Fig. 1 is a schematic flow chart of a method for diagnosing a vehicle fault according to an embodiment of the present application. As can be seen from fig. 1, the method for diagnosing a vehicle fault of the present embodiment includes the following steps:
s101: and acquiring the data to be detected at fixed time intervals to form a data sequence to be detected.
In the embodiment of the present application, the data to be detected may be vehicle fault data. The vehicle fault data may be fault codes, and it should be understood that the fault codes refer to fault information in the form of digital codes stored in a special area inside a module, such as a Random Access Memory (RAM) or a Keep current Memory (KAM), after a self-diagnosis module in a System Control Unit (ECU), a Pulse Code Modulation (PCM) or an anti-lock Brake System (ABS) detects a fault of a System component when an on-board Electronic Control System such as an engine or a transmission fails; the data to be detected can also be data acquired from an On-Board Diagnostic (OBD) system, the OBD system can monitor the running condition of the engine and the working state of the tail gas aftertreatment system at any time, and once the situation that the emission exceeds the standard is found, a warning can be sent out immediately. When the system has a fault, a fault Lamp (MIL) or a Check Engine (Check Engine) warning Lamp is on, and meanwhile, the OBD system stores fault information into a memory; the data to be detected may also be data acquired by a Controller Area Network (CAN) bus. For example: vehicle brand, vehicle type, fuel consumption, etc., it being understood that the above examples are illustrative only and not intended to be limiting.
In the embodiment of the application, the data to be detected is acquired at fixed time intervals, for example, the data to be detected is acquired every 1 second or 2 seconds, so that the purposes of acquiring each data stream of an automobile in real time and diagnosing automobile faults in real time are achieved. Wherein, the data sequence to be detected is a sequence which is arranged in sequence according to the acquisition time.
S102: and coding the data sequence to be detected to obtain an observation sequence.
In the embodiment of the present application, the observation sequence includes a plurality of digital codes, where each digital code is obtained by encoding data to be detected according to a preset encoding rule. For example: the data to be detected obtained in the first second is recorded as a digital code v after being coded1And the data to be detected obtained in the second is coded and recorded as a digital code v2And the m second obtained data to be detected is coded and recorded as digital code vmThus, the obtained observation sequence is V ═ V1,v2,v3,…,vm}。
In this embodiment of the present application, the encoding of the data to be detected may be to encode each data to be detected in the sequence into a digital code according to different system classifications, where the digital code after encoding of the data to be detected may be divided into three parts, which are a fault code, OBD data, and CAN bus data, for example: the coded digital code of each data to be detected is a 1000-dimensional digital code, the first 100 dimensions are fault codes, the middle 500 dimensions are OBD digital codes, and the last 400 dimensions are CAN bus digital codes. The fault codes are classified according to modules, for example, the fault codes are classified according to systems such as a brake system, a cooling system, an engine system and the like, wherein the brake system comprises n fault codes, the cooling system comprises m fault codes, and the engine system comprises k fault codes. One of the fault codes in the braking system may be encoded as a ═ a (a)1,a2,…,an) A vector of (a)1Represents a braking system; a is2To anMay represent a component or sub-system of the braking system, wherein a1To anThe failure can be represented by 1 and the normal by 0, respectively. Similarly, the fault code data of the cooling system and the fault code data of the engine system can refer to the coding mode of the fault code of the brake system, and the coding mode is not detailed here. It should be understood that the above encoding manner of the fault code is only an example and is not a specific limitation.
S103: inputting the observation sequence into a fault classification model, and outputting a fault classification sequence;
in the examples of the present application, theThe fault classification sequence and the observation sequence have a corresponding relation, the fault classification sequence comprises a plurality of fault classification data, and the fault classification data belong to an automobile fault classification set. It will be appreciated that the number of elements in the observation sequence is the same as the number of elements in the fault classification sequence. For example: will V be { V ═ V1,v2,v3,…,vmInputting the observation sequence of the fault into the fault classification model, and outputting the fault classification sequence of Q ═ Q { (Q)1,q2,q3,…,qm}。
In this embodiment of the present application, the fault classification model may be a pre-trained model, that is, before acquiring the data to be detected, the method further includes: : acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation; encoding the sample input data to obtain a sample observation sequence; inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence; comparing and analyzing the predicted fault classification sequence and a sample fault classification sequence, and adjusting the preset model parameters according to the comparison and analysis result; and repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model. It is understood that the error is the minimum value, which may mean that the predicted fault classification sequence is completely consistent with the sample fault classification sequence, or that the error rate of the predicted fault classification sequence and the sample fault classification sequence is less than or equal to a preset threshold, for example: when the error rate of 1 ten thousand predicted fault classification sequences and sample fault classification sequences is 0.1%, the preset model at the moment can be determined as a fault diagnosis model.
Alternatively, the fault classification Model may be a Hidden Markov Model (HMM), where the HMM is a statistical Model that establishes a time series by using a Hidden Markov chain and an explicit random function set, and thus, using the HMM as the fault classification Model requires defining an explicit HMM ModelFig. 2 shows a state transition diagram of an HMM, where Q ═ Q { [ Q ] }1,q2,q3,…,qmThe' is a fault classification sequence, namely a hidden state sequence of the HMM; v ═ V1,v2,v3,…,vmThe observation sequence, namely the display state sequence of the HMM; a ═ aij]n×nTo convert the matrix, aij=P(it+1=qj|t=qi) (i ═ 1,2, …, n; j ═ 1,2, …, n), that is, aijRefers to being in state q from time tiUnder the condition of (1), transition to the state q at the time t +1jThe probability of (d); b ═ Bj(k)]n×mTo observe a matrix, wherein bj(k)=P(ot=vk|it=qj) (k is 1,2, …, m, j is 1,2, …, n), that is, b isj(k) Refers to being at q at time tjUnder the conditions of (1), the display state v is generatedkThe probability of (c). Thus, the HMM may be represented as λ ═ (a, B, pi), where the initial state probability vector pi ═ pi (pi)i),πi=P(i1=qi) (i-1, 2, …, n), that is, piiWhen the time t is equal to 1, the hidden state is in the state qiThe probability of (c). A, B and pi can be obtained by training the corresponding relation between a large amount of sample input data and a sample hidden state sequence.
Alternatively, the main parameters A, B, pi in the HMM may be obtained by a Baum-welch Algorithm, and the specific steps of the Baum-welch Algorithm may be divided into initialization model parameters, E-step calculation and M-step calculation, where the E-step calculation and the M-step calculation are calculations based on an Expectation Maximization (EM) Algorithm.
Optionally, initializing model parameter indices initializes the HMM to λ(0)=(A(0),B(0)(0)) The sample display state sequence is O ═ O1,o2,o3,…,omThe hidden state sequence of samples is I ═ I1,i2,i3,…,im};
OptionallyThe step E is mainly to calculate the intermediate variable gammat(i) And xit(i, j) wherein γt(i)=P(xt=qiI.e., the sample appearance state sequence of the model λ is O, γ)t(i) Refers to a hidden state q at time ttIs SiProbability, intermediate variable gammat(i) Is shown in formula (1),
Figure BDA0001819248340000081
intermediate variable xit(i,j)=P(xt=qi,xt+1=qjI.e. the sample of the model λ exhibits a state sequence O, the hidden state q at time tiIs SiXi, xit(i, j) refers to the hidden state q at time t +1t+1Is SjThe probability of (c). According to the definition of forward probability and backward probability, the intermediate variable xitThe formula of (i, j) can be recurred to formula (2), and the process of recurrence of formula (2) is clearly shown in fig. 3.
Figure BDA0001819248340000082
Optionally, the M-step calculation is to solve the model λ mainly according to intermediate variables solved by the E-step calculation(0)=(A(0),B(0)(0)) The solution formula is as follows:
Figure BDA0001819248340000083
Figure BDA0001819248340000084
πi=γ1(i)(5)
and E and M steps are iterated until convergence, so that an HMM fault classification model lambda is obtained(0)=(A(0),B(0)(0))。
Optionally, the HMM obtains an HMM fault classification model after training using the sample data. When the explicit state sequence is input, a corresponding implicit state sequence can be obtained using a Viterbi (Viterbi) algorithm. The Viterbi algorithm solves the optimal sequence using the following method: starting from the start time t equal to 1, the hidden state at the time t is recursively calculated as qtUntil the hidden state q with time T ═ T is solved for the maximum probability of (c)TIs SiMaximum probability and obtaining the hidden state S at the moment Tj(ii) a And then backtracking forwards to obtain the states at other moments. Therefore, the specific steps of the Viterbi algorithm can be divided into initialization variables, recursive computation, and path backtracking.
Alternatively, initializing a variable refers to defining a Viterbi variable δ1(i) And psi1(i) Wherein, delta1(i)=πibi(o1),i=1,2,…,n,ψ1(i)=0,i=1,2..,n。
Alternatively, recursive computation refers to deriving a recursive relational formula such as formula (6) and formula (7) from the Viterbi variables, where T is 2 ≦ T, and i is 1 ≦ N.
Figure BDA0001819248340000091
Figure BDA0001819248340000092
The next hidden state can be deduced in turn according to the formula (6) and the formula (7), and the delta of the final time T is calculatedT(i) Then, the optimal hidden state sequence Q can be obtained*={q1 *,q2 *,q3 *,…,qT *Probability of and hidden state q at the final instantT *Wherein, in the step (A),
Figure BDA0001819248340000093
Figure BDA0001819248340000094
optionally, the path backtracking means further backtracking and solving the state of each previous time according to the obtained probability of the optimal hidden state sequence and the hidden state at the final time by using a formula (10), so as to obtain a hidden state sequence Q*={q1 *,q2 *,q3 *,…,qT *And (c) the step of (c) in which,
Figure BDA0001819248340000095
s104: and obtaining the automobile fault diagnosis result according to the fault classification sequence.
In this embodiment, the fault classification sequence includes a plurality of fault classification data, the fault classification data belongs to an automobile fault classification set, each fault classification data in the automobile fault classification set corresponds to an automobile fault state class in a one-to-one manner, so that a fault diagnosis result of an automobile can be determined according to the fault classification sequence, for example, according to an output fault classification sequence Q ═ Q1,q2,q3,…,qmThe automobile fault state sequence { cooling system fault, air conditioner fault, cooling system fault, …, cooling system fault } can be obtained, and the automobile fault diagnosis result is obtained as the cooling system fault according to the fault state sequence, it should be understood that the above examples are merely illustrative and are not limited to specific examples.
In the embodiment of the application, after the diagnosis result is obtained, under the condition that the received diagnosis result is correct, the data to be detected and the fault classification sequence are stored as sample incremental data; and adjusting the parameters of the fault classification model according to the sample incremental data to obtain an updated fault classification model. That is, the fault classification model is continuously updated. It should be understood that the update of the fault classification model may be performed periodically or aperiodically. When the sample increment data reach a preset number, adjusting the fault classification model parameters according to the sample increment data to obtain an updated fault classification model; or when sample incremental data is received, adjusting the fault classification model parameters according to the sample incremental data to obtain an updated fault classification model.
In the embodiment of the application, after the diagnosis result is obtained, the related maintenance scheme or the contact way of the maintenance personnel can be obtained according to the diagnosis result. For example, after the diagnosis result is obtained as the engine fault, the equipment is networked to obtain the related maintenance scheme of the engine fault, wherein the scheme can be one or more; or, recommend one or more nearby service site addresses and contact details of the relevant service personnel, etc., and are not specifically limited herein.
According to the method, the data to be detected is obtained at fixed time intervals to form a data sequence to be detected, the data sequence to be detected is coded to obtain an observation sequence, the observation sequence is input into a fault classification model, and the fault classification sequence is output, so that the automobile fault diagnosis result is obtained according to the fault classification sequence. By the scheme, the automobile fault data are input into the fault classification model to obtain the diagnosis result, so that the aim of diagnosing the automobile fault accurately in real time is fulfilled, and the efficiency and the accuracy of maintenance of automobile maintenance personnel are improved.
Fig. 4 is a vehicle fault diagnosis apparatus provided in an embodiment of the present application, and the apparatus includes an obtaining unit 410, an encoding unit 420, a classifying unit 430, a diagnosing unit 440, a model building unit 450, and an updating unit 460.
The obtaining unit 410 is configured to obtain data to be detected at fixed time intervals to form a data sequence to be detected.
In this embodiment of the application, the data to be detected acquired by the acquiring unit 410 may be vehicle fault data. The vehicle fault data may be fault codes, and it should be understood that the fault codes refer to fault information in the form of digital codes stored in a special area inside a module, such as a Random Access Memory (RAM) or a Keep current Memory (KAM), after a self-diagnosis module in a System Control Unit (ECU), a Pulse Code Modulation (PCM) or an anti-lock Brake System (ABS) detects a fault of a System component when an on-board Electronic Control System such as an engine or a transmission fails; the data to be detected can also be data acquired from an On-Board Diagnostic (OBD) system, the OBD system can monitor the running condition of the engine and the working state of the tail gas aftertreatment system at any time, and once the situation that the emission exceeds the standard is found, a warning can be sent out immediately. When the system has a fault, a fault Lamp (MIL) or a Check Engine (Check Engine) warning Lamp is on, and meanwhile, the OBD system stores fault information into a memory; the data to be detected may also be data acquired by a Controller Area Network (CAN) bus. For example: vehicle brand, vehicle type, fuel consumption, etc., it being understood that the above examples are illustrative only and not intended to be limiting.
In the embodiment of the present application, the data to be detected is obtained by the obtaining unit 410 at a fixed time interval, for example, every 1 second or 2 seconds, so as to achieve the purposes of obtaining each data stream of an automobile in real time and diagnosing an automobile fault in real time. Wherein, the data sequence to be detected is a sequence which is arranged in sequence according to the acquisition time.
The encoding unit 420 is configured to encode the data sequence to be detected to obtain an observation sequence.
In the embodiment of the present application, the observation sequence obtained by encoding by the encoding unit 420 includes a plurality of digital codes, where each digital code is data obtained by encoding data to be detected according to a preset encoding rule. For example: the data to be detected obtained in the first second is recorded as a digital code v after being coded1And the data to be detected obtained in the second is coded and recorded as a digital code v2And the m second obtained data to be detected is coded and recorded as digital code vmThus, the obtained observation sequence is V ═ V1,v2,v3,…,vm}。
In this embodiment of the application, the encoding unit 420 may encode the data to be detected by classifying and encoding each data to be detected in the sequence into a digital code according to different systems, where the digital code after encoding the data to be detected may be divided into three parts, which are a fault code, OBD data, and CAN bus data, for example: the coded digital code of each data to be detected is a 1000-dimensional digital code, the first 100 dimensions are fault codes, the middle 500 dimensions are OBD digital codes, and the last 400 dimensions are CAN bus digital codes. The fault codes are classified according to modules, for example, the fault codes are classified according to systems such as a brake system, a cooling system, an engine system and the like, wherein the brake system comprises n fault codes, the cooling system comprises m fault codes, and the engine system comprises k fault codes. One of the fault codes in the braking system may be encoded as a ═ a (a)1,a2,…,an) A vector of (a)1Represents a braking system; a is2To anMay represent a component or sub-system of the braking system, wherein a1To anThe failure can be represented by 1 and the normal by 0, respectively. Similarly, the fault code data of the cooling system and the fault code data of the engine system can refer to the coding mode of the fault code of the brake system, and the coding mode is not detailed here. It should be understood that the above encoding manner of the fault code is only an example and is not a specific limitation.
The classification unit 430 is configured to input the observation sequence into a fault classification model, and output a fault classification sequence.
In this embodiment of the application, there is a corresponding relationship between the fault classification sequence output by the classification unit 430 and the observation sequence, the fault classification sequence includes a plurality of fault classification data, and the fault classification data belongs to an automobile fault classification set. It will be appreciated that the number of elements in the observation sequence is the same as the number of elements in the fault classification sequence. For example: will V be { V ═ V1,v2,v3,…,vmAfter the observation sequence is input into the fault classification model, the output fault classification sequence is Q ═ Q }1,q2,q3,…,qm}。
In this embodiment of the present application, the fault classification model in the classification unit 430 may be a model trained by the model building unit 450 in advance, and the method for the model building unit 450 to train the fault classification model may be: acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation; encoding the sample input data to obtain a sample observation sequence; inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence; comparing and analyzing the predicted fault classification sequence and a sample fault classification sequence, and adjusting the preset model parameters according to the comparison and analysis result; and repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model. It is understood that the error is the minimum value, which may mean that the predicted fault classification sequence is completely consistent with the sample fault classification sequence, or that the error rate of the predicted fault classification sequence and the sample fault classification sequence is less than or equal to a preset threshold, for example: when the error rate of 1 ten thousand predicted fault classification sequences and sample fault classification sequences is 0.1%, the preset model at the moment can be determined as a fault diagnosis model.
Alternatively, the fault classification Model may be a Hidden Markov Model (HMM), where the HMM is a statistical Model that establishes a time series by using a Hidden Markov chain and an explicit random function set, and it should be understood that using the HMM as the fault classification Model requires defining an explicit state series and an implicit state series of the HMM Model, and thus, the observation series is set as the explicit state series and the fault classification series is set as the implicit state series. Fig. 2 shows a state transition diagram of an HMM, where Q ═ Q1,q2,q3,…,qmThe' is a fault classification sequence, namely a hidden state sequence of the HMM; v ═ V1,v2,v3,…,vmThe observation sequence, namely the display state sequence of the HMM; a ═ aij]n×nTo turn toChange matrix, aij=P(it+1=qj|t=qi) (i ═ 1,2, …, n; j ═ 1,2, …, n), that is, aijRefers to being in state q from time tiUnder the condition of (1), transition to the state q at the time t +1jThe probability of (d); b ═ Bj(k)]n×mTo observe a matrix, wherein bj(k)=P(ot=vk|it=qj) (k ═ 1,2, … m; j ═ 1,2, …, n), that is, bj(k) Refers to being at q at time tjUnder the conditions of (1), the display state v is generatedkThe probability of (c). Thus, the HMM may be represented as λ ═ (a, B, pi), where the initial state probability vector pi ═ pi (pi)i),πi=P(i1=qi) (i-1, 2, …, n), that is, piiWhen the time t is equal to 1, the hidden state is in the state qiThe probability of (c). A, B and pi can be obtained by training the corresponding relation between a large amount of sample input data and a sample hidden state sequence.
Alternatively, the main parameters A, B, pi in the HMM may be obtained by a Baum-welch Algorithm, and the specific steps of the Baum-welch Algorithm may be divided into initialization model parameters, E-step calculation and M-step calculation, where the E-step calculation and the M-step calculation are calculations based on an Expectation Maximization (EM) Algorithm.
Optionally, the HMM obtains an HMM fault classification model after training using the sample data. When the explicit state sequence is input, a corresponding implicit state sequence can be obtained using a Viterbi (Viterbi) algorithm. The Viterbi algorithm solves the optimal sequence using the following method: starting from the start time t equal to 1, the hidden state at the time t is recursively calculated as qtUntil the hidden state q with time T ═ T is solved for the maximum probability of (c)TIs SiMaximum probability and obtaining the hidden state S at the moment Tj(ii) a And then backtracking forwards to obtain the states at other moments. Therefore, the specific steps of the Viterbi algorithm can be divided into initialization variables, recursive computation, and path backtracking.
The diagnosis unit 440 is configured to obtain a vehicle fault diagnosis result according to the fault classification sequence.
In this embodiment, the fault classification sequence includes a plurality of fault classification data, the fault classification data belongs to an automobile fault classification set, each fault classification data in the automobile fault classification set corresponds to an automobile fault state class, and therefore, the diagnosis unit 440 may determine the fault diagnosis result of the automobile according to the fault classification sequence, for example, according to the output fault classification sequence Q ═ Q1,q2,q3,…,qmAnd obtaining a vehicle fault state sequence { cooling system fault, air conditioner fault, cooling system fault, …, cooling system fault }, and obtaining a vehicle fault diagnosis result as the cooling system fault according to the fault state sequence, wherein the above examples are only for illustration and are not limited specifically.
In this embodiment of the application, after the diagnosis unit 440 obtains the diagnosis result, the updating unit 460 stores the data to be detected and the fault classification sequence as sample incremental data when receiving that the diagnosis result is correct; and adjusting the parameters of the fault classification model according to the sample incremental data to obtain an updated fault classification model. That is, the fault classification model is continuously updated. It should be understood that the update of the fault classification model may be performed periodically or aperiodically. When the sample increment data reach a preset number, adjusting the fault classification model parameters according to the sample increment data to obtain an updated fault classification model; or when sample incremental data is received, adjusting the fault classification model parameters according to the sample incremental data to obtain an updated fault classification model.
In this embodiment of the application, after the diagnosis unit 440 obtains the diagnosis result, the related maintenance scheme or the contact information of the maintenance personnel can be obtained according to the diagnosis result. For example, after the diagnosis result is obtained as the engine fault, the equipment is networked to obtain the related maintenance scheme of the engine fault, wherein the scheme can be one or more; or, recommend one or more nearby service site addresses and contact details of the relevant service personnel, etc., and are not specifically limited herein.
In the method, an acquisition unit acquires data to be detected at fixed time intervals to form a data sequence to be detected, a coding unit codes the data sequence to be detected to obtain an observation sequence, a classification unit inputs the observation sequence into a fault classification model and outputs the fault classification sequence, so that an automobile fault diagnosis result is obtained according to the fault classification sequence. By the scheme, the automobile fault data are input into the fault classification model to obtain the diagnosis result, so that the aim of diagnosing the automobile fault accurately in real time is fulfilled, and the efficiency and the accuracy of maintenance of automobile maintenance personnel are improved.
Fig. 5 is a schematic block diagram of a server according to an embodiment of the present application. As shown in fig. 5, the server in this embodiment may include: one or more processors 501; one or more input devices 502, one or more output devices 503, and memory 504. The processor 501, the input device 502, the output device 503, and the memory 504 are connected by a bus 505. The memory 502 is used to store a computer program comprising program instructions and the processor 501 is used to execute the program instructions stored by the memory 502.
In the embodiment of the present Application, the Processor 501 may be a Central Processing Unit (CPU), and may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 502 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 503 may include a display (LCD, etc.), a speaker, etc.
Memory 504 may include volatile memory, such as Random Access Memory (RAM); the Memory may also include a non-volatile Memory, such as a Read-Only Memory (ROM), a Flash Memory, a Hard Disk Drive (HDD), or a Solid-State Drive (SSD), and may also include a combination of the above types of memories. The memory 504 may be centralized storage or distributed storage, and is not limited in particular here. It will be appreciated that the memory 504 is used to store computer programs such as: computer program instructions, and the like. In the present embodiment, the memory 504 may provide instructions and data to the processor 501.
In a specific implementation, the processor 501, the input device 502, the output device 503, the memory 504, and the bus 505 described in this embodiment of the present application may execute an implementation manner described in any embodiment of the method for diagnosing an automobile fault provided in this embodiment of the present application, and details are not described here again.
In another embodiment of the present application, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and the program instructions, when executed by a processor, implement the implementation manner described in any embodiment of the vehicle fault diagnosis method provided in the embodiment of the present application, and are not described herein again.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the server, the device and the unit described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed server, apparatus and method may be implemented in other ways. For example, the above-described server embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for diagnosing a fault of a vehicle, comprising:
acquiring data to be detected at fixed time intervals to form a data sequence to be detected, wherein the data to be detected is automobile fault data;
coding the data sequence to be detected to obtain an observation sequence, wherein the observation sequence comprises digital codes with multiple dimensions, the digital codes with multiple dimensions comprise fault codes with x dimensions, OBD data with y dimensions and CAN bus data with z dimensions, the fault code with each dimension in the x dimensions corresponds to the fault condition of one module, and x, y and z are positive integers;
inputting the observation sequence into a fault classification model, and outputting a fault classification sequence;
and obtaining the automobile fault diagnosis result according to the fault classification sequence.
2. The method of claim 1,
the fault classification sequence and the observation sequence have a corresponding relation, the fault classification sequence comprises a plurality of fault classification data, and the fault classification data belong to an automobile fault classification set.
3. The method according to claim 1 or 2, characterized in that before acquiring the data to be detected, the method further comprises:
acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation;
encoding the sample input data to obtain a sample observation sequence;
inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence;
comparing and analyzing the predicted fault classification sequence and a sample fault classification sequence, and adjusting the preset model parameters according to the comparison and analysis result;
and repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model.
4. The method of claim 1, wherein after obtaining the vehicle fault diagnosis result, the method further comprises:
under the condition that the received diagnosis result is correct, storing the data to be detected and the fault classification sequence as sample incremental data;
and adjusting the parameters of the fault classification model according to the sample incremental data to obtain an updated fault classification model.
5. The method of claim 1, wherein after obtaining the vehicle fault diagnosis result, the method further comprises:
and acquiring a related maintenance scheme or a contact way of a maintenance worker according to the diagnosis result.
6. The automobile fault diagnosis device is characterized by comprising an acquisition unit, a coding unit, a classification unit and a diagnosis unit,
the acquisition unit is used for acquiring data to be detected at fixed time intervals to form a data sequence to be detected, and the data to be detected is automobile fault data;
the encoding unit is used for encoding the data sequence to be detected to obtain an observation sequence, wherein the observation sequence comprises digital codes of multiple dimensions, the digital codes of the multiple dimensions comprise fault codes of x dimensions, OBD data of y dimensions and CAN bus data of z dimensions, the fault code of each dimension of the x dimensions corresponds to the fault condition of one module, and x, y and z are positive integers;
the classification unit is used for inputting the observation sequence into a fault classification model and outputting a fault classification sequence;
and the diagnosis unit is used for obtaining an automobile fault diagnosis result according to the fault classification sequence.
7. The apparatus of claim 6,
the fault classification sequence and the observation sequence have a corresponding relation, the fault classification sequence comprises a plurality of fault classification data, and the fault classification data belong to an automobile fault classification set.
8. The apparatus according to any of the claims 6 to 7, characterized in that the apparatus further comprises a model building unit,
the model establishing unit is used for acquiring sample data, wherein the sample data comprises sample input data and a sample fault classification sequence, and the sample input data and the sample fault classification sequence have a corresponding relation;
the model establishing unit is further used for encoding the sample input data to obtain a sample observation sequence;
the model establishing unit is also used for inputting the sample observation sequence into a preset model to obtain a predicted fault classification sequence;
the model establishing unit is also used for comparing and analyzing the predicted fault classification sequence and the sample fault classification sequence and adjusting the preset model parameters according to the comparison and analysis result;
the model establishing unit is further used for repeating the steps until the error between the predicted fault classification sequence and the sample fault classification sequence is the minimum value, and determining the preset model with the error between the predicted fault classification sequence and the sample fault classification sequence being the minimum value as a fault classification model.
9. A failure diagnosis device characterized by comprising: the system comprises a processor and a memory, wherein the processor is interconnected with the memory through a line, and program instructions are stored in the memory; the program instructions, when executed by the processor, cause the processor to perform the method of any of claims 1 to 5.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, the computer program comprising program instructions which, when executed by a processor of a fault diagnosis device, cause the processor to carry out the method of any one of claims 1 to 5.
CN201811157510.4A 2018-09-30 2018-09-30 Automobile fault diagnosis method and related equipment Active CN109101010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811157510.4A CN109101010B (en) 2018-09-30 2018-09-30 Automobile fault diagnosis method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811157510.4A CN109101010B (en) 2018-09-30 2018-09-30 Automobile fault diagnosis method and related equipment

Publications (2)

Publication Number Publication Date
CN109101010A CN109101010A (en) 2018-12-28
CN109101010B true CN109101010B (en) 2021-06-11

Family

ID=64867997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811157510.4A Active CN109101010B (en) 2018-09-30 2018-09-30 Automobile fault diagnosis method and related equipment

Country Status (1)

Country Link
CN (1) CN109101010B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108919776B (en) * 2018-06-19 2021-04-09 深圳市元征科技股份有限公司 Fault assessment method and terminal
CN111846095B (en) * 2019-05-14 2022-05-17 北京骑胜科技有限公司 Fault detection device, electric power-assisted vehicle and fault detection method
CN111795835A (en) * 2020-06-30 2020-10-20 北京汽车研究总院有限公司 Vehicle monitoring method and device and vehicle-mounted equipment
CN111597122B (en) * 2020-07-24 2020-11-06 四川新网银行股份有限公司 Software fault injection method based on historical defect data mining
CN113590767B (en) * 2021-09-28 2022-01-07 西安热工研究院有限公司 Multilingual alarm information category judgment method, system, equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060023627A1 (en) * 2004-08-02 2006-02-02 Anil Villait Computing system redundancy and fault tolerance
KR101106952B1 (en) * 2009-09-07 2012-01-20 주식회사 파워웰 Apparatus and operating method of dc inverter resistance spot welding connected with network for intelligence control and recording medium
CN201681298U (en) * 2010-05-25 2010-12-22 金龙联合汽车工业(苏州)有限公司 On-board remote data acquisition system based on CAN bus
CN103487749B (en) * 2013-09-18 2016-04-13 国家电网公司 Mechanical state of high-voltage circuit breaker on-line monitoring and diagnosis system and method
CN103969067B (en) * 2014-04-01 2016-04-06 中北大学 A kind of automatic load system method for diagnosing faults based on Generalized Morphological
CN104536435B (en) * 2014-12-18 2017-06-30 中国科学院电工研究所 A kind of line control system network inline diagnosis method
CN106803101B (en) * 2016-12-30 2019-11-22 北京交通大学 Odometer method for diagnosing faults based on Hidden Markov Model
CN107817106B (en) * 2017-10-11 2019-08-02 温州大学 Fault Diagnosis of Roller Bearings based on Bayes's residual transform-singular value decomposition-Gaussian Mixture Hidden Markov Model frame

Also Published As

Publication number Publication date
CN109101010A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109101010B (en) Automobile fault diagnosis method and related equipment
CN109163913B (en) Automobile fault diagnosis method and related equipment
CN111294341B (en) Vehicle-mounted system intrusion detection method based on self-encoder and recurrent neural network
CN110224160B (en) Fault diagnosis method for fuel cell system
CN109581871B (en) Industrial control system intrusion detection method of immune countermeasure sample
KR20190107080A (en) Cloud-based vehicle fault diagnosis method, apparatus and system
CN112131272A (en) Detection method, device, equipment and storage medium for multi-element KPI time sequence
US11061911B2 (en) Driving data analyzer
CN114124472B (en) Vehicle-mounted network CAN bus intrusion detection method and system based on GMM-HMM
CN110309537B (en) Intelligent health prediction method and system for aircraft
US20200066062A1 (en) Method and system for vehicle analysis
CN109270921A (en) A kind of method for diagnosing faults and device
JP2023052390A (en) Determination device, determination program, determination method, and neural network model generation method
CN112906139A (en) Vehicle fault risk assessment method and device, electronic equipment and storage medium
CN112606779B (en) Automobile fault early warning method and electronic equipment
CN114900331A (en) Vehicle-mounted CAN bus intrusion detection method based on CAN message characteristics
CN114633776A (en) Global monitoring method and system for intelligent train and electronic equipment
CN109639526A (en) Network Data Control method, apparatus, equipment and medium
US7136779B2 (en) Method for simplified real-time diagnoses using adaptive modeling
KR101505975B1 (en) Method and system for fault dignosis of engine
CN108682148B (en) Non-internet vehicle-connected state estimation method based on machine learning in hybrid traffic state
Arief et al. Certifiable evaluation for autonomous vehicle perception systems using deep importance sampling (deep is)
CN111798591B (en) Method and device for determining total mileage of vehicle, computer equipment and storage medium
Li et al. Inaccurate prediction is not always bad: open-world driver recognition via error analysis
CN112990329A (en) System abnormity diagnosis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant