Test method and device for diagnosis initialization time, electronic equipment and storage medium

By obtaining and updating the network interruption time and stopping time of the ECU and calculating its diagnostic initialization time, the problems of low testing efficiency and poor reliability in the prior art are solved, and more efficient and reliable testing is achieved.

CN120010448APending Publication Date: 2025-05-16SINO TRUK JINAN POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510155332.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The prior art is used to test the diagnostic initialization time of automotive electronic control units (ECUs) with low efficiency, poor reliability and high complexity.

Method used

By obtaining the ECU, the shortest network interrupt timeout time of the communication timeout fault code DTC can be recorded, and the simulation message is stopped after the DTC is cleared, and the simulation message is continued to be sent in response to the test scenario processing operation, and the stop time is updated and determined to calculate the diagnostic initialization time.

Benefits of technology

Improves the testing efficiency and reliability of diagnostic initialization time and reduces the testing complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010448A_ABST
    Figure CN120010448A_ABST
Patent Text Reader

Abstract

The invention provides a test method and device for diagnosis initialization time, electronic equipment and a storage medium. The method comprises the steps that after communication timeout DTC of a tested electronic control unit is cleared, sending of a simulation message to the tested electronic control unit is stopped; turning off and then turning on a power supply of the tested electronic control unit or interfering a target bit of the simulation message according to a preset interference duration; a simulation message is sent to the tested electronic control unit after the first stop duration; if the tested electronic control unit does not record the communication timeout DTC, updating the first stop duration, and continuing to stop sending the simulation message to the tested electronic control unit after the communication timeout DTC is cleared; if the tested electronic control unit records the communication timeout DTC, determining the first stop duration as the shortest non-received message duration; and determining the diagnosis initialization time according to the shortest time length of the unreceived message. According to the invention, the test efficiency and reliability of the diagnosis initialization time can be improved, and the test complexity is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile testing, and in particular to a testing method, device, electronic equipment and storage medium for diagnosing initialization time. Background Art

[0002] As one of the core components of the car, the electronic control unit (ECU) is responsible for executing various control tasks of the vehicle and exchanging data with other ECUs through the vehicle network. The diagnostic initialization time refers to the time interval from the power-on of the ECU or the recovery of the BusOFF (bus off) fault to the time when the ECU starts the network diagnostic function.

[0003] In the prior art, the test environment is manually configured, the power state and network communication conditions of the ECU are manually adjusted, and then the diagnostic initialization time is tested by observing the behavior of the ECU. However, the test efficiency of the prior art is low, the reliability is poor, and the complexity is high. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a test method, device, electronic device and storage medium for diagnostic initialization time, which can improve the test efficiency and reliability of diagnostic initialization time and reduce the test complexity.

[0005] In a first aspect, an embodiment of the present application provides a method for testing diagnostic initialization time, the method comprising:

[0006] Get the shortest network interruption duration for the tested ECU to record the communication timeout fault code DTC;

[0007] For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test;

[0008] In response to the test scenario processing operation, continuing to send the simulation message to the electronic control unit under test after a first stop time; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with the target bit of the simulation message according to a preset interference time;

[0009] If the electronic control unit under test does not record the communication timeout DTC, then updating the first stop duration, and jumping to the step of stopping sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution;

[0010] If the electronic control unit under test records a communication timeout DTC, the first stop duration is determined as the shortest duration of not receiving a message during which the electronic control unit under test can record a communication timeout DTC under the simulation message;

[0011] The difference between the minimum value of the shortest message-unreceived time and the shortest network interruption time is determined as the diagnosis initialization time of the electronic control unit under test.

[0012] In a possible implementation manner, obtaining the shortest network interruption duration for which the tested electronic control unit can record a communication timeout fault code DTC includes:

[0013] After clearing the communication timeout DTC recorded by the electronic control unit under test, turning off the power supply of the electronic control unit under test, and stopping sending the simulation message to the electronic control unit under test;

[0014] Turning on the power of the electronic control unit under test, and immediately sending the simulation message to the electronic control unit under test;

