Vehicle fault identification function test method and device, electronic equipment and storage medium
By generating a fault identification information table and test sequence, the fault identification function of hybrid vehicles is automatically tested, solving the problem of low efficiency caused by relying on manual testing in existing technologies, and realizing efficient and accurate fault identification testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-03-17
AI Technical Summary
In the existing technology, the fault identification function test of hybrid vehicles relies on manual labor, which is inefficient and prone to false alarms or missed alarms, leading to safety hazards.
By generating fault identification information tables and test sequences, the vehicle controller is tested automatically, including fault injection and recovery, and test reports are generated, reducing human intervention.
The automated testing of vehicle fault identification function has been implemented, which has improved testing efficiency, reduced labor costs, avoided human error, and ensured the rigor and smoothness of the testing process.
Smart Images

Figure CN119087983B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle testing technology, and in particular to a vehicle fault identification function testing method and apparatus, electronic equipment and storage medium. Background Technology
[0002] In related technical fields, hybrid vehicles typically possess fault identification capabilities. Fault diagnosis via the vehicle controller ensures the safety and reliability of hybrid vehicles. However, if the fault identification function fails, it can lead to false or missed fault reports, potentially causing unintended fault handling, rendering the vehicle undrivable, or resulting in accidents due to delayed fault intervention. Therefore, testing the vehicle's fault identification function is crucial. Summary of the Invention
[0003] The main objective of this application is to provide a vehicle fault identification function testing method and device, electronic device and storage medium, which can automate the testing process of vehicle fault identification function, save labor costs and maintain high efficiency.
[0004] To achieve the above objectives, one aspect of this application proposes a vehicle fault identification function testing method, the method comprising:
[0005] Generate a fault identification information table, which includes multiple fault categories;
[0006] Generate a test sequence corresponding to each fault category based on the fault identification information table;
[0007] The test program is run based on the test sequence to test the controller of the vehicle under test and generate a fault identification function test report.
[0008] In some embodiments, the test sequence includes multiple test steps;
[0009] The step of running a test program based on the test sequence to test the controller of the vehicle under test and generating a fault identification function test report includes:
[0010] Each test step is executed in a preset order to run the test program and obtain test result parameters;
[0011] The test result parameters are compared with the expected result parameters to determine the test result;
[0012] A test report on the fault identification function is generated based on the test results.
[0013] In some embodiments, the step of executing each test step according to a preset order to run the test program and obtain test result parameters includes:
[0014] The fault identification requirement information is retrieved from the fault identification information table. The fault identification requirement information includes fault injection conditions, fault recovery conditions, and fault parameters.
[0015] When the current state of the test program is detected to meet the fault injection conditions, fault injection processing is performed based on the fault parameters to construct a simulated fault scenario;
[0016] Obtain feedback information from the vehicle controller under test during the simulated fault scenario.
[0017] When the current state of the test program is detected to meet the fault recovery conditions, the vehicle controller under test is stopped from running in the simulated fault scenario, and the test result parameters are generated based on the feedback information.
[0018] In some embodiments, the fault parameters include sensor unit fault values, battery management unit fault values, controller unit fault values, and communication unit fault values;
[0019] The vehicle controller under test includes multiple control pins;
[0020] When the current state of the test program is detected to meet the fault injection condition, fault injection processing is performed based on the fault parameters to construct a simulated fault scenario, including:
[0021] When the current state of the test program is detected to meet the fault injection condition, the fault values of the sensor unit, the battery management unit, the controller unit, and the communication unit are respectively input to the target control pin of the vehicle controller under test, so as to control the vehicle controller under test to be in a state of processing fault signals and running in the simulated fault scenario.
[0022] In some embodiments, comparing the test result parameters with the expected result parameters to determine the test result includes:
[0023] When the fault diagnosis function of the vehicle controller under test is enabled, the fault diagnosis information of the vehicle controller under test is obtained and used as the test result parameter.
[0024] The fault diagnosis information is compared with the expected fault diagnosis information, which is used as the expected result parameter, to determine the first test result.
[0025] In some embodiments, comparing the test result parameters with the expected result parameters to determine the test result includes:
[0026] When the vehicle's cooling system is controlled by the vehicle controller under test, the actual status flag value of the cooling system is obtained and used as the test result parameter;
[0027] The actual state flag value of the cooling system is compared with the expected state flag value, which is the expected result parameter, to determine the second test result.
[0028] In some embodiments, comparing the test result parameters with the expected result parameters to determine the test result includes:
[0029] When the fault trigger flag information fed back by the controller of the vehicle under test is obtained, the actual fault injection threshold is obtained;
[0030] The actual fault injection threshold is compared with a preset threshold to determine the third test result;
[0031] When the fault confirmation flag information fed back by the vehicle controller under test is obtained, if the fault code fed back by the vehicle controller under test is detected, it is determined that the fault code storage function of the vehicle controller under test is in a qualified state.
[0032] When the fault code is obtained, the test time value is compared with the preset time value to determine the fourth test result, wherein the test time value is the difference between the time point when the fault trigger flag information is obtained and the time point when the fault confirmation flag information is obtained.
[0033] To achieve the above objectives, another aspect of this application provides a vehicle fault identification function testing device, the device comprising:
[0034] The first generation module is used to generate a fault identification information table, which includes multiple fault categories.
[0035] The second generation module is used to generate a test sequence corresponding to each fault category based on the fault identification information table.
[0036] The test module is used to run test programs based on the test sequence to test the controller of the vehicle under test and generate a fault identification function test report.
[0037] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0038] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0039] The embodiments of this application include at least the following beneficial effects: This application provides a vehicle fault identification function testing method and device, electronic device and storage medium. First, this solution records abstract fault identification requirements through specific numerical and textual requirements by generating a fault identification information table, which is conducive to carrying out digital and automated testing processes. Second, by generating test sequences and defining the logic and order of the test process, it is beneficial to improve the rigor and smoothness of the test program. Finally, by testing the controller of the vehicle under test through the test program, the intelligent and automated testing process is realized, reducing the steps of manual intervention in the entire vehicle controller testing process, avoiding human error in the tedious and complex testing process, and helping to reduce labor costs while improving the efficiency of testing the controller of the vehicle under test. Attached Figure Description
[0040] Figure 1 This is a flowchart of a vehicle fault identification function testing method provided in an embodiment of this application;
[0041] Figure 2 yes Figure 1 The flowchart of step S103 in the process;
[0042] Figure 3 yes Figure 2 The flowchart of step S201 in the text;
[0043] Figure 4 This is a schematic diagram of the HCU (Hybrid Control Unit) of a hybrid vehicle in an application scenario of a vehicle fault identification function test method.
[0044] Figure 5 This is a schematic diagram of the structure of a vehicle fault identification function testing device provided in an embodiment of this application;
[0045] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0047] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0048] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0050] Understandably, fault diagnosis of the vehicle controller is a crucial guarantee for the safety and reliability of hybrid vehicles. However, if the fault identification function fails, it can lead to false alarms or missed faults, either causing unexpected fault handling that renders the vehicle undrivable, or resulting in a safety accident due to the failure to take timely fault handling measures. Therefore, it is essential to conduct thorough testing of the fault identification function during the development phase, making the development of a comprehensive fault identification method and device for hybrid vehicles particularly important.
[0051] Traditional vehicle fault identification function testing methods, which involve multiple aspects such as fault identification, fault confirmation, and fault recovery, not only rely heavily on the skills of testers and have low testing efficiency, but also either focus on the development of fault identification functions without involving automated testing, or focus on testing controller diagnostic services and fault handling functions without mentioning fault identification testing. To meet the need for testing fault identification functions, this application provides the following embodiments that enable the automation of the vehicle fault identification function testing process, saving labor costs while maintaining high efficiency.
[0052] Please refer to Figure 1 , Figure 1 This is a flowchart of a vehicle fault identification function testing method provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S103.
[0053] S101. Generate a fault identification information table, which includes multiple fault categories.
[0054] S102. Generate the test sequence corresponding to each fault category based on the fault identification information table.
[0055] S103. Run the test program based on the test sequence to test the controller of the vehicle under test and generate a fault identification function test report.
[0056] In this embodiment, firstly, the solution generates a fault identification information table, recording abstract fault identification requirements through specific numerical and textual information, which facilitates a digital and automated testing process. Secondly, by generating a test sequence, the logic and order of the testing process are defined, which improves the rigor and fluency of the testing procedure. Finally, the test procedure is used to test the controller of the vehicle under test, realizing the intelligent and automated testing process, reducing the number of manual steps in the entire vehicle controller testing process, avoiding human error in tedious and complex testing processes, reducing labor costs, and improving the efficiency of testing the controller of the vehicle under test.
[0057] In step S101 of some embodiments, the fault identification requirements are described in tabular form, mainly including the preconditions for fault identification, fault judgment threshold, fault confirmation time, preconditions for fault recovery, fault recovery judgment threshold, fault recovery time, and other factors. For example, in a specific embodiment, the fault identification information table is shown in Table 1.
[0058] Table 1 - Fault Identification Information Table
[0059]
[0060] In step S102 of some embodiments, the test sequence mainly includes setting the preconditions for fault identification, injecting a fault, setting the preconditions for fault recovery, and clearing the fault. For example, in a specific embodiment, when testing whether the fault identification function of the vehicle can successfully detect fault Error1, the fault code, fault identification preconditions, fault judgment threshold, fault confirmation time, fault recovery preconditions, fault recovery judgment threshold, and fault recovery time related to fault Error1 are called in the fault identification information table, and a test sequence is generated based on this. The test sequence includes multiple test steps, and the execution order of each test step is set. Through the test sequence, it can be ensured that the test is performed according to the predetermined logic and order.
[0061] In step S103 of some embodiments, a fault identification function test is performed according to a test sequence, including fault identification, fault confirmation, fault recovery, and fault code storage. The test results are analyzed to determine whether the vehicle's fault identification function has passed the test. In some embodiments, when performing the fault identification test according to the test sequence, the fault identification test includes multiple steps, and each step in the fault identification test is completed according to the preset execution order of the steps in the test sequence.
[0062] Figure 2 yes Figure 1 The flowchart for step S103.
[0063] In some embodiments, step S103 includes:
[0064] S201. Execute each test step according to the preset order to run the test program and obtain the test result parameters.
[0065] S202. Compare the test result parameters with the expected result parameters to determine the test result.
[0066] S203. Based on the test results, generate a fault identification function test report.
[0067] In this embodiment, test reports are generated to visualize the test results, making it easier for users to obtain test result information. Furthermore, by comparing the test result parameters with the expected result parameters to determine the test results, users can easily analyze the test results.
[0068] Figure 3 yes Figure 2 The flowchart of step S201.
[0069] In some embodiments, step S201 includes:
[0070] S301. Retrieve fault identification requirement information from the fault identification information table. The fault identification requirement information includes fault injection conditions, fault recovery conditions, and fault parameters.
[0071] S302. When the current state of the test program is detected to meet the fault injection conditions, fault injection processing is performed based on the fault parameters to construct a simulated fault scenario.
[0072] S303. Obtain feedback information from the vehicle controller under test when it is running in a simulated fault scenario.
[0073] S304. When the current state of the test program is detected to meet the fault recovery conditions, the controller of the vehicle under test is stopped from running in the simulated fault scenario, and test result parameters are generated based on the feedback information.
[0074] In some embodiments, the fault parameters include sensor unit fault values, battery management unit fault values, controller unit fault values, and communication unit fault values; the vehicle controller under test includes multiple control pins.
[0075] In some embodiments, step S302 includes:
[0076] When the current state of the test program is detected to meet the fault injection conditions, the fault values of the sensor unit, battery management unit, controller unit, and communication unit are respectively input to the target control pin of the vehicle controller under test, so as to control the vehicle controller under test to be in a state of processing fault signals and running in a simulated fault scenario.
[0077] In step S302 of some embodiments, the fault injection does not directly create the relevant fault. Instead, it constructs a simulated fault scenario by changing the voltage of the input / output pins of the vehicle controller HCU, changing the state of the communication messages of the MCU (microcontroller unit) / BMS (battery management system) / EMS (energy management system) in the vehicle system, changing the state of the vehicle controller HCU receiving fault signals, changing the state of the communication messages of the PTC (heater switch) / charging indicator in the vehicle system, and changing the actual power supply environment of the vehicle controller HCU. This is to further test the fault judgment threshold by simulating real fault conditions.
[0078] This embodiment tests the vehicle controller under simulated fault scenarios. Compared to creating faults for the vehicle controller to identify, this embodiment improves safety and testing efficiency. Fault values from the sensor unit, battery management unit, controller unit, and communication unit are input to the target control pins of the vehicle controller under test. This controls the controller to process fault signals, maximizing the simulation of the fault scenario and ensuring high testing efficiency. Simultaneously, it tests the vehicle controller's comprehensive fault identification capabilities, ensuring the validity of the test.
[0079] In some embodiments, step S202 includes:
[0080] When the fault diagnosis function of the vehicle controller under test is enabled, the fault diagnosis information of the vehicle controller under test is acquired and used as the test result parameter, and the fault diagnosis information is compared with the expected fault diagnosis information used as the expected result parameter to determine the first test result.
[0081] In some embodiments, step S202 includes:
[0082] When the vehicle's cooling system is controlled by the vehicle controller under test, the actual state flag value of the cooling system is obtained and used as the test result parameter. The actual state flag value of the cooling system is then compared with the expected state flag value used as the expected result parameter to determine the second test result.
[0083] In some embodiments, step S202 includes:
[0084] When the fault trigger flag information fed back by the controller of the vehicle under test is obtained, the actual fault injection threshold is obtained and compared with the preset threshold to determine the third test result.
[0085] When the fault confirmation flag information fed back by the controller of the vehicle under test is obtained, if the fault code fed back by the controller of the vehicle under test is detected, the fault code storage function of the controller of the vehicle under test is determined to be in a qualified state; if no fault code fed back by the controller of the vehicle under test is detected, the fault code storage function of the controller of the vehicle under test is determined to be in a unqualified state.
[0086] When a fault code is obtained, the test time value is compared with the preset time value to determine the fourth test result. The test time value is the difference between the time when the fault trigger flag information is obtained and the time when the fault confirmation flag information is obtained.
[0087] Understandably, when the fault trigger flag is in the position, if the actual fault injection threshold is consistent with the preset threshold, it means that the fault judgment threshold test has passed, and the third test result is output. When the fault confirmation flag is in the position, if the fault code can be read immediately, it means that the fault code storage function test has passed. When the fault code is read, if the time difference between the fault trigger flag and the fault confirmation flag is consistent with the expected fault confirmation time, it means that the fault confirmation time test has passed, and the fourth test result is output.
[0088] It is understood that this embodiment comprehensively tests the fault identification function of the vehicle controller by testing its functions such as fault identification, fault confirmation, fault recovery, and fault code storage.
[0089] This application also provides a specific embodiment of the application of the vehicle fault identification function test method in a specific scenario. In this embodiment, although the test object of the vehicle fault identification function test method is the hybrid vehicle control system (HCU), the automatic test method and device are also applicable to other vehicle controllers. They can be adapted simply by optimizing the fault identification requirement table and test environment model according to the actual situation.
[0090] Figure 4 This is a schematic diagram of the HCU (Hybrid Vehicle Control Unit) in a vehicle fault identification function testing scenario.
[0091] The Hybrid Vehicle Control Unit (HCU) is primarily responsible for recognizing driver input (accelerator pedal, brake pedal, gear position information), calculating the driver's required torque, and receiving relevant component and fault information from controllers of the engine, drive motor, generator, and battery via CAN communication. It then sends control commands to these controllers, coordinating the orderly operation of all components to achieve hybrid drive and regenerative braking functions. In the event of a fault, it ensures the vehicle operates safely and reliably according to the driver's needs. The HCU also controls the operation of the motor water pump, battery water pump, heater water pump, and water valves to ensure the normal operation of the vehicle's cooling system. When the motor water pump, battery water pump, or heater water pump malfunctions, it sends feedback to the HCU by pulling down the PWM control pin, allowing the HCU to diagnose the fault. Therefore, the HCU's fault identification functions mainly include sensor fault identification, I / O control fault identification, CAN communication fault identification, LIN communication fault identification, assembly fault identification, and its own fault identification.
[0092] The fault identification function of the vehicle control unit (HCU) was tested using a vehicle fault identification function test method. First, the fault identification requirements were described in tabular form, including the preconditions for fault identification, fault judgment threshold, fault confirmation time, preconditions for fault recovery, fault recovery judgment threshold, and fault recovery time. A test sequence was automatically generated based on the fault identification requirements table, defining the order of test execution to ensure the tests proceeded according to the predetermined logic and sequence. Second, diagnostic service tests were performed sequentially according to the test sequence, including establishing communication, reading HCU controller information, writing controller-related information, reading fault information, and stopping communication. The success of the test was determined by collecting diagnostic information from the HCU. Next, the control functions of the HCU components were tested, mainly including sending requests to the HCU via 2F services, the HCU responding to the requests and controlling the water pump, fan, water valve, and charging indicator light to the expected state, and confirming the actual state of the HCU-controlled components via 22 services to determine the success of the test. Finally, faults such as sensor faults, IO faults, PWM interface faults, CAN communication faults, and LIN communication faults are injected sequentially through the fault injection module. Fault information is read via service 19 and cleared via service 14 to determine if the test passes. This testing method comprehensively tests the HCU's diagnostic services, fault identification and off-line component control, fault identification, fault code storage, and fault code clearing functions, effectively ensuring the correctness of the HCU's fault identification function.
[0093] Please see Figure 5 This application also provides a vehicle fault identification function testing device, which can implement the above-mentioned vehicle fault identification function testing method. The device includes:
[0094] The first generation module 401 is used to generate a fault identification information table, which includes multiple fault categories.
[0095] The second generation module 402 is used to generate the test sequence corresponding to each fault category.
[0096] Test module 403 is used to run test programs based on test sequences to test the controller of the vehicle under test and generate a fault identification function test report.
[0097] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0098] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described vehicle fault identification function testing method. This electronic device can be any smart terminal, including a tablet computer, an in-vehicle computer, or similar device.
[0099] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0100] Please see Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0101] The processor 501 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0102] The memory 502 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 502 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 502 and is called and executed by the processor 501 to execute the vehicle fault identification function test method of the embodiments of this application.
[0103] The input / output interface 503 is used to implement information input and output;
[0104] The communication interface 504 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0105] Bus 505 transmits information between various components of the device (e.g., processor 501, memory 502, input / output interface 503, and communication interface 504);
[0106] The processor 501, memory 502, input / output interface 503, and communication interface 504 are connected to each other within the device via bus 505.
[0107] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described vehicle fault identification function test method.
[0108] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0109] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0110] The vehicle fault identification function testing method, device, electronic equipment, and storage medium provided in this application embodiment firstly record abstract fault identification requirements through specific numerical and textual information by generating a fault identification information table, which facilitates a digital and automated testing process. Secondly, by generating a test sequence and defining the logic and order of the testing process, the rigor and smoothness of the testing procedure are improved. Finally, the test procedure is used to test the controller of the vehicle under test, realizing the intelligent and automated testing process, reducing the number of manual steps in the entire vehicle controller testing process, avoiding human error in tedious and complex testing processes, reducing labor costs, and improving the efficiency of testing the controller of the vehicle under test.
[0111] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0112] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0113] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0114] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0115] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0116] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0117] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method of testing a vehicle malfunction identification function, characterized by, The method comprises: generating a fault identification information table, the fault identification information table comprising a plurality of fault categories; generating a test sequence corresponding to each of the fault categories according to the fault identification information table, wherein the test sequence comprises a plurality of test steps; executing each of the test steps according to a preset sequence to run a test program and obtain a test result parameter; comparing the test result parameter with an expected result parameter to determine a test result; generating a fault identification function test report based on the test result; the step of comparing the test result parameter with an expected result parameter to determine a test result comprises: obtaining an actual state flag value of a cooling system of the vehicle when the cooling system is controlled by a vehicle controller of the vehicle to be tested and taking the actual state flag value as the test result parameter; comparing the actual state flag value of the cooling system with an expected state flag value as the expected result parameter to determine a second test result.
2. The method of claim 1, wherein, the step of executing each of the test steps according to a preset sequence to run the test program and obtain a test result parameter comprises: calling fault identification requirement information from the fault identification information table, the fault identification requirement information comprising a fault injection condition, a fault recovery condition and a fault parameter; when it is detected that a current state of the test program meets the fault injection condition, performing a fault injection process based on the fault parameter to construct a simulated fault scenario; obtaining feedback information of the vehicle controller to be tested when the vehicle controller to be tested runs in the simulated fault scenario; when it is detected that a current state of the test program meets the fault recovery condition, stopping the vehicle controller to be tested from running in the simulated fault scenario, and generating the test result parameter based on the feedback information.
3. The method of claim 2, wherein, the fault parameter comprises a sensor unit fault value, a battery management unit fault value, a controller unit fault value and a communication unit fault value; the vehicle controller to be tested comprises a plurality of control pins; the step of performing a fault injection process based on the fault parameter to construct a simulated fault scenario when it is detected that a current state of the test program meets the fault injection condition comprises: when it is detected that a current state of the test program meets the fault injection condition, inputting the sensor unit fault value, the battery management unit fault value, the controller unit fault value and the communication unit fault value into target control pins of the vehicle controller to be tested respectively to control the vehicle controller to be tested to be in a state of processing a fault signal and run in the simulated fault scenario.
4. The method of claim 1, wherein, the step of comparing the test result parameter with an expected result parameter to determine a test result comprises: when a fault diagnosis function of the vehicle controller to be tested is in an enabled state, obtaining fault diagnosis information of the vehicle controller to be tested and taking the fault diagnosis information as the test result parameter; comparing the fault diagnosis information with expected fault diagnosis information as the expected result parameter to determine a first test result.
5. The method of claim 1, wherein, the step of comparing the test result parameter with an expected result parameter to determine a test result comprises: acquire an actual fault injection threshold value when the fault trigger flag information fed back by the vehicle controller to be tested is acquired; compare the actual fault injection threshold value with a preset threshold value to determine a third test result; acquire fault confirmation flag information fed back by the vehicle controller to be tested, and determine that the fault code storage function of the vehicle controller to be tested is in a qualified state if the fault code fed back by the vehicle controller to be tested is detected; compare a test time value with a preset time value to determine a fourth test result when the fault code is acquired, wherein the test time value is a difference between a time point at which the fault trigger flag information is acquired and a time point at which the fault confirmation flag information is acquired.
6. A vehicle malfunction identification function testing apparatus characterized by comprising: The device comprises: a first generation module configured to generate a fault identification information table, the fault identification information table comprising a plurality of fault categories; a second generation module configured to generate a test sequence corresponding to each of the fault categories according to the fault identification information table, wherein the test sequence comprises a plurality of test steps; a test module configured to execute each of the test steps according to a preset order to run a test program and acquire a test result parameter; compare the test result parameter with an expected result parameter to determine a test result; generate a fault identification function test report based on the test result; the comparison of the test result parameter with the expected result parameter to determine the test result comprises: acquire an actual state flag value of a cooling system of the vehicle when the cooling system of the vehicle is controlled by the vehicle controller to be tested, and use the actual state flag value as the test result parameter; compare the actual state flag value of the cooling system with an expected state flag value as the expected result parameter to determine a second test result.
7. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Vehicle controller test system and method, electronic equipment and readable storage medium
CN114690741A