Diagnostic fault code processing method and device, equipment, medium, product and vehicle

By generating and storing the frozen frame address of the diagnostic fault code in the on-board controller, the problem of waste of storage space is solved, and efficient fault diagnosis and storage optimization are achieved.

CN120469829APending Publication Date: 2025-08-12BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411689786.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, the diagnostic fault code of the vehicle-mounted controller and its storage method of environmental data leads to serious waste of storage space and increases storage cost and diagnosis time.

Method used

By obtaining the frozen frame address corresponding to the fault information, a diagnostic fault code is generated in the first memory and stored in the second memory, reducing the size of the frozen frame address and avoiding redundant storage.

Benefits of technology

Reduces the space occupied by diagnostic fault codes in memory, improves storage efficiency and diagnostic analysis speed, and reduces redundant storage and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469829A_ABST
    Figure CN120469829A_ABST
Patent Text Reader

Abstract

The invention relates to a diagnosis fault code processing method and device, equipment, a medium, a product and a vehicle, and the method comprises the steps: obtaining fault information, and obtaining a freezing frame address, corresponding to the fault information, of a freezing frame on a first memory; generating a diagnosis fault code according to the fault information and the freezing frame address; and storing the diagnosis fault code in a second memory. The invention aims to reduce the storage space occupied by the diagnosis fault code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of diagnostic trouble code processing, and in particular to a diagnostic trouble code processing method, device, equipment, medium, product and vehicle. Background Art

[0002] Currently, vehicle controllers typically store diagnostic trouble codes (DTCs) and the accompanying environmental data (such as mileage, time, voltage, and gear position) in memory using an array design. Traditionally, storing a large number of DTC freeze frames in an array-like format consumes significant storage space. Summary of the Invention

[0003] Embodiments of the present application provide a diagnostic trouble code processing method, apparatus, device, medium, product, and vehicle to reduce the storage space occupied by diagnostic trouble codes, thereby at least partially solving the above-mentioned technical problems.

[0004] In order to achieve the above-mentioned object, according to a first aspect of the present application, a diagnostic trouble code processing method is provided, the diagnostic trouble code processing method comprising:

[0005] Acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory;

[0006] generating a diagnostic trouble code according to the fault information and the freeze frame address;

[0007] The diagnostic trouble code is stored in a second memory.

[0008] According to a second aspect of the present application, there is provided an electronic device, comprising:

[0009] An acquisition module, configured to acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in the first memory;

[0010] a generating module, configured to generate a diagnostic trouble code according to the fault information and the freeze frame address;

[0011] The storage module is used to store the diagnostic trouble code in a second memory.

[0012] According to a third aspect of the present application, an electronic device is also provided, comprising a processor, wherein the processor is connected to a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the above-mentioned diagnostic fault code processing methods.

[0013] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned diagnostic trouble code processing methods is implemented.

[0014] According to a fifth aspect of the present application, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement any of the above-mentioned diagnostic trouble code processing methods.

[0015] According to a sixth aspect of the present application, a vehicle is provided, which executes the diagnostic trouble code processing method as described above, or includes the electronic device or electronic equipment as described above.

[0016] The diagnostic trouble code processing method provided in an embodiment of the present application obtains fault information and a freeze frame address of a freeze frame corresponding to the fault information in a first memory; generates a diagnostic trouble code based on the fault information and the freeze frame address; and stores the diagnostic trouble code in a second memory. Thus, the fault information is stored in the first memory corresponding to the freeze frame, and a diagnostic trouble code is generated based on the freeze frame address and the fault information and stored in the second memory. The size of the freeze frame address is smaller than the freeze frame itself. Compared to the diagnostic trouble code generated based on the fault information and its freeze frame, the diagnostic trouble code generated using the freeze frame address and the fault information has a smaller capacity, which can reduce the storage space occupied by the diagnostic trouble code in the second memory. Based on the freeze frame address in the diagnostic trouble code, the corresponding freeze frame can also be found in the first memory, thus enabling simple and efficient fault diagnosis and storage.

[0017] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0019] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same drawing numbers represent the same parts in the following description.

[0020] Figure 1 This is a flow chart of an embodiment of a method for processing a diagnostic trouble code provided in an embodiment of the present invention;

[0021] Figure 2 Schematic diagram of a traditional diagnostic trouble code design provided in an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a diagnostic trouble code design corresponding to the diagnostic trouble code processing method provided in an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of a freeze frame design provided in an embodiment of the present invention;

[0024] Figure 5 1 is a schematic diagram comparing two diagnostic trouble code designs provided in an embodiment of the present invention;

[0025] Figure 6 is a schematic diagram of fault information provided in an embodiment of the present invention;

[0026] Figure 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention;

[0027] Figure 8 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0029] The current on-board controller's diagnostic fault codes and the environmental data they carry (such as mileage, time, voltage, gear, etc.) are basically stored in the memory according to the array design. For a better understanding, refer to Figure 2 The traditional diagnostic trouble code design mainly describes the fault code, fault code status, and environmental data (freeze frame) associated with the fault occurrence time contained in the diagnostic trouble code, including:

[0030] The number of diagnostic trouble codes of the current controller is stored at a memory address such as 0x80000000h;

[0031] The memory address 0xa0000000h starts to store the fault code of the first diagnostic fault code of the current controller (occupies 3 bytes), fault code status (occupies 1 byte, 09 means the current fault code is not repaired, 01 means the historical fault code has been repaired), freeze frame length (byte length depends on the number of specific related signals), all related environmental data attached to the freeze frame (such as Figure 2 7 environmental data are shown);

[0032] After all contents of the first diagnostic trouble code are stored, the second diagnostic trouble code is stored until all diagnostic trouble codes are stored.

[0033] This design will waste a lot of storage space. For example, the freeze frame content appears at the same time, and the freeze frame occupies a large amount of space in the diagnostic fault code.

[0034] Furthermore, the inventors have discovered that the current generation and storage scheme for diagnostic faults may cause at least the following problems:

[0035] (1) The diagnostic implementation of each diagnostic trouble code is basically designed according to its own fixed enabling conditions, without considering the frequency and impact of related faults. The diagnostic trouble codes will become very numerous and the storage capacity will also become very large. For example, a bus off fault occurs in the controller area network (CAN). The bus off fault refers to the bus shutdown of the vehicle CAN bus due to physical connection, incorrect resistance or interference, which will affect the communication failure of the related modules on this bus. At this time, multiple diagnostic trouble codes will appear (some diagnostic trouble codes are caused by another fault source). Diagnostic trouble codes are currently stored in memory, such as electrically erasable programmable read-only memory (EEPROM) and random access memory (RAM). Because diagnostic trouble codes need to be stored for a long time for external device detection, remote diagnosis, display APP notification to users, and internal algorithm application program to call and analyze when a fault occurs, once the number of trouble codes increases, it also means that the number of related freeze frames will increase. Generally, the data carried by a diagnostic trouble code can reach about 50 bytes. Since most of the associated diagnostic trouble codes are not the real source of the fault, they will cause redundancy and occupy a large amount of storage space, and will also affect the analysis progress and direction of reading the diagnostic trouble codes.

[0036] (2) The freeze frames associated with multiple diagnostic trouble codes may be stored at the same time. If the traditional array storage method is used, the freeze frames may be repeated. These data are stored in the memory and will take up a large amount of space.

[0037] (3) All diagnostic trouble codes and freeze frames are stored in a memory, such as a RAM memory. In order to solve the problem of a large number of diagnostic trouble codes occupying RAM, the relevant technology has opened up a two-zone storage of EEPROM, but this will greatly increase the cost, and the access and reading speed of the external EEPROM will be slower, which will consume more time when retrieving diagnostic trouble codes.

[0038] In order to solve the above problems, the embodiments of the present application propose a diagnostic trouble code processing method, device, equipment, medium, product and vehicle. The embodiments of the present application freeze frames the fault information corresponding to the first memory, and generate a diagnostic trouble code based on the freeze frame address and the fault information, which is stored in the second memory. The size of the freeze frame address is smaller than the freeze frame itself. Compared with the diagnostic trouble code generated according to the fault information and its freeze frame, the diagnostic trouble code generated using the freeze frame address and the fault information has a smaller capacity, which can reduce the storage space occupied by the diagnostic trouble code in the second memory. Based on the freeze frame address in the diagnostic trouble code, the corresponding freeze frame can also be found in the first memory, so that fault diagnosis and storage can be performed simply and efficiently.

[0039] Specifically, the diagnostic trouble code processing method in the present application can be applied to an electronic device, and the execution subject of the diagnostic trouble code processing method can be an electronic device, and the electronic device can be a vehicle, such as a car, an electric car, a hybrid car, etc.

[0040] The following describes each embodiment in detail by taking the example of an electronic device as the execution subject of the diagnostic trouble code processing method.

[0041] Correspondingly, if Figure 1 As shown, the diagnostic trouble code processing method may include the following steps:

[0042] S10, acquiring fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory;

[0043] In this embodiment, during the operation of a device, a device such as a vehicle can be detected in real time to determine if a fault has occurred. Upon detecting a device fault, fault information can be obtained. This fault information is used to distinguish this type of fault from other faults. In some embodiments, the fault information can include at least one of a fault code, fault value, fault name, enabling conditions, and fault maturity conditions. Furthermore, when designing a fault diagnosis system, it is necessary not only to store the fault information but also data related to the fault information. Device data associated with the moment of fault occurrence must be stored as a freeze frame, effectively freezing the data for subsequent fault analysis. If the device is a vehicle, the environmental data can be vehicle data, including at least one of power level, vehicle speed, mileage, power-on duration, operating voltage, time of occurrence, and vehicle gear. Fault analysis and diagnosis require access to the fault information and freeze frames. The environmental data contained in the fault information and freeze frames is used to analyze the fault. Therefore, upon detecting a fault, the fault information and freeze frames must be stored to facilitate subsequent fault analysis and diagnosis.