[0015] If the electronic control unit under test sends application messages normally and does not record the communication timeout DTC, the shortest network interruption duration for which the electronic control unit under test can record the communication timeout fault code DTC is obtained.

[0016] In a possible implementation manner, obtaining the shortest network interruption duration for which the tested electronic control unit can record a communication timeout fault code DTC includes:

[0017] For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test;

[0018] After the second stop time, continue to send the simulation message to the electronic control unit under test;

[0019] If the electronic control unit under test does not record the communication timeout DTC, then updating the second stop duration, and jumping to the step of stopping sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution;

[0020] If the electronic control unit under test records a communication timeout DTC, the second stop duration is determined as a network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message;

[0021] The minimum value of the network interruption duration is determined as the shortest network interruption duration.

[0022] In a possible implementation manner, the updating the second stop duration includes:

[0023] Calculate the product of the preset multiple of the simulation message, the corresponding value of the sending period and the preset percentage to obtain the target time step;

[0024] The target time step is added to the second stop duration to obtain the latest second stop duration.

[0025] In a possible implementation manner, the updating the first stop duration includes:

[0026] The sum of the first stop duration and the preset time step is determined as the latest first stop duration.

[0027] In a possible implementation manner, the initial value of the first stop duration is calculated by the following steps:

[0028] Calculating the sum of a preset minimum diagnostic initialization time and the shortest network interruption duration;

[0029] The product of the sum and the preset coefficient is determined as the initial value of the first stop time.

[0030] In a possible implementation, the method further includes:

[0031] If the diagnostic initialization time is within the standard diagnostic initialization time range, the diagnostic initialization time of the electronic control unit under test meets the requirement.

[0032] In a second aspect, an embodiment of the present application further provides a test device for diagnosing initialization time, the device comprising:

[0033] An acquisition module is used to obtain the shortest network interruption duration for the tested electronic control unit to record a communication timeout fault code DTC;

[0034] A stop module, for any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stops sending the simulation message to the electronic control unit under test;

[0035] A sending module, configured to continue sending the simulation message to the electronic control unit under test after a first stop time in response to a test scenario processing operation; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with a target position of the simulation message according to a preset interference time;

[0036] An update jump module, configured to update the first stop duration if the electronic control unit under test does not record the communication timeout DTC, and jump to the step of stopping sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution;

[0037] A determination module, configured to determine the first stop duration as the shortest duration of non-receiving message for which the electronic control unit under test can record the communication timeout DTC under the simulation message if the electronic control unit under test records a communication timeout DTC;

[0038] The determination module is further used to determine the difference between the minimum value of the shortest unreceived message duration and the shortest network interruption duration as the diagnosis initialization time of the electronic control unit under test.

[0039] In one possible implementation, the acquisition module is specifically used to turn off the power of the electronic control unit under test and stop sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test; turn on the power of the electronic control unit under test and immediately send the simulation message to the electronic control unit under test; if the electronic control unit under test sends the application message normally and does not record the communication timeout DTC, then obtain the shortest network interruption duration for the electronic control unit under test to record the communication timeout fault code DTC.

[0040] In a possible implementation, the acquisition module is specifically used to, for any simulation message, stop sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test; continue sending the simulation message to the electronic control unit under test after a second stop duration; if the electronic control unit under test does not record the communication timeout DTC, update the second stop duration, and jump to the step of stopping sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test to continue execution; if the electronic control unit under test records a communication timeout DTC, determine the second stop duration as the network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message; and determine the minimum value of the network interruption duration as the shortest network interruption duration.

[0041] In a possible implementation, the acquisition module is specifically used to calculate the product of a preset multiple of the simulation message, a value corresponding to the sending period, and a preset percentage to obtain a target time step; the target time step is added to the second stop duration to obtain the latest second stop duration.

[0042] In a possible implementation manner, the update jump module is specifically configured to determine the sum of the first stop duration and a preset time step as the latest first stop duration.

[0043] In a possible implementation, the update jump module is further used to:

[0044] Calculating the sum of a preset minimum diagnostic initialization time and the shortest network interruption duration;

[0045] The product of the sum and the preset coefficient is determined as the initial value of the first stop time.

