Method and device for testing fault diagnosis function of controller

Through the method of automated fault manufacturing and recovery, the problems of waste of resources and low testing efficiency caused by manual operation dependence in the prior art are solved, and fully automated testing of controller fault diagnosis is realized, which improves testing efficiency and accuracy.

CN119644987APending Publication Date: 2025-03-18SUZHOU ZHIHUA AUTOMOTIVE SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411762371.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing controller fault diagnosis and testing methods rely on manual operations, resulting in waste of resources and inefficient testing.

Method used

By determining the fault code corresponding to the target fault, perform recovery operations to ensure that there is no fault in the initial state, and then the target fault is manufactured and restored to achieve fully automated testing of the fault.

Benefits of technology

It realizes fully automated testing of the controller fault diagnosis function, reduces the consumption of manpower and time resources, and improves testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644987A_ABST
    Figure CN119644987A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for testing a fault diagnosis function of a controller. The method comprises the following steps: determining a first fault code corresponding to a target fault; after executing the first recovery operation on the tested device, acquiring a second fault code from a tested controller of the tested device; based on the first fault code and the second fault code, whether the detected controller has a target fault in the initial state is judged; when the tested controller does not have the target fault in the initial state, executing a fault manufacturing operation on the tested device so as to manufacture the target fault in the tested controller; and after the target fault is successfully manufactured in the tested controller, executing a second recovery operation on the tested device, so that the target fault becomes a historical fault. According to the scheme, full-automatic testing of the fault diagnosis function of the controller can be achieved, the problem of incomplete functions of a testing scheme in the prior art can be solved, and consumption of human resources and time can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of fault diagnosis, and in particular to a method and device for testing a controller fault diagnosis function. Background Art

[0002] Today, in order to gain greater advantages in the fierce market competition and meet the various personalized needs of consumers, automobile manufacturers are now installing more and more Electronic Control Units (ECU) on vehicles to develop different personalized functions. Therefore, how to fully test and verify various ECUs of vehicles before the vehicles are put on the market has brought increasing challenges to automobile testers who are facing tight development cycles.

[0003] Among them, DTC (Digital Trouble Code) is a diagnostic trouble code of ECU, which is generated by ECU and used to indicate faults or abnormalities in the engine, transmission system or other systems. When a vehicle fails, ECU will record a DTC and display it to the driver through warning lights on the dashboard. DTC is a very important diagnostic basis for automotive developers and after-sales maintenance to troubleshoot faults. Therefore, OEM testers need to fully test and verify the logic of each DTC of ECU while testing all functions of ECU.

[0004] However, existing testing methods all rely on manual testing, which consumes too much manpower and time resources and cannot complete the testing efficiently and accurately. Summary of the invention

[0005] In order to solve the problems of the prior art, the present application provides a method and device for testing a controller fault diagnosis function to solve one or more technical problems existing in the prior art.

[0006] In a first aspect, the present application provides a method for testing a controller fault diagnosis function, the method comprising:

[0007] Determine a first fault code corresponding to a target fault;

[0008] After performing a first recovery operation on the device under test, obtaining a second fault code from a controller under test of the device under test;

[0009] Determining whether the controller under test has the target fault in an initial state based on the first fault code and the second fault code;

[0010] When the target fault does not exist in the controller under test in an initial state, performing a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test;

[0011] After the target fault is successfully manufactured in the controller under test, a second recovery operation is performed on the device under test to make the target fault become a historical fault.

[0012] In an embodiment of the present application, when it is determined that the target fault does not exist in the controller under test in the initial state, a fault manufacturing operation is performed on the device under test to manufacture the target fault in the controller under test, and after the target fault is successfully manufactured in the controller under test, a second recovery operation is performed on the device under test to make the target fault become a historical fault, that is, the manufacturing and recovery of the corresponding target fault is achieved, thereby realizing fully automated testing of the controller's fault diagnosis function, which can not only solve the problem of incomplete functions in the test scheme in the prior art, but also reduce the consumption of human resources and time.

[0013] In some specific embodiments, when the target fault is a high voltage fault or a low voltage fault, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of the first recovery operation on the device under test includes:

[0014] Performing a power-on operation on the power supply or sending a normal voltage value to the power supply so that after the power supply adjusts its own voltage to the normal voltage value, the controller under test feeds back a second fault code based on the normal voltage value; or,

[0015] When the target fault is a signal fault, performing a first recovery operation on the device under test includes:

[0016] Sending a non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a second fault code based on the non-fault signal value; or,

[0017] When the target fault is a message timeout fault, the performing a first recovery operation on the device under test includes:

[0018] Sending a first target message to the controller under test at a preset period, so that the controller under test feeds back a second fault code based on the first target message; or,

[0019] When the target fault is a cyclic redundancy check fault, performing a first recovery operation on the device under test includes:

[0020] A second target message and a target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a second fault code based on the second target message and the target cyclic redundancy check code.

[0021] In the embodiment of the present application, different first recovery operations are performed on the device under test for different types of faults so as to quickly ensure that the target fault does not exist in the device under test, thereby ensuring that the target fault successfully created in the controller under test later is created by the fault creation operation performed on the device under test this time.

[0022] In some specific embodiments, judging whether the controller under test has the target fault in the initial state based on the first fault code and the second fault code includes:

[0023] Determining whether the second fault code includes the first fault code, and if not, determining that the controller under test does not have the target fault in the initial state;

[0024] If the second fault code includes the first fault code, it is determined whether the current state of the target fault in the controller under test is a historical fault. If so, it is determined that the target fault does not exist in the controller under test in the initial state.

[0025] In an embodiment of the present application, it is determined whether the second fault code obtained from the tested controller of the tested device after executing the first recovery operation on the tested device contains the first fault code. If not, it is directly determined that the tested controller does not have the target fault in the initial state. If the second fault code contains the first fault code, it is necessary to further determine whether the current state of the target fault in the tested controller is a historical fault. If so, it is determined that the tested controller does not have the target fault in the initial state, thereby achieving rapid and accurate determination of whether the tested controller has the target fault in the initial state.

[0026] In some specific embodiments, after performing a fault manufacturing operation on the device under test, the method further includes:

[0027] Acquiring a third fault code from the controller under test;

[0028] Determine whether the third fault code contains the first fault code. If so, determine whether the current state of the target fault in the controller under test is the current fault. If so, determine that the target fault is successfully manufactured in the controller under test.

