Hardware testing methods, systems, electronic devices and storage media

By combining the monitoring of physical load and virtual load in the hardware testing system, the problem of low accuracy caused by signal observation errors in hardware-in-the-loop testing is solved, and more efficient and accurate test results are achieved.

CN118605439BActive Publication Date: 2025-10-31CHERY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410654165.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2025-10-31
Estimated Expiration
2044-05-24

AI Technical Summary

Technical Problem

In existing hardware-in-the-loop testing, the reliance on simulated signal observations leads to low accuracy of test results and the existence of signal observation errors.

Method used

By introducing physical loads and simulation boards into the hardware testing system, combined with signal acquisition boards and video acquisition equipment, the operating status of physical and virtual loads can be monitored in real time, thereby improving the accuracy of test results.

Benefits of technology

This reduces the adverse effects of signal observation errors on test results and improves the accuracy and efficiency of hardware testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118605439B_ABST
    Figure CN118605439B_ABST
Patent Text Reader

Abstract

This application provides a hardware testing method, system, electronic device, and storage medium, belonging to the field of vehicle technology. The method includes: executing a test case file via a host computer. The test case file includes at least one control command that the ECU under test will send to a load module. The load module includes a physical load connected in parallel and a simulation board. During the execution of the test case file, a test machine controls the ECU under test to send at least one control command to the load module. The host computer receives test results sent by the test machine, which reflect the operating status of the load module after executing at least one control command. The host computer displays the test results. This technical solution can determine the test results based on the operating status of the physical load and the simulation signal of the virtual load, thereby reducing the adverse effects of signal observation errors on the test results and improving the accuracy of the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a hardware testing method, system, electronic device, and storage medium. Background Technology

[0002] Before delivering a vehicle, technicians will test the vehicle's hardware, such as performing functional and stability tests on the body controller, vehicle controller, and other ECUs (Electronic Control Units), to ensure the vehicle's quality and safety.

[0003] In related technologies, Hardware-in-the-Loop (HIL) testing is commonly used to test the hardware under test (WAT). In HIL, the electronic control unit (ECU) under test is connected to a real-time processor. The real-time processor simulates the operating state of the controlled ECU by running a simulation model. Therefore, during the testing of the ECU, the test results can be determined by observing and analyzing the operating state of the controlled ECU.

[0004] However, using the above method, the test results can only be determined by observing the simulation signals output by the simulation model. Since there may be instances of erroneous signal observation during testing—that is, the observed signal may not be the signal sent by the target controlled unit—test errors occur, reducing the accuracy of the test. Summary of the Invention

[0005] This application provides a hardware testing method, system, electronic device, and storage medium that can determine test results based on the operating status of the physical load and the simulation signals of the virtual load, thereby reducing the adverse effects of signal observation errors on test results and improving test accuracy. The technical solution is as follows:

[0006] On the one hand, a hardware testing method is provided, applied to a hardware testing system, the hardware testing system including a host computer, a test machine, a load module, and an electronic control unit (ECU) under test, the method including:

[0007] The test case file is executed by the host computer. The test case file includes at least one control command that the ECU under test will send to the load module. The ECU under test is connected in series with the load module. The load module includes a physical load and a simulation board connected in parallel. The simulation board is plugged into the hardware interface of the test machine. The simulation board is used to simulate a virtual load. The control command is used to control at least one of the physical load and the simulation board.

[0008] During the execution of the test case file, the test machine controls the ECU under test to send at least one control command to the load module. The host computer and the test machine transmit data via Ethernet, and the test machine and the ECU under test transmit data via CAN bus.

[0009] The host computer receives the test results sent by the test machine, and the test results are used to reflect the operating status of the load module after executing the at least one control command;

[0010] The test results are displayed on the host computer.

[0011] In some embodiments, the hardware testing system further includes a communication board, which is plugged into the testing machine and is used to communicate with the ECU under test via the CAN bus.

[0012] The step of controlling the ECU under test to send the at least one control command to the load module via the test machine includes:

[0013] During the execution of the test case file, the device identifier and instruction identifier included in the test case file are determined. The device identifier is used to indicate the controlled device, and the controlled device includes at least one load in the load module. The instruction identifier is used to indicate the control instruction sent to the controlled device.