[0046] In a possible implementation manner, the determination module is further configured to determine that the diagnostic initialization time of the electronic control unit under test meets the requirement if the diagnostic initialization time is within a standard diagnostic initialization time range.

[0047] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the diagnostic initialization time test method as described in any one of the first aspects.

[0048] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the diagnostic initialization time testing method as described in any one of the first aspects are executed.

[0049] The embodiment of the present application provides a test method, device, electronic device and storage medium for diagnostic initialization time, the method comprising: obtaining the shortest network interruption duration for which the electronic control unit under test can record a communication timeout fault code DTC; after clearing the communication timeout DTC recorded by the electronic control unit under test, stopping sending simulation messages to the electronic control unit under test; in response to a test scenario processing operation, continuing to send simulation messages to the electronic control unit under test after a first stop duration; the test scenario processing operation comprises turning off and then turning on the power supply of the electronic control unit under test, and also comprises interfering with the simulation message according to a preset interference duration. Target position; if the electronic control unit under test does not record the communication timeout DTC, then update the first stop duration, and jump to after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending simulation messages to the electronic control unit under test to continue execution; if the electronic control unit under test records the communication timeout DTC, then the first stop duration is determined as the shortest unreceived message duration that the electronic control unit under test can record the communication timeout DTC under the simulation message; the difference between the minimum value of the shortest unreceived message duration and the shortest network interruption duration is determined as the diagnostic initialization time of the electronic control unit under test. Through this application, the test efficiency and reliability of the diagnostic initialization time can be improved, and the test complexity can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flow chart of a method for testing diagnostic initialization time provided by an embodiment of the present application is shown;

[0052] Figure 2 A schematic diagram of a process for obtaining the shortest network interruption duration provided in an embodiment of the present application is shown;

[0053] Figure 3 A schematic diagram of the structure of a test device for diagnosing initialization time provided in an embodiment of the present application is shown;

[0054] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0056] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0057] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario, "automobile testing field". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the "automobile testing field", it should be understood that this is only an exemplary embodiment.

[0058] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0059] The following is a detailed description of a test method for diagnostic initialization time provided in an embodiment of the present application.

[0060] Reference Figure 1 As shown, it is a flow chart of a test method for diagnosing initialization time provided in an embodiment of the present application. The exemplary steps of the embodiment of the present application are described below:

[0061] S101, obtaining the shortest network interruption duration for which the tested electronic control unit can record a communication timeout fault code DTC.

[0062] In the implementation manner of the present application, the shortest network interruption duration refers to the shortest network interruption duration during which the electronic control unit under test can record the communication timeout fault code DTC after the network is interrupted and restored. The communication timeout fault code DTC (Diagnostic Trouble Code) is a standardized code used to diagnose and report automobile communication system faults.

[0063] Optionally, obtaining the shortest network interruption duration for which the tested electronic control unit can record a communication timeout fault code DTC includes:

[0064] Step 1: After clearing the communication timeout DTC recorded by the electronic control unit under test, turn off the power of the electronic control unit under test, and stop sending the simulation message to the electronic control unit under test.

[0065] In an implementation manner of the present application, the electronic control unit under test is powered on according to a preset power supply voltage Vnormal, and the simulation electronic control unit is controlled to send a simulation message to the electronic control unit under test; after a preset communication duration (i.e., waiting for the bus communication of the electronic control unit under test to be stable), it is determined whether the electronic control unit under test sends the application message normally; if the electronic control unit under test sends the application message normally, it means that the electronic control unit under test has no fault, and the communication timeout DTC recorded by the electronic control unit under test is cleared; after receiving the clearing completion signal sent by the electronic control unit under test, the fault code DTC recorded by the electronic control unit under test is read; if there is no communication timeout fault code DTC in the latest read fault code DTC, it means that the communication timeout DTC recorded by the electronic control unit under test has been cleared, and the power supply of the electronic control unit under test is turned off by switching the KL15 corresponding to the electronic control unit under test to the OFF state; and the simulation electronic control unit is controlled to stop sending simulation messages to the electronic control unit under test.

