Internet of Things equipment automatic reconnection method and device based on index tide back-off algorithm

By using an exponential tidal retreat algorithm to adjust the reconnection time interval in IoT devices, the problem of frequent failure of reconnection or waiting time in IoT device reconnection scheme is solved, which improves the stability and reliability of the device and reduces data loss and server pressure.

CN120075279APending Publication Date: 2025-05-30中国邮政储蓄银行股份有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510212721.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing IoT device reconnection solutions are prone to frequent failures and reconnection or waiting for reconnection for too long.

Method used

The automatic reconnection method of IoT devices based on the exponential tidal retreat algorithm is used to adjust the reconnection time interval according to the magnitude relationship between the reconnection times and the reconnection reference times to avoid frequent failures and reconnection or waiting time too long.

Benefits of technology

It effectively avoids a large number of reconnection attempts caused by network connection interruption, improves the stability and reliability of IoT devices, reduces data loss and delay problems caused by network connection interruption, and reduces pressure on the server side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075279A_ABST
    Figure CN120075279A_ABST
Patent Text Reader

Abstract

The invention provides an internet of things equipment automatic reconnection method and device based on an index tide back-off algorithm. The method comprises the following steps: setting a reconnection reference number of times of the Internet of Things equipment according to a connection requirement, and performing disconnection detection on the Internet of Things equipment to determine whether the Internet of Things equipment is disconnected or not; under the condition that the Internet of Things equipment is disconnected, obtaining the number of reconnection times of the Internet of Things equipment; and according to the size relationship between the reconnection times and the reconnection reference times, adopting an index tidal backoff algorithm to adjust the reconnection time interval of the Internet of Things equipment. Based on an exponential tidal backoff algorithm reconnection strategy, a large number of reconnection attempts caused by network connection interruption can be avoided, the reasonable reconnection logic can improve the stability and reliability of the Internet of Things equipment, the problems of data loss and delay caused by network connection interruption are avoided, and the reliability of the Internet of Things equipment is improved. The problem that an existing Internet of Things equipment reconnection scheme is prone to frequent reconnection failure or overlong reconnection waiting time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automatic reconnection of Internet of Things devices, and specifically, to a method, device, computer-readable storage medium and electronic device for automatic reconnection of Internet of Things devices based on an exponential tidal backoff algorithm. Background Art

[0002] An IoT platform is a software system or service used to connect, manage, and monitor IoT devices. It acts as a hub in the IoT ecosystem, providing a variety of functions and services so that users can easily manage and control IoT devices, collect and analyze data, and implement automated and intelligent applications. IoT platforms typically have the following features and functions: device connection and management, data collection and storage, data analysis and processing, remote monitoring and control, security and permission management, scalability, and customization. Device connection and management are important components of an IoT platform, allowing users to easily connect various IoT devices to the platform and monitor, control, and manage these devices.

[0003] IoT devices are often in narrow bandwidth or unstable network environments. The network is usually poor and unstable. The main reason is the limitation of network infrastructure. In some areas or places, the network infrastructure may be imperfect, resulting in limited bandwidth resources. The second is network congestion. In a busy network environment, bandwidth resources may be consumed by a large number of devices or users at the same time, resulting in network congestion and bandwidth bottlenecks. Especially during peak hours, such as daytime working hours or during specific activities, the problem of network congestion may be more prominent. The third is technical limitations. IoT devices usually use low-power, low-cost communication technologies, which may limit the bandwidth capabilities of the device. Therefore, the connection between the IoT device and the server may be unstable, triggering disconnection and reconnection, and the network environment may be unstable for a long period of time, resulting in repeated connection failures of IoT devices when disconnecting and reconnecting from the server.

[0004] In the current common technical solutions, IoT platforms generally use a fixed reconnection interval. However, in actual environments, network conditions are usually changeable. Setting a fixed reconnection interval will result in frequent reconnection failures or long waiting time for reconnection. Summary of the invention

[0005] The main purpose of the present application is to provide a method, apparatus, computer-readable storage medium and electronic device for automatic reconnection of IoT devices based on an exponential tidal backoff algorithm, so as to at least solve the problem that existing IoT device reconnection solutions are prone to frequent reconnection failures or long waiting time for reconnection.

