CN114264904B - Full liquid crystal instrument testing method and system based on simulation and machine vision - Google Patents
Full liquid crystal instrument testing method and system based on simulation and machine vision Download PDFInfo
- Publication number
- CN114264904B CN114264904B CN202111542899.6A CN202111542899A CN114264904B CN 114264904 B CN114264904 B CN 114264904B CN 202111542899 A CN202111542899 A CN 202111542899A CN 114264904 B CN114264904 B CN 114264904B
- Authority
- CN
- China
- Prior art keywords
- data
- hmi
- mcu
- liquid crystal
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000004973 liquid crystal related substance Substances 0.000 title claims abstract description 53
- 238000004088 simulation Methods 0.000 title claims abstract description 31
- 238000012360 testing method Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims description 16
- 238000004458 analytical method Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 5
- 238000004891 communication Methods 0.000 claims description 5
- 238000013461 design Methods 0.000 claims description 5
- 238000010998 test method Methods 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims description 2
- 238000001514 detection method Methods 0.000 abstract description 5
- 238000007405 data analysis Methods 0.000 description 3
- 238000005286 illumination Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Liquid Crystal Display Device Control (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
A full liquid crystal instrument testing method and system based on simulation and machine vision solves the problem of how to improve testing efficiency in the prior art, and belongs to the technical field of full liquid crystal instrument detection. The invention comprises the following steps: MCU of the full liquid crystal instrument to be tested communicates with HMI: the MCU sends the ID and data of the display target to the HMI through the virtual serial port; the HMI analyzes the ID and the data, sends the ID and the data to the interface simulation system and returns the ID and the data to the MCU; comparing the MCU with the HMI feedback to judge whether the HMI is resolved correctly, if so, executing: the interface simulation system simulates an interface image of the full liquid crystal instrument to be tested by using an interface simulation program of the full liquid crystal instrument to be tested according to the received ID and data; and (3) finding out the position information of the display target corresponding to the returned ID, intercepting the display target from the simulated image, identifying data information, comparing the data information with data sent by the MCU, and judging whether the interface display is correct or not.
Description
Technical Field
The invention relates to a full liquid crystal instrument testing method based on simulation and machine vision, and belongs to the technical field of full liquid crystal instrument detection.
Background
In the development process of the full liquid crystal instrument, a structural form of a bottom plate program (MCU) +a core plate program (HMI) is often adopted. The two programs communicate through a serial port, namely, the MCU program sends data to the HMI end through the serial port. The two programs need to be tested separately, and after the single test passes, the two programs need to be combined into a system for final test.
The testing of such interfaces like full liquid crystal instruments often requires a large amount of manual operation and discrimination, so that a machine vision-based instrument detection method is presented, and generally, the instrument detection method is composed of basic devices such as a camera, an image acquisition card, instrument equipment and the like, and in order to eliminate the influence of illumination, a closed or light-proof space or a specific illumination environment is often required.
The method has obvious defects that firstly, the hardware is required to be input, the price is high, the popularization is not facilitated, and a common company only has one set of equipment, so that only one person can use the equipment at the same time, and the method is not suitable for development of multiple persons. Secondly, because the image needs to be read in through acquisition equipment such as a camera, the camera and the target distance, and the obtained illumination environment influences the image obtaining effect, the image needs to be subjected to column preprocessing such as filtering denoising, and the response time and the complexity of the whole system are increased. In addition, the above system requires the meter to receive the real can signal, and the meter often needs to respond to the signal according to the technical document, for example, a signal lamp is triggered 5 seconds after receiving the signal, which requires a waiting time, and the signal lamps of the meter are typically tens of hundreds, which increases the total test time.
Also, the above devices can only find problems and cannot locate problems. The reason for this is as follows:
When the data transmitted by the MCU program is correct, the bug of the HMI-side program is generated approximately in the following two parts:
Error occurs in the data analysis process: after receiving data from the serial port, the HMI needs to parse according to a communication protocol, and may make an error in the parsing process. For example, the data sent by the MCU is the vehicle speed 100, and the HMI programmer makes an error in parsing, resulting in 10.
Error occurs in the data display process: the HMI end correctly interprets the data 100, but the programmer does not correlate the vehicle speed interface with the speed, which results in a display of a vehicle speed of 0 at all times, with the speed indicating 100.
Disclosure of Invention
Aiming at the problem of how to improve the test efficiency in the prior art, the invention provides a full liquid crystal instrument test method and system based on simulation and machine vision.
The invention discloses a full liquid crystal instrument testing method based on simulation and machine vision, which comprises the following steps:
step one, the MCU of the full liquid crystal instrument to be tested is communicated with the HMI:
The MCU is connected with the HMI through a virtual serial port, and the MCU sends the ID and data of the display target to the HMI through the virtual serial port; the HMI receives serial data, analyzes the ID and the data, sends the analyzed ID and data to the interface simulation system, and transmits the ID and the data back to the MCU through interprocess communication;
Step two, comparing the ID and data sent by the MCU with the ID and data returned by the HMI, judging whether the HMI is resolved correctly, if not, determining that the HMI is resolved incorrectly and recording, if so, determining that the HMI is resolved correctly, and turning to step three;
Step three, the interface simulation system simulates an interface image of the full liquid crystal instrument to be tested by using an interface simulation program of the full liquid crystal instrument to be tested according to the received ID and data; and finding out the position information of the display target corresponding to the ID transmitted back to the MCU, intercepting the display target in the simulated full liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU, and judging whether the interface display is correct or not.
Preferably, in the first step, the ID sent by the MCU is selected from the message database, and data is added; the message database is used for storing messages of each display target meeting the agreed data transmission protocol between the MCU and the HMI, and each message comprises an ID section, a data section and a check section of the display target.
Preferably, in the third step, the position information of the display target corresponding to the ID transmitted back to the MCU is found in a message and interface position correspondence library, where the message and interface position correspondence library is a correspondence between the message stored in the message database and the coordinates of the display target on the meter, which is determined according to the interface design of the full-liquid crystal meter to be tested.
The invention also provides a full liquid crystal instrument test system based on simulation and machine vision, which comprises:
The acquisition module is used for acquiring the ID and data of the display target, which are sent to the HMI of the all-liquid-crystal instrument to be tested by the MCU of the all-liquid-crystal instrument to be tested, through the virtual serial port, and also used for acquiring the ID and data which are analyzed by the HMI and transmitted back to the MCU;
The HMI analysis judging module is connected with the acquisition module and is used for comparing the ID and the data sent by the MCU with the ID and the data returned by the HMI to judge whether the HMI is analyzed correctly, if not, determining that the HMI is analyzed in error and recording, and if so, determining that the HMI is analyzed correctly;
The interface simulation system is connected with the acquisition module and is used for simulating an interface image of the full liquid crystal instrument to be tested by utilizing an interface simulation program of the full liquid crystal instrument to be tested according to the ID and data transmitted back to the MCU by the HMI;
The interface display judging module is connected with the acquisition module and the interface simulation system at the same time and is used for finding out the position information of the corresponding display target according to the ID transmitted back to the MCU when the HMI is determined to be correct in analysis, taking out the display target in the simulated full-liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU and judging whether the interface display is correct or not.
Preferably, the system further comprises a message database;
The message database is used for storing messages of each display target meeting the agreed data transmission protocol between the MCU and the HMI, and each message comprises an ID (identification) section, a data section and a verification section of the display target;
the ID sent by the MCU is selected from the message database, and data are added.
Preferably, the system further comprises a corresponding relation library of the message and the interface position;
The corresponding relation library of the message and the interface position is the corresponding relation between the message stored in the message database determined according to the interface design of the full liquid crystal instrument to be tested and the coordinate of the display target on the instrument;
And the interface display judging module is used for finding the position information of the display target corresponding to the ID transmitted back to the MCU in the corresponding relation library of the message and the interface position.
The invention has the beneficial effects that the testing efficiency of the full liquid crystal instrument program to be tested is greatly improved, and the bug rate of the program can be reduced. The invention has low cost, only needs one computer, does not need a camera and other auxiliary equipment, requires less office space than the common machine vision system, and almost has no maintenance cost. The method has strong anti-interference capability, no matter whether the ambient light is bright or dark, the method has no influence on the method, and the method almost does not contain noise, so that a plurality of preprocessing links are reduced, and the method is more concise and efficient. The invention has high speed, and because the serial port signals are communicated, the signal is directly responded, the waiting time is not needed, and the detection of all interfaces of the whole instrument can be completed in a short time (about 1-5 minutes), for example, 100 signal lamps are detected once, and only a few seconds are needed. The invention is suitable for multiple people, and if a team has multiple people to develop together, each person can use the system by only one computer. The invention can locate the problem, judge whether the problem occurs in the data analysis link or the display link, and greatly reduce the workload of manually analyzing the problem location problem.
Drawings
Fig. 1 is a schematic diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
The invention is further described below with reference to the drawings and specific examples, which are not intended to be limiting.
In the full liquid crystal instrument testing method based on simulation and machine vision, an MCU of a full liquid crystal instrument to be tested is connected with an HMI through a virtual serial port, and the MCU sends an ID of a display target and data to the HMI through the virtual serial port; the HMI receives serial data, analyzes the ID and the data, sends the analyzed ID and data to the interface simulation system, and transmits the ID and the data back to the MCU through interprocess communication; comparing the ID and data sent by the MCU with the ID and data returned by the HMI, judging whether the HMI is resolved correctly, if not, determining that the HMI is resolved in error, recording, and if so, determining that the HMI is resolved correctly; after the HMI analysis is determined to be correct, the interface simulation system simulates an interface image of the full liquid crystal instrument to be tested by using an interface simulation program of the full liquid crystal instrument to be tested according to the received ID and data; and finding out the position information of the display target corresponding to the ID transmitted back to the MCU, intercepting the display target in the simulated full liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU, and judging whether the interface display is correct or not. The method can judge whether the problem occurs in the data analysis link or the display link, and greatly reduces the workload of manually analyzing the problem positioning problem.
The specific process comprises the following steps:
1. and establishing a message database according to a data transmission protocol agreed between the MCU and the HMI of the full liquid crystal instrument to be tested, wherein each message comprises an ID section, a data section and a check section. For example, an ID of 0x10 represents a small mileage, and a data segment of the small mileage occupies two bytes.
2. And establishing a corresponding relation library of the message and the interface position according to the interface design. For example, the subtotal mileage is at the lower left corner of the meter, with coordinates { x=20, y=20, w=50, h=50 },
3. The MCU is connected with the HMI through a virtual serial port.
4. The MCU automatically selects a certain ID and adds data according to the message database, and sends the data to the HMI through the virtual serial port. For example, a small odometry message is selected and populated with data 100.
5. The HMI analyzes the received serial data and analyzes the serial data to obtain the ID and the data.
6. The HMI transmits the ID and data to the interface simulation system and transmits the ID and data back to the MCU simulation program through inter-process communication. The interface simulation system simulates by using a simulation display program of the full liquid crystal instrument to be tested according to the ID and the data to simulate an interface image of the full liquid crystal instrument;
7. The MCU compares the transmitted ID and data with the received ID and data, and judges whether the HMI analyzes correctly. If the analysis errors are inconsistent, the analysis errors are judged, and recording is carried out. The message authentication ends. If the analysis links are consistent, the analysis links are judged to be correct, and the next operation is continued.
8. And finding out the position information of the corresponding display target of the ID transmitted back to the MCU in the corresponding relation library of the message and the interface position, intercepting the display target in the simulated full-liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU, and judging whether the interface display is correct or not.
In the embodiment, a simulation technology is used for replacing a real instrument, an instrument interface image is obtained by directly capturing a picture in a screen through software, and then a machine vision technology is used for identifying and judging numbers or images in the image. The method reduces hardware investment of instruments, cameras and the like, has constant image quality, is suitable for multiple people, has high automation, can find the interface problem of the instruments, can further judge the attribution of the problem, and can greatly improve the testing and developing speeds.
The embodiment also provides a full liquid crystal instrument test system based on simulation and machine vision, and the test system is a protection of the test method as a device form, and is not repeated.
Although the invention herein has been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present invention. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the different dependent claims and the features described herein may be combined in ways other than as described in the original claims. It is also to be understood that features described in connection with separate embodiments may be used in other described embodiments.
Claims (6)
1. The full liquid crystal instrument testing method based on simulation and machine vision is characterized by comprising the following steps of:
step one, the MCU of the full liquid crystal instrument to be tested is communicated with the HMI:
The MCU is connected with the HMI through a virtual serial port, and the MCU sends the ID and data of the display target to the HMI through the virtual serial port; the HMI receives serial data, analyzes the ID and the data, sends the analyzed ID and data to the interface simulation system, and transmits the ID and the data back to the MCU through interprocess communication;
Step two, comparing the ID and data sent by the MCU with the ID and data returned by the HMI, judging whether the HMI is resolved correctly, if not, determining that the HMI is resolved incorrectly and recording, if so, determining that the HMI is resolved correctly, and turning to step three;
Step three, the interface simulation system simulates an interface image of the full liquid crystal instrument to be tested by using an interface simulation program of the full liquid crystal instrument to be tested according to the received ID and data; and finding out the position information of the display target corresponding to the ID transmitted back to the MCU, intercepting the display target in the simulated full liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU, and judging whether the interface display is correct or not.
2. The full liquid crystal instrument test method based on simulation and machine vision according to claim 1, wherein,
In the first step, the ID sent by the MCU is selected from a message database, and data are added; the message database is used for storing messages of each display target meeting the agreed data transmission protocol between the MCU and the HMI, and each message comprises an ID section, a data section and a check section of the display target.
3. The method for testing the full-liquid crystal instrument based on simulation and machine vision according to claim 2, wherein in the third step, the position information of the display target corresponding to the ID transmitted back to the MCU is found in a message-interface position correspondence library, and the message-interface position correspondence library is a correspondence between the message stored in a message database determined according to the interface design of the full-liquid crystal instrument to be tested and the coordinates of the display target on the instrument.
4. A full liquid crystal meter test system based on simulation and machine vision, the system comprising:
The acquisition module is used for acquiring the ID and data of the display target, which are sent to the HMI of the all-liquid-crystal instrument to be tested by the MCU of the all-liquid-crystal instrument to be tested, through the virtual serial port, and also used for acquiring the ID and data which are analyzed by the HMI and transmitted back to the MCU;
The HMI analysis judging module is connected with the acquisition module and is used for comparing the ID and the data sent by the MCU with the ID and the data returned by the HMI to judge whether the HMI is analyzed correctly, if not, determining that the HMI is analyzed in error and recording, and if so, determining that the HMI is analyzed correctly;
The interface simulation system is connected with the acquisition module and is used for simulating an interface image of the full liquid crystal instrument to be tested by utilizing an interface simulation program of the full liquid crystal instrument to be tested according to the ID and data transmitted back to the MCU by the HMI;
The interface display judging module is connected with the acquisition module and the interface simulation system at the same time and is used for finding out the position information of the corresponding display target according to the ID transmitted back to the MCU when the HMI is determined to be correct in analysis, taking out the display target in the simulated full-liquid crystal instrument interface image according to the position information, identifying the data information in the display target, comparing the identified data information with the data sent to the HMI by the MCU and judging whether the interface display is correct or not.
5. The full liquid crystal meter testing system based on simulation and machine vision of claim 4, further comprising a message database;
The message database is used for storing messages of each display target meeting the agreed data transmission protocol between the MCU and the HMI, and each message comprises an ID (identification) section, a data section and a verification section of the display target;
the ID sent by the MCU is selected from the message database, and data are added.
6. The full liquid crystal instrument test system based on simulation and machine vision according to claim 5, further comprising a message and interface position correspondence library;
The corresponding relation library of the message and the interface position is the corresponding relation between the message stored in the message database determined according to the interface design of the full liquid crystal instrument to be tested and the coordinate of the display target on the instrument;
And the interface display judging module is used for finding the position information of the display target corresponding to the ID transmitted back to the MCU in the corresponding relation library of the message and the interface position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111542899.6A CN114264904B (en) | 2021-12-16 | 2021-12-16 | Full liquid crystal instrument testing method and system based on simulation and machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111542899.6A CN114264904B (en) | 2021-12-16 | 2021-12-16 | Full liquid crystal instrument testing method and system based on simulation and machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114264904A CN114264904A (en) | 2022-04-01 |
CN114264904B true CN114264904B (en) | 2024-07-16 |
Family
ID=80827489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111542899.6A Active CN114264904B (en) | 2021-12-16 | 2021-12-16 | Full liquid crystal instrument testing method and system based on simulation and machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114264904B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114815787A (en) * | 2022-06-28 | 2022-07-29 | 航天科技控股集团股份有限公司 | Automatic testing method for fault codes of full liquid crystal instrument |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105091927A (en) * | 2015-08-20 | 2015-11-25 | 浙江中科领航汽车电子有限公司 | All-liquid-crystal automobile instrument automatic test platform |
CN111782505A (en) * | 2020-05-26 | 2020-10-16 | 株洲中车时代电气股份有限公司 | Train system simulation test method and device, computer equipment and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7286975B2 (en) * | 2002-10-24 | 2007-10-23 | Visteon Global Technologies, Inc. | Method for developing embedded code for system simulations and for use in a HMI |
CN113758514B (en) * | 2021-07-29 | 2024-04-26 | 江铃汽车股份有限公司 | Automatic test method and system for automobile instrument, readable storage medium and vehicle |
-
2021
- 2021-12-16 CN CN202111542899.6A patent/CN114264904B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105091927A (en) * | 2015-08-20 | 2015-11-25 | 浙江中科领航汽车电子有限公司 | All-liquid-crystal automobile instrument automatic test platform |
CN111782505A (en) * | 2020-05-26 | 2020-10-16 | 株洲中车时代电气股份有限公司 | Train system simulation test method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114264904A (en) | 2022-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11587219B2 (en) | Method and apparatus for detecting pixel defect of optical module, and device | |
CN105808416B (en) | A kind of automated testing method and system of man-machine figure interactive interface | |
CN108874665A (en) | A kind of test result method of calibration, device, equipment and medium | |
CN111290955B (en) | Non-invasive automatic test system for subway signal system test software | |
CN111428374A (en) | Part defect detection method, device, equipment and storage medium | |
CN114264904B (en) | Full liquid crystal instrument testing method and system based on simulation and machine vision | |
CN111752833B (en) | Software quality system approval method, device, server and storage medium | |
CN112559341A (en) | Picture testing method, device, equipment and storage medium | |
CN115982005A (en) | Automatic testing method and device based on artificial intelligence | |
CN111552603A (en) | Mobile payment machine tool testing method and testing system | |
CN115952020A (en) | Page abnormity detection method, medium, device and computing equipment | |
CN113138916A (en) | Automatic testing method and system for picture structuring algorithm based on labeled sample | |
CN109271954B (en) | Method and device for detecting reliability of model | |
CN113238940B (en) | Interface test result comparison method, device, equipment and storage medium | |
CN115422052A (en) | Vehicle navigation app test system and method | |
CN113495844B (en) | Automatic testing method, device and system based on virtual click and storage medium | |
CN114115627A (en) | U shield display information acquisition method, device, equipment, medium and program product applied to U shield test | |
CN110827261A (en) | Image quality detection method and device, storage medium and electronic equipment | |
CN114661609B (en) | Artificial intelligence medical automation test integrated system | |
CN110347594B (en) | Static variable synchronization and setting method in CBTC system safety function module test | |
CN112149701B (en) | Image recognition method, virtual sample data generation method and storage medium | |
CN116400669A (en) | Automatic test method, device, test equipment and medium for security level instrument control system | |
CN118331885A (en) | Method for realizing pile-inserting check point in RPA flow | |
CN116011201A (en) | System simulation method, device, equipment and storage medium based on log information | |
CN115576820A (en) | Automatic processing method and device for image quality test data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |