A method for stable online device search in production testing tools

By configuring static IP addresses for devices and using the TCP protocol, combined with a heartbeat mechanism, the problem of unstable device search in production testing tools was solved, enabling reliable online device discovery and real-time monitoring, thus improving the accuracy and efficiency of production line testing.

CN123123477APending Publication Date: 2026-11-17SHENZHEN WHALE VISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424438.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing production testing tools suffer from unstable device search and inaccurate online status judgment in complex production line network environments, mainly due to unreliable UDP broadcast protocol, network congestion, broadcast domain limitations, and device response lag.

Method used

By using static IP address configuration combined with the TCP protocol, a stable channel is established through TCP connection, and heartbeat packets are used to monitor device status, thereby enabling reliable acquisition of device information and real-time maintenance.

Benefits of technology

It improved the success rate of equipment search and the accuracy of online status, enhanced the robustness of the system, and ensured the stability and efficiency of production line testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123477A_ABST
    Figure CN123123477A_ABST
Patent Text Reader

Abstract

This invention provides a stable online device search method for production testing tools. It utilizes static IP addresses to provide each device with a constant and predictable unique identifier within the network, avoiding connection chaos caused by IP address changes. Furthermore, combining the connection-oriented and reliable transmission characteristics of the TCP protocol, it obtains device information by establishing stable one-to-one connections, fundamentally eliminating the uncertainty caused by UDP broadcasts due to packet loss, congestion, and cross-network segment limitations. Building upon this, a proactive connection state maintenance mechanism based on heartbeat packets is further introduced. By periodically sending heartbeat packets and waiting for responses, the online status of devices can be perceived in real time and automatically renewed or removed, ensuring the accuracy and real-time nature of the online device list. The addition of an automatic retry mechanism effectively mitigates the impact of network transient fluctuations on the connection establishment process, further enhancing the system's robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and in particular to a method for stable online device search in production testing tools. Background Technology

[0002] In the manufacturing process of electronic devices, production testing tools are a crucial link in ensuring product quality and functional integrity. These tools need to communicate with a large number of devices under test (DUTs) on the production line to perform functional verification, parameter calibration, firmware flashing, and other testing tasks. The primary prerequisite for achieving these tasks is the ability to accurately and efficiently discover and identify all online devices in the network that have entered test mode. Currently, many production testing tool implementations commonly use a UDP broadcast mechanism to search for online devices. The specific workflow is as follows: First, the production testing tool sends a UDP broadcast packet to a specified network range; then, all devices in the network that receive the broadcast packet and are in test mode will proactively reply to the production testing tool with a response packet containing their own status information, such as device ID and model number; finally, after receiving these responses, the production testing tool identifies the corresponding device as an online device and adds its information to the online device list for use in subsequent testing processes. This UDP broadcast-based discovery mechanism is widely adopted due to its simplicity and lack of complex configuration requirements.

[0003] However, with the expansion of production line scale and the increasing complexity of network environments, the drawbacks of the aforementioned existing technical solutions have become increasingly apparent. The most prominent problem lies in the extreme instability of device search and online status assessment. First, the UDP protocol itself is a connectionless and unreliable transport protocol, which does not guarantee the order or integrity of data packets, let alone their delivery. This means that broadcast packets sent by production testing tools or response packets from devices have a high risk of loss during network transmission, directly leading to devices failing to be discovered or being incorrectly identified as offline. Second, in the specific high-density network environment of a production line, a large number of devices are online simultaneously and interacting with data, easily causing network congestion. UDP broadcast packets, as a potential source of broadcast storms, are significantly more likely to be dropped or delayed by switches during network congestion, severely impacting the real-time performance and success rate of device search. Furthermore, UDP broadcasting itself is limited by the network topology; its broadcast domain is usually limited to the same subnet and cannot cross Layer 3 routing devices, causing online devices existing in different network segments to be undetectable, greatly limiting the applicability of production testing tools. Finally, even if a device can respond to a broadcast, its response time may fluctuate significantly due to the device's own load or network latency, making it difficult for production testing tools to set a unified timeout judgment standard, thus causing frequent misjudgments of online status.

