State machine testing method and apparatus, computer device, and storage medium

By simulating autonomous driving state machine test scenarios using virtual simulation technology, the problem of high costs associated with real-vehicle testing is solved, enabling efficient and safe state machine testing and ensuring the stability and safety of the autonomous driving system.

CN123155235APending Publication Date: 2026-11-24MUSHROOM CHELIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611200704.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

State machine testing in autonomous driving systems relies on extensive real-vehicle testing, leading to high costs and insufficient testing, which affects the safety of autonomous driving.

Method used

By using virtual simulation technology to simulate various road scenarios and conditions, configure the domain controller environment of the target vehicle, obtain simulated test data of the state machine test scenario, execute test process information, and output test results, the dependence on real vehicles is reduced.

Benefits of technology

It reduces the cost and time of state machine testing, improves testing efficiency, ensures the stability and reliability of state machines in actual operation, and reduces the threat to the life safety of test personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123155235A_ABST
    Figure CN123155235A_ABST
Patent Text Reader

Abstract

The application provides a state machine test method and device, computer equipment and a storage medium. The method comprises the following steps: configuring a domain controller environment corresponding to a target vehicle; obtaining simulation test data corresponding to a state machine test scene; based on the domain controller environment and the simulation test data corresponding to the state machine test scene, executing test flow information of the state machine under the state machine test scene, and obtaining a test result of the state machine under the state machine test scene. According to the scheme, the state machine test cost in the automatic driving system can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and more specifically, to a state machine testing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the continuous development of technology, autonomous driving technology is beginning to emerge. Among the various aspects of autonomous driving technology, the issue of state machine scheduling and execution within autonomous driving systems is receiving increasing attention. Stable operation of the state machine in an autonomous driving system is a prerequisite for ensuring its safety. However, current stability and functional testing of state machines in autonomous driving systems rely heavily on testing on numerous real vehicles, consuming significant human and material resources. Furthermore, insufficient vehicle resources may lead to inadequate testing, which could significantly impact autonomous driving. Therefore, a method is needed to reduce the testing cost of state machines in autonomous driving systems. Summary of the Invention

[0003] This application provides a state machine testing method, apparatus, computer equipment, and storage medium.

[0004] A first aspect of this application provides a state machine testing method, including: Configure the domain controller environment corresponding to the target vehicle; Obtain simulated test data corresponding to the state machine test scenario; Based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, the test process information of the state machine under the state machine test scenario is executed to obtain the test result of the state machine under the state machine test scenario.

[0005] In an optional embodiment of this application, configuring the domain controller environment corresponding to the target vehicle includes: Configure the environment parameters corresponding to the local server and the server parameters corresponding to the domain controller of the target vehicle to obtain the domain controller environment corresponding to the target vehicle.

[0006] In an optional embodiment of this application, obtaining the simulated test data corresponding to the state machine test scenario includes: The target module corresponding to the state machine is determined, and the target module simulation data corresponding to the target module is obtained. The target module is used to provide input data to the state machine. Based on the target module simulation data, scenario function data is constructed to obtain the simulation test data.

[0007] In an optional embodiment of this application, the target module includes at least one of a map engine module, a chassis CAN module, a fault management module, and a system function management module.

[0008] In an optional embodiment of this application, before configuring the domain controller environment corresponding to the target vehicle, the following steps are further included: If a version update event is detected for the release image file corresponding to the target vehicle, then the target release image file corresponding to the target vehicle is obtained; The state machine is determined from the target release image file corresponding to the target vehicle.

[0009] In an optional embodiment of this application, after executing the test process information of the state machine in the state machine test scenario based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, and obtaining the test result of the state machine in the state machine test scenario, the method further includes: Based on the test results of the state machine in the state machine test scenario, a visual test report data is generated. The data types corresponding to the visual test report data include email data types and / or WeChat Work data types.

[0010] In one optional embodiment of this application, the state machine test scenario includes at least one of the following: autonomous driving state machine transition scenario, vehicle gear standby abnormal scenario, vehicle trajectory generation abnormal scenario, vehicle trajectory verification abnormal scenario, autonomous driving rapid recovery scenario, autonomous driving self-start scenario, and chassis drive-by-wire system response timeout scenario.

[0011] A third aspect of this application provides a computer device, including: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0012] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method as described in any of the above. Attached Figure Description

[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram illustrating an application scenario of the state machine testing method provided in one embodiment of this application; Figure 2 A flowchart illustrating a state machine testing method provided in one embodiment of this application; Figure 3 A simplified automated process diagram for state machine testing provided in one embodiment of this application; Figure 4 This is a flowchart illustrating the configuration of the domain controller environment corresponding to the target vehicle according to one embodiment of this application; Figure 5 This is a schematic diagram of a process for obtaining simulated test data according to one embodiment of this application; Figure 6 A schematic diagram illustrating the process of updating the state machine test software version according to one embodiment of this application; Figure 7 This is a schematic diagram illustrating the process of visualizing state machine test results according to one embodiment of this application; Figure 8 A schematic diagram illustrating the test results of an email data type provided in one embodiment of this application; Figure 9 A schematic diagram illustrating the test results of the WeChat data type provided in one embodiment of this application; Figure 10 This is a schematic diagram of the state machine testing device provided in one embodiment of this application; Figure 11 This is a schematic diagram of a computer device structure provided in one embodiment of this application. Detailed Implementation

[0014] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0015] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0016] Please see Figure 1 , Figure 1This diagram illustrates an application scenario for state machine testing in an autonomous driving system. The state machine is a key component of an autonomous driving system and can be designed based on the principles of states, events, and transitions. The state machine is responsible for tracking the current state of the autonomous driving system, determining functional availability based on sensor data, vehicle state, and system inputs, and performing state transitions based on specific events and conditions. Specifically, the state machine relies on data from multiple sensors, such as radar, cameras, LiDAR, and millimeter-wave radar. These sensors provide information about the vehicle's surrounding environment, including the positions of other vehicles, pedestrians, and road signs. Through efficient data fusion algorithms, information about the surrounding environment can be integrated into a unified vehicle state perception, providing accurate input for the state machine's decisions. Furthermore, the state machine defines and maintains state and transition rules. Therefore, the state machine can also ensure that the system correctly performs its functions in different scenarios, such as obstacle avoidance, cruise control, and parking. For example, when the vehicle detects an obstacle ahead, the state machine may transition from a cruise state to an obstacle avoidance state.

