Testing device and testing method for vehicle-mounted equipment

By designing the test device of the on-board equipment, using the combination of the upper computer, communication module and fault injection module, the on-board equipment fault injection test is automated, and the existing testing methods are complex, inefficient and safety risks are solved, and the testing efficiency and safety are improved.

CN120195486APending Publication Date: 2025-06-24QINGLING MOTORS GRP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510515880.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The existing vehicle-mounted equipment fault injection test methods are complex in operation, inefficient, and have safety risks.

Method used

A test device for on-board equipment is designed, including a host computer, a communication module and a fault injection module. It generates a fault injection message by analyzing the fault injection instructions, and simulates the injection fault based on the message to realize automated testing of on-board equipment.

Benefits of technology

It improves testing efficiency and safety, reduces the risk of manual operation, and realizes the automation of on-board equipment failure injection testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120195486A_ABST
    Figure CN120195486A_ABST
Patent Text Reader

Abstract

The invention provides a testing device and a testing method for vehicle-mounted equipment, and relates to the field of vehicle testing, the device comprises an upper computer, a communication module and a fault injection module, the communication module is in communication connection with the upper computer and the fault injection module, the fault injection module is further electrically connected with the vehicle-mounted equipment to be tested, and the fault injection module is electrically connected with the vehicle-mounted equipment to be tested. The communication module is used for analyzing a received fault injection instruction sent by the upper computer into a fault injection message in a preset format and sending the fault injection message to the fault injection module, and the fault injection module is used for simulating a fault injected into the vehicle-mounted equipment to be tested according to the fault injection message. Therefore, the vehicle-mounted equipment to be tested can be tested. According to the invention, the corresponding fault can be injected into the vehicle-mounted equipment based on the instruction, so that the test automation of the vehicle-mounted equipment is realized, the fault injection can be carried out without manual operation, and the test efficiency and the test safety can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of vehicle testing, and particularly relates to a testing device and a testing method for in-vehicle equipment. Background Art

[0002] In order to ensure the safety performance of vehicles, it is particularly important to perform fault injection testing on in-vehicle equipment to verify its response speed, fault tolerance performance, and system security under various fault scenarios. Existing fault injection testing usually adopts manual operation or actual fault simulation methods, such as manually disconnecting circuits, short-circuiting wiring, etc. Although these methods can achieve partial fault simulation, there are problems such as complex operation, low fault tolerance rate of manual wiring, low testing efficiency, and safety risks caused by short circuits or high voltages in the specific implementation process. It can be seen that how to achieve the automation of in-vehicle equipment testing to improve testing efficiency and testing safety is a problem to be solved. Summary of the Invention

[0003] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a testing device and a testing method for in-vehicle equipment to solve the above problems.

[0004] To achieve the above purpose and other related purposes, the present invention provides a testing device for in-vehicle equipment, including a host computer, a communication module, and a fault injection module. The communication module is respectively communicatively connected to the host computer and the fault injection module. The fault injection module is also electrically connected to the in-vehicle equipment to be tested. The communication module is used to parse the fault injection instruction sent by the host computer into a fault injection message in a preset format and send the fault injection message to the fault injection module. The fault injection module is used to simulate and inject faults into the in-vehicle equipment to be tested according to the fault injection message, so as to test the in-vehicle equipment to be tested; The host computer includes an input unit, a configuration information determination unit, and an instruction generation unit; the input unit is used to input vehicle state parameters; various fault configuration information corresponding to different vehicle states is preset in the configuration information determination unit. The configuration information determination unit is used to determine the target vehicle state corresponding to the vehicle state parameters according to a preset rule, and determine the corresponding target fault configuration information. The various vehicle states include the target vehicle state; the instruction generation unit is used to generate the fault injection instruction according to the target fault configuration information; The fault injection module includes a program control power supply and at least one fault injection unit. All of the at least one fault injection units are electrically connected to the program control power supply, and a target injection unit among the at least one fault injection units is electrically connected to a target power interface of the vehicle-mounted device under test. The program control power supply is used to adjust the electrical parameters of the program control power supply according to the fault injection electrical parameters in the fault injection message.

[0005] Optionally, each of the at least one fault injection units includes a relay.

[0006] Optionally, the vehicle-mounted device under test is communicatively connected to the communication module to send a fault code to the communication module.