[0004] Therefore, there is an urgent need in this field for a solution that can stably, reliably, and efficiently search for and monitor online devices in complex production line network environments, in order to overcome the technical difficulties of unstable device discovery and inaccurate online status caused by unreliable protocols, network congestion, broadcast domain limitations, and device response delays in existing UDP broadcast technologies. Summary of the Invention

[0005] The purpose of this invention is to provide a stable search method for online devices in production testing tools, so as to solve the problems existing in the prior art.

[0006] To achieve the above objectives, the present invention provides the following solution: This invention provides a method for stable online device search in production testing tools, the method comprising the following steps: Obtain and store the static IP address configured for the device under test; Based on the static IP address, an attempt is made to establish a connection with the device under test via the TCP protocol; If the connection is successful, the device information of the device under test is obtained, the device under test is marked as an online device, and the device information is cached in the online device list; According to a preset cycle, heartbeat packets are sent to the devices under test in the online device list; If a response to the heartbeat packet from the device under test is received within a preset time, the device under test is determined to be online, and the corresponding cache information in the online device list is renewed. If no response to the heartbeat packet is received from the device under test within a preset time, the device under test is determined to be offline, and the device information of the device under test is removed from the list of online devices.

[0007] Preferably, the step of attempting to establish a connection with the device under test via TCP protocol based on the static IP address further includes: When an attempt to connect to the device under test via TCP fails, the system waits for a preset interval and then automatically initiates a reconnection attempt. Repeat the above connection attempt process until a successful connection is made with the device under test, or until a preset retry threshold is reached.

[0008] Preferably, the preset interval time is 3 seconds.

[0009] Preferably, the step of obtaining and storing the static IP address configured for the device under test includes: The static IP address is stored in the SD card corresponding to the device under test; When the device under test enters the test mode, the static IP address is bound to the device under test by executing the program in the SD card.

[0010] Preferably, the device information includes device ID and / or device model.

[0011] Preferably, the step of attempting to establish a connection with the device under test via TCP protocol based on the static IP address includes: Using the tcpSocket connection method, a connection request is sent to the device under test based on the static IP address and its corresponding port number.

[0012] Preferably, the step of obtaining the device information of the device under test, marking the device under test as an online device, and caching the device information in the online device list includes: After the TCP connection is successfully established, the device information of the device under test is obtained through the TCP connection; the device information and online status of the device under test are associated and stored in the online device list.

[0013] Preferably, sending heartbeat packets to the devices under test in the online device list according to a preset period includes: For each device under test in the online device list, heartbeat data packets for detecting connection status are sent periodically at preset time intervals.

[0014] Preferably, the step of determining that the device under test is online if a response to the heartbeat packet is received from the device under test within a preset time, and renewing the corresponding cache information in the online device list, includes: If a response data packet is received from the device under test within the preset waiting time after sending the heartbeat packet, the connection is confirmed to be valid, and the most recent active timestamp of the device under test in the online device list is updated.

[0015] Preferably, the step of determining that the device under test is offline and removing its device information from the online device list if no response to the heartbeat packet is received from the device under test within a preset time includes: If no response data packet is received from the device under test within the preset waiting time after sending the heartbeat packet, the connection is confirmed to be interrupted. The device under test is marked as offline, and the corresponding device information record is deleted from the list of online devices.

[0016] The present invention achieves the following beneficial technical effects compared to the prior art: This invention provides a stable online device search method for production testing tools. By employing the TCP protocol and combining it with a strategy of configuring static IPs for devices, a stable and reliable online device discovery and maintenance system is constructed. Static IP addresses provide each device with a constant and predictable unique identifier within the network, avoiding connection chaos caused by IP address changes. Furthermore, leveraging the connection-oriented and reliable transmission characteristics of the TCP protocol, device information is obtained by establishing stable one-to-one connections, fundamentally eliminating the uncertainty caused by packet loss, congestion, and cross-network segment limitations in UDP broadcasting. Building upon this, a proactive connection status maintenance mechanism based on heartbeat packets is further introduced. By periodically sending heartbeat packets and waiting for responses, the online status of devices can be perceived in real time and automatically renewed or removed, ensuring the accuracy and real-time nature of the online device list. The addition of an automatic retry mechanism effectively mitigates the impact of network transient fluctuations on the connection establishment process, further enhancing the system's robustness. In summary, this invention effectively solves the problem of unstable device search in existing technologies, significantly improving the efficiency and accuracy of production line testing. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 The flowchart illustrates the stable online device search method in the production testing tool provided by this invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] The purpose of this invention is to provide a stable search method for online devices in production testing tools, so as to solve the problems existing in the prior art.

