A method and apparatus for transmitting diagnostic information, a vehicle, and a storage medium

By establishing a mapping relationship in the vehicle diagnostic system, the diagnostic information from the controller is converted into a target diagnostic code that the main controller can recognize. This solves the management difficulties caused by the number of ECUs exceeding eight in the OBD protocol, and achieves more efficient fault information management and security assurance.

CN118689203BActive Publication Date: 2026-04-17GREAT WALL MOTOR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2024-06-21
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The existing on-board diagnostic (OBD) communication protocol only defines the CAN IDs of 8 ECUs, which makes it impossible for some controllers in the vehicle to assign appropriate CAN IDs, and the fault diagnosis information reported from the controller to the main controller is not easy to manage.

Method used

By establishing a mapping relationship based on the existing fault diagnosis communication protocol, the target diagnostic information of the controller will be transformed into target diagnostic codes that the main controller can recognize, including multiple target status bits, and a unified fault description language will be established between the main controller and the fault diagnosis tool.

Benefits of technology

It improves the efficiency and accuracy of the main controller in managing fault information of the slave controller, ensures the consistency of the diagnostic process, and reduces safety hazards caused by failure to maintain in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689203B_ABST
    Figure CN118689203B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, vehicle, and storage medium for transmitting diagnostic information. The method, applied in the vehicle field, includes: acquiring target diagnostic information obtained from a slave controller's self-diagnosis; generating a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information; wherein the target diagnostic code includes multiple target status bits recognizable by the master controller, the mapping relationship being the relationship between reference status bits in a fault diagnosis communication protocol and target status bits in the target diagnostic code; the fault diagnosis communication protocol being a communication protocol between the master controller and a fault diagnosis tool; and uploading the target diagnostic code to the master controller for management. This method facilitates the master controller's management of fault information reported by the slave controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicles, and more specifically, to a method, apparatus, vehicle, and storage medium for transmitting diagnostic information in the field of vehicles. Background Technology

[0002] Currently, with the continuous development of science and technology, vehicles have become an indispensable part of people's daily lives. To ensure driving safety, it is necessary to obtain vehicle fault information in a timely manner and to repair and handle the vehicles based on this information.

[0003] Typically, each Electronic Control Unit (ECU) in a vehicle corresponds to a unique Controller Area Network Identity Document (CAN ID). During vehicle fault diagnosis, technicians can identify which ECU sent specific information or reported a fault by reading messages with a specific CAN ID, facilitating quick location of the faulty ECU and enabling subsequent repairs. Current On-Board Diagnostics (OBD) communication protocols only define CAN IDs for eight ECUs, but many vehicles have far more than eight ECUs. This inevitably leads to some controllers being unable to be assigned suitable CAN IDs.

[0004] Based on this, some ECUs in the vehicle can be configured as slave controllers, while others can be configured as master controllers. A corresponding CAN ID can be assigned to the master controller, which then uploads fault diagnosis information to the master controller, which manages this information. However, currently, the fault diagnosis information reported by the slave controllers to the master controller is often inconvenient for the master controller to manage. Summary of the Invention

[0005] This application provides a method, apparatus, vehicle, and storage medium for transmitting diagnostic information. The method enables the main controller to conveniently manage fault information reported from the controller.

[0006] Firstly, a method for transmitting diagnostic information is provided. This method includes: acquiring target diagnostic information obtained from a self-diagnostic process performed by a slave controller; generating a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information; wherein the target diagnostic code includes multiple target status bits that the master controller can recognize, the mapping relationship being the relationship between reference status bits in a fault diagnosis communication protocol and target status bits in the target diagnostic code; the fault diagnosis communication protocol being a communication protocol between the master controller and a fault diagnosis tool; and uploading the target diagnostic code to the master controller for management by the master controller.

[0007] The above technical solution acquires target diagnostic information obtained from the controller's self-diagnosis, which can be used to quickly locate specific problems in the controller. Using a preset mapping relationship, the target diagnostic information from the controller is converted into a target diagnostic code that the master controller can recognize, facilitating its management and identification. Since this target diagnostic code contains multiple target status bits that the master controller can recognize, uploading it to the master controller allows for a more detailed understanding of the controller's status based on these multiple target status bits. This helps the master controller quickly identify potential problems, facilitating its management of target diagnostic information and enabling preventative measures, effectively ensuring vehicle safety. Furthermore, since the mapping relationship is between the reference status bits in the fault diagnosis communication protocol and the target status bits in the target diagnostic code, and this fault diagnosis communication protocol is the communication protocol between the master controller and the fault diagnosis tool, the master controller, upon receiving the target diagnostic code, can directly identify it based on the existing fault diagnosis communication protocol and the preset mapping relationship. This further facilitates the master controller's management of fault information and ensures the consistency of the diagnostic process. Meanwhile, timely self-diagnosis by the controller and centralized management of fault information by the main controller help to detect potential vehicle problems in advance and reduce safety hazards caused by failure to maintain in a timely manner.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the mapping relationship is generated in the following manner: determining multiple status bits of the fault diagnosis code contained in the fault diagnosis communication protocol and the status definitions of each of the multiple status bits; determining the status bits in the fault diagnosis communication protocol whose status definitions are consistent with the target definition as reference status bits; wherein the content represented by the target definition is consistent with the content represented by the target diagnostic information; and generating the mapping relationship based on the reference status bits and the target status bits.

[0009] The above technical solution, by establishing a mapping relationship based on the existing fault diagnosis communication protocol, can directly apply the state definition of the reference state bit (i.e., the state bit consistent with the target definition) to the target state bit, greatly simplifying the fault code interpretation process. Furthermore, since the content represented by the target definition is consistent with the target diagnostic information, a unified fault description language is established, which facilitates fault information exchange and processing across devices (between the master controller and slave controllers).

[0010] In combination with the first aspect and the above implementation methods, in some implementation methods of the first aspect, generating the target diagnostic code of the slave controller based on the preset mapping relationship and the target diagnostic information includes: determining the logical value corresponding to the reference state bit based on the target diagnostic information; mapping the logical value corresponding to the reference state bit to the logical value corresponding to the target state bit based on the mapping relationship; and generating the target diagnostic code based on the logical value corresponding to the target state bit.

[0011] The above technical solution effectively improves diagnostic accuracy because the generation of the target diagnostic code is based on a precise match between the target diagnostic information and preset mapping rules. Direct mapping of logical values ​​also ensures the consistency and reliability of diagnostic results.

[0012] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the target definition includes a first definition representing that fault detection was not completed in the current power-on cycle, a second definition representing that a fault currently exists, and a third definition representing that a fault has occurred in the current power-on cycle. The target state bit includes a first target state bit, a second target state bit, and a third target state bit. Based on the reference state bit and the target state bit, the mapping relationship is generated, including: generating a first mapping relationship based on the reference state bit and the first target state bit whose state definition is the first definition; generating a second mapping relationship based on the reference state bit and the second target state bit whose state definition is the second definition; and generating a third mapping relationship based on the reference state bit and the third target state bit whose state definition is the third definition.

[0013] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the target diagnostic information includes: first diagnostic information corresponding to the first definition, second diagnostic information corresponding to the second definition, and third diagnostic information corresponding to the third definition; generating a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information includes: mapping the first diagnostic information to a logical value corresponding to the first target state bit based on the first mapping relationship; mapping the second diagnostic information to a logical value corresponding to the second target state bit based on the second mapping relationship; mapping the third diagnostic information to a logical value corresponding to the third target state bit based on the third mapping relationship; and combining the logical values ​​corresponding to the first target state bit, the second target state bit, and the third target state bit to obtain the target diagnostic code.

