Automated testing method and system for vehicle body control network communication signals

By parsing the CAN network database to generate signal files and constructing priority queues and real-time thread message sending queues, the complexity and system coupling issues of vehicle body control network testing are resolved, achieving efficient and multi-dimensional automated testing that is adaptable to different vehicle models and network designs.

CN121547378BActive Publication Date: 2026-03-31AUTOCORE INTELLIGENT TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies struggle to realistically simulate the complex communication environment of vehicle control networks, resulting in low testing efficiency, difficulty in achieving multi-dimensional high-precision analysis, high coupling between the testing system and hardware, inability to flexibly adapt to network changes, and low automation due to reliance on CANoe tools.

Method used

By parsing the vehicle CAN network database file, generating signal files, constructing priority queues and real-time thread message sending queues, automatically sending and receiving signals using CAN and Ethernet communication interfaces, analyzing communication timing and fault tolerance in real time, generating test reports, and achieving decoupling between the system and hardware.

Benefits of technology

It achieves fully automated testing, improves testing efficiency and coverage, supports multi-dimensional high-precision analysis, reduces reliance on manual operation, enhances the flexibility and reusability of the testing system, and adapts to different vehicle models and network designs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547378B_ABST
    Figure CN121547378B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle body control network communication signal automatic test method and system, comprising: analyzing a vehicle-mounted CAN network database file, extracting CAN bus, message ID, message name and signal name information, and generating a signal file; based on the signal file and a signal sending configuration file configured for each test signal, constructing a message sending queue through a priority queue and a real-time thread, sending a trigger CAN signal to a first to-be-tested hardware device based on the queue, triggering a second to-be-tested hardware device to run an Ethernet communication protocol executable file to send a trigger Ethernet signal to the first to-be-tested hardware device, receiving and recording response signals and time stamps of the to-be-tested hardware device; and analyzing signal values and communication timing and generating a test report. The application realizes automatic test, accurately coordinates multiple bus signal cooperation, forms a complete test closed loop, improves test efficiency and reliability, and is suitable for communication test of a vehicle body control multiple bus fusion architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronics testing technology, and in particular to an automated testing method and system for vehicle body control network communication signals. Background Technology

[0002] Modern automotive body control networks are becoming increasingly complex, consisting of multiple ECUs (such as BCM, gateways, PEPS, door and window modules, etc.) coordinating through various bus types including Controller Area Network (CAN), Local Interconnect Network (LIN), and in-vehicle Ethernet. The reliability, real-time performance, and accuracy of network communication directly affect the functional safety and user experience of the entire vehicle. Currently, testing body control network communication signals mainly faces the following challenges:

[0003] 1. Complex test scenarios, difficult to realistically simulate: Vehicle network communication involves complex interactions of multiple nodes and multiple messages. Traditional testing methods struggle to simulate the complex network environment of all ECU nodes being online simultaneously and communicating concurrently in a real vehicle, especially in reproducing critical scenarios such as network load peaks, bus errors, and abnormal node offline events.

[0004] 2. Difficulty in testing communication timing and fault tolerance mechanisms: Network communication has strict requirements on timing and fault tolerance mechanisms such as message period, response timeout, error frame handling, and bus sleep / wake-up. Manual testing or simple script tools are insufficient to accurately capture and verify these subtle timing logics and exception handling capabilities, easily overlooking deeper communication defects.

[0005] 3. Low testing efficiency and limited analysis dimensions: Relying on engineers manually operating bus tools (such as CANoe) to send specific messages and observe responses is extremely inefficient and results in severely insufficient test coverage. Furthermore, for massive amounts of communication data, there is a lack of automated, multi-dimensional analysis methods (such as periodicity, packet loss rate, and signal value changes), leading to insufficient test depth.

[0006] 4. High coupling between test cases and the test system: In existing test solutions, test logic is often strongly bound to specific test scripts or tool configuration files. When network design changes (such as changes in message IDs or signal definitions) or when testing new vehicle models, a large number of test scripts need to be modified or even rewritten, resulting in a large workload for adaptation and poor reusability and flexibility of the test system.

[0007] 5. The development of the CANoe underlying application interface (COM interface) is incomplete, making it impossible to directly obtain the full CAN signal information from the interactiveGenerator module's COM interface and then send the specified CAN signal, which affects the automation level of CANoe tool calls. Summary of the Invention

