Method and device for analyzing fault data of vehicle-mounted MCU system by controller

By acquiring and analyzing the data to be parsed in the preset communication environment, the problem that the on-board MCU system and the PLC controller communication protocol are not consistent, and the accurate analysis and analysis of the fault data of the on-board MCU system is realized.

CN119575934APending Publication Date: 2025-03-07KAILONG HIGH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411703128.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the automotive industry, the communication protocol supported by the MCU microcontroller in the on-board MCU system is different from that supported by mainstream PLC controllers on the market, which makes it impossible to perform fault analysis of external PLC controllers during car fault diagnosis.

Method used

By obtaining the data to be parsed by the on-board MCU system in a preset communication environment, determining the data type based on the data to be parsed and the preset fault identifier, and determining the target fault data of the on-board MCU system using the preset data analysis method, thereby realizing effective communication between the controller and the on-board MCU system.

Benefits of technology

The accuracy of target fault data analysis is improved, and the controller can accurately and conveniently determine the fault data of the on-board MCU system in vehicle fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119575934A_ABST
    Figure CN119575934A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for analyzing fault data of a vehicle-mounted MCU (Microprogrammed Control Unit) system by a controller. The method comprises the following steps: in a preset communication environment, obtaining to-be-analyzed data sent by a vehicle-mounted MCU system; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; determining a data type corresponding to the to-be-analyzed data based on the to-be-analyzed data and a preset fault identifier; and determining target fault data corresponding to the vehicle-mounted MCU system based on the data type, the to-be-analyzed data and a preset data analysis mode. Through the technical scheme of the embodiment of the invention, effective communication between the controller and the vehicle-mounted MCU system can be realized, and the target fault data corresponding to the vehicle-mounted MCU system can be accurately and conveniently determined by utilizing the controller, so that the accuracy of target fault data analysis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method and device for a controller to analyze fault data of an on-vehicle MCU system. Background Art

[0002] PLC controllers are widely used in the field of industrial control. Its advantages are reliable and stable hardware, rich software functions, and the ability to achieve logical and high-precision control of complex systems. The MCU-based single-chip system is the core technology in intelligent management and process control in automobiles, smart instruments, medical equipment, etc. Both systems focus on their own characteristics and fields.

[0003] At present, more and more industrial equipment, such as various test equipment in laboratories, engine after-treatment systems, etc., require real-time data exchange between two controllers. In a typical application, the measurement and control equipment reads out the fault of the vehicle system so that the equipment can alarm and safety interlock.

[0004] However, in the automotive industry, the communication protocols supported by the MCU microcontroller in the vehicle-mounted MCU system are different from the communication protocols supported by the mainstream PLC controllers on the market, and data communication is impossible, resulting in the inability to perform fault analysis using an external PLC controller during vehicle fault diagnosis. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for a controller to parse fault data of an on-board MCU system, so as to realize effective communication between the controller and the on-board MCU system, and use the controller to accurately and conveniently determine target fault data corresponding to the on-board MCU system, thereby improving the accuracy of the target fault data parsing.

[0006] In a first aspect, an embodiment of the present invention provides a method for a controller to parse fault data of an on-board MCU system, comprising:

[0007] Under a preset communication environment, obtaining the data to be parsed sent by the vehicle-mounted MCU system; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system;

[0008] Based on the data to be parsed and a preset fault identifier, determining a data type corresponding to the data to be parsed;

[0009] Based on the data type, the data to be parsed and the preset data parsing method, the target fault data corresponding to the on-board MCU system is determined.

[0010] Optionally, the method also includes: the preset communication environment includes: the CAN interface of the CAN to Ethernet gateway module is connected to the CAN communication port of the vehicle-mounted MCU system; the Ethernet interface of the CAN to Ethernet gateway module is connected to the Ethernet port of the controller; the Ethernet address of the CAN to Ethernet gateway module and the Ethernet address of the controller are in the same network segment.