[0017] With the continuous development of technology, autonomous driving technology is beginning to emerge. Among the various aspects of autonomous driving technology, the issue of state machine scheduling and execution within autonomous driving systems is receiving increasing attention. Stable operation of the state machine in an autonomous driving system is a prerequisite for ensuring its safety. Clearly, to adapt to changing road and traffic environments, the state machine in an autonomous driving system needs to undergo stability and functional testing.

[0018] However, testing the state machine in an autonomous driving system is a complex and systematic process, which can include module logic testing and vehicle robustness testing. Module logic testing refers to unit testing of each module and logic of the state machine to ensure that each module can correctly execute its function. Vehicle robustness testing refers to testing in different road environments to verify the stability and reliability of the state machine under real traffic conditions. Currently, the stability and functional testing of the state machine in autonomous driving systems relies on extensive testing on real vehicles, consuming significant manpower and resources. Furthermore, insufficient vehicle resources may lead to inadequate testing, which could significantly impact autonomous driving. Therefore, a method is needed to reduce the cost of state machine testing in autonomous driving systems while maintaining testing efficiency.

[0019] To address the aforementioned issues, the main solutions provided in this application include: In order to meet the prerequisite of low-cost state machine testing in autonomous driving systems, this application develops autonomous driving state machine testing software, that is, it uses virtual simulation technology to simulate various road scenarios, weather conditions and vehicle behaviors, and conducts a large number of tests, thereby significantly reducing the time and cost of real vehicle state machine testing. Specifically, in this application, firstly, the domain controller environment corresponding to the target vehicle needs to be configured. It is understood that in the past, extensive real-vehicle state machine testing in the industry required multiple domain controllers and various sensors. This application, however, simulates multiple domain controllers and sensors using autonomous driving state machine testing software, thereby significantly reducing the material costs of domain controllers and sensors. Secondly, simulated test data corresponding to the state machine test scenario is obtained; that is, the state machine test scenario is directly simulated using the autonomous driving state machine testing software, solving the problem of the difficulty in guaranteeing the life safety of test personnel under extreme conditions (some high-risk real-vehicle test scenarios). Finally, based on the domain controller environment and the simulated test data corresponding to the state machine test scenario, the test process information of the state machine under the state machine test scenario is executed to obtain the test results of the state machine under the state machine test scenario. In other words, this application does not require external sensor equipment, nor does it rely on real-vehicle data to be transmitted back to the server to construct scenarios. Based on the simulated test data corresponding to the self-constructed state machine test scenario, the test process information is executed, and the test results are output, thereby reducing the state machine testing cost in the autonomous driving system.

[0020] based on Figure 1 The scene shown below is an illustration; the following will combine... Figure 2 - Figure 9 The state machine testing method provided in the embodiments of this application will be described in detail.

[0021] Please see Figure 2 , Figure 2 This is a flowchart illustrating a state machine testing method provided in an embodiment of this application. Figure 2 As shown, the method in this application embodiment may include the following steps 101-103.

[0022] 101. Configure the domain controller environment corresponding to the target vehicle.

[0023] Specifically, the target vehicle involved in this application refers to an autonomous vehicle or a vehicle with autonomous driving functions that requires state machine testing in an autonomous driving system. It can also be a target vehicle model, which may include passenger vehicles or driverless vehicles. The target vehicle may be equipped with various sensors, actuators, and domain controllers to achieve autonomous driving functions. The domain controller environment corresponding to the target vehicle refers to a test environment built to simulate various states and conditions of the target vehicle in actual operation, including a domain controller (such as an autonomous driving domain controller) and its related software and hardware configuration. This environment can simulate various sensor inputs, actuator outputs, and internal state changes of the vehicle, providing necessary support for state machine testing.

[0024] Regarding configuring the domain controller environment for the target vehicle, one possible implementation is to build the test environment by configuring the environment parameters of the local server. These parameters include, but are not limited to, the operating system version, software dependencies, and network configuration. Simultaneously, it's also necessary to configure the server parameters corresponding to the target vehicle's domain controller, such as the domain controller model, firmware version, and communication protocol, to ensure that the test environment is as consistent as possible with the actual operating environment of the target vehicle. Another possible implementation is to utilize virtualization technologies (such as Docker and VMware) to create an isolated, repeatable test environment. This allows for more flexible configuration and management of the test environment, improving testing efficiency and accuracy.

[0025] 102. Obtain the simulated test data corresponding to the state machine test scenario.

