Method and device for analyzing can fault message, medium and electronic equipment

By parsing CAN fault messages at the controller application layer and using a custom module to obtain fault signals, the problems of low parsing efficiency and high resource consumption in the existing technology are solved, achieving efficient CAN fault message parsing and improved modeling accuracy.

CN116661416BActive Publication Date: 2026-02-27DONGFENG MOTOR GRP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310639650.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2026-02-27
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

In existing technologies, CAN fault message parsing methods are inefficient in hydrogen fuel cell systems, consume a lot of system resources, and are difficult to perform efficient parsing at the application layer.

Method used

The controller obtains CAN fault messages at the application layer and parses them using a custom parsing module to obtain various fault signals, reducing the work of defining and decoding global variables at the integration layer and freeing up software storage resources.

Benefits of technology

It improves the efficiency of CAN fault message parsing, reduces system resource consumption, enhances modeling accuracy and robustness, and reduces the risk of errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116661416B_ABST
    Figure CN116661416B_ABST
Patent Text Reader

Abstract

The application relates to the CAN technical field, in particular to a CAN fault message analysis method and device, a medium and an electronic equipment. The method comprises the following steps: acquiring a CAN fault message of a target component at an application layer of a controller, the CAN fault message corresponds to a global variable, and the global variable is used for representing all fault information of the target component; and analyzing the CAN fault message through a self-defined analysis module in the application layer to acquire each fault signal on the CAN fault message. The method provided in the application transfers the CAN fault message analysis work of an integration layer to an application layer, saves the workloads of global variable definition and initialization of a large amount of CAN fault message specific fault information, global variable buffer extraction, CAN fault message decoding and CAN fault message fault information variable transmission in a traditional method, realizes work efficiency improvement through a large amount of code quantity reduction, and releases software storage resources of the controller.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the CAN technical field, in particular, relates to a CAN fault message analysis method and device, medium and electronic equipment. BACKGROUND

[0002] Hydrogen fuel cells have become a hot field of research in the field of new energy at home and abroad with the advantages of high efficiency, zero emission, short hydrogenation time, long cruising range and the like. For hydrogen fuel systems, many key components are coordinated and controlled as a whole through CAN communication network. The message faults of the components are also transmitted to the controller through the CAN communication network, and the controller judges whether there is a fault and makes corresponding fault processing through CAN fault message analysis to ensure the safe, stable and reliable operation of the hydrogen fuel cell system. For a CAN controller with a three-layer architecture, each fault signal in the CAN fault message fault needs to be treated as a fault variable, the CAN fault message is analyzed by a CAN fault message analysis function in the integration layer, and then transmitted to the application layer. The application layer finally makes corresponding judgments and processing according to the fault variables. In the case of many types of component faults, this CAN fault message analysis method will perform a large number of global variable definitions, CAN fault message fault definitions, CAN fault message initialization, CAN fault message transmission, and CAN fault message decoding work in the integration layer, which is low in analysis efficiency and occupies a large amount of system resources in transmission.

[0003] Therefore, there is an urgent need for a CAN fault message analysis method in the art, which can analyze CAN fault messages in the application layer, improve the CAN fault message analysis efficiency, and reduce the occupation of system resources. SUMMARY

[0004] Embodiments of the present application provide a CAN fault message analysis method, device, medium and electronic equipment, which can at least to some extent analyze CAN fault messages in the application layer, improve the CAN fault message analysis efficiency, and reduce the occupation of system resources.

[0005] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0006] According to one aspect of an embodiment of the present application, a CAN fault message analysis method is provided, the method comprising: acquiring a CAN fault message of a target component in an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component; analyzing the CAN fault message through a self-defined analysis module in the application layer to acquire each fault signal on the CAN fault message.

[0007] In some embodiments of the present application, before the CAN fault message of the target component is acquired at the application layer of the controller, the method further comprises: defining and declaring a global variable for all faults of the same component.