[0044] To simplify storage and minimize the storage space required for diagnostic trouble codes, this embodiment stores freeze frames separately from diagnostic trouble codes. For each detected fault, fault information and the freeze frame associated with the fault are obtained. The freeze frame and fault information are both derived from the same fault and correspond to each other. The freeze frame address is stored in the first memory to obtain the freeze frame address. The freeze frame address can be used to locate the corresponding freeze frame in the first memory, thereby obtaining the fault information and its corresponding freeze frame address.

[0045] S20, generating a diagnostic trouble code according to the fault information and the freeze frame address;

[0046] In this embodiment, a diagnostic fault code is generated based on the fault information and the freeze frame address. Through the diagnostic fault code, the fault information of the fault corresponding to the diagnostic fault code and the freeze frame associated with the time when the fault occurred can be obtained, and then the relevant environmental data that can be used to analyze and diagnose the fault can be obtained. Combining the environmental data and the fault information can more accurately diagnose the fault.

[0047] The diagnostic trouble code does not include a complete freeze frame, but includes a freeze frame address. The size of the freeze frame address is smaller than the size of the freeze frame. Therefore, the size of the diagnostic trouble code generated based on the fault information and the freeze frame address is smaller than the diagnostic trouble code directly generated based on the fault information and the freeze frame.

[0048] S30: Storing the diagnostic trouble code in a second memory.

[0049] In this embodiment, the freeze frames corresponding to the fault are stored in the first memory, and the diagnostic trouble codes need to be stored in the second memory. The first memory and the second memory are two different memories, and the storage space for the diagnostic trouble codes in the second memory is reduced. When analyzing and diagnosing the fault, the second memory can be used to obtain the diagnostic trouble codes. The second memory has more free space, which can more efficiently obtain the diagnostic trouble codes for diagnosis.

[0050] In the technical solution disclosed in this embodiment, fault information and the freeze frame address of the freeze frame corresponding to the fault information are obtained in a first memory; a diagnostic trouble code is generated based on the fault information and the freeze frame address; and the diagnostic trouble code is stored in a second memory. Thus, the fault information is associated with the freeze frame in the first memory, and a diagnostic trouble code is generated based on the freeze frame address and the fault information and stored in the second memory. The size of the freeze frame address is smaller than the freeze frame itself. Compared to the diagnostic trouble code generated based on the fault information and its freeze frame, the diagnostic trouble code generated using the freeze frame address and the fault information has a smaller capacity, which can reduce the storage space occupied by the diagnostic trouble code in the second memory. Based on the freeze frame address in the diagnostic trouble code, the corresponding freeze frame can also be found in the first memory, thus enabling simple and efficient fault diagnosis and storage.

[0051] In one embodiment, generating a diagnostic trouble code according to the fault information and the freeze frame address includes:

[0052] Numbering the fault information to obtain a fault number corresponding to the fault information;

[0053] The fault number and the freeze frame address are concatenated to obtain the diagnostic fault code.

[0054] In this embodiment, the fault information can also be numbered to obtain the fault number corresponding to the fault information. The storage size of the fault number will also be smaller than the size of the fault information. The corresponding fault information can be queried through the fault number, and the fault information can be stored in a memory other than the second memory, such as the first memory. The fault number and the freeze frame address are spliced together to obtain a diagnostic fault code. When performing diagnostic analysis, the corresponding fault number and freeze frame address can be obtained based on the diagnostic fault code, and then the fault information and freeze frame corresponding to the diagnostic fault code can be obtained based on the freeze frame address and the fault number, respectively, for analyzing and diagnosing the fault. In this way, by numbering the fault information and splicing the diagnostic fault code based on the fault number and freeze frame address, the diagnostic fault code does not directly contain fault information and freeze frames, thereby further reducing the size of the diagnostic fault code and further reducing the storage space of the diagnostic fault code.

[0055] In one embodiment, the first memory includes a volatile memory, and the second memory includes a non-volatile memory.

[0056] The first memory may include volatile memory, which refers to memory whose stored data disappears immediately after power is lost, such as RAM. Fixed content can be stored in volatile memory such as RAM. The second memory may include non-volatile memory, which refers to memory whose stored data does not disappear after power is lost. Since diagnostic trouble codes are dynamic, they are not stored in volatile memory but in non-volatile memory. For information such as freeze frames that is relatively fixed after a fault occurs and can be read during each operation, it is stored in volatile memory. Even if it is lost after a power outage, it will not be affected because the same fixed information such as the mapping table is loaded again each time the system is restarted.

[0057] In one embodiment, numbering the fault information to obtain a fault number corresponding to the fault information includes:

[0058] Querying the first memory for preset fault information matching the fault information;

[0059] The preset fault number corresponding to the preset fault information in the first memory is set as the fault number corresponding to the fault information.

[0060] In this embodiment, since the fault information corresponding to different types of faults is fixed, a preset mapping table corresponding to preset fault information and preset fault numbers may also be stored in the first memory. The preset mapping table is searched for preset fault information that matches the fault information, and the preset fault number corresponding to the preset fault information is set as the fault number corresponding to the fault information.