[0011] Optionally, the method also includes: the preset fault identifier includes: a preset single-packet identifier and a preset multi-packet identifier; if the preset single-packet identifier exists in the data to be parsed, it is determined that the data type corresponding to the data to be parsed is a single-packet fault; if the preset multi-packet identifier exists in the data to be parsed, it is determined that the data type corresponding to the data to be parsed is a multi-packet fault.

[0012] Optionally, the method further includes: if the preset single packet identifier exists in the data to be parsed, and the preset byte data after the preset single packet identifier in the data to be parsed is a non-zero number, determining that the data type corresponding to the data to be parsed is a single packet fault.

[0013] Optionally, the method also includes: if the data type is a single-packet fault, parsing the data to be parsed based on a preset data parsing method corresponding to the single-packet fault, and determining the target fault data corresponding to the vehicle-mounted MCU system; if the data type is a multi-packet fault, parsing the data to be parsed based on a preset data parsing method corresponding to the multi-packet fault, and determining the target fault data corresponding to the vehicle-mounted MCU system.

[0014] Optionally, the method further includes: selecting reference data from the data to be analyzed based on a preset data analysis method corresponding to a single-packet fault, and combining the reference data to determine target fault data corresponding to the on-board MCU system.

[0015] Optionally, the method also includes: a sending buffer, a receiving buffer, a single fault package storage area and a multiple fault package storage area are preset in the controller; wherein the receiving buffer is used to receive data sent by the vehicle-mounted MCU system; the sending buffer is used to send data to the single fault package storage area or the multiple fault package storage area; the single fault package storage area and the multiple fault package storage area are used to parse the data sent by the sending buffer and store the parsing results.

[0016] In a second aspect, an embodiment of the present invention further provides a device for a controller to parse fault data of a vehicle-mounted MCU system, the device comprising:

[0017] The module for acquiring data to be parsed is used to acquire the data to be parsed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system;

[0018] A data type determination module, used to determine the data type corresponding to the data to be parsed based on the data to be parsed and a preset fault identifier;

[0019] The target fault data determination module is used to determine the target fault data corresponding to the vehicle-mounted MCU system based on the data type, the data to be parsed and the preset data parsing method.

[0020] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0021] one or more processors;

[0022] A memory for storing one or more programs;

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for a controller to parse fault data of a vehicle-mounted MCU system as provided in any embodiment of the present invention.

[0024] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for a controller to parse fault data of a vehicle-mounted MCU system as provided in any embodiment of the present invention.

[0025] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements a method for a controller to parse fault data of a vehicle-mounted MCU system as provided in any embodiment of the present invention.

[0026] The technical solution of the embodiment of the present invention is to obtain the data to be analyzed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; based on the data to be analyzed and a preset fault identifier, the data type corresponding to the data to be analyzed is determined; based on the data type, the data to be analyzed and the preset data analysis method, the target fault data corresponding to the vehicle-mounted MCU system is determined, so that effective communication between the controller and the vehicle-mounted MCU system can be achieved, and the target fault data corresponding to the vehicle-mounted MCU system can be accurately and conveniently determined by using the controller, thereby improving the accuracy of the target fault data analysis.

[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 It is a flow chart of a method for a controller to analyze fault data of an on-vehicle MCU system provided by the first embodiment of the present invention;

[0030] Figure 2 This is an example diagram of a channel configuration involved in Embodiment 1 of the present invention;

[0031] Figure 3 is a flow chart of a method for a controller to analyze fault data of an on-vehicle MCU system provided by a second embodiment of the present invention;

[0032] Figure 4 This is an example diagram of multi-packet fault data involved in Embodiment 2 of the present invention;

[0033] Figure 5 It is a structural diagram of a device for analyzing fault data of an on-board MCU system by a controller provided in a third embodiment of the present invention;

[0034] Figure 6 It is a structural schematic diagram of an electronic device that implements the method for a controller to parse fault data of an on-vehicle MCU system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] Embodiment 1