[0006] To achieve the above object, according to one aspect of the present application, there is provided an automatic reconnection method for Internet of Things devices based on an exponential tidal backoff algorithm, including: setting the reconnection reference times of the Internet of Things device according to the connection requirements of the Internet of Things device, and performing disconnection detection on the Internet of Things device to determine whether the Internet of Things device is disconnected; in the case where the Internet of Things device is disconnected, obtaining the reconnection times of the Internet of Things device; according to the magnitude relationship between the reconnection times and the reconnection reference times, adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm.

[0007] Optionally, according to the magnitude relationship between the reconnection times and the reconnection reference times, adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm includes: according to the magnitude relationship between the reconnection times and the reconnection reference times, using the first formula: Determining the reconnection time interval of the Internet of Things device, where t(n) is the reconnection time interval, β is the maximum reconnection time interval, n is the reconnection times, and N is the reconnection reference times.

[0008] Optionally, after adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: obtaining multiple historical disconnection recovery times of the Internet of Things device, determining the average disconnection recovery time of the Internet of Things device according to the multiple historical disconnection recovery times, where the historical disconnection recovery time is the time from disconnection to reconnection of the Internet of Things device; correcting the exponential tidal backoff algorithm according to the average disconnection recovery time to obtain a target exponential tidal backoff algorithm.

[0009] Optionally, correcting the exponential tidal backoff algorithm according to the average disconnection recovery time to obtain a target exponential tidal backoff algorithm includes: using the second formula: Determining the target exponential tidal backoff algorithm, where t(n) is the reconnection time interval, α is the reconnection time interval adjustment coefficient, β is the maximum reconnection time interval, is the average disconnection recovery time, n is the reconnection times, and N is the reconnection reference times.

[0010] Optionally, after correcting the exponential tidal backoff algorithm according to the average disconnection recovery time to obtain a target exponential tidal backoff algorithm, the method further includes: continuing to perform the disconnection detection on the Internet of Things device; in the case where the Internet of Things device is detected to be disconnected, according to the magnitude relationship between the reconnection times and the reconnection reference times, adjusting the reconnection time interval of the Internet of Things device by using the target exponential tidal backoff algorithm.

[0011] Optionally, after adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: after a preset time period, determining whether the Internet of Things device has successfully reconnected; and generating a prompt message when the Internet of Things device still fails to connect successfully, where the prompt message is used to remind relevant personnel to check the Internet of Things device.

[0012] Optionally, after adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: when it is detected that the Internet of Things device has successfully reconnected, recording the disconnection recovery time of the Internet of Things device.

[0013] According to another aspect of the present application, there is provided an automatic reconnection device for an Internet of Things device based on an exponential tidal backoff algorithm, including: a detection unit, configured to set a reconnection reference count for the Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the Internet of Things device to determine whether the Internet of Things device is disconnected; an acquisition unit, configured to acquire the reconnection count of the Internet of Things device when the Internet of Things device is disconnected; and a first adjustment unit, configured to adjust the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm according to the magnitude relationship between the reconnection count and the reconnection reference count.

[0014] According to still another aspect of the present application, there is provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the automatic reconnection methods for an Internet of Things device based on an exponential tidal backoff algorithm.

[0015] According to yet another aspect of the present application, there is provided an electronic device, including: one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any one of the automatic reconnection methods for an Internet of Things device based on an exponential tidal backoff algorithm.

[0016] Applying the technical solution of the present application, set the reconnection reference times of the Internet of Things device according to the connection requirement, and perform disconnection detection on the Internet of Things device to determine whether the Internet of Things device is disconnected; in the case where the Internet of Things device is disconnected, obtain the reconnection times of the Internet of Things device; according to the magnitude relationship between the reconnection times and the reconnection reference times, adjust the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm. Based on the reconnection strategy of the exponential tidal backoff algorithm, it can avoid a large number of reconnection attempts caused by network connection interruption. A reasonable reconnection logic can not only improve the stability and reliability of the Internet of Things device, avoid data loss and delay problems caused by network connection interruption, but also reduce the pressure on the server side due to frequent connections, and solve the problem that the existing reconnection scheme of the Internet of Things device is prone to frequent failed reconnections or too long waiting time for reconnection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0018] Figure 1 shows a hardware structure block diagram of a mobile terminal for implementing an automatic reconnection method of an Internet of Things device based on an exponential tidal backoff algorithm according to an embodiment of the present application;

[0019] Figure 2 shows a flowchart of an automatic reconnection method of an Internet of Things device based on an exponential tidal backoff algorithm according to an embodiment of the present application;