[0007] The present invention further provides a test method for a vehicle-mounted device, which is applied to the test device for the vehicle-mounted device as described above. The method includes: Inputting vehicle state parameters based on an input unit of a host computer; A configuration information determination unit of the host computer determines a target vehicle state corresponding to the vehicle state parameters according to a preset rule, and determines target fault configuration information according to the target vehicle state; An instruction generation unit of the host computer generates a fault injection instruction according to the target fault configuration information, and sends the fault injection instruction to the communication module; The communication module parses the fault injection instruction into a fault injection message in a preset format, and sends the fault injection message to the fault injection module; The fault injection module simulates injecting a fault into the vehicle-mounted device under test according to the fault injection message; The vehicle-mounted device under test executes corresponding fault handling strategies.

[0008] Optionally, the vehicle-mounted device under test is communicatively connected to the communication module. After the vehicle-mounted device under test executes the corresponding fault handling strategies, the method further includes: When a fault code is generated in the vehicle-mounted device under test, sending the fault code to the communication module; The communication module sends the fault code to the host computer.

[0009] Optionally, the method further includes: The communication module determines whether the received fault code is correct; The communication module calculates a fault passing rate according to the number of correct fault codes and the number of fault injection messages sent to the vehicle-mounted device under test; The communication module sends the fault passing rate to the host computer.

[0010] Optionally, the fault configuration information, the fault injection instruction, and the fault injection message include multiple items of information from the following: fault type, fault duration, number of faults, fault trigger mode, and fault injection electrical parameters.

[0011] Optionally, the fault injection module includes a program-controlled power supply and at least one fault injection unit. All of the at least one fault injection units are electrically connected to the program-controlled power supply, and a target injection unit among the at least one fault injection units is electrically connected to a target power interface of the vehicle-mounted device under test. The fault injection module simulates injecting a fault into the vehicle-mounted device under test according to the fault injection message, including: When the fault injection electrical parameters are included in the fault injection message, the program-controlled power supply adjusts the electrical parameters of the program-controlled power supply according to the fault injection electrical parameters.

[0012] Optionally, each of the at least one fault injection units includes a relay. The fault injection module simulating injecting a fault into the vehicle-mounted device under test according to the fault injection message further includes: The fault injection module controls the relay of the target injection unit according to the target information in the fault injection message, and the target information includes at least one of the fault type, the fault duration, the number of faults, and the fault trigger mode.

[0013] As described above, in this technical solution: The communication module is respectively communicatively connected to the upper computer and the fault injection module, and the fault injection module is also electrically connected to the vehicle-mounted device under test. Thus, the communication module can parse the fault injection instruction sent by the upper computer into a fault injection message in a preset format and send the fault injection message to the fault injection module, and the fault injection module can simulate injecting a fault into the vehicle-mounted device under test according to the fault injection message. It can be seen that this technical solution can inject corresponding faults into the vehicle-mounted device based on an instruction to realize the automation of the test of the vehicle-mounted device, without manual operation for fault injection, which is beneficial to improving the test efficiency and test safety. Description of the Drawings

[0014] Figure 1 It is a schematic structural diagram of a test device for a vehicle-mounted device in an embodiment of the present invention.

[0015] Figure 2 It is one of the flowcharts of a test method for a vehicle-mounted device in an embodiment of the present invention.

[0016] Figure 3 It is one of the schematic diagrams of a fault injection instruction and a fault injection message in an embodiment of the present invention.

[0017] Figure 4Schematic diagram II of the fault injection instruction and the fault injection message in the embodiment of the present invention.

[0018] Figure 5 Flowchart II of the test method for in-vehicle devices in the embodiment of the present invention. Detailed implementation manners

[0019] The following specific embodiments illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification.

[0020] The present invention provides a test device for in-vehicle devices, as Figure 1 shown. The device includes a host computer 1, a communication module 2, and a fault injection module 3. The communication module 2 is communicatively connected to the host computer 1 and the fault injection module 3 respectively. The fault injection module 3 is also electrically connected to the in-vehicle device 4 to be tested. The communication module 2 is configured to parse the fault injection instruction sent by the host computer 1 into a fault injection message in a preset format, and send the fault injection message to the fault injection module 3. The fault injection module 3 is configured to simulate and inject a fault into the in-vehicle device 4 to be tested according to the fault injection message, so as to test the in-vehicle device 4 to be tested.