[0061] In this way, the correspondence between the fixed preset fault information and the preset fault number is stored in the first memory in advance, so that the fault information can be numbered efficiently, making the generation and storage process of the diagnostic fault code more efficient.

[0062] Furthermore, if no preset fault information matching the fault information is found in the first memory, the fault information can be directly numbered to obtain the fault number corresponding to the fault information, and the fault number corresponding to the fault information is associated and stored in the first memory, and updated to the preset fault number corresponding to the preset fault information in the first memory.

[0063] In one embodiment, concatenating the fault number and the freeze frame address to obtain the diagnostic trouble code includes:

[0064] Obtaining a fault status corresponding to the fault information;

[0065] The fault number, the fault status and the freeze frame address are concatenated to obtain the diagnostic fault code.

[0066] In this embodiment, the diagnostic trouble code may also carry the fault status corresponding to the fault information. The fault status can be determined to include either handled or unhandled. The handled fault status indicates that the fault corresponding to the diagnostic trouble code has been handled, while the unhandled fault status indicates that the fault corresponding to the diagnostic trouble code has not been handled. The fault status is dynamic and therefore needs to be included in the diagnostic trouble code and stored in non-volatile memory. The fault status can be used to determine the state of the fault corresponding to the diagnostic trouble code, facilitating diagnosis and analysis of faults generated by the device.

[0067] For better understanding, refer to Figure 3 In the second memory, the number of diagnostic trouble codes is designed to remain unchanged, and the number of diagnostic trouble codes is stored at a fixed address of the second memory, such as 0x80000000h. Because the number of diagnostic trouble codes changes dynamically, the number of diagnostic trouble codes can be used to know how much data to read from the second memory.

[0068] Starting at fixed address 0xa0000000h in the second memory, each diagnostic trouble code (DTC) contains a fault number. This number corresponds to the fault information (such as the fault code and fault value) during operation in the first memory. The corresponding DTC status is also stored. Since this is dynamic, it is also stored in the first memory. This way, each DTC only occupies one byte of fault information, reducing storage space by one-third compared to the original.

[0069] What follows is not the content of the frozen frame, but the corresponding frozen frame address, so that if there are repeated frozen frames, redundancy can be eliminated.

[0070] The corresponding freeze frames are stored starting from the storage address 0xc0000000h in the first memory, and each freeze frame follows immediately, in a mode of data identification number + corresponding environment data content value.

[0071] In one embodiment, acquiring fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory includes:

[0072] Obtaining the fault occurrence time corresponding to the fault information;

[0073] The freeze frame address is obtained from the first memory according to the fault occurrence time.

[0074] In this embodiment, the freeze frames associated with multiple diagnostic fault codes may be stored at the same time, that is, multiple faults may occur at the same time. When the current fault is detected, the time at which the current fault occurs also corresponds to the occurrence of other faults. Therefore, the freeze frame corresponding to the time at which the current fault occurs has been obtained. Therefore, when a fault is detected, the fault occurrence time corresponding to the fault is first obtained, that is, the fault occurrence time corresponding to the fault information. The freeze frame corresponding to the fault occurrence time is queried from the first memory. The freeze frame is the freeze frame generated by other faults when generating diagnostic fault codes at the fault occurrence time corresponding to the fault information. Due to the consistency in time, the freeze frame is also the freeze frame corresponding to the fault information. The freeze frame address corresponding to the freeze frame is obtained as the freeze frame address corresponding to the fault information.

[0075] In this way, the freeze frame address of the frozen frame that has been stored is obtained from the first memory according to the time when the fault occurred, avoiding repeated collection and storage of freeze frames at the same time for multiple faults, saving storage space of the first memory, and improving the efficiency of generating and storing diagnostic fault codes.

[0076] In one embodiment, obtaining the freeze frame address from the first memory according to the fault occurrence time includes:

[0077] If the freeze frame corresponding to the fault occurrence time does not exist in the first memory, obtaining the freeze frame corresponding to the fault information;

[0078] The freeze frame corresponding to the fault information is stored in the first memory to obtain the freeze frame address.

[0079] In this embodiment, if there is no freeze frame corresponding to the fault occurrence time in the first memory, it means that there is no stored freeze frame for the fault occurrence time corresponding to the fault information, and thus the stored freeze frame address cannot be obtained. Therefore, it is necessary to directly obtain the freeze frame corresponding to the fault information and store the freeze frame in the first memory. After storage, the freeze frame address can be obtained. This is the first time that the freeze frame corresponding to the fault occurrence time of the fault information is stored in the first memory. When a diagnostic fault code is to be generated for other faults subsequently, the freeze frame address can be quickly obtained based on the fault occurrence time corresponding to the frozen frame stored this time.

[0080] In one embodiment, obtaining the freeze frame corresponding to the fault information includes:

[0081] Obtaining environmental data corresponding to the fault information;

[0082] The freeze frame is generated according to the environmental data and the data identifier corresponding to the environmental data.