[0014] The above technical solution, by mapping the first, second, and third diagnostic information to the first, second, and third definitions respectively, and further mapping them to the logical values ​​of target status bits, can transform complex diagnostic information to obtain target diagnostic codes that the main controller can recognize. This facilitates the main controller's management of diagnostic information uploaded from the slave controller. Furthermore, since each target status bit is directly associated with specific diagnostic information, the generated diagnostic code can more accurately reflect the current status of the slave controller. By combining the logical values ​​of multiple target status bits, the main controller can effectively manage the diagnostic information uploaded from the slave controller, while also improving the comprehensiveness and accuracy of the diagnosis.

[0015] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the target diagnostic information includes the effective status of the target diagnostic information, which includes valid and invalid. Before obtaining the target diagnostic information obtained by the slave controller through self-fault diagnosis, the method further includes: determining whether the current status information of the slave controller meets the preset conditions for performing self-fault diagnosis; if the current status information does not meet the preset conditions, determining that the effective status of the target diagnostic information is invalid; if the current status information meets the preset conditions, determining that the effective status of the target diagnostic information is valid.

[0016] The above technical solution, by introducing the concept of "effective status," clearly distinguishes between valid and invalid diagnostic information. When the status of the controller does not meet preset conditions, the target diagnostic information is marked as invalid; otherwise, it is valid. This mechanism helps to quickly identify which diagnostic results are reliable and which need to be ignored during subsequent processing, thereby reducing interference from invalid data and improving diagnostic efficiency.

[0017] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the target diagnostic code includes a fourth target status bit, which is used to characterize the effective status of the target diagnostic information. After obtaining the target diagnostic information obtained from the controller's self-fault diagnosis, the method further includes: determining the logical value corresponding to the fourth target status bit based on the effective status of the target diagnostic information; wherein, if the effective status of the target diagnostic information is invalid, the logical value corresponding to the fourth target status bit is a first logical value, and if the effective status of the target diagnostic information is valid, the logical value corresponding to the fourth target status bit is a second logical value.

[0018] The above technical solution uses the fourth target status bit in the target diagnostic code to represent the effectiveness status of diagnostic information, providing intuitive information guidance for subsequent fault analysis and system maintenance. The main controller can quickly identify which diagnostic codes represent valid diagnostic information generated under appropriate conditions by using the target diagnostic codes uploaded from the controller, which helps to quickly locate problems and take targeted maintenance measures.

[0019] Secondly, a diagnostic information transmission device is provided, comprising: an acquisition module for acquiring target diagnostic information obtained by a slave controller performing self-fault diagnosis; a generation module for generating a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information; wherein the target diagnostic code includes multiple target status bits that the master controller can recognize, the mapping relationship is the relationship between reference status bits in the fault diagnosis communication protocol and target status bits in the target diagnostic code; the fault diagnosis communication protocol is the communication protocol between the master controller and the fault diagnosis tool; and an upload module for uploading the target diagnostic code to the master controller for management by the master controller.

[0020] In conjunction with the second aspect, in some implementations of the second aspect, the device further includes a second generation module, which is specifically used to: determine multiple status bits of the fault diagnosis code included in the fault diagnosis communication protocol and the status definitions of the multiple status bits respectively; determine the status bits in the fault diagnosis communication protocol whose status definitions are consistent with the target definition as reference status bits; wherein the content represented by the target definition is consistent with the content represented by the target diagnostic information; and generate the mapping relationship based on the reference status bits and the target status bits.

[0021] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the generation module is specifically used to: determine the logical value corresponding to the reference state bit based on the target diagnostic information; map the logical value corresponding to the reference state bit to the logical value corresponding to the target state bit based on the mapping relationship; and generate the target diagnostic code based on the logical value corresponding to the target state bit.

[0022] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the target definition includes a first definition representing that fault detection was not completed in the current power-on cycle, a second definition representing that a fault currently exists, and a third definition representing that a fault has occurred in the current power-on cycle. The target state bit includes a first target state bit, a second target state bit, and a third target state bit. The second generation module includes a generation unit, which is specifically used to: generate a first mapping relationship based on the reference state bit and the first target state bit, which are defined as state bits of the first definition; generate a second mapping relationship based on the reference state bit and the second target state bit, which are defined as state bits of the second definition; and generate a third mapping relationship based on the reference state bit and the third target state bit, which are defined as state bits of the third definition.

[0023] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the target diagnostic information includes: first diagnostic information corresponding to the first definition, second diagnostic information corresponding to the second definition, and third diagnostic information corresponding to the third definition; the generation module is further specifically used to: map the first diagnostic information to a logical value corresponding to the first target state bit based on the first mapping relationship; map the second diagnostic information to a logical value corresponding to the second target state bit based on the second mapping relationship; map the third diagnostic information to a logical value corresponding to the third target state bit based on the third mapping relationship; and combine the logical values ​​corresponding to the first target state bit, the second target state bit, and the third target state bit to obtain the target diagnostic code.

[0024] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the target diagnostic information includes the effective status of the target diagnostic information, which includes valid and invalid. The device also includes a judgment module, which is specifically used to: determine whether the current status information of the slave controller meets the preset conditions for performing self-fault diagnosis; if the current status information does not meet the preset conditions, determine that the effective status of the target diagnostic information is invalid; if the current status information meets the preset conditions, determine that the effective status of the target diagnostic information is valid.

[0025] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the target diagnostic code includes a fourth target status bit, which is used to characterize the effective status of the target diagnostic information. The device also includes a determining module, which is specifically used to: determine the logical value corresponding to the fourth target status bit based on the effective status of the target diagnostic information; wherein, if the effective status of the target diagnostic information is invalid, the logical value corresponding to the fourth target status bit is a first logical value, and if the effective status of the target diagnostic information is valid, the logical value corresponding to the fourth target status bit is a second logical value.

[0026] Thirdly, a vehicle is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the vehicle to perform the diagnostic information transmission method in the first aspect and any possible implementation thereof.

[0027] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to execute the diagnostic information transmission method in the first aspect and any possible implementation thereof.

[0028] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the diagnostic information transmission method of the first aspect and any possible implementation thereof. Attached Figure Description

[0029] Figure 1 This is a schematic flowchart illustrating a method for transmitting diagnostic information provided in an embodiment of this application;

[0030] Figure 2 This is a schematic diagram illustrating a process of transmitting diagnostic information from the controller to the main controller, provided in an embodiment of this application.

[0031] Figure 3 This is a schematic diagram of the structure of a diagnostic information transmission device provided in an embodiment of this application;

[0032] Figure 4 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation

[0033] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0034] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0035] Currently, with the continuous development of science and technology, vehicles have become an indispensable part of people's daily lives. To ensure driving safety, it is necessary to obtain vehicle fault information in a timely manner and to repair and handle the vehicles based on this information.

[0036] Typically, each ECU in a vehicle corresponds to a unique CAN ID. During vehicle fault diagnosis, technicians can identify which ECU sent specific information or reported a fault by reading messages with a specific CAN ID, facilitating quick location of the faulty ECU and enabling subsequent repairs. Current OBD communication protocols only define CAN IDs for eight ECUs, but many vehicles have far more than eight ECUs, inevitably leading to situations where some controllers cannot be assigned suitable CAN IDs.

[0037] Based on this, some ECUs in the vehicle can be configured as slave controllers, while others can be configured as master controllers. A corresponding CAN ID can be assigned to the master controller, which then uploads fault diagnosis information to the master controller, which manages this information. However, currently, the fault diagnosis information reported by the slave controllers to the master controller is often inconvenient for the master controller to manage.