[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] Example 1: like Figure 1As shown, this invention provides a stable search method for online devices in production testing tools. This method aims to solve the technical problems of unstable search and inaccurate judgment of device online status when using UDP broadcast to search for online devices in the prior art.

[0023] In one specific embodiment of the present invention, the static IP address acquisition and storage step is performed first. In the production line testing environment, each device under test (DUT) is pre-configured with a fixed static IP address. This static IP address is a unique and constant identifier for the device in the network. Unlike traditional dynamic IP addresses, static IP addresses do not change due to device restarts or network reconnection. Specifically, the static IP address corresponding to the DUT is stored in an SD card associated with the DUT. The SD card stores the device's initialization program, function control commands, and related configuration information, including the static IP address used by the device. When the DUT enters test mode, it first executes the program on the SD card. By executing this program, the DUT automatically binds to the static IP address recorded on the SD card, thus giving the device a fixed and predictable network location. In this way, each DUT is assigned a constant static IP address, laying the addressing foundation for subsequent stable connections via the TCP protocol.

[0024] After obtaining and storing the static IP address, the test tool attempts to establish a TCP connection based on that address. The test tool, acting as a client, uses tcpSocket, a socket method that communicates via the TCP protocol, to send a TCP connection request to the device under test (DUT) based on the obtained static IP address and its corresponding port number. Unlike UDP, TCP is a connection-oriented, reliable transport protocol. It requires a three-way handshake to establish a connection before communication and provides mechanisms such as acknowledgment and retransmission, flow control, and congestion control during data transmission to ensure reliable data delivery to the target device. Upon receiving the TCP connection request from the test tool, the DUT attempts to establish a TCP connection. Once the TCP connection is successfully established, a reliable data transmission channel is formed between the test tool and the DUT.

[0025] During TCP connection establishment, connection failures may occur due to network fluctuations, device overload, or the device not being fully started. To improve system robustness, this invention introduces an automatic retry mechanism. Specifically, when a testing tool fails to connect to the device under test via TCP, the system does not immediately give up but waits for a preset interval before automatically initiating a reconnection attempt. In a preferred embodiment of this invention, this preset interval is set to 3 seconds. The system repeats the connection attempt process until a successful connection is established with the device under test, or until a preset retry threshold is reached. This automatic retry mechanism ensures that even during brief network fluctuations or device overload during device deployment, the system can reconnect to the device as stably as possible, effectively avoiding connection failures caused by momentary network issues and significantly improving the success rate of device searches and system stability.

[0026] After a successful TCP connection establishment, the device information acquisition and online device list caching steps are executed. The production testing tool sends an information request to the device under test (DUT) through the established TCP connection. Upon receiving the request, the DUT replies with its own device information through the same TCP connection. The device information includes at least one or more of the device ID and device model, and may also include other relevant device status information. After acquiring the device information, the production testing tool marks the DUT as an online device and stores the device information and online status in the online device list. This online device list is a data structure maintained by the production testing tool to record the information of all currently discovered and confirmed online devices for subsequent testing processes. Acquiring device information through a TCP connection ensures the reliability and completeness of the information acquisition, avoiding the device information loss problem caused by packet loss in the UDP broadcast method.

[0027] After caching device information, the heartbeat packet sending and online status maintenance steps are executed. The production testing tool periodically sends heartbeat data packets to each device under test (DUT) in the online device list to check its connection status. A heartbeat packet is a lightweight probe data packet used to periodically confirm whether a device is still online. Specifically, for each DUT in the online device list, the production testing tool sends a heartbeat packet to it at preset time intervals. Upon receiving the heartbeat packet, if the DUT is still online, it replies with a response data packet to the production testing tool.

[0028] After sending a heartbeat packet, the testing tool waits for a response from the device under test (DUT). If a response data packet is received from the DUT within the preset waiting time, the current TCP connection is confirmed to be valid, and the DUT is determined to be still online. At this point, the testing tool renews the cached information corresponding to the DUT in the online device list by updating the most recent active timestamp of the DUT in the online device list. Through this periodic renewal mechanism, the online device list always stores the information of the most recently confirmed active devices, avoiding test task allocation errors caused by devices that have been offline but whose information is still retained in the list.