[0021] In this embodiment, the host computer 1 can directly receive the fault configuration information input by the user, and can generate a corresponding fault injection instruction according to the fault configuration information. Alternatively, it is set that the host computer includes an input unit, a configuration information determination unit, and an instruction generation unit. The input unit is configured to input vehicle state parameters, including parameters such as temperature, altitude, humidity, vehicle age, and temperature difference. A variety of fault configuration information corresponding to different vehicle states is preset in the configuration information determination unit. The configuration information determination unit determines the target vehicle state corresponding to the vehicle state parameters according to a preset rule (the above-mentioned variety of vehicle states includes the target vehicle state), and determines the target fault configuration information according to the target vehicle state. The above-mentioned instruction generation unit can generate a corresponding fault injection instruction according to the above-mentioned target fault configuration information.

[0022] The above-mentioned preset rule is used to represent the mapping relationship between vehicle state parameters and corresponding vehicle states, and can be set based on the vehicle state parameters and corresponding prone-to-failure conditions in actual applications. For example, when the vehicle state parameters reach the condition of being prone to short circuit, the vehicle is likely to have a short circuit fault. It can be determined that the current state of the vehicle is a state prone to short circuit, and the fault configuration information corresponding to the state prone to short circuit can be further determined.

[0023] The following specifically illustrates how to determine vehicle states and fault configuration information with specific examples.

[0024] Taking the fault configuration information including four types of fault configuration information as an example, the four types of fault configuration information respectively correspond to different fault types, namely undervoltage fault, overvoltage fault, open circuit fault and short circuit fault. Each type of fault configuration information includes the fault type and the preset electrical parameters (such as voltage or current, etc.) corresponding to the fault type. In some embodiments, each type of fault configuration information may further include at least one of the following preset parameters: preset fault duration, preset number of fault occurrences, and preset fault trigger mode. The above preset parameters can be set or modified by the user based on actual needs, including after the host computer determines the fault configuration information corresponding to the vehicle state, prompting the user whether to modify the above preset parameters in the fault configuration information.

[0025] The above four types of fault configuration information are respectively the first fault configuration information (corresponding to undervoltage fault), the second fault configuration information (corresponding to overvoltage fault), the third fault configuration information (corresponding to open circuit fault), and the fourth fault configuration information (corresponding to short circuit fault).

[0026] In the case where the vehicle state parameters input by the user satisfy any one of the temperature being less than the first threshold, the altitude being greater than the second threshold, and the vehicle age being greater than the third threshold, the host computer determines that the vehicle state is the first vehicle state, and the first vehicle state corresponds to the first fault configuration information.

[0027] In the case where the vehicle state parameters input by the user satisfy any one of the temperature being greater than the fourth threshold and the vehicle age being greater than the fifth threshold, the host computer determines that the vehicle state is the second vehicle state, and the second vehicle state corresponds to the second fault configuration information, where the fourth threshold is greater than the first threshold and the fifth threshold is greater than the third threshold.

[0028] In the case where the vehicle state parameters input by the user satisfy any one of the humidity being greater than the sixth threshold, the temperature difference being greater than the seventh threshold, and the vehicle age being greater than the eighth threshold, the host computer determines that the vehicle state is the third vehicle state, and the third vehicle state corresponds to the third fault configuration information, where the eighth threshold is greater than the above fifth threshold.

[0029] In the case where the vehicle state parameters input by the user satisfy the humidity being greater than the ninth threshold, the host computer determines that the vehicle state is the fourth vehicle state, and the fourth vehicle state corresponds to the fourth fault configuration information, where the ninth threshold is greater than the above sixth threshold.

[0030] Wherein, for the convenience of user operation, a certain graphical interface of the host computer 1 can be set, and the user inputs the vehicle state parameters according to the graphical interface or directly inputs the fault configuration information.

[0031] The host computer 1 is communicatively connected to the communication module 2, and can monitor the communication module 2 and send a fault injection instruction to the communication module 2. A database is set in the communication module 2, and the received fault injection instruction can be parsed into a fault injection message in a preset format. The method of establishing a database in the communication module 2 to parse the instructions of the host computer 1 is also convenient for the subsequent expansion and management of the test device. As an example, the preset format message can be a Controller Area Network (CAN) message.