[0038] Figure 1 A flowchart of a method for a controller to parse vehicle MCU system fault data is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the controller parses vehicle MCU system fault data. The method can be executed by a device for parsing vehicle MCU system fault data by the controller. The device for parsing vehicle MCU system fault data by the controller can be implemented in the form of hardware and / or software. The device for parsing vehicle MCU system fault data by the controller can be configured in an electronic device. Figure 1 As shown, the method includes:

[0039] S110: Under a preset communication environment, obtain the data to be parsed sent by the vehicle-mounted MCU system.

[0040] Among them, the preset communication environment is the communication environment between the pre-set controller and the vehicle-mounted MCU system. The controller may refer to a programmable logic controller (PLC), also known as a PLC controller. For example, the vehicle-mounted MCU system includes an MCU microcontroller. The MCU microcontroller in the automotive industry is generally configured with RS232 / 485 serial port communication and supports the CAN2.0 communication protocol (such as CAN2.0A and CAN2.0B standards). The mainstream PLC controllers on the market usually only support the application layer protocol CANOPEN based on the CAN protocol, but not the standard CAN2.0 protocol. The communication between the controller and the vehicle-mounted MCU system requires the use of a preset communication environment, so as to obtain the data to be parsed sent by the vehicle-mounted MCU system under the preset communication environment. The data to be parsed may refer to CAN data. A frame of CAN data contains a CAN identifier ID of 4 bytes in length and a data field of 8 bytes in length, which is a single-package file. When the data exceeds the range of one frame, such as multiple faults occurring at the same time, the data needs to be separated and multiple package files need to be sent. When multiple packages are sent, the data frames are sent continuously.

[0041] Based on the above technical solution, the preset communication environment includes: the CAN interface of the CAN to Ethernet gateway module is connected to the CAN communication port of the vehicle-mounted MCU system; the Ethernet interface of the CAN to Ethernet gateway module is connected to the Ethernet port of the controller; the Ethernet address of the CAN to Ethernet gateway module and the Ethernet address of the controller are in the same network segment.

[0042] Among them, the CAN to Ethernet gateway module can be a dedicated communication conversion module for realizing communication between the controller and the vehicle-mounted MCU system.

[0043] Specifically, the CAN interface of the CAN-to-Ethernet gateway module is pre-connected to the CAN communication port of the vehicle MCU system, and the Ethernet interface of the CAN-to-Ethernet gateway module is connected to the Ethernet port of the PLC controller through an industrial Ethernet switch. The open user communication-based sending function block "TSEND_C" can be called in the PLC controller. The receiving function block "TRCV" can also be called.

[0044] Illustratively, Table 1 gives an example of a communication configuration.

[0045] Table 1 An example of a communication configuration

[0046] CAN module Ethernet address 192.168.0.6 Port Settings Port number 1 is set to 3000 Baud rate 250K Working Mode TCPServer

[0047] Among them, refer to Table 1, set the Ethernet address of the CAN to Ethernet gateway module to be in the same network segment (192.168.0.XXX) as the PLC controller, such as 192.168.0.6. Set the port number of the channel, and the channel number in the same Ethernet cannot be the same, and set the baud rate and working mode.

[0048] For example, Figure 2 An example diagram of a channel configuration is given. Figure 2 , establish a communication connection channel in the PLC controller, and set the connection type TCP, module IP address and connection ID (decimal).

[0049] Based on the above technical solution, a sending buffer, a receiving buffer, a single fault package storage area and a multiple fault package storage area are preset in the controller; among them, the receiving buffer is used to receive data sent by the vehicle-mounted MCU system; the sending buffer is used to send data to the single fault package storage area or the multiple fault package storage area; the single fault package storage area and the multiple fault package storage area are used to parse the data sent by the sending buffer and store the parsing results.

[0050] The send buffer is predefined as a one-dimensional array CAN_SEND[0..19], with a total of 20 bytes (BYTE). The receive buffer is predefined as a one-dimensional array CAN_REC[0..19], with a total of 20 bytes (BYTE). The single fault packet storage area is predefined as a one-dimensional array S_DATA[1..8], with a total of 8 bytes (BYTE). The single fault flag bit is predefined, the Boolean value F_S, and the double integer variable SPN_S is predefined as a single packet SPN code, and the byte variable FMI_S is predefined as a single packet FMI code.