[0029] In an embodiment of the present application, a third fault code is obtained from the controller under test by executing a fault manufacturing operation on the device under test, and then it is determined whether the third fault code obtained contains the first fault code. If so, it is further determined whether the current state of the target fault in the controller under test is the current fault. If so, it is determined that the target fault is successfully manufactured in the controller under test, thereby quickly confirming that the target fault is successfully manufactured in the controller under test.

[0030] In some specific embodiments, when the target fault is a high voltage fault, performing a fault manufacturing operation on the device under test includes:

[0031] sending a high voltage value to the power supply so that after the power supply adjusts its own voltage to the high voltage value, the controller under test feeds back a third fault code based on the high voltage value; or,

[0032] When the target fault is a low voltage fault, performing a fault manufacturing operation on the device under test includes:

[0033] sending a low voltage value to the power supply so that after the power supply adjusts its own voltage to the low voltage value, the controller under test feeds back a third fault code based on the low voltage value; or,

[0034] When the target fault is a signal fault, performing a fault manufacturing operation on the device under test includes:

[0035] Sending a fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a third fault code based on the fault signal value; or,

[0036] When the target fault is a message timeout fault, performing a fault manufacturing operation on the device under test includes:

[0037] Stop sending the first target message to the controller under test so that the controller under test feeds back a third fault code; or,

[0038] When the target fault is a cyclic redundancy check fault, performing a fault manufacturing operation on the device under test includes:

[0039] Stop sending the second target message and the target cyclic redundancy check code corresponding to the second target message to the controller under test, or send the second target message and a cyclic redundancy check code that does not correspond to the second target message to the controller under test, so that the controller under test feeds back a third fault code.

[0040] In the embodiments of the present application, different fault manufacturing operations are performed on the device under test for different types of faults so as to quickly manufacture the target fault in the device under test, and there is no need to manually control the device under test during the entire process, thereby reducing time consumption and reducing errors caused by manual control.

[0041] In some specific embodiments, after performing the second recovery operation on the device under test, the method further includes:

[0042] Acquiring a fourth fault code from the controller under test;

[0043] Determine whether the fourth fault code includes the first fault code. If so, determine whether the current state of the target fault in the controller under test is a historical fault. If so, determine that the target fault becomes a historical fault.

[0044] In an embodiment of the present application, a fourth fault code is obtained from the controller under test by executing a second recovery operation on the device under test, and then it is determined whether the obtained fourth fault code contains the first fault code. If so, it is further determined whether the current state of the target fault in the controller under test is a historical fault. If so, it is determined that the target fault has become a historical fault, thereby quickly confirming that the target fault has become a historical fault in the controller under test.

[0045] In some specific embodiments, when the target fault is a high voltage fault, performing a second recovery operation on the device under test includes:

[0046] sending a high voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the high voltage recovery value, the controller under test feeds back a fourth fault code based on the high voltage recovery value; or,

[0047] When the target fault is a low voltage fault, performing a second recovery operation on the device under test includes:

[0048] sending a low voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the low voltage recovery value, the controller under test feeds back a fourth fault code based on the low voltage recovery value; or,

[0049] When the target fault is a signal fault, performing a second recovery operation on the device under test includes:

[0050] Sending the non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a fourth fault code based on the non-fault signal value; or,

[0051] When the target fault is a message timeout fault, performing a second recovery operation on the device under test includes:

[0052] sending the first target message to the controller under test according to a preset period, so that the controller under test feeds back a fourth fault code based on the first target message; or,

[0053] When the target fault is a cyclic redundancy check fault, performing a second recovery operation on the device under test includes:

[0054] The second target message and the target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a fourth fault code based on the second target message and the target cyclic redundancy check code.

[0055] In the embodiment of the present application, different second recovery operations are performed on the device under test for different types of faults so as to quickly convert the target fault into a historical fault in the device under test, and there is no need to manually control the device under test during the entire process, thereby reducing time consumption and reducing errors caused by manual control.

[0056] In some specific embodiments, after the target fault becomes a historical fault, the method further includes:

[0057] After executing the historical fault clearing operation on the device under test, a fifth fault code is obtained from the controller under test, and it is determined whether the fifth fault code contains the first fault code. If not, it is determined that the historical fault in the controller under test is cleared.

[0058] In an embodiment of the present application, a historical fault clearing operation is performed on the device under test to obtain the fifth fault code fed back by the controller under test, and then it is determined whether the fifth fault code contains the first fault code to quickly determine whether the historical fault in the controller under test is cleared.

[0059] In some specific embodiments, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of a historical fault clearing operation on the device under test includes at least one of the following:

[0060] Turn off the power supply and then turn it on again;

[0061] or, sending a reset instruction to the controller under test;

[0062] Or, after powering off the power supply, obtaining the return value of the power supply serial port, and when the return value is 0, powering on the power supply;

[0063] Or, send a clear instruction to the controller under test.

[0064] In a second aspect, the present application provides a test device for a controller fault diagnosis function, the device comprising:

[0065] A receiving module, used for determining a first fault code corresponding to a target fault;

[0066] A first recovery module, configured to obtain a second fault code from a controller under test of the device under test after performing a first recovery operation on the device under test;

[0067] A judgment module, configured to judge whether the controller under test has the target fault in an initial state based on the first fault code and the second fault code;

[0068] a manufacturing module, configured to perform a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test when the target fault does not exist in the controller under test in an initial state;

[0069] The second recovery module is used to perform a second recovery operation on the device under test after successfully manufacturing the target fault in the controller under test, so as to make the target fault become a historical fault.

[0070] In a third aspect, the present application provides a computer system comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the computer program is executed by the processor, a test method for the controller diagnostic fault function as described in any one of the first aspects is implemented.

[0071] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the test method for the controller fault diagnosis function as described in any one of the first aspects is implemented.

[0072] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:

[0073] In the technical scheme for implementing the present invention, a first fault code corresponding to a target fault is first determined, and then a first recovery operation is performed on the device under test, and then a second fault code is obtained from a controller under test of the device under test. Based on the first fault code and the second fault code, it is determined whether the controller under test has the target fault in an initial state. When the controller under test does not have the target fault in the initial state, a fault manufacturing operation is performed on the device under test to manufacture the target fault in the controller under test. After the target fault is successfully manufactured in the controller under test, a second recovery operation is performed on the device under test to convert the target fault into a historical fault, thereby realizing fully automated testing of the controller's fault diagnosis function. This can not only solve the problem of incomplete functions in the test scheme in the prior art, but also reduce the consumption of human resources and time.

[0074] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:

[0076] Figure 1 is a flow chart of a method for testing a controller fault diagnosis function provided by an embodiment of the present application;

