Automobile electronic component test system and method
Through the microservice architecture and front-end separation design based on the Hongmeng system, a stress testing system for automotive electronic components with high concurrent processing capabilities is built, which solves the problems of strong dependence, poor compatibility and insufficient real-time performance of traditional manual testing modes, and realizes multi-model adaptation and real-time data analysis, improving the testing efficiency and credibility of results.
Patent Information
- Application Number
- CN202510829273.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-08-15
AI Technical Summary
The traditional manual stress testing model has problems such as strong artificial dependence, poor system compatibility, insufficient real-time and limited scalability in the testing of smart car electronic components, which is difficult to meet the needs of complex testing environments and multi-model adaptation.
Using the microservice architecture based on the Hongmeng system and the front-end and back-end design, a stress testing system for automotive electronic components with high concurrent processing capabilities is built, and a distributed soft bus technology is used to achieve fast connection and efficient communication. Combined with the RESTful API service, WebSocket service, visual operation interface and lightweight database developed by Python, it supports multi-model adaptation and real-time data analysis.
It realizes rapid adaptation of multiple models, real-time data monitoring and efficient test report generation, significantly improves test efficiency and credibility of results, reduces manual operation fatigue and system response delay, and is highly scalable.
Smart Images

Figure CN120491616A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive electronic component testing methods, and in particular to an automotive electronic component testing system and method based on the Hongmeng system. Background Art
[0002] Against the backdrop of the rapid evolution of the smart car industry, the complexity of vehicle electronic control units (ECUs) and related electrical functions is growing exponentially. Traditional manual stress testing methods require a large amount of manpower and a long testing cycle, which can no longer meet R&D needs.
[0003] The traditional manual stress testing model has the following shortcomings:
[0004] 1. High dependence on manual labor
[0005] Traditional testing solutions rely on manual operations and have the following inherent flaws:
[0006] High operation repetitiveness: Basic actions such as folding / unfolding of the rearview mirror need to be performed cyclically, which can easily cause operator fatigue.
[0007] Judgment is highly subjective: Signal status confirmation relies on manual observation, and there are individual cognitive differences.
[0008] Discrete data records: Test results are mainly in paper documents and lack systematic data association.
[0009] 2. Poor system compatibility
[0010] Existing solutions are difficult to adapt to complex testing environments:
[0011] Difficulty in vehicle model adaptation: The control logic of electronic components in different vehicle models is different, and targeted code modifications are required.
[0012] Sensitive to environmental parameters: When external factors such as temperature and voltage change, the test threshold cannot be automatically adjusted. Protocol diversity: Different car manufacturers use different bus communication protocols, resulting in low reusability of the analysis module.
[0013] 3. Lack of real-time performance
[0014] Traditional test architecture has response delay issues:
[0015] Signal acquisition lag: There is a time lag in acquiring key data, which affects the accuracy of fault diagnosis.
[0016] Slow response to exceptions: Fault identification and processing require manual intervention, which cannot meet real-time requirements. Difficult collaborative control: Synchronous operations between multiple devices have communication delays.
[0017] 4. Limited scalability
[0018] The existing test system has architectural limitations:
[0019] High functional coupling: The rearview mirror test logic is highly bound to other modules and difficult to expand independently.
[0020] High hardware dependence: Replacement of specific test equipment requires redevelopment of the adapter interface.
[0021] Difficulty in cross-domain migration: The test method is difficult to directly apply to other electronic components such as headlights and tailgates. Summary of the Invention
[0022] Based on the above shortcomings of the traditional manual stress testing mode, the present invention provides an automotive electronic component testing system and method based on the Hongmeng system, which utilizes the distributed soft bus technology of the Hongmeng system (HarmonyOS) to achieve fast connection and efficient communication between different devices.
[0023] The technical solution adopted by the present invention to achieve its technical objectives is: a stress testing system for automotive electronic components, which adopts a microservice architecture and a front-end and back-end separation design to build an automotive electronic component stress testing system with high concurrent processing capabilities; the system includes a service layer architecture, an infrastructure layer and a communication protocol stack;
[0024] The service layer architecture includes backend services and frontend systems;
[0025] The backend service is based on the RESTful API service developed in Python and includes the following core functional modules:
[0026] Test task management: implement test case configuration, task scheduling and execution status monitoring;
[0027] Data interaction interface: supports CAN / LIN bus communication with automotive electronic components ECU;
[0028] WebSocket service: realizes two-way real-time communication based on Flask-SocketIO;
[0029] The front-end system adopts a responsive visual operation interface, including:
[0030] Test configuration module: supports parameterized use case configuration;
[0031] Real-time monitoring dashboard: dynamically displays test progress and test result sets;
[0032] Report generation system: Based on Allure, it realizes multi-dimensional visual analysis of test data;
[0033] The infrastructure layer includes servers and database systems;
[0034] The server is an Nginx server, which is a reverse proxy server and includes:
[0035] A static resource deployment module that optimizes front-end page loading speed, a load balancing module that supports traffic distribution for multi-instance back-end services, and an encryption module;
[0036] The database system adopts the sqlite3 lightweight embedded database solution and includes:
[0037] Single file storage module, API interface module and fast reading and writing module;
[0038] The communication protocol stack adopts the WebSocket protocol and implements full-duplex communication between the browser and the server based on the RFC 6455 standard.
[0039] Furthermore, in the above-mentioned automotive electronic component stress testing system: the encryption protocol includes the SSL encryption protocol or the TLS encryption protocol.
[0040] Furthermore, in the above-mentioned automotive electronic component pressure testing system: the sqlite database in the single-file storage module is stored on the disk in the form of a single file, and the file format is compatible across platforms.
[0041] Furthermore, in the above-mentioned automotive electronic component stress testing system: the fast reading and writing module uses B-tree and B+ tree data structures to store and manage data.
[0042] Furthermore, in the above-mentioned automotive electronic component stress testing system: the communication protocol stack implements bus data acquisition through Python API, and the hardware interface adaptation supports test equipment access including CANoe / CANalyzer / TSMaster that implements bus data acquisition through Python API.
[0043] The present invention also provides a testing method for an automotive electronic component pressure testing system, the method comprising the following steps:
[0044] Step 1: Connect the vehicle computer. Under the premise that the Hongmeng system vehicle computer is in slave mode, connect the test equipment to the Hongmeng system vehicle computer. The Hongmeng system vehicle computer, bus analysis equipment, and test equipment are connected.
[0045] Step 2: Enter the automated stress testing platform; establish a connection with the database, create test-related tables, implement two-way real-time communication, and enable the front-end to automatically access the target web page address;
[0046] Step 3: Task configuration: Configure related tasks related to vehicle ECU and components;
[0047] Step 4: Task execution; the automated test platform calls the test script related to the task;
[0048] Step 5: Signal comparison: compare the real-time monitored signal with the preset signal;
[0049] Step 6: Generate report.
[0050] Furthermore, in the above-mentioned test method: in the step of connecting the car computer: the car computer is a Harmony system car computer, and under the premise that the Harmony system car computer is in slave mode, the test equipment is connected to the Harmony system car computer through ADB commands to establish network communication at the physical layer; the Harmony system car computer, bus analysis equipment, and test equipment are connected to obtain the network signal of the control unit related to the automotive electronic components to be tested.
[0051] This invention boasts excellent scalability. First, it is adaptable to a wide range of vehicle models, enabling rapid adaptation to specific models by adjusting adaptation parameters and configuration files. This robust adaptability not only significantly reduces the time and cost of developing and deploying test systems for different vehicle models, but also lays a solid foundation for subsequent expansion of testing applications for even more vehicle models. Second, the stress test described in this invention is based on electronic exterior mirrors; once refined, it can be expanded to other components and even the entire vehicle ECU.
[0052] The present invention dynamically adjusts the stress test parameters of the electronic exterior rearview mirror based on the vehicle's environment before testing. During the test, the test engineer can monitor stress test data in real time. After the test is completed, the test platform generates a corresponding test report to facilitate the test engineer's identification of the fault node.
[0053] Compared to traditional Android systems, the Ark compiler on Hongmeng can perform static compilation optimization on code, directly compiling high-level languages into machine language. Android, on the other hand, compiles high-level languages into assembly language first, and then converts assembly language into machine language. Overall, Hongmeng significantly improves application startup, responsiveness, and execution efficiency, and the related testing efficiency has also been improved.
[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of the automated stress test of the present invention;
[0056] Figure 2 is a schematic diagram of the automated pressure testing system of the present invention;
[0057] Figure 3 Flowchart of signal comparison provided for the test case of the present invention. DETAILED DESCRIPTION
[0058] This embodiment is a stress test platform for electronic exterior mirrors that uses a microservice architecture and a front-end and back-end separation design to build a high-concurrency processing capability. The test platform runs on the Windows operating system. The platform is only responsible for task management, and task execution is based on the Hongmeng operating system. The system builds a vehicle stress test platform system based on a front-end and back-end separation architecture, uses the Flask framework and the SQLite lightweight database to build a high-performance back-end service center, and combines the Vue.js framework to realize a dynamic visual front-end interactive interface. It integrates the Python uiautomator2 automated test drive engine and implements the three core functional closed loops through standardized test script protocols:
[0059] 1. Intelligent scheduling and precise distribution of multi-terminal test tasks;
[0060] 2. Full-link automated execution process monitoring;
[0061] 3. Real-time analysis of structured test data and generation of visual reports. The system achieves efficient front-end and back-end collaboration through RESTful APIs, forming a complete stress testing solution from test case development and task orchestration to result analysis, significantly improving test execution efficiency and result credibility.
[0062] The system framework consists of the following core modules, as follows: Figure 2 shown.
[0063] 1. Service layer architecture:
[0064] The backend service (Flask framework) is as follows:
[0065] The RESTful API service developed in Python includes the following core functional modules:
[0066] ●Test task management: implement test case configuration, task scheduling and execution status monitoring;
[0067] ●Data interaction interface: supports CAN / LIN bus communication with the electronic exterior rearview mirror ECU;
[0068] WebSocket service: bidirectional real-time communication based on Flask-SocketIO;
[0069] The front-end system (Vue3 framework) adopts a responsive visual operation interface, including:
[0070] ●Test configuration module: supports parameterized use case configuration (number of cycles, stress threshold, etc.)
[0071] ●Real-time monitoring dashboard: Dynamically display test progress and test result sets
[0072] ● Report generation system: Based on Allure, it realizes multi-dimensional visual analysis of test data. 2. Infrastructure layer:
[0073] Nginx server, as a reverse proxy server, undertakes the following key functions:
[0074] ●Static resource deployment: optimize front-end page loading speed
[0075] ●Load balancing: supports traffic distribution of multi-instance backend services
[0076] SSL / TLS encryption: Ensure communication security
[0077] The database system uses the sqlite3 lightweight embedded database solution:
[0078] ●Single file storage: The SQLite database is stored on disk as a single file, and the file format is compatible across platforms.
[0079] ●Simple API interface: SQLite provides a simple and easy-to-use API interface that supports multiple programming languages
[0080] Fast read and write speeds: SQLite offers excellent read and write performance for small to medium-sized datasets. It uses efficient data structures such as B-trees and B+ trees to store and manage data, enabling fast data location and access. For simple queries and inserts, SQLite can even outperform larger database management systems.
[0081] 3. Communication protocol stack:
[0082] The WebSocket protocol implements full-duplex communication between browsers and servers based on RFC 6455. It enables secure transmission of data such as use cases, parameters, and configurations.
[0083] Hardware interface adaptation supports access to a variety of test equipment:
[0084] CANoe / CANalyzer / TSMaster: Bus data acquisition via Python API.
[0085] Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its advantages include ease of learning, elegant syntax, open source, portability, good scalability, a rich library, diverse models, and support for Chinese.
[0086] Vue.js is a progressive JavaScript framework for building user interfaces, developed and maintained by Yuxi You. It helps developers create more maintainable and testable codebases by breaking a web page into reusable components. Each component contains its own HTML, CSS, and JavaScript to render the corresponding part of the web page.
[0087] A RESTful API service is a web API designed in the REST style, an application programming interface that adheres to the REST architectural style. REST (Representational State Transfer) is a software architectural style proposed by Dr. Roy Fielding in his 2000 doctoral dissertation. Compared to earlier web services and XML-RPC protocols, REST services are more concise, and an increasing number of web services are adopting the REST style for design and implementation.
[0088] WebSocket, introduced in HTML5, is a full-duplex communication protocol over a single TCP connection. Its communication standard is defined in RFC6455. It simplifies data exchange between clients and servers, allowing servers to proactively push data to clients. This solves the traditional HTTP problem of servers proactively sending data to clients. It is suitable for applications with features such as instant messaging, real-time data, and subscription push notifications.
[0089] Flask-SocketIO is an extension that combines the functionality of Socket.IO with the popular Python web framework Flask, making it easy to develop real-time web applications. Socket.IO is a library that provides real-time, low-latency, bidirectional communication between a client and a server.
[0090] Allure is an open-source test reporting framework developed by Yandex. It supports multiple programming languages, including Java, Python, and C#. It supports most testing frameworks, such as TestNG, Pytest, and JUnit. With its intuitive interface and rich customization capabilities, it helps developers and testers better understand and analyze test results. It's easy to use and integrate.
[0091] Nginx (engine x) is a lightweight, high-performance HTTP and reverse proxy server, as well as an email (IMAP / POP3) and SMTP server. It is known for its high stability, rich feature set, sample configuration files, and low system resource consumption.
[0092] SSL (Secure Sockets Layer) is a security protocol that provides security and data integrity for network communications. Developed by Netscape in 1994, it safeguards data transmission over the Internet. Using data encryption, it protects data from interception and eavesdropping during transmission. TLS (Transport Layer Security), the successor to SSL, was released by the IETF in 1999, modeled after SSL. While largely compatible with the SSL protocol, it offers stronger encryption and increased security.
[0093] SQLite3 is a SQL database implemented in C. It is a lightweight, self-contained, open-source relational database management system. It is widely used as a built-in database in mobile phones and computers worldwide, and is often used in embedded systems and mobile applications.
[0094] CANoe is a bus development environment launched by Vector of Germany. Its full name is CANopenenvironment. It is mainly designed for automotive bus development.
[0095] CANalyzer is a tool for developing, testing and diagnosing communication systems.
[0096] TSMaster is a virtual instrument software platform that can connect, configure and control all Tongxing hardware tools and devices to achieve multiple functions such as automotive bus embedded code generation, monitoring, simulation, development, diagnosis, calibration, ECU flashing, I / O control, test and measurement.
[0097] The specific testing process of this embodiment is as follows Figure 1 As shown, the following steps are included:
[0098] 1. Connecting to the car
[0099] With the Hongmeng system's in-vehicle computer in slave mode (debugging mode, with the in-vehicle settings interface switchable), the test engineer connected the test equipment to the Hongmeng system's in-vehicle computer via ADB commands (ADB devices), establishing network communication at the physical layer. The in-vehicle computer, bus analysis equipment, and test equipment were connected to obtain network signals from the rearview mirror's control unit (VIU). TSMaster software was launched on the test equipment, the bus channels required by the application were configured, and online measurements were initiated to determine the vehicle's status and confirm the test results.
[0100] 2. Start the script to enter the automated stress testing platform
[0101] After connecting the test PC to the vehicle computer, the test engineer runs the stress test platform script on the test PC. After startup, the stress test platform script will automatically switch to the specified path under the test case, and then run the main.exe file. The main.exe file will call the encapsulated method of the backend to establish a connection with the database. At the same time, it will create test-related tables, including vehicle tables, use case tables, task use case tables, task total result tables, task result sub-tables, task configuration tables, task tables, module tables, and feature tables. After updating the database related information, run the python script, start the websocket server to establish Flask-SocketIO to achieve two-way real-time communication. Finally, the front end will be started to automatically access the target web page address. The details are as follows: If the Nginx process is running, it will terminate the process first, and then automatically switch to the Nginx directory to start the Nginx process to start the front-end script. Finally, the script will automatically open the default browser and access localhost. The above is the process of completely starting the script to enter the automated stress test platform.
[0102] 3. Electronic exterior rearview mirror pressure test task configuration
[0103] The platform is mainly divided into four modules: whole vehicle automated testing, test dashboard, vehicle management and user management. The present invention mainly relates to the whole vehicle automated testing module. Click on the automated test to enter the task selection interface. It is further divided into whole vehicle inspection, whole vehicle smoke, window function stress test and electronic exterior rearview mirror stress test, etc. The relevant tasks are all related to vehicle ECU and components. Select the electronic exterior rearview mirror stress test. The test engineer can add a new task for this test. After entering the task name, the task can be created. After entering the task, there are four subtasks for the test engineer to choose from, and the number of electronic exterior rearview mirror folding pressure tests and the time interval of each test can be dynamically adjusted according to the environment. After the task configuration is completed and the configuration is saved, the total number of tests will be presented on the platform. The list of relevant tasks is as follows:
[0104]
[0105] IV. Task Execution
[0106] Before the task is executed, the system will automatically create relevant logs for this test task under the set path. Click Execute Test to start the task execution. The automated stress testing platform will call the electronic exterior rearview mirror stress test script related to the task. The test engineer's PC and the test vehicle computer will be bridged through ADB, simulating the form of touching the vehicle computer's central control screen to carry out the test task. During this period, the test engineer can view the task data in real time, including the task status, the total number of test cases, the number of tested cases, the test progress, the test duration, the total number of test case passes, the total number of test case fails, the total number of completed cases, and the total number of cases that have not been run. During the running process, you can click the Stop Test button to stop the test task.
[0107] 5. Signal Comparison
[0108] During task execution, the platform's automated stress test script utilizes the Tongxing hardware and the encapsulated Tsmaster interface to obtain real-time monitoring signals and compares them with preset signals (if the two signals do not match, the test case fails; otherwise, it passes). According to the electronic exterior rearview mirror specification, the signals (VIU_ExtrReviewMirrFoldedSt) for fully folded and unfolded rearview mirrors (in a broad sense, the specific angle is the mirror angle saved after the last user adjustment) are 1 and 2, respectively. The relevant stress test case preconditions and required operations are shown in the following table:
[0109] Serial number Test Cases Prerequisites Purpose Operation 1 Folding rearview mirror Rearview mirror needs to be extended Click the rearview mirror folding soft switch 2 Rearview mirror folds during deployment Rearview mirrors need to be folded Click the rearview mirror to expand the soft switch twice (1s interval) 3 Rearview mirror unfolded Rearview mirrors need to be folded Click the rearview mirror to expand the soft switch 4 Rearview mirror unfolds during folding Rearview mirror needs to be extended Click the rearview mirror folding soft switch twice (1s interval)
[0110] The precondition is a necessary precondition added to meet the test requirements. Taking the rearview mirror folding as an example, before executing the task, it is necessary to first check whether the VIU_ExtrReviewMirrFoldedSt signal detected by TSMaster is 2, that is, whether the rearview mirror is in the unfolded state. If the rearview mirror is not in the unfolded state, the rearview mirror unfolding operation needs to be performed. The specific rearview mirror signal comparison flow chart is as follows: Figure 3 shown.
[0111] 6. Report Generation
[0112] After the task is completed, the platform will generate a corresponding task report based on the historical test tasks and store it locally. Test engineers can return to the previous page on the task execution interface, enter the task list interface, and click on the historical task. The historical task list will obtain all completed tasks, where they can choose to view details and logs. The details interface contains some log-level information output by the test script during execution. Clicking on "View Report" will jump to the Allure test report interface, which provides some visual reports so that test engineers can more clearly view the test task after completing it.
Claims
1. A stress testing system for automotive electronic components, which utilizes a microservices architecture and a front-end and back-end separation design to build a stress testing system for automotive electronic components with high concurrent processing capabilities; characterized by: Including service layer architecture, infrastructure layer and communication protocol stack; The service layer architecture includes backend services and frontend systems; The backend service is based on the RESTful API service developed in Python and includes the following core functional modules: Test task management: implement test case configuration, task scheduling and execution status monitoring; Data interaction interface: supports CAN / LIN bus communication with automotive electronic components ECU; WebSocket service: realizes two-way real-time communication based on Flask-SocketIO; The front-end system adopts a responsive visual operation interface, including: Test configuration module: supports parameterized use case configuration; Real-time monitoring dashboard: dynamically displays test progress and test result sets; Report generation system: Based on Allure, it realizes multi-dimensional visual analysis of test data; The infrastructure layer includes servers and database systems; The server is an Nginx server, which is a reverse proxy server and includes: A static resource deployment module that optimizes front-end page loading speed, a load balancing module that supports traffic distribution for multi-instance back-end services, and an encryption module; The database system adopts the sqlite3 lightweight embedded database solution and includes: Single file storage module, API interface module and fast reading and writing module; The communication protocol stack adopts the WebSocket protocol and implements full-duplex communication between the browser and the server based on the RFC 6455 standard.
2. The automotive electronic component pressure testing system according to claim 1, wherein: The encryption protocol includes the SSL encryption protocol or the TLS encryption protocol.
3. The automotive electronic component pressure testing system according to claim 1, wherein: The sqlite database in the single-file storage module is stored on the disk in the form of a single file, and the file format is cross-platform compatible.
4. The automotive electronic component pressure testing system according to claim 1, wherein: The fast reading and writing module uses B-tree and B+tree data structures to store and manage data.
5. The automotive electronic component pressure testing system according to claim 1, wherein: The communication protocol stack implements bus data acquisition through Python API, and the hardware interface adaptation supports test equipment access including CANoe / CANalyzer / TSMaster that implements bus data acquisition through Python API.
6. A testing method for an automotive electronic component pressure testing system according to claim 1, characterized in that: include: Step 1: Connect to the car computer; Under the premise that the Hongmeng system car machine is in slave mode, the test equipment is connected to the Hongmeng system car machine; The Hongmeng system vehicle computer, bus analysis equipment, and test equipment are connected; Step 2: Enter the automated stress testing platform; establish a connection with the database, create test-related tables, implement two-way real-time communication, and enable the front-end to automatically access the target web page address; Step 3: Task configuration: Configure related tasks related to vehicle ECU and components; Step 4: Task execution; The automated testing platform calls the test scripts related to the task; Step 5: Signal comparison: compare the real-time monitored signal with the preset signal; Step 6: Generate report.
7. The testing method according to claim 6, wherein: In the step of connecting the vehicle computer: the vehicle computer is a Hongmeng system vehicle computer, and under the premise that the Hongmeng system vehicle computer is in slave mode, the test device is connected to the Hongmeng system vehicle computer through ADB commands to establish network communication at the physical layer; The Hongmeng system's vehicle computer, bus analysis equipment, and testing equipment are connected to obtain network signals from the control units related to the automotive electronic components to be tested.