[0026] Specifically, the state machine test scenarios involved in this embodiment refer to various situations and conditions that autonomous vehicles may encounter during autonomous driving. Therefore, state machine test scenarios can be used to simulate and verify whether the behavior of the state machine under different conditions meets expectations. In addition, state machine test scenarios include, but are not limited to, autonomous driving state machine transition scenarios, vehicle gear standby abnormal scenarios, vehicle trajectory generation abnormal scenarios, vehicle trajectory verification abnormal scenarios, autonomous driving rapid recovery scenarios, autonomous driving self-starting scenarios, and chassis drive-by-wire system response timeout scenarios, etc.

[0027] The simulated test data corresponding to state machine test scenarios refers to the various input data and expected output data generated to simulate these scenarios. Simulated test data can accurately reflect the various situations and conditions that autonomous vehicles may encounter in actual operation and is used to verify whether the behavior of the state machine meets expectations. Simulated test data can include the state machine's input data (such as sensor inputs, user commands, etc.) and expected output data (such as actuator outputs, state changes, etc.).

[0028] Regarding the acquisition of simulated test data corresponding to state machine test scenarios, one possible implementation involves first identifying the target modules corresponding to the state machine. These target modules may include a map engine module, a chassis CAN (Controller Area Network) module, a fault management module, and a system function management module. Then, based on the functions and characteristics of these target modules, corresponding simulated data is generated. For example, for the map engine module, simulated map data and path planning data can be generated; for the chassis CAN module, simulated sensor input data and actuator output data can be generated. Next, scenario function data is constructed based on this simulated data from the target modules to simulate various situations and conditions that autonomous vehicles may encounter in actual operation, including setting different input parameters, simulating different environmental conditions, and simulating different fault conditions. By comparing the input and expected output data of these simulated data, it is possible to verify whether the behavior of the state machine meets expectations, thereby discovering potential problems and defects in the autonomous driving of the target vehicle.

[0029] In another possible implementation, simulated test data can be generated based on historical data. First, raw historical data needs to be acquired from the actual operation of the autonomous vehicle. This raw historical data can include sensor input data, actuator output data, state change data, etc. Then, the raw historical data needs to be cleaned, organized, and analyzed to remove outliers and redundant data, resulting in processed historical data. Finally, based on the statistical characteristics and distribution patterns of the processed historical data, data generation tools or algorithms (such as random number generators, data fitting algorithms, etc.) can be used to generate simulated test data that closely resembles the actual situation.

[0030] 103. Based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, execute the test process information of the state machine in the state machine test scenario to obtain the test result of the state machine in the state machine test scenario.

[0031] Specifically, the test process information involved in this embodiment refers to a series of ordered steps and instructions used to guide the state machine's test execution in a specific test scenario. The test process information can cover the entire process from test initialization and execution to test result collection, ensuring that the test process can accurately and efficiently verify the state machine's functionality and performance. The test process information may include key elements such as a description of the test scenario, detailed explanations of the test steps, input of test data, and expected output.

[0032] Test results refer to the performance of the state machine under a specific test scenario after executing the test process information. Test results may be presented in the form of data or logs, and are used to evaluate whether the state machine works as expected. Test results may include the actual output data of the state machine, error logs, performance metrics (such as response time, processing speed, etc.), and records of any anomalies or failures.

[0033] Regarding the test process information for executing the state machine in the state machine test scenario, in one possible implementation, testers will first configure the test environment and test data according to the description of the test scenario and the detailed explanation of the test steps. Then, the test steps will be executed through automated testing tools (such as Jenkins, Docker, etc.) or manually, and the actual output data and logs of the state machine will be collected. During the test, testers will closely monitor the performance of the state machine to ensure it works as expected. If the state machine encounters anomalies or failures during the test, testers will record the relevant information and perform necessary debugging and repairs.

[0034] Furthermore, to improve testing efficiency and accuracy, testers implementing this solution can utilize test management tools (such as TestRail and Jira) to track and manage test process information, test results, and related defects and fixes. Test management tools can help testers better organize and manage testing work, ensuring the smooth progress of the testing process and enabling the timely identification and resolution of potential problems.

[0035] In summary, executing the test process information of the state machine in the state machine test scenario is one of the key steps in verifying the functionality and performance of the state machine of an autonomous vehicle. Through the test process information designed in this embodiment and the accurate collection of test results, it can be ensured that the state machine of the autonomous vehicle can operate stably and reliably in actual operation, thereby improving the testing efficiency of the state machine in the autonomous driving system while reducing the testing cost.

[0036] To facilitate understanding of the solution in this embodiment, a simple example is provided below for reference. Figure 3 , Figure 3 This is a simplified automated process diagram of state machine testing in an embodiment of this application, as shown below. Figure 3 As shown, state machine testing methods may include: First, query the target modules required for the input of the system state machine. The target modules are the map engine module, chassis CAN module, fault management module, and system function management module.

[0037] Secondly, based on the protocol of each target module and system state, a set of simulation data corresponding to each target module is developed.