[0032] After the communication module 2 parses the received fault injection instruction into a fault injection message in a preset format, it sends the fault injection message to the fault injection module 3. The fault injection module 3 can simulate and inject faults into the to-be-tested vehicle-mounted device 4 according to the fault injection message. For example, if the fault injection message indicates that the fault type is an undervoltage fault and indicates specific voltage values and current values, etc., the fault injection module 3 can simulate the undervoltage fault according to the voltage values and current values in the fault injection message, so that the voltage signal received by the to-be-tested vehicle-mounted device 4 is an undervoltage signal, that is, an undervoltage fault signal is received. It is worth noting that the fault injection module 3 in the embodiment of the present application can simulate different types of faults according to different fault injection messages, such as undervoltage faults, overvoltage faults, open circuit faults, and short circuit faults, etc.

[0033] After the fault injection module 3 simulates and injects a fault into the vehicle-mounted device 4 under test according to the above-mentioned fault injection message, a fault signal is generated, such as an undervoltage fault signal, an overvoltage fault signal, an open-circuit fault signal, or a short-circuit fault signal, etc. The vehicle-mounted device 4 under test generates a fault code in response to the fault signal, which is fed back to the communication module 2 in the form of a CAN message, and executes the corresponding fault handling strategy. Among them, when the vehicle-mounted device 4 under test successfully responds to the fault signal sent by the fault injection module 3, a corresponding fault code will be generated; when the vehicle-mounted device 4 under test fails to successfully respond to the fault signal sent by the fault injection module 3, no corresponding fault code will be generated, or the generated fault code is not the fault code corresponding to the above-mentioned fault signal. The above-mentioned vehicle-mounted device 4 under test can be some control systems on the vehicle, such as a battery management system (Battery Management System, BMS), a motor control system, a braking system vehicle communication system, and a vehicle control unit (Vehicle Control Unit, VCU), etc. Among them, as one of the core control components of the vehicle, the VCU is responsible for integrating and scheduling each vehicle subsystem, including the above-mentioned BMS, motor control system, braking system, and vehicle communication system, etc. The VCU real-time collects the operation data of each subsystem and ensures the efficient operation of the vehicle in different driving modes and environments through comprehensive control decisions. With the improvement of the complexity of the new energy vehicle's overall system and the change of the environment, the VCU needs to cope with various potential faults from the electrical, network, and control levels, etc. Therefore, it is very necessary to conduct a fault injection test on the VCU to verify its response speed, fault tolerance performance, and system security in various fault scenarios. As Figure 2 shown, for the fault test of the vehicle-mounted VCU, the fault injection module is connected to the vehicle-mounted VCU. After the vehicle-mounted VCU receives the fault signal sent by the fault injection module, it executes the corresponding fault handling strategy and feeds back the execution status (such as feeding back the fault code) to the communication module.

[0034] In an exemplary embodiment, the above-mentioned fault configuration information includes multiple pieces of information among the following: fault type, fault duration, number of faults, fault trigger mode (whether the fault is generated periodically or by an event), and fault injection electrical parameters. Among them, the fault configuration information may include some of the above-mentioned information, so that the subsequent generated fault injection instructions and fault injection messages also include the corresponding partial information. For example, the default number of faults can be set in the fault injection module 3, and it can be set that the fault configuration information includes other information except the number of faults in the above-mentioned information. After receiving the fault injection message, the fault injection module 3 can directly perform fault simulation according to the default number of faults. The fault configuration information may also include all of the above-mentioned multiple pieces of information, so that the subsequent generated fault injection instructions and fault injection messages also include all of the above-mentioned information (see Figure 3), which is conducive to meeting diverse test requirements.

[0035] For ease of understanding, the following takes the case where the fault configuration information includes all of the above-mentioned multiple pieces of information as an example, and combines Figure 4 to illustrate the instruction parsing process between the host computer 1 and the communication module 2.