[0014] The device identifier and instruction identifier are sent to the test machine via the Ethernet to instruct the test machine to send the device identifier and instruction identifier to the ECU under test via the communication board. The ECU under test then sends at least one control instruction to the controlled device based on the device identifier and instruction identifier. The controlled device is used to execute the control operation indicated by the control instruction upon receiving any control instruction.

[0015] In some embodiments, before executing the test case file via the host computer, the method further includes:

[0016] When the controlled device includes the simulation board, a configuration page is displayed through a human-machine interface. The configuration page is used to configure the simulation parameters of the simulation board. The simulation parameters include the physical quantity of the virtual load simulated by the simulation board and the value of the physical quantity.

[0017] In some embodiments, when the controlled device includes the simulation board, the test result includes a simulation signal output by the simulation board after executing the at least one control command, the simulation signal representing at least one physical quantity of the virtual load, the physical quantity including voltage, current, resistance, temperature, and pressure;

[0018] When the controlled device includes the physical load, the test result includes an electrical signal of the physical load after the execution of the at least one control command, the electrical signal representing at least one physical quantity of the physical load.

[0019] In some embodiments, the hardware testing system further includes a signal acquisition board, which is plugged into the testing machine, and the method further includes:

[0020] The electrical signals of the physical load and the simulation signals of the simulation board are acquired through the signal acquisition board.

[0021] The electrical signal and the simulated signal are sent to the host computer as test results.

[0022] In some embodiments, the hardware testing system further includes a video acquisition device, which communicates with the host computer via the Ethernet. The method further includes:

[0023] The video acquisition device is used to acquire and display the video stream containing the physical load in real time.

[0024] The video stream is sent to the host computer via the video acquisition device.

[0025] The video stream is played in real time via the host computer.

[0026] In some embodiments, the host computer includes a display screen for displaying a human-machine interface. The human-machine interface is used to write the test case file, run the simulation test software, and display the test results. The simulation test software is used to test the ECU under test by executing the test case file.

[0027] In some embodiments, the host computer further includes an alarm module, and the method further includes:

[0028] If the test results are abnormal, an alarm will be played through the alarm module.

[0029] On the other hand, a hardware testing system is provided, the system including a host computer, a testing machine, a load module, and an electronic control unit (ECU) under test.

[0030] The host computer is used to execute a test case file, which includes at least one control command that the ECU under test will send to the load module. The ECU under test is connected in series with the load module. The load module includes a physical load and a simulation board connected in parallel. The simulation board is plugged into the hardware interface of the test computer and is used to simulate a virtual load. The control command is used to control at least one of the physical load and the simulation board.

[0031] The test machine is used to control the ECU under test to send at least one control command to the load module during the execution of the test case file by the host computer. The host computer and the test machine transmit data via Ethernet, and the test machine and the ECU under test transmit data via CAN bus.

[0032] The host computer is also used to receive test results sent by the test machine, the test results being used to reflect the operating status of the load module after executing the at least one control command; and to display the test results.

[0033] In another direction, an electronic device is provided, which includes a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded and executed by the processor to implement the hardware testing method in the embodiments of this application.

[0034] On the other hand, a computer-readable storage medium is provided for storing at least one computer program, which is loaded and executed by a processor to implement the hardware testing method in the embodiments of this application. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a schematic diagram of the hardware structure of a hardware testing system provided according to an embodiment of this application;

[0037] Figure 2 This is a flowchart of a hardware testing method provided according to an embodiment of this application;

[0038] Figure 3 This is a schematic diagram of a configuration page provided according to an embodiment of this application;

[0039] Figure 4This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0041] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.

[0042] In this application, the term "at least one" means one or more, and "multiple" means two or more.

[0043] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0044] Figure 1 This is a schematic diagram of the hardware structure of a hardware testing system according to an embodiment of this application. See also... Figure 1 The system includes a host computer 101, a test machine 102, a load module 103, and an electronic control unit under test 104.

[0045] In some embodiments, the host computer 101 is a smartphone, tablet, laptop, or desktop computer, but is not limited thereto. The host computer 101 has simulation testing software installed or running. The simulation testing software is used to perform hardware-in-the-loop testing on the hardware under test by executing test case files. The host computer 101 also includes a display screen. During hardware-in-the-loop testing, technicians can use the human-computer interaction interface displayed on the host computer 101's screen to write test case files, run the simulation testing software, and view test results.