[0066] The preset power supply voltage Vnormal corresponds to a value within the preset voltage range of the ECU under test that can operate normally. The simulated ECU is an ECU simulated by CANoe for auxiliary testing, which can send predefined simulation messages to the CAN bus. CANoe is a professional tool for bus development, simulation, testing and analysis. The KL15 corresponding to the ECU under test is the power supply for the ECU under test.

[0067] Step 2: Turn on the power of the electronic control unit under test, and immediately send a simulation message to the electronic control unit under test.

[0068] In the implementation manner of the present application, the power supply of the electronic control unit under test is turned on by switching the KL15 corresponding to the electronic control unit under test to the ON state, and the simulation electronic control unit is controlled to immediately send a simulation message to the electronic control unit under test.

[0069] Step 3: If the ECU under test sends application messages normally and does not record the communication timeout DTC, then obtain the shortest network interruption duration for which the ECU under test can record the communication timeout fault code DTC.

[0070] In an implementation manner of the present application, if the electronic control unit under test sends the application message normally, the fault code DTC recorded by the electronic control unit under test is read; if the communication timeout DTC is not recorded in the most recently read fault code DTC, the shortest network interruption duration for which the electronic control unit under test can record the communication timeout fault code DTC is obtained.

[0071] Further, refer to Figure 2As shown, it is a schematic diagram of the process of obtaining the shortest network interruption duration provided by an embodiment of the present application, and obtaining the shortest network interruption duration for the electronic control unit under test to record the communication timeout fault code DTC specifically includes:

[0072] S201 . For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test.

[0073] In an implementation manner of the present application, the communication timeout DTC recorded by the electronic control unit under test is cleared; after receiving the clearing completion signal sent by the electronic control unit under test, the fault code DTC recorded by the electronic control unit under test is read; if there is no communication timeout fault code DTC in the fault code DTC, it means that the communication timeout DTC recorded by the electronic control unit under test has been cleared, and the simulation electronic control unit is controlled to stop sending simulation messages to the electronic control unit under test.

[0074] S202: After the second stop time, continue to send simulation messages to the electronic control unit under test.

[0075] In an embodiment of the present application, after the second stop period, the simulation electronic control unit is controlled to continue sending simulation messages to the electronic control unit under test. In addition, the product of a preset coefficient (such as 0.8), a preset multiple (such as 10) and a corresponding value of the sending period of the simulation message is determined as the initial value of the second stop period.

[0076] S203: if the electronic control unit under test does not record the communication timeout DTC, update the second stop duration, and jump to stop sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution.

[0077] In an implementation manner of the present application, the fault code DTC recorded by the electronic control unit under test is read; if there is no communication timeout fault code DTC in the most recently read fault code DTC, the second stop duration is updated, and the process jumps to step S201 "after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending simulation messages to the electronic control unit under test" to continue execution.

[0078] Updating the second stop duration includes: calculating the product of a preset multiple (such as 10) of the simulation message, a value corresponding to the sending cycle, and a preset percentage (such as 5%) to obtain a target time step; adding the target time step to the second stop duration to obtain the latest second stop duration.

[0079] S204: If the electronic control unit under test records a communication timeout DTC, the second stop duration is determined as a network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message.

[0080] S205: Determine the minimum value of the network interruption duration as the shortest network interruption duration.

[0081] In the implementation manner of the present application, the electronic control unit under test has a corresponding network interruption duration under each simulation message; the minimum value of all network interruption durations is determined as the shortest network interruption duration.

[0082] S102 . For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test.

[0083] In an implementation manner of the present application, the communication timeout DTC recorded by the electronic control unit under test is cleared; after receiving the clearing completion signal sent by the electronic control unit under test, the fault code DTC recorded by the electronic control unit under test is read; if there is no communication timeout fault code DTC in the fault code DTC, it means that the communication timeout DTC recorded by the electronic control unit under test has been cleared, and the simulation electronic control unit is controlled to stop sending simulation messages to the electronic control unit under test.

[0084] S103, in response to the test scenario processing operation, continuing to send simulation messages to the electronic control unit under test after the first stop time; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with the target position of the simulation message according to a preset interference time.