[0036] Assume that the configuration information includes an undervoltage fault as the fault type, a fault duration of 60, a fault occurrence count of 12 times, a fault trigger mode where the fault is generated by an event, a voltage of 6V and a current of 75mA in the fault injection electrical parameters. Refer to Figure 4 , after the host computer 1 obtains the above configuration information, it generates corresponding fault injection instructions. After the host computer 1 injects the fault injection instructions into the communication module 2, the communication module 2 parses it and generates Figure 4 the corresponding CAN message as shown. Among them, ID-06 in the instruction corresponds to 0x11 in the CAN message, the undervoltage fault type corresponds to 01, the 60s fault duration corresponds to 1A, the 12 fault occurrence counts correspond to 0C, the event (Event) triggered fault corresponds to 00, and the voltage and current values correspond to 09 and 10. The last 3-bit 00 byte in the CAN message is the padding bit, and 8 in the CAN message represents the Data Length Code (DLC), which is used to indicate the length of the valid data in the data frame (the valid data in the CAN message does not include the padding bit).

[0037] In an exemplary embodiment, as Figure 1 and Figure 2 shown, the above-mentioned vehicle-mounted device 4 to be tested is communicatively connected to the above-mentioned communication module 2. After the vehicle-mounted device 4 to be tested responds to the fault signal sent by the fault injection module 3 and generates a fault code, the fault code can be reported to the communication module 2, and then reported by the communication module 2 to the host computer 1. The user can obtain the fault code based on the host computer 1, or the host computer 1 can also directly send the fault code to the target terminal specified by the user.

[0038] In some embodiments, the above-mentioned communication module 2 can also collect and count the fault codes returned by the vehicle-mounted device 4 to be tested. The fault injection message count N1 and the correct fault code count N2 successfully returned are statistically calculated using the formula: K = N2 / N1 × 100% to obtain the fault pass rate K, which is used to indicate the effectiveness of the fault injection message. As Figure 3 and Figure 4As shown, after calculation and analysis, the communication module 2 feeds back the fault passing rate to the host computer 1, facilitating testers to adjust the fault injection instruction in a timely manner according to the fault passing rate K. Among them, the above-mentioned correct fault code refers to the fault code generated when the to-be-tested vehicle-mounted device 4 successfully responds to the fault signal sent by the fault injection module 3. Among them, the correct fault code corresponding to the fault message can be preset in the communication module 2, and by comparing the fault code returned by the to-be-tested vehicle-mounted device 4 with the corresponding correct fault code, the number of correct fault codes returned by the to-be-tested vehicle-mounted device 4 can be determined.

[0039] In the embodiment of the present application, the host computer 1 can give an alarm based on the fault passing rate reported by the communication module. The following is a specific description thereof.

[0040] Preset N fault injection levels (N is an integer greater than 1), and set a corresponding fault passing rate threshold for each fault injection level. The higher the fault injection level, the higher the fault passing rate threshold. After the host computer determines the target fault configuration information, it determines the target fault level corresponding to the target fault configuration information from the preset N fault levels; after the host computer receives the target fault passing rate sent by the communication module (the target fault passing rate is the fault passing rate corresponding to the target fault configuration information), it determines whether the target fault passing rate is less than the target fault passing rate threshold corresponding to the target fault level; in the case where the target fault passing rate is less than the target fault passing rate threshold, an alarm is given. Among them, the above-mentioned target fault level can be directly input by the user; or, the host computer directly determines the target fault level based on the frequency of occurrence of the fault type of the target configuration information in actual production. The higher the frequency of occurrence of the fault type in actual production, the higher the fault level.

[0041] In an exemplary embodiment, the fault injection module 3 includes a program control power supply and at least one fault injection unit. The at least one fault injection unit is electrically connected to the program control power supply, and the target injection unit in the at least one fault injection unit is electrically connected to the target power interface of the to-be-tested vehicle-mounted device 4. The program control power supply is used to adjust the electrical parameters of the program control power supply according to the fault injection electrical parameters in the fault injection message.

[0042] In this embodiment, the fault injection module 3 includes at least one fault injection unit, and each fault injection unit can be used to be electrically connected to a power interface of a vehicle-mounted device 4 to be tested. When it is necessary to test multiple vehicle-mounted devices, different fault injection units can be respectively electrically connected to different vehicle-mounted devices. When a vehicle-mounted device has multiple interfaces, different fault injection units can also be connected to different interfaces of the vehicle-mounted device. The target power interface of the vehicle-mounted device 4 to be tested in the embodiment of the present application can be one or multiple. By adjusting the state of the target injection unit and the electrical parameters of the program-controlled power supply, faults can be simulated, including overvoltage, undervoltage, open circuit, short circuit and other fault simulations. For example, when it is necessary to simulate an overvoltage fault, the voltage in the fault injection electrical parameters in the fault injection message is an overvoltage parameter (such as 8V, etc.), the program-controlled power supply supplies power according to the overvoltage parameter, and the target injection unit closes, so as to realize the overvoltage fault simulation. Among them, the target injection unit can be any fault injection unit in the fault injection module 3. It is worth noting that when the fault injection module 3 includes multiple fault injection units and there is a fault injection unit that is not put into the test, that is, not connected to the vehicle-mounted device, it can be set to an open circuit state.