[0051] Among them, a multi-fault package storage area is predefined (the embodiment of the present invention includes 4), a one-dimensional array M_DATA[1..28], a total of 28 bytes (BYTE). A multi-fault flag is defined, a Boolean value F_M. Double integer variables SPN_M1, SPN_M2, SPN_M3, SPN_M4 are defined to correspond to 1# multi-package SPN code, 2# multi-package SPN code, 3# multi-package SPN code, 4# multi-package SPN code. Byte variables FMI_M1, FMI_M2, FMI_M3, FMI_M4 are defined to correspond to 1# multi-package FMI code, 2# multi-package FMI code, 3# multi-package FMI code, 4# multi-package FMI code.

[0052] It should be noted that the CAN data (equivalent to the data to be parsed) will update the sent data in real time during real-time communication. The embodiment of the present invention sets up a read-write buffer in advance, and sends the communication data of the vehicle-mounted MCU system to the buffer so as to parse the SPN code and FMI code according to predetermined rules.

[0053] S120: Determine a data type corresponding to the data to be analyzed based on the data to be analyzed and a preset fault identifier.

[0054] The preset fault identifier may refer to a preset fault identifier corresponding to a data type. The data type may include single-packet fault, multi-packet fault, and no fault.

[0055] Specifically, the PLC controller parses the data to be parsed, parsing the second byte CAN_REC[1] to the 13th byte CAN_REC

[12] in CAN_REC[0..19], a total of 12 bytes (BYTE) of data, and then compares it with the preset fault identifier to determine the data type corresponding to the data to be parsed.

[0056] On the basis of the above technical solution, "determining the data type corresponding to the data to be parsed based on the data to be parsed and the preset fault identifier" may include: if there is a preset single-packet identifier in the data to be parsed, then determining that the data type corresponding to the data to be parsed is a single-packet fault; if there is a preset multi-packet identifier in the data to be parsed, then determining that the data type corresponding to the data to be parsed is a multi-packet fault.

[0057] The preset fault identifier includes: a preset single-packet identifier and a preset multi-packet identifier. The preset single-packet identifier may refer to a preset fault identifier corresponding to a single-packet fault. The preset multi-packet identifier may refer to a preset fault identifier corresponding to a multi-packet fault.

[0058] Specifically, it is determined that there are 4 bytes of data from CAN_REC[1] to CAN_REC[4] in the data to be parsed CAN_REC[0..19]. If these 4 bytes are the same as the preset single-packet identifier ID, the data type corresponding to the data to be parsed is temporarily determined as a single-packet fault. If these 4 bytes are the same as the preset multi-packet identifier ID, the data type corresponding to the data to be parsed is determined as a multi-packet fault.

[0059] On the basis of the above technical solution, "if there is a preset single-packet identifier in the data to be parsed, then determining that the data type corresponding to the data to be parsed is a single-packet fault" may include: if there is a preset single-packet identifier in the data to be parsed, and the preset byte data after the preset single-packet identifier in the data to be parsed is a non-zero number, then determining that the data type corresponding to the data to be parsed is a single-packet fault.

[0060] Specifically, it is determined that there are 4 bytes of data from CAN_REC[1] to CAN_REC[4] in the data to be parsed CAN_REC[0..19]. If these 4 bytes are the same as the preset single packet identifier ID, and there is any non-zero number in the eight bytes of data from CAN_REC[5] to CAN_REC

[12] , then the data type corresponding to the data to be parsed is determined to be a single packet fault. If these 4 bytes are the same as the preset single packet identifier ID, and the eight bytes of data from CAN_REC[5] to CAN_REC

[12] are all zero, then the data type corresponding to the data to be parsed is determined to be fault-free.

[0061] S130: Determine target fault data corresponding to the vehicle-mounted MCU system based on the data type, the data to be analyzed, and the preset data analysis method.