[0020] Figure 3 shows a schematic diagram of the difference between backoff algorithms according to an embodiment of the present application;

[0021] Figure 4 shows a flowchart of a specific automatic reconnection method of an Internet of Things device based on an exponential tidal backoff algorithm according to an embodiment of the present application;

[0022] Figure 5 shows a structure block diagram of an automatic reconnection device of an Internet of Things device based on an exponential tidal backoff algorithm according to an embodiment of the present application.

[0023] Among them, the above-mentioned accompanying drawings include the following reference numerals:

[0024] 102, processor; 104, memory; 106, transmission device; 108, input / output device. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The following will describe the present application in detail with reference to the drawings and in combination with the embodiments.

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances for the embodiments of the present application described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0028] As introduced in the background art, the existing Internet of Things device reconnection solutions are prone to problems such as frequent failed reconnections or overly long waiting times for reconnection. To solve the problems of frequent failed reconnections or overly long waiting times for reconnection in the existing Internet of Things device reconnection solutions, the embodiments of the present application provide an automatic reconnection method, device, computer-readable storage medium, and electronic device for Internet of Things devices based on an exponential tidal backoff algorithm.

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.

[0030] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of an automatic reconnection method for Internet of Things devices based on an exponential tidal backoff algorithm according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1Only one processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data are shown. Among them, the above mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown therein, or have a different configuration from Figure 1 shown.

[0031] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the automatic reconnection method of Internet of Things devices based on the exponential tidal backoff algorithm in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and their combinations. The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, an automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0033] Figure 2 is a flowchart of the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm according to an embodiment of the present application. AsFigure 2 As shown in the figure, the method includes the following steps:

[0034] Step S201: Set the reconnect reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above-mentioned Internet of Things device to determine whether the above-mentioned Internet of Things device is disconnected;

[0035] Specifically, set the reconnect reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device. The connection requirements of the Internet of Things device include requirements such as stable network connection, low latency, high bandwidth, security, and reliability. According to these connection requirements, the reconnect reference times of the Internet of Things device can be set to ensure that the device can reconnect in time and resume normal operation when there are problems with the network connection.

[0036] Step S202: When the above-mentioned Internet of Things device is disconnected, obtain the reconnect times of the above-mentioned Internet of Things device;

[0037] Step S203: According to the magnitude relationship between the above-mentioned reconnect times and the above-mentioned reconnect reference times, use the exponential tidal backoff algorithm to adjust the reconnect time interval of the above-mentioned Internet of Things device.

[0038] Specifically, use the backoff algorithm to adjust the automatic reconnect interval. By setting an initial waiting time and then using the backoff algorithm to control the automatic reconnect gap, the waiting time is gradually increased after each reconnect attempt to avoid a large number of reconnect attempts caused by network connection interruptions.

[0039] Through this embodiment, set the reconnect reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the Internet of Things device to determine whether the Internet of Things device is disconnected; when the Internet of Things device is disconnected, obtain the reconnect times of the Internet of Things device; according to the magnitude relationship between the reconnect times and the reconnect reference times, use the exponential tidal backoff algorithm to adjust the reconnect time interval of the Internet of Things device. Based on the reconnect strategy of the exponential tidal backoff algorithm, it can avoid a large number of reconnect attempts caused by network connection interruptions. A reasonable reconnect logic can not only improve the stability and reliability of the Internet of Things device, avoid data loss and latency problems caused by network connection interruptions, but also reduce the pressure on the server side due to frequent connections, and solve the problem that the existing reconnect solutions for Internet of Things devices are prone to frequent failed reconnects or too long waiting times for reconnects.

[0040] In the specific implementation process, according to the magnitude relationship between the above-mentioned reconnect times and the above-mentioned reconnect reference times, using the exponential tidal backoff algorithm to adjust the reconnect time interval of the above-mentioned Internet of Things device includes: according to the magnitude relationship between the above-mentioned reconnect times and the above-mentioned reconnect reference times, using the first formula: Determine the reconnection time interval of the above Internet of Things device, where t(n) is the above reconnection time interval, β is the maximum reconnection time interval, n is the above reconnection times, and N is the above reconnection reference times.