[0038] Next, for the simulation data sets corresponding to each of the above target modules, functional scenario data is constructed to obtain simulation test data under each state machine test scenario. For example, in the vehicle gear standby abnormal scenario, the gear number value in the chassis data is constructed to be 3, and the simulation data of other modules is assigned normally to construct simulation test data for whether the self-driving can be started successfully in a non-D (drive) gear; in the chassis drive-by-wire system response timeout scenario, the self-driving mode field in the chassis data can be constructed to be 0 to construct simulation test data for the chassis timeout failure to start self-driving; in the vehicle trajectory generation abnormal scenario, the map engine data protocol status parameter is set to false, and the data of other modules is assigned normally to construct the case where the trajectory is not ready and self-driving cannot be completed, thus obtaining the simulation test data corresponding to the vehicle trajectory generation abnormal scenario; in the vehicle trajectory verification abnormal scenario, the md5 (Message-Digest Algorithm) value in the map engine data protocol is set to false. 5. (Fifth Edition Message Digest Algorithm) The value of the verification field does not match the value of the system status management field, so as to construct simulated test data under the condition that the trajectory cannot be verified; In the scenario of rapid recovery of autonomous driving, the beautification mode field of the system status management field is set to 1, so as to construct simulated test data under the condition of starting autonomous driving in beautification mode; In the scenario of autonomous driving starting on its own, the autonomous driving command in the system function management field is set to 1, so as to construct simulated test data under the condition of starting autonomous driving with operator_tool; In the scenario of autonomous driving state machine transition, the control state machine module outputs and publishes data normally, so as to construct simulated test data to test whether the state machine transition process is normal.

[0039] Next, the preset automated pipeline program is executed. The automated pipeline program is used to call simulated test data so that the state machine can subscribe to the simulated data set corresponding to each target module, thereby outputting key log data.

[0040] Then, based on key log data, disk data is collected to obtain disk data for each state machine test scenario. The key field information of the disk data for each state machine test scenario is queried through a preset script to obtain the scenario functional test results corresponding to each state machine test scenario. The scenario functional test results include whether the scenario passes or fails.

[0041] Finally, the scenario functional test results corresponding to each state machine test scenario are stored as a CSV file, and the scenario functional test results are visualized via email or WeChat Work.

[0042] The above-described solution allows the autonomous driving state machine testing software to simulate multiple domain controllers and various sensors, significantly reducing the material costs of these controllers and sensors. Furthermore, by directly simulating state machine test scenarios, the software addresses the issue of personnel safety in extreme conditions (such as high-risk real-vehicle test scenarios). Moreover, this application eliminates the need for external sensor equipment and avoids relying on real-vehicle data to construct scenarios. It executes test procedures and outputs test results based on simulated test data corresponding to self-constructed state machine test scenarios, thereby reducing the cost of state machine testing in autonomous driving systems.

[0043] Please see Figure 4 , Figure 4 This application provides a flowchart illustrating the process of configuring the domain controller environment corresponding to the target vehicle, as shown in the embodiment. Figure 4 As shown, the method in this embodiment of the application may include the following step 201, which can be used as a method for... Figure 2 The detailed steps of step 101 in the illustrated embodiment.

[0044] 201. Configure the environment parameters corresponding to the local server and the server parameters corresponding to the domain controller of the target vehicle to obtain the domain controller environment corresponding to the target vehicle.

[0045] Specifically, the local server involved in this embodiment refers to an open-source automation server that allows for the automation of continuous integration and continuous deployment processes. For example, the automation server in this embodiment could be a Jenkins server, which is typically used to automate the building, testing, and deployment of software applications, as well as monitoring the execution of external jobs. In this embodiment, the Jenkins local server is used to build and configure the automated testing process for the domain controller environment corresponding to the target vehicle.

[0046] The environment parameters for the Jenkins local server refer to a series of software and hardware configurations required to run and test the autonomous driving state machine, ensuring that the Jenkins server is compatible with the target vehicle's domain controller environment. These environment parameters include, but are not limited to, the operating system version (such as Ubuntu, CentOS, etc.), the Java version, necessary software dependencies (such as Maven, Gradle, and other build tools), network configurations (such as IP address, port number, firewall settings, etc.), and any special configurations related to testing (such as environment variables, path settings, etc.).

[0047] The server parameters corresponding to the target vehicle's domain controller refer to the configuration information related to the target vehicle's domain controller. These parameters ensure that the Jenkins server can correctly simulate and test the target vehicle's domain controller environment. The domain controller is one of the core components of an autonomous vehicle, responsible for processing data from various sensors and making decisions based on this data to control the vehicle's movement. The server parameters corresponding to the domain controller may include the domain controller's model, firmware version, communication protocol (such as CAN bus, Ethernet, etc.), and input / output interface configuration.

[0048] Regarding configuring the environment parameters for the local Jenkins server and the server parameters for the target vehicle's domain controller, one possible implementation involves first determining the hardware and software requirements of the Jenkins server, as well as the specific configuration requirements of the target vehicle's domain controller. Then, based on these requirements, the necessary software and hardware components are installed and configured on the Jenkins server. This may specifically include installing the operating system, Java environment, Jenkins server software, and any necessary plugins and dependencies. Simultaneously, the Jenkins server's network settings also need to be configured to ensure that the Jenkins server can communicate with the target vehicle's domain controller and other testing equipment.

[0049] Furthermore, testers also need to configure the corresponding server parameters on the Jenkins server according to the configuration requirements of the target vehicle's domain controller. This may include configuring parameters such as the domain controller model, firmware version, and communication protocol, as well as setting necessary input / output interface configurations. The above parameter settings must ensure that the Jenkins server can correctly simulate the target vehicle's domain controller environment and allow state machine testing to be performed in the simulated environment.

[0050] During configuration, testers also need to ensure the security and stability of the Jenkins server. This may include configuring appropriate user permissions and access controls, as well as implementing necessary security measures (such as firewalls, virus scans, etc.) to protect the test environment from malicious attacks and data breaches.

[0051] After configuration is complete, testers can verify the correctness of the Jenkins server and target vehicle domain controller environment configuration by running a series of test scripts. These tests can include simple network communication tests, data input / output tests, and basic state machine functionality tests. Through these tests, testers can ensure that the Jenkins server and target vehicle domain controller environment are correctly configured and ready for state machine testing.