[0038] The inventors of this application have discovered that, currently, a slave controller can convert target diagnostic information into binary data and then upload the binary data to a master controller. Simultaneously, since the master controller also stores the meaning corresponding to this binary data, after receiving the binary data uploaded by the slave controller, the master controller can parse the binary data to obtain the specific diagnostic results from the slave controller. Specifically, the meaning corresponding to the aforementioned binary data can be the meaning of each bit in the binary data.

[0039] Specifically, the fault diagnosis information reported from the controller to the main controller may not fully consider the need for a detailed description of the fault information. It may only transmit simplified fault codes or statuses. For example, the transmitted fault diagnosis information may be in the form of two bits (bit1 represents a fault and bit0 represents detection completion) or in the form of a single bit (bit0 represents a fault).

[0040] For example, the diagnostic code uploaded from the slave controller to the master controller can be "1". Since the master controller stores the meaning of each bit in the binary data, after receiving the diagnostic code "1", the master controller can parse the diagnostic code "1" and thus know that there is a fault in the slave controller.

[0041] However, if the slave controller transmits fault diagnosis information to the master controller in the form of two bits or one bit, the master controller can only know whether the slave controller has detected a fault and whether the slave controller has completed the detection, or can only know whether the slave controller has detected a fault, but cannot know other detailed fault descriptions or parameters, which makes it inconvenient for the master controller to manage.

[0042] To address the aforementioned technical problems, embodiments of this application provide a method for transmitting diagnostic information. The subject executing this method can be a vehicle, specifically a slave controller within the vehicle.

[0043] Figure 1 This is a schematic flowchart illustrating a method for transmitting diagnostic information provided in an embodiment of this application.

[0044] For example, such as Figure 1 As shown, the method 100 includes:

[0045] S101, Obtain target diagnostic information obtained from the controller's self-fault diagnosis.

[0046] S102, Based on the preset mapping relationship and the target diagnostic information, generate the target diagnostic code of the slave controller.

[0047] The target diagnostic code includes multiple target status bits that the main controller can recognize. The mapping relationship is the relationship between the reference status bits in the fault diagnosis communication protocol and the target status bits in the target diagnostic code. The fault diagnosis communication protocol is the communication protocol between the main controller and the fault diagnosis tool.

[0048] S103, upload the target diagnostic code to the main controller so that the main controller can manage the target diagnostic code.

[0049] In this embodiment, target diagnostic information obtained from the self-diagnosis of the slave controller is acquired. This target diagnostic information can be used to quickly locate specific problems in the slave controller. Using a preset mapping relationship, the target diagnostic information of the slave controller is converted into a target diagnostic code that the master controller can recognize, facilitating the master controller's management and recognition. Since the target diagnostic code contains multiple target status bits that the master controller can recognize, after uploading the target diagnostic code to the master controller, the master controller can gain a more detailed understanding of the slave controller's status based on these multiple target status bits. This helps the master controller quickly identify potential problems, facilitates the master controller's management of target diagnostic information and enables preventative measures, effectively ensuring vehicle safety. Furthermore, since the above mapping relationship is the relationship between the reference status bits in the fault diagnosis communication protocol and the target status bits in the target diagnostic code, and this fault diagnosis communication protocol is the communication protocol between the master controller and the fault diagnosis tool, the master controller, upon receiving the target diagnostic code, can directly recognize the target diagnostic code based on the existing fault diagnosis communication protocol and the preset mapping relationship. This further facilitates the master controller's management of fault information and ensures the consistency of the diagnostic process. Meanwhile, timely self-diagnosis by the controller and centralized management of fault information by the main controller help to detect potential vehicle problems in advance and reduce safety hazards caused by failure to maintain in a timely manner.

[0050] The following is about Figure 1 The implementation methods of each step in the illustrated embodiment are explained in detail below:

[0051] Regarding S101 above, it is understood that the controller mentioned above specifically refers to the controller in the vehicle that cannot directly establish communication with the fault diagnosis tool.

[0052] As mentioned earlier, since the current OBD communication protocol only defines CAN IDs for 8 ECUs, it can only be assigned to a maximum of 8 ECUs in a vehicle. The aforementioned slave controller is the controller in the vehicle that has not been assigned a CAN ID. Therefore, the slave controller cannot directly establish communication with the fault diagnosis tool. Instead, it needs to report relevant fault diagnosis information to the master controller, which then reports the fault diagnosis information to the fault diagnosis tool.

[0053] Furthermore, the process of self-diagnosing faults from the controller can be understood as follows: the controller integrates diagnostic programs or algorithms that can periodically or automatically detect whether its hardware and software functions are working properly, and monitor whether there are any abnormalities in the components or systems it controls, without relying on external commands. Specific diagnostic content may include, but is not limited to, diagnosing the rationality of the controller's internal sensor data, diagnosing the effectiveness of the actuator response, and diagnosing the connectivity of communication lines. Specifically, if the controller diagnoses that its internal sensor data is unreasonable, a fault in the controller can be determined; similarly, if the controller diagnoses that the actuator's response is not timely enough, a fault in the controller can also be determined; and if the controller diagnoses that the communication line is not connected or has connectivity problems, a fault in the controller can also be determined.

[0054] The diagnostic results obtained by the controller after self-fault diagnosis, namely the target diagnostic information mentioned above, may include the satisfaction of the enable conditions for the controller to perform self-fault diagnosis, the fault occurrence of the controller in the current power-on cycle, the current fault status of the controller, and the completion status of the fault detection of the controller in the current power-on cycle.

[0055] Furthermore, to transmit fault diagnosis information from the controller to the main controller in a more detailed manner, facilitating corresponding fault management by the main controller, this embodiment of the application can map the target diagnostic information obtained from the controller's self-fault diagnosis according to a preset mapping relationship to obtain a target diagnostic code that fully reflects the self-fault diagnosis process.

[0056] Regarding S102 above, it can be understood that the preset mapping relationship can specifically be the relationship between the reference status bit in the fault diagnosis communication protocol and the target status bit in the target diagnostic code.

[0057] The aforementioned target diagnostic code includes target status bits that the main controller can recognize. These target status bits can be multiple status bits, each with its own corresponding status definition. As mentioned earlier, the main controller is the controller in the vehicle assigned a CAN ID. It can communicate with fault diagnosis tools and is able to recognize and manage the target diagnostic codes uploaded from the controller.

[0058] Furthermore, the aforementioned fault diagnosis communication protocol can be a protocol for diagnostic communication of the controller in a vehicle, specifically a protocol followed by the communication between the main controller and the fault diagnosis tool. To make the target diagnostic codes uploaded from the controller to the main controller more uniform and standardized, embodiments of this application can generate the aforementioned preset mapping relationship based on the fault diagnosis communication protocol.

[0059] In one possible implementation, the generation of this mapping relationship may include the following steps S21 to S23:

[0060] S21: Determine the multiple status bits of the fault diagnosis code contained in the fault diagnosis communication protocol and the status definition of each of the multiple status bits.

[0061] It is understandable that, as mentioned above, the aforementioned fault diagnosis communication protocol may specifically be the protocol followed by the communication between the main controller and the fault diagnosis tool, and this fault diagnosis communication protocol may be the ISO 14229 protocol.

[0062] Furthermore, when the fault diagnosis communication protocol is the ISO 14229 protocol, multiple status bits of the Diagnostic Trouble Codes (DTCs) contained in the ISO 14229 protocol and the status definitions of each of these multiple status bits can be determined.