[0083] In this embodiment, obtaining the freeze frame corresponding to the fault information can be to generate the freeze frame in real time, and obtaining the environmental data corresponding to the time when the fault occurred. Generally, the environmental data needs to include data corresponding to two moments of the fault occurrence time, the environmental data associated with the device at the time when the fault occurred for the first time, and the environmental data associated with the device at the time when the fault occurred for the latest time. Several types of environmental data can be obtained. When the device is a vehicle, the environmental data may include at least one of the power gear (Body Control Module, BCM), vehicle speed, mileage, power-on time, operating voltage, occurrence time and vehicle gear. Each type of environmental data is configured with a data identifier, which is a unique identifier for the environmental data. The environmental data corresponding to each data identifier has n bytes, which are used to represent the content value of the environmental data. Reference Figure 4 A freeze frame can be generated based on the data identifier (DID) corresponding to the environmental data and the content value corresponding to the environmental data. By generating a freeze frame using the environmental data and the corresponding data identifier, the environmental data can also be obtained from the freeze frame, thus facilitating fault diagnosis and analysis.

[0084] In one embodiment, generating the freeze frame content according to the environmental data and a data identifier corresponding to the environmental data includes:

[0085] Querying the first memory for a data identification number that matches the data identification;

[0086] The environmental data and the data identification number are spliced together to generate the frozen frame.

[0087] In this embodiment, since different types of environmental data and the corresponding data identifiers are relatively fixed, a preset mapping table corresponding to preset data identifiers and preset data identifier numbers can also be stored in the first memory. The preset data identifier that matches the data identifier is queried in the preset mapping table, and the preset data identifier number corresponding to the preset data identifier is set to the data identifier number corresponding to the data identifier. The environmental data and the data identification number are spliced in a mode of data identification number + corresponding content value of environmental data, and a freeze frame is generated immediately after each data identification number + environmental data. The reason for using data identification numbers instead of data identification is to further reduce the size of the freeze frame. Like the preset mapping table between the preset fault information and the preset fault number, the data identification number and the corresponding data identifier are also fixed. The corresponding preset mapping table can be stored in the first memory of the volatile memory and will not occupy the permanent storage capacity area.

[0088] Furthermore, the preset mapping table corresponding to the preset data identification number and the preset data identification stored in the first memory may specifically include a preset relationship between the preset data identification number, the preset data identification and the content value length of the corresponding environmental data, that is, each data identification number corresponds to a unique data identification, and the content value length corresponding to the data identification.

[0089] In this way, a preset mapping table of preset fault numbers and preset fault information is set up, which can detect the corresponding fault information according to the fault number. The preset mapping table of preset data identification numbers, preset data identification and content value length of corresponding environmental data can detect the corresponding data identification and content value length of corresponding environmental data according to the data identification number in the frozen frame. Through this series of designs, the storage capacity of the diagnostic fault code can be reduced by about 2 / 3.

[0090] In one embodiment, the freeze frame also includes a freeze frame length. Based on the content value of the environmental data and the data identification number, the freeze frame content and the length of the freeze frame content can be obtained. The freeze frame length can be determined based on the length of the freeze frame content. The freeze frame length, data identification number, and environmental data are concatenated in this order to generate a freeze frame.

[0091] In one embodiment, the method further comprises:

[0092] Retrieving a target diagnostic trouble code from the first memory in response to a fault diagnosis instruction;

[0093] A target freeze frame address and target fault information are obtained according to the target diagnostic fault code and the second memory.

[0094] In this embodiment, fault diagnosis can be performed through the mobile phone application (Application, APP) or the central control APP, and offline fault diagnosis can be performed using diagnostic equipment, or online background and remote diagnosis can be performed, thereby finding the difference between the traditional diagnostic fault code display and the diagnostic fault code display optimized in this embodiment. For example, refer to Figure 5 When a BUSOFF fault occurs on the Process Automation Bus (PAS), the traditional diagnostic trouble code displayed is 1-U10BE88: PAS Bus Off Error / / 2-U10BB2D: Lost CAN communication with PAS. The optimized diagnostic trouble code displayed in this embodiment is: U10BE88 (0x80000000): PAS Bus Off Error (0xC0000000).

[0095] During the diagnostic process, the diagnostic fault codes and arrays stored in the first memory, as well as their calling indexes and logical positions, can be identified. Taking U10BE88 (0x80000000): PAS bus shutdown error (0xC0000000) as an example, the number of diagnostic fault codes can be obtained by triggering the fault diagnostic instruction (such as 3D 80 00 00 00). At this time, the byte value obtained is 01, which means that the number of diagnostic fault codes is indeed 1.

[0096] A fault diagnosis instruction (such as 3D A0 00 00 00) is triggered. When the fault diagnosis instruction is received, a target diagnostic fault code specifically contained in the fault diagnosis instruction, such as 06 09C0 00 00 00, is obtained. The target fault number, target fault code status, and target freeze frame address are respectively obtained. According to the target fault number and the target freeze frame address, a query is performed in the first memory to obtain that the target fault information corresponding to the target fault number 06 is U10BE88, and the target freeze frame corresponding to the target freeze frame address C0000000 is 16010103020000000301000000FF04T105V206T30703. The thus obtained fault information and freeze frame are used for fault diagnosis analysis.

[0097] In this way, the second memory of the non-volatile memory and the first memory of the volatile memory can be operated in coordination to achieve a simple and efficient diagnostic trouble code storage and diagnosis solution.

[0098] In one embodiment, the fault information includes at least one of a fault code, a fault value, a fault name, an enabling condition, and a fault maturity condition.

[0099] In this embodiment, referring to Figure 6 The fault code is a unique identifier that identifies the content of a fault. This fault code will be presented in internal and external reference systems, and the code can be used to determine what the fault is. The fault is a hexadecimal byte value stored in the memory when the fault code is generated, which corresponds to the fault code. The fault name is a detailed description of the fault, which helps users quickly locate and solve the problem. The enabling condition is a prerequisite for detecting a fault and starting to generate a diagnostic fault code. This is to prevent the generation of diagnostic fault codes under unstable or incorrect conditions. The fault maturity condition is a way to prevent fault codes from being jittered. For example, taking communication loss as an example, sometimes jitter may cause one or two communication loss faults, but this is not the final fault, so it is necessary to define a fault maturity condition that only more than three consecutive communication losses will determine that the fault is detected to prevent false alarms.

[0100] In one embodiment, when an enabling condition corresponding to the fault information is met, detecting whether there is an external factor causing the fault information;

[0101] If the external factor does not exist, the step of obtaining the fault information and the freeze frame address of the freeze frame corresponding to the fault information in the first memory is performed.

[0102] For example, if the detection of a communication loss fault typically relies on a period of no signal reception, then the fault may be generated. However, it may not be due to a broken line, but rather a BusOff condition. In this case, the BusOff condition is the cause, not the communication failure, leading to the wrong troubleshooting direction. Taking the PAS bus BusOff fault as an example, if traditional diagnostic trouble code design is used, the D0B82D (loss of CAN communication with PAS) fault will be generated directly if communication data is lost three times in a row. If the PAS bus generates a BusOff fault, two diagnostic trouble codes will be generated simultaneously: D1BE88 (PAS BusOff fault) and D0B82D (loss of CAN communication with PAS). This clearly fails to filter out redundancy at the source, as detecting communication loss during a BusOff condition is meaningless and only increases the difficulty of troubleshooting.

[0103] In this embodiment, for mutual exclusion and redundancy, all related external factors are excluded from the enabling conditions for each diagnostic trouble code generation. When the enabling conditions corresponding to the fault information are met, it is detected whether there is an external factor causing the fault information. If no external factor exists, the steps of obtaining the fault information and the freeze frame address of the freeze frame corresponding to the fault information on the first memory are performed to generate and store the diagnostic trouble code. For example, in the above example of D0B82D (loss of CAN communication with PAS), refer to Figure 5 By eliminating the external main factors that produce the corresponding fault phenomenon, such as too fast mode switching, unstable voltage, and the corresponding BusOff, interference diagnostic fault codes will not be generated when the BusOff is turned off. This optimized solution can reduce the storage capacity by half, control costs, optimize space, and more importantly, the fault definition will be more accurate, and the troubleshooting efficiency will not be increased due to the generation of many diagnostic fault codes, further improving the fault analysis and diagnosis efficiency based on diagnostic fault codes.

[0104] This embodiment also provides an electronic device, which can be integrated into a vehicle, for example, Figure 7 As shown, the electronic device may include:

[0105] An acquisition module 1001 is configured to acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory;

[0106] A generating module 1002 is configured to generate a diagnostic trouble code according to the fault information and the freeze frame address;

[0107] The storage module 1003 is configured to store the diagnostic trouble code in a second memory.

[0108] Optionally, the generating module 1002 is further configured to:

[0109] Numbering the fault information to obtain a fault number corresponding to the fault information;

[0110] The fault number and the freeze frame address are concatenated to obtain the diagnostic fault code.

[0111] Optionally, the generating module 1002 is further configured to: query the first memory for preset fault information matching the fault information;

[0112] The preset fault number corresponding to the preset fault information in the first memory is set as the fault number corresponding to the fault information.

[0113] Optionally, the generating module 1002 is further configured to: obtain a fault state corresponding to the fault information;

[0114] The fault number, the fault status and the freeze frame address are concatenated to obtain the diagnostic fault code.

[0115] Optionally, the acquisition module 1001 is further configured to:

[0116] Obtaining the fault occurrence time corresponding to the fault information;

[0117] The freeze frame address is obtained from the first memory according to the fault occurrence time.

[0118] Optionally, the acquisition module 1001 is further configured to: if the freeze frame corresponding to the fault occurrence time does not exist in the first memory, acquire the freeze frame corresponding to the fault information;

[0119] The freeze frame corresponding to the fault information is stored in the first memory to obtain the freeze frame address.

[0120] Optionally, the acquisition module 1001 is further configured to: acquire environmental data corresponding to the time of occurrence of the fault;

[0121] The freeze frame is generated according to the environmental data and the data identifier corresponding to the environmental data.