[0052] Please see Figure 5 , Figure 5This application provides a schematic diagram of a process for obtaining simulated test data, as shown in the embodiments. Figure 5 As shown, the method in this embodiment may include steps 301-302, and steps 301-302 may be used as a method for... Figure 2 The detailed steps of step 102 in the illustrated embodiment.

[0053] 301. Determine the target module corresponding to the state machine and obtain the target module simulation data corresponding to the target module, wherein the target module is used to provide input data to the state machine; 302. Based on the target module simulation data, construct the scenario function data to obtain the simulation test data.

[0054] Specifically, in this embodiment, the target module corresponding to the state machine refers to a software or hardware component in the autonomous driving system that has direct data interaction with the state machine and is responsible for implementing specific functions. The target module may include, but is not limited to, a map engine module, a chassis CAN module, a fault management module, and a system function management module. Each target module undertakes different tasks during the operation of the autonomous vehicle, such as map navigation, chassis control, fault detection and handling, and system function management. The state machine receives input data and makes corresponding state transitions and output decisions through interaction with these target modules.

[0055] The target module simulation data refers to the virtual data generated for each target module to simulate various situations and conditions that an autonomous vehicle may encounter in actual operation. This virtual data accurately reflects the input and output characteristics of the target module during actual operation, as well as various abnormal situations that may occur. Regarding determining the target module corresponding to the state machine, in one possible implementation, testers first need to understand the overall architecture of the autonomous driving system and the functional requirements of the state machine. Then, by analyzing the input and output interfaces of the state machine, they determine the target modules that have direct data interaction with the state machine.

[0056] Regarding the acquisition of target module simulation data corresponding to the target module, in one possible implementation, testers can generate simulation data using professional data generation tools or algorithms based on the functional characteristics and actual operational requirements of the target module.

[0057] Specifically, regarding the construction of scenario functional data based on the target module simulation data to obtain the simulated test data, in one possible implementation, testers first need to determine the specific requirements and test objectives of the state machine test scenario. Then, based on these requirements and objectives, and combined with the target module simulation data, test scenarios capable of simulating various situations and conditions that autonomous vehicles may encounter in actual operation are constructed. This process may specifically include setting different input parameters, simulating different environmental conditions, and simulating different fault conditions.

[0058] When constructing test scenarios, it's crucial to ensure they comprehensively cover all functional and performance requirements of the state machine. For example, test scenarios can include the normal operation flow, exception handling flow, and fault recovery flow of the state machine. Simultaneously, testers must ensure the test scenarios are repeatable and verifiable to accurately evaluate and verify the state machine's behavior.

[0059] To achieve this goal, testers can utilize professional test management tools or platforms (such as TestRail, Jira, etc.) to manage and track test scenarios and test data. These tools can help testers better organize and manage testing work, ensure the smooth running of the testing process, and promptly identify and resolve potential issues.

[0060] After constructing the test scenario, testers can execute the tests using automated testing tools or manually, collecting the actual output data and logs of the state machine. Then, by comparing the actual output data with the expected output data (i.e., the expected output portion of the simulated test data), the testers can evaluate whether the state machine's behavior meets expectations. If the state machine's behavior does not meet expectations, testers need to perform necessary debugging and repairs, and re-execute the test until the state machine's behavior meets expectations.

[0061] Through the above steps, testers can construct accurate simulated test data based on target module simulation data and scenario function data, providing necessary support and assurance for state machine testing. Simultaneously, the simulated test data can also be used for subsequent test analysis and optimization, helping testers better understand the performance and stability of the state machine and providing strong support for the continuous improvement and optimization of autonomous driving systems.

[0062] In one embodiment, based on Figure 5 In the illustrated embodiment, the target module includes at least one of a map engine module, a chassis CAN module, a fault management module, and a system function management module.

[0063] Specifically, if the target module includes a map engine module, then the target module simulation data corresponding to the map engine module consists of simulated map data and path planning data. Specifically, this can include simulated road networks, traffic signals, intersections, obstacles, and path planning results based on this information, such as the optimal path and alternative paths. Through this process, the input and output characteristics of the map engine module in actual operation, as well as various navigation and path planning scenarios that may be encountered, can be accurately reflected.

[0064] In one feasible implementation, testers can use map data generation tools or algorithms to generate simulated map data and path planning data with different complexities and scenario characteristics based on the actual needs and test objectives of the autonomous driving system. This allows for the automatic generation of simulated data that meets the requirements according to preset rules and parameters, thereby greatly improving test efficiency and accuracy.

[0065] If the target module includes a chassis CAN module, then the simulated data for the corresponding target module consists of simulated sensor input data and actuator output data. Sensor input data can include vehicle status information such as vehicle speed, steering angle, acceleration, and brake pressure, while actuator output data can include control commands such as brake signals, acceleration signals, and steering signals. Through this process, the input and output characteristics of the chassis CAN module in actual operation, as well as various chassis control scenarios that may be encountered, can be accurately reflected.

[0066] In one feasible implementation, testers can acquire target module simulation data corresponding to the chassis CAN module. Using sensor data simulation software or hardware, they can generate simulated sensor input data and actuator output data with different vehicle states and control commands, based on the actual needs and test objectives of the autonomous driving system. This target module simulation data can simulate the chassis control behavior of the vehicle under different road conditions and driving modes, thereby helping testers better understand the performance and stability of the chassis CAN module.

