Communication recovery time testing method and device, electronic equipment and storage medium
By designing a communication recovery time test device including a host computer, a fault generation unit, a signal acquisition unit and a connection unit, the problem of cumbersome manual testing in the prior art is solved, and automated testing of the vehicle domain controller is realized, and testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202311181551.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the communication recovery time test of vehicle domain controllers requires manual operation, which is cumbersome and time-consuming, and lacks automated testing methods.
A device and method for testing communication recovery time is designed, including a host computer, a fault generation unit, a signal acquisition unit and a connection unit. By automatically controlling the target vehicle bus to generate a fault, collecting fault information and communication information, and calculating the communication recovery time of the target controller.
Automatic testing of the communication recovery time of the vehicle domain controller is realized, which improves the testing efficiency and accuracy, and reduces the cumbersomeness of manual operations.
Smart Images

Figure CN119629091A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of testing technology, and in particular to a method and device for testing communication recovery time, an electronic device, and a storage medium. Background Art
[0002] With the development of vehicle electrification, electronic controllers (ECUs) are distributed throughout various systems in vehicles. In particular, with the increase of functions such as autonomous driving and smart cockpits in vehicles, the number of electronic controllers in vehicles is also increasing. The communication between domain controllers and branch nodes in vehicles generally uses the Controller Area Network (CAN) and Local Interconnect Network (LIN) buses. When a vehicle bus fails, each controller will record the bus fault code. After eliminating the fault, there is a standard time requirement for each controller to resume communication.
[0003] At present, the controller communication recovery time test is usually implemented by using an oscilloscope to simultaneously monitor the bus fault level jumps through multiple channels and measure the difference between the bus fault level elimination moment and the message SOF moment. However, this method requires manual measurement of the difference between level jumps one by one, which is repetitive, cumbersome and time-consuming. Therefore, how to realize the automatic test of the communication recovery time of the domain controller in the vehicle has become an urgent problem to be solved. Summary of the invention
[0004] The present disclosure provides a method and device for testing communication recovery time, an electronic device and a storage medium, the main purpose of which is to realize automatic testing of the communication recovery time of a domain controller in a vehicle.
[0005] According to a first aspect of the present disclosure, there is provided a device for testing communication recovery time, comprising: a host computer, a fault generating unit, a signal collecting unit, and a connecting unit;
[0006] The signal acquisition unit comprises a first end and a second end, the first end is electrically connected to the fault generation unit, and the second end is electrically connected to the connection unit; the host computer establishes communication link connections with the fault generation unit and the signal acquisition unit respectively;
[0007] The connection unit is used to establish a data connection with the target vehicle bus; the fault generation unit is used to control the target vehicle bus to generate a fault according to a test instruction; the signal acquisition unit is used to collect fault information and communication information of the target vehicle bus; the host computer is used to generate a test instruction according to a test script and send it to the fault generation unit, and calculate the communication recovery time of the target controller based on the collected fault information and communication information.
[0008] Optionally, the device further comprises: a switch control unit;
[0009] The switch control unit is electrically connected to the fault generation unit; the switch control unit is used to control the target vehicle bus to generate a fault in response to a fault generation instruction.
[0010] Optionally, the device further comprises: a display unit;
[0011] The display unit establishes a communication link connection with the host computer and is used to display the fault information of the target vehicle bus.
[0012] Optionally, the fault generation unit includes an analog-to-digital conversion module and a relay module;
[0013] The input end of the analog-to-digital conversion module is electrically connected to the signal acquisition unit, and the output end of the analog-to-digital conversion module is connected to the host computer through a communication link; the relay module includes a third end and a fourth end, the third end is connected to the host computer through a communication link, and the fourth end is connected to the signal acquisition unit;
[0014] The analog-to-digital conversion module is used to convert the fault analog signal collected by the signal acquisition unit into a fault digital signal; the fault information includes the fault analog signal and the fault digital signal; the relay module is used to control the opening and closing of different relays according to the test instruction to achieve control of the vehicle bus to generate faults.
[0015] Optionally, the host computer is further used to obtain a target jitter duration, and the target jitter duration includes at least one of the following: a first jitter duration of the fault generating unit, and a second jitter duration of the switch control unit;
[0016] The host computer is also used to calculate the communication recovery time of the target controller according to the first frame message sending time in the communication information, the fault removal time in the fault information and the target jitter duration.
[0017] According to a second aspect of the present disclosure, a method for testing communication recovery time is provided, comprising:
[0018] Controlling the target vehicle bus corresponding to the target controller to enter a fault state;
[0019] When the duration of the fault reaches a preset duration, removing the fault of the target vehicle bus;
[0020] Obtaining the time when the target controller sends the first frame message;
[0021] The communication recovery time of the target controller is calculated according to the first frame message sending time, the fault removal time and the target jitter duration, wherein the target jitter duration is the first jitter duration of the fault generation unit and / or the second jitter duration of the switch control unit.
[0022] Optionally, the method further includes:
[0023] Load the test file and determine the target message ID corresponding to the target controller;
[0024] Based on the target message ID, a target vehicle bus corresponding to the target controller is determined.
[0025] Optionally, controlling the target vehicle bus corresponding to the target controller to enter a fault state includes:
[0026] The target vehicle bus is short-circuited, wherein the short-circuit processing includes at least one of short-circuiting between buses, short-circuiting power supply, and short-circuiting grounding.
[0027] Optionally, the method further includes:
[0028] Determining whether the communication recovery time of the target controller exceeds the communication recovery prescribed time;
[0029] If exceeded, an alarm message of the target controller is generated;
[0030] If not, the target controller test passes.
[0031] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0032] at least one processor; and
[0033] a memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0035] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0036] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0037] The present disclosure provides a method and device for testing communication recovery time, an electronic device and a storage medium, the device comprising: a host computer, a fault generation unit, a signal acquisition unit, and a connection unit; the signal acquisition unit comprises a first end and a second end, the first end is electrically connected to the fault generation unit, and the second end is electrically connected to the connection unit; the host computer establishes a communication link connection with the fault generation unit and the signal acquisition unit respectively; the connection unit is used to establish a data connection with the target vehicle bus; the fault generation unit is used to control the target vehicle bus to generate a fault according to a test instruction; the signal acquisition unit is used to collect fault information and communication information of the target vehicle bus; the host computer is used to generate a test instruction according to a test script and send it to the fault generation unit, and calculate the communication recovery time of the target controller according to the collected fault information and communication information. Compared with the related art, in the embodiment of the present disclosure, the fault generation unit controls the target vehicle bus to generate a fault according to the test instruction generated by the host computer; and obtains the fault information through the signal acquisition unit, and calculates the communication recovery time of the controller according to the fault information; thereby, the automatic test of the communication recovery time of the controller can be realized.
[0038] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0040] Figure 1 A schematic diagram of the structure of a communication recovery time test device provided by an embodiment of the present disclosure;
[0041] Figure 2 A schematic diagram of the structure of another communication recovery time test device provided by an embodiment of the present disclosure;
[0042] Figure 3 A schematic diagram of the structure of another communication recovery time test device provided by an embodiment of the present disclosure;
[0043] Figure 4 A flow chart of a method for testing communication recovery time provided by an embodiment of the present disclosure;
[0044] Figure 5 A flowchart of another communication recovery time test method provided by an embodiment of the present disclosure;
[0045] Figure 6 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0047] The method of using an oscilloscope to measure the communication recovery time of the controller has the following disadvantages:
[0048] 1. It is relatively suitable for testing single nodes or a small number of network segments and a small number of controllers. There are many controllers on the whole vehicle, and the number of oscilloscope channels is limited. It is impossible to monitor and test the controllers of all network segments at the same time under the same working conditions.
[0049] 2. The power supply of each controller and the oscilloscope monitoring of the bus level of each controller are complicated, and the oscilloscope cannot capture and display all node messages in each network segment at the same time.
[0050] 3. The communication recovery time of each controller needs to be manually measured one by one to obtain the difference time between level jumps. The operation is repetitive, cumbersome and time-consuming.
[0051] 4. The measurement and calculation results need to be recorded one by one, and cannot be directly formatted into a report, which can easily lead to omissions.
[0052] The following describes the communication recovery time test method and device, electronic device and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.
[0053] Figure 1 A schematic diagram of a communication recovery time test device provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, it includes: a host computer 11, a fault generating unit 12, a signal collecting unit 13, and a connecting unit 14;
[0054] The signal acquisition unit 13 includes a first end and a second end, the first end is electrically connected to the fault generation unit 12, and the second end is electrically connected to the connection unit 14; the host computer 11 establishes communication link connections with the fault generation unit 12 and the signal acquisition unit 13 respectively;
[0055] The connection unit 14 is used to establish a data connection with the target vehicle bus; the fault generation unit 12 is used to control the target vehicle bus to generate a fault according to the test instruction; the signal acquisition unit 13 is used to collect fault information and communication information of the target vehicle bus; the host computer 11 is used to generate a test instruction according to the test script and send it to the fault generation unit 12, and calculate the communication recovery time of the target controller according to the collected fault information and communication information.
[0056] The present disclosure provides a device for testing communication recovery time, the device comprising: a host computer, a fault generation unit, a signal acquisition unit, and a connection unit; the signal acquisition unit comprises a first end and a second end, the first end is electrically connected to the fault generation unit, and the second end is electrically connected to the connection unit; the host computer establishes communication link connections with the fault generation unit and the signal acquisition unit respectively; the connection unit is used to establish a data connection with the target vehicle bus; the fault generation unit is used to control the target vehicle bus to generate a fault according to a test instruction; the signal acquisition unit is used to collect fault information and communication information of the target vehicle bus; the host computer is used to generate a test instruction according to a test script and send it to the fault generation unit, and calculate the communication recovery time of the target controller according to the collected fault information and communication information. Compared with the related art, in the embodiment of the present disclosure, the fault generation unit controls the target vehicle bus to generate a fault according to the test instruction generated by the host computer; and obtains the fault information through the signal acquisition unit, and calculates the communication recovery time of the controller according to the fault information; thereby, the automatic test of the communication recovery time of the controller can be realized.
[0057] Furthermore, in a possible implementation of this embodiment, as Figure 2 As shown, the device further includes: a switch control unit 15;
[0058] The switch control unit 15 is electrically connected to the fault generating unit 12 ; the switch control unit 15 is used to control the target vehicle bus to generate a fault in response to a fault generating instruction.
[0059] Specifically, the tester can manually control the vehicle bus to enter a fault state through the switch control unit 15, which can facilitate the tester to select different fault types and fault modes through the switch control unit as needed to verify the recovery ability and stability of the vehicle controller under different fault conditions. By electrically connecting the switch control unit 15 and the fault generation unit 12, flexible control of the fault condition can be achieved. This helps to ensure that the vehicle can quickly and accurately restore normal communication in actual use, and improves the reliability and accuracy of the test device.
[0060] Furthermore, in a possible implementation of this embodiment, as Figure 2 As shown, the device further includes: a display unit 16;
[0061] The display unit 16 establishes a communication link connection with the host computer 11 to display the fault information of the target vehicle bus.
[0062] In summary, by setting up a display unit to display the fault information of the vehicle bus, the fault information can be displayed intuitively, so that the tester or technician can quickly understand the type, location and detailed information of the fault; it can help the tester or technician to accurately locate the location of the fault; and the fault condition of the vehicle can be monitored in real time. The tester or technician can understand the fault status of the vehicle at any time, as well as the number and frequency of faults; and can record the fault information of the vehicle, including the type of fault, occurrence time, duration, etc. This helps to track and analyze the fault, and helps the tester or technician understand the occurrence pattern and trend of the fault, so as to carry out further fault prevention and improvement.
[0063] Furthermore, in a possible implementation of this embodiment, as Figure 2 As shown, the fault generating unit 12 includes an analog-to-digital conversion module 121 and a relay module 122;
[0064] The input end of the analog-to-digital conversion module 121 is electrically connected to the signal acquisition unit 13, and the output end of the analog-to-digital conversion module is connected to the host computer 11 through a communication link; the relay module 122 includes a third end and a fourth end, the third end is connected to the host computer 11 through a communication link, and the fourth end is connected to the signal acquisition unit 13;
[0065] The analog-to-digital conversion module 121 is used to convert the fault analog signal collected by the signal acquisition unit 13 into a fault digital signal; the fault information includes the fault analog signal and the fault digital signal; the relay module 122 is used to control the opening and closing of different relays according to the test instruction to achieve control of the vehicle bus to generate faults.
[0066] In summary, through the control of the relay module, different fault conditions of the vehicle bus can be simulated, such as short circuit to ground, etc.; the fault handling ability of the vehicle controller can be tested in a targeted manner. Testers can select different fault types and fault modes as needed to verify the recovery ability and stability of the vehicle controller after a fault occurs. This helps to discover and solve potential fault problems and improve the reliability and safety of the entire vehicle system.
[0067] Further, in a possible implementation of this embodiment, the host computer 11 is further used to obtain a target jitter duration, and the target jitter duration includes at least one of the following: a first jitter duration of the fault generating unit 12, and a second jitter duration of the switch control unit 15;
[0068] The host computer is also used to calculate the communication recovery time of the target controller according to the first frame message sending time in the communication information, the fault removal time in the fault information and the target jitter duration.
[0069] Specifically, the fault generation unit 12 can be automatically controlled by loading the test case to create a vehicle bus fault, or the vehicle bus fault can be created by opening and closing the switch control unit 15. There is a difference in the jitter duration of the relay in the fault generation unit 12 and the switch control unit 15, so it is necessary to determine the jitter duration corresponding to the communication recovery time according to the current fault generation method. By distinguishing the jitter duration of the fault generation unit and the switch control unit and calculating the communication recovery time, the accuracy of the test can be improved.
[0070] The present disclosure provides a structural schematic diagram of another communication recovery time test device, such as Figure 3 As shown, it includes a CAN / LIN harness 21 (the same as the connection unit in the previous embodiment), a bus acquisition card 22 (the same as the signal acquisition unit in the previous embodiment), an IO port board 23 (the same as the fault generation unit in the previous embodiment), a program unit 24 (the same as the host computer in the previous embodiment), an indicator light display 25 (the same as the display unit in the previous embodiment), and a switch control 26 (the same as the switch control unit in the previous embodiment).
[0071] The CAN / LIN harness 21 is an OBD bus harness that is integrated with CAN / FD twisted pair cables and LIN and GND cables and is connected to the OBD port of the vehicle under test.
[0072] Bus acquisition card 22 supports bus signal acquisition and analysis as well as host computer engineering development.
[0073] The IO port board 23 is powered by an external power supply of 12V (adjustable). The IO port board 23 converts the CAN / LIN physical level signal into a digital level signal through an internal ADC sampler, and then encodes it in binary code through a built-in processor and connects it to the program unit through a USB cable or RS232 serial port. The physical level captured by the hard line is displayed in real time in the program unit 24 in the form of a variable.
[0074] The program unit 24 includes a memory card, a program unit, and a test script, and is mainly used to store test data, compare, and generate test results in the form of reports for each network segment and each controller.
[0075] The indicator light 25 is used to feedback and display the bus fault injection / elimination status by turning on / off.
[0076] The switch control 26 can manually create a short circuit between buses or a short circuit between power and ground, covering bus fault conditions such as CAN_H Short CAN_L (bus short circuit), CAN_H Short VBAT (power short circuit), CAN_H Short GND (ground short circuit), CAN_L Short VBAT (power short circuit), CAN_L Short GND (ground short circuit), LIN Short VBAT (power short circuit), LIN Short GND (ground short circuit).
[0077] Corresponding to the above-mentioned communication recovery time test device, the present invention also proposes a communication recovery time test method. Since the method embodiment of the present invention corresponds to the above-mentioned device embodiment, the details not disclosed in the method embodiment can be referred to the above-mentioned device embodiment, and will not be repeated in the present invention.
[0078] Figure 4 A flowchart of a method for communication recovery time testing provided by an embodiment of the present disclosure.
[0079] like Figure 4 As shown, the method comprises the following steps:
[0080] Step 301 , controlling a target vehicle bus corresponding to a target controller to enter a fault state.
[0081] In the embodiment of the present disclosure, the target controller is the controller that needs to be tested for communication recovery time, and different controllers communicate via a CAN bus, which is a twisted wire of a multi-strand harness; different control target controllers each correspond to a bus. The bus can be short-circuited but not limited to.
[0082] Step 302: When the duration of the fault reaches a preset duration, the fault of the target vehicle bus is removed.
[0083] In an embodiment of the present disclosure, when the duration of the fault of the vehicle bus reaches a preset duration, the fault of the target vehicle bus corresponding to the target controller is removed. The setting of the preset duration needs to satisfy that all target vehicle buses enter a fault state. The preset durations corresponding to different target controllers may differ, and the present disclosure does not limit this.
[0084] Step 303, obtaining the time when the target controller sends the first frame message.
[0085] In the embodiment of the present disclosure, the time when the target controller sends the first frame message is obtained through the signal acquisition unit. The host computer collects, monitors, and analyzes the messages of each controller in each network segment of the tested vehicle through the bus acquisition card, and records the time of the first frame message sent by each controller in each network segment in turn.
[0086] Step 304, calculate the communication recovery time of the target controller according to the first frame message sending time, the fault removal time and the target jitter duration, wherein the target jitter duration is the first jitter duration of the fault generation unit and / or the second jitter duration of the switch control unit.
[0087] In the embodiments of the present disclosure, in order to reduce the influence of the jitter of components such as buttons or relays on the measured communication recovery time, it is necessary to consider de-jittering.
[0088] In some embodiments of the present disclosure, due to the jitter of different components, the jitter durations corresponding to different components are also different; the present disclosure is not limited to this.
[0089] The present disclosure provides a method for testing communication recovery time. Compared with the related art, the method provided by the embodiment of the present disclosure can simulate a real communication failure situation by controlling the target vehicle bus corresponding to the target controller to enter a fault state, and then removing the fault when the fault duration reaches a preset duration. Then, by obtaining the time when the target controller sends the first frame message, and combining the fault removal time and the jitter duration, the communication recovery duration of the target controller can be calculated. In this way, the communication recovery performance of the target controller can be accurately evaluated.
[0090] In order to clearly illustrate the embodiments of the present disclosure, the embodiments of the present disclosure provide Figure 5 A flow chart of another method for testing communication recovery time is shown.
[0091] like Figure 5 As shown, the method comprises the following steps:
[0092] Step 401, load the test file, and determine the target message ID corresponding to the target controller.
[0093] Step 402: Determine the target vehicle bus corresponding to the target controller based on the target message ID.
[0094] Specifically, in the disclosed embodiment, the host computer loads and imports a file (Excel or Txt format, etc.) containing the address information and bus fault codes of each controller of the tested vehicle. By physically addressing the target controller, the target message ID corresponding to the target controller is determined. The target vehicle bus corresponding to the target controller is determined according to the target message ID.
[0095] Step 403 , short-circuiting the target vehicle bus, wherein the short-circuiting includes at least one of short-circuiting between buses, short-circuiting power supply, and short-circuiting grounding.
[0096] Specifically in the disclosed embodiments, the host computer calls the fault generation unit (IO port board) according to the test script to create bus short-circuit, power short-circuit, and ground short-circuit; covering bus fault conditions such as CAN_H Short CAN_L (bus short-circuit), CAN_HShort VBAT (power short-circuit), CAN_H Short GND (ground short-circuit), CAN_L Short VBAT (power short-circuit), CAN_L Short GND (ground short-circuit), LIN Short VBAT (power short-circuit), and LIN Short GND (ground short-circuit).
[0097] In some embodiments of the present disclosure, short-circuiting between buses, short-circuiting power supplies, and short-circuiting grounding are manually controlled by a switch control unit.
[0098] Step 404: when the fault duration reaches a preset duration, remove the fault of the target vehicle bus.
[0099] Step 405, obtaining the time when the target controller sends the first frame message.
[0100] Step 406: Calculate the communication recovery duration of the target controller according to the first frame message sending time, the fault removal time, and the target jitter duration, wherein the target jitter duration is the first jitter duration or the second jitter duration.
[0101] Specifically, in the disclosed embodiment, the moment when the bus fault is removed is recorded as T0, that is, the moment when the varCAN / varLIN variable jumps is recorded. At the same time, the host computer collects, monitors, and parses the messages of each controller in each network segment of the tested vehicle through the signal acquisition unit (bus acquisition card), and records the time points of the first frame message sent by each controller under each network segment in turn as T1, T2, T3...Tn. Then, the time for each controller to resume communication after the bus fault is removed is (T1-T0)-ΔTx (de-jitter), (T2-T0)-ΔTx, (T3-T0)-ΔTx...(Tn-T0)-ΔTx. The host computer records the first frame message sent by each controller under each network segment and the calculated time to resume communication in turn, prints and generates a document report.
[0102] The method provided by the embodiment of the present disclosure can simulate a real communication failure situation by controlling the target vehicle bus corresponding to the target controller to enter a fault state, and then removing the fault when the fault duration reaches a preset duration. Then, by obtaining the time when the target controller sends the first frame message, and combining the fault removal time and the jitter duration, the communication recovery duration of the target controller can be calculated. In this way, the communication recovery performance of the target controller can be accurately evaluated.
[0103] Step 407, determining whether the communication recovery time of the target controller exceeds the communication recovery prescribed time.
[0104] As a refinement of the embodiment of the present disclosure, if it is exceeded, an alarm message of the target controller is generated; if it is not exceeded, the target controller test passes.
[0105] Specifically, in the embodiment of the present disclosure, when the communication recovery time of the target controller exceeds the specified time, it indicates that there is an abnormality in the target controller, and corresponding alarm information needs to be generated.
[0106] By obtaining the time when the target controller sends the first frame message, and combining the fault removal time and the jitter duration, the communication recovery duration of the target controller can be accurately calculated. This can provide accurate data for evaluating the communication recovery performance of the target controller. At the same time, the method also takes the jitter duration into account to avoid misjudgment and inaccurate calculations. By controlling the target vehicle bus to enter a fault state and removing the fault after a preset time, the method can simulate a real communication fault situation. This can more realistically test the recovery ability of the target controller after a communication fault occurs, providing a more reliable evaluation result.
[0107] In summary, the communication recovery time test method provided by the present disclosure has the beneficial effects of testing the communication recovery time, accurately calculating the communication recovery duration, and simulating real fault conditions. It can provide accurate data for evaluating the communication recovery performance of the target controller, and can simulate real fault conditions to provide more reliable evaluation results.
[0108] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers do not limit the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.
[0109] It should be noted that the above explanation of the device embodiment is also applicable to the method of this embodiment, and the principle is the same, which is no longer limited in this embodiment.
[0110] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0111] Figure 6 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0112] like Figure 6 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 502 or a computer program loaded from a storage unit 508 to a RAM (Random Access Memory) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O (Input / Output) interface 505 is also connected to the bus 504.
[0113] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0114] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a method for testing the communication recovery time. For example, in some embodiments, the method for testing the communication recovery time may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the aforementioned communication recovery time test method in any other appropriate manner (for example, by means of firmware).
[0115] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0120] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0121] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0122] The various numerical numbers such as first and second involved in the present disclosure are only for the convenience of description and are not used to limit the scope of the embodiments of the present disclosure, but also indicate the order of precedence.
[0123] At least one in the present disclosure may also be described as one or more, and a plurality may be two, three, four or more, which is not limited in the present disclosure. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".
[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0125] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A communication recovery time test device, characterized in that: include: Host computer, fault generation unit, signal acquisition unit, connection unit; The signal acquisition unit includes a first end and a second end, the first end is electrically connected to the fault generation unit, and the second end is electrically connected to the connection unit; the host computer establishes communication link connections with the fault generation unit and the signal acquisition unit respectively; The connection unit is used to establish a data connection with the target vehicle bus; the fault generation unit is used to control the target vehicle bus to generate a fault according to the test instruction; the signal acquisition unit is used to collect fault information and communication information of the target vehicle bus; The host computer is used to generate a test instruction according to the test script and send it to the fault generation unit, and calculate the communication recovery time of the target controller according to the collected fault information and the communication information.
2. The device according to claim 1, characterized in that The device further comprises: a switch control unit; The switch control unit is electrically connected to the fault generation unit; the switch control unit is used to control the target vehicle bus to generate a fault in response to a fault generation instruction.
3. The device according to claim 1, characterized in that The device further comprises: a display unit; The display unit establishes a communication link connection with the host computer and is used to display the fault information of the target vehicle bus.
4. The device according to claim 1, characterized in that The fault generation unit includes an analog-to-digital conversion module and a relay module; The input end of the analog-to-digital conversion module is electrically connected to the signal acquisition unit, and the output end of the analog-to-digital conversion module is connected to the host computer through a communication link; the relay module includes a third end and a fourth end, the third end is connected to the host computer through a communication link, and the fourth end is connected to the signal acquisition unit; The analog-to-digital conversion module is used to convert the fault analog signal collected by the signal acquisition unit into a fault digital signal; the fault information includes the fault analog signal and the fault digital signal; the relay module is used to control the opening and closing of different relays according to the test instruction to achieve control of the vehicle bus to generate faults.
5. The device according to claim 2, characterized in that The host computer is further used to obtain a target jitter duration, wherein the target jitter duration includes at least one of the following: a first jitter duration of the fault generating unit, and a second jitter duration of the switch control unit; The host computer is also used to calculate the communication recovery time of the target controller according to the first frame message sending time in the communication information, the fault removal time in the fault information and the target jitter duration.
6. A method for testing communication recovery time, characterized in that: The method is applied to the device according to any one of claims 1 to 5, comprising: Controlling the target vehicle bus corresponding to the target controller to enter a fault state; When the duration of the fault reaches a preset duration, removing the fault of the target vehicle bus; Obtaining the time when the target controller sends the first frame message; The communication recovery time of the target controller is calculated according to the first frame message sending time, the fault removal time and the target jitter duration, wherein the target jitter duration is the first jitter duration of the fault generation unit and / or the second jitter duration of the switch control unit.
7. The method according to claim 6, characterized in that The method further comprises: Load the test file and determine the target message ID corresponding to the target controller; Based on the target message ID, a target vehicle bus corresponding to the target controller is determined.
8. The method according to claim 6, characterized in that The control of the target vehicle bus corresponding to the target controller to enter a fault state includes: The target vehicle bus is short-circuited, wherein the short-circuit processing includes at least one of short-circuiting between buses, short-circuiting power supply, and short-circuiting grounding.
9. The method according to claim 6, characterized in that The method further comprises: Determining whether the communication recovery time of the target controller exceeds the communication recovery prescribed time; If exceeded, an alarm message of the target controller is generated; If not, the target controller test passes.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 6 to 9.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 6-9.