[0041] The exponential tidal backoff algorithm of this method consists of three piecewise functions. The first function uses exponential growth, which can make the automatic reconnection time increase rapidly in the initial few failed reconnections, avoiding a large number of reconnection attempts caused by connection interruptions in a short time. The second function also uses an exponential function, but it is opposite to the first one. As the number of retries increases, the exponent decreases successively. This design can not only ensure that the automatic reconnection time can still increase steadily, further reducing the computational overhead caused by connection applications between the device and the server, but also avoid the device remaining in a long offline state when the network state has recovered due to too rapid exponential growth. The third segment represents growth truncation. When the reconnection interval grows to a predetermined size, the reconnection request will be initiated by maintaining this automatic reconnection interval all the time.

[0042] Specifically, after adjusting the reconnection time interval of the above Internet of Things device by using the exponential tidal backoff algorithm, the above method further includes: obtaining multiple historical disconnection recovery times of the above Internet of Things device, and determining the average disconnection recovery time of the above Internet of Things device according to the multiple above historical disconnection recovery times, where the above historical disconnection recovery time is the time from disconnection to reconnection of the above Internet of Things device; and correcting the above exponential tidal backoff algorithm according to the average disconnection recovery time to obtain the target exponential tidal backoff algorithm.

[0043] This method corrects the original exponential tidal backoff algorithm according to the average disconnection recovery time of the Internet of Things device to obtain the target exponential tidal backoff algorithm. In this way, a fixed reconnection reference number N can be set so that the device has a high probability of being able to connect successfully when reconnecting about N / 2 times. The lower the value of N, the more the number of connection attempts of the Internet of Things platform device to the server can be reduced, and the computational overhead generated by the device and the server due to reconnection can be reduced.

[0044] More specifically, correcting the above exponential tidal backoff algorithm according to the average disconnection recovery time to obtain the target exponential tidal backoff algorithm includes: using the second formula: Determine the above target exponential tidal backoff algorithm, where t(n) is the above reconnection time interval, α is the reconnection time interval adjustment coefficient, β is the maximum reconnection time interval, is the above average disconnection recovery time, n is the above reconnection times, and N is the above reconnection reference times.

[0045] Among them, the reconnection time interval adjustment coefficient α is determined by the recorded average time from historical offline to reconnection.

[0046] Further, after correcting the exponential tidal backoff algorithm according to the above average disconnection recovery time to obtain the target exponential tidal backoff algorithm, the above method further includes: continuing to perform the above disconnection detection on the above Internet of Things device; when detecting that the above Internet of Things device is disconnected, according to the magnitude relationship between the above reconnection times and the above reconnection reference times, adjusting the above reconnection time interval of the above Internet of Things device by using the above target exponential tidal backoff algorithm.

[0047] The method uses the corrected target exponential tidal backoff algorithm, which is more suitable for the automatic reconnection interval control scenario of Internet of Things platform devices. It uses a three-segment piecewise function to adjust and control the reconnection interval, which not only solves the problem of a large number of reconnection attempts but also avoids the situation where the reconnection interval grows too large, resulting in the device still being in an offline waiting state for a long time even though the network has recovered. In addition, all devices on the Internet of Things platform are in different environments, so their network environments and states are also different. The time required for a device to disconnect and reconnect due to network problems will also be different. By adding adaptive adjustments suitable for different devices, the problem that the automatic reconnection scheme is not applicable due to network environment differences among different devices is solved.

[0048] Furthermore, after adjusting the reconnection time interval of the above Internet of Things device by using the exponential tidal backoff algorithm, the above method further includes: after a preset time period, determining whether the above Internet of Things device has reconnected successfully; when the above Internet of Things device still fails to connect successfully, generating a prompt message, where the above prompt message is used to remind relevant personnel to check the above Internet of Things device.

[0049] The method determines the maximum reconnection time of the Internet of Things device by setting a preset time period, avoiding losses caused by the Internet of Things device failing to reconnect for a long time.

[0050] Specifically, after adjusting the reconnection time interval of the above Internet of Things device by using the exponential tidal backoff algorithm, the above method further includes: when detecting that the above Internet of Things device has reconnected successfully, recording the disconnection recovery time of the above Internet of Things device.

[0051] The method records the disconnection recovery time of the Internet of Things device for subsequent adjustment of the exponential tidal backoff algorithm, solving the problem that the automatic reconnection scheme is not applicable due to network environment differences among different devices.

[0052] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm of the present application will be described in detail below in conjunction with specific embodiments.

[0053] This embodiment relates to a specific method for automatic reconnection of Internet of Things devices based on an exponential tidal backoff algorithm, which specifically includes the following content:

[0054] Firstly, it is the adjustment of the automatic reconnection interval of Internet of Things platform devices based on the backoff algorithm. After the disconnection of Internet of Things platform devices, automatic reconnection is required. Generally, the platform devices use a fixed interval time for automatic reconnection. In this embodiment, the backoff algorithm is used to adjust the automatic reconnection interval. By setting an initial waiting time and then using the backoff algorithm to control the automatic reconnection gap, the waiting time is gradually increased after each reconnection attempt to avoid a large number of reconnection attempts caused by network connection interruptions.

[0055] Secondly, it is the optimization of the backoff algorithm in the scenario of controlling the automatic reconnection interval of Internet of Things platform devices. As Figure 3 shown, it shows the growth of the reconnection interval with the increase in the number of device reconnections using the exponential backoff algorithm, the linear backoff algorithm, and the exponential tidal backoff algorithm. The exponential tidal backoff algorithm proposed in this embodiment consists of three piecewise functions, and the algorithm is as shown in the formula: shown. The first function is the same as the exponential backoff algorithm, using exponential growth, which can make the automatic reconnection time grow rapidly in the initial few failed reconnections to avoid a large number of reconnection attempts caused by connection interruptions in a short period of time. The second function also uses an exponential function, but is opposite to the first one, and the exponent decreases successively with the increase in the number of retries. This design can not only ensure that the automatic reconnection time can still grow steadily, further reducing the computational overhead caused by connection requests between the device and the server, but also avoid the device remaining in a long offline state when the network state has recovered due to too fast exponential growth. The third segment represents growth truncation. When the reconnection interval grows to a predetermined size, the reconnection request will be initiated with this automatic reconnection interval maintained all the time.

[0056] Finally, it is the adaptive adjustment of the reconnection interval increase amplitude based on the average statistical value of the device reconnection times. As shown in the formula: shown, a constant α is added, and α is determined by the recorded average time from historical offline to connection recovery. By adjusting α, a fixed number of reconnection times N can be set so that the device has a high probability of being able to connect successfully around N / 2 reconnection times. The lower the N value, the more the number of connection attempts of the Internet of Things platform device to the server can be reduced, and the computational overhead generated by the device and the server due to reconnection can be reduced. In summary, the automatic reconnection process of Internet of Things devices based on the exponential tidal backoff algorithm is as Figure 4 shown.

[0057] In this embodiment, the automatic reconnection of IoT platform devices adopts a backoff algorithm, which can make the reconnection interval increase rapidly, avoid the device sending multiple reconnection requests to the server in a short period of time, reduce the consumption of computing resources of the device and the server, and reduce the system pressure. The proposed exponential tidal backoff algorithm is more suitable for the scenario of controlling the automatic reconnection interval of IoT platform devices. It uses a three-segment piecewise function to adjust and control the reconnection interval, which not only solves the problem of a large number of reconnection attempts, but also avoids the situation where the reconnection interval grows too large, resulting in the device still being in an offline waiting state for a long time even though the network has recovered. The environments of all devices in the IoT platform are different, so the network environments and states are also different. The time required for the device to disconnect and reconnect due to network problems will also be different. By adding adaptive adjustments suitable for different devices, the problem that the automatic reconnection scheme is not applicable due to network environment differences among different devices is solved.

[0058] This embodiment of the present application also provides an automatic reconnection device for IoT devices based on the exponential tidal backoff algorithm. It should be noted that the automatic reconnection device for IoT devices based on the exponential tidal backoff algorithm in this embodiment of the present application can be used to execute the method for automatically reconnecting IoT devices based on the exponential tidal backoff algorithm provided in this embodiment of the present application. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0059] The following introduces the automatic reconnection device for IoT devices based on the exponential tidal backoff algorithm provided in this embodiment of the present application.

[0060] Figure 5 It is a schematic diagram of the automatic reconnection device for IoT devices based on the exponential tidal backoff algorithm according to this embodiment of the present application. As Figure 5 shown, the device includes:

[0061] A detection unit 51, configured to set the reconnection reference times of the above IoT device according to the connection requirements of the IoT device, and perform disconnection detection on the above IoT device to determine whether the above IoT device is disconnected;

[0062] An acquisition unit 52, configured to acquire the reconnection times of the above IoT device when the above IoT device is disconnected;