[0077] Figure 2 This is a hardware connection diagram of a test system for a controller fault diagnosis function provided in an embodiment of the present application;

[0078] Figure 3 It is a structural schematic diagram of a test device for a controller fault diagnosis function provided in an embodiment of the present application;

[0079] Figure 4 It is an architectural diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0081] As described in the background technology, the existing diagnostic fault code testing method has the problem of consuming too much manpower and time resources. Based on this, the present application proposes a controller diagnostic fault function testing method, which can realize the fully automated testing of the controller diagnostic fault function and can reduce the consumption of human resources and time.

[0082] The solution of the present application will be described in detail below in conjunction with the accompanying drawings and various embodiments.

[0083] Embodiment 1

[0084] Figure 1 is a flow chart of a method for testing a controller fault diagnosis function provided in an embodiment of the present application, with reference to Figure 1 As shown, the method comprises the following steps:

[0085] S100: Determine a first fault code corresponding to a target fault.

[0086] The target fault in the embodiment of the present application refers to a fault that needs to be manufactured and restored in the controller under test during the current test process, and the first fault code is a DTC code (Diagnostic Trouble Code) corresponding to the target fault.

[0087] The target faults in the embodiments of the present application include, but are not limited to, high voltage faults, low voltage faults, signal faults, message timeout faults, or cyclic redundancy check (CRC) faults.

[0088] Reference Figure 2 As shown, in some specific embodiments, the test system of the controller diagnostic fault function includes a test tool 100 and a device under test, and the device under test includes a controller under test 200 and a controlled device 300. Among them, the test tool 100 is connected to the controller under test 200 for communication, the test tool 100 is connected to the controlled device 300 for communication, and the controller under test 200 is connected to the controlled device 300 for communication. The method provided in the embodiment of the present application is mainly applied to the test tool side. In the embodiment of the present application, the specific composition of the test tool 100, the controller under test 200 and the controlled device 300 is not limited. Without violating the inventive concept of the present application, the user can set it according to the actual test requirements.

[0089] In some specific embodiments, the test tool 100 can be run based on a terminal such as a computer (PC), the controller under test 200 includes but is not limited to an electronic control unit (ECU), and the controlled device 300 includes but is not limited to power supplies and other devices.

[0090] The present application scheme is described below by taking the test tool 100 running on a computer (PC), the controller under test 200 being an electronic control unit (ECU), and the controlled device 300 being two power supplies as an example.

[0091] In some specific embodiments, the test tool 100 and the controlled device 300 interact with the serial port of the controlled device 300 using a preset interface on the computer to achieve the purpose of receiving and sending data. For example, the test tool 100 can use the RS232 interface on the computer to call the RS232 function to interact with the serial port of the power supply (i.e., the controlled device 300). The data received and sent between the test tool 100 and the controller 200 are obtained and changed by calling the environment and system variables through the Panel of CANoe (CAN open environment).

[0092] S200: After executing a first recovery operation on the device under test, a second fault code is obtained from a controller under test of the device under test.

[0093] Normally, it is necessary to ensure that the target fault does not exist in the device under test in the initial state, so as to ensure that the target fault generated in the subsequent device under test is formed after the fault manufacturing operation is performed on the device under test. However, in the actual testing process, it cannot be ruled out that the target fault already exists in the device under test when the current test is performed. Therefore, for the accuracy of subsequent tests, it is necessary to perform a first recovery operation on the device under test before performing the target fault manufacturing. In this way, if the device under test itself already has the target fault, the device under test will be quickly restored to normal from the target fault state when the first recovery operation is performed, so as to ensure that the target fault does not exist in the device under test before the fault manufacturing operation is performed on the device under test.

[0094] In some specific embodiments, the second fault code fed back by the tested controller may be empty. For example, when the tested device does not have any fault in the initial state, the second fault code fed back by the tested device is empty.

[0095] In an embodiment of the present application, the fault codes obtained from the controller under test (including the second fault code, the third fault code, the fourth fault code and the fifth fault code) are global fault codes, that is, the fault codes obtained from the controller under test include fault codes corresponding to the current fault and historical faults.

[0096] S300: Determine whether the controller under test has the target fault in the initial state based on the first fault code and the second fault code.

[0097] S400: When the target fault does not exist in the controller under test in an initial state, performing a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test.

[0098] After determining that the target fault does not exist in the controller under test in the initial state, a fault manufacturing operation is performed on the device under test to ensure that the target fault in the subsequent controller under test is generated based on the current fault manufacturing operation.

[0099] S500: After successfully manufacturing the target fault in the controller under test, performing a second recovery operation on the device under test to make the target fault become a historical fault.

[0100] In some specific embodiments, when the target fault is a high voltage fault or a low voltage fault, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of the first recovery operation on the device under test includes:

[0101] Performing a power-on operation on the power supply or sending a normal voltage value to the power supply so that after the power supply adjusts its own voltage to the normal voltage value, the controller under test feeds back a second fault code based on the normal voltage value; or,

[0102] When the target fault is a signal fault, performing a first recovery operation on the device under test includes:

[0103] Sending a non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a second fault code based on the non-fault signal value; or,

[0104] When the target fault is a message timeout fault, the performing a first recovery operation on the device under test includes:

[0105] Sending a first target message to the controller under test at a preset period, so that the controller under test feeds back a second fault code based on the first target message; or,

[0106] When the target fault is a cyclic redundancy check fault, performing a first recovery operation on the device under test includes:

[0107] A second target message and a target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a second fault code based on the second target message and the target cyclic redundancy check code.

[0108] The test method for the controller fault diagnosis function provided in the present application can be applied to the test of diagnosing various different types of faults. For different types of faults, different first recovery operations are performed on the device under test to quickly ensure that the target fault does not exist in the device under test before performing the fault manufacturing operation.

[0109] In some specific embodiments, when testing the controller fault diagnosis function, in addition to configuring the corresponding first fault code for the target fault to be tested, corresponding test parameters may also be configured for the corresponding target fault according to actual test requirements. Different types of faults have different corresponding test parameters, and the test parameters corresponding to the relevant faults will be described one by one later, and will not be repeated here.

[0110] The following describes the present application scheme in detail by taking high voltage fault, low voltage fault, signal fault, message timeout fault and cyclic redundancy check fault as examples.

