A test method, device, equipment and storage medium for fault code storage

By comparing the fault code storage performance of the electronic control unit by the fault mapping library, the problem of insufficient accuracy and reliability of fault code storage in traditional testing methods is solved, and the accuracy and reliability of fault code storage of the electronic control unit is realized, and the accuracy and reliability of fault code storage of the electronic control unit is improved. The scalability of the test.

CN111737123BActive Publication Date: 2024-12-27CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010555347.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-17
Publication Date
2024-12-27
Estimated Expiration
2040-06-17

AI Technical Summary

Technical Problem

The traditional white box testing method requires writing test cases for each fault code, which leads to large workload and error prone, and poor scalability, which cannot guarantee the accuracy and reliability of fault code storage.

Method used

By pre-constructing a fault mapping library, record the mapping relationship between the fault identification variable and the standard fault code, read the test fault code stored in the electronic control unit and compare it with the standard fault code, judge the fault code storage performance, and avoid human writing of test cases , realize the accuracy and reliability of fault code storage, and improve the scalability of tests.

Benefits of technology

It realizes the accuracy and reliability of fault code storage of electronic control units, reduces the error rate of test case writing, improves the scalability of fault code storage tests, simplifies the test steps, and does not require frequent changes to test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737123B_ABST
    Figure CN111737123B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a test method, device, equipment and storage medium for fault code storage. The method includes: for each fault identification variable recorded in a pre-built fault mapping library, reading the test fault code stored by the electronic control unit to be tested based on the fault identification variable, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit to be tested and the standard fault code; by comparing the test fault code and the standard fault code corresponding to each fault identification variable, the fault code storage performance of the electronic control unit to be tested is determined. The technical solution provided by the embodiment of the present invention realizes the performance detection of the fault code storage on the electronic control unit, without the need to pre-write the corresponding test case for each fault code of the electronic control unit, avoiding the error rate of manually writing the test case, ensuring the accuracy and reliability of the fault code storage on the electronic control unit, and improving the scalability of the fault code storage test on the electronic control unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of vehicle data processing technology, and in particular to a test method, device, equipment and storage medium for storing fault codes. Background Art

[0002] In order to ensure the safety of the vehicle during driving, each electronic control unit (ECU) installed on the vehicle is usually equipped with a corresponding fault self-detection function, so that when the ECU detects a fault, it directly stores the fault in the form of a fault code, which is convenient for maintenance personnel to use special fault detection equipment to directly read the fault code from the ECU and troubleshoot the fault. In order to discover possible detection and storage errors during fault detection as early as possible, it is usually necessary to perform white box testing of fault code storage for each ECU during the vehicle development stage to ensure the accuracy of fault code storage.

[0003] At present, the traditional white-box testing method usually pre-writes corresponding test cases for each fault code in the ECU diagnostic specification. In each test case, the expected fault code for the fault to be tested is written. Then, by comparing the test fault code obtained by executing the test case on the ECU with the corresponding expected fault code, the authenticity of the fault code storage under the ECU is analyzed.

[0004] However, since each fault code in the ECU diagnostic specification requires a corresponding test case to be written, the workload of writing test cases is greatly increased, and manually written test cases are prone to errors and cannot guarantee the accuracy of fault code storage. At the same time, once the test steps of fault code storage are changed, all test cases need to be corrected, making the scalability of fault code storage testing extremely poor. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for testing fault code storage, which ensure the accuracy and reliability of fault code storage on an electronic control unit and improve the scalability of fault code storage testing on an electronic control unit.

[0006] In a first aspect, an embodiment of the present invention provides a method for testing fault code storage, the method comprising:

[0007] For each fault identification variable recorded in a pre-built fault mapping library, reading a test fault code stored in the electronic control unit under test based on the fault identification variable, wherein the fault mapping library records a mapping relationship between each fault identification variable of the electronic control unit under test and a standard fault code;

[0008] By comparing the test fault code and the standard fault code corresponding to each fault identification variable, the fault code storage performance of the electronic control unit to be tested is determined.

[0009] In a second aspect, an embodiment of the present invention provides a test device for storing fault codes, the device comprising:

[0010] A fault code reading module is used to read the test fault code stored in the electronic control unit under test based on the fault identification variable for each fault identification variable recorded in a pre-built fault mapping library, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit under test and the standard fault code;

[0011] The storage performance test module is used to determine the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable.

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

[0013] one or more processors;

[0014] A storage device for storing one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the fault code storage test method described in any embodiment of the present invention.

[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the test method for storing fault codes as described in any embodiment of the present invention.

[0017] The embodiment of the present invention provides a test method, device, equipment and storage medium for fault code storage, which pre-builds a fault mapping library that records the mapping relationship between each fault identification variable and a standard fault code, and then judges the fault code storage performance of the electronic control unit to be tested by reading the test fault code stored based on each fault identification variable recorded in the fault mapping library, and compares it with the standard fault code of the fault identification variable in the fault mapping library, so as to realize the performance detection of the fault code storage on the electronic control unit, and does not need to write a corresponding test case for each fault code of the electronic control unit in advance, thereby avoiding the error rate of manually writing test cases and ensuring the accuracy and reliability of the fault code storage on the electronic control unit; at the same time, the mapping relationship between each fault identification variable of the electronic control unit and the standard fault code is recorded by the fault mapping library, and when the fault code storage of each fault identification variable is tested subsequently, the same test steps can be used without changing the test case of the fault code, thereby improving the scalability of the fault code storage test on the electronic control unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0019] Figure 1 A flowchart of a method for testing fault code storage provided in the first embodiment of the present invention;

[0020] Figure 2 A flowchart of a method for testing fault code storage provided in the second embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the structure of a test device for storing fault codes provided in Embodiment 3 of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0024] Embodiment 1

[0025] Figure 1 A flowchart of a method for testing fault code storage provided in Embodiment 1 of the present invention. This embodiment can be applied to any situation in which the performance of storing fault codes of an electronic control unit is tested. The method for testing fault code storage provided in this embodiment can be executed by a device for testing fault code storage provided in an embodiment of the present invention, which can be implemented in software and / or hardware and integrated in an electronic device that executes this method.

[0026] Specifically, refer to Figure 1 , the method specifically comprises the following steps:

[0027] S110, for each fault identification variable recorded in a pre-built fault mapping library, read the test fault code stored in the electronic control unit under test based on the fault identification variable, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit under test and the standard fault code.

[0028] Specifically, in order to ensure the safety of the vehicle during driving, each electronic control unit installed on the vehicle is usually provided with a corresponding fault self-detection function. When each electronic control unit detects a certain fault, the fault is directly stored in the form of a fault code on the electronic control unit, so that the maintenance personnel can use a dedicated fault detection device to directly read the stored fault code from each electronic control unit, and conveniently troubleshoot the fault. At this time, in order to ensure the accuracy of troubleshooting, it is required that each electronic control unit can accurately store the fault code corresponding to the fault when a certain fault is detected, so as to avoid the situation where the electronic control unit detects fault A and mistakenly stores the fault code corresponding to fault B; therefore, in order to ensure the accuracy and reliability of the fault code storage on each electronic control unit, this embodiment mainly tests the fault code storage performance of each electronic control unit in the vehicle development stage, so as to ensure that when a fault occurs in the subsequent vehicle during driving, the maintenance personnel can accurately troubleshoot the faults of each electronic control unit by reading the stored fault code, so as to carry out timely maintenance, thereby ensuring the maintenance efficiency of vehicle faults.

[0029] In the present embodiment, in order to avoid the problem that test case writing is prone to errors when manually writing test cases for storing each fault code under each electronic control unit, the control structure of fault diagnosis on the vehicle and the diagnostic specifications of the electronic control unit can be analyzed to determine the possible faults on each electronic control unit, and all possible faults on the electronic control unit are marked with corresponding fault identification variables, and at the same time, a standard fault code that can accurately represent all possible fault information on the electronic control unit is determined, and then the fault identification variable corresponding to each fault is associated with the standard fault code of the fault, so that the corresponding standard fault code can be found according to the actual fault identification variable later; at this time, in order to facilitate the unified management of the fault identification variables corresponding to each fault and the standard fault code of the fault, the present embodiment will pre-construct a fault mapping library to record the mapping relationship between the fault identification variables corresponding to all possible faults on each electronic control unit installed on the vehicle and the standard fault code. At this time, by searching the fault mapping library, the possible fault identification variables of the electronic control unit and the standard fault code of the fault identification variable can be obtained.

