A production test pairing method for a terminal device
Through the message interaction between the server and the terminal device, the fast and flexible pairing of the terminal device is automatically realized, which solves the problem of the cumbersome pairing process in the existing technology, provides visual judgment of pairing results, and reduces costs.
Patent Information
- Application Number
- CN202410250157.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-03-05
AI Technical Summary
In the prior art, the pairing process of terminal equipment is cumbersome, relying on manual buttons and inherent algorithms, it is impossible to achieve fast and flexible networking, and there is a lack of visual pairing success judgment.
The server sends messages of multicast discovery information, the terminal device receives and feedbacks the configuration information, the server saves and sends parameter configuration messages, and the terminal device disconnects after completing the parameter saving, realizing automatic batch pairing, and providing a visual pairing status on the server display interface.
It realizes simple and fast pairing of terminal equipment, reduces labor and time costs, and supports batch configuration and visual pairing result judgment.
Smart Images

Figure CN118612058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of embedded communication technologies, and more specifically, to a production test pairing method for terminal devices. Background Art
[0002] Most terminal products often need to pre-configure some important factory parameters during the production stage. Especially for some terminal products sold in pairs or in groups, certain algorithms are often required for configuration to ensure the paired or grouped operating environment of the devices. For example, in a distributed network, multiple mesh devices often require quick and flexible pairing between multiple devices to enable users to quickly form a mesh network.
[0003] In the traditional pairing method, each device needs to be paired by manually pressing a key to achieve automatic networking. During use, when a user has multiple devices, each device often needs to be pressed against the main device one by one to achieve self-networking between multiple devices and the main device, which is very cumbersome. For the traditional production process, pairing through communication between terminals also seriously depends on the inherent algorithms supported by the devices. If the networking parameters need to be changed, the software version of the devices needs to be updated synchronously, which is very unfavorable for product customization. At the same time, during the configuration process, it is only possible to rely on the light status between terminals to determine whether the pairing is successful, without a visual interface, which is inconvenient for determining whether the pairing is successful. Summary of the Invention
[0004] The object of the present invention is to solve the problem of cumbersome pairing process of terminal devices in the prior art, and provides a production test pairing method for terminal devices, which can achieve simple and fast pairing of terminal devices.
[0005] To achieve the above object of the present invention, the following technical solutions are adopted:
[0006] A production test pairing method for terminal devices includes the following steps:
[0007] S1: The server sends a first message carrying multicast discovery information to a plurality of terminal devices;
[0008] S2: The terminal device receives the first message and parses the multicast discovery information of the first message. The terminal device sends a second message carrying the configuration information of the terminal device to the server;
[0009] S3: The server receives the second message. The server saves the configuration information of the terminal device according to the received second message. The terminal device accesses the server, and the server sends a third message carrying parameter configuration;
[0010] S4: The terminal device receives the third message, saves the parameter configuration in the third message, and completes the production test pairing.
[0011] Further, after step S4, the following steps are further included:
[0012] S5: After the terminal device that has completed the production test pairing saves the parameter configuration in the third message, the terminal device that has completed the production test pairing sends a fourth message carrying the information of successfully saving the parameter configuration to the server;
[0013] S6: The server receives the fourth message, and the server sends a fifth message carrying the confirmation of saving the parameter configuration to the terminal device that has completed the production test pairing;
[0014] S7: The terminal device that has completed the production test pairing receives the fifth message, and the terminal device that has completed the production test pairing sends a sixth message carrying the information of successfully saving to the server;
[0015] S8: The terminal device that has completed the production test pairing disconnects from the server;
[0016] S9: If the server receives the sixth message sent by the terminal device, the server continues to send the fifth message to the terminal device and returns to step S8; if the server does not receive the sixth message returned by the terminal device, the server disconnects from the terminal device that has completed the production test pairing.
[0017] Further, the fourth message is used to inform the server that the terminal device has saved the parameter configuration information; the fifth message is used to confirm to the terminal device whether the configuration parameters have been saved; the sixth message is used to inform the server that the terminal device has successfully saved the parameters.
[0018] Further, the server sends a first message carrying multicast discovery information to several terminal devices respectively, including: the server sends the first message to the terminal device every first preset time interval. If the server receives the second message returned by the terminal device, the server stops sending the first message to the terminal device. If the server does not receive the second message returned by the terminal device, the server continues to send the first message to the terminal device every first preset time interval.
[0019] Further, step S3 further includes that the server judges the number of terminal devices to be paired for production test according to the number of the received second messages. If the judged number of terminal devices reaches the preset number, the server sends a third message to the terminal device; if the judged number of terminal devices does not reach the preset number, it returns to step S1.
[0020] Further, the server adds the corresponding terminal device to the pending pairing list according to the second message carrying the configuration information of the terminal device received, and displays the pending pairing list on the server.
[0021] Further, step S5 further includes that the terminal device that has completed production test pairing sends a fourth message to the server every second preset time interval. In step S6, if the server receives the fourth message from the terminal device that has completed production test pairing, it stops sending the third message to the terminal device that has completed production test pairing and sends a fifth message to the terminal device that has completed production test pairing. If the server does not receive the fourth message from the terminal device that has completed production test pairing within the preset time, it returns to step S1.
[0022] Further, if the server receives the fourth message from the terminal device that has completed production test pairing within the preset time, it displays the configuration success and the corresponding configuration parameters on the corresponding terminal device. If the server does not receive the fourth message from the terminal device that has completed production test pairing within the preset time, the server displays the configuration failure status on the terminal device that has not responded to the fourth message to complete production test pairing.
[0023] Further, the server sending a fifth message carrying the confirmation of receiving parameter configuration to each terminal device that has completed production test pairing further includes: the server sending the fifth message to the terminal device that has completed production test pairing every third preset time interval.
[0024] A production test pairing device for a terminal device, the electronic device includes a processor and a memory. At least one instruction, at least one segment of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one segment of program, the code set or instruction set is loaded and executed by the processor to implement the production test pairing method for a terminal device as described above.
[0025] The beneficial effects of the present invention are as follows:
[0026] Aiming at the problem of the cumbersome pairing process of terminal devices in the prior art, the present invention sets up a server for pairing terminal devices, realizes automatic batch pairing of terminal devices, and the present invention can achieve simple and fast pairing of terminal devices, reducing the labor cost and time cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to make the objectives and technical solutions of the present invention clearer, the present invention provides the following drawings and explanations:
[0028] Figure 1 It is the overall flowchart of the present invention;
[0029] Figure 2It is a flowchart of a production test pairing method for a terminal device described in this embodiment. Detailed implementation manners
[0030] The following will describe the implementation manners of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for explaining the present invention and not for limiting the protection scope of the present invention.
[0031] Embodiment 1
[0032] A production test pairing method for a terminal device, as Figure 1 shown, includes the following steps:
[0033] S1: The server sends a first message carrying multicast discovery information to a plurality of terminal devices;
[0034] S2: The terminal device receives the first message and parses the multicast discovery information of the first message. The terminal device sends a second message carrying the configuration information of the terminal device to the server;
[0035] S3: The server receives the second message. The server saves the configuration information of the terminal device according to the received second message. The terminal device accesses the server, and the server sends a third message carrying parameter configuration;
[0036] S4: The terminal device receives the third message, saves the parameter configuration in the third message, and completes the production test pairing.
[0037] The present invention solves the problem of flexible and rapid pairing between multiple or single terminal devices during the production process of terminal devices. At the same time, it also aims to provide a visual interface for the pairing process during the production process to achieve simple, efficient, and flexible rapid pairing for users.
[0038] Embodiment 2
[0039] On the basis of Embodiment 1, this embodiment further discloses the following content:
[0040] After step S4, the following steps are further included:
[0041] S5: After the terminal device that has completed the production test pairing saves the parameter configuration in the third message, the terminal device that has completed the production test pairing sends a fourth message carrying the information of the completed saved parameter configuration to the server;
[0042] S6: The server receives the fourth message, and the server sends a fifth message carrying the confirmed saved parameter configuration to the terminal device that has completed the production test pairing;
[0043] S7: The terminal device that has completed the production test pairing receives the fifth message, and the terminal device that has completed the production test pairing sends a sixth message carrying the successfully saved information to the server;
[0044] S8: The terminal device that has completed the production test pairing disconnects from the server;
[0045] S9: If the server receives the sixth message sent by the terminal device, the server continues to send the fifth message to the terminal device and returns to step S8; if the server does not receive the sixth message returned by the terminal device, the server disconnects from the terminal device that has completed the production test pairing.
[0046] In the specific implementation process, as Figure 2 shown,
[0047] Start the server in the initial state, and make the server enter the discovery state;
[0048] The server in the discovery state sends a first message to a number of terminal devices;
[0049] After receiving the first message, the terminal device enters the waiting state from the initial state and sends a second message to the server;
[0050] The server determines the number of terminal devices according to the received second message. When the determined number of terminal devices reaches the configured device number, the server enters the confirmation state and sends a third message to the terminal devices;
[0051] The terminal device receives the third message and completes the parameter configuration, then sends a fourth message to the server, and then the terminal device enters the configuration save state;
[0052] After receiving the fourth message, the server enters the configuration state and sends a fifth message to the terminal device;
[0053] After receiving the fifth message, the terminal device enters the save completed state, sends a sixth message to the server, the terminal device completes the pairing and enters the disconnected state;
[0054] After receiving the sixth messages of all terminal devices, the server enters the result state.
[0055] The first message is used to detect the terminal device; the second message includes the configuration information of the terminal device; the third message includes the configuration parameters for pairing between terminal devices; the fourth message is used to inform the server that the terminal device has saved the parameter configuration information; the fifth message is used to confirm with the terminal device whether it has saved the configuration parameters; the sixth message is used to inform the server that the terminal device has successfully saved the parameters.
[0056] It also includes modifying the generation rule of the configuration parameters by changing the script on the server.
[0057] The server sends the first message carrying the multicast discovery information to several terminal devices respectively, including: the server sends the first message to the terminal device every first preset time interval. If the server receives the second message returned by the terminal device, the server stops sending the first message to the terminal device. If the server does not receive the second message returned by the terminal device, the server continues to send the first message to the terminal device every first preset time interval.
[0058] In the specific implementation process, the server saves the configuration information of the corresponding terminal device in the memory according to the received second message, adds the corresponding terminal device to the pairing list, and displays that the terminal device is online on the display interface of the server.
[0059] Step S3 also includes that the server judges the number of terminal devices to be tested and paired according to the number of the received second messages. If the judged number of terminal devices reaches the preset number, the server sends the third message to the terminal device; if the judged number of terminal devices does not reach the preset number, it returns to step S1. Then, when the judged number of terminal devices does not reach the preset number, the terminal device is replaced according to the requirement, and the preset number is set to 2 or 3.
[0060] The server adds the corresponding terminal device to the pairing list according to the received second message carrying the configuration information of the terminal device, displays the pairing list on the server, and when the terminal device is paired successfully, it displays that the pairing is successful on the display interface of the server.
[0061] The server also records all the information in the terminal device pairing process as a working log for easy inspection.
[0062] Step S5 further includes that the terminal device which has completed production test pairing sends a fourth message to the server every second preset time interval. In step S6, if the server receives the fourth message from the terminal device that has completed production test pairing, it stops sending the third message to the terminal device that has completed production test pairing and sends a fifth message to the terminal device that has completed production test pairing. If the server does not receive the fourth message from the terminal device that has completed production test pairing within the preset time, it returns to step S1. The second preset time is set to 3 seconds.
[0063] If the server receives the fourth message from the terminal device that has completed production test pairing within the preset time, it displays configuration success and corresponding configuration parameters on the corresponding terminal device. If the server does not receive the fourth message from the terminal device that has completed production test pairing within the preset time, the server displays a configuration failure status on the terminal device that has not responded with the fourth message to complete production test pairing.
[0064] When the server sends a fifth message carrying confirmation of receiving parameter configuration to each terminal device that has completed production test pairing, it further includes: the server sends the fifth message to the terminal device that has completed production test pairing every third preset time interval. When it does not receive the sixth message from any terminal device for a continuous third preset time, it displays the corresponding terminal device as offline on the display interface of the server. The third preset time is set to 1 second.
[0065] In a specific embodiment, the configuration information of the terminal device includes a physical address (MAC), a serial number (SN), and a version number.
[0066] A production test pairing device for a terminal device, the electronic device includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the production test pairing method for a terminal device as described above.
[0067] Embodiment 3
[0068] Based on Embodiments 1 and 2, this embodiment further discloses the following content:
[0069] The working principle of a production test pairing method for a terminal device is as follows:
[0070] Start the server in the initial state, and the server enters the discovery state;
[0071] Set the script for generating configuration parameters this time on the server, set the preset number of terminal devices this time to 3, and send a first message to the first terminal device, the second terminal device, and the third terminal device once every 0.2 seconds;
[0072] The first terminal device, the second terminal device, and the third terminal device receive the first message and enter the waiting state from the initial state. They then determine the legality of the first message. If the first message is legal, each terminal device separately sends a second message to the server. The second message includes the unique physical address (MAC), serial number (SN), and version number of each terminal device.
[0073] Based on the received second message, the server saves the configuration information of the corresponding terminal device in the memory, adds the corresponding terminal device to the pending pairing list, and displays the online status of the terminal device on the server's display interface. If the number of terminal devices in the pending pairing list is less than the preset number, the server stays in the discovery state, and at this time, the terminal device can be replaced according to the need. If the number of terminal devices in the pairing list is equal to the preset number, the server enters the confirmation state.
[0074] After entering the confirmation state, the server uses a script to generate configuration parameters based on the second message, and then converts the configuration parameters into a third message and continuously sends it to the first terminal device, the second terminal device, and the third terminal device respectively.
[0075] After the first terminal device, the second terminal device, and the third terminal device receive the third message, they parse out the configuration parameters from it and perform parameter configuration according to the configuration parameters. After completing the parameter configuration, the first terminal device, the second terminal device, and the third terminal device respectively send a fourth message to the server to inform the server that the parameter configuration of this terminal device has been completed. Subsequently, each terminal device enters the configuration save state.
[0076] After the server receives the fourth message from any one of the terminal devices, it stops sending the fifth message to the corresponding terminal device and displays the successful pairing of the corresponding terminal device on the server's display interface. If the server receives the fourth message from all terminal devices within 3 seconds after entering the confirmation state, it enters the configuration state and sends a fifth message to each terminal device to confirm whether the terminal device has saved the configuration parameters. If the server does not receive the fourth message from all terminal devices within 3 seconds after entering the confirmation state, it displays the failed pairing of the corresponding terminal device on the server's display interface and returns to the discovery state.
[0077] When each terminal device receives the fifth message, it enters the save complete state and sends a sixth message to the server every 0.2 seconds to inform the server that the parameter of this terminal device has been successfully saved. Subsequently, the terminal device enters the disconnected state.
[0078] After the server receives the sixth message from all terminal devices, it enters the result state and continues to send the fifth message to each terminal device. When it has not received the sixth message from any terminal device for 1 second, it displays the corresponding terminal device as offline on the display interface of the server. Subsequently, the server returns to the discovery state, and the current terminal device pairing process ends. The display interface of the server shows that the next terminal device pairing can be performed.
[0079] The present invention can flexibly configure configuration parameters by setting different script methods to configure the generation rules of parameters and selecting the corresponding script; it can also change the number of terminal devices paired each time to meet various terminal device pairing requirements; it displays the pairing results of terminal devices on the display interface of the server, facilitating users to determine whether the terminal devices are paired successfully; it records all information during the terminal device pairing process as a working log, facilitating inspection and maintenance.
[0080] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limiting the implementation manners of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A production test pairing method for a terminal device, characterized in that It includes the following steps: S1: The server sends a first message carrying multicast discovery information to a number of terminal devices; S2: The terminal device receives the first message and parses the multicast discovery information of the first message. The terminal device sends a second message carrying the configuration information of the terminal device to the server; S3: The server receives the second message. The server saves the configuration information of the terminal device according to the received second message. The terminal device accesses the server, and the server sends a third message carrying parameter configuration; Step S3 further includes that the server judges the number of terminal devices to be tested and paired according to the number of the received second messages. If the judged number of terminal devices reaches the preset number, the server sends a third message to the terminal device; if the judged number of terminal devices does not reach the preset number, it returns to step S1; S4: The terminal device receives the third message and saves the parameter configuration in the third message to complete the production test pairing; S5: After the terminal device that has completed the production test pairing saves the parameter configuration in the third message, the terminal device that has completed the production test pairing sends a fourth message carrying the saved parameter configuration information to the server; Step S5 further includes that the terminal device that has completed the production test pairing sends a fourth message to the server every second preset time interval. In step S6, if the server receives the fourth message from the terminal device that has completed the production test pairing, it stops sending the third message to the terminal device that has completed the production test pairing and sends a fifth message to the terminal device that has completed the production test pairing. If the server does not receive the fourth message from the terminal device that has completed the production test pairing within the preset time, it returns to step S1; S6: The server receives the fourth message, and the server sends a fifth message carrying the confirmation of saved parameter configuration to the terminal device that has completed the production test pairing; S7: The terminal device that has completed the production test pairing receives the fifth message, and the terminal device that has completed the production test pairing sends a sixth message carrying the successful save information to the server; S8: The terminal device that has completed the production test pairing disconnects from the server; S9: If the server receives the sixth message sent by the terminal device, it continues to send the fifth message to the terminal device and returns to step S8; if it does not receive the sixth message returned by the terminal device, the server disconnects from the terminal device that has completed the production test pairing; The server sends a first message carrying multicast discovery information to a number of terminal devices respectively, including: the server sends the first message to the terminal device every first preset time interval. If the server receives the second message returned by the terminal device, the server stops sending the first message to the terminal device. If the server does not receive the second message returned by the terminal device, the server continues to send the first message to the terminal device every first preset time interval; If the server receives a fourth message from a terminal device that has completed production test pairing within a preset time, it displays a successful configuration and corresponding configuration parameters on the corresponding terminal device. If the server does not receive a fourth message from a terminal device that has completed production test pairing within the preset time, the server displays a configuration failure status on the terminal device that has not responded with the fourth message to complete production test pairing.
2. The production test pairing method for a terminal device according to claim 1, wherein The fourth message is used to inform the server that the terminal device has saved parameter configuration information; the fifth message is used to confirm with the terminal device whether it has saved the configuration parameters; the sixth message is used to inform the server that the terminal device has successfully saved the parameters.
3. The production test pairing method of a terminal device according to claim 1, characterized in that, The server adds the corresponding terminal device to the pairing waiting list according to the received second message carrying the configuration information of the terminal device, and displays the pairing waiting list on the server.
4. The production test pairing method of a terminal device according to claim 3, characterized in that, The server sends a fifth message carrying confirmation of receiving parameter configuration to each terminal device that has completed production test pairing, and further includes: the server sends the fifth message to the terminal device that has completed production test pairing every third preset time.
5. A production test pairing device for a terminal device, characterized in that, The electronic device includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a production test pairing method for a terminal device as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for remotely managing mass access equipment and Ethernet equipment
CN102315957A
Automatic discovery method and automatic discovery device
CN106506717A