[0111] For high-voltage faults, the test parameters include high-voltage value, normal voltage value and high-voltage recovery value. Among them, when the power supply voltage is at the high-voltage value, it will be determined that a high-voltage fault has occurred in the power supply. At this time, the fault code (i.e., the second fault code) fed back by the controller under test will include the fault code corresponding to the high-voltage fault (i.e., the first fault code); the normal voltage value refers to the value when the power supply is working normally. After the power supply voltage is adjusted to the normal voltage value, if there is no high-voltage fault in the device under test, it will still be determined that there is no high-voltage fault. At this time, the fault code (i.e., the second fault code) fed back by the controller under test does not include the fault code corresponding to the high-voltage fault (i.e., the first fault code). If there is already a high-voltage fault in the current device under test, the high-voltage fault will be restored at this time. At this time, the controller under test feeds back The fault code (i.e., the second fault code) will include the fault code corresponding to the high-voltage fault (i.e., the first fault code), but the current state of the high-voltage fault in the controller under test is a historical fault; the high-voltage recovery value refers to the value used to recover the high-voltage fault. When a high-voltage fault occurs in the power supply, after the high-voltage recovery value is sent to it, the power supply will adjust its own voltage to the high-voltage recovery value. After the power supply voltage is adjusted to the high-voltage recovery value, the high-voltage fault in the device under test will be restored, and the fault code (i.e., the second fault code) fed back by the controller under test will include the fault code corresponding to the high-voltage fault (i.e., the first fault code), but the current state of the high-voltage fault in the controller under test is a historical fault.

[0112] The normal voltage value is usually less than the high voltage value and greater than the high voltage recovery value. After the power supply is powered on or the normal voltage value is sent to the power supply, the power supply will adjust its own voltage to the normal voltage value, and the controller under test will feedback the second fault code generated based on the normal voltage value after detecting that the voltage of the power supply is the normal voltage value.

[0113] For low voltage faults, the test parameters include low voltage value, normal voltage value and low voltage recovery value. Among them, when the power supply voltage is at the low voltage value, it will be determined that the power supply has a low voltage fault. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the low voltage fault (i.e., the first fault code); the normal voltage value refers to the value when the power supply is working normally. After the power supply voltage is adjusted to the normal voltage value, if the device under test does not currently have a low voltage fault, it will still be determined that there is no low voltage fault. At this time, the fault code fed back by the controller under test (i.e., the second fault code) does not include the fault code corresponding to the low voltage fault (i.e., the first fault code). If the current device under test already has a low voltage fault, the low voltage fault will be restored at this time. At this time, the controller under test will feedback The fault code (i.e., the second fault code) will include the fault code corresponding to the low voltage fault (i.e., the first fault code), but the current state of the low voltage fault in the controller under test is a historical fault; the low voltage recovery value refers to the value used to recover the low voltage fault. When a low voltage fault occurs in the power supply, after the low voltage recovery value is sent to it, the power supply will adjust its own voltage to the low voltage recovery value. After the power supply voltage is adjusted to the low voltage recovery value, the low voltage fault in the device under test will be restored. The fault code (i.e., the second fault code) fed back by the controller under test will include the fault code corresponding to the low voltage fault (i.e., the first fault code), but the current state of the low voltage fault in the controller under test is a historical fault.

[0114] The normal voltage value is usually greater than the low voltage value and less than the low voltage recovery value. The power supply is powered on or the normal voltage value is sent to the power supply. After the power supply is powered on or the power supply receives the normal voltage value, the power supply adjusts its own voltage to the normal voltage value. After the controller under test detects that the voltage of the power supply is the normal voltage value, it will feedback the second fault code generated based on the normal voltage value.

[0115] For signal faults, the test parameters usually include fault signal values ​​and non-fault signal values. Among them, when the controller under test receives a fault signal value, it will be determined that a signal fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the signal fault (i.e., the first fault code); and when the controller under test receives a non-fault signal value, if the controller under test does not currently have a signal fault, it will still be determined that no signal fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will not include the fault code corresponding to the signal fault (i.e., the first fault code). If the current controller under test already has a signal fault, the signal fault will be restored at this time. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the signal fault (i.e., the first fault code), but the current state of the signal fault in the controller under test is a historical fault.

[0116] In some specific embodiments, the fault signal value and / or the non-fault signal value may be sent to the controller under test in the form of a message.

[0117] For message timeout faults, the test parameters usually include the first target message. When the controller under test does not receive the first target message according to the preset period, it will be determined that a message timeout fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the message timeout fault (i.e., the first fault code); and when the controller under test receives the first target message according to the preset period, if the controller under test does not currently have a message timeout fault, it will still be determined that no message timeout fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will not include the fault code corresponding to the message timeout fault (i.e., the first fault code). If the current controller under test already has a message timeout fault, the message timeout fault will be restored at this time. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the message timeout fault (i.e., the first fault code), but the current state of the message timeout fault in the controller under test is a historical fault.

[0118] Among them, the embodiment of the present application does not specifically limit the preset period, and it can be set according to actual test requirements without violating the inventive concept of the present application.

[0119] For cyclic redundancy check faults, the test parameters usually include a second target message and a target cyclic redundancy check code corresponding to the second target message. Among them, when the controller under test does not receive the second target message and the target cyclic redundancy check code, or receives the second target message but the received cyclic redundancy check code is not the target cyclic redundancy check code corresponding to the second target message, it will be determined that a cyclic redundancy check type fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the cyclic redundancy check type fault (i.e., the first fault code); and when the controller under test receives the second target message and the target cyclic redundancy check code, if the controller under test does not currently have a cyclic redundancy check type fault, it will still be determined that no cyclic redundancy check type fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will not include the fault code corresponding to the cyclic redundancy check type fault (i.e., the first fault code). If the current controller under test already has a cyclic redundancy check type fault, the cyclic redundancy check type fault will be restored at this time. At this time, the fault code fed back by the controller under test (i.e., the second fault code) will include the fault code corresponding to the cyclic redundancy check type fault (i.e., the first fault code), but the current state of the cyclic redundancy check type fault in the controller under test is a historical fault.

[0120] In the embodiments of the present application, the specific values ​​or specific data contents of the test parameters corresponding to various types of faults are not limited, and can be set according to actual test requirements without violating the inventive concept of the present application.

[0121] In the embodiment of the present application, judging whether the controller under test has the target fault in the initial state based on the first fault code and the second fault code includes:

[0122] Determining whether the second fault code includes the first fault code, and if not, determining that the controller under test does not have the target fault in the initial state;

[0123] If the second fault code includes the first fault code, it is determined whether the current state of the target fault in the controller under test is a historical fault. If so, it is determined that the target fault does not exist in the controller under test in the initial state.

