A fault diagnosis method and device of a vehicle, an electronic device, and a storage medium
By parsing vehicle message data and database files, fault signal values are extracted for diagnosis, solving the problems of offline diagnosis and insufficient flexibility in existing technologies, and realizing efficient and simple vehicle fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GAC AION NEW ENERGY AUTOMOBILE CO LTD
- Filing Date
- 2024-11-12
- Publication Date
- 2026-05-29
AI Technical Summary
Existing vehicle fault diagnosis technologies cannot perform diagnosis offline, lack flexibility, cannot read all faults, have a limited number of remote monitoring signals, cannot analyze fault data that has not been uploaded, and require operation by professional personnel.
By acquiring vehicle message data, parsing database files and fault information tables, extracting fault signal values, and querying fault information tables, offline fault diagnosis can be achieved, supporting operation by non-professionals.
It improves the efficiency and flexibility of vehicle fault diagnosis, supports fault diagnosis in offline mode, requires no professional skills from operators, has a simple and effective diagnostic method, and provides reliability assistance.
Smart Images

Figure CN119439967B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle diagnostic technology, and more specifically, to a vehicle fault diagnosis method, apparatus, electronic device, and storage medium. Background Technology
[0002] Vehicle diagnostics refers to the process of detecting, analyzing, and judging a vehicle through a series of technical means, thereby locating the source and cause of the fault. There are many common methods for diagnosing vehicle faults.
[0003] However, existing vehicle fault diagnosis methods have several drawbacks. For example, they can only read faults when connected to the Electronic Control Unit (ECU) and cannot process offline data. If a new model needs to be diagnosed, a new diagnostic tool needs to be developed, which has a long development cycle and lacks flexibility. They cannot read all faults. They have certain requirements for communication between the vehicle and the monitoring system, making them unsuitable for non-professionals to diagnose a single vehicle. The number of remotely monitored signals is limited, and the cause of the fault cannot be analyzed for fault data that has not been uploaded. Summary of the Invention
[0004] The purpose of this application is to provide a vehicle fault diagnosis method, device, electronic device, and storage medium, which can improve the efficiency and flexibility of vehicle fault diagnosis, support fault diagnosis in offline mode, require no professional skills from operators, and make the diagnosis method simpler and more effective, thus providing reliability assistance for vehicle development.
[0005] In a first aspect, embodiments of this application provide a method for diagnosing vehicle faults, the method comprising:
[0006] Obtain the vehicle's first message data;
[0007] Obtain the database file and fault information table of the vehicle;
[0008] The first message data is parsed according to the database file to obtain the second message data;
[0009] Obtain the fault signal value from the second message data;
[0010] Diagnostic information is obtained by querying the fault information table based on the fault signal value.
[0011] In the above implementation process, the first message data is parsed according to the database file to obtain the fault signal value, and then the fault signal value is used to query the fault. This can improve the efficiency and flexibility of vehicle fault diagnosis, and support fault diagnosis in offline mode. It does not require professional operators, and the diagnosis method is simpler and more effective, which can provide reliability assistance for vehicle development.
[0012] Furthermore, the step of obtaining the vehicle's database file and fault information table includes:
[0013] Obtain the vehicle model name;
[0014] Obtain the file path corresponding to the vehicle model project name;
[0015] Extract the database file and the fault information table corresponding to the file path.
[0016] In the above implementation process, the corresponding file path can be accurately located based on the vehicle model project name. Then, the database file and fault information table corresponding to the file path can be obtained, which can improve the accuracy of fault location and reduce the location error.
[0017] Further, the step of parsing the first message data according to the database file to obtain the second message data includes:
[0018] The database file is processed according to the first function to obtain the message period of the fault signal;
[0019] Based on the message period of the fault signal, extract the message data containing the fault signal from the first message data to obtain the third message data;
[0020] The second message data is obtained by filtering the third message data.
[0021] In the above implementation process, the message period of the fault signal is obtained after processing the database file. The message data containing the fault signal can be extracted based on the message period of the fault signal. The message data can be accurately distinguished, improving the efficiency of fault diagnosis and facilitating timely fault diagnosis.
[0022] Further, the step of filtering based on the third message data to obtain the second message data includes:
[0023] Extract the message length corresponding to each message frame from the third message data;
[0024] Determine whether the message length meets the length threshold;
[0025] If not, the message frame is determined to be an erroneous frame;
[0026] If so, confirm that the message frame is a normal frame;
[0027] The second message data is obtained by filtering out erroneous frames in the third message data.
[0028] In the above implementation process, error frames and normal frames in the message frame are distinguished according to the message length of the message frame. At the same time, the error frames are filtered to obtain the second message data containing only normal frames. This can improve the processing speed of the second message data, reduce the error of the second message, and provide data support for subsequent fault diagnosis.
[0029] Further, the step of obtaining the fault signal value in the second message data includes:
[0030] The second message data is parsed using the second function to obtain signal data;
[0031] The signal data is iterated to obtain the signal value and signal name of the fault signal;
[0032] The signal value is analyzed to obtain the fault signal value.
[0033] In the above implementation process, the second message data is parsed to obtain signal data, and then the signal data is processed to enhance the processing capability of message data, refine the diagnosis of faults, and improve the accuracy of fault diagnosis.
[0034] Further, the step of parsing the signal value to obtain the fault signal value includes:
[0035] The signal value is converted into a lower signal value according to the third function to obtain the converted signal value.
[0036] Remove the prefix information from the converted signal value to obtain the signal value without the prefix information;
[0037] The fault signal value is obtained by iterating through the signal values after removing the prefix information.
[0038] In the above implementation process, the signal value is sequentially converted to a lower signal value and the prefix information is removed to obtain the fault signal value. This can improve the accuracy of the fault signal value and reduce the error caused by the signal value during the fault diagnosis process.
[0039] Further, the step of querying the fault information table based on the fault signal value to obtain diagnostic information includes:
[0040] Extract the byte bit information of the fault signal value;
[0041] The diagnostic information is obtained by querying the corresponding fault information in the fault information table based on the byte bit information.
[0042] In the above implementation process, by querying the corresponding fault information in the fault information table based on the byte information of the fault signal value, the specific type and location of the fault can be clearly identified, and the fault can be accurately diagnosed to obtain diagnostic information.
[0043] Secondly, embodiments of this application also provide a vehicle fault diagnosis device, the device comprising:
[0044] The acquisition module is used to acquire the vehicle's first message data;
[0045] The data acquisition module is used to acquire the vehicle's database file and fault information table; it is also used to acquire the fault signal values in the second message data.
[0046] The parsing module is used to parse the first message data according to the database file to obtain the second message data;
[0047] The query module is used to query the fault information table based on the fault signal value to obtain diagnostic information.
[0048] In the above implementation process, the first message data is parsed according to the database file to obtain the fault signal value, and then the fault signal value is used to query the fault. This can improve the efficiency and flexibility of vehicle fault diagnosis, and support fault diagnosis in offline mode. It does not require professional operators, and the diagnosis method is simpler and more effective, which can provide reliability assistance for vehicle development.
[0049] Thirdly, an electronic device provided in this application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any of the first aspects.
[0050] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in any of the first aspects.
[0051] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform the method described in any of the first aspects.
[0052] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0053] It can be implemented in accordance with the contents of the specification. The preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the range. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A schematic flowchart illustrating a vehicle fault diagnosis method provided in an embodiment of this application;
[0056] Figure 2 A schematic diagram illustrating the structural composition of a vehicle fault diagnosis device provided in an embodiment of this application;
[0057] Figure 3 This is a schematic diagram of the structural composition of the electronic device provided in the embodiments of this application. Detailed Implementation
[0058] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0059] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0060] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0061] Example 1
[0062] Figure 1 This is a flowchart illustrating the vehicle fault diagnosis method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes:
[0063] S1, Obtain the first message data of the vehicle;
[0064] S2, obtain the vehicle's database file and fault information table;
[0065] S3, parse the first message data according to the database file to obtain the second message data;
[0066] S4, obtain the fault signal value in the second message data;
[0067] S5: Query the fault information table based on the fault signal value to obtain diagnostic information.
[0068] In the above implementation process, the first message data is parsed according to the database file to obtain the fault signal value, and then the fault signal value is used to query the fault. This can improve the efficiency and flexibility of vehicle fault diagnosis, and support fault diagnosis in offline mode. It does not require professional operators, and the diagnosis method is simpler and more effective, which can provide reliability assistance for vehicle development.
[0069] The embodiments of this application are implemented in Python and run on a terminal. They can obtain online message data of various systems in the vehicle through the Controller Area Network (CAN) device, and can also perform fault diagnosis on existing offline message data.
[0070] In S1, this embodiment of the application collects vehicle messages (first message data) through a CANoe device, and uses the can.interface.Bus() method in Python to configure the interface. The configuration information includes interface, channel, bitrate, and CAN / CANFD, etc. After the interface configuration is completed, the vehicle messages are received through can.interface.Bus().recv().
[0071] In S2, this embodiment of the application reads the paths to the stored database file and fault information table through an Excel spreadsheet. The Excel spreadsheet records all vehicle model items and their corresponding database file and fault information table paths. The `pandas.read_excel()` method in Python is used to read all vehicle model item names from the Excel spreadsheet. When the user selects a corresponding item, the corresponding database file and fault information table are retrieved based on the relative positions of the cells.
[0072] For newly added vehicle model items, users only need to update the Excel spreadsheet. Each time the spreadsheet is opened, it will be traversed to obtain the required files. Therefore, when the vehicle model items change, there is no need to perform fault diagnosis again.
[0073] Furthermore, S2 includes:
[0074] Get the vehicle model name;
[0075] Obtain the file path corresponding to the vehicle model project name;
[0076] Extract the database file and fault information table corresponding to the file path.
[0077] In the above implementation process, the corresponding file path can be accurately located based on the vehicle model project name. Then, the database file and fault information table corresponding to the file path can be obtained, which can improve the accuracy of fault location and reduce the location error.
[0078] Furthermore, S3 includes:
[0079] The database file is processed according to the first function to obtain the message period of the fault signal;
[0080] Based on the message period of the fault signal, extract the message data containing the fault signal from the first message data to obtain the third message data;
[0081] The second message data is obtained by filtering the third message data.
[0082] In the above implementation process, the message period of the fault signal is obtained after processing the database file. The message data containing the fault signal can be extracted based on the message period of the fault signal. The message data can be accurately distinguished, improving the efficiency of fault diagnosis and facilitating timely fault diagnosis.
[0083] In this embodiment of the application, the first message data is parsed through a database file to obtain data such as the ID, signal name, and signal value of the fault signals of each system.
[0084] Since the size of the message data directly affects the diagnostic speed, the shorter the message acquisition time, the faster the diagnostic speed. In this embodiment, the first function cantools.db.load_file() is used to process the database file to obtain the message period of all fault signals. Based on the principle that all fault signals are acquired and the data volume is as small as possible, the maximum period of the message data is the message acquisition time.
[0085] Further, the step of filtering based on the third message data to obtain the second message data includes:
[0086] Extract the message length corresponding to each message frame from the third message data;
[0087] Determine if the message length meets the length threshold;
[0088] If not, the message frame is determined to be an erroneous frame;
[0089] If so, confirm that the message frame is a normal frame;
[0090] Filter out erroneous frames in the third message data to obtain the second message data.
[0091] In the above implementation process, error frames and normal frames in the message frame are distinguished according to the message length of the message frame. At the same time, the error frames are filtered to obtain the second message data containing only normal frames. This can improve the processing speed of the second message data, reduce the error of the second message, and provide data support for subsequent fault diagnosis.
[0092] Considering the possibility of erroneous frames within the third message data, and since the message length of erroneous frames generally differs from that of normal frames, erroneous frames can be filtered out based on their message length. Alternatively, other attributes can be used to filter out erroneous frames to prevent problems from occurring after the program runs.
[0093] Furthermore, S4 includes:
[0094] The second message data is parsed using the second function to obtain the signal data;
[0095] The signal data is iterated to obtain the signal value and signal name of the fault signal;
[0096] The signal value is analyzed to obtain the fault signal value.
[0097] In the above implementation process, the second message data is parsed to obtain signal data, and then the signal data is processed to enhance the processing capability of message data, refine the diagnosis of faults, and improve the accuracy of fault diagnosis.
[0098] After obtaining the second message data, it is necessary to parse it. The database file contains information such as message ID, signal name, length, start bit, precision, and offset. The second function (cantools' decode_message() method) is used to parse the second message data to obtain the signal data.
[0099] The vehicle's CAN network contains many signals. When performing fault diagnosis, only the signals related to the fault need to be extracted. Therefore, it is necessary to traverse the acquired signal data to extract the signal names and values related to the fault.
[0100] Further, the steps of parsing the signal values to obtain the fault signal values include:
[0101] The signal value is converted to a lower signal value using the third function to obtain the converted signal value.
[0102] Remove the prefix information from the converted signal value to obtain the signal value without the prefix information;
[0103] The fault signal values are obtained by iterating through the signal values after removing the prefix information.
[0104] In the above implementation process, the signal value is sequentially converted to a lower signal value and the prefix information is removed to obtain the fault signal value. This can improve the accuracy of the fault signal value and reduce the error caused by the signal value during the fault diagnosis process.
[0105] A signal value stores multiple fault information. Data processing is required for the signal value. First, the third function (bin() function) is used to reduce the signal value, converting it from decimal to binary. Then, the '0b' prefix is removed from the binary string. The binary string is then traversed to find all bytes set to 1, thus obtaining the fault signal value.
[0106] Furthermore, S5 includes:
[0107] Extract the byte bit information of the fault signal value;
[0108] Based on the byte information, the corresponding fault information is retrieved from the fault information table to obtain diagnostic information.
[0109] In the above implementation process, by querying the corresponding fault information in the fault information table based on the byte information of the fault signal value, the specific type and location of the fault can be clearly identified, and the fault can be accurately diagnosed to obtain diagnostic information.
[0110] Based on the byte bit information, query the corresponding fault information in the fault information table.
[0111] Optionally, this application can implement the user interface display based on PyQt. The interface uses Label controls to identify objects on the form, such as "Project" and "Database File Path". A ComboBox drop-down control is used to display all projects after Excel is traversed, providing the user with project selection. A LineEdit single-line text box control displays the path of the database file and fault information table for easy user verification and is also used to input collected message data. A PushButton button control is used to call relevant slot functions after the motor to obtain fault information. A TextEdit multi-line text box displays fault information.
[0112] When the fault diagnosis is online, you can select the corresponding vehicle model through the UI interface and click on online diagnosis to display the motor fault information.
[0113] When the fault diagnosis is performed offline, select the vehicle model item and then select the local message data to display all fault information.
[0114] Example 2
[0115] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functional and technical effects, a vehicle fault diagnosis device is provided below, such as... Figure 2 As shown, the device includes:
[0116] Module 1 is used to acquire the vehicle's first message data;
[0117] Data acquisition module 2 is used to acquire the vehicle's database file and fault information table; it is also used to acquire the fault signal values in the second message data.
[0118] Parsing module 3 is used to parse the first message data according to the database file to obtain the second message data;
[0119] The query module 4 is used to query the fault information table based on the fault signal value to obtain diagnostic information.
[0120] In the above implementation process, the first message data is parsed according to the database file to obtain the fault signal value, and then the fault signal value is used to query the fault. This can improve the efficiency and flexibility of vehicle fault diagnosis, and support fault diagnosis in offline mode. It does not require professional operators, and the diagnosis method is simpler and more effective, which can provide reliability assistance for vehicle development.
[0121] Furthermore, data acquisition module 2 is also used for:
[0122] Get the vehicle model name;
[0123] Obtain the file path corresponding to the vehicle model project name;
[0124] Extract the database file and fault information table corresponding to the file path.
[0125] In the above implementation process, the corresponding file path can be accurately located based on the vehicle model project name. Then, the database file and fault information table corresponding to the file path can be obtained, which can improve the accuracy of fault location and reduce the location error.
[0126] Furthermore, parsing module 3 is also used for:
[0127] The database file is processed according to the first function to obtain the message period of the fault signal;
[0128] Based on the message period of the fault signal, extract the message data containing the fault signal from the first message data to obtain the third message data;
[0129] The second message data is obtained by filtering the third message data.
[0130] In the above implementation process, the message period of the fault signal is obtained after processing the database file. The message data containing the fault signal can be extracted based on the message period of the fault signal. The message data can be accurately distinguished, improving the efficiency of fault diagnosis and facilitating timely fault diagnosis.
[0131] Furthermore, parsing module 3 is also used for:
[0132] Extract the message length corresponding to each message frame from the third message data;
[0133] Determine if the message length meets the length threshold;
[0134] If not, the message frame is determined to be an erroneous frame;
[0135] If so, confirm that the message frame is a normal frame;
[0136] Filter out erroneous frames in the third message data to obtain the second message data.
[0137] In the above implementation process, error frames and normal frames in the message frame are distinguished according to the message length of the message frame. At the same time, the error frames are filtered to obtain the second message data containing only normal frames. This can improve the processing speed of the second message data, reduce the error of the second message, and provide data support for subsequent fault diagnosis.
[0138] Furthermore, the data acquisition module 2 is also used for:
[0139] The second message data is parsed using the second function to obtain the signal data;
[0140] The signal data is iterated to obtain the signal value and signal name of the fault signal;
[0141] The signal value is analyzed to obtain the fault signal value.
[0142] In the above implementation process, the second message data is parsed to obtain signal data, and then the signal data is processed to enhance the processing capability of message data, refine the diagnosis of faults, and improve the accuracy of fault diagnosis.
[0143] Furthermore, the data acquisition module 2 is also used for:
[0144] The signal value is converted to a lower signal value using the third function to obtain the converted signal value.
[0145] Remove the prefix information from the converted signal value to obtain the signal value without the prefix information;
[0146] The fault signal values are obtained by iterating through the signal values after removing the prefix information.
[0147] In the above implementation process, the signal value is sequentially converted to a lower signal value and the prefix information is removed to obtain the fault signal value. This can improve the accuracy of the fault signal value and reduce the error caused by the signal value during the fault diagnosis process.
[0148] Furthermore, query module 4 is also used for:
[0149] Extract the byte bit information of the fault signal value;
[0150] Based on the byte information, the corresponding fault information is retrieved from the fault information table to obtain diagnostic information.
[0151] In the above implementation process, by querying the corresponding fault information in the fault information table based on the byte information of the fault signal value, the specific type and location of the fault can be clearly identified, and the fault can be accurately diagnosed to obtain diagnostic information.
[0152] The vehicle fault diagnosis device described above can implement the method of Embodiment 1. The options in Embodiment 1 are also applicable to this embodiment, and will not be described in detail here.
[0153] The remaining contents of this embodiment can be referred to the contents of Embodiment 1 above, and will not be repeated in this embodiment.
[0154] Example 3
[0155] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the vehicle fault diagnosis method of Embodiment 1.
[0156] Alternatively, the aforementioned electronic device may be a server.
[0157] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the structural composition of an electronic device provided in an embodiment of this application. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. The communication bus 34 is used to enable direct communication between these components. In this embodiment, the communication interface 32 is used for signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0158] The processor 31 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor, or the processor 31 can be any conventional processor.
[0159] The memory 33 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 31, the device can perform the aforementioned operations. Figure 1 The various steps involved in the method implementation examples.
[0160] Optionally, the electronic device may also include a storage controller and an input / output unit. The memory 33, storage controller, processor 31, peripheral interface, and input / output unit are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via a communication bus 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0161] Input / output units are used to enable users to create tasks and set optional start periods or preset execution times for those tasks, facilitating user-server interaction. Input / output units can be, but are not limited to, a mouse and keyboard.
[0162] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.
[0163] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the vehicle fault diagnosis method of Embodiment 1.
[0164] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0165] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using dedicated hardware-based apparatus that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0166] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0167] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical disks.
[0168] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0169] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
[0170] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for diagnosing vehicle faults, characterized in that, The method includes: Obtain the vehicle's first message data; Obtain the database file and fault information table of the vehicle; The first message data is parsed according to the database file to obtain the second message data; Obtain the fault signal value from the second message data; Diagnostic information is obtained by querying the fault information table based on the fault signal value; The step of parsing the first message data according to the database file to obtain the second message data includes: The database file is processed according to the first function to obtain the message period of the fault signal; Based on the message period of the fault signal, extract the message data containing the fault signal from the first message data to obtain the third message data; The second message data is obtained by filtering the third message data. The step of filtering based on the third message data to obtain the second message data includes: Extract the message length corresponding to each message frame from the third message data; Determine whether the message length meets the length threshold; If not, the message frame is determined to be an erroneous frame; If so, confirm that the message frame is a normal frame; The second message data is obtained by filtering out erroneous frames in the third message data.
2. The vehicle fault diagnosis method according to claim 1, characterized in that, The steps of obtaining the database file and fault information table of the vehicle include: Obtain the vehicle model name; Obtain the file path corresponding to the vehicle model project name; Extract the database file and the fault information table corresponding to the file path.
3. The vehicle fault diagnosis method according to claim 1, characterized in that, The step of obtaining the fault signal value in the second message data includes: The second message data is parsed using the second function to obtain signal data; The signal data is iterated to obtain the signal value and signal name of the fault signal; The signal value is analyzed to obtain the fault signal value.
4. The vehicle fault diagnosis method according to claim 3, characterized in that, The step of parsing the signal value to obtain the fault signal value includes: The signal value is converted into a lower signal value according to the third function to obtain the converted signal value. Remove the prefix information from the converted signal value to obtain the signal value without the prefix information; The fault signal value is obtained by iterating through the signal values after removing the prefix information.
5. The vehicle fault diagnosis method according to claim 1, characterized in that, The step of querying the fault information table based on the fault signal value to obtain diagnostic information includes: Extract the byte bit information of the fault signal value; The diagnostic information is obtained by querying the corresponding fault information in the fault information table based on the byte bit information.
6. A vehicle fault diagnosis device, characterized in that, The device includes: The acquisition module is used to acquire the vehicle's first message data; The data acquisition module is used to acquire the vehicle's database file and fault information table; it is also used to acquire the fault signal values in the second message data. The parsing module is used to parse the first message data according to the database file to obtain the second message data; The query module is used to query the fault information table based on the fault signal value to obtain diagnostic information; The parsing module is also used for: The database file is processed according to the first function to obtain the message period of the fault signal; Based on the message period of the fault signal, extract the message data containing the fault signal from the first message data to obtain the third message data; The second message data is obtained by filtering the third message data. Extract the message length corresponding to each message frame from the third message data; Determine whether the message length meets the length threshold; If not, the message frame is determined to be an erroneous frame; If so, confirm that the message frame is a normal frame; The second message data is obtained by filtering out erroneous frames in the third message data.
7. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform a vehicle fault diagnosis method according to any one of claims 1 to 5.
8. A storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the vehicle fault diagnosis method as described in any one of claims 1 to 5.