[0029] If the testing tool does not receive any response data packet from the device under test within the preset waiting time after sending the heartbeat packet, it confirms that the current TCP connection has been interrupted and determines that the device under test has gone offline. At this time, the testing tool marks the device under test as offline and deletes the corresponding device information record from the online device list. Through the above heartbeat packet sending and response monitoring mechanism, the testing tool can perceive the changes in the online status of each device in real time and update the online device list in a timely manner, ensuring the accuracy and real-time nature of the online device list.

[0030] In summary, this invention provides a constant network identifier for devices through static IP address configuration, ensures the stability of device discovery and communication through reliable TCP connections, enhances the system's robustness in complex network environments through an automatic retry mechanism, and enables real-time monitoring and automatic maintenance of device online status through a heartbeat mechanism. The entire technical solution forms a complete closed loop, fundamentally solving the problems of packet loss, congestion, cross-network segment limitations, and device response lag inherent in existing UDP broadcast search methods, significantly improving the stability and efficiency of production line equipment testing.

[0031] This invention has illustrated its principles and implementation methods using specific examples. The descriptions of these embodiments are merely illustrative of the method and its core ideas; furthermore, those skilled in the art will recognize that modifications may be made to the specific implementation methods and application scope based on the principles of this invention. Therefore, the content of this specification should not be construed as limiting the invention.

Claims

1. A method for stable online device search in a production testing tool, characterized in that, The method includes the following steps: Obtain and store the static IP address configured for the device under test; Based on the static IP address, an attempt is made to establish a connection with the device under test via the TCP protocol; If the connection is successful, the device information of the device under test is obtained, the device under test is marked as an online device, and the device information is cached in the online device list; According to a preset cycle, heartbeat packets are sent to the devices under test in the online device list; If a response to the heartbeat packet from the device under test is received within a preset time, the device under test is determined to be online, and the corresponding cache information in the online device list is renewed. If no response to the heartbeat packet is received from the device under test within a preset time, the device under test is determined to be offline, and the device information of the device under test is removed from the list of online devices.

2. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The step of attempting to establish a connection with the device under test via TCP protocol based on the static IP address also includes: When an attempt to connect to the device under test via TCP fails, the system waits for a preset interval and then automatically initiates a reconnection attempt. Repeat the above connection attempt process until a successful connection is made with the device under test, or until a preset retry threshold is reached.

3. The stable search method for online equipment in the production testing tool according to claim 2, characterized in that, The preset interval time is 3 seconds.

4. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The step of obtaining and storing the static IP address configured for the device under test includes: The static IP address is stored in the SD card corresponding to the device under test; When the device under test enters the test mode, the static IP address is bound to the device under test by executing the program in the SD card.

5. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The device information includes the device ID and / or device model.

6. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The step of attempting to establish a connection with the device under test via TCP protocol based on the static IP address includes: Using the tcpSocket connection method, a connection request is sent to the device under test based on the static IP address and its corresponding port number.

7. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The step of obtaining the device information of the device under test, marking the device under test as an online device, and caching the device information in the online device list includes: After the TCP connection is successfully established, the device information of the device under test is obtained through the TCP connection; the device information and online status of the device under test are associated and stored in the online device list.

8. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, The step of sending heartbeat packets to the devices under test in the online device list according to a preset period includes: For each device under test in the online device list, heartbeat data packets for detecting connection status are sent periodically at preset time intervals.

9. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, If a response to the heartbeat packet from the device under test is received within a preset time, the device under test is determined to be online, and the corresponding cache information in the online device list is renewed, including: If a response data packet is received from the device under test within the preset waiting time after sending the heartbeat packet, the connection is confirmed to be valid, and the most recent active timestamp of the device under test in the online device list is updated.

10. The stable search method for online equipment in the production testing tool according to claim 1, characterized in that, If no response to the heartbeat packet is received from the device under test within a preset time, the device under test is determined to be offline, and its device information is removed from the online device list, including: If no response data packet is received from the device under test within the preset waiting time after sending the heartbeat packet, the connection is confirmed to be interrupted. The device under test is marked as offline, and the corresponding device information record is deleted from the list of online devices.