[0124] As described above, after performing the first recovery operation on the device under test and obtaining the second fault code from the controller under test of the device under test, if the second fault code does not contain the first fault code, it can be directly determined that the target fault does not exist in the controller under test in the initial state; if the second fault code contains the first fault code, it is necessary to further determine whether the current state of the target fault in the controller under test is a historical fault; if so, it is determined that the target fault does not exist in the controller under test in the initial state, thereby achieving rapid and accurate determination of whether the target fault exists in the controller under test in the initial state.

[0125] In the embodiment of the present application, after performing a fault manufacturing operation on the device under test, the method further includes:

[0126] Acquiring a third fault code from the controller under test;

[0127] Determine whether the third fault code contains the first fault code. If so, determine whether the current state of the target fault in the controller under test is the current fault. If so, determine that the target fault is successfully manufactured in the controller under test.

[0128] After executing the fault manufacturing operation on the device under test, the third fault code is obtained from the controller under test. At this time, if the third fault code does not contain the first fault code, it can be directly determined that the target fault is not successfully manufactured in the controller under test; if the third fault code contains the first fault code, it is further determined whether the current state of the target fault in the controller under test is the current fault. If the current state of the target fault in the controller under test is the current fault, it is determined that the target fault is successfully manufactured in the controller under test; otherwise, if the current state of the target fault in the controller under test is a historical fault, it is determined that the target fault is not successfully manufactured in the controller under test.

[0129] In the embodiment of the present application, when the target fault is a high voltage fault, performing a fault manufacturing operation on the device under test includes:

[0130] sending a high voltage value to the power supply so that after the power supply adjusts its own voltage to the high voltage value, the controller under test feeds back a third fault code based on the high voltage value; or,

[0131] When the target fault is a low voltage fault, performing a fault manufacturing operation on the device under test includes:

[0132] sending a low voltage value to the power supply so that after the power supply adjusts its own voltage to the low voltage value, the controller under test feeds back a third fault code based on the low voltage value; or,

[0133] When the target fault is a signal fault, performing a fault manufacturing operation on the device under test includes:

[0134] Sending a fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a third fault code based on the fault signal value; or,

[0135] When the target fault is a message timeout fault, performing a fault manufacturing operation on the device under test includes:

[0136] Stop sending the first target message to the controller under test so that the controller under test feeds back a third fault code; or,

[0137] When the target fault is a cyclic redundancy check fault, performing a fault manufacturing operation on the device under test includes:

[0138] Stop sending the second target message and the target cyclic redundancy check code corresponding to the second target message to the controller under test, or send the second target message and a cyclic redundancy check code that does not correspond to the second target message to the controller under test, so that the controller under test feeds back a third fault code.

[0139] For different types of faults, different fault creation operations are performed on the device under test so as to create a target fault in the device under test.

[0140] For high-voltage faults, a high-voltage value can be sent to the power supply. After receiving the high-voltage value, the power supply will adjust its own voltage to the high-voltage value. After the controller under test detects that the power supply voltage is a high-voltage value, it will determine that the power supply has a high-voltage fault. At this time, the fault code fed back by the controller under test (i.e., the third fault code) will include the fault code corresponding to the high-voltage fault (i.e., the first fault code).

[0141] For low voltage faults, a low voltage value can be sent to the power supply. After receiving the low voltage value, the power supply will adjust its own voltage to the low voltage value. After the controller under test detects that the power supply voltage is a low voltage value, it will determine that the power supply has a low voltage fault. At this time, the fault code fed back by the controller under test (i.e., the third fault code) will include the fault code corresponding to the low voltage fault (i.e., the first fault code).

[0142] For signal-type faults, a fault signal value can be sent to the controller under test in the form of a message. When the controller under test receives the fault signal value, it will determine that a signal-type fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the third fault code) will include the fault code corresponding to the signal-type fault (i.e., the first fault code).

[0143] For message timeout type faults, you can stop sending the first target message to the controller under test. When the controller under test fails to receive the first target message according to the preset period, it will be determined that a message timeout type fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the third fault code) will include the fault code corresponding to the message timeout type fault (i.e., the first fault code).

[0144] For cyclic redundancy check type faults, the sending of the second target message and the target cyclic redundancy check code corresponding to the second target message to the controller under test can be stopped, or the second target message and a cyclic redundancy check code that does not correspond to the second target message can be sent to the controller under test. When the controller under test does not receive the second target message and the target cyclic redundancy check code, or receives the second target message but the received cyclic redundancy check code is not the target cyclic redundancy check code corresponding to the second target message, it will be determined that a cyclic redundancy check type fault has occurred. At this time, the fault code fed back by the controller under test (i.e., the third fault code) will include the fault code corresponding to the cyclic redundancy check type fault (i.e., the first fault code).

[0145] In the embodiment of the present application, after performing the second recovery operation on the device under test, the method further includes:

[0146] Acquiring a fourth fault code from the controller under test;

[0147] Determine whether the fourth fault code includes the first fault code. If so, determine whether the current state of the target fault in the controller under test is a historical fault. If so, determine that the target fault becomes a historical fault.

[0148] After executing the second recovery operation on the device under test, a fourth fault code is obtained from the controller under test. At this time, if the fourth fault code contains the first fault code and the current state of the target fault in the controller under test is a historical fault, it is determined that the target fault has become a historical fault. If the fourth fault code contains the first fault code but the current state of the target fault in the controller under test is a current fault, it is determined that the target fault has not become a historical fault.

[0149] In the embodiment of the present application, when the target fault is a high voltage fault, performing a second recovery operation on the device under test includes:

[0150] sending a high voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the high voltage recovery value, the controller under test feeds back a fourth fault code based on the high voltage recovery value; or,

[0151] When the target fault is a low voltage fault, performing a second recovery operation on the device under test includes:

[0152] sending a low voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the low voltage recovery value, the controller under test feeds back a fourth fault code based on the low voltage recovery value; or,

[0153] When the target fault is a signal fault, performing a second recovery operation on the device under test includes:

[0154] Sending the non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a fourth fault code based on the non-fault signal value; or,

[0155] When the target fault is a message timeout fault, performing a second recovery operation on the device under test includes:

[0156] sending the first target message to the controller under test according to a preset period, so that the controller under test feeds back a fourth fault code based on the first target message; or,

[0157] When the target fault is a cyclic redundancy check fault, performing a second recovery operation on the device under test includes:

[0158] The second target message and the target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a fourth fault code based on the second target message and the target cyclic redundancy check code.

[0159] For different types of faults, different second recovery operations are performed on the device under test so as to convert the target fault in the device under test into a historical fault.