[0063] Specifically, the ISO 14229 protocol typically stores eight different status bits of the DTC and the definitions corresponding to these eight different status bits.

[0064] Examples are shown in Table 1:

[0065] Table 1

[0066]

[0067] It is understandable that Bit0 in Table 1 above specifically indicates the diagnostic result of the most recently performed test. If the diagnostic result is a fault, Bit0 is set to 1.

[0068] Bit1 in Table 1 above specifically indicates whether at least one diagnostic message indicating a fault has been reported within the current operation cycle. If it is determined that at least one diagnostic message indicating a fault has been reported within the current operation cycle, then Bit1 is set to 1. The aforementioned current operation cycle can be understood as the cycle from when the vehicle is powered on to when it is powered off.

[0069] Bit2 in Table 1 above can be understood as a pending DTC. Specifically, when a DTC meets the fault trigger condition, Bit2 can be set to 1; if the fault trigger condition is not met after a period of time, Bit2 will be set to 0. Specifically, meeting the fault trigger condition can be understood as: the fault has already occurred; not meeting the fault trigger condition can be understood as: after the fault is temporarily resolved or the situation returns to normal, the controller will reset Bit2 to 0 after a period of time, indicating that the previous fault state has been resolved.

[0070] Bit 3 in Table 1 above can be understood as a definite DTC. Specifically, when Bit 3 is set to 1, it indicates that the fault has occurred for some time, but does not mean that the fault still exists now; it can be understood as a historical fault.

[0071] In Table 1 above, Bit 4 specifically indicates whether a test was performed after clearing the diagnostic information. Since not all DTC tests begin upon power-on, Bit 4 is used to indicate whether a complete test was performed after the last clearing of the diagnostic message. If a complete test was performed, regardless of the result, Bit 4 is set to 0; otherwise, it is set to 1.

[0072] In Table 1 above, Bit 5 specifically indicates whether a fault exists after clearing diagnostic information. If no test is performed after clearing diagnostic information, or if the test result indicates no fault exists, Bit 5 is set to 0; if a test is performed after clearing diagnostic information and the test result indicates a fault exists, Bit 5 is set to 1. Typically, Bit 4 and Bit 5 can be used together.

[0073] Bit 6 in Table 1 above specifically indicates whether the detection is completed within the current operation cycle. If it is determined that the detection is completed within the current operation cycle, Bit 6 is set to 0; if it is determined that the detection is not completed within the current operation cycle, Bit 6 is set to 1.

[0074] Bit 7 in Table 1 above can be used to report warning indications, such as warning lights on the dashboard. However, not all DTCs will have warning indications (not all faults will trigger warning indications. Some faults may be considered minor or have little impact on safe driving, so even if they exist, they will not activate the warning lights). If there is no warning related to the DTC, Bit 7 is set to 0; if the DTC has a related warning indication, Bit 7 should also be set to 1 when Bit 3 is set to 1.

[0075] Furthermore, after determining the multiple status bits in the aforementioned fault diagnostic code and their respective status definitions, the status bits in the fault diagnostic communication protocol whose status definitions are consistent with the target definition can be determined as reference status bits.

[0076] S21: Determine the state bits in the fault diagnosis communication protocol whose state definitions are consistent with the target definitions as reference state bits.

[0077] The content represented by the target definition is consistent with the content represented by the target diagnostic information.

[0078] It is understandable that the above target definition can be selected based on actual needs. This target definition includes multiple definitions that can reflect key information in the diagnostic process. Among them, the key information can be used to reflect the occurrence, existence, and completion status of the fault in the diagnostic process. Through this key information, a relatively detailed understanding of the diagnostic process of the controller can be obtained, which can help with subsequent fault maintenance.

[0079] Specifically, this key information may include information characterizing the current fault state of the controller, information characterizing the completion status of the diagnostic process, and information characterizing past fault occurrences of the controller.

[0080] As mentioned earlier, the target diagnostic information includes information related to the occurrence of faults in the slave controller during this power-on cycle, the current fault status of the slave controller, and the completion status of fault detection in the slave controller during this power-on cycle. Based on this, the target definition can also be a state definition consistent with the content represented by each piece of information in the target diagnostic information.

[0081] For example, Bit0, which indicates whether a fault exists, Bit1, which indicates whether a fault has occurred in the current operation cycle, and Bit6, which indicates whether the current operation cycle has completed the detection, can be identified as the aforementioned reference status bits.

[0082] S23: Generate the mapping relationship based on the reference state bit and the target state bit.

[0083] Understandably, after determining the reference status bit, a mapping relationship can be established between the reference status bit and the target status bit in the target diagnostic code. For example, the mapping relationship between reference status bit 6 and target status bit 0 in the target diagnostic code, the mapping relationship between reference status bit 0 and target status bit 1 in the target diagnostic code, and the mapping relationship between reference status bit 1 and target status bit 2 in the target diagnostic code.

[0084] The above method, by establishing a mapping relationship based on the existing fault diagnosis communication protocol, can directly apply the state definition of the reference state bit (i.e., the state bit consistent with the target definition) to the target state bit, greatly simplifying the fault code interpretation process. Furthermore, since the content represented by the target definition is consistent with the target diagnostic information, a unified fault description language is established, which facilitates fault information exchange and processing across devices (between the master controller and slave controllers).

[0085] Furthermore, after obtaining the target diagnostic information, a target diagnostic code containing the target status bits that the main controller can recognize can be generated based on the mapping relationship and the target diagnostic information.

[0086] In one possible implementation, generating the target diagnostic code from the controller based on a preset mapping relationship and the target diagnostic information may include the following steps S31 to S34:

[0087] S31: Based on the target diagnostic information, determine the logic value corresponding to the reference state bit.

[0088] Understandably, based on the specific content of the target diagnostic information, the logical value (usually 0 or 1) corresponding to the reference status bit can be determined. For example, if the target diagnostic information indicates that a fault has occurred, the logical value of the corresponding reference status bit can be 1, indicating that "the fault exists".

[0089] S32: Based on this mapping relationship, map the logical value corresponding to the reference state bit to the logical value corresponding to the target state bit.

[0090] It is understandable that, as mentioned above, the mapping relationship can be the mapping relationship between reference status bit 6 and target status bit 0 in the target diagnostic code, the mapping relationship between reference status bit 0 and target status bit 1 in the target diagnostic code, and the mapping relationship between reference status bit 1 and target status bit 2 in the target diagnostic code.

[0091] For example, if the logical value corresponding to Bit0 is determined to be "1" based on the target diagnostic information, the logical value corresponding to Bit0 is mapped to the logical value corresponding to the target status bit bit1 in the target diagnostic code based on the mapping relationship, that is, the logical value corresponding to bit1 is "1".

[0092] S33: Generate the target diagnostic code based on the logical value corresponding to the target status bit.

[0093] As mentioned above, the target diagnostic code contains multiple target status bits, and the logical values ​​corresponding to these multiple target status bits can be arranged in a preset order. For example, if the target diagnostic code contains bit2, bit1, and bit0, the logical values ​​corresponding to bit2, bit1, and bit0 can be arranged in the order from bit2 to bit0.

[0094] Understandably, after determining the logical values ​​corresponding to each target state bit in the target diagnostic code, the target diagnostic code can be generated based on these logical values. For example, if the logical value corresponding to bit 0 is determined to be "1", the logical value corresponding to bit 1 is "1", and the logical value corresponding to bit 2 is "0", then the target diagnostic code (bits 2 to bit 0) can be 011.

