Automotive electronic controller scenario testing method, system, storage medium, and device

By recording vehicle messages, reconstructing and building timing logic, the problem of being unable to simulate changes in the vehicle environment in existing technologies is solved, enabling efficient scenario testing of automotive electronic controllers and meeting the safety and stability requirements of intelligent connectivity and intelligent driving.

CN119065977BActive Publication Date: 2026-01-06CHERY NEW ENERGY AUTOMOBILE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411163139.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2026-01-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Existing technologies cannot fully simulate the changes in various factors of automotive electronic controllers in the actual vehicle environment during bench testing, resulting in the inability to realistically simulate complex scenarios and meet the high safety and stability requirements of intelligent connectivity and intelligent driving.

Method used

By recording the messages of the whole vehicle under predetermined scenarios, a scenario message library is established, scenario test cases are written and decomposed, message reconstruction and timing logic construction are carried out based on the message library, scenario testing is carried out in conjunction with external devices, and Python and CANoe software are used to control signal input and timing logic.

Benefits of technology

It achieves a high degree of simulation of automotive electronic controllers, ensuring that network signals are consistent with real-world scenarios, simulating non-signal information, meeting the testing requirements of complex scenarios, and improving the effectiveness and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065977B_ABST
    Figure CN119065977B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of software testing, and provides a vehicle electronic controller scene test method, a system, a storage medium and equipment, the method comprises the following steps: recording the message generated by the whole vehicle under a predetermined scene, and establishing a scene message library; writing and decomposing a scene test case; based on the scene message library, message reconstruction is carried out, and the reconstructed message is obtained; based on the reconstructed message, combined with external equipment, a timing logic is constructed, and scene testing is carried out. The vehicle electronic controller scene test method of the application records the message information of the real scene, and analyzes and normalizes the message information, so that the network signal is completely the same as the real scene, and the simulation of non-signal information is realized by combining with the peripheral equipment, and the high simulation of the scene is realized through effective timing control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to a method, system, storage medium, and device for scenario testing of automotive electronic controllers. Background Technology

[0002] Automotive electronic controllers are playing an increasingly important role in automotive systems. With the continuous application of intelligent connectivity and autonomous driving in the automotive industry, the software complexity of automotive electronics is growing exponentially. The automotive industry's higher requirements for safety and stability have also increased the difficulty of software testing, requiring consideration of more complex scenarios.

[0003] Currently, in bench testing of automotive electronic controllers, the application of scenario-based testing is limited to designing simple scenarios for testing a single controller. Furthermore, for error scenarios accumulated through project experience, only the main steps of the scenario are extracted for testing. This results in the inability to consider the instantaneous changes of various factors in the actual vehicle environment and to truly simulate real-world scenarios. Summary of the Invention

[0004] To address the above problems, this invention proposes a scenario testing method for automotive electronic controllers, the method comprising:

[0005] Record the messages generated by the vehicle in predetermined scenarios and establish a scenario message database;

[0006] Write and break down scenario test cases;

[0007] Based on the scenario message library, message reconstruction is performed to obtain the reconstructed message;

[0008] Based on the reconstructed message, and in conjunction with external devices, timing logic is constructed for scenario testing.

[0009] Furthermore,

[0010] The predetermined scenarios include:

[0011] Specific scenarios refer to specific scenarios designed based on testing requirements;

[0012] A single scenario refers to a single operational scenario on the entire vehicle in which each function is operated.

[0013] Timing scenarios refer to the sequence of events from power-on to operation of various controllers and then to power-off.

[0014] Error scenarios refer to the situations in which defects are discovered during testing.

[0015] Furthermore,

[0016] The scenario test cases can be designed based on a single scenario or a complex scenario.

[0017] Furthermore,

[0018] The message reconstruction based on the scenario message library specifically includes:

[0019] Convert message format;

[0020] Perform redundancy optimization on the messages;

[0021] Design message;

[0022] Establish a mapping relationship between functions, message signal names, and message signal values;