[0085] In the embodiment of the present application, the diagnostic initialization time of the electronic control unit under test is tested through two test scenarios; the first test scenario is to turn off and then turn on the power of the electronic control unit under test; the second test scenario is to interfere with the target position of the simulation message according to a preset interference duration. In response to the test scenario processing operation, the simulation electronic control unit is controlled to continue to send the simulation message to the electronic control unit under test after the first stop duration.

[0086] Specifically, turning off and then turning on the power of the electronic control unit under test includes: turning off the power of the electronic control unit under test by switching the KL15 corresponding to the electronic control unit under test to the OFF state; and turning on the power of the electronic control unit under test by switching the KL15 corresponding to the electronic control unit under test to the ON state.

[0087] Specifically, interfering with a target bit of the simulation message according to a preset interference duration includes: interfering with a target bit (such as an RTR bit) of the simulation message through CANstress according to a preset interference duration (such as 1 s).

[0088] In addition, the initial value of the first stop duration is calculated by the following steps: calculating the sum of the preset minimum diagnostic initialization time and the shortest network interruption duration; and multiplying the sum by a preset coefficient (such as 0.8) to determine the initial value of the first stop duration.

[0089] S104: if the electronic control unit under test does not record the communication timeout DTC, then update the first stop duration, and jump to stop sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution.

[0090] In an implementation manner of the present application, the fault code DTC recorded by the electronic control unit under test is read; if there is no communication timeout fault code DTC in the most recently read fault code DTC, the first stop duration is updated, and the process jumps to S102 "After clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending simulation messages to the electronic control unit under test" to continue execution.

[0091] Further, updating the first stop duration includes: determining the sum of the first stop duration and a preset time step (such as 50 ms) as the latest first stop duration.

[0092] S105: If the electronic control unit under test records a communication timeout DTC, determine the first stop duration as the shortest duration of not receiving a message during which the electronic control unit under test can record a communication timeout DTC under a simulation message.

[0093] In an implementation manner of the present application, the fault code DTC recorded by the electronic control unit under test is read; if the most recently read fault code DTC contains a communication timeout fault code DTC, the first stop duration is determined as the shortest unreceived message duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message.

[0094] The shortest duration of unreceived messages refers to the shortest network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the test scenario after the network interruption is restored.

[0095] S106: Determine the difference between the minimum value of the shortest message-unreceiving time and the shortest network interruption time as the diagnostic initialization time of the electronic control unit under test.

[0096] In an implementation manner of the present application, the electronic control unit under test has a corresponding shortest unreceived message duration under each simulation message; the difference between the minimum value of all the shortest unreceived message durations and the shortest network interruption duration is determined as the diagnostic initialization time of the electronic control unit under test.

[0097] Furthermore, the method further comprises: if the diagnostic initialization time is within a standard diagnostic initialization time range, the diagnostic initialization time of the electronic control unit under test meets the requirement.

[0098] The present application provides a method for testing diagnostic initialization time, the method comprising: obtaining the shortest network interruption duration for an electronic control unit under test to record a communication timeout fault code DTC; after clearing the communication timeout DTC recorded by the electronic control unit under test, stopping sending simulation messages to the electronic control unit under test; in response to a test scenario processing operation, continuing to send simulation messages to the electronic control unit under test after a first stop duration; the test scenario processing operation comprises turning off and then turning on the power supply of the electronic control unit under test, and also comprises interfering with the target position of the simulation message according to a preset interference duration; if the electronic control unit under test If the sub-control unit does not record the communication timeout DTC, the first stop duration is updated, and after the communication timeout DTC recorded by the tested electronic control unit is cleared, the simulation message is stopped to continue execution to the tested electronic control unit; if the tested electronic control unit records the communication timeout DTC, the first stop duration is determined as the shortest unreceived message duration that the tested electronic control unit can record the communication timeout DTC under the simulation message; the difference between the minimum value of the shortest unreceived message duration and the shortest network interruption duration is determined as the diagnostic initialization time of the tested electronic control unit. The present application can improve the test efficiency and reliability of the diagnostic initialization time and reduce the test complexity.

