State control method of vehicle control system, processor and electronic equipment
By acquiring the target time and state identification information and generating a state trigger strategy, the problem of low state control efficiency of the vehicle control system is solved, and efficient state switching and fault testing are achieved.
Patent Information
- Application Number
- CN202510819524.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-03
AI Technical Summary
In the prior art, the state control efficiency of the vehicle control system is low and cannot effectively meet the detection time and processing requirements of different fault types, resulting in a waste of testing time.
By acquiring the target time information and state identification information of the vehicle control system, a flexible state triggering strategy is generated to dynamically control the vehicle control system to enter and exit the target state, avoiding the inefficient method of fixed time.
The state control efficiency of the vehicle control system is improved, unnecessary waiting time is reduced, and more efficient state switching and fault testing are achieved.
Smart Images

Figure CN120742838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle electronic testing, and in particular to a state control method, a processor, and an electronic device for a vehicle control system. Background Art
[0002] With the rapid development of intelligent and electrified vehicles, vehicle control systems are becoming increasingly complex and sophisticated, encompassing numerous subsystems, from powertrain management and battery monitoring to safety and infotainment systems. The efficient operation of these vehicle control systems relies on software stability and timely response to unexpected faults. Therefore, thorough and effective software functional testing, especially fault injection testing, is crucial.
[0003] In related technologies, state control (e.g., fault injection) and fault testing of vehicle control systems employ pre-set, fixed-duration fault simulation methods. These methods typically set a uniform fault duration, for example, ensuring that all fault detection and handling procedures are performed within the same timeframe, thereby simplifying the testing process.
[0004] However, the detection time, impact range, and processing requirements of different fault types vary greatly. For example, battery thermal faults, due to the temperature accumulation and heat dissipation process, often require a long time to be detected and appropriate measures to be taken; while some transient faults (such as instantaneous communication interruption, short-term voltage fluctuation, etc.) can be identified and handled in just a few seconds or even less. If a fixed fault duration is used for testing, then for those faults that are triggered quickly and can be detected immediately, long waits are actually unnecessary and waste testing time. Therefore, the technical problem of low state control efficiency of vehicle control systems still exists.
[0005] Currently, no effective solutions have been proposed for the above technical problems. Summary of the Invention
[0006] Embodiments of the present invention provide a state control method, a processor, and an electronic device for a vehicle control system, so as to at least solve the technical problem of low state control efficiency of the vehicle control system.
[0007] According to one aspect of an embodiment of the present invention, a state control method for a vehicle control system is provided. The method may include: obtaining target time information corresponding to the vehicle control system, and determining state identification information corresponding to the target time information, wherein the target time information is used to indicate a time period corresponding to a target state to be entered by the vehicle control system, and the state identification information is used to indicate a state type that satisfies the target state according to the target time information; generating a state triggering strategy corresponding to the state type based on the target time information and the state identification information, wherein the state triggering strategy is used to indicate a rule for triggering the vehicle control system to enter the target state of the state type; and, in response to the current time being within the time period corresponding to the target time information, controlling the vehicle control system to enter the target state of the state type according to the state triggering strategy.
[0008] Optionally, the target time information is a time period consisting of the occurrence time of the target state and the clearing time of the target state. In response to the current time being in the time period corresponding to the target time information, the vehicle control system is controlled to enter the target state of the state type according to the state trigger strategy, including: in response to the current time being the occurrence time, the vehicle control system is controlled to enter the target state of the state type indicated by the state identification information according to the state trigger strategy; the method also includes: in response to the vehicle control system being in the target state of the state type and the current time being the clearing time, controlling the vehicle control system to adjust from the target state to the normal state.
[0009] Optionally, based on the target time information and the state identification information, a state trigger strategy corresponding to the state type is generated, including: after controlling the vehicle control system to adjust from the target state of the state type to the normal state, in response to the state identification information corresponding to the target time information, there is next state identification information of the current state identification information, and based on the target time information and the next state identification information, a state trigger strategy for the state type corresponding to the next state identification information is generated.
[0010] Optionally, the method also includes at least one of the following: in response to the fact that the next state identification information of the current state identification information does not exist in the state identification information, generating a first prompt information, wherein the first prompt information is used to indicate that the target state triggering of the state identification information corresponding to the target time information is completed; in response to the fact that the next state identification information of the current state identification information does not exist in the state identification information, and the next target time information of the current target time information exists in the target time information, obtaining the next target time information.
[0011] Optionally, the target time information includes maximum time information and minimum time information, and determining the status identification information corresponding to the target time information includes: in response to the target time information being greater than or equal to the minimum time information, and less than or equal to the maximum time information, determining the status identification information corresponding to the target time information; the method also includes at least one of the following: in response to the target time information being less than the minimum time information, or greater than the maximum time information, generating a second prompt information, wherein the second prompt information is used to indicate that the target time information is not in the time period of the minimum time information and the maximum time information; in response to the target time information being less than the minimum time information, or greater than the maximum time information, obtaining the next target time information of the current target time information in the target time information.
[0012] Optionally, determining the state identification information corresponding to the target time information includes: in response to the current state identification information being greater than or equal to a minimum identification threshold and less than or equal to a maximum identification threshold, determining the current state identification information as the state identification information; in response to the current state identification information being less than the minimum identification threshold, or greater than the maximum identification threshold, and the next state identification information of the current state identification information being greater than or equal to the minimum identification threshold and less than or equal to the maximum identification threshold, determining the next state identification information as the state identification information.
[0013] According to another aspect of an embodiment of the present invention, a fault testing method for a vehicle control system is provided. The method may include: obtaining fault time information corresponding to the vehicle control system, and determining fault identification information corresponding to the fault time information, wherein the fault time information is used to indicate the time period corresponding to the fault state to be entered by the vehicle control system, and the fault identification information is used to indicate the fault type of the fault state that satisfies the fault time information; generating a fault testing strategy corresponding to the fault type based on the fault time information and the fault identification information, wherein the fault testing strategy is used to indicate a rule for triggering the vehicle control system to enter a fault state of the fault type and testing the performance of the vehicle control system in the fault state; in response to the current time being in the time period corresponding to the fault time information, controlling the vehicle control system to enter a fault state of the fault type according to the fault testing strategy, and testing the performance of the vehicle control system in the fault state of the fault type to obtain a test result.
[0014] Optionally, the method also includes: in response to the vehicle control system being in a normal state, obtaining first state data of the vehicle control system, wherein the first state data is used to represent the performance state of the vehicle control system in the normal state; testing the performance of the vehicle control system in a fault state of a fault type to obtain a test result, including: in response to the vehicle control system being in a fault state of a fault type, obtaining second state data of the vehicle control system, wherein the second state data is used to represent the performance state of the vehicle control system in the fault state; and determining the test result based on the first state data and the second state data.
[0015] According to another aspect of an embodiment of the present invention, a state control device for a vehicle control system is provided. The device may include: a first acquisition unit, configured to acquire target time information corresponding to the vehicle control system and determine state identification information corresponding to the target time information, wherein the target time information is used to indicate a time period corresponding to a target state to be entered by the vehicle control system, and the state identification information is used to indicate a state type that satisfies the target state of the target time information; a first generation unit, configured to generate a state triggering strategy corresponding to the state type based on the target time information and the state identification information, wherein the state triggering strategy is used to indicate a rule for triggering the vehicle control system to enter the target state of the state type; and a control unit, configured to control the vehicle control system to enter the target state of the state type according to the state triggering strategy in response to the current time being in the time period corresponding to the target time information.
[0016] According to another aspect of an embodiment of the present invention, a fault testing device for a vehicle control system is provided. The device may include: a second acquisition unit, configured to acquire fault time information corresponding to the vehicle control system and determine fault identification information corresponding to the fault time information, wherein the fault time information indicates a time period corresponding to a fault state to be entered by the vehicle control system, and the fault identification information indicates a fault type that satisfies the fault state of the fault time information; a second generation unit, configured to generate a fault test strategy corresponding to the fault type based on the fault time information and the fault identification information, wherein the fault test strategy indicates a rule for triggering the vehicle control system to enter a fault state of the fault type and testing the performance of the vehicle control system in the fault state; and a testing unit, configured to control the vehicle control system to enter a fault state of the fault type according to the fault test strategy in response to the current time being in the time period corresponding to the fault time information, and test the performance of the vehicle control system in the fault state of the fault type to obtain a test result.
[0017] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the above method of the embodiment of the present invention.
[0018] According to another aspect of an embodiment of the present invention, a processor is provided, which is configured to run a program, wherein the program executes the above method of the embodiment of the present invention when it is run.
[0019] According to another aspect of an embodiment of the present invention, an electronic device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the above method of the embodiment of the present invention.
[0020] According to another aspect of an embodiment of the present invention, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, it implements the above method of the embodiment of the present invention.
[0021] According to another aspect of an embodiment of the present invention, a vehicle is further provided, which is used to execute the above method of the embodiment of the present invention.
[0022] In an embodiment of the present invention, if it is necessary to control a vehicle control system to enter a target state, for example, to enter a fault state for fault testing, the target time information corresponding to the target state to be entered by the vehicle control system can be obtained, and the state identification information that satisfies the target time information can be determined. Based on the target time information and the state identification information, a state triggering strategy can be generated to trigger the vehicle control system to enter a target state of the state type corresponding to the state identification information. If it is determined that the current time is within the time period corresponding to the target time information, the vehicle control system can be controlled to enter the target state according to the state triggering strategy. In this embodiment, corresponding target time information is formulated for target states of different state types to achieve dynamic customization of corresponding state triggering strategies for different state types, avoiding the inefficient method of using a fixed time regardless of the state type in the related art. Through the above method, the efficiency of state switching is significantly improved, unnecessary waiting time is reduced, thereby solving the technical problem of low efficiency of state control of the vehicle control system and achieving the technical effect of improving the efficiency of state control of the vehicle control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1is a flow chart of a state control method of a vehicle control system according to an embodiment of the present invention;
[0025] Figure 2 is a flow chart of a fault testing method for a vehicle control system according to an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of a hybrid transmission fault random generation device according to an embodiment of the present invention;
[0027] Figure 4 is a flow chart of a hybrid transmission fault random generation and testing method according to an embodiment of the present invention;
[0028] Figure 5 is a schematic diagram of a state control device of a vehicle control system according to an embodiment of the present invention;
[0029] Figure 6 2 is a schematic diagram of a fault testing device for a vehicle control system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0032] According to an embodiment of the present invention, an embodiment of a state control method of a vehicle control system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 1 FIG. 1 is a flow chart of a state control method of a vehicle control system according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0034] Step S102: Acquire target time information corresponding to the vehicle control system, and determine state identification information corresponding to the target time information.
[0035] In the technical solution provided in step S102 of the present invention, the target time information is used to indicate the time period corresponding to the target state to be entered by the vehicle control system. The state identification information is used to indicate the state type of the target state that meets the target time information.
[0036] Optionally, the target time information can be a random time, which can be represented by Tx. The target time information Tx represents the time period or time point when the vehicle control system expects to enter a specific state (such as a fault state), and is the time dimension in the entire state control method. Tx can be randomly generated according to user needs, thereby introducing uncertainty and simulating the unpredictability of failures that may occur in the actual operating environment. The randomness of Tx provides flexibility for testing, allowing tests to be triggered at different time points, which can better test the responsiveness and robustness of the vehicle control system than fixed-time tests.
[0037] Optionally, the target state can be a state that the vehicle control system needs to enter, such as a fault state or other state. That is, the target state refers to the state that the vehicle control system needs to be directed to, which can be a fault state or any other state that requires testing or verification. Defining the target state is crucial for developing and optimizing control systems because it is directly related to the verification of system functions and the evaluation of fault detection capabilities. In embodiments of the present invention, the target state is primarily a fault state to facilitate testing of the vehicle control system in a fault state.
[0038] Optionally, the state identification information can be a random serial number for different target states, such as a random fault serial number, represented by Nx. The state identification information Nx is a specific identifier used to distinguish different target states. For example, in fault testing, it can be a random fault serial number used to specify the type of fault to be simulated. The use of Nx ensures that the vehicle control system can accurately identify and execute the trigger strategy for a specific state. Tx and Nx work together, with the former determining the time of state changes and the latter specifying the specific type of state change. Their combined use ensures comprehensive and targeted testing.
[0039] The vehicle control system in the embodiments of the present invention covers various systems, including but not limited to hybrid transmission, battery management system, powertrain control system, safety system, entertainment information system, body control system, intelligent driving assistance system, etc.
[0040] It should be noted that the vehicle control system in the embodiment of the present invention can be a system that requires fault generation and fault testing, for example, a hybrid transmission, a battery, etc. There is no specific limitation here. As long as the vehicle control system can utilize the state control method and fault testing method in the embodiment of the present invention, it is within the protection scope of the embodiment of the present invention.
[0041] In this embodiment, target time information associated with the vehicle control system is acquired, and corresponding state identification information is determined based on the target time information.
[0042] In the embodiment of the present invention, a human-computer interaction interface can be provided to ensure that the test strategy is closely aligned with user needs. That is, target time information and status identification information that meet user needs can be obtained and automatically triggered through human-computer interaction.
[0043] For example, users can operate the human-computer interaction interface, such as selecting the parameters of the target time information through a drop-down menu, a numeric input box, or a slider, including the minimum time Tmin, the maximum time Tmax, and the specific time point T1. In addition, a "Random Time Generate" button can be provided to automatically generate a random time Tx between Tmin and Tmax. Users can select from a series of predefined status types, such as fault status, warning status, normal operation status, etc. For fault status, it can be further subdivided into different types of faults, such as battery thermal fault, communication interruption fault, sensor fault, etc. Users can specify one or more status types and obtain the status identification information Nx through the "Random State Number Generate" button.
[0044] It should be noted that the above process and method for obtaining target time information and corresponding status identification information that meet user requirements are merely illustrative and are not intended to be limiting. Through this human-computer interaction design, users can not only intuitively set target time information and status identification information, but also automatically and flexibly generate and execute different status triggers based on this information, significantly improving the efficiency and quality of vehicle control system state control and fault testing.
[0045] In this embodiment of the present invention, the combination of random time Tx and state identification information Nx enables flexible configuration of the timing and type of state control, improving test efficiency and coverage. Customized fault triggering strategies are generated for various vehicle control system fault types, enabling efficient and targeted fault testing. This not only addresses the rigid timing issues of related technologies, but also, through the use of state identification information, allows testing to more precisely focus on specific state types, significantly improving test efficiency and effectiveness, particularly in fault testing.
[0046] Step S104: Generate a state triggering strategy corresponding to the state type based on the target time information and the state identification information.
[0047] In the technical solution provided in step S104 of the present invention, the state triggering strategy is used to represent the rules for triggering the vehicle control system to enter the target state of the state type. The state triggering strategy can specify when the vehicle control system enters the target state and when it adjusts from the target state to the normal state.
[0048] In this embodiment, after obtaining the target time information corresponding to the vehicle control system and the state identification information that meets the target time information, a state triggering strategy corresponding to the state type can be generated based on the target time information and the state identification information.
[0049] Optionally, a time window is defined based on Tx, within which the vehicle control system will be guided to a specific target state. For example, if Tx = 30 seconds, the next 30-second period will be monitored, and once the current time point matches, the corresponding state will be activated. Identify the state type represented by Nx, that is, the target state. For example, a series of predefined state type libraries, each type has its own specific trigger conditions and monitoring parameters. For example, Nx = 5 may correspond to a battery thermal fault state. Combine Tx and Nx to formulate specific trigger rules. For example, the rule can be that when the system time reaches the Tx moment, the battery thermal fault state is activated; when the time reaches the 2Tx moment, the state is restored, that is, the fault is eliminated. Once the state trigger strategy is generated, the current time will be monitored and wait for the moment that matches Tx. Once it is reached, the target state will be automatically triggered according to the strategy, and state testing or data collection will begin.
[0050] In this embodiment of the present invention, the flexibility of the state-triggered strategy is reflected in its ability to generate diverse test scenarios based on different Tx and Nx combinations. For example, for hybrid transmissions, testers can customize the corresponding test strategy based on different fault types and duration requirements. The state-triggered strategy is not limited to fault states and is also applicable to other types of state control, such as performance testing and boundary condition verification. In addition, the generation logic of the state-triggered strategy can adapt to the characteristics of various vehicle control systems, thereby enabling a wider range of testing applications.
[0051] For example, suppose that when testing a hybrid transmission, the user has set Tx to a random time between 20 and 60 seconds through human-computer interaction, selected the state type as "pressure sensor fault," and the state identifier as Nx = 2. Based on this information, the generated state trigger strategy is as follows: When the system time matches the randomly generated Tx (assuming it's 45 seconds), the "pressure sensor fault" state is activated, simulating the hybrid transmission fault, collecting relevant data, and monitoring the system response. At a time point 2Tx after Tx (i.e., 90 seconds), the "pressure sensor fault" state is automatically cleared, allowing the vehicle control system to resume normal operation.
[0052] In summary, the above method combines time sensitivity and state type orientation to develop a precise and flexible state triggering strategy. This state triggering strategy not only guides when and how the vehicle control system enters the target state but also defines the exit conditions for that state, greatly improving the efficiency and comprehensiveness of testing. For the development and maintenance of vehicle electronic control systems, this method provides a powerful tool for ensuring the reliability and stability of vehicle control systems.
[0053] Step S106 , in response to the current time being in the time period corresponding to the target time information, the vehicle control system is controlled to enter the target state of the state type according to the state triggering strategy.
[0054] In the technical solution of step S106 of the present invention, after generating the state triggering strategy based on the target time information and the state identification information, it is possible to determine whether the current time is within the time period corresponding to the target time information. If the current time is within the time period, the vehicle control system can be controlled to enter the target state of the state type according to the state triggering strategy.
[0055] Optionally, the current time is monitored in real time and compared with the target time information in the generated state triggering strategy. Once the current time is detected to be within the time period defined by the target time information Tx, that is, between Tx and 2Tx, the corresponding state triggering strategy is immediately activated, controlling the vehicle control system to enter the predetermined state type, namely the target state. This process is key to ensuring the precise execution of the state control method, requiring not only time sensitivity but also precise control of state transitions.
[0056] Optionally, the time relationship between the current time and Tx is continuously monitored. Once the current time reaches the time point set by Tx, the time condition of the state trigger policy is met. Confirming whether the current time is within the time window from Tx to 2Tx is a prerequisite for executing the state trigger policy.
[0057] Optionally, once the current time is confirmed to meet the time conditions of the state trigger strategy, the corresponding control instructions will be initiated according to the previously generated state trigger strategy, guiding the vehicle control system to the target state. Based on the state identification information Nx, the specific type of the target state can be accurately identified. For example, if Nx = 3, representing a "clutch slip fault," the test conditions and monitoring parameters matching this fault type will be triggered. The state transition control is highly automated, capable of autonomously executing the state trigger strategy without manual intervention, improving testing efficiency and accuracy.
[0058] Optionally, when controlling the vehicle control system to enter the target state, the safety of the entire process can also be ensured, especially during fault injection testing, to avoid actual damage to the vehicle or testers. When the time point reaches 2Tx, that is, the time period specified by the state trigger strategy has expired, the recovery mechanism will automatically execute, adjusting the vehicle control system from the target state to the normal state, avoiding the negative impact of prolonged fault state on the system.
[0059] For example, consider a hybrid transmission "pressure sensor fault" test. Assume the state trigger strategy generated by S104 indicates that when Tx = 45 seconds, the vehicle control system should enter the "pressure sensor fault" state and continue until 2Tx = 90 seconds. The system monitors the current time in real time. When the time reaches 45 seconds, fault injection automatically initiates, simulating abnormal pressure sensor data and testing the transmission's fault diagnosis and handling capabilities. At 90 seconds, fault simulation automatically terminates, restoring normal pressure sensor data flow and ensuring the vehicle control system resumes normal operation.
[0060] In this embodiment of the present invention, the above process not only verifies the validity of the time information and state identification information, but also ensures that the performance of the vehicle control system under various predefined states is fully and safely evaluated. Through this mechanism, the technical solution of the present invention demonstrates significant advantages in improving test efficiency, coverage, and safety.
[0061] In the above steps S102 to S106 of the present application, if it is necessary to control the vehicle control system to enter a target state, for example, to enter a fault state for fault testing, the target time information corresponding to the target state to be entered by the vehicle control system can be obtained, and the state identification information that satisfies the target time information can be determined. Based on the target time information and the state identification information, a state triggering strategy can be generated to trigger the vehicle control system to enter a target state of the state type corresponding to the state identification information. If it is determined that the current time is within the time period corresponding to the target time information, the vehicle control system can be controlled to enter the target state according to the state triggering strategy. In this embodiment, corresponding target time information is formulated for target states of different state types to achieve dynamic customization of corresponding state triggering strategies for different state types, avoiding the inefficient method of using a fixed time regardless of the state type in the related art. Through the above method, the efficiency of state switching is significantly improved, unnecessary waiting time is reduced, thereby solving the technical problem of low efficiency of state control of the vehicle control system and achieving the technical effect of improving the efficiency of state control of the vehicle control system.
[0062] The above method of this embodiment is further introduced below.
[0063] As an optional embodiment, the target time information is a time period consisting of the occurrence time of the target state and the clearing time of the target state. Step S106, in response to the current time being in the time period corresponding to the target time information, controls the vehicle control system to enter the target state of the state type according to the state trigger strategy, including: in response to the current time being the occurrence time, controls the vehicle control system to enter the target state of the state type indicated by the state identification information according to the state trigger strategy; the method also includes: in response to the vehicle control system being in the target state of the state type and the current time being the clearing time, controls the vehicle control system to adjust from the target state to the normal state.
[0064] In this embodiment, if the current time is within the time period corresponding to the target time information, and in the process of controlling the vehicle control system to enter the target state of the state type according to the state trigger strategy, if the current time is the occurrence time, then the vehicle control system can be controlled according to the state trigger strategy to enter the target state of the state type indicated by the state identification information. If the vehicle control system is in the target state and the current time is the clearance time, then the vehicle control system can be controlled to adjust from the target state to the normal state. The target time information can be a time period consisting of the occurrence time of the target state and the clearance time of the target state. The occurrence time can be the time when the fault occurs. The clearance time can be the time when the fault is cleared.
[0065] Optionally, this embodiment describes the generation and removal of a specific state (such as a fault state) based on the occurrence time and removal time in the target time information. The above-mentioned segmented time control method provides a more refined operation method for the state test of the vehicle control system.
[0066] Optionally, when the current time matches the target time in real-time monitoring, it is considered the time to trigger a state transition. At the time of occurrence, the corresponding control process is initiated according to the generated state trigger strategy, prompting the vehicle control system to enter the target state. The target state, especially the fault state, is clearly defined through the state identification information Nx, ensuring that the system can accurately identify and simulate specific fault types, such as abnormal pressure sensor readings and motor overload. At the time of occurrence, fault injection is performed to observe and record the response behavior and data changes of the vehicle control system under the fault state.
[0067] Optionally, after the vehicle control system enters the target state, it can continue to monitor the current time. If the current time reaches the clearing time in the target time information, it will be regarded as the termination signal of the target state (fault state). At this time, the state recovery process will be executed, including removing the fault injection, resetting the relevant monitoring and data acquisition mechanisms, so that the vehicle control system can gradually return to normal. The setting of the clearing time ensures that the fault state will not persist indefinitely, avoiding potential damage or unnecessary resource consumption. The vehicle control system automatically performs state recovery at the clearing time point, which is not only conducive to the smooth progress of the test, but also reflects the safety and controllability of the method.
[0068] In an embodiment of the present invention, by decomposing the target time information into an occurrence time and a clearing time, the present invention can conduct in-depth testing of the performance of the vehicle control system at a specific point in time, which is particularly important for discovering and locating potential problems of the system in time-sensitive scenarios. A clearly defined clearing time ensures the controllability of the fault state, avoids the safety risks that may arise from staying in the fault mode for a long time, and also facilitates subsequent system status analysis and verification. The automatic response mechanism simplifies the test process, reduces the need for manual intervention, and improves test efficiency and reliability. At the same time, guided by the status identification information, the system can quickly identify and activate the correct test strategy, reducing complexity.
[0069] For example, taking the test of battery thermal faults as an example, it is assumed that through the interactive interface, the user sets the fault occurrence time to Tx = 30 seconds and the fault clearing time (2Tx) to 60 seconds. At 30 seconds, according to the status trigger strategy (such as cooling system shutdown, battery charging power reduction, etc.), a thermal fault is injected into the battery management system to simulate an abnormal increase in battery temperature. In the next 30 seconds, the battery management system's response to the thermal fault, such as temperature alarm, energy management adjustment, etc., will be continuously monitored and recorded. When the time reaches 60 seconds, the thermal fault injection is automatically canceled, so that the vehicle control system returns to normal operation mode. The above process not only tests the emergency response capability of the battery management system in a fault state, but also verifies its ability to recover quickly and operate stably.
[0070] In summary, by precisely controlling the occurrence and clearance times of faults, a highly customized, safe, and controllable state-based testing solution is provided. This approach not only reveals the inner workings of vehicle control systems in detail, but also enables comprehensive verification of fault responses without compromising system integrity.
[0071] As an optional embodiment, step S104 generates a state trigger strategy corresponding to the state type based on the target time information and the state identification information, including: after controlling the vehicle control system to adjust from the target state of the state type to the normal state, in response to the state identification information corresponding to the target time information, there is next state identification information of the current state identification information, and based on the target time information and the next state identification information, generates a state trigger strategy for the state type corresponding to the next state identification information.
[0072] In this embodiment, in the process of generating a state triggering strategy based on the target time information and the state identification information, after the vehicle control system is controlled to adjust from the target state to the normal state, the state identification information corresponding to the current target time information can be detected to determine whether the state identification information contains the next state identification information of the current state identification information. Then, based on the target time information and the next state identification information, a state triggering strategy for the state type corresponding to the next state identification information can be generated. The next state identification information can be a fault sequence number that has not yet been triggered among the fault sequence numbers at the current random fault time.
[0073] Optionally, this embodiment describes a dynamic, iterative process designed to achieve continuous state trigger testing. Specifically, after the vehicle control system has completed testing of a target state (such as recovering from a fault state to a normal state), it can check whether there is next state identification information, that is, a random fault sequence number (Nx) that has not been tested and is located after the current state identification information sequence. If such next state identification information exists, a new state trigger strategy will be immediately generated based on the target time information (Tx) and the next state identification information, thereby seamlessly transitioning to the test of the target state of the next state type.
[0074] Optionally, ensure that the vehicle control system has successfully recovered from the previous target state (such as a fault state) to the normal state. Check the current state identification information library to find out whether there is any next state identification information that has not been tested. The above detection mechanism ensures that the test can continuously and systematically cover all state types, not just a single fault. Once the next state identification information is found, a new state triggering strategy will be generated based on the target time information and the above next state identification information. The above new state triggering strategy will clarify the trigger time, state type and corresponding state control rules of the next state. By automatically executing the state triggering strategy, the vehicle control system is guided to enter the next target state for testing. After the test is completed, the vehicle control system returns to normal again and then enters the detection and strategy generation cycle of the next state identification information until all preset state identification information under the target time information are tested.
[0075] In an embodiment of the present invention, by continuously detecting the next state identification information and generating a corresponding test strategy, it is ensured that all predefined state types can be tested by the system, thereby improving the comprehensiveness of the test. The above-mentioned iterative mechanism has a high degree of automation, which can reduce human intervention and speed up the test process. In particular, it can significantly improve the overall test efficiency in situations involving a large number of test states. The dynamic adjustment and combination of target time information (Tx) and state identification information (Nx) enable the test strategy to flexibly respond to different scenarios and needs, and adapt to changes in various vehicle control systems and test conditions.
[0076] For example, after completing the test of the battery thermal fault state (state identification information is Nx=5) and returning to the normal state, it is automatically detected whether there is the next state identification information. Assuming that there is Nx=6, which represents "motor torque sensor failure", a new state triggering strategy will be generated based on the currently randomly generated target time information (Tx), for example, Tx=50 seconds. The above state triggering strategy will guide the simulation of the motor torque sensor failure when the Tx time point is reached next time, and observe the response of the transmission. After the test is completed, the normal state is restored again, and it is automatically detected whether there is more state identification information that needs to be tested. This cycle continues until all fault types have been fully tested.
[0077] In summary, by iteratively generating a state-triggering strategy corresponding to the next state identification information, we achieve continuous state testing and system coverage, effectively improving the efficiency and quality of vehicle control system software testing. This mechanism is particularly suitable for applications that require sequential testing of a series of states or faults, demonstrating a high degree of automation, flexibility, and comprehensiveness.
[0078] As an optional embodiment, the method also includes at least one of the following: in response to the fact that the next state identification information of the current state identification information does not exist in the state identification information, generating a first prompt information, wherein the first prompt information is used to indicate that the target state triggering of the state identification information corresponding to the target time information is completed; in response to the fact that the next state identification information of the current state identification information does not exist in the state identification information, and the next target time information of the current target time information exists in the target time information, obtaining the next target time information.
[0079] In this embodiment, if the state identification information does not contain the next state identification information of the current state identification information, a prompt message can be generated to prompt that the target states of all state identification information under the current target time information have been triggered and completed, that is, all faults at the random time have been tested. If the state identification information contains the next state identification information of the current state identification information, and it is detected that the target time information contains the next target time information of the current target time information, the next target time information can be obtained, that is, various faults at the next random time can be tested.
[0080] Optionally, this embodiment describes a state identification information iteration and test completion prompt mechanism, which can ensure comprehensive test coverage while maintaining transparency of the test process. When it is detected that the current state identification information (such as the fault number represented by Nx) has no subsequent state identification information, it means that in this specific random time window (Tx), all preset state types have been triggered and tested. A first prompt message can be generated to inform the user or test engineer that all state tests within the current time window have been completed. The above prompt is not only feedback on the progress of the test, but also a signal of the system state transition.
[0081] At the same time, if it is found that although the current state identification information has no subsequent state, there is a subsequent time point in the target time information sequence (ie, the next target time information Tx+1 of the current target time information Tx), then the test work of the next time point will be automatically obtained and prepared.
[0082] Optionally, the system checks whether the current state identification sequence has been fully traversed, that is, whether all state types (e.g., all faults) have been tested within a given time window. If the state identification sequence has no subsequent states, the system generates a first prompt message indicating that testing for the current time window has been completed. This first prompt message can be in the form of a screen prompt, audio prompt, or log record, ensuring that testers are kept informed of the test progress.
[0083] It should be noted that the method of providing the first prompt information is not specifically limited here, and the embodiment of the present invention does not impose any specific limitation.
[0084] Optionally, after completing the test of the current target time information (current time window), a further check is performed to see if there is any untested target time information, that is, whether there is the next target time information. If so, this time information is automatically acquired and preparations are made for testing the next time window. The above mechanism effectively controls the test process, ensuring that after each round of testing, the system automatically transitions to the preparation and execution state for the next round of testing without the need for human intervention.
[0085] In this embodiment of the present invention, iterative testing of state identification information ensures that each predefined state type is fully tested, improving the comprehensiveness and accuracy of the test. Automatically acquiring the next target time information and preparing for the test reduces manual operations, speeds up the testing process, and makes the entire testing process more efficient. The generation of the first prompt message provides immediate feedback on the test progress, enhancing test transparency and making it easier for testers to understand the test status and results.
[0086] For example, suppose a continuous test of the software function of a hybrid transmission is being conducted, with the random time Tx set between 30 seconds and 60 seconds, and the state identification information ranging from Nx=1 (oil pump communication failure) to Nx=5 (clutch cannot be disengaged failure). After completing a round of testing for all five faults, if there is no more state identification information (i.e., there is no Nx+1 after Nx=5), a first prompt message is generated, indicating that all faults in the current time window have been tested. At this time, if the system detects that the next random time Tx+1 is in the sequence (e.g., Tx+1=90 seconds to 120 seconds), it automatically obtains and sets this time to prepare for the state-triggered test in the next time window. After receiving the completion prompt, the tester can view the test results. At the same time, the system has begun to automatically configure the time and state for the next round of testing, maintaining the continuity and automation of the test.
[0087] In summary, through iterative testing of state identification information and automatic acquisition of target time information, a highly automated and comprehensive testing process is achieved. The generation of first prompt information further enhances test transparency and efficiency, providing strong support for in-depth testing and evaluation of vehicle control systems. This method is applicable not only to fault injection testing but also to a wider range of state control and functional verification scenarios, demonstrating broad application prospects in vehicle electronic system testing.
[0088] As an optional embodiment, the target time information includes maximum time information and minimum time information. Step S102 determines the status identification information corresponding to the target time information, including: in response to the target time information being greater than or equal to the minimum time information, and less than or equal to the maximum time information, determining the status identification information corresponding to the target time information; the method also includes at least one of the following: in response to the target time information being less than the minimum time information, or greater than the maximum time information, generating a second prompt information, wherein the second prompt information is used to indicate that the target time information is not in the time period of the minimum time information and the maximum time information; in response to the target time information being less than the minimum time information, or greater than the maximum time information, obtaining the next target time information of the current target time information in the target time information.
[0089] In this embodiment, in the process of determining the status identification information corresponding to the target time information, if the target time information is greater than or equal to the minimum time information and less than or equal to the maximum time information, the status identification information corresponding to the target time information can be determined. If the target time information is less than the minimum time information, or greater than the maximum time information, a second prompt information can be generated. If the target time information is less than the minimum time information, or greater than the maximum time information, the next target time information of the current target time information in the target time information can be obtained. Among them, the second prompt information can be used to indicate that the target time information is not in the time period where the minimum time information and the maximum time information are located. That is, if the random time is wrong, it is necessary to send a prompt. The maximum time information can be the highest time Tmax, and the minimum time information can be the lowest time Tmin.
[0090] Optionally, this embodiment refines the target time information into two parameters, maximum time information and minimum time information, to constrain the timing of state triggering. When the target time information (Tx) falls within the time interval formed by the minimum time information (Tmin) and the maximum time information (Tmax), the determination of the state identification information and the triggering of the state are allowed. In addition, for scenarios where the time information exceeds a reasonable range, two response strategies are provided: one is to generate a second prompt message to warn the user that the time parameter is unreasonable; the other is to automatically jump to the next target time information and continue the test process.
[0091] Optionally, the system detects the target time information (Tx) in real time to determine whether it meets the condition of Tmin≤Tx≤Tmax. When Tx falls within a reasonable time interval, the state identification information (Nx) corresponding to Tx will be determined according to the established algorithm or rules, and then the corresponding state type will be triggered for testing. If Tx is less than Tmin or greater than Tmax, it means that the time parameters are improperly set. The system will generate a second prompt message to inform the user that the target time information is not within the specified time period. This may be because the randomly generated time parameters exceed the pre-set range, and the user or system needs to adjust the parameters. After detecting the Tx anomaly, it automatically jumps to the next target time information acquisition process, that is, obtains the next random time point Tx+1 of the current Tx. The above mechanism ensures that even if invalid time parameters are encountered, the test process can continue, avoiding the interruption of the entire test plan due to a single time parameter anomaly.
[0092] For example, when testing the software functions of a hybrid transmission, the minimum time information Tmin is set to 20 seconds, and the maximum time information Tmax is set to 60 seconds. The target time information (Tx) randomly generated each time needs to be within this range. If the randomly generated Tx is 15 seconds, which is less than Tmin, a second prompt message is generated to inform the user that the time parameter is not within the valid range. At this time, the user can choose to adjust the time parameter, or configure the test logic to automatically skip the invalid time and directly obtain the next random time point Tx+1 for testing. The above process ensures that various state tests are carried out under reasonable conditions, improving the effectiveness and safety of the test.
[0093] In this embodiment of the present invention, by constraining time parameters, invalid or inefficient tests caused by improper time settings are avoided, ensuring high-quality state testing. The generation and feedback of secondary prompt information enhances the user's interactive experience, allowing users to adjust or optimize test parameters in a timely manner, avoiding blind testing. When time parameters exceed safety or test specifications, the system automatically jumps to the next time point, effectively avoiding potential system failures or anomalies and ensuring the stable operation of the test system.
[0094] In summary, the introduction of target time information constraints and exception handling mechanisms not only provides a strict time frame for state triggering, but also ensures a smooth testing process through automatic iteration and user feedback, avoiding ineffective testing and potential risks. This mechanism is particularly suitable for testing scenarios requiring strict time control, such as fault injection testing of vehicle control system software. By ensuring that tests are conducted within a reasonable time window, it greatly improves test accuracy and reliability.
[0095] As an optional embodiment, step S102 determines the state identification information corresponding to the target time information, including: in response to the current state identification information being greater than or equal to the minimum identification threshold and less than or equal to the maximum identification threshold, determining the current state identification information as the state identification information; in response to the current state identification information being less than the minimum identification threshold, or greater than the maximum identification threshold, and the next state identification information of the current state identification information being greater than or equal to the minimum identification threshold and less than or equal to the maximum identification threshold, determining the next state identification information as the state identification information.
[0096] In this embodiment, when determining the state identification information corresponding to the target time information, if the current state identification information is greater than or equal to the minimum identification threshold and less than or equal to the maximum identification threshold, the current state identification information can be determined as the state identification information. If the current state identification information is less than the minimum identification threshold or greater than the maximum identification threshold, and the state identification information next to the current state identification information is greater than or equal to the minimum identification threshold and less than or equal to the maximum identification threshold, the next state identification information can be determined as the state identification information. The minimum identification threshold can be the lowest sequence number Nmin. The maximum identification threshold can be the highest sequence number Nmax.
[0097] Optionally, this embodiment illustrates that the selection of state identification information (e.g., fault sequence number Nx) is subject to dual constraints, namely, a minimum identification threshold (Nmin) and a maximum identification threshold (Nmax), ensuring comprehensive and targeted test coverage. Furthermore, when the current state identification information exceeds the threshold range, the system automatically iterates to the next eligible state identification information, thereby maintaining test continuity and effectiveness.
[0098] Optionally, the current state identification information (Nx) is checked to see if it satisfies the condition Nmin ≤ Nx ≤ Nmax. This is a prerequisite for the state identification information to be adopted. The minimum identification threshold Nmin and the maximum identification threshold Nmax are preset values, representing the basic range of fault or state types to be covered by the system test. If the current state identification information (Nx) meets the threshold condition, that is, is within the preset range of the state identification information (maximum identification threshold and minimum identification threshold), the current state identification is determined as the state identification information for state triggering.
[0099] Optionally, if the current state identifier (Nx) does not meet the threshold condition, the system automatically checks whether the next state identifier exists, that is, whether there is a next state type in the sequence that can be tested. If the next state identifier satisfies the condition Nmin ≤ Nx + 1 ≤ Nmax, the next state identifier (Nx + 1) is automatically used as the basis for state triggering, ensuring that the test can continue within a reasonable range.
[0100] For example, when performing a fault test on the hybrid transmission control software, assume that the minimum identification threshold Nmin is 1 (representing an oil pump communication fault) and the maximum identification threshold Nmax is 5 (representing a clutch disengagement fault). The current state identification information is 6 (representing a fault type that is not within the scope of this test). Obviously, Nx=6 does not meet the condition of Nmin≤Nx≤Nmax. However, the presence of the next state identification information (i.e., Nx+1) is detected, and this state identification information is 1, which meets the threshold condition. Therefore, Nx+1=1 will be automatically iterated as the state identification information to test the oil pump communication fault.
[0101] In an embodiment of the present invention, the setting of the minimum identification threshold Nmin and the maximum identification threshold Nmax effectively controls the selection range of the state identification information, avoids triggering states that are irrelevant or exceed the preset test range, and improves the pertinence and efficiency of the test. The ability to automatically detect and iterate the next state identification information ensures that the test process can maintain continuity even when encountering state identification information that does not meet the threshold conditions, further improving the degree of automation of the test. Through the dynamic control of the threshold and the iterative determination of the state identification information, this embodiment demonstrates the flexibility and efficiency of the test strategy when faced with diverse test conditions and requirements, and can adapt to the ever-changing test environment.
[0102] In summary, by limiting the selection of state identification information using the minimum identification threshold Nmin and the maximum identification threshold Nmax, as well as the ability to automatically iterate the next state identification information, the embodiments of the present invention provide a method for determining a state trigger strategy that is both targeted and continuous. This method effectively avoids invalid testing and ensures the rational use of system resources. Furthermore, through automated processing, it significantly improves the efficiency and reliability of the test process, providing strong support for software testing and functional verification of vehicle control systems.
[0103] Figure 2 FIG. 1 is a flow chart of a fault testing method for a vehicle control system according to an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:
[0104] Step S202, obtain the fault time information corresponding to the vehicle control system, and determine the fault identification information corresponding to the fault time information, wherein the fault time information is used to indicate the time period corresponding to the fault state to be entered by the vehicle control system, and the fault identification information is used to indicate the fault type of the fault state that meets the fault time information.
[0105] In this embodiment, specific fault time information is obtained from the vehicle control system, and corresponding fault identification information is determined according to the fault time information.
[0106] Optionally, obtain fault time information related to the fault state to be tested in the vehicle control system. For example, the fault start time Tx, the fault end time 2Tx (i.e., the fault time window), and possible minimum and maximum time thresholds Tmin and Tmax. These parameters together define the expected time range for the fault state to be triggered and persisted. During the test, the system needs to monitor in real time whether the current time falls within the above-defined fault time window. This monitoring action is to ensure that the fault state can be triggered at the correct time.
[0107] Optionally, once it is determined that the current time meets the requirements for fault time information, the next task is to determine the fault identification information that matches this time window. This means filtering out the fault type that meets the current test requirements from a preset fault type library. The fault identification information can be a code or number, such as Nx, which is directly associated with a specific fault type, such as an oil pump communication fault (Nx=1) or a pressure sensor fault (Nx=2). The system needs to be able to quickly identify and apply this information to accurately simulate the corresponding fault.
[0108] Optionally, the above method can achieve fine-grained control over fault testing. The acquisition of time information ensures that the fault state is triggered at a predetermined time point, while the determination of fault identification information clarifies the specific type of fault to be simulated. The combination of the two provides dual constraints on time and type for fault testing.
[0109] Step S204, based on the fault time information and the fault identification information, generates a fault test strategy corresponding to the fault type, wherein the fault test strategy is used to represent the rules for triggering the vehicle control system to enter a fault state of the fault type and testing the performance of the vehicle control system in the fault state.
[0110] In this embodiment, a specific fault testing strategy is generated based on the acquired fault time information and determined fault identification information. This strategy details how to trigger a specific fault type within a specified time period and test the vehicle control system's performance under the fault condition. This strategy serves as an action guide for implementing fault testing, ensuring the orderliness and effectiveness of testing.
[0111] Optionally, based on the fault time information (such as Tx and 2Tx) and fault identification information (such as Nx), matching test rules are searched. The above test rules may cover the triggering conditions, duration, expected system response, and test evaluation criteria of the fault.
[0112] Optionally, specific fault testing scenarios can be constructed based on matching rules. For example, if fault identification information Nx = 1 indicates a fuel pump communication failure, and fault duration information Tx = 30 seconds, a scenario will be designed to activate the fuel pump communication failure at the 30-second point and continue until the 2Tx point. The fault testing strategy should also include specific testing rules for the vehicle control system's performance under fault conditions. This can include data collection time points, performance indicator thresholds, and system recovery time requirements to ensure a comprehensive assessment of the system's behavior under fault conditions.
[0113] Optionally, clarify the fault triggering mechanism, including the timing and method of triggering. For example, determine how the fault should be simulated and injected into the vehicle control system, and when it should be triggered. Define the duration of the fault state to ensure that the fault is fully demonstrated to observe the system's performance under the fault condition. List the specific processes and indicators for testing the performance of the vehicle control system under fault conditions to evaluate the system's fault handling capabilities. Set the criteria for passing and failing the test, as well as possible performance optimization goals, to guide test evaluation and subsequent improvement directions.
[0114] In an embodiment of the present invention, specific test strategies are generated using fault time information and fault identification information, enabling targeted testing focused on the system response to a specific fault type within a specific time window, thus improving the refinement of testing. Fault testing strategies provide clear guidance for verifying system performance, helping to identify potential design flaws or performance bottlenecks, and providing a basis for optimizing and upgrading vehicle control systems. Rule-based test strategy generation enables automated or semi-automated fault simulation and performance testing, significantly improving test efficiency and reducing test preparation and execution time.
[0115] Step S206, in response to the current time being in the time period corresponding to the fault time information, according to the fault test strategy, the vehicle control system is controlled to enter a fault state of the fault type, and the performance of the vehicle control system in the fault state of the fault type is tested to obtain a test result.
[0116] In this embodiment, the test strategy is converted into actual test behavior, and the performance response of the vehicle control system is observed and evaluated by simulating specific types of faults. The above steps ensure the effective execution of the fault test strategy.
[0117] Optionally, real-time detection is performed to determine whether the current time falls within the time period corresponding to the fault time information defined in the fault test strategy. This is the basis for triggering the fault state, ensuring that the fault is accurately activated at the preset time point. Once it is detected that the current time meets the requirements of the fault time information, the vehicle control system is immediately controlled to enter the preset fault state according to the triggering rules in the fault test strategy. For example, if the fault identification information Nx=1 indicates an oil pump communication failure, the system will activate this fault state at the time point defined by the fault time information. After the fault state is activated, the fault state will be maintained until the end of the fault time window according to the persistence conditions in the test strategy. During this period, the vehicle control system will operate in a simulated fault environment to fully demonstrate its performance under abnormal conditions.
[0118] Optionally, while the fault condition persists, the system collects key performance data of the vehicle control system, including but not limited to system response time, processing efficiency, error rate, and recovery time, according to the performance testing rules defined in the fault testing strategy. Based on this collected performance data, the overall performance of the vehicle control system under the fault condition is evaluated. Test results can be recorded, including system response during the fault condition and specific indicators of performance degradation. This data will be used for subsequent system analysis and optimization, helping engineers understand the impact of the fault on system performance and implement appropriate improvement measures.
[0119] In the present application, steps S202 to S206 are performed to obtain the fault time information corresponding to the vehicle control system and determine the fault identification information corresponding to the fault time information; based on the fault time information and the fault identification information, a fault test strategy corresponding to the fault type is generated; in response to the current time being in the time period corresponding to the fault time information, the vehicle control system is controlled to enter a fault state of the fault type according to the fault test strategy, and the performance of the vehicle control system in the fault state of the fault type is tested to obtain a test result. In this embodiment, by precisely defining the fault time information and the fault identification information, intelligent and timed activation of the fault state and automatic generation of the fault test strategy are achieved. The above method overcomes the limitations of related fault testing technologies that rely on fixed scenarios or manual triggering of faults, greatly improving the efficiency and pertinence of testing. In summary, the embodiments of the present invention significantly improve the speed of testing and the level of verification of system performance through precise control of time and type, as well as the automated execution of the test process, thereby solving the technical problem of low efficiency of fault testing of vehicle control systems and achieving the technical effect of improving the efficiency of fault testing of vehicle control systems.
[0120] The above method of this embodiment is further introduced below.
[0121] As an optional embodiment, the method also includes: in response to the vehicle control system being in a normal state, obtaining first state data of the vehicle control system, wherein the first state data is used to represent the performance state of the vehicle control system in the normal state; step S106, testing the performance of the vehicle control system in a fault state of a fault type to obtain a test result, including: in response to the vehicle control system being in a fault state of a fault type, obtaining second state data of the vehicle control system, wherein the second state data is used to represent the performance state of the vehicle control system in the fault state; and determining the test result based on the first state data and the second state data.
[0122] In this embodiment, state data is collected from both normal and faulty vehicle control systems, and system performance changes are compared and analyzed to comprehensively assess the robustness and responsiveness of the system. This comparative testing strategy not only identifies system performance under fault conditions but also assesses the specific impact of the fault on system performance.
[0123] Optionally, while the vehicle control system is operating normally, a data collection mechanism is initiated to capture first-state data. This data reflects a range of performance parameters of the vehicle control system under fault-free conditions, such as operational response time, data processing rate, energy consumption, and signal transmission quality. This first-state data can include metrics related to vehicle control system performance, ensuring a comprehensive assessment of the system's baseline performance when subsequently compared with data from the fault state. This helps identify any initial baseline for performance degradation, as well as any performance gains or losses after fault recovery.
[0124] Optionally, when the vehicle control system is in a fault state triggered by the fault testing strategy, the system also initiates data acquisition to obtain second state data. The second state data reflects the performance of the vehicle control system under the fault condition, including fault response time, error handling efficiency, and system recovery capability.
[0125] Optionally, a detailed comparative analysis is performed based on the first state data and the second state data to quantify the specific impact of the fault on system performance and whether the behavior of the vehicle control system under the fault state meets the expected performance standards.
[0126] Optionally, by comparing performance data under normal and fault conditions, changes in system performance under the influence of the fault can be quantified, such as increased response time and decreased processing efficiency. Test results reflect the vehicle control system's processing capabilities and recovery efficiency under fault conditions. Comparative analysis can assess the system's ability to effectively respond to faults and identify areas for optimization in fault handling mechanisms. Based on analysis of test results, engineers can identify potential issues in system design, further optimize fault prevention and handling strategies, and enhance system stability and safety in the face of faults.
[0127] In this embodiment of the present invention, by acquiring data from the vehicle control system in both normal and faulty states under identical conditions, the comparison is scientific and accurate, facilitating a precise assessment of the direct impact of faults on system performance. The acquisition of the second-state data and its comparison with the first-state data provide quantitative metrics for system responsiveness and recovery efficiency, providing specific guidance for optimizing the vehicle control system. Based on these comparative test results, targeted improvements can be made to fault prevention and handling mechanisms, enhancing the system's adaptability and robustness in complex operating environments.
[0128] In summary, by acquiring first and second state data in response to the vehicle control system being in both normal and faulty states, and performing comparative analysis based on these two state data, a quantitative assessment of the vehicle control system's performance is achieved, specifically its responsiveness under fault conditions. This method not only improves the scientific nature and efficiency of testing but also provides strong data support for fault prevention and system optimization, ensuring the high reliability and safety of the vehicle control system.
[0129] The technical solutions of the embodiments of the present invention are described below with reference to preferred implementation methods.
[0130] Currently, many vehicle control system fault tests use a pre-set, fixed-duration fault simulation approach. This approach often sets a uniform fault duration, assuming that all faults require the same amount of time to detect and resolve, thus simplifying the testing process.
[0131] However, the above approach has significant shortcomings: different fault types have vastly different detection times, impact scopes, and handling requirements. For example, battery thermal faults, due to the temperature accumulation and heat dissipation involved, often require a long time (e.g., 30 seconds) for the system to detect and take appropriate action. Meanwhile, certain transient faults (such as momentary communication interruptions or short-term voltage fluctuations) can be identified and handled in just seconds or even less. Using a fixed fault duration for testing eliminates unnecessary waiting times for faults that trigger quickly and can be detected immediately. This not only wastes valuable testing time but can also lead to inefficient use of testing resources. Fixed-duration testing methods struggle to accurately simulate the diversity and uncertainty of real-world faults. By failing to differentiate test durations for different fault types, tests may miss certain fault characteristics that only manifest within a specific duration, reducing the comprehensiveness and reliability of the test. Consequently, the technical issues of low fault generation and testing efficiency in vehicle control systems remain.
[0132] However, an embodiment of the present invention proposes a random fault generation method and a testing method, which uses a method of generating random time and random fault values to create random faults and eliminate faults. It can randomly inject faults into a running vehicle control system, thereby fully testing the fault conditions and ensuring the quality of the vehicle control system. It solves the technical problem of low fault generation and testing efficiency of the vehicle control system and achieves the technical effect of improving the fault generation and testing efficiency of the vehicle control system.
[0133] The following further describes the embodiments of the present invention with respect to hybrid transmission fault generation and testing scenarios.
[0134] Figure 3 is a schematic diagram of a hybrid transmission fault random generation device according to an embodiment of the present invention, such as Figure 3 As shown, the apparatus may include a random time generation module 302 , a fault generation determination module 304 , a random fault sequence number generation module 306 and a fault activation module 308 .
[0135] Optionally, the random time generation module 302 is designed to introduce uncertainty, making the test more realistic and responsive to the unpredictability of actual use. This module is responsible for generating a random time interval (denoted as Tx), which is used to determine the time when a fault occurs and is resolved. It accepts three parameters: a minimum time Tmin, a maximum time Tmax, and an initial value T1. These parameters together define the range of fault duration and fault resolution time. For example, Tmin and Tmax set the boundaries of the fault duration, while the initial value T1 serves as the basis for the duration of the first fault occurrence at system startup.
[0136] Optionally, when the program starts, the random time generation module 302 outputs a pre-set initial value, T1, which is the duration of the first fault occurrence. This ensures a deterministic behavior at the start, rather than immediately falling into a completely random state. Once a fault is triggered and eventually eliminated (i.e., the fault cycle is complete), this module regenerates a new random time, Tx. This means that after each fault event, the time it will be triggered again is uncertain, increasing the complexity and comprehensiveness of the test.
[0137] Optionally, the function of the fault occurrence judgment module 304 is to detect time and determine whether a fault should be triggered based on the random time Tx provided by the random time generation module. Once a fault is triggered, it will set a flag FltGen to 1, indicating that a fault has occurred; when time continues to elapse and reaches 2Tx, it will set FltGen to 0, indicating that the fault has been eliminated. This process ensures that the occurrence and elimination of faults follow the law of random time, rather than a fixed or manually preset time point. When the test system is started, the fault occurrence judgment module 304 immediately starts timing and waits for a time point when a fault occurs, that is, time Tx. At this stage, FltGen may default to 0, indicating that the system has not detected any fault. Once the time reaches Tx, this specific moment is detected, FltGen is set to 1, and a signal is sent to other components (such as the random fault sequence number generation module and the fault activation module) to indicate the start of the fault simulation process. When time further elapses and reaches 2Tx, the fault occurrence judgment module checks this moment again and resets FltGen to 0, which means that the current fault cycle is over and all fault simulation measures executed by the fault activation module should be canceled or reset.
[0138] Optionally, the random fault number generation module 306 is responsible for generating random fault numbers (denoted as Nx) within a specified range to represent different fault types. Its primary task is to generate random fault numbers Nx between a set minimum value Nmin and a set maximum value Nmax. Initially, Nx is set to 0, indicating no fault. The random fault number generation module 306 is closely linked to the output FltGen from the fault occurrence determination module 304. When FltGen equals 1, meaning the system determines a fault has occurred, the random fault number generation module begins operating and generates a random fault number Nx. When FltGen becomes 0, indicating the fault has disappeared, Nx is reset to 0. When the test program starts, Nx is initialized to 0, indicating a fault-free system. At this point, even if the fault time arrives, no fault number will be generated because the system requires a signal confirming the fault has occurred (FltGen = 1). When the FltGen signal from the fault occurrence determination module becomes 1, the random fault number generation module begins operating and selects a random number between Nmin and Nmax as the current fault number Nx. This generated fault sequence number will remain unchanged until FltGen becomes 0 again. When FltGen becomes 0, it indicates that the current fault cycle has ended, and the random fault sequence number generation module resets Nx back to 0, indicating that the fault in the system has been cleared and returned to normal operation.
[0139] Optionally, the fault activation module 308 is designed to convert the abstract fault numbers generated by the random fault number generation module into specific fault scenarios and activate these faults during software testing. The fault activation module 308 receives a signal (the value of the FltGen variable) from the fault occurrence determination module. When FltGen becomes 1, it obtains a specific random fault number Nx from the random fault number generation module. Based on the value of Nx, it activates the fault type corresponding to that number from a preset list. For example, when Nx equals 1, an oil pump communication fault is triggered; when Nx equals 2, a pressure sensor fault is activated, and so on. Initially, during the test program startup, the fault activation module 308 defaults to outputting Nx = 0, indicating that no system faults are activated and all system components are operating normally. When FltGen = 1 (signaling that the system enters a simulated fault state), it receives a randomly generated fault number Nx from the random fault number generation module. At this point, it searches the predefined fault list for a fault type that matches the current Nx value. Based on the resolved fault type, the actual fault simulation process is triggered. When the FltGen signal returns to 0 (i.e., the fault is cleared), the module will perform fault clearing operations regardless of the current fault number Nx, restoring the system to a fault-free state (i.e., Nx = 0). This means that all previously activated faults must be properly cleared to ensure that the system returns to normal operation.
[0140] Figure 4 FIG. 1 is a flow chart of a hybrid transmission fault random generation and testing method according to an embodiment of the present invention. Figure 4 As shown, the method may include the following steps:
[0141] Step S401, waiting for the fault time Tx.
[0142] In this embodiment, before testing begins, the system enters a waiting state until a preset random fault time, Tx, arrives. This waiting phase ensures that faults are triggered at a controllable time, enhancing test planning and efficiency. The fault time, Tx, is determined by a random time generation module based on the boundary conditions of a minimum time, Tmin, and a maximum time, Tmax, ensuring randomness in the fault triggering moment.
[0143] Step S402: Output fault occurs, FltGen=1.
[0144] In this embodiment, when the waiting time Tx is reached, a signal FltGen = 1 is issued, indicating that a fault is about to occur. This step officially begins the fault injection phase, marking a turning point in the testing process. The output of FltGen = 1 is the result of the operation of the fault occurrence determination module, which is used to notify the entire system to initiate the fault generation process.
[0145] Step S403: output the fault random number Nx.
[0146] In this embodiment, once the system receives a signal indicating a fault has occurred, the random fault sequence number generation module will generate a sequence number Nx to indicate the specific fault type to be simulated in this test. The numerical range of Nx is limited by the lowest sequence number Nmin and the highest sequence number Nmax. Its generation mechanism ensures the random selection of the fault type for each test.
[0147] Step S404: Create a corresponding fault according to the fault sequence number Nx.
[0148] In this embodiment, according to the logic of the fault activation module, the system generates corresponding faults based on the randomly generated fault sequence number Nx, such as an oil pump communication failure or a pressure sensor failure. These steps are the core of the testing method and directly determine which specific faults are injected into the hybrid transmission control software to evaluate the software's fault handling mechanisms.
[0149] Step S405: Check whether the duration 2Tx is reached.
[0150] In this embodiment, the system continuously monitors the time until the preset fault duration, 2Tx, is reached to determine whether the fault has been cleared. This 2Tx determination ensures that the fault is triggered and cleared within a complete cycle, helping to assess the system's long-term performance and recovery capabilities under fault conditions.
[0151] Step S406: Output fault cleared, FltGen=0.
[0152] In this embodiment, when the system confirms that the duration 2Tx has ended, the output signal FltGen = 0, indicating that the fault should be cleared and the system is about to return to normal state. The above instruction triggers the fault clearing process, which is a key step in the transition from fault state to normal state in the test cycle.
[0153] Step S407: output a random fault sequence number Nx=0.
[0154] In this embodiment, when a fault is cleared, the system outputs a fault sequence number, Nx = 0, indicating that no faults are occurring and the system has returned to its initial, fault-free state. The output of Nx = 0 indicates system recovery, informing the fault activation module that it no longer needs to generate faults and should prepare for the next test cycle.
[0155] Step S408: Clear the corresponding fault.
[0156] In this embodiment, following the clear instruction, the system will execute a series of operations to ensure that all faults indicated by fault sequence number Nx are completely cleared and system performance is restored to normal levels. The clearing process may include steps such as resetting data, restoring communication links, and restarting the system to ensure that the hybrid transmission control software can be restored to its normal operating state.
[0157] In an embodiment of the present invention, a closed-loop, iterative fault testing method randomly generates fault times and fault types, achieving a comprehensive evaluation of the hybrid transmission control software. From the initial stage of waiting for the fault time Tx, to generating the corresponding fault based on Nx, to fault clearing and system status restoration, the above process covers the entire process from triggering the fault to evaluating the system response. By continuously looping through this process, the software's processing capabilities and potential problem points under different fault types can be effectively identified and located, thereby guiding software optimization and upgrades, and improving the reliability and safety of the hybrid transmission. This solves the technical problem of low fault generation and testing efficiency in vehicle control systems, achieving the technical effect of improving the fault generation and testing efficiency of vehicle control systems.
[0158] According to an embodiment of the present invention, a state control device for a vehicle control system is further provided. It should be noted that the state control device for a vehicle control system can be used to execute the state control method for a vehicle control system in the above embodiment.
[0159] Figure 5 Schematic diagram of a state control device of a vehicle control system according to an embodiment of the present invention. Figure 5 As shown, the state control device 500 of the vehicle control system may include: a first acquisition unit 502 , a first generation unit 504 and a control unit 506 .
[0160] The first acquiring unit 502 is configured to acquire target time information corresponding to the vehicle control system and determine state identification information corresponding to the target time information.
[0161] The first generating unit 504 is configured to generate a state triggering policy corresponding to the state type based on the target time information and the state identification information.
[0162] The control unit 506 is configured to control the vehicle control system to enter a target state of the state type according to the state triggering strategy in response to the current time being in the time period corresponding to the target time information.
[0163] In an embodiment of the present invention, the target time information corresponding to the vehicle control system is acquired by the first acquisition unit 502, and the state identification information corresponding to the target time information is determined; the state trigger strategy corresponding to the state type is generated based on the target time information and the state identification information by the first generation unit 504; and the control unit 506 responds to the current time being in the time period corresponding to the target time information and controls the vehicle control system to enter the target state of the state type according to the state trigger strategy, thereby solving the technical problem of low state control efficiency of the vehicle control system and achieving the technical effect of improving the state control efficiency of the vehicle control system.
[0164] According to an embodiment of the present invention, a vehicle control system fault testing device is further provided. It should be noted that the vehicle control system fault testing device can be used to execute the vehicle control system fault testing method in the above embodiment.
[0165] Figure 6 FIG. 1 is a schematic diagram of a fault testing device for a vehicle control system according to an embodiment of the present invention. Figure 6 As shown, the fault testing device 600 for the vehicle control system may include: a second acquisition unit 602 , a second generation unit 604 and a testing unit 606 .
[0166] The second acquiring unit 602 is configured to acquire fault time information corresponding to the vehicle control system and determine fault identification information corresponding to the fault time information.
[0167] The second generating unit 604 is configured to generate a fault testing strategy corresponding to the fault type based on the fault time information and the fault identification information.
[0168] The test unit 606 is used to control the vehicle control system to enter a fault state of the fault type in response to the current time being in the time period corresponding to the fault time information, according to the fault test strategy, and test the performance of the vehicle control system in the fault state of the fault type to obtain a test result.
[0169] In an embodiment of the present invention, the fault time information corresponding to the vehicle control system is acquired by the second acquisition unit 602, and the fault identification information corresponding to the fault time information is determined; the fault test strategy corresponding to the fault type is generated based on the fault time information and the fault identification information by the second generation unit 604; in response to the current time being in the time period corresponding to the fault time information, the test unit 606 controls the vehicle control system to enter a fault state of the fault type according to the fault test strategy, and tests the performance of the vehicle control system in the fault state of the fault type to obtain a test result, thereby solving the technical problem of low fault testing efficiency of the vehicle control system and achieving the technical effect of improving the fault testing efficiency of the vehicle control system.
[0170] According to an embodiment of the present invention, a computer-readable storage medium is further provided. The storage medium includes a stored program, wherein the program executes the above method in the embodiment of the present invention.
[0171] According to an embodiment of the present invention, a processor is further provided. The processor is configured to run a program, wherein the program executes the above method in the embodiment of the present invention when running.
[0172] According to an embodiment of the present invention, a vehicle is further provided, which is used to execute the above method in the embodiment of the present invention.
[0173] According to another aspect of an embodiment of the present invention, an electronic device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the above method of the embodiment of the present invention.
[0174] According to another aspect of an embodiment of the present invention, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, it implements the above method of the embodiment of the present invention.
[0175] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0176] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0178] The units described as separate components may or may not be physically separate, and 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0179] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0180] If the integrated unit is implemented in the form of 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 the present invention, 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program code.
[0181] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A state control method for a vehicle control system, characterized in that: include: Obtaining target time information corresponding to the vehicle control system, and determining state identification information corresponding to the target time information, wherein the target time information is used to indicate a time period corresponding to a target state to be entered by the vehicle control system, and the state identification information is used to indicate a state type of the target state that satisfies the target time information; generating a state triggering strategy corresponding to the state type based on the target time information and the state identification information, wherein the state triggering strategy is used to represent a rule for triggering the vehicle control system to enter a target state of the state type; In response to the current time being in the time period corresponding to the target time information, the vehicle control system is controlled to enter the target state of the state type according to the state triggering strategy.
2. The method according to claim 1, characterized in that The target time information is the time period consisting of the occurrence time of the target state and the clearing time of the target state. In response to the current time being within the time period corresponding to the target time information, controlling the vehicle control system to enter the target state of the state type according to the state triggering strategy includes: In response to the current time being the occurrence time, controlling the vehicle control system according to the state triggering strategy to enter a target state of the state type indicated by the state identification information; The method further includes: in response to the vehicle control system being in a target state of the state type and the current time being the clearing time, controlling the vehicle control system to adjust from the target state to a normal state.
3. The method according to claim 2, characterized in that Generating a state triggering strategy corresponding to the state type based on the target time information and the state identification information includes: After controlling the vehicle control system to adjust from the target state of the state type to the normal state, in response to the existence of next state identification information of the current state identification information in the state identification information corresponding to the target time information, a state trigger strategy for the state type corresponding to the next state identification information is generated based on the target time information and the next state identification information.
4. The method according to claim 3, characterized in that The method further comprises at least one of the following: In response to the state identification information not containing the next state identification information of the current state identification information, generating first prompt information, wherein the first prompt information is used to indicate that the target state triggering of the state identification information corresponding to the target time information is completed; In response to the state identification information not containing the next state identification information of the current state identification information and the target time information containing the next target time information of the current target time information, the next target time information is acquired.
5. The method according to claim 1, wherein The target time information includes maximum time information and minimum time information, and determining the state identification information corresponding to the target time information includes: In response to the target time information being greater than or equal to the minimum time information and less than or equal to the maximum time information, determining the state identification information corresponding to the target time information; The method further includes at least one of the following: in response to the target time information being less than the minimum time information or greater than the maximum time information, generating second prompt information, wherein the second prompt information is used to indicate that the target time information is not within the time period of the minimum time information and the maximum time information; In response to the target time information being smaller than the minimum time information or larger than the maximum time information, the next target time information of the current target time information in the target time information is acquired.
6. The method according to claim 5, characterized in that Determining state identification information corresponding to the target time information includes: In response to the current state identification information being greater than or equal to a minimum identification threshold and less than or equal to a maximum identification threshold, determining the current state identification information as the state identification information; In response to the current state identification information being less than the minimum identification threshold, or greater than the maximum identification threshold, and the next state identification information of the current state identification information being greater than or equal to the minimum identification threshold, and less than or equal to the maximum identification threshold, the next state identification information is determined as the state identification information.
7. A fault testing method for a vehicle control system, characterized in that: include: Obtaining fault time information corresponding to the vehicle control system, and determining fault identification information corresponding to the fault time information, wherein the fault time information is used to indicate a time period corresponding to a fault state to be entered by the vehicle control system, and the fault identification information is used to indicate a fault type that satisfies the fault state according to the fault time information; generating a fault test strategy corresponding to the fault type based on the fault time information and the fault identification information, wherein the fault test strategy is used to represent a rule for triggering the vehicle control system to enter a fault state of the fault type and testing the performance of the vehicle control system in the fault state; In response to the current time being in the time period corresponding to the fault time information, according to the fault testing strategy, the vehicle control system is controlled to enter a fault state of the fault type, and the performance of the vehicle control system in the fault state of the fault type is tested to obtain a test result.
8. The method according to claim 7, characterized in that The method further comprises: In response to the vehicle control system being in a normal state, acquiring first state data of the vehicle control system, wherein the first state data is used to represent a performance state of the vehicle control system in the normal state; Testing the performance of the vehicle control system in a fault state of the fault type to obtain a test result includes: In response to the vehicle control system being in the fault state of the fault type, acquiring second state data of the vehicle control system, wherein the second state data is used to represent a performance state of the vehicle control system in the fault state; The test result is determined based on the first status data and the second status data.
9. A processor, characterized in that: The processor is configured to run a program, wherein the program executes the method according to any one of claims 1 to 8 when running.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 8.