[0160] For high-voltage faults, a high-voltage recovery value can be sent to the power supply. After receiving the high-voltage recovery value, the power supply will adjust its own voltage to the high-voltage recovery value. After the controller under test detects that the power supply voltage is the high-voltage recovery value, it will determine that the high-voltage fault in the power supply is restored. At this time, although the fault code fed back by the controller under test (i.e., the fourth fault code) includes the fault code corresponding to the high-voltage fault (i.e., the first fault code), the current state of the high-voltage fault in the controller under test is a historical fault.

[0161] For low voltage faults, a low voltage recovery value can be sent to the power supply. After receiving the low voltage recovery value, the power supply will adjust its own voltage to the low voltage recovery value. After the controller under test detects that the power supply voltage is the low voltage recovery value, it will determine that the low voltage fault in the power supply is restored. At this time, although the fault code fed back by the controller under test (i.e., the fourth fault code) includes the fault code corresponding to the low voltage fault (i.e., the first fault code), the current state of the low voltage fault in the controller under test is a historical fault.

[0162] For signal-type faults, non-fault signal values ​​can be sent to the controller under test in the form of a message. When the controller under test receives the non-fault signal value, it will determine that the signal-type fault is restored. At this time, although the fault code fed back by the controller under test (i.e., the fourth fault code) contains the fault code corresponding to the signal-type fault (i.e., the first fault code), the current status of the signal-type fault in the controller under test is a historical fault.

[0163] For message timeout type faults, a first target message can be sent to the controller under test according to a preset period. When the controller under test receives the first target message according to the preset period, it will be determined that the message timeout type fault is restored. At this time, although the fault code fed back by the controller under test (i.e., the fourth fault code) includes the fault code corresponding to the message timeout type fault (i.e., the first fault code), the current status of the message timeout type fault in the controller under test is a historical fault.

[0164] For cyclic redundancy check type faults, a second target message and a target cyclic redundancy check code corresponding to the second target message can be sent to the controller under test. When the controller under test receives the second target message and the target cyclic redundancy check code, it will determine that the cyclic redundancy check type fault has been recovered. At this time, although the fault code fed back by the controller under test (i.e., the fourth fault code) includes the fault code corresponding to the cyclic redundancy check type fault (i.e., the first fault code), the current status of the cyclic redundancy check type fault in the controller under test is a historical fault.

[0165] In the embodiment of the present application, after the target fault becomes a historical fault, the method further includes:

[0166] After executing the historical fault clearing operation on the device under test, a fifth fault code is obtained from the controller under test, and it is determined whether the fifth fault code contains the first fault code. If not, it is determined that the historical fault in the controller under test is cleared.

[0167] In an embodiment of the present application, a historical fault clearing operation is performed on the device under test to clear the historical fault from the device under test, and it is determined whether the historical fault in the controller under test is cleared by judging whether the fifth fault code obtained from the feedback of the controller under test contains the first fault code. If the fifth fault code contains the first fault code, it is determined that the historical fault in the controller under test has not been cleared; if the fifth fault code does not contain the first fault code, it is determined that the target fault in the controller under test is cleared.

[0168] In the embodiment of the present application, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of a historical fault clearing operation on the device under test includes at least one of the following:

[0169] Turn off the power supply and then turn it on again;

[0170] or, sending a reset instruction to the controller under test;

[0171] Or, after powering off the power supply, obtaining the return value of the power supply serial port, and when the return value is 0, powering on the power supply;

[0172] Or, send a clear instruction to the controller under test.

[0173] The following description is made by taking the device under test including two power supplies as an example.

[0174] In some specific embodiments, one of the power supplies can be powered off first (obtained by obtaining the value returned by the serial port), and then the other power supply is powered off successfully. After the other power supply is powered off successfully, both power supplies are turned on at the same time. At this time, the controller under test will feedback the fifth fault code to determine whether the fifth fault code contains the first fault code. If it does, it proves that the historical faults in the controller under test have not been cleared successfully. If not, it proves that the historical faults in the controller under test have been cleared successfully.

[0175] In other specific embodiments, a reset instruction (such as a 1101 reset instruction, etc.) can be sent to the controller under test to make it feedback the fifth fault code, and determine whether the fifth fault code contains the first fault code. If it does, it proves that the historical faults in the controller under test have not been cleared successfully. If it does not, it proves that the historical faults in the controller under test have been cleared successfully.

[0176] In other specific embodiments, one of the power supplies can be powered off, and the current value returned in the power supply serial port can be obtained to determine whether the current value is 0. If it is 0, the controller is in sleep mode. At this time, the power supply is powered on, and the controller under test will feedback the fifth fault code. It is determined whether the fifth fault code contains the first fault code. If it does, it proves that the historical faults in the controller under test have not been cleared successfully. If not, it proves that the historical faults in the controller under test have been cleared successfully.

[0177] In other specific embodiments, the controller under test can also be made to feedback the fifth fault code by sending a clear instruction (such as 14 clear instruction, etc.) to the controller under test to determine whether the fifth fault code contains the first fault code. If it does, it proves that the historical fault in the controller under test has not been cleared successfully. If it does not, it proves that the historical fault in the controller under test has been cleared successfully.

[0178] Embodiment 2

[0179] Corresponding to the above-mentioned embodiment 1, the present application further provides a test device for the controller fault diagnosis function, wherein in this embodiment, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 As shown, the device comprises:

[0180] A receiving module 10, used to determine a first fault code corresponding to a target fault;

[0181] A first recovery module 20, configured to obtain a second fault code from a controller under test of the device under test after performing a first recovery operation on the device under test;

[0182] A judgment module 30, configured to judge whether the controller under test has the target fault in an initial state based on the first fault code and the second fault code;

[0183] A manufacturing module 40, configured to perform a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test when the target fault does not exist in the controller under test in an initial state;

[0184] The second recovery module 50 is used to perform a second recovery operation on the device under test after successfully manufacturing the target fault in the controller under test, so as to make the target fault become a historical fault.

[0185] In some specific embodiments, when the target fault is a high voltage fault or a low voltage fault, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the first recovery module 20 is specifically used for:

[0186] Performing a power-on operation on the power supply or sending a normal voltage value to the power supply so that after the power supply adjusts its own voltage to the normal voltage value, the controller under test feeds back a second fault code based on the normal voltage value; or,

[0187] When the target fault is a signal fault, the first recovery module 20 is specifically used to:

[0188] Sending a non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a second fault code based on the non-fault signal value; or,

[0189] When the target fault is a message timeout fault, the first recovery module 20 is specifically configured to:

[0190] Sending a first target message to the controller under test at a preset period, so that the controller under test feeds back a second fault code based on the first target message; or,

