CN114264904A - 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 PDF

Info

Publication number
CN114264904A
CN114264904A CN202111542899.6A CN202111542899A CN114264904A CN 114264904 A CN114264904 A CN 114264904A CN 202111542899 A CN202111542899 A CN 202111542899A CN 114264904 A CN114264904 A CN 114264904A
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.)
Granted
Application number
CN202111542899.6A
Other languages
Chinese (zh)
Other versions
CN114264904B (en
Inventor
车强
王大伟
韩季秋
吴雨
黄明森
杨春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aerospace Hi Tech Holding Group Co Ltd
Original Assignee
Aerospace Hi Tech Holding Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Aerospace Hi Tech Holding Group Co Ltd filed Critical Aerospace Hi Tech Holding Group Co Ltd
Priority to CN202111542899.6A priority Critical patent/CN114264904B/en
Publication of CN114264904A publication Critical patent/CN114264904A/en
Application granted granted Critical
Publication of CN114264904B publication Critical patent/CN114264904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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 the testing efficiency in the prior art, and belongs to the technical field of full liquid crystal instrument detection. The invention comprises the following steps: the MCU of the full liquid crystal instrument to be tested communicates with the HMI: the MCU sends the ID and the 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 transmits the ID and the data back to the MCU; comparing the data sent by the MCU with the data returned by the HMI, judging whether the HMI is analyzed correctly, if so, executing: the interface simulation system simulates 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 received ID and data; and finding out the position information of the display target corresponding to the returned ID, intercepting the display target in the simulated image, identifying the data information, comparing the data information with the data sent by the MCU, and judging whether the interface display is correct or not.

Description

Full liquid crystal instrument testing method and system based on simulation and machine vision
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 are communicated through the 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 separate tests pass, the two programs need to be combined into a system for final testing.
The test of the interface similar to a full liquid crystal instrument usually needs a large amount of manual operation and discrimination, so that an instrument detection method based on machine vision appears, generally the instrument detection method is composed of basic equipment 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 needed.
The disadvantages of this method are obvious, firstly, the hardware is needed to be invested, the price is expensive and is not easy to popularize, and a common company only has one set of such equipment, so that only one person can use the equipment at one time, and the method is not suitable for development of multiple persons. Secondly, since the image needs to be read in by a camera and other acquisition devices, the distance between the camera and the target, and the illumination environment can influence the image effect, a series of preprocessing such as filtering and denoising needs to be performed on the image, so that the response time and the complexity of the whole system are increased. In addition, the above system requires the meter to receive a real can signal, and the meter often needs to respond to the signal according to technical documents, for example, a waiting time is required when a signal is triggered 5 seconds after the signal is received, and the signal lights of the general meter are dozens or hundreds, which increases the total test time.
Also, the above devices 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 end program is generated by the following two parts:
errors occur in the data analysis process: the HMI receives data from the serial port and then needs to analyze according to a communication protocol, and errors can occur in the analyzing process. For example, the data sent by the MCU is vehicle speed 100, while the HMI programmer had an error at the time of resolution, resulting in a value of 10.
Errors in the data display process: the HMI end correctly parsed the data 100, but the programmer did not correlate the vehicle speed interface with the speed of rotation, which resulted in the displayed vehicle speed being always 0, but the speed of rotation being indicated to 100.
Disclosure of Invention
Aiming at the problem of how to improve the testing efficiency in the prior art, the invention provides a full liquid crystal instrument testing 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 communicates with the HMI:
the MCU is connected with the HMI through a virtual serial port and sends the ID and the data of the display target to the HMI through the virtual serial port; the HMI receives and analyzes serial port data, analyzes the serial port data to obtain ID and data, sends the ID and the 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 the data sent by the MCU with the ID and the data returned by the HMI, judging whether the HMI analyzes correctly, if not, determining that the HMI analyzes wrongly and recording, if so, determining that the HMI analyzes correctly, and turning to step three;
thirdly, the interface simulation system simulates 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 received ID and the data; and finding out the position information of the display target corresponding to the ID returned to the MCU, intercepting the display target from 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.
Preferably, in the first step, the ID sent by the MCU is selected in a message database, and data is added; the message database is used for storing messages of all display targets meeting a data transmission protocol agreed between the MCU and the HMI, and each message comprises an ID section, a data section and a verification section of the display target.
Preferably, in the third step, the position information of the display target corresponding to the ID returned to the MCU is found in a message-interface position corresponding relation library, which is a corresponding relation between the message stored in the message database and the coordinates of the display target on the instrument determined according to the interface design of the all-liquid crystal instrument to be tested.
The invention also provides a full liquid crystal instrument testing system based on simulation and machine vision, which comprises:
the acquisition module is used for acquiring the ID and the data of the display target sent to the full liquid crystal instrument HMI to be tested by the MCU of the full liquid crystal instrument to be tested through the virtual serial port and also used for acquiring the ID and the data analyzed by the HMI and transmitted back to the MCU;
the HMI analysis judging module is connected with the acquisition module and 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 analyzes correctly or not, if the HMI does not analyze correctly, the HMI is determined to have an error in analysis and is recorded, and if the HMI does analyze correctly, the HMI is determined to have correct analysis;
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 the data which are transmitted back to the MCU by the HMI;
and the interface display judging module is simultaneously connected with the acquisition module and the interface simulation system and used for finding out the position information corresponding to the display target according to the ID returned to the MCU when the HMI is determined to be analyzed correctly, taking out the display target from 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.
Preferably, the system further comprises a message database;
the message database is used for storing messages of all display targets meeting a data transmission protocol agreed between the MCU and the HMI, and each message comprises an ID (identity) segment, a data segment and a verification segment of the display target;
the ID sent by the MCU is selected in a message database and is added with data.
Preferably, the system also comprises a corresponding relation library of the message and the interface position;
the message and interface position corresponding relation library is a corresponding relation between a message stored in a message database and a coordinate of a display target on the instrument, which is determined according to the interface design of the full liquid crystal instrument to be tested;
and the interface display judging module finds the position information of the display target corresponding to the ID returned to the MCU in the corresponding relation library of the message and the interface position.
The method has the advantages that the method greatly improves the testing efficiency of the program of the full liquid crystal instrument to be tested, and can reduce the bug rate of the program. The invention has low cost, only needs one computer, does not need a camera or other auxiliary equipment, needs less office space than a common machine vision system, and hardly has any maintenance cost. The method has strong anti-interference capability, no influence is caused no matter the ambient illumination and the brightness, and the method hardly contains noise, so that some preprocessing links are reduced, and the method is simpler and more efficient. The invention has high speed, because the communication is carried out through the serial port signal, the signal is directly responded, the waiting time is not needed, and all interfaces of the whole instrument can be detected for one time only within a short time (about 1-5 minutes), for example, 100 signal lamps are detected for one time, and only a few seconds are needed. The system is suitable for multiple persons, and if a team has multiple persons to develop together, each person can use the system only through one computer. The invention can position the problem, judge whether the problem appears in the data analysis link or the display link, and greatly reduce the workload of manually analyzing the problem positioning.
Drawings
Fig. 1 is a schematic diagram of the principle of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The invention is further described with reference to the following 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 and data of a display target to the HMI through the virtual serial port; the HMI receives and analyzes serial port data, analyzes the serial port data to obtain ID and data, sends the ID and the data to the interface simulation system, and transmits the ID and the data back to the MCU through interprocess communication; comparing the ID and the data sent by the MCU with the ID and the data returned by the HMI, judging whether the HMI analyzes correctly, if not, determining that the HMI analyzes wrongly and recording, and if so, determining that the HMI analyzes correctly; after the HMI is determined to be analyzed correctly, the interface simulation system simulates an interface image of the full liquid crystal instrument 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 returned to the MCU, intercepting the display target from 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. The problem can be judged to appear in a data analysis link or a display link, and the workload of manual analysis of problem positioning is greatly reduced.
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 verification section. For example, an ID of 0x10 represents a subtotal mileage, and a data segment of the subtotal 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 distance 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. And the MCU automatically selects a certain ID and adds data according to the message database, and the ID and the data are sent to the HMI through the virtual serial port. For example, a subtotal mileage message is picked and the data 100 is populated.
5. The HMI analyzes the received serial port data and analyzes the serial port data to obtain the ID and the data.
6. The HMI sends the ID and the data to the interface simulation system and transmits the ID and the data back to the MCU simulation program through interprocess communication. The interface simulation system simulates a simulation display program of the full liquid crystal instrument to be tested according to the ID and the data to obtain a full liquid crystal instrument interface image;
7. the MCU compares the transmitted ID and data with the received ID and data, and judges whether the HMI analyzes correctly. If not, judging that the analysis is wrong and recording. The message authentication is complete. If the two are consistent, the analysis link is 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 returned to the MCU in the message and interface position corresponding relation library, 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.
In the embodiment, a simulation technology is used for replacing a real instrument, an instrument interface image is directly obtained by screenshot in a screen through software, and then numbers or images in the image are identified and judged by using a machine vision technology. The method reduces the investment of hardware such as instruments and cameras, has constant image quality, is suitable for multiple people, has high automation, can find the problem of the instrument interface, can further judge the problem attribution, and can greatly improve the testing and developing speed.
The embodiment also provides a full liquid crystal instrument test system based on simulation and machine vision, which takes the test method as the protection of the device form and is not repeated again.
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 features described in different dependent claims and herein may be combined in ways different from those described in the original claims. It is also to be understood that features described in connection with individual 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 communicates with the HMI:
the MCU is connected with the HMI through a virtual serial port and sends the ID and the data of the display target to the HMI through the virtual serial port; the HMI receives and analyzes serial port data, analyzes the serial port data to obtain ID and data, sends the ID and the 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 the data sent by the MCU with the ID and the data returned by the HMI, judging whether the HMI analyzes correctly, if not, determining that the HMI analyzes wrongly and recording, if so, determining that the HMI analyzes correctly, and turning to step three;
thirdly, the interface simulation system simulates 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 received ID and the data; and finding out the position information of the display target corresponding to the ID returned to the MCU, intercepting the display target from 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.
2. The full liquid crystal instrument testing method based on simulation and machine vision according to claim 1,
in the first step, the ID sent by the MCU is selected in a message database and is added with data; the message database is used for storing messages of all display targets meeting a data transmission protocol agreed between the MCU and the HMI, and each message comprises an ID section, a data section and a verification section of the display target.
3. The full liquid crystal instrument testing method based on simulation and machine vision as claimed in claim 2, wherein in step three, the position information of the display target corresponding to the ID returned to the MCU is found in a message and interface position corresponding relation library, which 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 coordinates of the display target on the instrument.
4. Full liquid crystal instrument test system based on simulation and machine vision, characterized in that, the system includes:
the acquisition module is used for acquiring the ID and the data of the display target sent to the full liquid crystal instrument HMI to be tested by the MCU of the full liquid crystal instrument to be tested through the virtual serial port and also used for acquiring the ID and the data analyzed by the HMI and transmitted back to the MCU;
the HMI analysis judging module is connected with the acquisition module and 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 analyzes correctly or not, if the HMI does not analyze correctly, the HMI is determined to have an error in analysis and is recorded, and if the HMI does analyze correctly, the HMI is determined to have correct analysis;
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 the data which are transmitted back to the MCU by the HMI;
and the interface display judging module is simultaneously connected with the acquisition module and the interface simulation system and used for finding out the position information corresponding to the display target according to the ID returned to the MCU when the HMI is determined to be analyzed correctly, taking out the display target from 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.
5. The simulation-and-machine-vision-based all-liquid-crystal meter testing system according to claim 4, wherein said system further comprises a message database;
the message database is used for storing messages of all display targets meeting a data transmission protocol agreed between the MCU and the HMI, and each message comprises an ID (identity) segment, a data segment and a verification segment of the display target;
the ID sent by the MCU is selected in a message database and is added with data.
6. The full liquid crystal instrument test system based on simulation and machine vision as claimed in claim 5, wherein the system further comprises a library of message and interface location correspondences;
the message and interface position corresponding relation library is a corresponding relation between a message stored in a message database and a coordinate of a display target on the instrument, which is determined according to the interface design of the full liquid crystal instrument to be tested;
and the interface display judging module finds the position information of the display target corresponding to the ID returned to the MCU in the corresponding relation library of the message and the interface position.
CN202111542899.6A 2021-12-16 2021-12-16 Full liquid crystal instrument testing method and system based on simulation and machine vision Active CN114264904B (en)

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 true CN114264904A (en) 2022-04-01
CN114264904B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040083451A1 (en) * 2002-10-24 2004-04-29 Abowd Peter S. Method for developing embedded code for system simulations and for use in a HMI
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
CN113758514A (en) * 2021-07-29 2021-12-07 江铃汽车股份有限公司 Automobile instrument automatic testing method and system, readable storage medium and vehicle

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040083451A1 (en) * 2002-10-24 2004-04-29 Abowd Peter S. Method for developing embedded code for system simulations and for use in a HMI
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
CN113758514A (en) * 2021-07-29 2021-12-07 江铃汽车股份有限公司 Automobile instrument automatic testing method and system, readable storage medium and vehicle

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭健忠;吴建立;谢斌;程峰;唐华亮;: "汽车液晶仪表实车数据测试台开发及数据分析", 重庆大学学报, no. 05, 15 May 2018 (2018-05-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN114264904B (en) 2024-07-16

Similar Documents

Publication Publication Date Title
US11587219B2 (en) Method and apparatus for detecting pixel defect of optical module, and device
CN108614777A (en) A kind of financial transaction test system and test method based on actual services
CN111290955B (en) Non-invasive automatic test system for subway signal system test software
CN103686030A (en) Method and device for detecting video signal interface applied to picture splicing display unit
CN104956339A (en) Generating software test script from video
CN108874665A (en) A kind of test result method of calibration, device, equipment and medium
CN111428374A (en) Part defect detection method, device, equipment and storage medium
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN113532882A (en) Automobile instrument testing method, device and system and storage medium
CN111752833B (en) Software quality system approval method, device, server and storage medium
CN118097913B (en) Sensitivity detection method and device of early warning detection device
CN114264904B (en) Full liquid crystal instrument testing method and system based on simulation and machine vision
CN115376074A (en) Method and system for evaluating recognition effect of power transmission line monitoring device
CN108109580A (en) Parameter adaptation method, apparatus, equipment and the storage medium of LED display
CN112882957B (en) Test task validity checking method and device
CN113138916B (en) Automatic testing method and system for picture structuring algorithm based on labeling sample
CN115908360A (en) Monitoring video inspection method and device, electronic equipment and storage medium
CN113672501B (en) Parking lot service testing method and device
CN114512077B (en) Method, device and system for detecting driving time sequence of receiving card output
CN113986753A (en) Interface test method, device, equipment and storage medium
CN113791980A (en) Test case conversion analysis method, device, equipment and storage medium
CN107992417B (en) Test method, device and equipment, readable storage medium storing program for executing based on storing process
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
CN113722162A (en) MVB network card stability test system, method and storage medium

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