[0067] If the target module includes a fault management module, then the target module simulation data corresponding to the fault management module consists of simulated fault data and fault handling result data. Specifically, it can include different types of fault information such as simulated sensor faults, actuator faults, and communication faults, as well as fault handling results based on this fault information, such as fault alarms, fault isolation, and fault recovery.

[0068] In one feasible implementation, testers can use fault simulation software or hardware to generate simulated fault data and fault handling result data with different fault types and levels, based on the actual needs and test objectives of the autonomous driving system. The target module simulation data corresponding to the fault management module can simulate the vehicle's fault handling behavior under different fault conditions, thereby helping testers better understand the performance and stability of the fault management module, as well as its impact on the safety and reliability of the autonomous driving system.

[0069] If the target module includes a system function management module, then the simulated data for the target module corresponding to the system function management module consists of simulated system status data and system control command data. The simulated system status data and system control command data can include simulated vehicle start-up, engine shutdown, cruise control, parking, and other system status information, as well as system control commands based on this status information, such as activating cruise control mode or performing a parking operation.

[0070] In one feasible implementation, testers can use system function simulation software or hardware to generate simulated system state data and system control command data with different system states and different control commands based on the actual needs and test objectives of the autonomous driving system. This helps testers better understand the performance and stability of the system function management module, as well as its impact on the overall function and user experience of the autonomous driving system.

[0071] Please see Figure 6 , Figure 6 This application provides a schematic diagram of the state machine test software version update process, as shown in the embodiment. Figure 6 As shown, the method in this embodiment may include steps 401-402. Steps 401-402 may be used as... Figure 2 The procedure is performed before step 101 in the illustrated embodiment.

[0072] 401. If a version update event of the release image file corresponding to the target vehicle is detected, then the target release image file corresponding to the target vehicle is obtained. 402. Determine the state machine from the target release image file corresponding to the target vehicle.

[0073] Specifically, the version update event of the target vehicle's corresponding release image file in this embodiment refers to the generation of a new release image file and the triggering of a version update event during the development or testing of the autonomous driving system, when the state machine test software version, function is updated, or vulnerabilities are fixed for the target vehicle. The version update event signifies a change in the target vehicle's software environment, which may necessitate retesting of the state machine to ensure the system's stability and reliability.

[0074] The target release image file for the target vehicle refers to an image file containing all necessary software components and configurations, created for updating or upgrading the state machine test software of the target vehicle. The target release image file can contain all necessary software elements such as the operating system, middleware, applications, and autonomous driving algorithms, and has already been compiled, packaged, and tested, allowing for direct deployment to the target vehicle. The target release image file is the foundation for updating and upgrading the state machine test software and a crucial prerequisite for performing state machine testing.

[0075] Regarding the acquisition of the target release image file corresponding to the target vehicle if a version update event is detected, in one possible implementation, the state machine testing software can detect the version update event of the release image file corresponding to the target vehicle by monitoring version update information on a version control system (such as Git) or software release platform. Once an update event is detected, the state machine testing software can automatically download or pull the latest target release image file and store it in a specified location for subsequent state machine testing.

[0076] Specifically, regarding determining the state machine from the target release image file corresponding to the target vehicle, in one possible implementation, the state machine testing software can identify and determine the location and related information of the state machine by parsing the software components and configuration files in the target release image file. This process involves analyzing and understanding the contents of the image file, including its file structure, dependencies, and configuration parameters. Through this process, the state machine testing software can accurately locate the state machine within the image file, as well as other related software components and configuration information.

[0077] It is important to note that in practical applications, the execution order of steps 401 and 402 may vary depending on specific needs and scenarios. In some cases, these two steps may need to be performed before configuring the domain controller environment (101) to ensure that the test environment is consistent with the latest software version. In other cases, these two steps may need to be performed after configuring the domain controller environment to test the state machine in a more realistic test environment. Therefore, flexible adjustments are required based on the actual situation during implementation.

[0078] Through the above solution, this embodiment can more flexibly respond to software version updates and changes during the development and testing of autonomous driving systems. By automatically detecting and obtaining the latest release image file and determining the state machine location and related information within it, an accurate and reliable testing environment and data support can be provided for subsequent state machine testing.

[0079] Please see Figure 7 , Figure 7 This application provides a flowchart illustrating the visualization of state machine test results, as shown in the embodiments below. Figure 7 As shown, the method in this embodiment may include the following step 501. Step 501 may be used as... Figure 2 The example shown is executed after step 103.

[0080] Step 501: Based on the test results of the state machine in the state machine test scenario, generate visualized test report data. The data types corresponding to the visualized test report data include email data types and / or WeChat Work data types.

[0081] The visualized test report data involved in this embodiment refers to the data set obtained after organizing, analyzing, and presenting the test results of the state machine in the state machine test scenario. The data set displays detailed information about the test results in an intuitive and easy-to-understand manner, including a description of the test scenario, the execution status of the test steps, a comparison between the actual output data and the expected output data of the state machine, and records of anomalies or failures that occurred during the test. The visualized test report data is usually presented in the form of charts, tables, logs, etc., thereby helping testers, developers, and relevant stakeholders to quickly understand the overview and details of the test results for subsequent debugging, optimization, and decision-making.

[0082] Specifically, the data type corresponding to the visual test report data refers to the specific format or medium used to store and transmit the visual test report data. In this embodiment, the data type includes email data type and / or WeChat Work data type, meaning that the test report data can be sent and received via email or instant messaging tools such as WeChat Work.