[0063] A first adjustment unit 53, configured to adjust the reconnection time interval of the above IoT device by using the exponential tidal backoff algorithm according to the magnitude relationship between the above reconnection times and the above reconnection reference times.

[0064] In this embodiment, a detection unit is configured to set the reconnection reference times of the above Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above Internet of Things device to determine whether the above Internet of Things device is disconnected; an acquisition unit is configured to, when the above Internet of Things device is disconnected, acquire the reconnection times of the above Internet of Things device; a first adjustment unit is configured to adjust the reconnection time interval of the above Internet of Things device by using an exponential tidal backoff algorithm according to the magnitude relationship between the above reconnection times and the above reconnection reference times. Based on the reconnection strategy of the exponential tidal backoff algorithm, a large number of reconnection attempts caused by network connection interruptions can be avoided. A reasonable reconnection logic can not only improve the stability and reliability of the Internet of Things device, avoid data loss and delay problems caused by network connection interruptions, but also reduce the pressure on the server side due to frequent connections, and solve the problem that the existing reconnection solutions for Internet of Things devices are prone to frequent failed reconnections or overly long waiting times for reconnection.

[0065] As an optional solution, the first adjustment unit includes a first determination module, configured to determine the reconnection time interval of the above Internet of Things device according to the magnitude relationship between the above reconnection times and the above reconnection reference times, using the first formula: t(n)=β×(N / (N + n))^α, where t(n) is the reconnection time interval, β is the maximum reconnection time interval, n is the above reconnection times, and N is the above reconnection reference times.

[0066] An optional solution is that the device further includes a first determination unit and a correction unit. The first determination unit is configured to, after adjusting the reconnection time interval of the above Internet of Things device by using the exponential tidal backoff algorithm, acquire multiple historical disconnection recovery times of the above Internet of Things device, and determine the average disconnection recovery time of the above Internet of Things device according to the multiple above historical disconnection recovery times, where the above historical disconnection recovery time is the time from disconnection to reconnection of the above Internet of Things device; the correction unit is configured to correct the above exponential tidal backoff algorithm according to the average disconnection recovery time to obtain a target exponential tidal backoff algorithm.

[0067] An optional solution is that the correction unit includes a second determination module, configured to determine the above target exponential tidal backoff algorithm by using the second formula: t(n)=β×(N / (N + n))^α×(1 + (t - t(n)) / t), where t(n) is the reconnection time interval, α is the reconnection time interval adjustment coefficient, β is the maximum reconnection time interval, t is the average disconnection recovery time, n is the above reconnection times, and N is the above reconnection reference times.

[0068] An alternative solution is that the device further includes a disconnection detection unit and a second adjustment unit. The disconnection detection unit is configured to continue to perform the disconnection detection on the IoT device after correcting the exponential tidal backoff algorithm according to the above average disconnection recovery time to obtain a target exponential tidal backoff algorithm; the second adjustment unit is configured to, when detecting that the IoT device is disconnected, adjust the reconnection time interval of the IoT device by using the target exponential tidal backoff algorithm according to the magnitude relationship between the number of reconnections and the reference number of reconnections.

[0069] An alternative solution is that the device further includes a second determination unit and a generation unit; the second determination unit is configured to determine whether the IoT device has been successfully reconnected after a preset time period after adjusting the reconnection time interval of the IoT device by using the exponential tidal backoff algorithm; the generation unit is configured to generate a prompt message when the IoT device is still not successfully connected, where the prompt message is used to remind relevant personnel to check the IoT device.

[0070] An alternative solution is that the device further includes a recording unit, configured to record the disconnection recovery time of the IoT device when it is detected that the IoT device has been successfully reconnected after adjusting the reconnection time interval of the IoT device by using the exponential tidal backoff algorithm.

[0071] The above IoT device automatic reconnection device based on the exponential tidal backoff algorithm includes a processor and a memory. The above detection unit, acquisition unit, first adjustment unit, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are respectively located in different processors in any combination form.

[0072] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problems that the existing IoT device reconnection solutions are prone to frequent failed reconnections or too long waiting time for reconnection can be solved.

[0073] The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip.

[0074] An embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the above program runs, it controls the device where the computer-readable storage medium is located to execute the above IoT device automatic reconnection method based on the exponential tidal backoff algorithm.

[0075] Specifically, the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm includes:

[0076] Step S201: Set the reconnection reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above-mentioned Internet of Things device to determine whether the above-mentioned Internet of Things device is disconnected;