[0008] The technical objective of this application is to provide an automated, flexibly configurable, easily reusable and expandable method and system for testing vehicle body control network communication signals, addressing the aforementioned technical problems.

[0009] To achieve the above technical objectives, the embodiments of this application adopt the following technical solutions.

[0010] In a first aspect, embodiments of this application provide an automated testing method for vehicle body control network communication signals, including:

[0011] The vehicle CAN network database file is parsed to extract CAN bus, message ID, message name and signal name information, and a signal file is generated.

[0012] Based on the signal file and the signal transmission configuration file configured for each test signal, a script is executed to construct a message transmission queue based on a priority queue and a real-time thread, wherein the signal transmission configuration file contains at least the signal ID, signal priority, signal transmission period, and allowed signal transmission delay.

[0013] Through the CAN communication interface, based on the message sending queue, a trigger CAN signal is sent to the first hardware device under test, remotely triggering the second hardware device under test to run a pre-deployed Ethernet communication protocol executable file, so that the second hardware device under test sends a trigger Ethernet signal to the first hardware device under test. Under the excitation of the trigger CAN signal and the trigger Ethernet signal, the first hardware device under test executes the body control module function and generates a corresponding response signal.

[0014] The system receives and records in real time the CAN signal returned by the first hardware device under test and the response Ethernet signal and corresponding timestamp from the second hardware device under test. Based on the recorded signal data and timestamps, it analyzes whether the signal values ​​and communication timing meet expectations and generates a test report.

[0015] Secondly, embodiments of this application provide an automated testing system for vehicle body control network communication signals, comprising:

[0016] The host computer is used to execute the automated testing method for vehicle body control network communication signals as provided in any possible embodiment of the first aspect;

[0017] The first hardware device under test integrates CAN communication and Ethernet communication functions and is equipped with a body control module. It is used to receive the trigger CAN signal sent by the host computer through the CAN communication interface and the trigger Ethernet signal sent by the second hardware device under test. Under the excitation of the trigger CAN signal and the trigger Ethernet signal, it executes the body control module function and generates the corresponding response signal.

[0018] The second hardware device under test integrates Ethernet communication functionality and carries an Ethernet communication protocol executable file. It is used to run the Ethernet communication protocol executable file according to remote triggering by the host computer, send a trigger Ethernet signal to the first hardware device under test, and receive the corresponding response signal.

[0019] Compared with the prior art, the automated testing method and system for vehicle body control network communication signals provided in this application have the following beneficial technical effects:

[0020] 1. Fully automated process: From the application of test stimuli and the collection of responses to the determination of results, the entire process is completed automatically by the system, completely eliminating the reliance on manual operation.

[0021] 2. Multi-dimensional and high-precision automated analysis: Simultaneous testing of CAN and Ethernet signals not only checks the communication content, but also focuses on deeper quality attributes such as communication timing and fault tolerance. By replacing manual judgment with automated comparison, comprehensive, objective and repeatable testing is achieved.

[0022] 3. Decoupling of test logic from hardware: Based on signal files and signal sending configuration files, it can quickly adapt to network changes, has high reusability, and makes the writing of test cases independent of the underlying hardware scripts.

[0023] 4. Sending CAN signals via the CAN communication interface eliminates the dependence on CANoe tools during the testing process: There is no need to operate the CAN communication interface through the CANoe application software, avoiding the dependence of the entire functional testing process on tools and the COM interface of the testing tools, thus providing greater flexibility.

[0024] It should be understood that the summary section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0025] The accompanying drawings described herein are for illustrative purposes only and are not intended to limit the scope of this application in any way. In the drawings:

[0026] Figure 1 A schematic diagram of the automated testing method for vehicle body control network communication signals provided in this embodiment;

[0027] Figure 2 This is a schematic diagram of the automated testing system for vehicle body control network communication signals provided in an embodiment. Detailed Implementation

[0028] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0029] The terms "step s200", "step s201", "step s202" and "step s203" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or limiting the order of steps or implicitly specifying the number of technical features indicated.

[0030] like Figure 1 As shown, the automated testing method for vehicle body control network communication signals includes:

[0031] In step s200, the CAN DBC parsing module parses the vehicle CAN network database file, extracts CAN bus, message ID, message name and signal name information, and generates a signal file. Based on the signal file and the signal transmission configuration file configured for each test signal, the script is executed to build a message transmission queue based on a priority queue and a real-time thread. The signal transmission configuration file includes at least the signal ID, signal priority, signal transmission period and signal transmission allowable delay.