[0095] The above method effectively improves diagnostic accuracy because the generation of the target diagnostic code is based on a precise match between the target diagnostic information and preset mapping rules. Direct mapping of logical values ​​also ensures the consistency and reliability of diagnostic results.

[0096] As mentioned earlier, the state bits in the fault diagnosis communication protocol that are consistent with the state definition and the target definition can be determined as reference state bits, and a mapping relationship can be generated based on the reference state bits and the target state bits.

[0097] For example, the target definition includes a first definition representing that the fault detection was not completed in the current power-on cycle, a second definition representing that a fault currently exists, and a third definition representing that a fault has occurred in the current power-on cycle. The target state bit includes a first target state bit, a second target state bit, and a third target state bit.

[0098] In one possible implementation, generating the mapping relationship based on the reference state bit and the target state bit includes: generating a first mapping relationship based on the reference state bit defined by the first definition and the first target state bit; generating a second mapping relationship based on the reference state bit defined by the second definition and the second target state bit; and generating a third mapping relationship based on the reference state bit defined by the third definition and the third target state bit.

[0099] It is understandable that after obtaining the target diagnostic information, a target definition matching the target diagnostic information can be determined in the aforementioned fault diagnosis communication protocol, that is, a target definition consistent with the content represented by the target diagnostic information can be determined. Furthermore, since the fault diagnosis communication protocol contains a state definition corresponding to each state bit, a reference state bit corresponding to that target definition can be further determined.

[0100] Specifically, if the first definition in the target definition is used to characterize the incomplete detection within the current power-on cycle, then the state bit in the fault diagnosis communication protocol whose state definition is consistent with the first definition can be determined as the reference state bit. This reference state bit is used to characterize the completeness of the diagnostic process. Then, based on this state definition, the reference state bit of the first definition, and the first target state bit, a first mapping relationship is generated.

[0101] Similarly, if the second definition in the target definition is used to characterize the current fault, then the state bits in the fault diagnosis communication protocol whose state definitions are consistent with the second definition can be determined as reference state bits. These reference state bits are used to record the existence of historical faults during the diagnosis process. Then, based on this state definition, the reference state bits of the second definition, and the second target state bits, a second mapping relationship is generated.

[0102] If the third definition in the target definition is used to characterize a fault that has occurred within the current power-on cycle, then the state bits in the fault diagnosis communication protocol whose state definitions are consistent with this third definition can be determined as reference state bits. These reference state bits are used to characterize the presence of the current fault. Then, based on this state definition, the reference state bits of the third definition, and the third target state bits, a third mapping relationship is generated.

[0103] For example, if the above fault diagnosis communication protocol is the ISO 14229 protocol, and the above target definition includes a definition for characterizing the incomplete detection in the current power-on cycle, a definition for characterizing the fault detected in the current power-on cycle, and a definition for characterizing the fault detected at the current moment, then Bit0, Bit1 and Bit6 in Table 1 can be determined as reference status bits.

[0104] Furthermore, a mapping relationship between the aforementioned reference status bits and target status bits can be established, namely the first mapping relationship, the second mapping relationship, and the third mapping relationship. If the aforementioned reference status bits include Bit0, Bit1, and Bit6 in the ISO 14229 protocol, and the target status bits include Bit0, Bit1, and Bit2, then the mapping relationship can include the mapping relationship between Bit6 and Bit0, the mapping relationship between Bit0 and Bit1, and the mapping relationship between Bit1 and Bit2.

[0105] For example, the above mapping relationship can be shown in Table 2:

[0106] Table 2

[0107]

[0108] It is understandable that the reference state bits in Table 2 above are Bit6, Bit0, and Bit1 in Table 1 mentioned above. Since there is a mapping relationship between the reference state bits and the target state bits, the state definition corresponding to the reference state bits is also the state definition corresponding to the target state bits.

[0109] Furthermore, after obtaining the target diagnostic information, a target diagnostic code containing the target status bits that the main controller can recognize can be generated based on the mapping relationship in Table 2 above and the target diagnostic information.

[0110] In one possible implementation, the target diagnostic information includes: first diagnostic information corresponding to the first definition, second diagnostic information corresponding to the second definition, and third diagnostic information corresponding to the third definition; generating a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information includes: mapping the first diagnostic information to a logical value corresponding to the first target state bit based on the first mapping relationship; mapping the second diagnostic information to a logical value corresponding to the second target state bit based on the second mapping relationship; mapping the third diagnostic information to a logical value corresponding to the third target state bit based on the third mapping relationship; and combining the logical values ​​corresponding to the first target state bit, the second target state bit, and the third target state bit to obtain the target diagnostic code.

[0111] It is understandable that, as mentioned above, the first definition is a definition that characterizes the failure to complete fault detection in this power-on cycle, and the first diagnostic information corresponding to this first definition can be information related to the completion status of fault detection of the controller in this power-on cycle.

[0112] The second definition mentioned above is a definition that characterizes the current fault. The second diagnostic information corresponding to this second definition can be the fault status information of the current slave controller.

[0113] The third definition mentioned above is a definition that characterizes a fault that has occurred during the current power-on cycle. The third diagnostic information corresponding to this third definition can be information related to the fault occurrence of the controller during the current power-on cycle.

[0114] For example, if the above target diagnostic information indicates that no fault has occurred in the current power-on cycle, there is currently no fault, and fault detection has been completed in the current power-on cycle, then based on the first diagnostic information "fault detection has been completed in the current power-on cycle" corresponding to the first definition, the logical value corresponding to the reference status bit 6 can be determined to be 0. Then, based on the first mapping relationship, the logical value corresponding to bit 6 is mapped to the logical value corresponding to bit 0, and the logical value corresponding to the first target status bit bit 0 is obtained to be 0.

[0115] Based on the second diagnostic information "no fault exists" corresponding to the second definition, the logical value corresponding to the reference status bit Bit0 can be determined to be 0. Then, based on the second mapping relationship, the logical value corresponding to Bit0 is mapped to the logical value corresponding to bit1, and the logical value corresponding to the second target status bit Bit1 is obtained to be 0.

[0116] Based on the third diagnostic information "No fault occurred during this power-on cycle" corresponding to the third definition, the logical value corresponding to the reference status bit Bit1 can be determined to be 0. Then, based on the third mapping relationship, the logical value corresponding to Bit1 is mapped to the logical value corresponding to bit2, and the logical value corresponding to the third target status bit Bit2 is obtained to be 0.

[0117] Then, based on the logic values ​​corresponding to the first target status bit0, the second target status bit1, and the third target status bit2, the target diagnostic code (bit2 to bit0) can be generated: 000.

[0118] The above method, by mapping the first, second, and third diagnostic information to the first, second, and third definitions respectively, and further mapping them to the logical values ​​of target status bits, can transform complex diagnostic information into target diagnostic codes that the main controller can recognize. This facilitates the main controller's management of diagnostic information uploaded from the slave controller. Furthermore, since each target status bit is directly associated with specific diagnostic information, the generated diagnostic code more accurately reflects the current status of the slave controller. By combining the logical values ​​of multiple target status bits, the main controller can effectively manage the diagnostic information uploaded from the slave controller, while also improving the comprehensiveness and accuracy of the diagnosis.

[0119] To further improve the accuracy of diagnostic information reported from the controller to the main controller, this embodiment of the application can also verify each diagnostic information reported from the controller to the main controller, that is, determine whether the diagnostic information is valid.

[0120] Specifically, determining whether the diagnostic information is valid typically involves checking whether the controller meets the preset conditions for self-diagnosis. If the controller meets the preset conditions, the diagnostic information is determined to be valid; otherwise, it is determined to be invalid.