[0043] In an exemplary embodiment, each of the at least one fault injection unit includes a relay.

[0044] In this embodiment, each fault injection unit includes a relay, and by controlling the relay, the corresponding fault injection unit can be controlled to be disconnected, closed and short-circuited.

[0045] In some embodiments, the fault injection message includes a fault type, a fault duration, a fault number, a fault trigger mode, and fault injection electrical parameters. The fault injection module 3 simulates and injects the fault of the vehicle-mounted device 4 to be tested according to the fault injection message, that is, includes controlling the program-controlled power supply according to the fault injection electrical parameters, and controlling the relay in the corresponding fault injection unit according to the fault type (overvoltage, undervoltage, open circuit or short circuit and other fault types), fault duration, fault number, and fault trigger mode.

[0046] See Figure 5 For a test method of a vehicle-mounted device in the present application, which is applied to the test device of the vehicle-mounted device in the above embodiment, as Figure 5 shown, the method includes the following steps: S501. Input vehicle state parameters based on the input unit of the host computer; S502. The configuration information determination unit of the host computer determines the target vehicle state corresponding to the vehicle state parameters according to a preset rule, and determines the target fault configuration information according to the target vehicle state; S503. The instruction generation unit of the host computer generates a fault injection instruction according to the target fault configuration information and sends the fault injection instruction to the communication module; S504. The communication module parses the fault injection instruction into a fault injection message in a preset format and sends the fault injection message to the fault injection module; S505. The fault injection module simulates and injects a fault into the vehicle-mounted device under test according to the fault injection message; S506. The vehicle-mounted device under test executes corresponding fault handling strategies.

[0047] Optionally, the vehicle-mounted device under test is communicatively connected to the communication module. After the vehicle-mounted device under test executes the corresponding fault handling strategy, the method further includes: When a fault code is generated in the vehicle-mounted device under test, sending the fault code to the communication module; The communication module sends the fault code to the host computer.

[0048] Optionally, the method further includes: The communication module determines whether the received fault code is correct; The communication module calculates a fault passing rate according to the number of correct fault codes and the number of fault injection messages sent to the vehicle-mounted device under test; The communication module sends the fault passing rate to the host computer.

[0049] Optionally, the fault configuration information, the fault injection instruction, and the fault injection message include multiple items of information from the following: fault type, fault duration, number of faults, fault trigger mode, and fault injection electrical parameters.

[0050] Optionally, the fault injection module includes a program-controlled power supply and at least one fault injection unit. All of the at least one fault injection units are electrically connected to the program-controlled power supply, and a target injection unit among the at least one fault injection units is electrically connected to a target power interface of the vehicle-mounted device under test. The fault injection module simulates and injects a fault into the vehicle-mounted device under test according to the fault injection message, including: When the fault injection message includes the fault injection electrical parameters, the program-controlled power supply adjusts the electrical parameters of the program-controlled power supply according to the fault injection electrical parameters.

[0051] Optionally, each of the at least one fault injection units includes a relay. When the fault injection module simulates and injects a fault into the vehicle-mounted device under test, the method further includes: The fault injection module controls the relay of the target injection unit according to the target information in the fault injection message, where the target information includes at least one of the fault type, the fault duration, the number of faults, and the fault trigger mode.

[0052] It is worth noting that the test method for the in-vehicle device provided in the above embodiment and the test device for the in-vehicle device provided in the above embodiment belong to the same concept. The specific implementation manners have been described in detail in the system embodiment and will not be elaborated here.