[0032] In this embodiment, the version of the software under test is updated, C++ Ethernet communication protocol test code is compiled to generate an executable file, and then uploaded to the hardware device under test.

[0033] In this embodiment, the signal file can be a signal YAML file, which stores the definitions of all CAN signals parsed from the vehicle network database file (.dbc).

[0034] In some embodiments, the signal transmission configuration file may be a signal transmission YAML configuration file. Optionally, the signal transmission YAML configuration file may also include the CAN interface type, CAN interface bit rate, CAN bus channel, etc.

[0035] In one embodiment, on a Windows host computer, a Python script calls the Claude Sonnect 4.4 SDK to parse multiple network database .dbc files based on pre-written AI prompts. This extracts information such as the CAN bus, message ID, message name, and signal name, storing this information in a signal YAML file for easy CAN signal retrieval in test cases. The AI ​​prompts primarily describe the .dbc file structure, .dbc parsing rules, and the expected signal content and format to be parsed.

[0036] When the vehicle network changes, the system only needs to call AI prompts to automatically update the DBC file and fine-tune the test cases, greatly improving the reusability and adaptability of the testing system. The system's modular design makes it easy to add new bus types (such as LIN and FlexRay).

[0037] In some embodiments, when the design of the network under test changes or a new vehicle model is tested, the Claude Sonnect 4.4 SDK is directly invoked to update the test script with AI assistance based on the written AI prompts: the CAN network database file is re-invoked to parse the AI ​​prompts, the modified .dbc file is parsed to generate a new yaml file, and the code related to sending / receiving / verifying signals in the test cases is automatically updated.

[0038] Step s201: The CAN signal receiving and transmitting module calls the script to remotely send / receive CAN signals through the CAN communication interface.

[0039] In this embodiment, the CAN communication interface is any one of the following: a separate CAN card, a CAN controller integrated into the host computer, or an external USB-CAN adapter.

[0040] In some embodiments, the CAN signal receiving and transmitting module remotely connects to the CAN card bus according to the signal YAML file, calls Python script library functions to connect the CAN card and corresponding channels, reads the signal values ​​(such as door unlocking signals) defined by the test cases from the signal YAML file and the signal transmitting YAML configuration file, and the corresponding signal ID, signal priority, transmission period, and whether delay is allowed. Based on the priority queue and real-time thread, it assembles CAN messages and transmits / receives CAN signals in real time. This enables the transmission logic to support concurrency and timing control, and also avoids the problem of not being able to obtain the available CAN signals to transmit under the interactiveGenerator module through the CANoe COM interface, reducing the dependence on CANoe applications.

[0041] In some embodiments, a monitoring and analysis module is simultaneously started by sending a trigger CAN signal to the first hardware device under test via the CAN communication interface based on the message sending queue, and performing real-time monitoring and error diagnosis on the CAN messages sent and received on the CAN communication interface channel.

[0042] In this embodiment, the monitoring and analysis module is CANoe software, and the host computer can implement the monitoring function by calling the application programming interface of CANoe software.

[0043] In this embodiment, while sending CAN signals, a script remotely calls the CANoe COM interface in parallel to load the default cfg file, add the network module and dbc, and then directly starts the CANoe software's real-time monitoring function to track transmitted and received signals, filter expected transmitted signals, confirm whether the signals were successfully sent / received, whether there were any error frames, and record the timestamps. If the signal transmission fails (e.g., a bus error), the script automatically retryes or records an error log.

[0044] Step s202, the Ethernet signal receiving and transmitting module involves compiling, deploying and executing Ethernet protocol test code to achieve integration testing with the CAN domain.

[0045] In one embodiment, the script calls a C++ Ethernet communication protocol function test script, compiles and generates an Ethernet communication protocol executable file using a cross-compilation chain, and remotely uploads the Ethernet communication protocol executable file to the second hardware device under test, ECU2, via SFTP.

[0046] In one embodiment, the Ethernet signal receiving and transmitting module calls a script to remotely log in to the second hardware device under test (ECU2) via SSH, initiates Ethernet communication, and realizes data conversion from the Ethernet domain to the CAN domain, transmitting / receiving Ethernet signals with the first hardware device under test (ECU1) in real time. This step s202 is executed synchronously and in coordination with step s201 based on priority queues and real-time threads, ensuring that CAN and Ethernet signals are coordinated in time according to priority and concurrency, simulating the multi-bus environment of a real vehicle network.

