A HMI simulation and automated verification method based on QPIC
Through the automated test method based on the QNX system and QPIC components, the hardware CRC check is used to realize the automated test of the full LCD instrument HMI interface, which solves the problems of large space, high cost and low efficiency of the test equipment in the existing technology, and realizes pixel Level difference detection and intuitive test result recording.
Patent Information
- Application Number
- CN202111139864.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-09-28
AI Technical Summary
The existing full LCD instrument HMI test method has the problems of large equipment footprint, high cost, low efficiency, inportability of test and prone to errors. In particular, the automated test bench requires a lot of hardware and space, and the test process is rigid and unimaginative. force.
Adopt an automated testing method based on the QNX system, QPIC components and DBUS communication modules, realize automated testing of the HMI interface through CRC verification, use the hardware CRC verification function to reduce the system load, record the test results to EXCEL tables, facilitate analysis and statistics, and achieve Pixel-level difference detection.
It realizes automated testing of the full LCD instrument HMI interface and detects differences at the pixel level, saving hardware costs and improving test efficiency. The test results are intuitive and clear, which facilitates problem analysis and statistics.
Smart Images

Figure CN113806136B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of full liquid crystal instruments, and in particular to an HMI simulation and automatic verification method based on QPIC. Background Art
[0002] With the rapid development of intelligent automotive electronics, mechanical instruments or instrument clusters can no longer meet the user experience requirements. Full LCD instruments have occupied most of the high-end market. Under the trend of intelligence, full LCD instruments are becoming more and more popular and important. What directly interacts with users is the display of the full LCD instrument HMI interface. Currently, users prefer cool graphics similar to games. This not only greatly increases the difficulty of HMI implementation, but also poses a huge challenge to the testing and verification of HMI. The testing and verification of HMI interface is the last line of defense of HMI design and the biggest guarantee to maximize the restoration of the designer's original design. The color difference or position difference of display elements will bring a bad driving experience to users and affect the design intention of UI designers. There are two mainstream HMI testing methods. One is to judge whether the HMI design is correct by comparing the renderings with the naked eye of the test engineer. This is undoubtedly the most inaccurate, because the pixel-level error or very small color difference cannot be recognized by the naked eye. The other method is to build an automated test bench, input the design renderings of each interface, and then use a high-definition camera to capture the actual displayed interface, and then compare the images. This method is the current mainstream testing method, but the automated test bench solution has the following limitations:
[0003] 1. An automated test bench needs to be built, which will occupy a relatively large workstation space and cannot be portable in actual use;
[0004] 2. The automated test bench requires additional hardware costs, and one bench can only test one instrument at a time, which is inefficient;
[0005] 3. Images captured by cameras are prone to interference, errors, and inaccuracies;
[0006] 4. Compared with manual exploratory random testing, automated testing is more rigid and lacks imagination. Summary of the invention
[0007] To solve the above problems, the present invention discloses a HMI simulation and automatic verification method based on QPIC. The method relies on the QNX system, QPIC components and DBUS communication module. The entire automatic test process only requires the user to trigger each HMI interface one by one. When the interface is triggered, the CRC check is automatically activated and the test results are recorded. The application uses the layer detection function provided by the QNX system to implement the CRC check of the display BUFFER, and then records the check result, thereby achieving the result of the HMI automatic test. The result of the automatic test will be recorded in an EXCEL table file, and each test record can be clearly seen in the table. The test record includes the test function, display position, test result, test number, etc., which is clear and intuitive and conducive to the analysis and statistics of the problem. Among them:
[0008] The QNX operating system is a real-time operating system that is often used in embedded systems. The QNX system provides a screen component for display functions. The screen component pushes the content to be displayed to the hardware display interface and caches the BUFFER of the display data. The QPIC component uses the BUFFER data as input to obtain the display content.
[0009] The QPIC component is a service provided by the QNX operating system that includes a basic hardware CRC check function.
[0010] The automated testing program includes the LogManager module (log management module), the SymbolManager module (configuration management module), the EventManager module (time management module), and the UnitsManager module (test unit management module).
[0011] The UnitsManager module is used to manage all Units, where Units refers to each test unit.
[0012] The EventManager module is the most important module of this solution, which is mainly composed of a set of callback functions and QGMS event monitoring. The QNX system provides a screen component for pushing the content to be displayed to the hardware display interface and caching the display data BUFFER.
[0013] The DBUS communication module is a data communication module encapsulated based on the TCP Socket protocol. The DBUS communication method has the characteristics of low latency, low system overhead, and strong reusability. It supports point-to-point data transmission between processes and many-to-many peer-to-peer communication. It is mainly used for inter-process function calls and inter-process signal broadcasts. The DBUS communication module in this solution is mainly used to receive vehicle CAN function signals. Each function activation and cancellation is sent to the test program and HMI display program through the DBUS module.
[0014] The DBUS communication module is a packaged and mature inter-process communication mechanism that is used to receive the underlying vehicle function signals and then cache the status of each function in the DataCenter (data center), and then update the latest status to the EventManager module in the automated test program.
[0015] The method comprises the following steps:
[0016] 1) Before verification, the display material information is entered into the QNX system offline to generate a display element list configuration file. After the SymbolManager module is powered on, the configuration file is read and cached in the memory for standby use;
[0017] 2) When the HMI rendering process starts a certain function, the automated test program calls the monitoring result, uses the hardware CRC check, and compares the returned result with the pre-offline calculated value. If the values are the same, it means the check has passed and the display is correct. If the values are different, it means the display does not meet expectations.
[0018] 3) Use the LogManager module to monitor the test results sent and write them to the file.
[0019] As an improvement of the present invention, in 2), the QPIC component extracts information in the Unit structure in the UnitsManager module to calculate the CRC check value of the current display BUFFER.
[0020] Based on the above scheme, CRC check is divided into software CRC check and hardware CRC check. Software CRC check means calculating the CRC check value by software, which will undoubtedly occupy part of the system resources, causing the system load to increase, thus affecting the system response time of other applications; however, hardware CRC check means that the QPIC component calls the hardware driver interface, and the hardware calculates and returns the CRC check value to the QPIC component, and then monitors the returned CRC check value in real time in the event monitoring module of this design, and compares it with the locally pre-stored check value. This design adopts the hardware CRC check method, which will not have any impact on the system.
[0021] As an improvement of the present invention, in step 2), the display element list includes the number, function definition, x, y coordinates, width and height dimensions, and a correct CRC check value.
[0022] Based on the above scheme, it specifically includes grabbing the currently displayed BUFFER data according to the input x, y coordinates and width and height dimensions, and then using the hardware CRC check function to return a CRC check value, and then comparing this CRC check value with the correct CRC value calculated offline in advance. The entire test framework can be fully reused in different projects without writing additional code. The user only needs to enter the information of all display materials into the system offline before testing. The purpose is to provide a standard style for the test application, that is, the correct position and correct color of each element that should be displayed, and finally form a display element list, which includes: number, function definition, x, y coordinates, width and height dimensions, CRC correct check value, etc. The display element list will be used as a basis for comparison with the actual displayed CRC check value.
[0023] As an improvement of the present invention, in 2), the Unit structure corresponding to each function is enabled through the callback function in the EventManager module, the QGMS event monitoring submodule monitors and returns the CRC check value, and then compares whether the actually displayed CRC check value is consistent with the preset check value, and then sends the check result to the LogManager module.
[0024] As an improvement of the present invention, in 2), the callback function is triggered by the function signal sent by DataCenter through Signal-Slot. Slog is a complete log mechanism, including functions such as setting log level and log output mechanism; Signal-Slot is a very important data communication mechanism. The connection between the callback function and the signal is registered through the connect interface. After the signal is triggered through the Emit interface, the corresponding callback function will be called in sequence. Signal-Slot supports two connection modes: one-to-one and many-to-one, and supports both synchronous and asynchronous modes. In the present invention, the DataCenter module notifies EventManager of the activation status of each function through the Signal-Slot mechanism.
[0025] As an improvement of the present invention, in 2), the data protocol of the DBUS communication module is consistent with the communication protocol of the HMI display process.
[0026] Based on the above solution, the data protocol of DBUS communication is guaranteed to be consistent with the communication protocol of the HMI display process, so that after a certain function is triggered, the HMI displays a certain function and simultaneously triggers the CRC check function of the function.
[0027] As an improvement of the present invention, in the above 2), the upper layer application notifies the qgms_monitor in the QPIC component of the Unit structure that needs to be detected, and monitors the return value of qgms_monitor.
[0028] As an improvement of the present invention, when a display error occurs in a test HMI element, an alarm box for prompting the tester is popped up on the screen through the Render interface.
[0029] Compared with the prior art, the beneficial effects of the present invention are as follows: the HMI automated testing solution proposed in the present invention can detect the differences at the HMI pixel level without making any changes to the HMI interface design, and the entire testing process is fully automated. Users only need to trigger different functional interfaces normally to automatically trigger the detection. Through the automated testing proposed in this design, the differences between UI design and HMI implementation can be detected to the greatest extent, and the differences can be recorded in a local table file, which is convenient for engineers to analyze and count problems. In addition, this invention does not require the assistance of other hardware equipment, which saves project costs to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a workflow diagram of the QNX platform automated testing proposed by the present invention.
[0031] Figure 2 This is a block diagram of the automated testing platform architecture design proposed in this invention.
[0032] Figure 3 This is a test flow chart of the present invention. DETAILED DESCRIPTION
[0033] The following is combined with Figure 1-3 The present invention will be further illustrated with the following specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0034] Embodiment: A method for HMI simulation and automatic verification based on QPIC. In this solution, two clusters are included, such as Figure 1As shown in the figure, the left side is the automated test framework, and the right side is the normal HMI rendering application. The two applications remain completely independent and receive the DBUS signal of the same set of protocols. This is to ensure that when the HMI rendering process starts a certain function, the automated test framework can also synchronously activate the verification function. The HMI rendering process writes each frame display in the layer rendering subsystem through the ScreenAPI. In the automated test framework, the registration, monitoring and other interfaces in the QPIC component of the layer monitoring subsystem will be called to cyclically monitor the verification results. In fact, the actual acquisition of the current display BUFFER and calculation of the CRC check value are the functions implemented by the qgms_monitor service in the QPIC component. qgms_monitor is another complete Server service in the QPIC component provided by QNX. It does not require user modification. The upper-level application only needs to notify qgms_monitor of the Units (test units) that need to be detected, and then monitor the return value of qgms_monitor. The specific method includes the following steps:
[0035] 1) Before verification, the display material information is entered into the QNX system offline in advance to generate a display element list configuration file. After the SymbolManager module is powered on, the configuration file is read and cached in the memory for standby use; the QNX system provides a screen component for pushing the content to be displayed to the hardware display interface and caching the BUFFER of the current display data;
[0036] The SymbolManager module is mainly used to manage configuration files. The present invention requires the user to make a configuration file of the UI element to be tested before testing. The configuration file contains the coordinates, width and height dimensions and the correct CRC check value of the UI element. After the SymbolManager is powered on, it reads the configuration file and caches it in the memory as a backup.
[0037] 2) When the HMI rendering process starts a certain function, the automated test program calls the monitoring result, uses the hardware CRC check, and compares the returned result with the pre-offline calculated value. If the values are the same, it means the check is passed and the display is correct. If the values are different, it means the display is inconsistent with expectations. The Unit structure corresponding to each function is enabled through the callback function in the EventManager module.
[0038] According to the information in the display element list, the QPIC component grabs the BUFFER data currently displayed; the QPIC component extracts the information in the Unit structure in the UnitsManager module to calculate the CRC check value of the current display BUFFER. The display element list includes the number, function definition, x, y coordinates, width and height dimensions, and the correct CRC check value.
[0039] The UnitsManager module is used to manage all Units. Units refers to each test unit. The present invention simply regards each Symbol as a test unit. Each Unit is managed by a structure declared by a QPIC component. QPIC will extract the information in the Unit structure to calculate the CRC check value of the current display BUFFER.
[0040] The EventManager module mainly consists of a set of callback functions and QGMS event monitoring. The callback function is triggered by the function signal sent by DataCenter through Signal-Slot. The Unit corresponding to each function is enabled in the callback function. For example, if DBUS ID=4001 and DBUS SUBID=00 are received, the Unit of the corresponding left turn indicator light is activated. The QGMS event monitoring submodule monitors the qgms_monitor event through the qgms_request_event_wait interface. The API will return the CRC check value of one or more Units. Then you only need to compare the actual displayed CRC check value with the check value pre-stored in the configuration file to see if it is consistent, and then send the check result to the LogManager module.
[0041] The vehicle CAN function signal is received through the DBUS communication module. Each function activation and cancellation is sent to the HMI rendering process and the automated test program through the DBUS communication module. The callback function is triggered by the function signal sent by the DataCenter through the Signal-Slot. The data protocol of the DBUS communication module is consistent with the communication protocol of the HMI display process. The upper-level application notifies the qgms_monitor in the QPIC component of the Unit structure that needs to be detected and monitors the return value of qgms_monitor.
[0042] 3) The test results sent are monitored through the LogManager module and written to the file. Each time the system starts, it will be regarded as the start of a new test. LogManager will create a new log file in .csv format according to the timestamp. Each test case is stored as a record in the log file. LogManager is designed as an independent thread. The only task of this thread is to monitor the test results sent by EventManager and write them to the file. The advantage of designing it as an independent thread is that it occupies system resources independently and will not block the main thread and cause misjudgment.
[0043] In addition, the framework in this solution also integrates some necessary basic components, including Slog, which is a complete log mechanism, including functions such as setting log level and log output mechanism, Signal-Slot is a very important data communication mechanism, registering the connection between callback function and signal through the connect interface, and triggering the signal through the Emit interface. The corresponding callback function will be called in sequence, Signal-Slot supports one-to-one and many-to-one connection modes, and supports both synchronous and asynchronous modes. In this invention, the DataCenter module notifies the EventManager of the activation status of each function through the Signal-Slot mechanism. Thread and Timer are used to create threads and timers respectively.
[0044] The present invention directly uses the UI cutting material output by the UI team to the HMI development team, and then makes it into the configuration file required for the test. This configuration file can be completely universal under the premise that the UI does not change. When the UI changes or a new HMI project is developed, it is only necessary to regenerate the static configuration file, and the application of the entire solution does not need to be changed. While the HMI is rendering, the automated test is activated and the test results are recorded in the log file. It is worth mentioning that the present design also reserves the Render interface. When the test has an HMI element display error, an alarm box can pop up on the screen to prompt the tester that the function display of a certain position is incorrect.
[0045] Table 1.
[0046]
[0047] As shown in Table 1, before automated testing, the test engineer must generate a configuration file table. This configuration file will be loaded when the test application is started. It is used to tell the system all the test items and the correct CRC check value corresponding to each function. The content in this configuration file is crucial. If the input information is incorrect, such as the CRC value is wrong, or the coordinates are wrong, it will inevitably cause the CRC check of this function to fail every time. The content that needs to be recorded in the configuration file includes: function number, CRC check value of three primary colors, width and height of UI elements, coordinates, DBUS ID and brief text description.
[0048] Table 2.
[0049]
[0050] As shown in Table 2, this is the log file output by the test. The total number of tests and the number of tests with errors for each test item are recorded in the log file. The log file is saved in .csv format and can be opened with EXCEL software for easy statistics and analysis.
[0051] In the description of the present invention, it should be noted that the terms "upper", "lower", "left", "right", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention; in addition, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal connection of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] Finally, it should be noted that the embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A HMI simulation and automated verification method based on QPIC, characterized in that , the method comprises the following steps: 1) Before verification, the display material information is entered into the QNX system offline to generate a display element list configuration file. After the SymbolManager module in the automated test program is powered on, the configuration file is read and cached in the memory for later use; 2) When the HMI rendering process starts the corresponding function, the automated test program calls the monitoring result, uses the hardware CRC check, and compares the returned result with the pre-offline calculated value. If the values are the same, it means the check is passed and the display is correct. If the values are different, it means the display is not as expected. 3) Use the LogManager module in the automated test program to monitor the test results sent and write them into a file; In the above 2), the information in the Unit structure in the UnitsManager module in the automated test program is extracted by the QPIC component in the QNX system to calculate the CRC check value of the current display BUFFER. The QPIC component is a service provided by the QNX operating system, which includes a basic hardware CRC check function. In the above 2), the Unit structure corresponding to each function is enabled through the callback function in the EventManager module in the automated test program. The QGMS event monitoring submodule monitors and returns the CRC check value, and then compares whether the actual displayed CRC check value is consistent with the preset check value, and then sends the check result to the LogManager module. The QGMS event monitoring submodule is another complete Server service in the QPIC component provided by QNX. In the above 2), the vehicle CAN function signal is received through the DBUS communication module, and each function activation and cancellation is sent to the HMI rendering process and the automated test program through the DBUS communication module.
2. The HMI simulation and automated verification method based on QPIC according to claim 1, characterized in that: In 1), the display element list includes the number, function definition, x, y coordinates, width and height dimensions, and the correct CRC check value.
3. The HMI simulation and automated verification method based on QPIC according to claim 1, characterized in that: The QNX system provides a screen component that is used to push the content to be displayed to the display and buffer the display data.
4. The HMI simulation and automated verification method based on QPIC according to claim 1, characterized in that: In the above 2), the callback function is triggered by the function signal sent by DataCenter through Signal-Slot.
5. The HMI simulation and automatic verification method based on QPIC according to claim 4 is characterized in that: In 2), the data protocol of the DBUS communication module is consistent with the communication protocol of the HMI display process.
6. The HMI simulation and automatic verification method based on QPIC according to claim 1 is characterized in that: In the above 2), the upper layer application notifies the QGMS event monitoring submodule in the QPIC component of the Unit structure to be detected, and monitors the return value of the QGMS event monitoring submodule.
7. The HMI simulation and automatic verification method based on QPIC according to claim 1 is characterized in that: When the test HMI element displays an error, an alarm box is popped up on the screen through the Render interface to prompt the tester.