[0121] In one possible implementation, the target diagnostic information includes the effective status of the target diagnostic information, which includes valid and invalid. Before acquiring the target diagnostic information obtained from the self-fault diagnosis of the controller, the method further includes: determining whether the current status information of the slave controller meets the preset conditions for performing self-fault diagnosis; if the current status information does not meet the preset conditions, determining that the effective status of the target diagnostic information is invalid; if the current status information meets the preset conditions, determining that the effective status of the target diagnostic information is valid.

[0122] Understandably, before initiating self-diagnosis from the controller, it is advisable to assess whether the controller's current operating status or environmental conditions meet the preset conditions for self-diagnosis. These preset conditions may include, but are not limited to: the vehicle being stationary, the electrical system having a stable power supply, no ongoing emergency operations, and sensors and actuators being functioning normally.

[0123] Specifically, determining whether the current status information of the slave controller meets the preset conditions for self-diagnosis can include: the slave controller can check its own status, including but not limited to whether the power supply is stable, whether the internal software is running normally, and whether the necessary sensors and actuators are available. Furthermore, the slave controller needs to ensure that its communication links with the main controller and other related systems can communicate smoothly, including whether the network connection (such as the CAN bus) is stable and whether the communication protocol is compatible. Additionally, it is necessary to consider whether the vehicle's current operating environment and conditions are suitable for self-diagnosis, such as whether the vehicle is stationary, in a specific driving mode, or whether there is an ongoing emergency operation.

[0124] Furthermore, if the current status information of the controller does not meet the aforementioned preset conditions, it means that the controller may not be able to obtain accurate results when performing self-fault diagnosis. Therefore, the controller can determine that the effective status of the target diagnostic information to be acquired is "invalid".

[0125] Conversely, if the controller's current state meets all preset conditions, it indicates that reliable self-diagnosis can be performed. In this case, the target diagnostic information will be marked as "valid," meaning that the subsequent self-test process and the resulting diagnostic results are reliable and can be used as the basis for subsequent processing or maintenance decisions.

[0126] The method described above clearly distinguishes between valid and invalid diagnostic information by introducing the concept of "effective status." When the controller's status does not meet preset conditions, the target diagnostic information is marked as invalid; otherwise, it is considered valid. This mechanism helps to quickly identify which diagnostic results are reliable and which should be ignored during subsequent processing, thereby reducing interference from invalid data and improving diagnostic efficiency.

[0127] As mentioned above, the diagnostic information uploaded from the controller to the main controller is usually in the form of a target diagnostic code. Based on this, the effective status of the target diagnostic information determined above can be used as a status bit in the target diagnostic code, thereby transmitting the effective status of the target diagnostic information to the main controller.

[0128] In one possible implementation, the target diagnostic code includes a fourth target status bit, which is used to characterize the effective status of the target diagnostic information. After acquiring the target diagnostic information obtained from the controller's self-fault diagnosis, the method further includes: determining the logical value corresponding to the fourth target status bit based on the effective status of the target diagnostic information; wherein, if the effective status of the target diagnostic information is invalid, the logical value corresponding to the fourth target status bit is a first logical value, and if the effective status of the target diagnostic information is valid, the logical value corresponding to the fourth target status bit is a second logical value.

[0129] It is understandable that the target diagnostic code may also include a fourth target status bit, which is used to characterize the effective status of the target diagnostic information, that is, to reflect whether the target diagnostic information is effective.

[0130] Furthermore, after completing self-fault diagnosis from the controller and obtaining the target diagnostic information, the logic value corresponding to the fourth target status bit can be determined based on the effective status of the target diagnostic information. This logic value can typically be 0 or 1.

[0131] For example, if the effective status corresponding to the above target diagnostic information is invalid, the first logical value corresponding to the fourth target status bit can be "0"; conversely, if the effective status corresponding to the above target diagnostic information is valid, the second logical value corresponding to the fourth target status bit can be "1".

[0132] In some embodiments, "the enable condition for self-fault diagnosis from the controller is met" or "the target fault diagnosis information obtained from the controller's self-fault diagnosis is valid" can be defined as the state definition corresponding to the fourth target state bit in the target diagnostic code.

[0133] It is understood that the above enabling condition is the same as the preset condition mentioned earlier. Meeting the enabling condition indicates that the obtained target fault diagnosis information is valid. If the obtained target diagnosis information indicates that the target diagnosis information is valid, then the logical value corresponding to the fourth target status bit in the target diagnostic code can be determined to be "0". This fourth target status bit can be bit 3.

[0134] For example, if the target diagnostic information obtained by the controller through self-fault diagnosis indicates that the target fault diagnosis information of the controller is valid, the controller has experienced a fault in the current power-on cycle, the controller does not currently have a fault, and the controller has completed the detection in the current power-on cycle.

[0135] Based on the first mapping relationship and the first diagnostic information "the controller has completed the detection in this power-on cycle", the logical value of the first target status bit 0 in the target diagnostic code is "0"; based on the second mapping relationship and the second diagnostic information "there is no fault in the controller", the logical value of the second target status bit 1 in the target diagnostic code is "0"; based on the third mapping relationship and the third diagnostic information "the controller has experienced a fault in this power-on cycle", the logical value of the third target status bit 2 in the target diagnostic code is "1".

[0136] Based on the "target fault diagnosis information is valid", the logical value corresponding to the fourth target status bit 3 in the target diagnostic code is "1". Based on the logical values ​​corresponding to the first target status bit 0, the second target status bit 1, the third target status bit 2, and the fourth target status bit 3, the target diagnostic code (bit 3 to bit 0) from the controller can be generated as 1100.

[0137] The above method uses the fourth target status bit in the target diagnostic code to represent the effectiveness status of the diagnostic information, providing intuitive information guidance for subsequent fault analysis and system maintenance. The main controller can quickly identify which diagnostic codes represent valid diagnostic information generated under appropriate conditions by using the target diagnostic codes uploaded from the controller, which helps to quickly locate problems and take targeted maintenance measures.

[0138] Furthermore, after generating the aforementioned target diagnostic code, the target diagnostic code can be uploaded to the main controller.

[0139] Regarding S103 above, it is understood that the above target diagnostic code can also be called DTC.

[0140] Currently, standardized communication protocols are typically used when transmitting diagnostic information from the controller to the main controller. The size and structure of the data frames depend on the specific protocol used. These standardized communication protocols usually specify that the signals transmitting diagnostic information from the controller to the main controller are in standard frame format, i.e., 8-byte data frames.

[0141] Furthermore, since each byte typically contains 8 status bits, in this embodiment, the target diagnostic code (DTC) contains 4 status bits (bit3, bit2, bit1, and bit0). Therefore, each byte can transmit 2 DTCs. If the signal transmitting diagnostic information from the controller to the master controller is in the form of an 8-byte standard frame, then the controller can transmit 16 target diagnostic codes (DTCs) to the master controller each time it transmits diagnostic information.

[0142] In practical communication protocols, the size and content layout of data frames depend on the specific protocol specifications used. An 8-byte data frame can provide a large data capacity, but this does not mean that all bytes need to be used in every transmission. A data frame typically contains a data portion, possibly header information (such as identifiers, priority, etc.), and a trailer checksum or error detection code. The specific number of bytes used depends on the actual diagnostic information content to be transmitted.

[0143] For example, in some cases, only a few bytes may be needed to encode specific fault codes (DTCs) and status information, while the remaining bytes may be reserved or filled with specific default values, or the protocol itself may define some padding bits to ensure a fixed length of data frames to maintain communication synchronization and format consistency.