[0047] Step s203: The test result generation module calls the script to generate test results and test reports.

[0048] In one embodiment, the test result generation module analyzes the CAN signal returned in step s201 using a script. Simultaneously, it remotely connects to the second hardware device under test (ECU2) via SSH using a script to obtain and analyze the Ethernet response signal received in step s202, determines whether it meets the expected values ​​of the test case steps (such as door status, window status, etc.), calculates whether the message cycle and response delay are within tolerance, and generates an HTML test report using an open-source test report generation tool (Allure Test Report, Allure).

[0049] In this embodiment, the execution script constructs a message sending queue based on a priority queue and a real-time thread, enabling remote transmission of trigger CAN / ethernet signals required by the body control module function to different hardware devices under test, and real-time reception of CAN / ethernet signals returned by the body control module function of different devices under test, recording the sending / interface signal ID and sending / receiving timestamps.

[0050] For each signal to be sent, the signal ID, signal priority, signal sending period, and allowable signal sending delay are set in the form of a signal sending YAML configuration file.

[0051] This application also provides an automated testing system for vehicle body control network communication signals, such as... Figure 2 As shown, solid arrows indicate data flow, and each module is represented by a rectangle. The system includes:

[0052] host computer (e.g.) Figure 2 A Windows host computer is used to execute the automated testing method for vehicle body control network communication signals as provided in the above embodiments;

[0053] The first hardware device under test (ECU1) integrates CAN communication and Ethernet communication functions and is equipped with a body control module. It is used to receive the trigger CAN signal sent by the host computer through the CAN communication interface and the trigger Ethernet signal sent by the second hardware device under test. Under the excitation of the trigger CAN signal and the trigger Ethernet signal, it executes the body control module function and generates the corresponding response signal.

[0054] The second hardware device under test (ECU2) integrates Ethernet communication functionality and carries an Ethernet communication protocol executable file. It is used to run the Ethernet communication protocol executable file according to the remote triggering of the host computer, send a trigger Ethernet signal to the first hardware device under test, and receive the corresponding response signal.

[0055] In some embodiments, such as Figure 2 As shown, the CAN communication interface is a separate CAN card.

[0056] In some embodiments, the Windows host computer is responsible for executing test scripts, coordinating various hardware modules, generating reports, and providing AI-assisted functions. The Windows host computer is directly connected to the CAN card, and installs the CANoe software client and the test script dependency environment. It is used to execute automated test scripts for the body control module and retain test reports; to remotely connect to the CAN card to operate CAN signal transmission; to remotely connect to the CAN card to receive CAN signals and filter out target CAN signals; to remotely connect to the hardware under test, upload the Ethernet communication protocol executable file, trigger real-time Ethernet signal transmission and reception, and parse the received Ethernet signals; and to install and configure the Claude Code SDK execution environment, automatically parse the vehicle CAN network database file based on AI prompts, and automatically update the test scripts.

[0057] The CAN card is directly connected to the Windows host computer and is used to receive / send CAN signals in real time with the first hardware device under test, ECU1.

[0058] The first device under test (ECU1) is an embedded microcontroller-based device that integrates a CAN controller and an Ethernet MAC / PHY interface, and carries a body control module (MCU). It is used to receive and process CAN signals sent by the CAN card and Ethernet signals sent by the device under test, trigger and implement the functions of the body control module, and send response CAN signals and Ethernet signals.

[0059] The first hardware device under test receives the CAN signal sent by the CAN card and the Ethernet signal sent by the second hardware device under test, triggers the Body Control Module function, sends a response CAN signal to the Body Control Module, and sends a response Ethernet signal to the second hardware device under test.

[0060] The second device under test (ECU2) is responsible for Ethernet communication testing, executing protocol test code, and simulating a high-level network node. It carries an Ethernet communication protocol module (PCU) and a remotely uploaded Ethernet communication protocol executable file. This executable file is used to send body control module function trigger Ethernet signals to the first device under test, realizing data conversion from the Ethernet communication domain to the CAN domain, and receiving Ethernet response signals returned by the first device under test. ECU2 works closely with ECU1 to implement the complete body control module function.