[0030] Optionally, multiple electronic control units may be installed on the vehicle. This embodiment will test the fault code storage performance of each electronic control unit. Therefore, the electronic control unit to be tested that needs to undergo a fault code storage performance test this time will be determined from the multiple electronic control units. By analyzing each fault identification variable recorded in a pre-built fault mapping library, the electronic control unit to be tested can store the test fault code corresponding to the fault identification variable by confirming the fault identification variable. The test fault code is the fault code actually stored when the electronic control unit to be tested detects the existence of the fault indicated by the fault identification variable. Subsequently, the fault code storage performance of the electronic control unit to be tested is analyzed by comparing the test fault code stored for each fault identification variable by the electronic control unit to be tested with the standard fault code of the fault identification variable.

[0031] In addition, since the electronic control unit under test consumes a certain storage time when storing the test fault code when detecting the existence of the fault indicated by each fault identification variable, in order to ensure the success rate of reading the test fault code on the electronic control unit under test, in this embodiment, reading the test fault code stored by the electronic control unit under test based on the fault identification variable can specifically include: reading the test fault code stored by the electronic control unit under test based on the fault identification variable according to the preset storage time of the fault identification variable of the electronic control unit under test.

[0032] Specifically, in this embodiment, by analyzing the historical storage process of storing fault codes when the electronic control unit detects a certain fault, a preset storage time for the fault identification variable of the electronic control unit to be tested can be pre-set. Therefore, for each fault identification variable recorded in the pre-built fault mapping library, after determining that the electronic control unit to be tested has detected the fault identification variable, it will usually wait for a period of time of the preset storage time, and then read the test fault code stored based on the fault identification variable on the electronic control unit to be tested, so as to ensure that the electronic control unit to be tested has successfully stored the corresponding test fault code for the fault identification variable, avoid the failure of the test fault code reading, and thus ensure the test performance of the fault code storage on the electronic control unit to be tested.

[0033] S120, determining the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable.

[0034] Specifically, after reading the test fault code stored in the electronic control unit under test based on each fault identification variable recorded in the fault mapping library, the present embodiment will search for the standard fault code of the fault identification variable in the fault mapping library, and then determine whether the two are consistent by comparing the test fault code stored in the electronic control unit under test based on each fault identification variable with the standard fault code mapped by the fault identification variable in the fault mapping library. If the test fault code and the standard fault code corresponding to each fault identification variable are consistent, it is determined that the electronic control unit under test can accurately store the fault code under the specific fault detected, that is, the fault code stored on the electronic control unit under test can accurately represent the fault detection result of the electronic control unit under test; however, if there is a test fault code corresponding to a certain fault identification variable that is inconsistent with the standard fault code mapped by the fault identification variable in the fault mapping library, it is determined that the electronic control unit under test has a fault code storage defect, and the fault code storage function of the electronic control unit under test needs to be improved to improve the accuracy and reliability of fault code storage on the electronic control unit.

[0035] The technical solution provided in the present embodiment pre-builds a fault mapping library that records the mapping relationship between each fault identification variable and the standard fault code, and then judges the fault code storage performance of the electronic control unit to be tested by reading the test fault code stored in the electronic control unit based on each fault identification variable recorded in the fault mapping library, and compares it with the standard fault code of the fault identification variable in the fault mapping library, thereby realizing the performance detection of the fault code storage on the electronic control unit, without having to write a corresponding test case for each fault code of the electronic control unit in advance, avoiding the error rate of manually writing test cases, and ensuring the accuracy and reliability of the fault code storage on the electronic control unit; at the same time, the mapping relationship between each fault identification variable of the electronic control unit and the standard fault code is recorded through the fault mapping library, and when the fault code storage of each fault identification variable is tested subsequently, the same test steps can be used without changing the test case of the fault code, thereby improving the scalability of the fault code storage test on the electronic control unit.