[0008] In some embodiments of the present application, the acquiring of the CAN fault message of the target component at the application layer of the controller comprises: receiving the CAN fault message of the target component through an interrupt receiving processing function, determining a mapping relationship between the CAN fault message and the global variable, and decoding the CAN fault message through a CAN decoding function and passing the CAN fault message to the application layer.

[0009] In some embodiments of the present application, the parsing of the CAN fault message through the self-defined parsing module in the application layer comprises: passing the CAN fault message to a parsing application interface of the application layer, and parsing the CAN fault message through a self-defined parsing module in the parsing application interface.

[0010] In some embodiments of the present application, based on the foregoing scheme, the parsing of the CAN fault message through the self-defined parsing module in the parsing application interface comprises: acquiring a data segment bit number of the CAN fault message, and calling a target self-defined parsing module to parse the CAN fault message according to the data segment bit number.

[0011] In some embodiments of the present application, the method further comprises: determining and broadcasting the fault condition of the target component according to each fault signal.

[0012] In some embodiments of the present application, based on the foregoing scheme, the determining and broadcasting of the fault condition of the target component according to each fault signal comprises: performing fault code identification and fault level judgment on each fault signal, and performing broadcasting work on information such as the fault code and the fault level of the target component.

[0013] According to an aspect of an embodiment of the present application, a CAN fault message parsing device is provided, the device comprising: an acquisition unit configured to acquire a CAN fault message of a target component at an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component; and a parsing module configured to parse the CAN fault message through a self-defined parsing module in the application layer, and acquire each fault signal on the CAN fault message.

[0014] According to an aspect of an embodiment of the present application, a computer readable storage medium is provided, the computer readable storage medium storing at least one program code, the at least one program code being loaded and executed by a processor to implement the CAN fault message parsing method as described.

[0015] According to an aspect of the embodiments of the present application, an electronic device is provided, which comprises one or more processors and one or more memories having at least one program code stored therein, loaded and executed by the one or more processors to implement the CAN fault message parsing method as described.

[0016] Based on the above scheme, the technical scheme provided by the present application has at least the following advantages and progress:

[0017] In the present application, the CAN fault message of the target component is obtained at the application layer of the controller, the CAN fault message corresponds to a global variable, and the global variable is used to represent all faults of the target component. Each fault signal on the CAN fault message is obtained by parsing the CAN fault message through a self-defined parsing module in the application layer. The method provided by the present application can transfer the CAN fault message parsing work of the integration layer to the application layer, save a large amount of global variable definition, CAN fault message fault definition, CAN fault message initialization, CAN fault message transmission, and CAN fault message decoding work, release the software storage resources of the controller, greatly improve the modeling accuracy on the basis of greatly improving the integration layer coding and application layer modeling efficiency, ensure the robustness and robustness of modeling, and solve the problems of easy error and difficult error correction caused by heavy workload.