[0062] Among them, the preset data parsing method may refer to a pre-set data parsing method or rule corresponding to the data type. The target fault data may be a pointer to the plain data obtained after specific decoding of the data to be parsed. The user can determine the fault code of the vehicle MCU system based on the target fault data. For example, the target fault data may include but is not limited to SPN code and FMI code. In the field of on-board fault diagnosis, SPN code and FMI code are two important codes. SPN (Suspect Parameter Number), suspected parameter number, is used to identify parameters that may have problems in a specific system or inside the vehicle. FMI (Failure Mode Identifier), a fault mode identifier, provides information about the detected fault mode.

[0063] Specifically, based on the data type, a target data parsing method corresponding to the data type of the data to be parsed is determined from multiple preset data parsing methods, and the data to be parsed is parsed using the target data parsing method to obtain a parsing result, and the parsing result is determined as the target fault data corresponding to the vehicle-mounted MCU system.

[0064] The technical solution of the embodiment of the present invention obtains the data to be analyzed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; based on the data to be analyzed and the preset fault identification, the data type corresponding to the data to be analyzed is determined; based on the data type, the data to be analyzed and the preset data analysis method, the target fault data corresponding to the vehicle-mounted MCU system is determined, so that effective communication between the controller and the vehicle-mounted MCU system can be achieved, and the target fault data corresponding to the vehicle-mounted MCU system can be accurately and conveniently determined by using the controller, thereby improving the accuracy of the target fault data analysis.

[0065] Embodiment 2

[0066] Figure 3 This is a flowchart of a method for a controller to parse vehicle MCU system fault data provided by the second embodiment of the present invention. Based on the above embodiment, this embodiment describes in detail the process of determining target fault data. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0067] like Figure 3 As shown, the method includes:

[0068] S310: Under a preset communication environment, obtain the data to be parsed sent by the vehicle-mounted MCU system.

[0069] The preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system.

[0070] S320: Determine a data type corresponding to the data to be parsed based on the data to be parsed and a preset fault identifier.

[0071] S330: If the data type is a single-packet fault, the data to be analyzed is analyzed based on a preset data analysis method corresponding to the single-packet fault, and target fault data corresponding to the vehicle-mounted MCU system is determined.

[0072] The target fault data may also include: SPN code, FMI code and double-shaped data.

[0073] Specifically, if the data type is a single-packet fault, the multi-packet fault flag F_M is reset, and the data in the multi-packet fault storage area M_DATA[1..28] is cleared; the single-packet fault flag F_S is set, and the data from CAN_REC[5] to CAN_REC

[12] are respectively transferred to the single-packet fault storage area S_DATA[1..8]. According to the predetermined variable calculation rule (equivalent to the preset data parsing method corresponding to the single-packet fault), the single-packet SPN code and FMI code are calculated. For example, in the embodiment of the present invention, according to the predetermined variable calculation rule, the SPN code is the third byte of the data field; the fourth byte and the fifth byte are double integer (DINT) data composed of 6 to 8 bits; the FMI code is the byte (BYTE) data composed of 1 to 5 bits of the fifth byte.

[0074] It should be noted that if the data type is no fault, the single packet fault flag F_S is reset, and the data in the single fault packet storage area S_DATA[1..8] is cleared to zero. The multiple packet fault flag F_M is reset, and the data in the multiple fault packet storage area M_DATA[1..28] is cleared to zero.

[0075] On the basis of the above technical solution, "parsing the data to be parsed based on the preset data parsing method corresponding to the single-package fault, and determining the target fault data corresponding to the vehicle-mounted MCU system" may include: selecting reference data in the data to be parsed based on the preset data parsing method corresponding to the single-package fault, and combining the reference data to determine the target fault data corresponding to the vehicle-mounted MCU system.

[0076] The reference data may refer to data required to form the target fault data.

[0077] Specifically, based on the preset data parsing method corresponding to the single-packet fault, the reference data in the data to be parsed is selected, that is, the byte data corresponding to the third byte, the fourth byte and the fifth byte in the data to be parsed. The reference data is combined based on the preset data parsing method to determine the target fault data corresponding to the vehicle-mounted MCU system.