[0036] Embodiment 2

[0037] Figure 2 A flow chart of a test method for storing fault codes provided in the second embodiment of the present invention. The embodiment of the present invention is optimized on the basis of the above embodiment. Optionally, this embodiment mainly explains in detail the specific process of storing the corresponding test fault code of the electronic control unit to be tested based on each fault identification variable recorded in the fault mapping library.

[0038] For details, see Figure 2 , the method of this embodiment may specifically include:

[0039] S210, traversing the fault identification variables recorded in the fault mapping library, and sending the currently traversed fault identification variable to the electronic control unit to be tested, so that the electronic control unit to be tested stores the test fault code determined based on the fault identification variable in the fault code list.

[0040] Optionally, in order to ensure the comprehensiveness of the fault code storage test on the electronic control unit, the present embodiment needs to test the storage accuracy of the test fault code corresponding to each fault identification variable recorded in the fault mapping library of the electronic control unit to be tested. At this time, each fault identification variable recorded in the fault mapping library can be traversed, and one fault identification variable is obtained in sequence each time to perform the fault code storage test of the electronic control unit to be tested. After each traversal to obtain a fault identification variable, the currently traversed fault identification variable is sent to the electronic control unit to be tested, so that after the electronic control unit to be tested receives the fault identification variable, it confirms that the fault indicated by the fault identification variable is detected this time, and then stores the test fault code corresponding to the fault.

[0041] Exemplarily, in order to avoid the loss of test fault codes, a fault code list is maintained on the electronic control unit under test, which is used to store the test fault codes determined by the electronic control unit under test based on each fault identification variable recorded in the fault mapping library; therefore, after the electronic control unit under test receives the fault identification variable, it will store the test fault code determined based on the fault identification variable in the fault code list, and subsequently read the test fault codes corresponding to each fault identification variable from the fault code list.

[0042] At the same time, the electronic control unit to be tested will also be configured with a fault identification interface for identifying the currently traversed fault identification variable.

[0043] S220, for each fault identification variable recorded in a pre-built fault mapping library, read the test fault code stored in the electronic control unit under test based on the fault identification variable, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit under test and the standard fault code.

[0044] Optionally, in order to ensure the reading accuracy of the test fault codes corresponding to each fault identification variable on the electronic control unit under test, the present embodiment may further include, before sending the currently traversed fault identification variable to the electronic control unit under test: sending a corresponding fault code clearing request to the electronic control unit under test, so that the electronic control unit under test clears the test fault codes stored in the fault code list.

[0045] Specifically, before traversing the fault identification variables recorded in the fault mapping library and sending the currently traversed fault identification variable to the electronic control unit under test, the present embodiment first sends a fault code clearing request to the electronic control unit under test to instruct the electronic control unit under test to completely clear the test fault codes corresponding to other fault identification variables currently stored in the fault code list set thereon; after clearing the fault code list, the currently traversed fault identification variable is sent to the electronic control unit under test; at this time, the electronic control unit under test will store the test fault code determined based on the currently traversed fault identification variable into the fault code list, so that the fault code list will only store the test fault code corresponding to the currently traversed fault identification variable, and will not store the test fault code corresponding to other fault identification variables, thereby ensuring the uniqueness of the fault identification variables facing the test fault codes stored in the fault code list at different traversal times.

[0046] Therefore, in this embodiment, reading the test fault code stored in the electronic control unit under test based on the fault identification variable may specifically include: reading an existing test fault code in a fault code list on the electronic control unit under test.

[0047] Specifically, since the fault code list on the electronic control unit to be tested only stores the test fault code corresponding to the currently traversed fault identification variable, and does not store the test fault codes corresponding to other fault identification variables, when reading the test fault code stored in the electronic control unit to be tested based on the currently traversed fault identification variable, all existing test fault codes in the fault code list on the electronic control unit to be tested can be directly read as the test fault code corresponding to the currently traversed fault identification variable, and there is no need to distinguish the fault identification variables facing the stored test fault codes, thereby improving the fault code reading efficiency.