[0046] The host computer 101 communicates with the test computer 102 via Ethernet. During hardware-in-the-loop testing, the test computer 102 uses a board to simulate a controlled virtual load, allowing testers to test the control functions of the electronic control unit 104 based on this virtual load control. Optionally, the board used to simulate the virtual load is called a simulation board. Figure 1As shown, board 1032 is plugged into the hardware interface of the test machine. Board 1032 can also be connected in parallel across the two ends of physical load 1031 through the hardware interface of the test machine. Physical load 1031 and the simulation board in the test machine used to simulate virtual load constitute load module 103. Physical load 1031 can be real physical hardware, such as car engine, windshield wipers, car windows, car headlights, etc.

[0047] In some embodiments, the test unit 102 further includes a communication board. The communication board can communicate with the electronic control unit 104 via a CAN (Controller Area Network) bus. Additionally, the electronic control unit 104 can be connected in series with the physical load 1031 via a hardware interface. The electronic control unit 104 is used to control the physical load 1031 or the emulation board 1032 via control commands. Testers can perform hardware-in-the-loop testing on the electronic control unit 104 by observing the operating status of the load module 103.

[0048] In some embodiments, testers run test case files via a host computer 101. During the execution of the test case files, the host computer 101 can control the electronic control unit 104 to send at least one control command to the load module 103 via a test machine 102. Furthermore, the test machine 102 can send the operating status of the load module 103 after executing at least one control command as a test result to the host computer 101, which then displays the test result. By reviewing the test results of the electronic control unit 104, testers can determine whether the control function of the electronic control unit 104 meets the design requirements.

[0049] Figure 2 This is a flowchart of a hardware testing method provided according to an embodiment of this application, such as... Figure 2 As shown, this method is applied to Figure 1 The hardware testing system shown includes a host computer, a test machine, a load module, and an electronic control unit (ECU) under test. Based on the components included in this system, the hardware testing method is implemented through the following steps:

[0050] 201. Execute the test case file via the host computer.

[0051] Test case files are documents written by testers. They typically contain test steps, source code, and expected test results for testing various functions of the automotive hardware. This allows testers or the host computer to perform tests on the automotive hardware according to the test case files, thereby ensuring the quality and stability of the automotive hardware.

[0052] Optionally, the host computer can be a smartphone, tablet, laptop, or desktop computer, but is not limited to these. The host computer has simulation testing software installed or running. The host computer can execute test case files through the simulation testing software to perform hardware-in-the-loop testing on the ECU (Electronic Control Unit) under test. The ECU under test can be any type of vehicle domain controller, such as a BCM (Body Control Module) or a VCU (Vehicle Control Unit), and this embodiment does not impose any limitations on this.

[0053] Optionally, before executing the test case files via the host computer, testers can upload the test case files, test source code, and other files to the test case management platform via the host computer. This allows the testing team to manage and maintain different versions of the test case files through the test case management platform. Furthermore, after the testers upload the test case files or test source code to the test case management platform, the platform will automatically trigger a pre-configured Jenkins task to build the test project. The test project is used to perform Model-in-the-Loop (MIL) testing and Software-in-the-Loop (SIL) testing on the model source code and integrate the generated test code into the corresponding vehicle domain controller.

[0054] In the automotive testing field, before real-vehicle testing, a comprehensive functional test of the body domain controller is typically performed using HIL (Hardware In the Loop) testing. Compared to real-vehicle testing, HIL testing is safer and more efficient. Furthermore, HIL testing supports testing extreme conditions that are difficult to achieve in real-vehicle testing. In addition, HIL testing systems not only have rich testing functions but also allow for the reuse of test platforms, significantly saving testing time and economic costs.

[0055] It's important to note that HIL testing typically precedes field testing and follows MIL and SIL testing. In the overall testing process, MIL testing is a model-based test performed on a host computer. MIL testing verifies whether the control algorithm model accurately implements the functional requirements. The output of MIL testing is a verified control algorithm model, such as a vehicle dynamics model, driving model, motor model, battery model, and road model. SIL testing is also performed on a host computer. SIL testing verifies whether the functionality implemented in the code is consistent with the control algorithm model. The output of SIL testing is verified embedded code.

