Automatic testing device for automobile instrument
By providing an automated test device for automotive instruments, using components such as upper computer systems and simulation platforms to generate and execute test cases, and comparing simulated images and reference images through image recognition modules, the problem of low instrument testing recognition accuracy in the prior art is solved, and more efficient and accurate test results are achieved.
Patent Information
- Application Number
- CN202510281617.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, the cameras have low accuracy in instrument testing and identification, which is difficult to meet the rapid automated testing needs of complex instrument equipment.
An automated testing device for automotive instruments is provided, including a computer system, a program-controlled power supply and a simulation platform. The computer system generates test cases through the use case generation module, automatic test module, power management module, UDS diagnostic module, NM management module and image recognition module, controls the ECU power supply, performs UDS diagnosis and network management, and outputs test results through the comparison of simulated images with reference images.
It improves the accuracy of instrument testing, solves the problem of low camera recognition accuracy, and meets the needs of rapid automated testing of complex instrument equipment.
Smart Images

Figure CN120143789A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated testing, and particularly to an automated testing device for vehicle instrument panels. Background Art
[0002] In modern automotive and industrial systems, instrument panels are important data display and feedback devices for presenting key parameters such as vehicle status and power information. Traditional manual testing is inefficient and prone to human errors, lacking unified testing standards and making it difficult to meet the rapid automated testing requirements of complex instrument devices.
[0003] Currently, the commonly used testing method for instrument panel displays in the industry is to use an external camera to identify the instrument display. This method has high requirements for light, testing environment, camera bit rate, and imaging angle, which affect both the recognition accuracy and cost.
[0004] As modern instrument functions become increasingly complex, the requirements for functional testing are also becoming more comprehensive, and the testing system needs to integrate more complete functions. Summary of the Invention
[0005] This application provides an automated testing device for vehicle instrument panels, which can solve the problem of low recognition accuracy in instrument testing using cameras in the prior art.
[0006] In a first aspect, an embodiment of this application provides an automated testing device for vehicle instrument panels, characterized in that the device includes: a host computer system, a programmable power supply, and a simulation platform; the programmable power supply is used to supply power to the ECU under test; the simulation platform is communicatively connected to the ECU under test and is used to run the program of the ECU under test and generate a simulation image during the test of the ECU under test; wherein, the host computer system includes:
[0007] A test case generation module, configured to generate test cases according to test files;
[0008] An automated testing module, communicatively connected to the test case generation module and the ECU under test, and configured to send test information to the ECU under test according to the test cases;
[0009] A power management module, communicatively connected to the automated testing module and the programmable power supply, and configured to control the power supply parameters of the programmable power supply for supplying power to the ECU under test according to the test cases;
[0010] A UDS diagnosis module, communicatively connected to the automated testing module and the ECU under test, and configured to perform UDS diagnosis on the ECU under test;
[0011] An NM management module, communicatively connected to the automated testing module and the ECU under test, and configured to monitor the ECU under test;
[0012] An image recognition module, which is communicatively connected to the automated test module and the simulation platform, and is configured to compare the reference image corresponding to the test case with the simulation image and output a comparison result;
[0013] In some embodiments, the automated test module, the UDS diagnosis module, and the NM management module are all communicatively connected to the ECU under test via a CAN bus.
[0014] In some embodiments, the ECU under test is communicatively connected to the simulation platform via the SPI protocol.
[0015] In some embodiments, generating the test case according to the test file includes:
[0016] Identifying and extracting keywords in the test file according to a preset rule to generate the test case.
[0017] In some embodiments, identifying and extracting keywords in the test file according to a preset rule to generate the test case includes:
[0018] Identifying and extracting keywords in the test file according to a preset rule to generate an initial use case
[0019] After the initial use case is generated, the test case is formed according to the selection and / or editing instructions received from the user.
[0020] In some embodiments, performing UDS diagnosis on the ECU under test includes:
[0021] When the UDS diagnosis module sends a message to the ECU under test, automatically completing the sent message, verifying the expected response of the ECU under test, and marking the execution result of the ECU under test.
[0022] In some embodiments, the NM management module is further configured to: add a plurality of virtual nodes according to the test case to build a simulation network environment to manage the network state of the ECU under test.
[0023] In some embodiments, comparing the reference image corresponding to the test case with the simulation image and outputting a comparison result includes:
[0024] Training with the reference image to generate a training model;
[0025] Performing image recognition on the simulation image with the training model and outputting an annotation ID;
[0026] Comparing the preset icon ID corresponding to the reference image with the annotation ID and outputting a comparison result.
[0027] In some embodiments, comparing the preset icon ID corresponding to the reference image and the annotation ID, and outputting a comparison result, including:
[0028] When the preset icon ID is consistent with the annotation ID, output that the comparison result passes.
[0029] In some embodiments, the device further includes: a readable storage medium for storing the operating program of the host computer system and the test file.
[0030] In this application, test cases are generated by the host computer system according to the test file, and the ECU is controlled by the automated test module to run according to the test cases. Meanwhile, information is transmitted to the simulation platform to generate a simulation image. The test result is obtained by comparing the simulation image with the reference image corresponding to the test case, and the instrument test result is more accurate, solving the problem of low recognition accuracy in the prior art for camera-based instrument testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of an automated test device shown in an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are only a part rather than all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in this application belong to the scope of protection of this application.
[0033] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of this application. However, those skilled in the art will realize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0034] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are merely illustrative and not necessarily include all the content and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined. Therefore, the actual execution order may change according to the actual situation.
[0036] In the description of this application, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0037] Before specifically describing the solution of this application, the following explanations are given for the terms involved in this application:
[0038] ECU: ECU (Electronic Control Unit), the ECU under test in this application refers to the electronic control unit of the instrument under test.
[0039] UDS diagnosis: It refers to the process of diagnosing vehicle faults using the UDS protocol (Unified Diagnostic Services). The UDS protocol is a communication protocol mainly used for communication between automotive electronic control units (ECUs) and diagnostic tools. Through the UDS protocol, the diagnostic tool can send requests to the ECU, and the ECU will return corresponding responses according to the requests, thereby realizing the diagnosis and troubleshooting of vehicle faults.
[0040] NM management module: The NM (Network Management) management module refers to the network management module that manages and coordinates communication with the ECU. Its main functions are to ensure the security and reliability of the ECU communication network, provide initialization of ECU resources, startup of the network, detection of the operating states of the network and nodes, processing and signal sending, as well as coordination of the global operating mode.
[0041] CAN bus: (Controller Area Network) is a serial communication protocol bus mainly used for real-time applications and aims to solve the communication problem between electronic control units (ECUs) in vehicles.
[0042] SPI protocol: (Serial Peripheral Interface) is a high-speed, full-duplex synchronous serial communication protocol.
[0043] OEM: (Original Equipment Manufacturer) Original equipment manufacturer is also called designated production, commonly known as OEM (production). The basic meaning is that the brand owner does not directly produce products, but uses the key core technologies he masters to design and develop new products and control sales channels.
[0044] JSON file: JSON (JavaScript Object Notation) is a lightweight data exchange format, mainly used for data exchange, storage and transmission. It is easy for people to read and write, and also easy for machines to parse and generate.
[0045] In modern automobiles and industrial systems, instruments are important data display and feedback devices used to display key parameters such as vehicle status and power information. Traditional manual testing is inefficient and prone to human errors. It lacks unified testing standards and is difficult to meet the needs of rapid automated testing of complex instrument equipment. The commonly used test method for instrument displays in the industry is to use an external camera to identify the instrument display. This method has high requirements for light, test environment, camera bit rate, and image acquisition angle, which affects the accuracy and cost of recognition.
[0046] In order to solve this technical problem, the technical solution of this application is proposed. Figure 1 ,in, Figure 1 An automated testing device according to an embodiment of the present application includes:
[0047] Host computer system, program-controlled power supply, simulation platform; the program-controlled power supply is used to supply power to the ECU under test; the simulation platform is connected to the ECU under test and is used to run the program of the ECU under test and generate simulation images when the ECU under test is tested; wherein the host computer system includes:
[0048] A test case generation module is used to generate test cases based on test files;
[0049] The automated test module is connected to the test case generation module and the ECU under test in communication, and is used to send test information to the ECU under test according to the test case;
[0050] The power management module is connected to the automated test module and the programmable power supply to control the power supply parameters of the programmable power supply to the ECU under test according to the test case;
[0051] The UDS diagnostic module is connected to the automated test module and the ECU under test for performing UDS diagnosis on the ECU under test;
[0052] NM management module, which communicates with the automated test module and the ECU under test, and is used to monitor the ECU under test;
[0053] An image recognition module, which is communicatively connected to an automated test module and a simulation platform, and is used to compare a reference image corresponding to a test case with a simulation image and output a comparison result;
[0054] In this application, test cases are generated according to test files in the host computer system, and the ECU is controlled by the automated test module to run according to the test cases. At the same time, information is transmitted to the simulation platform to generate simulation images, and test results are obtained by comparing the simulation images with the reference images. Compared with the prior art, the instrument test results of the solution of this application are more accurate.
[0055] In some embodiments, the automated test module, the UDS diagnosis module, and the NM management module are all communicatively connected to the ECU under test through a CAN bus.
[0056] In some embodiments, the ECU under test is communicatively connected to the simulation platform through an SPI protocol.
[0057] In some embodiments, the power management module is communicatively connected to the programmable power supply through a serial port protocol to control the output voltage of the programmable power supply. During the test, the power management module can preset the voltage and current according to the test cases, dynamically adjust the power supply conditions, and simulate different power supply scenarios to enable the test instrument to respond under various power supply fluctuation conditions.
[0058] In some embodiments, the use case generation module identifies and extracts keywords in the test file according to a preset rule to generate test cases. Preferably, the use case generation module imports the test file based on the json file format, automatically identifies and extracts the keywords therein, and generates specific test cases. Preferably, the initial use cases are generated by extracting the keywords therein, and the user can manually select and edit the verification content to form the final test cases. The above methods can make the flexibility of the test content very large. Preferably, the current test cases can also be directly exported to generate a Json file, which is convenient for modification and saving, and also simplifies the use case maintenance process.
[0059] In some embodiments, the UDS diagnostic module sends and receives diagnostic messages through the CAN bus protocol and verifies the diagnostic responses of the instrument. This module can automatically execute UDS diagnostic instructions according to the configured content of use cases, and verify the validity of the messages and the responses to ensure the normal function of the instrument in the diagnostic mode. Preferably, since each OEM has different configuration requests and expected responses for the UDS service diagnostic specification, for example, in the diagnostic session control service for the default session mode switch, the UDS diagnostic module can configure the request service "request:10 01" and the expected response "expect:50 01" through a test case json file. After import, use cases will be automatically generated. When executing the use cases, the sending messages that comply with the diagnostic specification will be automatically completed, and the expected responses will be verified, and the execution results will be marked.
[0060] In some embodiments, the NM management module only listens to the ECU under test, receives NM messages, and verifies the message content and format. In some embodiments, the NM management module manages and monitors the network status of the instrument by sending and receiving NM messages. Preferably, this module can add multiple virtual nodes according to use cases to build a simulation network environment and simulate scenarios such as network ring formation, disconnection, and sleep in NM network management.
[0061] In some embodiments, the image recognition module compares the image information displayed on the real-time simulation interface according to the preset reference images in the configured use cases. This module can automatically identify the content displayed on the dashboard and compare it with the preset reference images; if the recognition results are consistent, the use case will be automatically marked as green passed. This module reduces the need for manual inspection and improves the accuracy of testing. Preferably, the test case configures the preset icon ID corresponding to the reference image. The image recognition module preprocesses the preset reference images. The preprocessing includes: preset icon collection, which is labeled through a labeling tool (such as labeling), and each indicator light and event picture has a unique labeling ID. After labeling, the data set is converted and divided. The data set needs to be divided into a training set, a validation set, and a test set; after the data set is prepared, the model needs to be trained, and finally the training results are obtained; the image recognition module calls the trained model to perform image recognition on the simulation images, and the labeling ID is output after recognition. Preferably, when the preset icon ID and the labeling ID are the same, the comparison result is output as passed. Preferably, the preset icon ID for the left turn indicator light is lamp_1. After model testing, the generated test result lamp_1 and the picture result stored locally are output. The generated pictures can be used for manual confirmation and correction of failed use cases. Preferably, the preset reference images are stored in a specified directory in the form of UI pictures, such as indicating the picture address through the configuration word "imagePath:D:\xx\xx\lamp_1.png"; the test cases and the references Figure 1 One-to-one correspondence.
[0062] In some embodiments, the automated test module is further configured to generate a test result based on the comparison result. In some embodiments, when the comparison result is "passed", the automated test module marks the use case as "pass", which is the test result; in some embodiments, when the comparison result is "failed", the automated test module marks the use case as "fail", which is the test result.
[0063] In some embodiments, the above device further includes: a readable storage medium, configured to store the operating program of the host computer system and test files.
[0064] The functions described herein can be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions can be stored on or transmitted via a computer-readable medium as one or more instructions or codes. Other examples and implementations are within the scope and spirit of the present application and the appended claims. For example, due to the nature of software, the functions described above can be implemented using software executed by a processor, hardware, firmware, hardwiring, or any combination thereof. In addition, each functional unit can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0065] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0066] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An automatic testing device for automobile instruments, characterized in that: The device comprises: a host computer system, a program-controlled power supply, and a simulation platform; the program-controlled power supply is used to supply power to the ECU under test; the simulation platform is connected to the ECU under test in communication, and is used to run the program of the ECU under test and generate a simulation image when the ECU under test is tested; wherein the host computer system comprises: A test case generation module is used to generate test cases based on test files; An automated testing module, which is in communication with the test case generation module and the ECU under test, and is used to send test information to the ECU under test according to the test case; A power management module, which is in communication connection with the automated test module and the programmable power supply, and is used to control the power supply parameters of the programmable power supply to the ECU under test according to the test case; A UDS diagnostic module, which is in communication connection with the automated test module and the ECU under test, and is used to perform UDS diagnosis on the ECU under test; An NM management module is connected to the automated test module and the ECU under test for monitoring the ECU under test; The image recognition module is communicatively connected with the automated test module and the simulation platform, and is used to compare the reference image corresponding to the test case with the simulation image and output a comparison result.
2. The automated testing device according to claim 1, characterized in that: The automated test module, the UDS diagnostic module, and the NM management module are all communicatively connected with the ECU under test via a CAN bus.
3. The automated testing device according to claim 1, wherein: The ECU under test is connected to the simulation platform for communication via the SPI protocol.
4. The automated testing device according to claim 1, wherein: The generating of test cases according to the test files comprises: The keywords in the test file are identified and extracted according to preset rules to generate the test case.
5. The automated testing device according to claim 4, characterized in that: The step of identifying and extracting keywords in the test file according to preset rules to generate the test case includes: Identify and extract keywords in the test file according to preset rules and generate initial test cases After the initial use case is generated, the test case is formed according to the selection and / or editing instructions received from the user.
6. The automated testing device according to claim 1, wherein: The performing UDS diagnosis on the ECU under test includes: When the UDS diagnostic module sends a message to the ECU under test, the sent message is automatically completed, the expected response of the ECU under test is verified, and the execution result of the ECU under test is marked.
7. The automated testing device according to claim 1, wherein: The NM management module is also used to: add multiple virtual nodes according to the test case to build a simulated network environment to manage the network status of the ECU under test.
8. The automated testing device according to claim 1, wherein: The step of comparing the reference image corresponding to the test case with the simulation image and outputting a comparison result includes: Perform training using the reference image to generate a training model; Performing image recognition on the simulation image using the training model and outputting a label ID; Compare the preset icon ID corresponding to the reference image with the marked ID, and output a comparison result.
9. The automated testing device according to claim 8, characterized in that: The comparing the preset icon ID corresponding to the reference image with the annotation ID and outputting the comparison result includes: When the preset icon ID and the marked ID are consistent, the comparison result is output as passed.
10. The automated testing device according to claim 1, wherein: The device also includes: a readable storage medium, which is used to store the operating program of the host computer system and the test file.