[0048] S230, determining the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable.

[0049] The technical solution provided in the present embodiment pre-builds a fault mapping library that records the mapping relationship between each fault identification variable and the standard fault code, and then judges the fault code storage performance of the electronic control unit to be tested by reading the test fault code stored in the electronic control unit based on each fault identification variable recorded in the fault mapping library, and compares it with the standard fault code of the fault identification variable in the fault mapping library, thereby realizing the performance detection of the fault code storage on the electronic control unit, without having to write a corresponding test case for each fault code of the electronic control unit in advance, avoiding the error rate of manually writing test cases, and ensuring the accuracy and reliability of the fault code storage on the electronic control unit; at the same time, the mapping relationship between each fault identification variable of the electronic control unit and the standard fault code is recorded through the fault mapping library, and when the fault code storage of each fault identification variable is tested subsequently, the same test steps can be used without changing the test case of the fault code, thereby improving the scalability of the fault code storage test on the electronic control unit.

[0050] Embodiment 3

[0051] Figure 3 A structural diagram of a test device for storing fault codes provided in the third embodiment of the present invention is shown in FIG. Figure 3 As shown, the device may include:

[0052] A fault code reading module 310 is used to read the test fault code stored in the electronic control unit under test based on the fault identification variable for each fault identification variable recorded in a pre-built fault mapping library, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit under test and the standard fault code;

[0053] The storage performance test module 320 is used to determine the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable.

[0054] The technical solution provided in the present embodiment pre-builds a fault mapping library that records the mapping relationship between each fault identification variable and the standard fault code, and then judges the fault code storage performance of the electronic control unit to be tested by reading the test fault code stored in the electronic control unit based on each fault identification variable recorded in the fault mapping library, and compares it with the standard fault code of the fault identification variable in the fault mapping library, thereby realizing the performance detection of the fault code storage on the electronic control unit, without having to write a corresponding test case for each fault code of the electronic control unit in advance, avoiding the error rate of manually writing test cases, and ensuring the accuracy and reliability of the fault code storage on the electronic control unit; at the same time, the mapping relationship between each fault identification variable of the electronic control unit and the standard fault code is recorded through the fault mapping library, and when the fault code storage of each fault identification variable is tested subsequently, the same test steps can be used without changing the test case of the fault code, thereby improving the scalability of the fault code storage test on the electronic control unit.

[0055] Furthermore, a fault code list is maintained on the above-mentioned electronic control unit to be tested, which is used to store the test fault code determined by the electronic control unit to be tested based on each fault identification variable recorded in the fault mapping library.

[0056] Furthermore, the above-mentioned fault code storage test device may also include:

[0057] The fault variable traversal module is used to traverse the fault identification variables recorded in the fault mapping library and send the currently traversed fault identification variable to the electronic control unit to be tested, so that the electronic control unit to be tested stores the test fault code determined based on the fault identification variable in the fault code list.

[0058] Furthermore, the above-mentioned fault code storage test device may also include:

[0059] The fault code clearing module is used to send a corresponding fault code clearing request to the electronic control unit under test, so that the electronic control unit under test clears the test fault code stored in the fault code list.

[0060] Accordingly, the fault code reading module 310 can be specifically used for:

[0061] Read the existing test fault codes in the fault code list on the ECU to be tested.

[0062] Furthermore, the above-mentioned electronic control unit to be tested is configured with a fault identification interface for identifying the currently traversed fault identification variable.

[0063] Furthermore, the fault code reading module 310 may also be specifically used for:

[0064] According to the preset storage time length of the fault identification variable of the electronic control unit to be tested, the test fault code stored by the electronic control unit to be tested based on the fault identification variable is read.

[0065] The fault code storage test device provided in this embodiment can be applied to the fault code storage test method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0066] Embodiment 4