[0023] Perform message timing reconstruction;

[0024] Reverse conversion of message format.

[0025] Furthermore,

[0026] The scenario testing based on the reconstructed message, combined with external devices, specifically includes:

[0027] Based on the reconstructed message, and in conjunction with external devices, timing logic is constructed;

[0028] The timing logic is invoked via Python, and the invocation strategy of the timing logic is adjusted based on the information fed back from the automotive electronic controller in order to conduct scenario testing.

[0029] Furthermore,

[0030] The timing logic is controlled by the external device and CANoe software.

[0031] Furthermore,

[0032] The external device is controlled by the Python software to provide non-signal input to the automotive electronic controller; the CANoe software is responsible for controlling the playback of the reconstructed message to provide signal input to the automotive electronic controller.

[0033] The present invention also provides an automotive electronic controller scenario testing system for implementing the aforementioned automotive electronic controller scenario testing method, the system comprising:

[0034] The message library creation module is used to record the messages generated by the vehicle in a predetermined scenario and to create a scenario message library;

[0035] The scenario test case writing and decomposition module is used to write and decompose scenario test cases;

[0036] The message reconstruction module is used to reconstruct messages based on the scenario message library and obtain the reconstructed messages.

[0037] The scenario testing module is used to construct timing logic based on the reconstructed messages and in conjunction with external devices to conduct scenario testing.

[0038] The present invention also provides a computer-readable storage medium storing a program or instructions that, when run on a computer, cause the computer to execute the aforementioned automotive electronic controller scenario testing method.

[0039] The present invention also provides an electronic device, including a processor coupled to a memory; the processor is used to read and execute a computer program stored in the memory to implement the aforementioned automotive electronic controller scenario testing method.

[0040] Compared with the prior art, the beneficial effects of this invention are:

[0041] By recording and analyzing real-world message information, and then refining the message information, the network signal is made to be completely identical to the real-world scenario. At the same time, non-signal information is simulated by using peripheral devices, and a high degree of simulation of the scenario is achieved through effective timing control. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating the scenario testing method for the automotive electronic controller of the present invention.

[0044] Figure 2 This is a schematic diagram of the automotive electronic controller scenario testing system of the present invention;

[0045] Figure 3 This is a schematic diagram of the structure of the electronic device of the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] Furthermore, in order to gain a deeper understanding of this invention, some of the terms used herein are explained as follows:

[0048] CANoe software refers to a graphical development software that integrates bus simulation, test analysis, and diagnostics.

[0049] The automotive electronic controller, also known as the automotive electronic control unit, is called an ECU (Electronic Control Unit). It is a comprehensive control device for the engine. Based on its stored programs, it calculates, processes, and judges various information input from the engine's sensors, then outputs commands to control the actions of relevant actuators, achieving the goal of fast, accurate, and automatic engine control.

[0050] like Figure 1 As shown, the automotive electronic controller scenario testing method of the present invention specifically includes the following steps:

[0051] S101: Record the messages generated by the vehicle in a predetermined scenario and establish a scenario message library.

[0052] When testing automotive electronic controllers, it is necessary to consider the impact of various factors in the actual vehicle environment on the electronic controllers. Therefore, CANoe software is used to comprehensively record the messages generated by the vehicle in the predetermined scenarios in order to establish a scenario message library.

[0053] The message formats include: ASCII (hereinafter referred to as ASC) and BLF.

[0054] The message information includes: signal name, signal value, timestamp, byte length, and frame rate.

[0055] The planned scenarios include:

[0056] a) Specific scenario refers to a specific scenario designed based on testing requirements, in which the vehicle operates according to the specific scenario and records all messages.

[0057] b) Single scenario refers to a single operation scenario on the whole vehicle where each function is operated and all messages are recorded.

[0058] c) Timing scenario, which refers to the timing scenario from power-on to operation of each controller and then to power-off, operating according to the timing and recording all messages.

