Online communication automatic detection system and method for intelligent electronic product
Through the intelligent electronic product online communication automatic detection system, the online communication protocol of the microcontroller and display module is used to automatically test according to the product's operating buttons and display content, solving the problems of high development cycle and cost in the existing technology, realizing the Resource savings and the efficiency of automated testing.
Patent Information
- Application Number
- CN202411401189.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing electronic product testing systems, online communication methods for control process-oriented processes require frequent writing of code for the tested product, resulting in increased development cycle and cost, and automatic testing cannot be supported when resources are limited.
Using the online communication automatic detection system of intelligent electronic products, through communication between the upper host and the lower slave, the microcontroller, key module and display module, key control commands are compiled according to the product's operation keys and display content, and the corresponding communication protocol is formed. , reduce data transmission and storage requirements, and simplify testing system research and development.
It greatly reduces the microcontroller storage space and signal pin resource requirements of the products being tested, reduces the complexity and cycle of the R&D of the test system, and realizes the efficiency and low cost of automated testing.
Smart Images

Figure CN118972305A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic product communication, and in particular to an online communication automatic detection system and method for intelligent electronic products. Background Art
[0002] With the advancement of science and technology, more and more smart electronic products are being produced intelligently, that is, automated and digitalized, mainly including: automated assembly and processing and automated production testing. In the production process of electronic products, the relevant tests involved are everywhere, such as: component testing, functional inspection, whole machine calibration, whole machine inspection, quality inspection, etc., and testing is extremely critical and important. The test system can control and manage the work of electronic products.
[0003] At present, the interactive test mechanism generally adopts two methods. The first is to simulate the manual operation method, which is equivalent to simulating the test personnel to manually operate the buttons and artificial eyes to check whether the information content displayed on the display screen is qualified or not. It needs to use computer graphics algorithms to obtain information recognition of the product display image, imitating the manual operation of the product button switch. Each button needs to correspond to an operating mechanism, and requires long-term and frequent actions. The structure is complex, the maintenance is frequent, the cost is expensive, the structure is complex and large, the work efficiency is low, the reliability is poor, and it is difficult to implement. The second is to adopt the method of online communication for the control process. The test system adopts online communication to interact with electronic products. The test system compiles all control protocol commands for all steps of the tested product through the communication interface, and controls and manages the operation of all steps of the product in the test, which is equivalent to taking over the microcontroller of the tested product. In this way, the full process information and data of the tested product are obtained. Based on this, the qualified or not of the tested product is judged. However, in this method, each instruction issued by the microcontroller is controlled and managed by the test system by issuing corresponding protocol commands, which is equivalent to the test system repeatedly rewriting a set of code programs for the tested product and adding protocols for each step between each other. Therefore, in addition to developing the test system, it is also necessary to arrange for the deep and heavy secondary development of the tested product and especially the system software, which greatly increases the product automatic test development cycle and development costs. If the product's microcontroller has less storage space and other resources and cannot support the increased development requirements for testing, such as insufficient ROM or RAM resources in the product processor, then the second method can only be abandoned and return to the first method again. Summary of the invention
[0004] The purpose of the present invention is to provide an automatic detection method for online communication of an intelligent electronic product, so as to solve one or more of the above-mentioned problems in the prior art.
[0005] In a first aspect, the present application provides an automatic detection method for online communication of a smart electronic product. An online communication automatic detection system for intelligent electronic products is characterized in that the system includes an upper host and a lower slave, the upper host is an automatic testing system, the lower slave is an electronic product, the upper host and the lower slave are connected by a communication cable, the lower slave includes a microcontroller, a key module and a display module, and the microcontroller and the key module and the display module are all electrically connected.
[0006] As a preferred embodiment that can be realized, both the upper host and the lower slave are provided with a full-duplex serial UART communication interface, and the transmission baud rate is set to 9600 bps.
[0007] As a preferred method that can be realized, the following steps are included: S100. Receive the test command sent by the host, confirm that the system has successfully handshaked and connected to enter the automatic test working mode; S200. Receive a key control command input by the key module; S300. According to the key control command, the lower slave microcontroller calls the application test program required for the test; S400. Execute the application test program and obtain the test result data; S500. Check the test result data. If the test result data is inconsistent with the original test data, send the test result data to the upper host to determine whether the test result is qualified.
[0008] As an achievable preferred method S200. receiving a key control command input by a key module, including: receiving a simulated key command, converting it into a corresponding key control command, and a microcontroller receiving the key control command; or receiving trigger information input by a keyboard or mouse to generate a corresponding key control command, and the microcontroller receiving the key control command.
[0009] As an achievable preferred method, step S500. When the test result data is inconsistent with the original test data, the test result data is sent to the host host to determine whether the test result is qualified. It also includes sending the test result data to the host host during the first test.
[0010] As a preferred achievable method, step S400. executing the application test program to obtain test result data also includes: displaying the test result data through a display module.
[0011] As an achievable preferred method, the upper host and the lower slave use an online communication protocol, the protocol uses a HEX string format, the communication data uses a frame format, the effective data bit number is 8 bits, and the stop bit is 1 bit.
[0012] As an achievable preferred method, the online communication protocol includes a communication command data block and a communication return data block. The communication command data block is sequentially set to: packet header, function, parameter, checksum; the communication return data block is sequentially set to: packet header, packet length, data, checksum.
[0013] The beneficial effects of the present invention are as follows: the present application adopts a "product-oriented operation" mode, compiles corresponding key control commands according to the operating keys and display of the product, and forms a corresponding communication protocol. The tested product sends the content information displayed on the display screen to the test system when it is tested for the first time or when the content information displayed on the display screen changes. The test system determines whether the tested product is qualified or not after comparison and operation based on the content information, thereby completing the automatic product test. In this way, the amount of information data transmitted from the electronic products required by the test system is greatly reduced, and the storage space, signal pins and other resources of the microcontroller of the tested product are reduced. At the same time, since this method has very few protocol commands, very little transmission data, rarely changes the original microcontroller program of the tested product, and rarely occupies the storage space resources of the original microcontroller of the tested product, it greatly reduces the complexity, workload and development cycle of the test system research and development. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A schematic diagram of an online communication automatic detection system for an intelligent electronic product for this application; Figure 2 This is a flow chart of an automatic detection method for online communication of a smart electronic product according to the present application. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical scheme and advantages of the present invention more clear, the present invention is further described in detail by examples below. However, it should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the scope of the present invention.
[0016] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0017] It should be noted that the automatic test system is called Automated Test System in English, and is referred to as "ATS" in this application. The module or product under test is called Unit Under Test in English, and is referred to as "UUT" in this application.
[0018] like Figure 1As shown, the present application provides an online communication automatic detection system for intelligent electronic products, the system includes an upper host T101 and a lower slave T102, the upper host T101 is an automatic test system, the electronic product is the lower slave T102, the upper host T101 and the lower slave T102 are connected through a communication cable T103, the lower slave (T102 includes a microcontroller T1022, a key module T1023 and a display module T1021, the microcontroller T1022 and the key module T1023, the display module T1021 are all electrically connected.
[0019] Both the upper host T101 and the lower slave T102 are provided with a full-duplex serial UART communication interface, and the transmission baud rate is set to 9600bps. It should be noted that the upper host in this application: controls and manages the work of the lower test object UUT through the UART communication interface and communication protocol commands, and obtains relevant data. The lower slave is the test object UUT, that is, the electronic product. The lower slave is controlled by its microcontroller to implement its related tests and other tasks, and communicates with the upper host through the communication interface.
[0020] This application adopts the "product-oriented operation" mode, compiles corresponding button control commands according to the product's operation buttons and display, and forms a corresponding communication protocol. The tested product sends the content information displayed on the display screen to the test system when it is first tested or when the content information displayed on the display screen changes. The test system determines whether the tested product is qualified or not after comparison and operation based on these content information, thereby completing the automatic product test. In this way, the amount of information data required by the test system to be transmitted from the product is greatly reduced, and the storage space, signal pins and other resources of the microcontroller of the tested product are reduced. This method has very few protocol commands, very little transmission data, rarely changes the original microcontroller program of the tested product, and rarely occupies the storage space resources of the original microcontroller of the tested product, which greatly reduces the complexity, workload, and development cycle of the test system research and development.
[0021] like Figure 2 As shown, the present application also provides an online communication automatic detection method for a smart electronic product, comprising the following steps: S100. Receive the test command sent by the host, confirm that the system has successfully handshaked and connected to enter the automatic test working mode; S200. Receive a key control command input by the key module; Specifically, it includes: receiving simulated key commands, converting them into corresponding key control commands, and the microcontroller receiving the key control commands; or receiving trigger information input by the keyboard or mouse to generate corresponding key control commands, and the microcontroller receiving the key control commands.
[0022] S300. According to the key control command, the lower slave microcontroller calls the application test program required for the test; S400. Execute the application test program to obtain test result data; specifically, it also includes: displaying the test result data through a display module.
[0023] S500. Check the test result data. If the test result data is inconsistent with the original test data, send the test result data to the upper host to determine whether the test result is qualified. At the same time, the test result data also needs to be sent to the upper host during the first test.
[0024] The upper host (T101) and the lower slave (T102) use an online communication protocol, the protocol uses a HEX string format, the communication data uses a frame format, the effective data bit number is 8 bits, and the stop bit is 1 bit. The format is shown in Table 1 below.
[0025] Table 1 The online communication protocol includes a communication command data block and a communication return data block. As shown in Table 2, the communication command data block is sequentially set to: packet header, function, parameter, checksum; as shown in Table 3, the communication return data block is sequentially set to: packet header, packet length, data, checksum.
[0026] Table 2 It should be noted that the packet header in Table 2 is fixed as Byte0=0xFE, Byte1=0xDC.
[0027] Function: refers to the function code of this data block.
[0028] Parameters: The content is determined according to the actual application.
[0029] Checksum: refers to the algebraic sum of Byte2 to Byte4; Byte5 = low byte Table 3 The packet header in Table 3 is fixed as Byte0=0xAB, Byte1=0xCD.
[0030] Packet length: data length + 1 byte checksum.
[0031] Data: Truth table of the test object UUT display information.
[0032] Checksum: the algebraic sum of Byte3 to ByteX; ByteX+1 = low byte.
[0033] It should be noted that the communication command set of this application is as follows: System online command, that is, the upper host sends the data as shown in Table 4, and performs online handshake operation with the lower slave, that is, test command, to confirm that the system successfully handshakes and connects to enter the automatic test working mode; Table 4 Func = 0: Automatic test working mode Func = 1: Non-automatic test working mode Description: After receiving the system online command to enter the automatic test working mode, the test object UUT periodically returns the display information truth table to the host computer according to the communication return data block requirements.
[0034] The simulated key commands are shown in Table 5 below.
[0035] Table 5 KeyCode in the table: key code, range 0 to 255 KeyType: The key type includes 0 and 1, 0 represents single click; 1 represents long press.
[0036] It will be clear to those skilled in the art that various modifications to the above embodiments may be made without departing from the overall spirit and concept of the present invention. All of these modifications fall within the scope of protection of the present invention. The protection scheme of the present invention shall be subject to the claims attached to the present invention.
Claims
1. An online communication automatic detection system for intelligent electronic products, characterized in that: The system comprises an upper host (T101) and a lower slave (T102); the upper host (T101) is an automatic testing system, the lower slave (T102) is an electronic product, the upper host (T101) and the lower slave (T102) are connected via a communication cable (T103), the lower slave (T102) comprises a microcontroller (T1022), a key module (T1023) and a display module (T1021), and the microcontroller (T1022), the key module (T1023) and the display module (T1021) are all electrically connected.
2. The method for automatically detecting online communication of an intelligent electronic product according to claim 1, characterized in that: The upper host (T101) and the lower slave (T102) are both provided with a full-duplex serial UART communication interface, and the transmission baud rate is set to 9600bps.
3. A method for automatic detection of online communication of intelligent electronic products, characterized in that: The following steps are involved: S100. Receive the test command sent by the host, confirm that the system has successfully handshaked and connected to enter the automatic test working mode; S200. Receive a key control command input by the key module; S300. According to the key control command, the lower slave microcontroller calls the application test program required for the test; S400. Execute the application test program and obtain the test result data; S500. Detect the test result data. If the test result data is inconsistent with the original test data, send the test result data to the upper host to determine whether the test result is qualified.
4. The method for automatically detecting online communication of an intelligent electronic product according to claim 3, characterized in that: S200. Receiving a key control command input by a key module, including: receiving a simulated key command, converting it into a corresponding key control command, and receiving the key control command by a microcontroller; or receiving trigger information input by a keyboard or mouse to generate a corresponding key control command, and receiving the key control command by a microcontroller.
5. The method for automatically detecting online communication of an intelligent electronic product according to claim 4, characterized in that: Step S500. When the test result data is inconsistent with the original test data, the test result data is sent to the upper host to determine whether the test result is qualified. The test result data also needs to be sent to the upper host during the first test.
6. The method for automatic online communication detection of intelligent electronic products according to claim 5, characterized in that: Step S400: Execute the application test program to obtain test result data, and also includes: displaying the test result data through a display module.
7. The method for automatically detecting online communication of an intelligent electronic product according to claim 6, characterized in that: The upper host (T101) and the lower slave (T102) adopt an online communication protocol, the protocol adopts a HEX string format, the communication data adopts a frame format, the effective data bit number is 8 bits, and the stop bit is 1 bit.
8. The method for automatically detecting online communication of an intelligent electronic product according to claim 7, characterized in that: The online communication protocol includes a communication command data block and a communication return data block. The communication command data block is sequentially set to: packet header, function, parameter, checksum; the communication return data block is sequentially set to: packet header, packet length, data, checksum.
Citation Information
Patent Citations
Method and device for testing POS machine, computer readable storage medium and terminal device
CN107492218A
LKJ test system capable of automatically generating test scripts
CN112162916A
Test system and test method of liquid crystal control module
CN112562553A
Method and apparatus for automatically testing CDMA cell phone software
CN1719925A