[0077] Step S202: When the above-mentioned Internet of Things device is disconnected, obtain the reconnection times of the above-mentioned Internet of Things device;

[0078] Step S203: According to the magnitude relationship between the above-mentioned reconnection times and the above-mentioned reconnection reference times, adjust the reconnection time interval of the above-mentioned Internet of Things device by using the exponential tidal backoff algorithm.

[0079] An embodiment of the present invention provides a processor, which is used to run a program. When the program runs, it executes the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm.

[0080] Specifically, the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm includes:

[0081] Step S201: Set the reconnection reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above-mentioned Internet of Things device to determine whether the above-mentioned Internet of Things device is disconnected;

[0082] Step S202: When the above-mentioned Internet of Things device is disconnected, obtain the reconnection times of the above-mentioned Internet of Things device;

[0083] Step S203: According to the magnitude relationship between the above-mentioned reconnection times and the above-mentioned reconnection reference times, adjust the reconnection time interval of the above-mentioned Internet of Things device by using the exponential tidal backoff algorithm.

[0084] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements at least the following steps:

[0085] Step S201: Set the reconnection reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above-mentioned Internet of Things device to determine whether the above-mentioned Internet of Things device is disconnected;

[0086] Step S202: When the above-mentioned Internet of Things device is disconnected, obtain the reconnection times of the above-mentioned Internet of Things device;

[0087] Step S203: According to the magnitude relationship between the above-mentioned reconnection times and the above-mentioned reconnection reference times, adjust the reconnection time interval of the above-mentioned Internet of Things device by using the exponential tidal backoff algorithm.

[0088] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0089] This application also provides a computer program product which, when executed on a data processing device, is adapted to execute a program initialized with at least the following method steps:

[0090] Step S201: Set the reconnect reference times of the above-mentioned Internet of Things device according to the connection requirements of the Internet of Things device, and perform disconnection detection on the above-mentioned Internet of Things device to determine whether the above-mentioned Internet of Things device is disconnected;

[0091] Step S202: When the above-mentioned Internet of Things device is disconnected, obtain the reconnect times of the above-mentioned Internet of Things device;

[0092] Step S203: According to the magnitude relationship between the above-mentioned reconnect times and the above-mentioned reconnect reference times, adjust the reconnect time interval of the above-mentioned Internet of Things device by using the exponential tidal backoff algorithm.

[0093] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.

[0094] Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0095] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the specified functions in one or more of the processes Figure 1 one or more of the processes and / or blocks Figure 1 or means for implementing the specified functions in one or more of the blocks.

[0096] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the specified functions in one or more of the processes Figure 1 one or more of the processes and / or blocks Figure 1 or means for implementing the specified functions in one or more of the blocks.

[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one or more of the processes Figure 1 one or more of the processes and / or blocks Figure 1 or means for implementing the specified functions in one or more of the blocks.

[0098] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0099] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory. The memory is an example of computer-readable media.

[0100] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transitory media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0101] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0102] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0103] 1) A method for automatically reconnecting an Internet of Things device based on an exponential tidal backoff algorithm of the present application includes: setting a reconnection reference number of the Internet of Things device according to the connection requirements of the Internet of Things device, and performing disconnection detection on the Internet of Things device to determine whether the Internet of Things device is disconnected; in the case where the Internet of Things device is disconnected, obtaining the reconnection number of the Internet of Things device; and adjusting the reconnection time interval of the Internet of Things device by using an exponential tidal backoff algorithm according to the magnitude relationship between the reconnection number and the reconnection reference number. Based on the reconnection strategy of the exponential tidal backoff algorithm, it can avoid a large number of reconnection attempts caused by network connection interruptions. A reasonable reconnection logic can not only improve the stability and reliability of the Internet of Things device, avoid data loss and latency problems caused by network connection interruptions, but also reduce the pressure on the server side due to frequent connections, and solve the problem that the existing reconnection solutions for Internet of Things devices are prone to frequent failed reconnections or overly long waiting times for reconnections.