[0056] The aforementioned test case file is used for High-Intensity Logic (HIL) testing of the ECU under test. The test case file includes at least one control command that the ECU under test will send to the load module. During HIL testing of the ECU under test, the focus is typically on verifying whether the ECU's control functions meet design requirements. For example, testing whether the ECU can start the car's engine normally, and whether it can normally control the turning lights on and off. In HIL testing, the load module is connected in series with the ECU under test. The load module includes controlled devices controlled by the ECU under test. These controlled devices can also be referred to as loads.

[0057] For example, in a HIL test system, the controlled device includes real physical loads, such as car lights and windshield wipers. The controlled device may also include virtual loads simulated by emulation boards, such as emulation boards used to simulate a car engine. Accordingly, the physical and virtual loads constitute the load module in the HIL test system. The load module includes physical loads and emulation boards connected in parallel. The emulation boards are plugged into the hardware interface of the test machine and are connected in parallel across the physical loads through the test machine's hardware interface. Accordingly, control instructions included in the test case file are used to control at least one of the physical loads and emulation boards.

[0058] It should be noted that the load module can also include both a physical load and a virtual load to simulate that physical load. For example, the load module may include both vehicle lights and a simulation board to simulate vehicle lights. Furthermore, during subsequent HIL testing, testers can observe the physical load and its operating status to determine whether the simulated signals output by the corresponding virtual load are correct, thereby verifying the authenticity of the simulated signals.

[0059] The process of connecting the physical load and the simulation board is explained below. Taking a physical load consisting of a vehicle wiring harness as an example, the tester can identify the input interface pins and other pins from the vehicle wiring harness based on the electrical schematic. Then, according to the corresponding interface configuration, the tester identifies the pins of the simulation board in the testing machine. Finally, the tester connects the external pins corresponding to the physical load to the pins identified in the testing machine via terminal blocks, thus connecting the physical load and the virtual load (simulation board) in the testing machine.

[0060] In some embodiments, when the controlled device includes a simulation board, the tester can configure the simulation board via the host computer before executing the test case file. In response to configuring the simulation board, the host computer displays a configuration page through a human-machine interface, allowing the tester to configure the simulation parameters of the simulation board. These simulation parameters include the physical quantities and values ​​of the virtual load simulated by the simulation board. Accordingly, after selecting the simulation board to be configured on the configuration page, the tester can configure the physical quantities of the virtual load simulated by that board, and can also set the values ​​of those physical quantities. Displaying the configuration page on the host computer facilitates efficient and convenient configuration of the virtual load simulated by the simulation board, improving the efficiency of configuring the simulation board.

[0061] Figure 3 This is a schematic diagram of a configuration page provided according to an embodiment of this application. For example... Figure 3 As shown, the configuration page displays multiple selectable boards on the left. When any board is selected, the corresponding circuit diagram is displayed in the center of the configuration page. The circuit diagram shows the board's input and output interfaces, as well as the connection methods of the internal electronic components. The right side of the configuration page displays multiple configuration options. (For example...) Figure 3 As shown, the physical quantity of the virtual load simulated by board VT2004_1 is configured as resistance (R), and the resistance value of the virtual load is configured as 10000.0 ohms. Additionally, the configuration page displays a save control. After configuring the simulation parameters for any board, the tester can apply the configured simulation parameters to that board by clicking the save control. Optionally, in response to the tester's click on the save control, the host computer sends the configured simulation parameters to the test machine via Ethernet, so that the test machine can run the simulation board according to these simulation parameters.

[0062] In some embodiments, when the controlled device includes a simulation board without configured simulation parameters, in response to the execution operation of the test case file, the host computer reads multiple simulation parameters of the simulation board from the historical configuration record. The historical configuration record stores the simulation parameters of multiple simulation boards configured in the past. The host computer then determines the simulation parameter that is applied most frequently as the simulation parameter of the simulation board. Before executing the test case, the host computer displays a prompt message. The prompt message indicates whether to run the simulation board according to the simulation parameters. In response to the confirmation operation of the prompt message, the host computer applies the simulation parameters and executes the test case file. In response to the rejection operation of the prompt message, the host computer displays a configuration page so that the tester can configure the simulation parameters of the simulation board according to actual needs.