[0191] When the target fault is a cyclic redundancy check fault, the first recovery module 20 is specifically used to:

[0192] A second target message and a target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a second fault code based on the second target message and the target cyclic redundancy check code.

[0193] In some specific embodiments, the determination module 30 is specifically used for:

[0194] Determining whether the second fault code includes the first fault code, and if not, determining that the controller under test does not have the target fault in the initial state;

[0195] If the second fault code includes the first fault code, it is determined whether the current state of the target fault in the controller under test is a historical fault. If so, it is determined that the target fault does not exist in the controller under test in the initial state.

[0196] In some specific embodiments, the manufacturing module 40 is further used for:

[0197] Acquiring a third fault code from the controller under test;

[0198] Determine whether the third fault code contains the first fault code. If so, determine whether the current state of the target fault in the controller under test is the current fault. If so, determine that the target fault is successfully manufactured in the controller under test.

[0199] In some specific embodiments, when the target fault is a high voltage fault, the manufacturing module 40 is specifically used to:

[0200] sending a high voltage value to the power supply so that after the power supply adjusts its own voltage to the high voltage value, the controller under test feeds back a third fault code based on the high voltage value; or,

[0201] When the target fault is a low voltage fault, the manufacturing module 40 is specifically used for:

[0202] sending a low voltage value to the power supply so that after the power supply adjusts its own voltage to the low voltage value, the controller under test feeds back a third fault code based on the low voltage value; or,

[0203] When the target fault is a signal fault, the manufacturing module 40 is specifically used to:

[0204] Sending a fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a third fault code based on the fault signal value; or,

[0205] When the target fault is a message timeout fault, the manufacturing module 40 is specifically used to:

[0206] Stop sending the first target message to the controller under test so that the controller under test feeds back a third fault code; or,

[0207] When the target fault is a cyclic redundancy check fault, the manufacturing module 40 is specifically used to:

[0208] Stop sending the second target message and the target cyclic redundancy check code corresponding to the second target message to the controller under test, or send the second target message and a cyclic redundancy check code that does not correspond to the second target message to the controller under test, so that the controller under test feeds back a third fault code.

[0209] In some specific embodiments, the second recovery module 50 is further used for:

[0210] Acquiring a fourth fault code from the controller under test;

[0211] Determine whether the fourth fault code includes the first fault code. If so, determine whether the current state of the target fault in the controller under test is a historical fault. If so, determine that the target fault becomes a historical fault.

[0212] In some specific embodiments, when the target fault is a high voltage fault, the second recovery module 50 is specifically used to:

[0213] sending a high voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the high voltage recovery value, the controller under test feeds back a fourth fault code based on the high voltage recovery value; or,

[0214] When the target fault is a low voltage fault, the second recovery module 50 is specifically used for:

[0215] sending a low voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the low voltage recovery value, the controller under test feeds back a fourth fault code based on the low voltage recovery value; or,

[0216] When the target fault is a signal fault, the second recovery module 50 is specifically used for:

[0217] Sending the non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a fourth fault code based on the non-fault signal value; or,

[0218] When the target fault is a message timeout fault, the second recovery module 50 is specifically configured to:

[0219] sending the first target message to the controller under test according to a preset period, so that the controller under test feeds back a fourth fault code based on the first target message; or,

[0220] When the target fault is a cyclic redundancy check fault, the second recovery module 50 is specifically used to:

[0221] The second target message and the target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a fourth fault code based on the second target message and the target cyclic redundancy check code.

[0222] In some specific embodiments, the device further includes a clearing module 60, and the clearing module 60 is used to:

[0223] After executing the historical fault clearing operation on the device under test, a fifth fault code is obtained from the controller under test, and it is determined whether the fifth fault code contains the first fault code. If not, it is determined that the historical fault in the controller under test is cleared.

[0224] In some specific embodiments, the clearing module 60 is specifically used to:

[0225] Turn off the power supply and then turn it on again;

[0226] or, sending a reset instruction to the controller under test;

[0227] Or, after powering off the power supply, obtaining the return value of the power supply serial port, and when the return value is 0, powering on the power supply;

[0228] Or, send a clear instruction to the controller under test.

[0229] Embodiment 3

[0230] Corresponding to the above-mentioned embodiments one and two, the present application also provides a computer system, including: a processor and a memory, the memory storing a computer program that can be run on the processor, and when the computer program is executed by the processor, the test method of the controller diagnostic fault function provided in any of the above-mentioned embodiments is executed.

[0231] in, Figure 4 The computer system 1500 is shown as an example, and may include a processor 1510, a video display adapter 1511, a disk drive 1512, an input / output interface 1513, a network interface 1514, and a memory 1520. The processor 1510, the video display adapter 1511, the disk drive 1512, the input / output interface 1513, the network interface 1514, and the memory 1520 may be communicatively connected via a communication bus 1530.

[0232] Among them, the processor 1510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solution provided by the present invention.

[0233] The memory 1520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1520 can store an operating system 1521 for controlling the operation of the electronic device and a basic input and output system (BIOS) for controlling the low-level operation of the electronic device. In addition, a web browser 1523, a data storage management system 1524, and a device identification information processing system 1525, etc. can also be stored. The above-mentioned device identification information processing system 1525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present invention. In short, when the technical solution provided by the present invention is implemented by software or firmware, the relevant program code is stored in the memory 1520 and is called and executed by the processor 1510.

[0234] The input / output interface 1513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0235] The network interface 1514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0236] The bus includes a path that transmits information between the various components of the device (eg, processor 1510, video display adapter 1511, disk drive 1512, input / output interface 1513, network interface 1514, and memory 1520).

[0237] In addition, the electronic device can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0238] Although the above device only shows a processor 1510, a video display adapter 1511, a disk drive 1512, an input / output interface 1513, a network interface 1514, a memory 1520, a bus, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present invention, and does not necessarily include all the components shown in the figure.

[0239] Embodiment 4

[0240] Corresponding to the above-mentioned embodiments one to three, the embodiments of the present application further provide a computer-readable storage medium, wherein, in this embodiment, the same or similar contents as those of the above-mentioned embodiments one to three can be referred to the above introduction and will not be repeated later.

[0241] The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by the processor, the test method for the controller fault diagnosis function as described above is implemented.

[0242] In some implementations, in the embodiments of the present application, when the computer program is executed by the processor, the steps corresponding to the method described in Embodiment 1 may also be implemented. Please refer to the detailed description in Embodiment 1 and no further details will be given here.

