Intelligent automobile automation test system and method facing multi-device compatibility control
By using a unified scheduling and control core and multi-protocol adaptation layers for collaborative control, the problem of fragmented testing of CAN bus, serial port devices and vehicle infotainment screens in intelligent vehicles has been solved, achieving efficient end-to-end automated testing and improving testing efficiency and problem localization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI JIANGHUAI AUTOMOBILE GRP CORP LTD
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies cannot achieve unified scheduling and coordinated control of CAN bus, serial port devices and vehicle infotainment screen in intelligent vehicles, resulting in fragmented testing processes, low efficiency, inability to achieve end-to-end automation, and difficulty in problem diagnosis.
It adopts a unified scheduling and control core and a multi-protocol adaptation layer, and realizes parallel and collaborative automated control of CAN bus, serial port devices and vehicle screen through an event-driven state machine model. Combined with cross-thread data security bus and resolution adaptive unit, it ensures the real-time performance and consistency of data interaction.
It automates complex end-to-end testing scenarios, improves testing efficiency and quality, simplifies problem localization, and reduces maintenance costs.
Smart Images

Figure CN122151818A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive electronic automation testing technology, and in particular to an intelligent automotive automation testing system and method capable of simultaneously coordinating the control of CAN bus, serial port devices and vehicle infotainment screen. Background Technology
[0002] Currently, the testing and verification of intelligent vehicles heavily relies on the interaction and control of various heterogeneous devices within the vehicle. These mainly involve three categories of devices: the CAN bus network used for transmitting vehicle control signals, serial port devices used for communication with specific in-vehicle equipment (such as braking robots and programmable power supplies), and the in-vehicle infotainment screen (usually controlled via the ADB protocol) which serves as the core of human-machine interaction.
[0003] Currently, testing of the aforementioned multiple devices primarily employs fragmented and independent software tools. These include using CANoe to monitor the CAN bus, a serial port debugging assistant to communicate with serial devices, and the ADB command-line tool to operate the vehicle's infotainment system. This artificially fragmented testing process requires engineers to frequently switch between multiple software programs, manually trigger operations, and subjectively judge the results, resulting in low efficiency and an inability to achieve unattended, fully automated workflows. While some automated scripts exist for single protocols (such as CAPL scripts for CANoe and Python scripts for ADB), these scripts are independent and cannot directly interact or collaborate, making it difficult to construct complex end-to-end test scenarios involving multiple devices.
[0004] Industry attempts have focused on testing only single serial port devices, failing to address the parallel collaboration challenges of multiple device types. For instance, existing technologies are inadequate for complex scenarios requiring testing of specific CAN signals triggered by in-vehicle infotainment screen operations. Furthermore, the CAN logs, serial port data, and screenshots generated during testing are stored in a scattered manner, necessitating manual timestamp alignment across files during problem localization, resulting in extremely low diagnostic efficiency.
[0005] Therefore, there is an urgent need in this field for an automated testing solution that can uniformly schedule and collaboratively control a variety of heterogeneous devices, and has good compatibility and scalability. Summary of the Invention
[0006] In view of the above, the present invention aims to provide an intelligent vehicle automated testing system and method for multi-device compatibility control, which can realize parallel, collaborative and automated control of CAN bus, serial port devices and vehicle infotainment screen on a unified platform, so as to overcome the defects of existing technologies such as fragmented toolchain, inability to achieve end-to-end automation and difficulty in problem diagnosis.
[0007] The technical solution adopted in this invention is as follows:
[0008] In a first aspect, the present invention provides an automated testing system for intelligent vehicles oriented towards multi-device compatibility control, comprising:
[0009] A unified scheduling and control core is used to parse and execute predefined test case scripts; wherein, the test case scripts contain one or more sequentially arranged action instructions; and, the unified scheduling and control core internally adopts an event-driven state machine model, which triggers and schedules the execution of corresponding action instructions based on the current state and events received from different communication channels, and transitions to the next state.
[0010] The multi-protocol adaptation layer, used for communication with the unified scheduling and control core, includes the following functional modules:
[0011] The CAN communication module is used to connect to and monitor the vehicle's CAN bus, load the DBC database file to parse CAN messages, and provide a unified CAN message transmission and reception interface to the unified scheduling and control core.
[0012] The serial communication module is used to connect to and control one or more serial port devices, dynamically configure serial communication parameters, and provide a unified serial data read / write interface to the unified scheduling and control core.
[0013] The ADB control module is used to establish a connection with the vehicle's large screen via the ADB protocol, encapsulate ADB commands into function modules, and provide a unified vehicle control interface to the unified scheduling and control core.
[0014] The unified scheduling and control core achieves coordinated control of the CAN bus, serial port devices, and vehicle infotainment screen by calling the unified interface of each module in the multi-protocol adaptation layer, thus completing the automated testing process.
[0015] In at least one possible implementation, the unified scheduling control core further includes: a cross-thread data security bus;
[0016] The CAN communication module, serial communication module, and ADB control module each run in an independent thread, and each thread exchanges data with the event-driven state machine through the cross-thread data security bus.
[0017] The cross-thread data security bus specifically adopts a lock-free queue or thread-safe message queue mechanism to ensure the real-time performance and consistency of data interaction in a multi-threaded environment.
[0018] In at least one of the possible implementations, the CAN communication module further includes a hardware abstraction layer that encapsulates the differences in the underlying drivers of different brands of CAN cards and provides hardware-independent API interfaces for the upper layers.
[0019] In at least one of the possible implementations, the ADB control module further includes a resolution adaptive unit, which is used to automatically obtain the screen resolution of the vehicle's large screen after connection, and convert the logical coordinates based on the reference resolution in the test case script into the actual physical coordinates of the current screen in real time, so as to ensure the accuracy of UI operation instructions.
[0020] Secondly, the present invention also provides an automated testing method based on the above-mentioned system, applied to the above-mentioned testing system, comprising:
[0021] Step S1: After starting the system, load the test case script and establish connections with the CAN bus, target serial port device and vehicle screen through the multi-protocol adaptation layer respectively;
[0022] Step S2: The event-driven state machine of the unified scheduling and control core parses the current action instructions in the test case script and identifies the target device type, including CAN device, serial port device or ADB device.
[0023] Step S3: Based on the identified device type, the unified scheduling control core calls the unified interface of the corresponding module in the multi-protocol adaptation layer and passes in the parameters required to execute the action;
[0024] In step S4, the CAN communication module, serial communication module, and ADB control module listen to bus or device data in parallel in their respective threads, and when a specific event is detected, the event and its data are reported to the event-driven state machine through the cross-thread data security bus.
[0025] Step S5: The event-driven state machine triggers state transitions based on the current state and the received events, according to predefined test logic, and decides on the next action instruction to be executed; repeat steps S2 to S5 until the test case script is completed.
[0026] In at least one of the possible implementations, in step S3, when the unified scheduling control core calls the ADB control module interface to execute the corresponding operation, the resolution adaptive unit of the ADB control module automatically converts the logical coordinates in the script into the actual physical coordinates of the target vehicle screen before execution.
[0027] In at least one possible implementation, the testing method further includes:
[0028] Step S6: Record the timestamps, data content, event types, and state transition information of all modules' data transmission and reception according to a unified timeline to generate a comprehensive log containing the complete test context.
[0029] Compared to existing technologies, the main design concept of this invention lies in integrating vehicle operation, vehicle status monitoring, and external environment control into a single system. This allows for the execution of complex end-to-end test cases, featuring an event-driven state machine model and a unified timeline. This enables precise millisecond-level control over the timing of operations on devices using different protocols, meeting high-performance testing requirements. Furthermore, the adaptive design for hardware abstraction and resolution in the multi-protocol adaptation layer allows the system to easily handle hardware updates and parameter changes, significantly reducing maintenance costs. In addition, the logging system mentioned in some embodiments records all operations and feedback in a timeline, providing a unified and complete test context and greatly shortening problem localization time. Attached Figure Description
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings, wherein:
[0031] Figure 1 This is a flowchart illustrating an automated testing method for intelligent vehicles with multi-device compatibility control provided in an embodiment of the present invention. Detailed Implementation
[0032] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0033] This invention provides an embodiment of an intelligent vehicle automated testing system for multi-device compatibility control, which mainly includes: a unified scheduling and control core and a multi-protocol adaptation layer.
[0034] The unified scheduling and control core, acting as the system's brain, is responsible for parsing and executing user-written test case scripts. Internally, this core employs an event-driven state machine model. Each test case script is defined as a finite state machine, where each state corresponds to a test phase, and transitions between states are triggered by specific events. These events come from a wide range of sources, including user-preset instructions and real-time feedback from lower-level modules. This design enables the system to efficiently handle concurrent and asynchronous events, achieving precise control over complex test logic.
[0035] The multi-protocol adaptation layer is one of the key concepts of this invention. It provides a unified calling interface to the scheduling core at the top and encapsulates the complex details of interaction with different physical devices and protocols at the bottom. Specifically, it includes:
[0036] This CAN communication module is used for connecting to and monitoring the CAN bus. It supports loading standard DBC database files and can automatically parse raw CAN messages into physically meaningful signal values. Furthermore, to address compatibility issues arising from different hardware, the module incorporates a hardware abstraction layer that uniformly encapsulates the driver differences for mainstream CAN cards such as Vector, PEAK, and Kvaser, providing hardware-independent APIs for upper layers.
[0037] This serial communication module is used to connect and control multiple serial port devices. It supports dynamic configuration of serial port parameters, such as baud rate and data bits, and can manage multiple serial port devices simultaneously within a single program, providing an independent read / write channel for each device.
[0038] This ADB control module is used to connect to a large in-vehicle screen via USB or network. It encapsulates complex ADB commands, such as clicking, swiping, and taking screenshots, into simple function calls. In particular, to solve the problem of UI operation failure caused by differences in screen resolutions of different in-vehicle screens, this invention proposes to embed a resolution adaptive unit in the module. After connecting to the device, the unit automatically obtains the screen resolution and converts the logical coordinates based on the reference resolution in the test script into the actual physical coordinates of the current screen in real time, which greatly improves the portability of the script.
[0039] Furthermore, to ensure secure and efficient data interaction in a multi-threaded environment, the system also features a cross-thread data security bus. The three communication modules described above run in independent threads and communicate with the event-driven state machine via this bus, effectively avoiding resource contention and data inconsistency issues.
[0040] Corresponding to the above system embodiments, the present invention also provides an embodiment of an automated testing method based on the above system. Its core steps include: connection initialization, parsing and scheduling, instruction distribution and execution, parallel monitoring and event feedback, state transition and flow control, and unified log recording. This method, through an event-driven mechanism, uniformly feeds back events from different devices to a state machine, which then drives the testing process according to preset logic, truly achieving closed-loop collaboration among multiple devices.
[0041] For details, please refer to... Figure 1 As shown, it includes the following:
[0042] Step S1: After starting the system, load the test case script and establish connections with the CAN bus, target serial port device and vehicle screen through the multi-protocol adaptation layer respectively;
[0043] Step S2: The event-driven state machine of the unified scheduling and control core parses the current action instructions in the test case script and identifies the target device type, including CAN device, serial port device or ADB device.
[0044] Step S3: Based on the identified device type, the unified scheduling control core calls the unified interface of the corresponding module in the multi-protocol adaptation layer and passes in the parameters required to execute the action;
[0045] In step S4, the CAN communication module, serial communication module, and ADB control module listen to bus or device data in parallel in their respective threads, and when a specific event is detected, the event and its data are reported to the event-driven state machine through the cross-thread data security bus.
[0046] Step S5: The event-driven state machine triggers state transitions based on the current state and the received events, according to predefined test logic, and decides on the next action instruction to be executed; repeat steps S2 to S5 until the test case script is completed.
[0047] Additionally, the action instructions in the test case script can be described using a unified format, which includes at least an "action source" field for specifying the target device and an "action parameter" field for specifying the specific operation; the unified scheduling control core calls the corresponding functional module based on the value of the action source field (such as CAN, RS485, ADB).
[0048] Based on the aforementioned solution concept, the reference example provided below aims to test a typical scenario of a smart car: turning on the air conditioning via the vehicle's infotainment screen and verifying whether the air conditioning status signal on the vehicle's CAN bus changes accordingly. It should be noted that this use case involves the ADB control module operating the infotainment system and the CAN communication module monitoring the bus.
[0049] During the deployment phase of this automated testing system, the test PC configured with the system can first be connected to the vehicle's infotainment screen for ADB debugging via a USB cable, and connected to the vehicle's OBD interface via a CAN card (such as, but not limited to, Vector VN1640) to access the CAN bus. Simultaneously, depending on testing requirements, a programmable power supply for simulating battery status can be connected via a serial cable, but this is not involved in this example.
[0050] During the test execution phase of this automated testing system, the following steps are performed:
[0051] Initialization steps: Testers can write or select predefined test case scripts. After system startup, the unified scheduling control core loads the script and commands the multi-protocol adaptation layer to initialize. The CAN communication module loads the vehicle's DBC file, automatically identifies and connects to the Vector CAN card through the hardware abstraction layer, and begins listening to the bus. The ADB control module discovers the vehicle's infotainment device via USB, and its resolution adaptive unit automatically obtains the actual resolution of the vehicle's screen (e.g., 1920×1080), and converts the logical coordinates in the script in subsequent operations into physical coordinates at this resolution in real time.
[0052] Parsing and scheduling steps: The event-driven state machine of the unified scheduling control core enters the initial state S0 and parses out the first action instruction. The action source is ADB, and the action parameters are based on the script content, such as click and logical coordinates (e.g., 500, 1000). Then the state machine calls the click interface of the ADB control module and passes in the converted physical coordinates.
[0053] Command distribution and execution steps: After receiving the call, the ADB control module sends a touch screen click command to the vehicle's infotainment system via the ADB protocol. After the command is executed, the infotainment system should redirect to the air conditioning control interface and turn on the air conditioning. As those skilled in the art will understand, this is an asynchronous operation. After issuing the command, the ADB control module will immediately return a "command sent" status and continue listening for subsequent feedback in its thread.
[0054] Parallel Listening and Event Feedback Steps: Synchronously with the aforementioned steps, the CAN communication module continuously listens to the CAN bus in its independent thread. When the vehicle's air conditioning is turned on, a message containing the air conditioning status (AC Status) is broadcast on the CAN bus. The CAN communication module then parses the AC Status signal value as 1 based on the DBC file. Subsequently, the CAN communication module encapsulates this information into an event and sends it to the event-driven state machine via a cross-thread data safety bus, such as through a thread-safe message queue. The event content mentioned here may include: event source (CAN), signal name (AC Status), value (1), and timestamp (t1).
[0055] State transition and flow control steps: The event-driven state machine waits in state S0. When it receives an event indicating AC Status == 1 via the safety bus, it matches it with the expected state in the test script. If the match is successful, the state machine triggers a transition, entering the next state "Air conditioning is on," signifying the end of the test in this example. Of course, if the event is not received within a predetermined time, such as 5 seconds, a timeout event will be triggered, and the state machine will transition to the test failure state.
[0056] In addition to the above test method steps, the system can record all key information, including but not limited to the timestamp t0 of ADB command transmission, the content of the transmitted command, the timestamp t1 of CAN event, the event content, and the transition time of the state machine from S0 to S1, in a unified timeline format into a comprehensive log file.
[0057] Finally, it should be added that, regarding the special event of test failure mentioned above, such as not receiving AC Status == 1 within 5 seconds, simply check the comprehensive log file. Through the timeline, you can clearly understand whether the ADB command was successfully sent (t0), and what messages appeared on the CAN bus within 5 seconds after t0. If it is determined that there are no air conditioning-related CAN messages at all, it indicates that the problem may lie in the communication between the vehicle's infotainment system and the vehicle's CAN network. Alternatively, if messages appear but the signal values are incorrect, it may be a problem on the vehicle side. Thus, the above-mentioned log concept, which closely links operation and feedback, greatly improves the efficiency of problem localization.
[0058] In summary, as can be seen from the above specific embodiments, the present invention successfully integrates the two originally isolated processes of ADB operation and CAN monitoring into an automated closed loop through the precise collaboration of the event-driven unified scheduling core and the multi-protocol adaptation layer. This achieves automation of complex test scenarios that cannot be achieved by conventional single serial port test solutions, significantly improving test efficiency and quality.
[0059] In this invention, when directional terms are mentioned, they are relative concepts based on the embodiments. Furthermore, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0060] The above description of the structure, features, and effects of the present invention is based on the embodiments shown in the figures. However, the above are only preferred embodiments of the present invention. It should be noted that the technical features involved in the above embodiments and their preferred methods can be reasonably combined and matched by those skilled in the art to form a variety of equivalent solutions without departing from or changing the design concept and technical effects of the present invention. Therefore, the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. An automated testing system for intelligent vehicles with multi-device compatibility control, characterized in that, include: A unified scheduling and control core is used to parse and execute predefined test case scripts; wherein, the test case scripts contain one or more sequentially arranged action instructions; and, the unified scheduling and control core internally adopts an event-driven state machine model, which triggers and schedules the execution of corresponding action instructions based on the current state and events received from different communication channels, and transitions to the next state. The multi-protocol adaptation layer, used for communication with the unified scheduling and control core, includes the following functional modules: The CAN communication module is used to connect to and monitor the vehicle's CAN bus, load the DBC database file to parse CAN messages, and provide a unified CAN message transmission and reception interface to the unified scheduling and control core. The serial communication module is used to connect to and control one or more serial port devices, dynamically configure serial communication parameters, and provide a unified serial data read / write interface to the unified scheduling and control core. The ADB control module is used to establish a connection with the vehicle's large screen via the ADB protocol, encapsulate ADB commands into function modules, and provide a unified vehicle control interface to the unified scheduling and control core. The unified scheduling and control core achieves coordinated control of the CAN bus, serial port devices, and vehicle infotainment screen by calling the unified interface of each module in the multi-protocol adaptation layer, thus completing the automated testing process.
2. The intelligent vehicle automated testing system for multi-device compatibility control according to claim 1, characterized in that, The unified scheduling and control core also includes: a cross-thread data security bus; The CAN communication module, serial communication module, and ADB control module each run in an independent thread, and each thread exchanges data with the event-driven state machine through the cross-thread data security bus. The cross-thread data security bus specifically adopts a lock-free queue or thread-safe message queue mechanism to ensure the real-time performance and consistency of data interaction in a multi-threaded environment.
3. The intelligent vehicle automated testing system for multi-device compatibility control according to claim 1, characterized in that, The CAN communication module also includes a hardware abstraction layer, which encapsulates the differences in the underlying drivers of different brands of CAN cards and provides hardware-independent API interfaces for the upper layers.
4. The intelligent vehicle automated testing system for multi-device compatibility control according to claim 1, characterized in that, The ADB control module also includes a resolution adaptive unit, which is used to automatically obtain the screen resolution of the vehicle's large screen after connection, and convert the logical coordinates based on the reference resolution in the test case script into the actual physical coordinates of the current screen in real time to ensure the accuracy of UI operation commands.
5. An automated testing method for intelligent vehicles oriented towards multi-device compatibility control, applied to the testing system described in any one of claims 1 to 4, characterized in that, include: Step S1: After starting the system, load the test case script and establish connections with the CAN bus, target serial port device and vehicle screen through the multi-protocol adaptation layer respectively; Step S2: The event-driven state machine of the unified scheduling and control core parses the current action instructions in the test case script and identifies the target device type, including CAN device, serial port device or ADB device. Step S3: Based on the identified device type, the unified scheduling control core calls the unified interface of the corresponding module in the multi-protocol adaptation layer and passes in the parameters required to execute the action; In step S4, the CAN communication module, serial communication module, and ADB control module listen to bus or device data in parallel in their respective threads, and when a specific event is detected, the event and its data are reported to the event-driven state machine through the cross-thread data security bus. Step S5: The event-driven state machine triggers state transitions based on the current state and the received events, according to predefined test logic, and decides on the next action instruction to be executed; repeat steps S2 to S5 until the test case script is completed.
6. The intelligent vehicle automated testing method for multi-device compatibility control according to claim 5, characterized in that, In step S3, when the unified scheduling control core calls the ADB control module interface to execute the corresponding operation, the resolution adaptive unit of the ADB control module automatically converts the logical coordinates in the script into the actual physical coordinates of the target vehicle screen before execution.
7. The intelligent vehicle automated testing method for multi-device compatibility control according to claim 5 or 6, characterized in that, The testing method also includes: Step S6: Record the timestamps, data content, event types, and state transition information of all modules' data transmission and reception according to a unified timeline to generate a comprehensive log containing the complete test context.