[0063] 202. During the execution of the test case file, the host computer determines the device identifier and instruction identifier included in the test case file.

[0064] In this embodiment of the application, during the execution of the test case file by the host computer, the host computer determines the device identifier and instruction identifier included in the test case file. The device identifier is used to indicate the controlled device. The controlled device includes at least one load in the load module. The instruction identifier is used to indicate the control instructions sent to the controlled device.

[0065] For example, a device identifier is used to indicate the vehicle lights in the load module. A command identifier is used to indicate the control command to turn on the vehicle lights.

[0066] 203. Send the device identifier and command identifier to the test machine via Ethernet to instruct the test machine to send the device identifier and command identifier to the ECU under test through the communication board.

[0067] In this embodiment of the application, after the host computer determines the device identifier and the command identifier, the host computer sends the device identifier and the command identifier to the test machine via Ethernet, so as to instruct the test machine to forward the device identifier and the command identifier to the ECU under test.

[0068] The hardware testing system also includes a communication board. Similar to the simulation board, the communication board is plugged into the hardware interface of the testing machine. The communication board is used for data communication with the ECU under test via the CAN bus. Accordingly, after the testing machine receives the device identifier and command identifier sent by the host computer, the communication board in the testing machine sends the device identifier and command identifier to the ECU under test via the CAN bus.

[0069] In some embodiments, testers can also configure the parameters of the communication board on the configuration page, such as the communication protocol used by the communication board and the data transmission rate of the communication board.

[0070] Optionally, the test unit can be an existing integrated cabinet, such as the VT test cabinet. The VT test cabinet offers a rich set of VT boards, such as the VT1004, VT2004, and VT2848 boards. For example, connecting the input terminals of the VT1004 to the output terminals of the ECU under test can simulate a motor load. Simultaneously, the VT1004's physical wiring terminals can be connected to a physical motor load, facilitating automatic switching between physical and simulated loads during testing. The VT test cabinet typically meets testing requirements based on CAN bus, LIN (Local Interconnect Network) bus, I / O interfaces, or Ethernet. The VT test cabinet also allows for the creation of control scripts through its built-in script editing function, enabling automated testing.

[0071] 204. The ECU under test sends at least one control command to the controlled device based on the device identifier and the command identifier.

[0072] In this embodiment, after receiving the device identifier and the instruction identifier, the ECU under test determines the controlled device based on the device identifier and determines at least one control instruction to be sent based on the instruction identifier. Then, the ECU under test sends at least one control instruction to the controlled device.

[0073] In cases where the controlled device includes a simulation board, the ECU under test (DUT) sends at least one control command to the test machine via the CAN bus, causing the simulation board plugged into the test machine to execute the control command. In cases where the controlled device includes a physical load, the DUT directly sends at least one control command to the physical load via a connection cable.

[0074] 205. Upon receiving any control command, the controlled device shall execute the control operation indicated by the control command.

[0075] In the embodiments of this application, for any controlled device, upon receiving any control command, the controlled device executes the control operation indicated by the control command. For example, when a vehicle headlight receives a control command to turn on the headlight, the headlight automatically turns on. Alternatively, when a simulation board used to simulate the headlight receives a control command to turn on the headlight, the simulation board outputs a high-level signal to simulate the headlight being on.

[0076] 206. Acquire the electrical signals of the physical load and the simulation signals of the simulation board through the signal acquisition board; send the electrical signals and simulation signals as test results to the host computer.

[0077] In this embodiment, the hardware testing system further includes a signal acquisition board. Similar to the aforementioned board, the signal acquisition board can also be plugged into the hardware interface of the testing machine. The signal acquisition board is used to acquire electrical signals from the controlled device or simulated signals output by the controlled device. The simulated signal represents at least one physical quantity of the virtual load, such as voltage, current, resistance, temperature, or pressure. The electrical signal represents at least one physical quantity of the physical load. By acquiring signal data from the controlled device using the signal acquisition board, the operating status of the controlled device can be analyzed more accurately based on the acquired signal data, and the test results can be determined based on the operating status, thus improving the accuracy of HIL testing.