[0078] S340: If the data type is a multi-packet fault, the data to be analyzed is analyzed based on a preset data analysis method corresponding to the multi-packet fault to determine the target fault data corresponding to the vehicle-mounted MCU system.

[0079] in, Figure 4 An example plot of multi-packet fault data is given. Figure 4 ,Each frame of CAN data in the multi-packet fault data has a corresponding identifier ID and data field.

[0080] Specifically, if the data type is a multi-packet fault, the single-packet fault flag F_S is reset, and the data in the single-fault packet storage area S_DATA[1..8] is cleared to zero, and the multi-packet fault flag F_M is set.

[0081] At the same time, the 6th byte CAN_REC[6] to the 12th byte CAN_REC

[12] of the first frame of the multi-packet fault data sent continuously (determined by the identifier ID and the first byte of the data field CAN_REC[5]=01), a total of 7 bytes, are transferred to the buffer area M_DATA[1] to M_DATA[7], which is the first fault data field.

[0082] The 6th byte CAN_REC[6] to the 12th byte CAN_REC

[12] of the second frame of the multi-packet fault data sent (judged by the identifier ID and the first byte of the data field CAN_REC[5]=02), a total of 7 bytes, are transferred to the buffer area M_DATA[8] to M_DATA

[14] , which is the second fault data field.

[0083] The 6th byte CAN_REC[6] to the 12th byte CAN_REC

[12] of the 3rd frame of the multi-packet fault data sent (judged by the identifier ID and the first byte of the data field CAN_REC[5]=03), a total of 7 bytes, are transferred to the buffer area M_DATA

[15] to M_DATA

[21] , which is the 3rd fault data field.

[0084] The 6th byte CAN_REC[6] to the 12th byte CAN_REC

[12] of the 4th frame of the multi-packet fault data sent (judged by the identifier ID and the first byte of the data field CAN_REC[5]=04), a total of 7 bytes, are transferred to the buffer area M_DATA

[22] to M_DATA

[28] , which is the 4th fault data field.

[0085] According to the predetermined variable calculation rules (equivalent to the preset data parsing method), the data fields in the four fault package caches are respectively calculated to obtain the SPN code and FMI code of the first fault package, the SPN code and FMI code of the second fault package, the SPN code and FMI code of the third fault package, and the SPN code and FMI code of the fourth fault package.

[0086] The technical solution of the embodiment of the present invention is to parse the data to be parsed based on the preset data parsing method corresponding to the single-packet fault if the data type is a single-packet fault, and determine the target fault data corresponding to the vehicle-mounted MCU system; if the data type is a multi-packet fault, the data to be parsed is parsed based on the preset data parsing method corresponding to the multi-packet fault, and determine the target fault data corresponding to the vehicle-mounted MCU system. Thus, the data to be parsed of each data type can be accurately parsed, improving the accuracy and efficiency of determining the target fault data. Moreover, in real-time communication, the target fault data is determined using a preset buffer area, further avoiding the problem of reduced parsing accuracy caused by data accumulation.

[0087] The following is an embodiment of a device for parsing vehicle-mounted MCU system fault data by a controller provided in an embodiment of the present invention. The device and the method for parsing vehicle-mounted MCU system fault data by a controller in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the device for parsing vehicle-mounted MCU system fault data by a controller, reference can be made to the embodiment of the method for parsing vehicle-mounted MCU system fault data by the above-mentioned controller.

[0088] Embodiment 3

[0089] Figure 5 A schematic diagram of the structure of a device for analyzing vehicle-mounted MCU system fault data provided by a controller in the third embodiment of the present invention. Figure 5 As shown, the device includes: a to-be-analyzed data acquisition module 510 , a data type determination module 520 and a target fault data determination module 530 .