[0099] Based on the same inventive concept, an embodiment of the present application also provides a test device for the diagnostic initialization time corresponding to the test method for the diagnostic initialization time. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned test method for the diagnostic initialization time in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0100] Reference Figure 3 FIG. 1 is a schematic diagram of a test device for diagnosing initialization time provided in an embodiment of the present application, wherein the device comprises:

[0101] An acquisition module 301 is used to acquire the shortest network interruption duration for which the electronic control unit under test can record a communication timeout fault code DTC;

[0102] The stopping module 302 is used for stopping sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test for any simulation message;

[0103] The sending module 303 is used to continue sending the simulation message to the electronic control unit under test after a first stop time in response to a test scenario processing operation; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with the target position of the simulation message according to a preset interference time;

[0104] An update jump module 304 is used for updating the first stop duration if the electronic control unit under test does not record the communication timeout DTC, and jumping to the step of stopping sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution;

[0105] The determination module 305 is used to determine the first stop duration as the shortest non-received message duration that the electronic control unit under test can record the communication timeout DTC under the simulation message if the electronic control unit under test records the communication timeout DTC;

[0106] The determination module 305 is further configured to determine the difference between the minimum value of the shortest duration of non-received messages and the shortest duration of network interruption as the diagnosis initialization time of the electronic control unit under test.

[0107] In a possible implementation, the acquisition module 301 is specifically used to turn off the power of the electronic control unit under test and stop sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test; turn on the power of the electronic control unit under test and immediately send the simulation message to the electronic control unit under test; if the electronic control unit under test sends the application message normally and does not record the communication timeout DTC, then obtain the shortest network interruption duration for the electronic control unit under test to record the communication timeout fault code DTC.

[0108] In a possible implementation, the acquisition module 301 is specifically used to, for any simulation message, stop sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test; continue sending the simulation message to the electronic control unit under test after a second stop duration; if the electronic control unit under test does not record the communication timeout DTC, update the second stop duration, and jump to the step of stopping sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test to continue execution; if the electronic control unit under test records a communication timeout DTC, determine the second stop duration as the network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message; and determine the minimum value of the network interruption duration as the shortest network interruption duration.

[0109] In a possible implementation, the acquisition module 301 is specifically used to calculate the product of a preset multiple of the simulation message, a value corresponding to the sending period, and a preset percentage to obtain a target time step; and add the target time step to the second stop duration to obtain the latest second stop duration.

[0110] In a possible implementation manner, the update jump module 304 is specifically configured to determine the sum of the first stop duration and the preset time step as the latest first stop duration.

[0111] In a possible implementation, the update jump module 304 is further configured to:

[0112] Calculating the sum of a preset minimum diagnostic initialization time and the shortest network interruption duration;

[0113] The product of the sum and the preset coefficient is determined as the initial value of the first stop time.

[0114] In a possible implementation manner, the determination module 305 is further configured to determine that the diagnostic initialization time of the electronic control unit under test meets the requirement if the diagnostic initialization time is within a standard diagnostic initialization time range.

[0115] The embodiment of the present application provides a test device for diagnostic initialization time. Through this device, the test efficiency and reliability of the diagnostic initialization time can be improved, and the test complexity can be reduced.

[0116] like Figure 4 As shown, an electronic device 400 provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus, wherein the memory 402 stores machine-readable instructions executable by the processor 401. When the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the test method for diagnostic initialization time as described above.

[0117] Specifically, the memory 402 and the processor 401 can be general-purpose memories and processors, which are not specifically limited here. When the processor 401 runs the computer program stored in the memory 402, the test method for the diagnostic initialization time can be executed.

[0118] Corresponding to the above-mentioned test method for diagnostic initialization time, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned test method for diagnostic initialization time are executed.