[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings incorporated in the specification hereof and forming a part thereof illustrate embodiments consistent with the present application and together with the description serve to explain the principles of the present application. It is clear that the accompanying drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings. In the drawings:

[0020] Figure 1 A flowchart of a CAN fault message parsing method according to an embodiment of the present application is shown;

[0021] Figure 2 A global variable definition example of a traditional method is shown;

[0022] Figure 3 A global variable definition example according to an embodiment of the present application is shown;

[0023] Figure 4A CAN fault message receiving example according to one embodiment of the present application is shown;

[0024] Figure 5 A CAN fault message fault signal receiving example of a conventional method is shown;

[0025] Figure 6 A CAN fault message decoding example according to one embodiment of the present application is shown;

[0026] Figure 7 A CAN fault message decoding example of a conventional method is shown;

[0027] Figure 8 A signal transmission amount comparison of a conventional method and an embodiment of the present application is shown;

[0028] Figure 9 A diagram of a Bit_16_in custom analysis module according to one embodiment of the present application is shown;

[0029] Figure 10 A workflow diagram of a Bit_16_in custom analysis module according to one embodiment of the present application is shown;

[0030] Figure 11 A diagram of a Bit_32_in custom analysis module according to one embodiment of the present application is shown;

[0031] Figure 12 An application diagram of a Bit_32_in custom analysis module according to one embodiment of the present application is shown;

[0032] Figure 13 An analysis device of a CAN fault message according to one embodiment of the present application is shown;

[0033] Figure 14 A structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these example implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art. Like reference numerals refer to like elements throughout.

[0035] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, devices, implementations, and operations have not been shown or described in detail to avoid obscuring aspects of the application.

[0036] The block diagrams in the drawings show only the functionality of the features and do not necessarily imply a physical structure or organization.

[0037] The flow diagrams shown in the drawings are examples only and are not necessarily to be construed as having any prior art effect. Not all steps are necessarily performed in the order presented in order to practice the application.

[0038] It should be noted that "a plurality" refers to two or more. The conjunction "and / or" describes associative relationships of associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases: A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.

[0039] It should be noted that the present application relates to the technical content of the CAN communication network. CAN (Controller Area Network) is a serial communication protocol bus for real-time applications, which can use twisted pair to transmit signals and is one of the most widely used field buses in the world. CAN protocol is used for communication between various elements in the automobile, replacing expensive and bulky power distribution harnesses. The robustness of the protocol extends its use to other automation and industrial applications. The characteristics of CAN protocol include serial data communication integrity, real-time support, transmission rate up to 1 Mb / s, 11-bit addressing and error detection capability.

[0040] Please refer to Figure 1 , Figure 1 A flow diagram of a CAN fault message analysis method according to an embodiment of the present application is shown, which can include steps S101-S102:

[0041] In step S101, a CAN fault message of a target component is acquired at an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component.

[0042] In step S102, each fault signal on the CAN fault message is acquired by analyzing the CAN fault message through a self-defined analysis module in the application layer.

[0043] In the present application, a CAN fault message of a target component is acquired at an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component; each fault signal on the CAN fault message is acquired by analyzing the CAN fault message through a self-defined analysis module in the application layer. The method provided in the present application can transfer the CAN fault message analysis work of an integration layer to the application layer, save a large number of global variable definitions, CAN fault message fault definitions, CAN fault message initialization, CAN fault message transmission, and CAN fault message decoding work, release software storage resources of the controller, greatly improve the modeling accuracy on the basis of greatly improving the integration layer coding and application layer modeling efficiency, ensure the robustness and robustness of modeling, and solve the problems of easy error and difficult error correction caused by heavy workload.

[0044] In an embodiment of the present application, before the CAN fault message of the target component is acquired at the application layer of the controller, the method further comprises: defining and declaring the global variable for all faults of the same component. When the CAN fault message is transmitted in the CAN network, the global variable definition and declaration of the CAN fault message are first performed. In the traditional scheme, all fault signals of the components covered by the CAN network can only be respectively defined and declared, as shown in Figure 2 For a large number of components of a hydrogen fuel cell system, each component can have multiple fault signals, for example, a DCDC transformer has more than 30 fault signals, an air compressor has nearly 30 fault signals, and a water pump has nearly 20 fault signals. Each fault signal needs to be defined and declared as a global variable, which can cause the integration layer to accommodate a large number of global variables and occupy too many system resources. In the present embodiment, the global variable definition and declaration can be performed for all faults of the same component. All faults of the current component are first defined as global variables. When any fault occurs in the current component, the CAN fault message has a corresponding unique global variable. The controller integration layer can save hundreds of global variable definitions, save a large number of controller software system resources, and can be as shown in Figure 3

[0045] ​In an embodiment of the present application, the CAN fault message of the target component can be acquired at the integration layer of the controller, and the acquired CAN fault message can be assigned to the pre-defined and declared global variable of the integration layer, which is used to represent all fault information of the target component.

[0046] In an embodiment of the present application, the global variable definition of all faults of the same component can be the definition and declaration of the global structure in C language.

[0047] In an embodiment of the present application, the method of acquiring the CAN fault message of the target component at the application layer of the controller can include receiving the CAN fault message of the target component through an interrupt receiving processing function, determining the mapping relationship between the CAN fault message and the global variable, and decoding the CAN fault message through a CAN decoding function and passing the CAN fault message to the application layer.

[0048] In an embodiment of the present application, the interrupt receiving processing function is usually written by an operating system or a driver, and is used to respond to various types of interrupt signals. When the system encounters an abnormal situation, for example, a component fails and sends a fault signal, the hardware or software will generate an interrupt signal to inform the controller to pause the current task and start executing the interrupt processing program, for example, the message parsing program described in the present application.

[0049] In an embodiment of the present application, the CAN fault message from each component can be passed from the buffer area of the controller to the global variable defined and declared above by establishing the CAN communication interrupt receiving processing function CAND_Recv_Cmd(unsigned char*data, unsigned int id), the mapping relationship between the CAN fault message and the global variable is determined, and the receiving processing of the message is completed, as shown in Figure 4 For the fault of the hydrogen circulation pump, the CAN fault message sent by the hydrogen circulation pump is received through the interrupt receiving processing function, and the mapping relationship with the global variable is determined, and the global variable in Figure 4 is used to represent all faults of the hydrogen circulation pump. In the traditional method, the global variable definition and declaration are required for each fault signal, which results in different CAN fault messages corresponding to different faults, and the corresponding interrupt receiving processing functions need to be established, which also occupies too many system resources, as shown in Figure 5 .

[0050] In an embodiment of the present application, the CAN fault message decoding function CAN_Decode() can be established to decode the variables of the global variable structure from the CAN fault message, as shown in Figure 6The CAN fault message is then transmitted to the upper layer application, so that the controller application layer can judge, process and broadcast the CAN fault message of the component covered by the CAN communication network, and the CAN fault message can record the fault information of the component. In the traditional method, each fault signal needs to be defined and declared as a global variable, which leads to different CAN fault messages corresponding to different faults, and the establishment of corresponding CAN fault message decoding functions, which also occupies too many system resources, such as Figure 7 As shown.

[0051] In an embodiment of the present application, the method of analyzing the CAN fault message through the custom analysis module in the application layer includes: transmitting the CAN fault message to the analysis application interface of the application layer, and analyzing the CAN fault message through the custom analysis module in the analysis application interface. For the application layer, the CAN fault message is transmitted from the integration layer to the individual application interface (Subsystem & Model Reference) of the CAN fault message fault analysis, judgment, processing and broadcasting. A lot of layers of CAN fault message transmission are required. However, by using the method of the present application, all fault signals of a component can be collected into one fault message for transmission, as shown in Figure 8 As shown, the global variable transmission in the traditional method is greatly reduced, the programming code amount of the integration layer is reduced, the modeling amount in the Simulink model is saved, and the related data definition and initialization work in the Simulink data dictionary is also reduced. The number of fault signals in the hydrogen fuel cell system can be reduced to the number of components covered by the CAN communication network. The related observation and calibration data definition and initialization in the Simulink data dictionary are also greatly reduced. The more obvious benefit is that several hundred CAN fault message fault global variables can be reduced to component global variables, which reduces the system overhead and running pressure of the controller software, improves the robustness and robustness of the controller software, and reduces the error probability and error correction difficulty of the integration layer and application layer programming and modeling.

[0052] In an embodiment of the present application, the type of the CAN fault message can be a data frame. The data frame can consist of the following parts: frame start, arbitration segment, control segment, data segment, CRC segment, ACK segment, and frame end. For each component of the hydrogen fuel cell system, it is necessary to determine whether a fault occurs according to the detection parameters, and for the controller, it is only necessary to analyze what fault occurs in the target component, without determining whether the fault is triggered, so the CAN fault message can only record whether a certain fault occurs. The data segment can carry 0-8 bytes of data, and in each component of the hydrogen fuel cell system, the number of faults that can occur in each component does not exceed 40, and the data segment can record up to 64 bits of data. If each fault corresponds to one bit of data, the data segment can record whether a certain fault occurs through binary "1" or "0".

[0053] In an embodiment of the present application, each fault can correspond to more than one bit of data, and the occurrence of the fault can be recorded through multiple bits of data.

[0054] In an embodiment of the present application, each fault of the target component can correspond to a fixed data position on the data segment, so after the CAN fault message is parsed into a fault signal by the self-defined analysis module, the data at different positions of the data segment can be read, and then the occurrence of the corresponding fault of the target component can be determined by judging the "1" or "0" of the signal.

[0055] In an embodiment of the present application, the target component has A, B, and C three faults, and the zeroth bit of the 0th byte of the data segment can be used to record whether A occurs, the first bit of the 0th byte can be used to record whether B occurs, and the second bit of the 0th byte can be used to record whether C occurs.

[0056] In an embodiment of the present application, the target component has A, B, and C three faults, and the zeroth bit of the 0th byte of the data segment can be used to record whether A occurs, the first bit of the 0th byte can be used to record whether B occurs, and the second bit of the 0th byte can be used to record whether C occurs. For whether the fault occurs, binary "1" can represent that the fault occurs, and binary "0" can represent that the fault does not occur. After the CAN fault message is parsed by the self-defined analysis module, three signals are obtained: signal a is "1", signal b is "1", and signal c is "1", so it can be determined that the CAN fault message reflects that the target component simultaneously occurs A, B, and C three faults.

[0057] In an embodiment of the present application, the target component has three faults A, B and C, the 0th bit of the 0th byte of the data segment can be used to record whether A occurs, the 1st bit of the 0th byte can be used to record whether B occurs, and the 2nd bit of the 0th byte can be used to record whether C occurs. For whether a fault occurs, binary "1" can represent that the fault occurs, and binary "0" can represent that the fault does not occur. The CAN fault message is parsed by the self-defined analysis module to obtain three signals: signal a is "1", signal b is "0", and signal c is "1", so it can be judged that the CAN fault message reflects that the target component has AC two faults at the same time.

[0058] In an embodiment of the present application, the data segment can carry 0-8 bytes of data, and in each component of the hydrogen fuel cell system, the number of faults of some components does not exceed 32, and the data segment can record up to 64 bits of data. If each fault corresponds to two bits of data, the data segment can record whether a certain fault occurs by binary "1" or "0" of the first bit of data, and the severity of the fault can be judged by binary "1" or "0" of the second bit of data.

[0059] In an embodiment of the present application, each fault of the target component can correspond to a fixed data position on the data segment, so after the CAN fault message is parsed into fault signals by the self-defined analysis module, the fault signals can be two-bit data signals, the adjacent two data in different positions of the data segment can be read, and whether a certain fault occurs can be judged by binary "1" or "0" of the first bit of data, and the severity of the fault can be judged by binary "1" or "0" of the second bit of data.

[0060] In an embodiment of the present application, the target component has three faults A, B and C, the 0th bit of the 0th byte of the data segment can be used to record whether A occurs, the 1st bit of the 0th byte can be used to record whether A occurs, and the 2nd bit of the 0th byte can be used to record whether A occurs. The 0th byte of the data segment can be used to record whether B occurs, the 3rd bit of the 0th byte can be used to record the severity of B, and the 4th bit of the 0th byte can be used to record whether C occurs, and the 5th bit of the 0th byte can be used to record the severity of C.

[0061] In an embodiment of the present application, the target component has three faults A, B and C, the 0th bit of the 0th byte of the data segment can be used to record whether A occurs, and the 1st bit of the 0th byte can be used to record the severity of A; the 2nd bit of the 0th byte of the data segment can be used to record whether B occurs, and the 3rd bit of the 0th byte can be used to record the severity of B; the 4th bit of the 0th byte of the data segment can be used to record whether C occurs, and the 5th bit of the 0th byte can be used to record the severity of C. For whether a fault occurs, binary "1" can represent that the fault occurs, and binary "0" can represent that the fault does not occur; for the severity of the fault, binary "1" can represent that the fault is severe, and binary "0" can represent that the fault is slight. A certain CAN fault message is parsed by the self-defined parsing module to obtain six signals: signal a is "1", signal b is "0", signal c is "1", signal d is "1", signal e is "0", and signal f is "0". Therefore, it can be judged that the CAN fault message reflects that the target component simultaneously occurs A and B faults, wherein the severity of A fault is low, and the severity of B fault is high.

[0062] In an embodiment of the present application, the method of parsing the CAN fault message by the self-defined parsing module in the application interface can include: acquiring the data segment bit number of the CAN fault message, and calling a target self-defined parsing module according to the data segment bit number to parse the CAN fault message. As described above, the data segment bit number can represent the number of faults of the target component, and therefore different self-defined parsing modules can be called according to different data segment bit numbers.

[0063] In an embodiment of the present application, the CAN fault message fault level input through multiple layers reaches an application interface that needs to parse the CAN fault message fault signal, a self-defined CAN communication bit input parsing module is adopted to realize the CAN fault message fault signal level parsing function. If each fault corresponds to one bit of data, for the CAN fault message data segment within 16 bits, a Bit_16_in self-defined parsing module can be called to parse, as shown in FIG. 6. Figure 9 The input end of the self-defined parsing module is the decoded CAN fault message, and the output end can be 16 fault signals. The controller can determine what type of fault occurs according to the 16 fault signals, as shown in FIG. 7. Figure 10 For example, the water pump of the hydrogen fuel system has 15 fault signals. When the air compressor detects one or more faults, it can send a CAN fault message. The data segment of the CAN fault message can include a total of 15-bit fault signal groups. After transmission, decoding and parsing, 15 fault signals can be obtained, and the type of fault of the water pump can be determined according to each fault signal.

[0064] In an embodiment of the present application, for the CAN fault message data segment within 16-32 bits, a Bit_32_in custom analysis module can be used for analysis, as shown in Figure 11 The input end of the custom analysis module is the decoded CAN fault message, and the output end can be 32 fault signals. The controller can determine the type of fault according to the 23 fault signals. For example, the air compressor of the hydrogen fuel cell system has 30 fault signals. When the air compressor detects one or more faults, it can send a CAN fault message. The data segment of the CAN fault message can include a total of 30-bit fault signal groups. After transmission, decoding, and analysis, 30 fault signals can be obtained to determine the type of fault of the air compressor.

[0065] Please refer to Figure 12 , Figure 12 Fig. 1 shows a simple application diagram of a Bit_32_in custom analysis module according to an embodiment of the present application. The CAN fault message of the HCP fault is taken as the input. After analysis by the Bit_32_in custom analysis module, a total of 32 fault signals will be analyzed

[0066] In some embodiments of the present application, the method further comprises determining and announcing the fault condition of the target component according to each fault signal.

[0067] In an embodiment of the present application, fault code identification and fault level judgment are performed for each fault signal. The fault code and fault level information of the target component are announced. The CAN fault message is transmitted and analyzed by the application layer. The analyzed CAN fault message fault signal is subjected to fault code identification and fault level judgment. According to the fault level of different faults, corresponding fault handling is performed, and the fault code and fault level information are announced.

[0068] Please refer to Figure 13 , Figure 13 Fig. 1 shows a CAN fault message analysis device according to an embodiment of the present application. The device 1300 includes an acquisition unit 1301 and an analysis unit 1302.

[0069] The acquisition unit 1301 can be used to acquire the CAN fault message of the target component at the application layer of the controller. The CAN fault message corresponds to a global variable, which is used to represent all faults of the target component. The analysis unit 1302 can be used to analyze the CAN fault message by a custom analysis module in the application layer to obtain each fault signal on the CAN fault message.

[0070] Please refer to Figure 14 , Figure 14A structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown.

[0071] It should be noted that, Figure 14 The computer system 1400 of the electronic device shown is only an example and should not bring any limitation to the functions and usage range of the embodiments of the present application.

[0072] As Figure 14 shown, the computer system 1400 includes a central processing unit (CPU) 1401 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1402 or loaded from a storage section 1408 into a random access memory (RAM) 1403, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in the RAM 1403. The CPU 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0073] The following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as necessary. A removable recording medium 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1410 as necessary, so that a computer program read therefrom is installed into the storage section 1408 as necessary.