[0083] Specifically, you can refer to Figure 8 and Figure 9 , Figure 8 This is a schematic diagram illustrating the test results of email data types in an embodiment of this application. Figure 9 This is a schematic diagram illustrating the test results of the WeChat data type in this application embodiment; for example... Figure 8 and Figure 9As shown, email data types typically refer to data sent as email attachments or in the email body; this data can be files in formats such as documents, images, and tables. WeChat Work data types, on the other hand, refer to data sent through the WeChat Work platform; this data can be text messages, files, links, etc. Through these two data types, test report data can be easily conveyed to relevant personnel, enabling them to promptly obtain test results and perform subsequent processing.

[0084] Regarding the generation of visualized test report data based on the test results of the state machine in the state machine test scenario, in one possible implementation, the state machine testing software first collects the actual output data and logs of the state machine during the testing process, as well as information such as the execution status and test results of the test steps. Then, the state machine testing software organizes and analyzes this information, including calculating the test pass rate, identifying anomalies or failures, and statistically analyzing performance indicators. Next, the state machine testing software generates visualized test report data based on this information, including creating charts to display the distribution and trends of test results, creating tables to list detailed information about the test scenario, and recording logs of anomalies or failures. Finally, the state machine testing software sends the generated test report data to relevant personnel in email data type and / or WeChat Work data type format so that they can promptly obtain the test results and perform subsequent processing. In this process, the state machine testing software may utilize some automated tools or scripts to assist in generating test report data to improve efficiency and accuracy. Simultaneously, the state machine testing software may also adjust and optimize the format and content of the test report data according to actual needs to meet the reading and understanding needs of different personnel.

[0085] In one embodiment, based on Figure 2 The illustrated embodiment includes at least one of the following state machine test scenarios: autonomous driving state machine transition scenario, vehicle gear standby abnormal scenario, vehicle trajectory generation abnormal scenario, vehicle trajectory verification abnormal scenario, autonomous driving rapid recovery scenario, autonomous driving self-start scenario, and chassis drive-by-wire system response timeout scenario.

[0086] Specifically, if the state machine test scenario includes autonomous driving state machine transition scenarios, then the simulated test data corresponding to the autonomous driving state machine transition scenarios consists of simulated state machine input data and expected state machine output data. Specifically, the input data may include the vehicle's current state, sensor inputs (such as data from radar, cameras, and other perception devices), user commands, and the expected state machine transition results based on the input data.

[0087] If the state machine test scenario includes a vehicle gear idle abnormality scenario, then the simulated test data corresponding to the vehicle gear idle abnormality scenario consists of simulated vehicle gear data and related sensor and actuator data. This data may include gear sensor readings, vehicle speed, engine status, and the expected gear state and actuator output under these conditions.

[0088] If the state machine test scenario includes an abnormal vehicle trajectory generation scenario, then the simulated test data corresponding to the abnormal vehicle trajectory generation scenario is simulated map data and path planning data, as well as the expected vehicle trajectory generation result under these data.

[0089] If the state machine test scenario includes a vehicle trajectory verification anomaly scenario, then the simulated test data corresponding to the vehicle trajectory verification anomaly scenario is simulated map data and path planning data, as well as the expected trajectory verification result under these data.

[0090] If the state machine test scenario includes a rapid recovery scenario for autonomous driving, then the simulated test data corresponding to the rapid recovery scenario for autonomous driving consists of simulated vehicle state data and related sensor and actuator data, as well as the expected autonomous driving recovery result under these data.

[0091] If the state machine test scenario includes an autonomous driving self-start scenario, then the simulated test data corresponding to the autonomous driving self-start scenario consists of simulated vehicle state data and related sensor and actuator data, as well as the expected autonomous driving start result under these data.

[0092] If the state machine test scenario includes a chassis drive-by-wire system response timeout scenario, then the simulated test data corresponding to the chassis drive-by-wire system response timeout scenario consists of simulated chassis control commands and expected response results, as well as the chassis system response timeout under these commands.

[0093] Regarding the construction of functional scenario data based on the simulation data set corresponding to the target module, thereby obtaining simulated test data under each state machine test scenario, some possible implementations include, for example, in the vehicle gear standby abnormal scenario, constructing the gear number value as 3 in the chassis data, and assigning normal values ​​to the simulation data of other modules to construct simulated test data for whether autonomous driving can be started successfully in non-D gear; in the chassis drive-by-wire system response timeout scenario, the autonomous driving mode field in the chassis data can be constructed as 0 to construct simulated test data for the case where the chassis cannot start autonomous driving due to timeout; in the vehicle trajectory generation abnormal scenario, setting the map engine data protocol status parameter to false, and assigning normal values ​​to the data of other modules, to construct the case where the trajectory is not ready and autonomous driving cannot be achieved, thereby obtaining vehicle trajectory data. Simulated test data for abnormal trajectory generation scenarios; in the abnormal vehicle trajectory verification scenario, setting the MD5 verification field assignment in the map engine data protocol to be mismatched with the system state management field to construct simulated test data for trajectory verification failure; in the rapid recovery scenario of autonomous driving, setting the beautification mode field in the system state management field to 1 to construct simulated test data for autonomous driving startup in beautification mode; in the autonomous driving self-start scenario, setting the autonomous driving command in the system function management field to 1 to construct simulated test data for operator_tool startup of autonomous driving; in the autonomous driving state machine transition scenario, controlling the state machine module to output and publish data normally to construct simulated test data to test whether the state machine transition process is normal.