[0104] 2), An automatic reconnection device for Internet of Things devices based on an exponential tidal backoff algorithm in this application, includes: a detection unit, configured to set the reconnection reference times of the above-mentioned Internet of Things devices according to the connection requirements of the Internet of Things devices, and perform disconnection detection on the Internet of Things devices to determine whether the Internet of Things devices are disconnected; an acquisition unit, configured to acquire the reconnection times of the Internet of Things devices when the Internet of Things devices are disconnected; a first adjustment unit, configured to adjust the reconnection time interval of the Internet of Things devices by using the exponential tidal backoff algorithm according to the size relationship between the reconnection times and the reconnection reference times. Based on the reconnection strategy of the exponential tidal backoff algorithm, it can avoid a large number of reconnection attempts caused by network connection interruptions. A reasonable reconnection logic can not only improve the stability and reliability of Internet of Things devices, avoid data loss and delay problems caused by network connection interruptions, but also reduce the pressure on the server side due to frequent connections, and solve the problem that the existing reconnection solutions for Internet of Things devices are prone to frequent failed reconnections or too long waiting times for reconnections.

[0105] The above are only the preferred embodiments of this application and are not used to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. An automatic reconnection method for Internet of Things devices based on an exponential tidal backoff algorithm, characterized in that: include: Setting a reconnection reference number of the IoT device according to the connection requirement of the IoT device, and performing a disconnection detection on the IoT device to determine whether the IoT device is disconnected; When the IoT device is disconnected, obtain the number of reconnections of the IoT device; According to the relationship between the number of reconnections and the reference number of reconnections, an exponential tidal backoff algorithm is used to adjust the reconnection time interval of the Internet of Things device.

2. The method according to claim 1, characterized in that According to the relationship between the number of reconnections and the reference number of reconnections, an exponential tidal backoff algorithm is used to adjust the reconnection time interval of the IoT device, including: According to the relationship between the number of reconnection times and the reference number of reconnection times, the first formula is used: Determine a reconnection time interval for the IoT device, where t(n) is the reconnection time interval, β is the maximum reconnection time interval, n is the number of reconnections, and N is the reference number of reconnections.

3. The method according to claim 1, characterized in that After adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: Acquire multiple historical disconnection and recovery times of the IoT device, and determine an average disconnection and recovery time of the IoT device according to the multiple historical disconnection and recovery times, wherein the historical disconnection and recovery time is the time from disconnection to recovery of the IoT device; The exponential tidal backoff algorithm is modified according to the average value of the disconnection recovery time to obtain a target exponential tidal backoff algorithm.

4. The method according to claim 3, characterized in that The exponential tidal backoff algorithm is modified according to the average value of the disconnection recovery time to obtain a target exponential tidal backoff algorithm, including: Using the second formula: Determine the target exponential tidal backoff algorithm, where t(n) is the reconnection time interval, α is the reconnection time interval adjustment coefficient, β is the maximum reconnection time interval, is the average value of the disconnection recovery time, n is the number of reconnections, and N is the reference number of reconnections.

5. The method according to claim 3, characterized in that: After the exponential tidal backoff algorithm is corrected according to the average value of the disconnection recovery time to obtain a target exponential tidal backoff algorithm, the method further includes: Continuing to perform the disconnection detection on the IoT device; When it is detected that the IoT device is disconnected, the target index tidal backoff algorithm is used to adjust the reconnection time interval of the IoT device according to the relationship between the number of reconnections and the reference number of reconnections.

6. The method according to claim 1, characterized in that After adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: After a preset time period, determining whether the IoT device has successfully reconnected; In the case that the IoT device still fails to connect successfully, a prompt message is generated, wherein the prompt message is used to remind relevant personnel to check the IoT device.

7. The method according to claim 1, characterized in that After adjusting the reconnection time interval of the Internet of Things device by using the exponential tidal backoff algorithm, the method further includes: When it is detected that the IoT device is successfully reconnected, the disconnection recovery time of the IoT device is recorded.

8. An automatic reconnection device for Internet of Things devices based on an exponential tidal backoff algorithm, characterized in that: include: A detection unit, used to set a reconnection reference number of the IoT device according to a connection requirement of the IoT device, and to perform disconnection detection on the IoT device to determine whether the IoT device is disconnected; An acquisition unit, configured to acquire the number of reconnections of the IoT device when the IoT device is disconnected; The first adjustment unit is used to adjust the reconnection time interval of the Internet of Things device by using an exponential tidal backoff algorithm according to the relationship between the reconnection number and the reconnection reference number.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the automatic reconnection method for Internet of Things devices based on the exponential tidal backoff algorithm as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the automatic reconnection method of an Internet of Things device based on an exponential tidal backoff algorithm as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Large-scale equipment trunking communication method

    CN120729918A