[0061] This invention provides a highly automated, configurable, and reusable method and system for testing vehicle body control network communication signals. It enables comprehensive and efficient automated testing of the consistency, reliability, real-time performance, and fault tolerance of vehicle body network communication, reducing labor costs, improving testing efficiency and coverage, and enhancing the test system's adaptability to different vehicle models and network designs. Simultaneously, it avoids the impact of the lack of CANoe's underlying COM interface functionality on the feasibility of automating CAN card operation.

[0062] The above provides a detailed description of the automated testing method and system for vehicle body control network communication signals provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the concept of this application and should not be construed as limiting the scope of protection of this application.

Claims

1. A method for automated testing of body control network communication signals, characterized in that, The method comprises the following steps: parsing a vehicle CAN network database file to extract CAN bus, message ID, message name and signal name information, and generating a signal file; based on the signal file and a signal sending configuration file configured for each test signal, executing a script to construct a message sending queue based on a priority queue and a real-time thread, wherein the signal sending configuration file at least contains signal ID, signal priority, signal sending period and signal sending allowed delay; sending a trigger CAN signal to a first hardware device under test through a CAN communication interface based on the message sending queue, remotely triggering a second hardware device under test to run a pre-deployed Ethernet communication protocol executable file, so that the second hardware device under test sends a trigger Ethernet signal to the first hardware device under test, and the first hardware device under test executes a body control module function and generates a corresponding response signal under the excitation of the trigger CAN signal and the trigger Ethernet signal; receiving and recording the CAN signal returned by the first hardware device under test and the response Ethernet signal from the second hardware device under test in real time, and recording the corresponding time stamp, analyzing whether the signal value and communication timing meet the expectation based on the recorded signal data and time stamp, and generating a test report.

2. The vehicle body control network communication signal automated test method of claim 1, wherein, The method further comprises: starting a monitoring and analysis module synchronously while sending a trigger CAN signal to a first hardware device under test through a CAN communication interface based on the message sending queue, and performing real-time monitoring and error diagnosis on the CAN messages sent and received on the CAN communication interface channel.

3. The vehicle body control network communication signal automated testing method of claim 1, wherein, The method further comprises: calling an AI development kit and parsing a CAN network database file according to a preset parsing prompt word.

4. The vehicle body control network communication signal automated testing method of claim 3, wherein, The method further comprises: when the vehicle CAN network database file is changed, re-calling the AI development kit and parsing the CAN network database file according to the preset parsing prompt word to update the signal file, and automatically adapting or updating the signal sending and checking logic in the test case based on the updated signal file.

5. The vehicle body control network communication signal automated testing method of claim 1, wherein, The Ethernet communication protocol executable file is generated by cross-compiling the Ethernet communication protocol test code on the host computer and is remotely deployed to the second hardware device under test.

6. A body control network communication signal automated test system, characterized by, The method comprises the following steps: a host computer for executing the body control network communication signal automatic test method according to any one of claims 1-5; a first hardware device under test integrated with CAN communication function and Ethernet communication function and carrying a body control module, for receiving a trigger CAN signal sent by the host computer through a CAN communication interface and a trigger Ethernet signal sent by a second hardware device under test, and executing a body control module function and generating a corresponding response signal under the excitation of the trigger CAN signal and the trigger Ethernet signal; a second hardware device under test integrated with Ethernet communication function and carrying an Ethernet communication protocol executable file, for running the Ethernet communication protocol executable file according to the remote triggering of the host computer, sending a trigger Ethernet signal to the first hardware device under test and receiving a corresponding response signal.

7. The body control network communication signal automated test system of claim 6, wherein, The CAN communication interface is any one of a standalone CAN card, a CAN controller integrated in the host computer, or an external USB-CAN adapter.

8. The body control network communication signal automated test system of claim 6, wherein, The host computer is also configured with a monitoring and analyzing module for monitoring and analyzing CAN signals received and transmitted through the CAN communication interface in real time during testing.

9. The body control network communication signal automated test system of claim 8, wherein, The monitoring and analyzing module is CANoe software, and the host computer realizes the monitoring function by calling the application program interface of the CANoe software.

10. The body control network communication signal automated test system of claim 6, wherein, The host computer is deployed with an AI development kit running environment for automatically analyzing the vehicle-mounted CAN network database file according to a preset analysis prompt word by using the AI development kit.

Citation Information

Patent Citations

  • Vehicle electronic control unit CAN interface automatic test system and method

    CN107145140A

  • Vehicle-mounted Ethernet physical layer testing device and method

    CN112968810A