[0243] It can be seen from the above description of the implementation mode that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially 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 storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer system (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or some parts of the embodiments.

[0244] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0245] The technical solution provided by the present invention is described in detail above. The principle and implementation method of the present invention are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for testing a controller fault diagnosis function, characterized in that: The method comprises: Determine a first fault code corresponding to a target fault; After performing a first recovery operation on the device under test, obtaining a second fault code from a controller under test of the device under test; Determining whether the controller under test has the target fault in an initial state based on the first fault code and the second fault code; When the target fault does not exist in the controller under test in an initial state, performing a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test; After the target fault is successfully manufactured in the controller under test, a second recovery operation is performed on the device under test to make the target fault become a historical fault.

2. The test method for the controller fault diagnosis function according to claim 1, characterized in that: When the target fault is a high voltage fault or a low voltage fault, the device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of a first recovery operation on the device under test includes: Performing a power-on operation on the power supply or sending a normal voltage value to the power supply so that after the power supply adjusts its own voltage to the normal voltage value, the controller under test feeds back a second fault code based on the normal voltage value; or, When the target fault is a signal fault, performing a first recovery operation on the device under test includes: Sending a non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a second fault code based on the non-fault signal value; or, When the target fault is a message timeout fault, the performing a first recovery operation on the device under test includes: Sending a first target message to the controller under test at a preset period, so that the controller under test feeds back a second fault code based on the first target message; or, When the target fault is a cyclic redundancy check fault, performing a first recovery operation on the device under test includes: A second target message and a target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a second fault code based on the second target message and the target cyclic redundancy check code.

3. The test method of the controller fault diagnosis function according to claim 1, characterized in that: The determining whether the controller under test has the target fault in the initial state based on the first fault code and the second fault code includes: Determining whether the second fault code includes the first fault code, and if not, determining that the controller under test does not have the target fault in the initial state; If the second fault code includes the first fault code, it is determined whether the current state of the target fault in the controller under test is a historical fault. If so, it is determined that the target fault does not exist in the controller under test in the initial state.

4. The method for testing the controller fault diagnosis function according to claim 2, characterized in that: After performing a fault manufacturing operation on the device under test, the method further comprises: Acquiring a third fault code from the controller under test; Determine whether the third fault code contains the first fault code. If so, determine whether the current state of the target fault in the controller under test is the current fault. If so, determine that the target fault is successfully manufactured in the controller under test.

5. The method for testing the controller fault diagnosis function according to claim 4, characterized in that: When the target fault is a high voltage fault, performing a fault manufacturing operation on the device under test includes: sending a high voltage value to the power supply so that after the power supply adjusts its own voltage to the high voltage value, the controller under test feeds back a third fault code based on the high voltage value; or, When the target fault is a low voltage fault, performing a fault manufacturing operation on the device under test includes: sending a low voltage value to the power supply so that after the power supply adjusts its own voltage to the low voltage value, the controller under test feeds back a third fault code based on the low voltage value; or, When the target fault is a signal fault, performing a fault manufacturing operation on the device under test includes: Sending a fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a third fault code based on the fault signal value; or, When the target fault is a message timeout fault, performing a fault manufacturing operation on the device under test includes: Stop sending the first target message to the controller under test so that the controller under test feeds back a third fault code; or, When the target fault is a cyclic redundancy check fault, performing a fault manufacturing operation on the device under test includes: Stop sending the second target message and the target cyclic redundancy check code corresponding to the second target message to the controller under test, or send the second target message and a cyclic redundancy check code that does not correspond to the second target message to the controller under test, so that the controller under test feeds back a third fault code.

6. The method for testing the controller fault diagnosis function according to claim 2, characterized in that: After performing a second recovery operation on the device under test, the method further includes: Acquiring a fourth fault code from the controller under test; Determine whether the fourth fault code includes the first fault code. If so, determine whether the current state of the target fault in the controller under test is a historical fault. If so, determine that the target fault becomes a historical fault.

7. The method for testing the controller fault diagnosis function according to claim 6, characterized in that: When the target fault is a high voltage fault, performing a second recovery operation on the device under test includes: sending a high voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the high voltage recovery value, the controller under test feeds back a fourth fault code based on the high voltage recovery value; or, When the target fault is a low voltage fault, performing a second recovery operation on the device under test includes: sending a low voltage recovery value to the power supply so that after the power supply adjusts its own voltage to the low voltage recovery value, the controller under test feeds back a fourth fault code based on the low voltage recovery value; or, When the target fault is a signal fault, performing a second recovery operation on the device under test includes: Sending the non-fault signal value to the controller under test in the form of a message, so that the controller under test feeds back a fourth fault code based on the non-fault signal value; or, When the target fault is a message timeout fault, performing a second recovery operation on the device under test includes: sending the first target message to the controller under test according to a preset period, so that the controller under test feeds back a fourth fault code based on the first target message; or, When the target fault is a cyclic redundancy check fault, performing a second recovery operation on the device under test includes: The second target message and the target cyclic redundancy check code corresponding to the second target message are sent to the controller under test, so that the controller under test feeds back a fourth fault code based on the second target message and the target cyclic redundancy check code.

8. The method for testing the controller fault diagnosis function according to any one of claims 1 to 7, characterized in that: After the target fault becomes a historical fault, the method further includes: After executing the historical fault clearing operation on the device under test, a fifth fault code is obtained from the controller under test, and it is determined whether the fifth fault code contains the first fault code. If not, it is determined that the historical fault in the controller under test is cleared.

9. The method for testing the controller fault diagnosis function according to claim 8, characterized in that: The device under test further includes a power supply, the power supply is communicatively connected to the controller under test, and the performing of a historical fault clearing operation on the device under test includes at least one of the following: Turn off the power supply and then turn it on again; or, sending a reset instruction to the controller under test; Or, after powering off the power supply, obtaining the return value of the power supply serial port, and when the return value is 0, powering on the power supply; Or, send a clear instruction to the controller under test.

10. A test device for a controller fault diagnosis function, characterized in that: The device comprises: A receiving module, used for determining a first fault code corresponding to a target fault; A first recovery module, configured to obtain a second fault code from a controller under test of the device under test after performing a first recovery operation on the device under test; A judgment module, configured to judge whether the controller under test has the target fault in an initial state based on the first fault code and the second fault code; a manufacturing module, configured to perform a fault manufacturing operation on the device under test to manufacture the target fault in the controller under test when the target fault does not exist in the controller under test in an initial state; The second recovery module is used to perform a second recovery operation on the device under test after successfully manufacturing the target fault in the controller under test, so as to make the target fault become a historical fault.