[0090] Among them, the data to be analyzed acquisition module 510 is used to obtain the data to be analyzed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a communication environment between a preset controller and the vehicle-mounted MCU system; the data type determination module 520 is used to determine the data type corresponding to the data to be analyzed based on the data to be analyzed and a preset fault identifier; the target fault data determination module 530 is used to determine the target fault data corresponding to the vehicle-mounted MCU system based on the data type, the data to be analyzed and the preset data analysis method.

[0091] The technical solution of the embodiment of the present invention obtains the data to be analyzed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; based on the data to be analyzed and the preset fault identification, the data type corresponding to the data to be analyzed is determined; based on the data type, the data to be analyzed and the preset data analysis method, the target fault data corresponding to the vehicle-mounted MCU system is determined, so that effective communication between the controller and the vehicle-mounted MCU system can be achieved, and the target fault data corresponding to the vehicle-mounted MCU system can be accurately and conveniently determined by using the controller, thereby improving the accuracy of the target fault data analysis.

[0092] Based on the above technical solution, the preset communication environment includes: the CAN interface of the CAN to Ethernet gateway module is connected to the CAN communication port of the vehicle-mounted MCU system; the Ethernet interface of the CAN to Ethernet gateway module is connected to the Ethernet port of the controller; the Ethernet address of the CAN to Ethernet gateway module and the Ethernet address of the controller are in the same network segment.

[0093] On the basis of the above technical solution, the preset fault identifier includes: a preset single-packet identifier and a preset multi-packet identifier;

[0094] The data type determination module 520 may include:

[0095] A single packet fault determination submodule, used for determining that the data type corresponding to the data to be parsed is a single packet fault if a preset single packet identifier exists in the data to be parsed;

[0096] The multi-packet fault determination submodule is used to determine that the data type corresponding to the data to be parsed is a multi-packet fault if a preset multi-packet identifier exists in the data to be parsed.

[0097] On the basis of the above technical solution, the single packet fault determination submodule is specifically used for: if there is a preset single packet identifier in the data to be parsed, and the preset byte data after the preset single packet identifier in the data to be parsed is a non-zero number, then it is determined that the data type corresponding to the data to be parsed is a single packet fault.

[0098] Based on the above technical solution, the target fault data determination module 530 may include:

[0099] A first target fault data determination submodule is used to parse the data to be parsed based on a preset data parsing method corresponding to the single-packet fault if the data type is a single-packet fault, and determine the target fault data corresponding to the vehicle-mounted MCU system;

[0100] The second target fault data determination submodule is used to parse the data to be parsed based on a preset data parsing method corresponding to the multi-packet fault if the data type is a multi-packet fault, and determine the target fault data corresponding to the on-board MCU system.

[0101] Based on the above technical solution, the first target fault data determination submodule is specifically used to: select reference data in the data to be analyzed based on the preset data analysis method corresponding to the single package fault, and combine the reference data to determine the target fault data corresponding to the vehicle-mounted MCU system.

[0102] Based on the above technical solution, a sending buffer, a receiving buffer, a single fault package storage area and a multiple fault package storage area are preset in the controller; among them, the receiving buffer is used to receive data sent by the vehicle-mounted MCU system; the sending buffer is used to send data to the single fault package storage area or the multiple fault package storage area; the single fault package storage area and the multiple fault package storage area are used to parse the data sent by the sending buffer and store the parsing results.

[0103] The device for parsing vehicle-mounted MCU system fault data by a controller provided in an embodiment of the present invention can execute the method for parsing vehicle-mounted MCU system fault data by a controller provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the method for executing the method for parsing vehicle-mounted MCU system fault data by a controller.

[0104] It is worth noting that in the embodiment of the above-mentioned controller parsing the fault data of the vehicle-mounted MCU system, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0105] Embodiment 4

[0106] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0107] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0108] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0109] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a method for the controller to parse fault data of the vehicle-mounted MCU system.

[0110] In some embodiments, the method for the controller to parse the on-board MCU system fault data can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for the controller to parse the on-board MCU system fault data described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for the controller to parse the on-board MCU system fault data in any other appropriate manner (for example, by means of firmware).

[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0113] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0115] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0116] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0117] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for a controller to parse fault data of an on-board MCU system as provided in any embodiment of the present application.