[0078] After acquiring various signal data through the signal acquisition board, the test machine sends the various signal data as test results to the host computer via Ethernet.

[0079] Optionally, after the test machine sends the device identifier and command identifier to the ECU under test, the test machine can continuously acquire the simulation signals output by the simulation board and the electrical signals of the physical load through the signal acquisition board, so that the acquired signals can reflect the operating status of the controlled device before and after executing the control command.

[0080] For example, when a simulation board is used to simulate vehicle lights, the signal acquisition board can acquire the voltage of the simulated load. If the voltage of the simulated load before executing the "turn on vehicle lights" control command is significantly lower than the voltage after executing the control command, it indicates that the simulated load has successfully executed the control command.

[0081] Optionally, the tester may also acquire signals from the controlled device only after the controlled device has executed any control command. In some embodiments, when the controlled device includes a simulation board, the test results include the simulation signal output by the simulation board after executing at least one control command. When the controlled device includes a physical load, the test results include the electrical signal of the physical load after executing at least one control command.

[0082] 207. Receive test results sent by the test machine through the host computer.

[0083] In this embodiment, the host computer receives test results sent by the test machine via Ethernet. The test results include simulated signals output by the simulation board and / or electrical signals of the physical load. The test results reflect the operating status of the controlled device after executing at least one control command.

[0084] 208. Display the test results via the host computer.

[0085] In this embodiment, after receiving the test results, the host computer displays the results through a human-computer interaction interface. By viewing the test results, testers can quickly locate and analyze any abnormal problems that occur during the test, improving testing efficiency and accuracy.

[0086] In some embodiments, the host computer can display test results in the form of charts. Accordingly, after receiving the test results, the host computer plots a signal fluctuation graph or a signal fluctuation table based on the changes in the simulated / electrical signals included in the test results over time. Then, the host computer displays the signal fluctuation graph or table so that testers can clearly and intuitively determine the operating status of the controlled equipment by viewing the chart. For example, the host computer can plot a voltage-time graph for a vehicle headlight. This graph can show the changes in the headlight voltage over time.

[0087] In some embodiments, after receiving the test results, the host computer can also input the test results and test case files into a natural language processing model. The natural language processing model then analyzes and summarizes the test results with reference to the test case files to obtain a test report. The test report typically includes four aspects: the test object, problems / defects, test conclusions, and improvement measures. The test object refers to the hardware object under test, such as a body controller or vehicle controller. Problems / defects refer to anomalies and defects discovered during the test, such as the inability to start the transmitter or control door closing. Test conclusions provide a summary evaluation of the functionality and safety of the tested object. Improvement measures propose suggestions and directions for improvement based on the identified problems.

[0088] In some embodiments, the hardware testing system further includes a video acquisition device. The video acquisition device can be a camera, camcorder, or similar device. The video acquisition device communicates with a host computer via Ethernet. By setting up the video acquisition device near the physical load, a video stream of the physical load can be acquired and displayed in real time. This video stream can record and display the operating status of the physical load. The video acquisition device can also send the acquired video stream to the host computer via Ethernet. After receiving the video stream, the host computer plays it back in real time. By setting up the video acquisition device near the physical load and playing the acquired video stream through the host computer, testers can view the operating status of the physical load directly on the host computer, eliminating the need for on-site observation and improving testing efficiency.

[0089] In some embodiments, the host computer includes a display screen. The display screen is used to display a human-machine interface. Testers can use the human-machine interface displayed on the host computer to write test case files, run simulation testing software, and view test results. The simulation testing software is used to test the ECU under test by executing the test case files.

[0090] In some embodiments, the host computer also includes an alarm module. In the event of abnormal test results, the host computer can also play an alarm through the alarm module to remind the tester to stop the test immediately. Optionally, the alarm module includes an alarm light and a speaker. For example, when the temperature of the physical load is too high, the alarm light flashes and the speaker plays an alarm sound.

[0091] This application provides a hardware testing method. By integrating a virtual load and a physical load into the hardware testing system, it is possible to observe not only the simulated signals output by the virtual load but also the operating status of the physical load during the hardware testing of a vehicle. Compared to relying solely on observing simulated signals to determine test results, the aforementioned hardware testing system can determine test results based on both the operating status of the physical load and the simulated signals of the virtual load. This reduces the adverse effects of signal observation errors on test results and improves test accuracy.