[0122] Optionally, the acquisition module 1001 is further configured to: query the first memory for a data identification number that matches the data identification;

[0123] The environmental data and the data identification number are spliced together to generate the frozen frame.

[0124] Optionally, the environmental data includes at least one of power gear, vehicle speed, mileage, power-on time, operating voltage, occurrence time and vehicle gear.

[0125] Optionally, the diagnostic trouble code processing device further includes a diagnostic module for:

[0126] Retrieving a target diagnostic trouble code from the second memory in response to a fault diagnosis instruction;

[0127] obtaining a target freeze frame address and target fault information according to the target diagnostic fault code and the first memory;

[0128] Fault diagnosis is performed based on the target freeze frame address and the target fault information.

[0129] Optionally, the first memory includes a volatile memory, and the second memory includes a non-volatile memory.

[0130] Optionally, the fault information includes at least one of a fault code, a fault value, a fault name, an enabling condition, and a fault maturity condition.

[0131] Optionally, the acquisition module 1001 is further configured to:

[0132] When the enabling condition corresponding to the fault information is met, detecting whether there is an external factor causing the fault information;

[0133] If the external factor does not exist, the steps of obtaining fault information and obtaining the freeze frame address of the freeze frame corresponding to the fault information in the first memory are performed.

[0134] This embodiment obtains fault information and a freeze frame address corresponding to a freeze frame of the fault information in a first memory; generates a diagnostic trouble code based on the fault information and the freeze frame address; and stores the diagnostic trouble code in a second memory. Thus, the fault information is associated with the freeze frame in the first memory, and a diagnostic trouble code is generated based on the freeze frame address and the fault information and stored in the second memory. The freeze frame address is smaller than the freeze frame itself. Compared to a diagnostic trouble code generated based on the fault information and its freeze frame, the diagnostic trouble code generated using the freeze frame address and the fault information has a smaller capacity, thereby reducing the storage space occupied by the diagnostic trouble code in the second memory. Based on the freeze frame address in the diagnostic trouble code, the corresponding freeze frame can also be found in the first memory, thereby enabling simple and efficient fault diagnosis and storage.

[0135] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0136] Accordingly, an embodiment of the present application further provides an electronic device, such as Figure 8 As shown, Figure 8 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1100 also includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0137] The processor 1101 is the control center of the electronic device 1100. It uses various interfaces and lines to connect the various parts of the entire electronic device 1100. By running or loading software programs and / or units stored in the memory 1102 and calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby monitoring the electronic device 1100 as a whole. The processor 1101 can be a processor (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of this application.

[0138] In the embodiment of the present application, the processor 1101 in the electronic device 1100 loads instructions corresponding to one or more application processes into the memory 1102 according to the following steps, and the processor 1101 runs the application stored in the memory 1102 to implement various functions, such as:

[0139] Acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory;

[0140] generating a diagnostic trouble code according to the fault information and the freeze frame address;

[0141] The diagnostic trouble code is stored in a second memory.

[0142] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0143] Optional, such as Figure 8As shown, the electronic device 1100 further includes: a touch screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. Among them, the processor 1101 is electrically connected to the touch screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107 respectively. Those skilled in the art will understand that Figure 8 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0144] The touch display screen 1103 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch panel or near the touch panel) and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 1101, and can receive commands sent by the processor 1101 and execute them. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1101 to determine the type of touch event. The processor 1101 then provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present invention, the touch panel and the display panel can be integrated into the touch display screen 1103 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to realize the input function.

[0145] The radio frequency circuit 1104 may be used to transmit and receive radio frequency signals, thereby establishing wireless communication with network medical devices or other electronic devices through wireless communication, and transmitting and receiving signals between network medical devices or other electronic devices.

[0146] The audio circuit 1105 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 1105 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1105 and converted into audio data. The audio data is then output to the processor 1101 for processing, and then sent to another electronic device through the radio frequency circuit 1104, or the audio data is output to the memory 1102 for further processing. The audio circuit 1105 may also include an earphone jack to provide communication between external headphones and the electronic device.

[0147] The input unit 1106 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control.

[0148] Power supply 1107 is used to supply power to various components of electronic device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 via a power management device, thereby enabling the power management device to manage charging, discharging, and power consumption. Power supply 1107 can also include one or more DC or AC power supplies, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0149] although Figure 8 Not shown, the electronic device 1100 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0150] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0151] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0152] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs. The computer programs can be loaded by a processor to execute any one of the diagnostic trouble code processing methods provided in the embodiments of the present application. The computer program can execute the following steps of the diagnostic trouble code processing method:

[0153] Acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory;

[0154] generating a diagnostic trouble code according to the fault information and the freeze frame address;

[0155] The diagnostic trouble code is stored in a second memory.

[0156] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0157] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0158] Since the computer-readable storage medium can implement the beneficially stored computer program that can be implemented by any diagnostic trouble code processing method provided in the embodiments of the present application, it can execute any diagnostic trouble code processing method provided in the embodiments of the present application. Therefore, the effect is detailed in the previous embodiments and will not be repeated here.