[0053] The above embodiments are only illustrative of the principles and effects of the present invention and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A testing device for vehicle-mounted equipment, characterized in that: It includes a host computer, a communication module and a fault injection module, wherein the communication module is respectively connected to the host computer and the fault injection module for communication, and the fault injection module is also electrically connected to the vehicle-mounted device to be tested, and the communication module is used to parse the fault injection instruction sent by the host computer into a fault injection message of a preset format, and send the fault injection message to the fault injection module, and the fault injection module is used to simulate the injection of the fault of the vehicle-mounted device to be tested according to the fault injection message, so as to test the vehicle-mounted device to be tested; The host computer includes an input unit, a configuration information determination unit and an instruction generation unit; the input unit is used to input vehicle state parameters; The configuration information determination unit is preset with fault configuration information corresponding to a plurality of vehicle states, and the configuration information determination unit is used to determine a target vehicle state corresponding to the vehicle state parameter according to a preset rule, and to determine the corresponding target fault configuration information, wherein the plurality of vehicle states include the target vehicle state; the instruction generation unit is used to generate the fault injection instruction according to the target fault configuration information; The fault injection module includes a program-controlled power supply and at least one fault injection unit, wherein the at least one fault injection unit is electrically connected to the program-controlled power supply, and a target injection unit in the at least one fault injection unit is electrically connected to a target power supply interface of the vehicle-mounted device to be tested, and the program-controlled power supply is used to adjust the electrical parameters of the program-controlled power supply according to the fault injection electrical parameters in the fault injection message.

2. The vehicle-mounted equipment testing device according to claim 1, characterized in that: Each of the at least one fault injection unit comprises a relay.

3. The vehicle-mounted equipment testing device according to claim 1 or 2, characterized in that: The vehicle-mounted device to be tested is communicatively connected to the communication module to send a fault code to the communication module.

4. A method for testing an on-vehicle device, applied to the on-vehicle device testing device according to any one of claims 1 to 3, characterized in that: The method comprises: Inputting vehicle status parameters based on the input unit of the host computer; The configuration information determination unit of the host computer determines the target vehicle state corresponding to the vehicle state parameter according to a preset rule, and determines the target fault configuration information according to the target vehicle state; The instruction generation unit of the host computer generates a fault injection instruction according to the target fault configuration information, and sends the fault injection instruction to the communication module; The communication module parses the fault injection instruction into a fault injection message in a preset format, and sends the fault injection message to the fault injection module; The fault injection module simulates the fault of the vehicle-mounted device to be tested according to the fault injection message; The vehicle-mounted device to be tested executes a corresponding fault handling strategy.

5. The vehicle-mounted device testing method according to claim 4, characterized in that: The vehicle-mounted device to be tested is communicatively connected with the communication module, and after the vehicle-mounted device to be tested executes a corresponding fault handling strategy, the method further includes: When a fault code is generated in the vehicle-mounted device to be tested, sending the fault code to the communication module; The communication module sends the fault code to the host computer.

6. The vehicle-mounted device testing method according to claim 5, characterized in that: The method further comprises: The communication module determines whether the received fault code is correct; The communication module calculates the fault pass rate according to the number of correct fault codes and the number of fault injection messages sent to the vehicle-mounted device to be tested; The communication module sends the fault passing rate to the host computer.

7. The vehicle-mounted device testing method according to claim 4, characterized in that: The fault configuration information, the fault injection instruction and the fault injection message include multiple items of the following information: fault type, fault duration, number of faults, fault triggering mode and fault injection electrical parameters.

8. The vehicle-mounted device testing method according to claim 7, characterized in that: The fault injection module includes a program-controlled power supply and at least one fault injection unit, the at least one fault injection unit is electrically connected to the program-controlled power supply, and a target injection unit in the at least one fault injection unit is electrically connected to a target power interface of the vehicle-mounted device to be tested, and the fault injection module simulates the injection of a fault of the vehicle-mounted device to be tested according to the fault injection message, including: In a case where the fault injection message includes the fault injection electrical parameter, the program-controlled power supply adjusts the electrical parameter of the program-controlled power supply according to the fault injection electrical parameter.

9. The vehicle-mounted device testing method according to claim 8, characterized in that: Each of the at least one fault injection unit comprises a relay, and the fault injection module simulates the injection of the fault of the vehicle-mounted device to be tested according to the fault injection message, and further comprises: The fault injection module controls the relay of the target injection unit according to the target information in the fault injection message, wherein the target information includes at least one of the fault type, the fault duration, the fault number and the fault trigger mode.