[0092] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. The electronic device 400 can be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The electronic device 400 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0093] Typically, electronic device 400 includes a processor 401 and a memory 402.

[0094] Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0095] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 402 are used to store at least one computer program, which is executed by the processor 401 to implement the hardware testing method provided in the method embodiments of this application.

[0096] In some embodiments, the electronic device 400 may also optionally include a peripheral device interface 403 and at least one peripheral device. The processor 401, memory 402, and peripheral device interface 403 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 404, a display screen 405, a camera assembly 406, an audio circuit 407, and a power supply 408.

[0097] Peripheral device interface 403 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 401 and memory 402. In some embodiments, processor 401, memory 402 and peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 401, memory 402 and peripheral device interface 403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0098] The radio frequency (RF) circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 404 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 404 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 404 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0099] Display screen 405 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 405 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 401 for processing. In this case, display screen 405 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 405, disposed on the front panel of electronic device 400; in other embodiments, there may be at least two display screens, disposed on different surfaces of electronic device 400 or in a folded design; in other embodiments, display screen 405 may be a flexible display screen, disposed on a curved or folded surface of electronic device 400. Furthermore, display screen 405 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 405 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0100] The camera assembly 406 is used to acquire images or videos. In some embodiments, the camera assembly 406 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 406 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0101] The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 401 for processing, or input to the radio frequency circuit 404 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the electronic device 400. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 407 may also include a headphone jack.

[0102] Power supply 408 is used to supply power to various components in electronic device 400. Power supply 408 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 408 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0103] In some embodiments, the electronic device 400 further includes one or more sensors 409. The one or more sensors 409 include, but are not limited to, an accelerometer 410, a gyroscope 411, a pressure sensor 412, an optical sensor 413, and a proximity sensor 414.

[0104] Accelerometer 410 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established by electronic device 400. For example, accelerometer 410 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 401 can control display screen 405 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 410. Accelerometer 410 can also be used for games or for acquiring user motion data.

[0105] The gyroscope sensor 411 can detect the orientation and rotation angle of the electronic device 400. The gyroscope sensor 411 can work in conjunction with the accelerometer sensor 410 to collect 3D motion data from the user on the electronic device 400. Based on the data collected by the gyroscope sensor 411, the processor 401 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0106] The pressure sensor 412 can be disposed on the side bezel of the electronic device 400 and / or the lower layer of the display screen 405. When the pressure sensor 412 is disposed on the side bezel of the electronic device 400, it can detect the user's grip signal on the electronic device 400, and the processor 401 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 412. When the pressure sensor 412 is disposed on the lower layer of the display screen 405, the processor 401 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 405. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0107] Optical sensor 413 is used to collect ambient light intensity. In one embodiment, processor 401 can control the display brightness of display screen 405 based on the ambient light intensity collected by optical sensor 413. Specifically, when the ambient light intensity is high, the display brightness of display screen 405 is increased; when the ambient light intensity is low, the display brightness of display screen 405 is decreased. In another embodiment, processor 401 can also dynamically adjust the shooting parameters of camera assembly 406 based on the ambient light intensity collected by optical sensor 413.

[0108] A proximity sensor 414, also known as a distance sensor, is typically located on the front panel of an electronic device 400. The proximity sensor 414 is used to detect the distance between the user and the front of the electronic device 400. In one embodiment, when the proximity sensor 414 detects that the distance between the user and the front of the electronic device 400 is gradually decreasing, the processor 401 controls the display screen 405 to switch from a screen-on state to a screen-off state; when the proximity sensor 414 detects that the distance between the user and the front of the electronic device 400 is gradually increasing, the processor 401 controls the display screen 405 to switch from a screen-off state to a screen-on state.