[0059] d) Error scenarios refer to the scenarios in which defects are discovered during testing. When a defect is discovered, a message is recorded.

[0060] The above message can also be used as a signal input for typical error scenarios.

[0061] S102: Write and decompose scenario test cases.

[0062] Based on the functions of the automotive electronic controller to be tested, scenario test cases are designed based on single or complex scenarios.

[0063] For complex scenarios, which involve multiple operating conditions, it is necessary to decompose them into a combination of multiple simple scenarios. These simple scenarios should be those involved in the scenario message library.

[0064] It is worth noting that when writing and decomposing scenario test cases, new features may be added. Since the scenario message library does not contain the new features, the new features need to be associated with the time sequence scenarios in the scenario message library.

[0065] S103: Based on the scenario message library, perform message reconstruction and obtain the reconstructed message.

[0066] The specific process is as follows:

[0067] S103-1: Convert message format.

[0068] The information from the scenario message library is parsed into Excel using Python to facilitate subsequent processing. Additionally, it needs to be associated with signal names based on the signal list matrix.

[0069] S103-2: Redundancy optimization of messages.

[0070] During step S101, redundant and invalid messages were generated because operations unrelated to the predetermined scenario were unavoidably performed. To ensure the accuracy of the messages, these redundant and invalid messages need to be removed. Simultaneously, messages issued by the automotive electronic controller itself also need to be removed.

[0071] S103-3: Design message.

[0072] For simple scenarios, the solution is to modify and reconstruct similar message fragments from the time-series scenario messages. For complex scenarios, the complex scenario needs to be decomposed into multiple simple scenarios, and the simple scenarios need to be combined according to a certain time sequence.

[0073] S103-4: Establish the mapping relationship between function, message signal name and message signal value.

[0074] The signal names and signal values ​​in the message correspond to different functions. Under different projects, the signal names and signal values ​​corresponding to the same function are different. Therefore, it is necessary to establish a mapping relationship between function, message signal name and message signal value at the project level so as to update the message according to the mapping relationship.

[0075] S103-5: Perform message timing reconstruction.

[0076] When reconstructing messages, the triggering timing of each signal will inevitably fail to fully meet the requirements of the new project, so message timing reconstruction is necessary.

[0077] S103-6: Reverse conversion of message format.

[0078] Since the information reconstructed through steps S103-1 to S103-5 is stored in Excel and cannot be directly accessed by the CANoe software, it is necessary to use Python to convert the information in Excel into a format that can be directly accessed by the CANoe software, namely ASC and BLF formats.

[0079] S104: Based on the reconstructed message and combined with external devices, construct timing logic and conduct scenario testing.

[0080] S104-1: Based on the reconstructed message and combined with external devices, construct timing logic.

[0081] The timing logic is constructed by jointly controlling external devices and CANoe software. Specifically, the external devices include programmable power supplies, controllable resistors, and switching relays. The non-signal inputs to the automotive electronic controller are realized by controlling the programmable power supply, controllable resistors, and switching relays through Python. The CANoe software is responsible for controlling the playback of the reconstructed messages to realize the signal inputs to the automotive electronic controller.

[0082] S104-2: Using Python to call the timing logic, the calling strategy of the timing logic is adjusted based on the information fed back from the automotive electronic controller in order to conduct scenario testing.

[0083] By calling the timing logic through Python, the automotive electronic controller will provide real-time feedback messages during the test. The control timing logic is adjusted based on the real-time feedback messages from the automotive electronic controller to ensure that the non-signal control of the automotive electronic controller by external devices and the signal control of the automotive electronic controller by the CANoe software are mutually compatible.

[0084] In the second embodiment, step S102 can be placed after S103 and before S104. As long as the writing and decomposition of the scenario test cases are completed before the calculation of S104, the requirements can be met.

[0085] Embodiments of the present invention also provide a scenario testing system for automotive electronic controllers, such as... Figure 2 As shown, it includes:

[0086] The message library creation module 201 is used to record the messages generated by the vehicle in a predetermined scenario and to create a scenario message library.