[0144] Understandably, the above-mentioned filling decisions and methods should follow the specifications of the adopted communication protocol to ensure that the main controller can correctly parse the received data.

[0145] After the main controller receives the target diagnostic code uploaded by the slave controller, it can parse the target diagnostic code according to the pre-agreed fault diagnosis communication protocol and the preset mapping relationship to find out the specific fault condition of the slave controller.

[0146] For example, if the target diagnostic code (bit3 to bit0) received by the main controller is 1110, then it is determined that the target diagnostic information is valid, a fault has occurred in the current operation cycle, a fault has been detected, and the current operation cycle has completed the detection.

[0147] If the target diagnostic code (bit3 to bit0) received by the main controller is 1100, then the target diagnostic information is determined to be valid. The detection was completed and a fault occurred in the current operation loop, but no fault occurred in this report.

[0148] If the target diagnostic code (bit3 to bit0) received by the main controller is 1000, then the target diagnostic information is determined to be valid. The detection has been completed in the current operation loop, but no fault was detected.

[0149] If the target diagnostic code (bit3 to bit0) received by the main controller is 0001, then the target diagnostic information is determined to be invalid and the detection has not been completed in the current operation loop.

[0150] If the target diagnostic code (bit3 to bit0) received by the main controller is 1001, then the target diagnostic information is determined to be valid, but the detection has not been completed in the current operation loop and there is no diagnostic result.

[0151] If the target diagnostic code (bit3 to bit0) received by the main controller is 0100, it is determined that the target diagnostic information is invalid. The detection was completed in the current operation loop, but no diagnosis was actually performed because the preset conditions for self-fault diagnosis were not met.

[0152] If the target diagnostic code (bit3 to bit0) received by the main controller is 1011, it is determined that the target diagnostic information is valid. However, the detection has not been completed in the current operation loop, but a fault is displayed, indicating that the reported result is unreliable.

[0153] If the target diagnostic code (bit3 to bit0) received by the main controller is 0110, it is determined that the detection has been completed in the current operation loop, but the target diagnostic information is invalid this time, but a fault is shown, indicating that the reported result is unreliable.

[0154] Furthermore, when initializing from the controller, the logic value corresponding to each status bit in the target diagnostic code of the controller is 0.

[0155] Specifically, the main controller evaluates the status bits of each target diagnostic code uploaded from the controller, such as confirming whether a fault currently exists, whether it is a historical fault, the severity of the fault, and the type of fault. By parsing these status bits, the main controller can quickly determine the current health status of the vehicle or system.

[0156] The main controller can also classify faults based on target diagnostic codes and status bits, such as distinguishing between sensor faults, actuator faults, circuit problems, and communication faults, and prioritize them according to the severity, scope of impact, and urgency of the faults. This allows for the rapid identification of issues requiring immediate attention.

[0157] The main controller also stores the parsed fault information, forming a fault history record. This helps with fault tracking, maintenance history management, and future fault prevention analysis. For serious faults or those requiring immediate attention, the main controller activates the warning system, notifying the driver via dashboard warning lights, audible alarms, or the in-vehicle infotainment system. It may also send a fault report to the service center via remote communication technology.

[0158] In addition, the main controller can also take proactive control strategies based on the nature of the fault, such as activating the backup system, limiting engine power, and adjusting the vehicle operating mode, to ensure safety and maintain basic operational capabilities.

[0159] Figure 2 This is a schematic diagram illustrating a process of transmitting diagnostic information from the controller to the main controller, as provided in an embodiment of this application.

[0160] For example, such as Figure 2As shown, a mapping relationship between the status bits in the fault diagnosis communication protocol and the status bits in the target diagnostic code can be generated first based on a fault diagnosis communication protocol, such as the ISO 14229 protocol. Then, a target diagnostic code can be generated from the controller to the main controller based on the target diagnostic information and the mapping relationship.

[0161] Among them, such as Figure 2 As shown, the fault diagnosis communication protocol contains multiple status bits and the status definition corresponding to each status bit, as shown in Table 1.

[0162] This mapping relationship includes each state bit in the embodiments of this application (i.e. Figure 2 The target status bit in the target status bit and the various status bits in the fault diagnosis communication protocol (i.e., Figure 2 The mapping relationship between the reference status bits (bits in the reference status bits) is defined as the mapping relationship between bit2 and bit1, bit1 and bit0, and bit0 and bit6. Additionally, it includes bit3, a custom bit defined in this embodiment, used to characterize the effective status of the target diagnostic information.

[0163] After generating the target diagnostic code from the controller and passing it to the main controller based on the target diagnostic information and the mapping relationship, the generated target diagnostic code can be uploaded to the main controller in the form of an 8-byte data frame.

[0164] Figure 3 This is a schematic diagram of the structure of a diagnostic information transmission device provided in an embodiment of this application.

[0165] For example, such as Figure 3 As shown, the device 300 includes:

[0166] The acquisition module 301 is used to acquire target diagnostic information obtained from the controller's self-fault diagnosis.

[0167] The generation module 302 is used to generate the target diagnostic code of the slave controller based on the preset mapping relationship and the target diagnostic information.

[0168] The target diagnostic code includes multiple target status bits that the main controller can recognize. The mapping relationship is the relationship between the reference status bits in the fault diagnosis communication protocol and the target status bits in the target diagnostic code. The fault diagnosis communication protocol is the communication protocol between the main controller and the fault diagnosis tool.

[0169] The upload module 303 is used to upload the target diagnostic code to the main controller so that the main controller can manage the target diagnostic code.

[0170] Optionally, the device further includes a second generation module, which is specifically used to: determine multiple status bits of the fault diagnosis code included in the fault diagnosis communication protocol and the status definitions of the multiple status bits respectively; determine the status bits in the fault diagnosis communication protocol whose status definitions are consistent with the target definitions as reference status bits; wherein the content represented by the target definitions is consistent with the content represented by the target diagnostic information; and generate the mapping relationship based on the reference status bits and the target status bits.

[0171] In one possible implementation, the generation module is specifically used to: determine the logical value corresponding to the reference state bit based on the target diagnostic information; map the logical value corresponding to the reference state bit to the logical value corresponding to the target state bit based on the mapping relationship; and generate the target diagnostic code based on the logical value corresponding to the target state bit.

[0172] In one possible implementation, the target definition includes a first definition representing that fault detection was not completed in the current power-on cycle, a second definition representing that a fault currently exists, and a third definition representing that a fault has occurred in the current power-on cycle. The target state bit includes a first target state bit, a second target state bit, and a third target state bit. The second generation module includes a generation unit, which is specifically used to: generate a first mapping relationship based on the reference state bit and the first target state bit, which are defined as state bits of the first definition; generate a second mapping relationship based on the reference state bit and the second target state bit, which are defined as state bits of the second definition; and generate a third mapping relationship based on the reference state bit and the third target state bit, which are defined as state bits of the third definition.

[0173] In one possible implementation, the target diagnostic information includes: first diagnostic information corresponding to the first definition, second diagnostic information corresponding to the second definition, and third diagnostic information corresponding to the third definition; the generation module is further specifically used to: map the first diagnostic information to a logical value corresponding to the first target state bit based on the first mapping relationship; map the second diagnostic information to a logical value corresponding to the second target state bit based on the second mapping relationship; map the third diagnostic information to a logical value corresponding to the third target state bit based on the third mapping relationship; and combine the logical values ​​corresponding to the first target state bit, the second target state bit, and the third target state bit to obtain the target diagnostic code.

[0174] In one possible implementation, the target diagnostic information includes the effective status of the target diagnostic information, which includes valid and invalid. The device also includes a judgment module, which is specifically used to: determine whether the current status information of the slave controller meets the preset conditions for self-fault diagnosis; if the current status information does not meet the preset conditions, determine that the effective status of the target diagnostic information is invalid; if the current status information meets the preset conditions, determine that the effective status of the target diagnostic information is valid.

[0175] Optionally, the target diagnostic code includes a fourth target status bit, which is used to characterize the effective status of the target diagnostic information. The device further includes a determining module, which is specifically used to: determine the logical value corresponding to the fourth target status bit based on the effective status of the target diagnostic information; wherein, if the effective status of the target diagnostic information is invalid, the logical value corresponding to the fourth target status bit is a first logical value, and if the effective status of the target diagnostic information is valid, the logical value corresponding to the fourth target status bit is a second logical value.

[0176] Figure 4 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.

[0177] For example, such as Figure 4 As shown, the vehicle 400 includes a memory 401 and a processor 402. The memory 401 stores executable program code 4011, and the processor 402 is used to call and execute the executable program code 4011 to perform a diagnostic information transmission method.

[0178] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a diagnostic information transmission method provided in embodiments of this application.

[0179] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0180] When each functional module is divided according to its corresponding function, the device may also include an acquisition module, a generation module, and an upload module. It should be noted that all relevant content regarding the steps involved in the above method embodiments can be referenced in the functional descriptions of the corresponding functional modules, and will not be repeated here.

[0181] It should be understood that the apparatus provided in this embodiment is used to execute the above-described method for transmitting diagnostic information, and therefore can achieve the same effect as the above-described implementation method.

[0182] When using an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module can be used to control and manage the vehicle's movements. The storage module can be used to support the vehicle in executing relevant program code and data.

[0183] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0184] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a diagnostic information transmission method provided in the above embodiments.