[0074] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1409, and / or installed from the detachable medium 1411. When the computer program is executed by the central processing unit (CPU) 1401, various functions defined in the system of the present application are executed.

[0075] As another aspect, the present application also provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the CAN fault message analysis method described in the above embodiments.

[0076] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the CAN fault message analysis method described in the above embodiments.

[0077] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into several modules or units.

[0078] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains.

[0079] It should be understood that the present application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the present application. The scope of the present application is limited only by the appended claims.

Claims

1. A method for parsing a CAN fault message, characterized in that, The method comprises: obtaining a CAN fault message of a target component at an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component; the CAN fault message being of a data frame type, the data frame comprising a data segment, each fault of the target component corresponding to one bit or multiple bits of data of the data segment; parsing the CAN fault message through a self-defined parsing module in the application layer to obtain each fault signal on the CAN fault message.

2. The method of claim 1, wherein, Before obtaining the CAN fault message of the target component at the application layer of the controller, the method further comprises: defining and declaring the global variable for all faults of the same component.

3. The method of claim 1, wherein, The obtaining of the CAN fault message of the target component at the application layer of the controller comprises: receiving the CAN fault message of the target component through an interrupt receiving processing function, determining a mapping relationship between the CAN fault message and the global variable, and decoding the CAN fault message through a CAN decoding function and transmitting the CAN fault message to the application layer.