[0118] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, and the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The program product and the method for parsing the fault data of the vehicle-mounted MCU system disclosed in each embodiment of the present application belong to the same inventive concept, so it is not repeated here.

[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for a controller to analyze fault data of an on-vehicle MCU system, characterized in that: include: Under the preset communication environment, obtain the data to be parsed sent by the vehicle MCU system; The preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; Based on the data to be parsed and a preset fault identifier, determining a data type corresponding to the data to be parsed; Based on the data type, the data to be parsed and the preset data parsing method, the target fault data corresponding to the on-board MCU system is determined.

2. The method according to claim 1, characterized in that The preset communication environment includes: The CAN interface of the CAN-to-Ethernet gateway module is connected to the CAN communication port of the vehicle MCU system; The Ethernet interface of the CAN-to-Ethernet gateway module is connected to the Ethernet port of the controller; The Ethernet address of the CAN-to-Ethernet gateway module and the Ethernet address of the controller are in the same network segment.

3. The method according to claim 1, characterized in that The preset fault identifier includes: a preset single-packet identifier and a preset multi-packet identifier; The determining, based on the data to be parsed and a preset fault identifier, a data type corresponding to the data to be parsed includes: If the preset single-packet identifier exists in the data to be parsed, determining that the data type corresponding to the data to be parsed is a single-packet fault; If the preset multi-packet identifier exists in the data to be parsed, it is determined that the data type corresponding to the data to be parsed is a multi-packet fault.

4. The method according to claim 3, characterized in that If the preset single-packet identifier exists in the data to be parsed, determining that the data type corresponding to the data to be parsed is a single-packet fault includes: If the preset single packet identifier exists in the data to be parsed, and the preset byte data after the preset single packet identifier in the data to be parsed is a non-zero number, it is determined that the data type corresponding to the data to be parsed is a single packet fault.

5. The method according to claim 1, characterized in that The determining, based on the data type, the data to be parsed, and the preset data parsing method, target fault data corresponding to the vehicle-mounted MCU system includes: If the data type is a single-packet fault, the data to be parsed is parsed based on a preset data parsing method corresponding to the single-packet fault to determine the target fault data corresponding to the vehicle-mounted MCU system; If the data type is a multi-packet fault, the data to be analyzed is analyzed based on a preset data analysis method corresponding to the multi-packet fault to determine the target fault data corresponding to the on-board MCU system.

6. The method according to claim 5, characterized in that The method of parsing the data to be parsed based on the preset data parsing method corresponding to the single-packet fault to determine the target fault data corresponding to the vehicle-mounted MCU system includes: Based on a preset data analysis method corresponding to a single-packet fault, reference data in the data to be analyzed is selected, and the reference data is combined to determine target fault data corresponding to the on-board MCU system.

7. The method according to claim 1, characterized in that The controller is preset with a sending buffer, a receiving buffer, a single-fault packet storage area and a multiple-fault packet storage area; Wherein, the receiving buffer is used to receive data sent by the vehicle-mounted MCU system; The sending buffer is used to send data to the single-fault packet storage area or the multiple-fault packet storage area; The single-fault packet storage area and the multiple-fault packet storage area are used to parse data sent by the sending buffer and store the parsing results.

8. A device for analyzing fault data of an on-board MCU system by a controller, characterized in that: The device comprises: The module for acquiring data to be parsed is used to acquire the data to be parsed sent by the vehicle-mounted MCU system under a preset communication environment; the preset communication environment is a preset communication environment between the controller and the vehicle-mounted MCU system; A data type determination module, used to determine the data type corresponding to the data to be parsed based on the data to be parsed and a preset fault identifier; The target fault data determination module is used to determine the target fault data corresponding to the vehicle-mounted MCU system based on the data type, the data to be parsed and the preset data parsing method.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for parsing vehicle-mounted MCU system fault data by a controller as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for parsing fault data of a vehicle-mounted MCU system by a controller as described in any one of claims 1 to 7 is implemented.