[0159] Optionally, an embodiment of the present application further provides a vehicle, which includes any of the above electronic devices, electronic devices, computer-readable storage media, and computer program products.

[0160] In the above-mentioned diagnostic trouble code processing method, electronic device, electronic device, vehicle, computer-readable storage medium, computer program product, etc., the descriptions of various embodiments have different focuses. For parts not described in detail in a particular embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes and beneficial effects of the above-mentioned electronic device, vehicle, computer-readable storage medium, computer program product, and their corresponding units can be referred to the description of the diagnostic trouble code processing method in the above embodiment, and the details will not be repeated here.

[0161] The above is a detailed introduction to a diagnostic trouble code processing method, electronic device, electronic equipment, vehicle, computer-readable storage medium, and computer program product provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing a diagnostic trouble code, characterized in that: The method comprises: Acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in a first memory; generating a diagnostic trouble code according to the fault information and the freeze frame address; The diagnostic trouble code is stored in a second memory.

2. The diagnostic trouble code processing method according to claim 1, wherein: The generating of a diagnostic trouble code according to the fault information and the freeze frame address includes: Numbering the fault information to obtain a fault number corresponding to the fault information; The fault number and the freeze frame address are concatenated to obtain the diagnostic fault code.

3. The diagnostic trouble code processing method according to claim 2, wherein: The numbering the fault information to obtain a fault number corresponding to the fault information includes: Querying the first memory for preset fault information matching the fault information; The preset fault number corresponding to the preset fault information in the first memory is set as the fault number corresponding to the fault information.

4. The diagnostic trouble code processing method according to claim 2, wherein: The step of concatenating the fault number and the freeze frame address to obtain the diagnostic fault code includes: Obtaining a fault status corresponding to the fault information; The fault number, the fault status and the freeze frame address are concatenated to obtain the diagnostic fault code.

5. The diagnostic trouble code processing method according to claim 1, wherein: The acquiring of the fault information and the frozen frame address of the frozen frame corresponding to the fault information on the first memory includes: Obtaining the fault occurrence time corresponding to the fault information; The freeze frame address is obtained from the first memory according to the fault occurrence time.

6. The diagnostic trouble code processing method according to claim 5, characterized in that: The acquiring the freeze frame address from the first memory according to the fault occurrence time further includes: If the freeze frame address corresponding to the fault occurrence time does not exist in the first memory, obtaining the freeze frame corresponding to the fault information; The freeze frame corresponding to the fault information is stored in the first memory to obtain the freeze frame address.

7. The diagnostic trouble code processing method according to claim 6, wherein: The acquiring of the freeze frame corresponding to the fault information includes: Obtaining environmental data corresponding to the time when the fault occurred; The freeze frame is generated according to the environmental data and the data identifier corresponding to the environmental data.

8. The diagnostic trouble code processing method according to claim 7, wherein: Generating the freeze frame according to the environmental data and a data identifier corresponding to the environmental data includes: Querying the first memory for a data identification number that matches the data identification; The environmental data and the data identification number are spliced together to generate the frozen frame.

9. The diagnostic trouble code processing method according to claim 7, wherein: The environmental data includes at least one of power gear, vehicle speed, mileage, power-on time, operating voltage, occurrence time and vehicle gear.

10. The diagnostic trouble code processing method according to claim 1, wherein: The method further comprises: Retrieving a target diagnostic trouble code from the second memory in response to a fault diagnosis instruction; obtaining a target freeze frame address and target fault information according to the target diagnostic fault code and the first memory; Fault diagnosis is performed based on the target freeze frame address and the target fault information.

11. The diagnostic trouble code processing method according to any one of claims 1 to 10, characterized in that: The first memory includes a volatile memory, and the second memory includes a non-volatile memory.

12. The diagnostic trouble code processing method according to any one of claims 1 to 10, characterized in that: The fault information includes at least one of a fault code, a fault value, a fault name, an enabling condition, and a fault maturity condition.

13. The diagnostic trouble code processing method according to any one of claims 1 to 10, characterized in that: The method comprises: When the enabling condition corresponding to the fault information is met, detecting whether there is an external factor causing the fault information; If the external factor does not exist, the steps of obtaining fault information and obtaining the freeze frame address of the freeze frame corresponding to the fault information in the first memory are performed.

14. An electronic device, characterized in that: include: An acquisition module, configured to acquire fault information and a frozen frame address of a frozen frame corresponding to the fault information in the first memory; a generating module, configured to generate a diagnostic trouble code according to the fault information and the freeze frame address; The storage module is used to store the diagnostic trouble code in a second memory.

15. An electronic device, characterized in that: The method comprises a processor connected to a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the diagnostic trouble code processing method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the diagnostic trouble code processing method according to any one of claims 1 to 13 is implemented.

17. A computer program product, characterized in that It includes a computer program, which is executed by a processor to implement the diagnostic trouble code processing method according to any one of claims 1 to 13.

18. A vehicle, characterized in that: The vehicle executes the diagnostic trouble code processing method according to any one of claims 1 to 13, or includes the electronic device according to claim 14 or the electronic device according to claim 15.