[0185] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a diagnostic information transmission method provided in the above embodiment.

[0186] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to realize a diagnostic information transmission method provided in the above embodiment.

[0187] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0188] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0189] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0190] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for transmitting diagnostic information, characterized in that, The method is applied to a slave controller in a vehicle, and the method includes: Obtain target diagnostic information obtained from the self-fault diagnosis of the controller; wherein, the target diagnostic information includes information related to the fault occurrence of the slave controller in the current power-on cycle, the current fault status information of the slave controller, and information related to the completion status of the fault detection of the slave controller in the current power-on cycle; Based on a preset mapping relationship and the target diagnostic information, a target diagnostic code for the slave controller is generated. The target diagnostic code includes multiple target status bits that the master controller can recognize. The mapping relationship is the relationship between a reference status bit in the fault diagnosis communication protocol and a target status bit in the target diagnostic code. The fault diagnosis communication protocol is the communication protocol between the master controller and the fault diagnosis tool. The mapping relationship is generated as follows: determining multiple status bits of the fault diagnostic code included in the fault diagnosis communication protocol and their respective status definitions; determining the status bits whose status definitions in the fault diagnosis communication protocol match the target definitions as reference status bits, where the content represented by the target definitions matches the content represented by the target diagnostic information; and generating the mapping relationship based on the reference status bits and the target status bits. The target diagnostic code is uploaded to the main controller so that the main controller can parse the target diagnostic code based on the fault diagnosis communication protocol and the mapping relationship.

2. The method according to claim 1, characterized in that, The process of generating the target diagnostic code for the slave controller based on the preset mapping relationship and the target diagnostic information includes: Based on the target diagnostic information, determine the logical value corresponding to the reference status bit; Based on the mapping relationship, the logical value corresponding to the reference state bit is mapped to the logical value corresponding to the target state bit; The target diagnostic code is generated based on the logical value corresponding to the target status bit.

3. The method according to claim 1, characterized in that, The target definition includes a first definition representing that the fault detection was not completed in the current power-on cycle, a second definition representing that the fault currently exists, and a third definition representing that the fault has occurred in the current power-on cycle. The target status bit includes a first target status bit, a second target status bit, and a third target status bit. The step of generating the mapping relationship based on the reference state bit and the target state bit includes: Based on the state definition, a first mapping relationship is generated using the first defined reference state bit and the first target state bit; Based on the state definition, a second mapping relationship is generated using the reference state bit and the target state bit defined in the second definition. Based on the state definition, the reference state bit of the third definition and the third target state bit are used to generate a third mapping relationship.

4. The method according to claim 3, characterized in that, The target diagnostic information includes: first diagnostic information corresponding to the first definition, second diagnostic information corresponding to the second definition, and third diagnostic information corresponding to the third definition; The process of generating the target diagnostic code for the slave controller based on the preset mapping relationship and the target diagnostic information includes: Based on the first mapping relationship, the first diagnostic information is mapped to the logical value corresponding to the first target status bit; Based on the second mapping relationship, the second diagnostic information is mapped to the logical value corresponding to the second target status bit; Based on the third mapping relationship, the third diagnostic information is mapped to the logical value corresponding to the third target status bit; The target diagnostic code is obtained by combining the logical value corresponding to the first target state bit, the logical value corresponding to the second target state bit, and the logical value corresponding to the third target state bit.

5. The method according to claim 1, characterized in that, The target diagnostic information includes the effective status of the target diagnostic information, which includes valid and invalid. Before acquiring the target diagnostic information obtained from the controller's self-fault diagnosis, the method further includes: Determine whether the current status information of the slave controller meets the preset conditions for self-fault diagnosis; If the current status information does not meet the preset conditions, the effective status of the target diagnostic information is determined to be invalid; If the current status information meets the preset conditions, the target diagnostic information is determined to be effective.

6. The method according to claim 5, characterized in that, The target diagnostic code includes a fourth target status bit, which is used to characterize the effective status of the target diagnostic information. After obtaining the target diagnostic information obtained from the controller's self-fault diagnosis, the method further includes: Based on the effective status of the target diagnostic information, determine the logical value corresponding to the fourth target status bit; Wherein, if the effective status of the target diagnostic information is invalid, the logical value corresponding to the fourth target status bit is the first logical value; if the effective status of the target diagnostic information is valid, the logical value corresponding to the fourth target status bit is the second logical value.

7. A diagnostic information transmission device, characterized in that, The device is used in a slave controller in a vehicle, and the device includes: The acquisition module is used to acquire target diagnostic information obtained by the controller through self-fault diagnosis; wherein, the target diagnostic information includes information related to the fault occurrence of the slave controller in the current power-on cycle, the current fault status information of the slave controller, and information related to the completion status of the fault detection of the slave controller in the current power-on cycle; A generation module is used to generate a target diagnostic code for the slave controller based on a preset mapping relationship and the target diagnostic information. The target diagnostic code includes multiple target status bits that the master controller can recognize. The mapping relationship is the relationship between a reference status bit in a fault diagnosis communication protocol and a target status bit in the target diagnostic code. The fault diagnosis communication protocol is a communication protocol between the master controller and a fault diagnosis tool. The mapping relationship is generated as follows: determining multiple status bits of the fault diagnostic code included in the fault diagnosis communication protocol and their respective status definitions; determining the status bits whose status definitions in the fault diagnosis communication protocol match the target definitions as reference status bits, where the content represented by the target definitions matches the content represented by the target diagnostic information; and generating the mapping relationship based on the reference status bits and the target status bits. An upload module is used to upload the target diagnostic code to the main controller, so that the main controller can parse the target diagnostic code based on the fault diagnosis communication protocol and the mapping relationship.

8. A vehicle, characterized in that, The vehicles include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the vehicle to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fault diagnosis method, system, equipment and medium

    CN115113611A