[0094] The above-described solution allows the autonomous driving state machine testing software to simulate multiple domain controllers and various sensors, significantly reducing the material costs of these controllers and sensors. Furthermore, by directly simulating state machine test scenarios, the software addresses the issue of personnel safety in extreme conditions (such as high-risk real-vehicle test scenarios). Moreover, this application eliminates the need for external sensor equipment and avoids relying on real-vehicle data to construct scenarios. It executes test procedures and outputs test results based on simulated test data corresponding to self-constructed state machine test scenarios, thereby reducing the cost of state machine testing in autonomous driving systems.

[0095] It should be understood that although the steps in the flowchart are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order constraint on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the diagram may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0096] Please see Figure 10 One embodiment of this application provides a state machine testing apparatus 1000, comprising: Configuration module 1010 is used to configure the domain controller environment corresponding to the target vehicle; The acquisition module 1020 is used to acquire simulated test data corresponding to the state machine test scenario; The execution module 1030 is used to execute the test process information of the state machine in the state machine test scenario based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, and to obtain the test result of the state machine in the state machine test scenario.

[0097] Optionally, the state machine testing device 1000 is used to: configure the environment parameters corresponding to the local server and the server parameters corresponding to the domain controller of the target vehicle, so as to obtain the domain controller environment corresponding to the target vehicle.

[0098] Optionally, the state machine testing device 1000 is used to: determine the target module corresponding to the state machine, and obtain the target module simulation data corresponding to the target module, wherein the target module is used to provide input data to the state machine; construct scenario function data based on the target module simulation data to obtain the simulation test data.

[0099] Optionally, the state machine testing device 1000 is used for: the target module including at least one of a map engine module, a chassis CAN module, a fault management module, and a system function management module.

[0100] Optionally, the state machine testing device 1000 is used to: if a version update event of the release image file corresponding to the target vehicle is detected, obtain the target release image file corresponding to the target vehicle; and determine the state machine from the target release image file corresponding to the target vehicle.

[0101] Optionally, the state machine testing device 1000 is used to: generate visualized test report data based on the test results of the state machine in the state machine test scenario, wherein the data type corresponding to the visualized test report data includes email data type and / or WeChat Work data type.

[0102] Optionally, the state machine testing device 1000 is used for: state machine testing scenarios including at least one of the following: autonomous driving state machine jump scenario, vehicle gear standby abnormal scenario, vehicle trajectory generation abnormal scenario, vehicle trajectory verification abnormal scenario, autonomous driving rapid recovery scenario, autonomous driving self-start scenario, and chassis drive-by-wire system response timeout scenario.

[0103] Specific limitations regarding the aforementioned state machine testing device can be found in the limitations of the state machine testing method described above, and will not be repeated here. Each module in the aforementioned state machine testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0104] In one embodiment, a computer device is provided, the internal structure of which can be as follows: Figure 11 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. The computer program, executed by the processor, can implement the state machine testing method described above. It includes: memory and a processor; the memory stores the computer program; and the processor executes the computer program to implement any step of the state machine testing method described above.

[0105] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, can perform any of the steps in the state machine testing method described above.

[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0110] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0111] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A state machine testing method, characterized in that, include: Configure the domain controller environment corresponding to the target vehicle; Obtain simulated test data corresponding to the state machine test scenario; Based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, the test process information of the state machine under the state machine test scenario is executed to obtain the test result of the state machine under the state machine test scenario.

2. The method according to claim 1, characterized in that, The domain controller environment corresponding to the target vehicle is configured, including: Configure the environment parameters corresponding to the local server and the server parameters corresponding to the domain controller of the target vehicle to obtain the domain controller environment corresponding to the target vehicle.

3. The method according to claim 1, characterized in that, The acquisition of simulated test data corresponding to the state machine test scenario includes: The target module corresponding to the state machine is determined, and the target module simulation data corresponding to the target module is obtained. The target module is used to provide input data to the state machine. Based on the target module simulation data, scenario function data is constructed to obtain the simulation test data.

4. The method according to claim 3, characterized in that, The target module includes at least one of the following: map engine module, chassis CAN module, fault management module, and system function management module.

5. The method according to claim 1, characterized in that, Before configuring the domain controller environment corresponding to the target vehicle, the following is also included: If a version update event is detected for the release image file corresponding to the target vehicle, then the target release image file corresponding to the target vehicle is obtained; The state machine is determined from the target release image file corresponding to the target vehicle.

6. The method according to claim 1, characterized in that, After obtaining the test results of the state machine in the state machine test scenario by executing the test process information of the state machine in the state machine test scenario based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, the method further includes: Based on the test results of the state machine in the state machine test scenario, a visual test report data is generated. The data types corresponding to the visual test report data include email data types and / or WeChat Work data types.

7. The method according to claim 1, characterized in that, The state machine test scenarios include at least one of the following: autonomous driving state machine transition scenario, vehicle gear standby abnormal scenario, vehicle trajectory generation abnormal scenario, vehicle trajectory verification abnormal scenario, autonomous driving rapid recovery scenario, autonomous driving self-start scenario, and chassis drive-by-wire system response timeout scenario.

8. A state machine testing device, characterized in that, include: The configuration module is used to configure the domain controller environment corresponding to the target vehicle; The acquisition module is used to acquire simulated test data corresponding to the state machine test scenario; The execution module is used to execute the test process information of the state machine in the state machine test scenario based on the simulated test data corresponding to the domain controller environment and the state machine test scenario, and to obtain the test result of the state machine in the state machine test scenario.

9. A computer device, comprising: The method includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.