[0087] The scenario test case writing and decomposition module 202 is used to write and decompose scenario test cases.

[0088] The message reconstruction module 203 is used to reconstruct messages based on the scenario message library.

[0089] The scenario testing module 204 is used to perform scenario testing based on the reconstructed message and in conjunction with external devices.

[0090] It should be noted that the above-mentioned message library establishment module 201, scenario test case writing and decomposition module 202, message reconstruction module 203 and scenario testing module 204 correspond to steps S101 to S104 in the embodiment of the automotive electronic controller scenario testing method. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.

[0091] Embodiments of the present invention also provide a computer-readable storage medium storing a program or instructions that, when executed on a computer, cause the computer to perform the automotive electronic controller scenario testing method as described in the above method embodiments.

[0092] like Figure 3 As shown, embodiments of the present invention also provide an electronic device, including: a processor 301 coupled to a memory 302, the processor 301 being used to read and execute a computer program stored in the memory 302 to implement the automotive electronic controller scenario testing method as described in the above method embodiments. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of testing a scenario for an automotive electronic controller, the method comprising: Comprise: Record the message generated by the whole vehicle in the predetermined scene, establish a scene message library, the predetermined scene includes: Specific scene, refers to the specific scene designed based on test requirements; Single scene, refers to a single operation scene on the vehicle for each function; Timing scene, refers to the timing scene from power-on to operating each controller to power-off; Error scene, refers to the scene when defects are found in the test process; Write and decompose scene test cases; Based on the scene message library, message reconstruction is carried out to obtain the reconstructed message, which specifically includes: Convert message format; Optimize message redundancy; Design message; Establish the mapping relationship of function, message signal name and message signal value; Message timing reconstruction; Reverse message format conversion; Based on the reconstructed message, combined with external equipment, construct timing logic and carry out scene test.

2. The method of claim 1, wherein, The scene test case is designed based on single scene or complex scene.

3. The method of claim 1, wherein, Based on the reconstructed message, combined with external equipment, carry out scene test, specifically including: Based on the reconstructed message, combined with external equipment, construct timing logic; Through Python calling the timing logic, adjust the calling strategy of the timing logic through the information feedback of the automotive electronic controller to carry out scene test.

4. The method of claim 3, wherein, The timing logic is controlled by the external equipment and CANoe software.

5. The method of claim 4, wherein, Through the Python control of the external equipment, the non-signal input of the automotive electronic controller is realized; the CANoe software is responsible for controlling the playing of the reconstructed message, realizing the signal input of the automotive electronic controller.

6. An automotive electronic controller scenario testing system, characterized by, Comprise: Message library establishment module, for recording the message generated by the whole vehicle in the predetermined scene, establishing a scene message library, the predetermined scene includes: Specific scene, refers to the specific scene designed based on test requirements; Single scene, refers to a single operation scene on the vehicle for each function; Timing scene, refers to the timing scene from power-on to operating each controller to power-off; Error scene, refers to the scene when defects are found in the test process; Scene test case writing and decomposition module, for writing and decomposing scene test cases; Message reconstruction module, for carrying out message reconstruction based on the scene message library to obtain the reconstructed message, which specifically includes: Convert message format; Optimize message redundancy; Design message; Establish the mapping relationship of function, message signal name and message signal value; Message timing reconstruction; Reverse message format conversion; Scene test module, for constructing timing logic based on the reconstructed message, combined with external equipment, and carrying out scene test.

7. A computer readable storage medium, characterized in that, Storing programs or instructions, when the programs or instructions run on the computer, make the computer execute the automotive electronic controller scene test method of any one of claims 1-5.

8. An electronic device, characterized in that, Including a processor, the processor is coupled with a memory; The processor is configured to read and execute a computer program stored in the memory to implement the automotive electronic controller scene test method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Automatic generation method and device for scene test case of automobile controller

    CN112147967A

  • Simulation test platform and method and storage medium

    CN112835806A