[0109] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 400, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0110] This application also provides a computer-readable storage medium storing at least one computer program. This computer program is loaded and executed by a processor of an electronic device to implement the operations performed by the electronic device in the hardware testing method of the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0111] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0112] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A hardware testing method, characterized in that, The method is applied to a hardware testing system, which includes a host computer, a testing machine, a load module, and an electronic control unit (ECU) under test. When the controlled device includes a simulation board, a configuration page is displayed through a human-machine interface. The configuration page is used to configure the simulation parameters of the simulation board. The simulation parameters include the physical quantity of the virtual load simulated by the simulation board and the value of the physical quantity. The test case file is executed by the host computer. The test case file includes at least one control command that the ECU under test will send to the load module. The ECU under test is connected in series with the load module. The load module includes a physical load and a simulation board connected in parallel. The simulation board is plugged into the hardware interface of the test machine. The simulation board is used to simulate a virtual load. The control command is used to control at least one of the physical load and the simulation board. During the execution of the test case file, the test machine controls the ECU under test to send at least one control command to the load module. The host computer and the test machine transmit data via Ethernet, and the test machine and the ECU under test transmit data via CAN bus. The host computer receives the test results sent by the test machine, and the test results are used to reflect the operating status of the load module after executing the at least one control command; The test results are displayed on the host computer. The hardware testing system also includes a communication board, which is plugged into the testing machine and is used to communicate with the ECU under test via the CAN bus. The step of controlling the ECU under test to send the at least one control command to the load module via the test machine includes: during the execution of the test case file, determining the device identifier and instruction identifier included in the test case file, wherein the device identifier is used to indicate the controlled device, the controlled device includes at least one load in the load module, and the instruction identifier is used to indicate the control command to be sent to the controlled device; sending the device identifier and instruction identifier to the test machine via the Ethernet to instruct the test machine to send the device identifier and instruction identifier to the ECU under test via the communication board, wherein the ECU under test sends the at least one control command to the controlled device based on the device identifier and instruction identifier, and the controlled device is used to execute the control operation indicated by the control command upon receiving any control command; When the controlled device includes the simulation board, the test result includes a simulation signal output by the simulation board after executing the at least one control command. The simulation signal is used to represent at least one physical quantity of the virtual load, including voltage, current, resistance, temperature, and pressure. When the controlled device includes the physical load, the test result includes an electrical signal of the physical load after the execution of the at least one control command, the electrical signal representing at least one physical quantity of the physical load.

2. The method according to claim 1, characterized in that, The hardware testing system further includes a signal acquisition board, which is plugged into the testing machine. The method further includes: The electrical signals of the physical load and the simulation signals of the simulation board are acquired through the signal acquisition board. The electrical signal and the simulated signal are sent to the host computer as test results.

3. The method according to claim 1, characterized in that, The hardware testing system further includes a video acquisition device, which communicates with the host computer via the Ethernet. The method further includes: The video acquisition device is used to acquire and display the video stream containing the physical load in real time. The video stream is sent to the host computer via the video acquisition device. The video stream is played in real time via the host computer.

4. The method according to claim 1, characterized in that, The host computer includes a display screen for displaying a human-machine interface. The human-machine interface is used to write the test case file, run the simulation test software, and display the test results. The simulation test software is used to test the ECU under test by executing the test case file.

5. The method according to claim 1, characterized in that, The host computer also includes an alarm module, and the method further includes: If the test results are abnormal, an alarm will be played through the alarm module.

6. A hardware testing system, employing the hardware testing method as described in any one of claims 1 to 5, characterized in that, The system includes a host computer, a test machine, a load module, and an electronic control unit (ECU) under test. The host computer is used to execute test case files. The test case files include at least one control command that the ECU under test will send to the load module. The ECU under test is connected in series with the load module. The load module includes a physical load and a simulation board connected in parallel. The simulation board is plugged into the hardware interface of the test computer. The simulation board is used to simulate a virtual load. The control command is used to control at least one of the physical load and the simulation board. The test machine is used to control the ECU under test to send at least one control command to the load module during the execution of the test case file by the host computer. The host computer and the test machine transmit data via Ethernet, and the test machine and the ECU under test transmit data via CAN bus. The host computer is also used to receive test results sent by the test machine, the test results being used to reflect the operating status of the load module after executing the at least one control command; and to display the test results.

7. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded by the processor and executed as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store at least one computer program for performing the hardware testing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Electric automobile vehicle controller test method and system

    CN104850112A

  • Automatic load and fault injection testing system and control method

    CN108873867A