4. The method of claim 1, wherein, The parsing of the CAN fault message through the self-defined parsing module in the application layer comprises: transmitting the CAN fault message to a parsing application interface of the application layer, and parsing the CAN fault message through the self-defined parsing module in the parsing application interface.

5. The method of claim 4, wherein, The parsing of the CAN fault message through the self-defined parsing module in the parsing application interface comprises: obtaining a data segment bit number of the CAN fault message, and calling a target self-defined parsing module to parse the CAN fault message according to the data segment bit number.

6. The method of claim 1, wherein, The method further comprises determining and announcing a fault condition of the target component according to each fault signal.

7. The method of claim 6, wherein, The determining and announcing of the fault condition of the target component according to each fault signal comprises: performing fault code identification and fault level judgment on each fault signal, and announcing information such as a fault code and a fault level of the target component.

8. A CAN fault message parsing device, characterized in that, The device comprises: an obtaining unit configured to obtain a CAN fault message of a target component at an application layer of a controller, the CAN fault message corresponding to a global variable, the global variable being used to represent all faults of the target component; the CAN fault message being of a data frame type, the data frame comprising a data segment, each fault of the target component corresponding to one bit or multiple bits of data of the data segment; a parsing module configured to parse the CAN fault message through a self-defined parsing module in the application layer to obtain each fault signal on the CAN fault message.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program code, which is loaded and executed by the processor to implement the CAN fault message parsing method according to any one of claims 1 to 7.

10. An electronic device, comprising: The electronic device comprises one or more processors and one or more memories, and the one or more memories store at least one program code, which is loaded and executed by the one or more processors to implement the CAN fault message parsing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Vehicle fault diagnosis method and system, and vehicle

    CN104834303A

  • Fault code information storage method, device, communication equipment and storage medium

    CN113535881A

  • System and method suitable for data communication network auxiliary analysis alarm

    CN113726555A

  • Fault degradation simulation test method based on L4-level intelligent driving algorithm

    CN115993811A