[0067] Figure 4 This is a schematic diagram of the structure of an electronic device provided by Embodiment 4 of the present invention. Figure 4 As shown, the vehicle includes a processor 40, a storage device 41 and a communication device 42; the number of processors 40 in the electronic device can be one or more. Figure 4 A processor 40 is taken as an example; the processor 40, the storage device 41 and the communication device 42 of the electronic device can be connected through a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0068] The storage device 41 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the test method for fault code storage in the embodiment of the present invention (for example, the fault code reading module 310 and the storage performance test module 320 in the test device for fault code storage). The processor 40 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the storage device 41, that is, realizing the above-mentioned test method for fault code storage.

[0069] The storage device 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some examples, the storage device 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the vehicle via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0070] The communication device 42 may be used to implement a network connection or a mobile data connection between electronic devices.

[0071] An electronic device provided in this embodiment can be used to execute the test method for storing fault codes provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0072] Embodiment 5

[0073] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the test method for storing fault codes in any of the above embodiments can be implemented.

[0074] The method specifically includes:

[0075] For each fault identification variable recorded in a pre-built fault mapping library, reading a test fault code stored in the electronic control unit under test based on the fault identification variable, wherein the fault mapping library records a mapping relationship between each fault identification variable of the electronic control unit under test and a standard fault code;

[0076] By comparing the test fault code and the standard fault code corresponding to each fault identification variable, the fault code storage performance of the electronic control unit to be tested is determined.

[0077] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the fault code storage test method provided in any embodiment of the present invention.

[0078] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

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

[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for testing fault code storage, characterized in that: include: For each fault identification variable recorded in a pre-built fault mapping library, reading a test fault code stored in the electronic control unit under test based on the fault identification variable, wherein the fault mapping library records a mapping relationship between each fault identification variable of the electronic control unit under test and a standard fault code; Determining the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable; Wherein, a fault code list is maintained on the electronic control unit to be tested; Before reading the test fault code stored in the electronic control unit to be tested based on the fault identification variable, the method further includes: Each fault identification variable recorded in the fault mapping library is traversed in sequence, and the currently traversed fault identification variable is sent to the electronic control unit to be tested, so that the electronic control unit to be tested stores the test fault code determined based on the fault identification variable in the fault code list.

2. The method according to claim 1, characterized in that The fault code list is used to store the test fault code determined by the electronic control unit to be tested based on each fault identification variable recorded in the fault mapping library.

3. The method according to claim 1, characterized in that Before sending the currently traversed fault identification variable to the electronic control unit to be tested, the method further includes: Sending a corresponding fault code clearing request to the electronic control unit to be tested, so that the electronic control unit to be tested clears the test fault code stored in the fault code list; Accordingly, reading the test fault code stored in the electronic control unit to be tested based on the fault identification variable includes: Read the existing test fault code in the fault code list on the electronic control unit to be tested.

4. The method according to claim 1, characterized in that The electronic control unit to be tested is provided with a fault identification interface for identifying the currently traversed fault identification variable.

5. The method according to any one of claims 1 to 4, characterized in that: The step of reading the test fault code stored in the electronic control unit under test based on the fault identification variable includes: According to the preset storage time length of the fault identification variable of the electronic control unit to be tested, the test fault code stored by the electronic control unit to be tested based on the fault identification variable is read.

6. A test device for storing fault codes, characterized in that: include: A fault code reading module is used to read the test fault code stored in the electronic control unit under test based on the fault identification variable for each fault identification variable recorded in a pre-built fault mapping library, wherein the fault mapping library records the mapping relationship between each fault identification variable of the electronic control unit under test and the standard fault code; A storage performance test module, used to determine the fault code storage performance of the electronic control unit to be tested by comparing the test fault code and the standard fault code corresponding to each fault identification variable; Wherein, a fault code list is maintained on the electronic control unit to be tested; Wherein, the device further comprises: The fault variable traversal module is used to traverse each fault identification variable recorded in the fault mapping library in sequence, and send the currently traversed fault identification variable to the electronic control unit to be tested, so that the electronic control unit to be tested stores the test fault code determined based on the fault identification variable in the fault code list.

7. The device according to claim 6, characterized in that The fault code list is used to store the test fault code determined by the electronic control unit to be tested based on each fault identification variable recorded in the fault mapping library.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the fault code storage test method as described in any one of claims 1-5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the test method for storing fault codes as described in any one of claims 1 to 5 is implemented.