[0119] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0120] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0122] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the information processing method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0123] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A test method for diagnosing initialization time, characterized in that: The method comprises: Get the shortest network interruption duration for the tested ECU to record the communication timeout fault code DTC; For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test; In response to the test scenario processing operation, continuing to send the simulation message to the electronic control unit under test after a first stop time; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with the target bit of the simulation message according to a preset interference time; If the electronic control unit under test does not record the communication timeout DTC, then updating the first stop duration, and jumping to the step of stopping sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution; If the electronic control unit under test records a communication timeout DTC, the first stop duration is determined as the shortest duration of not receiving a message during which the electronic control unit under test can record a communication timeout DTC under the simulation message; The difference between the minimum value of the shortest message-unreceived time and the shortest network interruption time is determined as the diagnosis initialization time of the electronic control unit under test.

2. The diagnostic initialization time testing method according to claim 1, characterized in that: The obtaining of the shortest network interruption duration for the tested electronic control unit to record a communication timeout fault code DTC comprises: After clearing the communication timeout DTC recorded by the electronic control unit under test, turning off the power supply of the electronic control unit under test, and stopping sending the simulation message to the electronic control unit under test; Turning on the power of the electronic control unit under test, and immediately sending the simulation message to the electronic control unit under test; If the electronic control unit under test sends application messages normally and does not record the communication timeout DTC, the shortest network interruption duration for which the electronic control unit under test can record the communication timeout fault code DTC is obtained.

3. The diagnostic initialization time testing method according to claim 1 or 2, characterized in that: The obtaining of the shortest network interruption duration for the tested electronic control unit to record a communication timeout fault code DTC comprises: For any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stop sending the simulation message to the electronic control unit under test; After the second stop time, continue to send the simulation message to the electronic control unit under test; If the electronic control unit under test does not record the communication timeout DTC, then updating the second stop duration, and jumping to the step of stopping sending the simulation message to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution; If the electronic control unit under test records a communication timeout DTC, the second stop duration is determined as a network interruption duration during which the electronic control unit under test can record the communication timeout DTC under the simulation message; The minimum value of the network interruption duration is determined as the shortest network interruption duration.

4. The diagnostic initialization time testing method according to claim 3, characterized in that: The updating of the second stop duration includes: Calculate the product of the preset multiple of the simulation message, the corresponding value of the sending period and the preset percentage to obtain the target time step; The target time step is added to the second stop duration to obtain the latest second stop duration.

5. The diagnostic initialization time testing method according to claim 1, characterized in that: The updating of the first stop duration includes: The sum of the first stop duration and the preset time step is determined as the latest first stop duration.

6. The diagnostic initialization time testing method according to claim 1, characterized in that: The initial value of the first stop duration is calculated by the following steps: Calculating the sum of a preset minimum diagnostic initialization time and the shortest network interruption duration; The product of the sum and the preset coefficient is determined as the initial value of the first stop time.

7. The diagnostic initialization time testing method according to claim 1, characterized in that: The method further comprises: If the diagnostic initialization time is within the standard diagnostic initialization time range, the diagnostic initialization time of the electronic control unit under test meets the requirement.

8. A test device for diagnosing initialization time, characterized in that: The device comprises: An acquisition module is used to obtain the shortest network interruption duration for the tested electronic control unit to record a communication timeout fault code DTC; A stop module, for any simulation message, after clearing the communication timeout DTC recorded by the electronic control unit under test, stops sending the simulation message to the electronic control unit under test; A sending module, configured to continue sending the simulation message to the electronic control unit under test after a first stop time in response to a test scenario processing operation; the test scenario processing operation includes turning off and then turning on the power of the electronic control unit under test, and also includes interfering with a target position of the simulation message according to a preset interference time; An update jump module, configured to update the first stop duration if the electronic control unit under test does not record the communication timeout DTC, and jump to the step of stopping sending simulation messages to the electronic control unit under test after clearing the communication timeout DTC recorded by the electronic control unit under test, so as to continue execution; A determination module, configured to determine the first stop duration as the shortest duration of non-receiving message for which the electronic control unit under test can record the communication timeout DTC under the simulation message if the electronic control unit under test records a communication timeout DTC; The determination module is further used to determine the difference between the minimum value of the shortest unreceived message duration and the shortest network interruption duration as the diagnosis initialization time of the electronic control unit under test.

9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the diagnostic initialization time test method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the diagnostic initialization time testing method according to any one of claims 1 to 7 are executed.