Network connection processing method and device, product, equipment and medium

By generating and allocating reconnection time information before the server restarts, and controlling devices to reconnect within different time ranges, the problem of excessive load pressure during server restarts is solved, thereby improving server stability and IoT system efficiency.

CN119906750BActive Publication Date: 2026-11-20GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411927032.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2026-11-20
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

When the server restarts, a large number of reconnection requests from devices cause excessive load pressure, affecting server stability and the efficiency of the IoT system.

Method used

Before restarting, the server generates reconnection time information for each target device and controls device reconnection within different time ranges to avoid concentrated requests.

Benefits of technology

It reduces short-term load pressure on servers and improves server stability and the operating efficiency of IoT systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906750B_ABST
    Figure CN119906750B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a network connection processing method and device, product, equipment and medium, comprising: in response to the requirement of restarting, obtaining the restart time and the connected device information, generating the reconnection time information corresponding to each target device according to the connected device information and the restart time, wherein the reconnection time information is used for the target device to reconnect to the server according to the indication of the reconnection time information, sending the reconnection time information to the target device, and disconnecting the network connection with the connected device. Through the embodiment of the present application, the load pressure of the server is reduced for a short time, and the stability of the server is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of the Internet of Things (IoT), and in particular to methods, apparatuses, products, equipment, and media for processing network connections. Background Technology

[0002] The Internet of Things (IoT) is a network of physical devices that are connected and interact through the Internet, enabling servers to collect data from devices, remotely control them, and manage them intelligently.

[0003] In related technologies, when a server restarts due to needs such as updates or maintenance, it disconnects all connected devices and restarts again after the update or maintenance is complete. After disconnection, the devices will re-initiate connection requests to the server. However, when the server restarts, the large number of connection requests to handle can easily lead to excessive load pressure in a short period, affecting server stability. Summary of the Invention

[0004] In view of the above problems, methods, apparatuses, products, equipment, and media for processing network connections that overcome or at least partially solve the above problems are proposed, including:

[0005] A method for processing network connections, applied to a server, the method comprising:

[0006] In response to a reboot request, obtain the reboot time and information about connected devices;

[0007] Based on the connected device information and the restart time, reconnection time information is generated for each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information;

[0008] The reconnection time information is sent to the target device, and the network connection with the connected device is disconnected.

[0009] Optionally, the method further includes:

[0010] If the reboot is completed, identify the target device that did not receive the reconnection time information;

[0011] A reconnection request is initiated to the target device that did not receive the reconnection time information.

[0012] Optionally, determining the reconnection time information for each target device based on the connected device information and the restart time includes:

[0013] Determine multiple first time ranges following the restart time;

[0014] Based on the connected device information and the multiple first time ranges, the first time range corresponding to each target device is determined, and reconnection time information corresponding to each target device is generated.

[0015] Optionally, the method further includes:

[0016] Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes;

[0017] A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

[0018] A method for processing network connectivity, applied to a device, the method comprising:

[0019] Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time;

[0020] If the network connection with the server is lost, the system reconnects to the server according to the reconnection time information.

[0021] Optionally, the reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes:

[0022] According to the reconnection time information, reconnect to the server within the first time range.

[0023] Optionally, the method further includes:

[0024] If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined.

[0025] Within the third time frame, reconnect to the server.

[0026] A network connectivity processing apparatus, applied to a server, the apparatus comprising:

[0027] The restart information acquisition module is used to obtain the restart time and connected device information in response to restart requests;

[0028] A reconnection time information generation module is used to generate reconnection time information for each target device based on the connected device information and the restart time; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information;

[0029] The reconnection time information sending module is used to send the reconnection time information to the target device and disconnect the network connection with the target device.

[0030] A network connectivity processing apparatus, applied to a device, the apparatus comprising:

[0031] A reconnection time information receiving module is used to receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time.

[0032] The reconnection processing module is used to reconnect to the server in the event that the network connection with the server is lost, based on the reconnection time information.

[0033] A computer program product, characterized in that it includes a computer program, which, when executed by a processor, implements the network connection processing method applied to a server as described above, or the network connection processing method applied to a server as described above.

[0034] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When executed by the processor, the computer program implements the network connection processing method applied to a server as described above, or the network connection processing method applied to a server as described above.

[0035] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the processing method for network connectivity applied to a server as described above, or the processing method for network connectivity applied to a server as described above.

[0036] The embodiments of the present invention have the following advantages: by responding to the restart requirement, the restart time and connected device information are obtained, and reconnection time information corresponding to each target device is generated according to the connected device information and the restart time. The reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information. The reconnection time information is sent to the target device and the network connection with the connected device is disconnected, thereby reducing the short-term load pressure on the server and effectively improving the stability of the server. Attached Figure Description

[0037] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying 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.

[0038] Figure 1 This is a flowchart illustrating the steps of a network processing method applied to a server according to an embodiment of the present invention;

[0039] Figure 2 This is a flowchart of another method for network processing applied to a server provided by an embodiment of the present invention;

[0040] Figure 3 This is a flowchart of another method for network processing applied to a server provided by an embodiment of the present invention;

[0041] Figure 4 This is a flowchart illustrating the steps of a network processing method applied to a device according to an embodiment of the present invention;

[0042] Figure 5 This is a diagram illustrating a network connection processing implementation process according to an embodiment of the present invention;

[0043] Figure 6 This is a structural block diagram of a network processing device applied to a server according to an embodiment of the present invention;

[0044] Figure 7 This is a structural block diagram of a network processing device applied to a device according to an embodiment of the present invention;

[0045] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0046] 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. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0047] The Internet of Things (IoT) refers to connecting various physical devices, sensors, actuators, etc., via the internet to form a vast network, thereby enabling data interaction, remote control, and intelligent management between devices. These devices can be home appliances, industrial equipment, vehicles, medical devices, etc., and they connect to servers through various communication protocols to collect, transmit, and process data.

[0048] In IoT systems, servers play a central role, responsible for managing device connectivity, data storage and analysis, and executing remote control commands. To ensure stable operation and continuous functional updates, servers require regular maintenance and updates. However, during a server restart, all connected devices are disconnected, causing a temporary interruption of communication between the devices and the server.

[0049] When the server completes an update or maintenance and restarts, all previously disconnected devices will attempt to reconnect. Due to the large number of devices, a large number of devices will simultaneously send connection requests to the server within a short period. This sudden surge in connection requests can put enormous load on the server, potentially causing it to be unable to handle all requests in a short time, leading to performance degradation, response delays, or even server crashes.

[0050] Such excessive load pressure not only affects server stability but can also lead to a decrease in the operating efficiency of the entire IoT system, and even impact business processes that rely on the system. For example, in the Industrial Internet of Things (IIoT), device connection interruptions and reconnection delays can cause production line stoppages, affecting production efficiency; in smart home systems, device reconnection delays may prevent users from controlling home appliances in a timely manner, impacting user experience.

[0051] Based on this, the present invention is based on the core idea of ​​actively controlling the device to reconnect to the server, thereby reducing the short-term load pressure on the server and improving the stability of the server.

[0052] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0053] Reference Figure 1 The diagram illustrates a flowchart of a network connection processing method according to an embodiment of the present invention. This network connection processing method is applied to a server and may specifically include the following steps:

[0054] Step 101: In response to the restart request, obtain the restart time and connected device information;

[0055] Restart time refers to the planned time for a server to restart, such as when the server is scheduled to restart at a certain point in time after the current time.

[0056] Connected device information refers to information about devices that have established a network connection with the server, such as device serial number and device model.

[0057] Step 102: Generate reconnection time information for each target device based on the connected device information and the restart time; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information;

[0058] The target device refers to the device that needs to reconnect to the server based on the reconnection time information after the server disconnects. Specifically, it can include all currently connected devices, or it can include only a subset of currently connected devices.

[0059] In practical implementation, since all devices need to be disconnected before the server restarts, the reconnection time information can include the time point or time range after the server restart time to indicate when the target device will reconnect. Different reconnection time information is generated for different target devices, which can avoid receiving a large number of reconnection requests from devices in a concentrated period of time after the server restart, thus avoiding server load pressure or network bandwidth pressure.

[0060] In some embodiments of the present invention, determining the reconnection time information corresponding to each target device based on the connected device information and the restart time includes:

[0061] Sub-step 1021: Determine multiple first time ranges after the restart time;

[0062] For example, the first time range can be a specific time range, such as 15:00, then the first time range can be 15:05-15:10, 15:10-15:15, etc.; or it can be a relative time range defined based on the restart time, such as 5 to 10 minutes after the restart time, 15 to 20 minutes after the restart time, etc. In this case, the restart time also needs to be included in the restart time information.

[0063] In practical applications, the number and specific values ​​of the first time range can be determined based on the number of target devices or the actual needs. Multiple first time ranges can be discrete or continuous.

[0064] Sub-step 1022: Based on the connected device information and the multiple first time ranges, determine the first time range corresponding to each target device, and generate reconnection time information corresponding to each target device.

[0065] For example, suppose 10 different first time ranges are determined after the restart time. There are currently 100 target devices. Following the principle of average allocation, 10 target devices can be assigned to the same first time range, and corresponding reconnection time information is generated. Upon receiving the reconnection time information, these target devices will reconnect to the server within their assigned first time range.

[0066] In practical applications, once the first time range corresponding to each target device is determined, the server can maintain multiple arrays or lists. Each array or list corresponds to a first time range and is used to record relevant information for each target device (such as device ID), the specific value of the first time range, and the reconnection status. When it is detected that a target device has successfully reconnected to the server within its corresponding first time range, the reconnection status is updated, or the corresponding data is directly deleted, so as to track and maintain the device reconnection status.

[0067] In practical applications, information such as user usage of the target device (e.g., whether there are relevant identifiers of user use in a short period of time) and device type can also be obtained to sort the target devices and allocate the devices with higher reconnection priority to the first time range.

[0068] Step 103: Send the reconnection time information to the target device and disconnect the network connection with the connected device.

[0069] In this embodiment, after the reconnection time information is sent to the target device, the network connection of all devices currently connected to the server is disconnected based on the server restart requirement. After the server restarts, different target devices will reconnect to the server according to their corresponding reconnection time information. By actively controlling the reconnection time of target devices, the problem of excessive short-term server load caused by a concentrated stream of reconnection requests from target devices can be effectively avoided.

[0070] The embodiments of the present invention have the following advantages: by responding to the restart requirement, the restart time and connected device information are obtained, and reconnection time information corresponding to each target device is generated according to the connected device information and the restart time. The reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information. The reconnection time information is sent to the target device and the network connection with the connected device is disconnected, thereby reducing the short-term load pressure on the server and effectively improving the stability of the server.

[0071] In some embodiments of the present invention, the method further includes:

[0072] If the reboot is completed, identify the target device that did not receive the reconnection time information;

[0073] A reconnection request is initiated to the target device that did not receive the reconnection time information.

[0074] In this embodiment, the target device may fail to receive the reconnection time information due to power outages, network failures, or other reasons. Therefore, after the server restarts, the server needs to actively initiate a reconnection request to these target devices that have not received the reconnection time information, so that these target devices can reconnect to the server and avoid the interruption of the device's original services due to the server restart.

[0075] In practice, the server can determine whether the target device has successfully received the reconnection time information by checking the response from the target device. If the target device returns a response indicating failure to receive the information, the server can mark it as a target device that has not received the reconnection time information.

[0076] In practical applications, the server can also maintain a list of devices in an "unconfirmed connection state." This list stores information about devices that were connected before the restart but may not have received reconnection time information due to a power outage. Furthermore, after the server restarts, it proactively initiates reconnection requests to devices in the "unconfirmed connection state" list. A limit can be added to the number of reconnection requests, and a waiting time (e.g., 5 minutes) can be set between each request. If a device fails to reconnect to the server after more than a preset number of reconnection requests (e.g., 3 or 5), the reconnection request process stops. If a device successfully reconnects, its information is removed from the "unconfirmed connection state" list. Additionally, before initiating a reconnection request, a heartbeat packet can be sent to check the status of these devices to determine if they are powered on and operating normally.

[0077] In some embodiments of the present invention, the method further includes:

[0078] Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes;

[0079] A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

[0080] In this embodiment, after the server restarts, the target device may fail to reconnect to the server within the first time range indicated by the reconnection time information due to network failure, configuration failure, or other reasons. In this case, the server can retrieve these failed reconnection devices, determine the second time range corresponding to the failed reconnection devices, and initiate a reconnection request to the failed reconnection devices within the corresponding second time range.

[0081] For example, 100 target devices initially need to initiate reconnection requests to the server within a certain time range A. However, 10 target devices fail to reconnect successfully within time range A; these 10 target devices are considered reconnection failure devices. The server then determines another time range B and initiates reconnection requests to the reconnection failure devices within time range B. Similarly, a limit can be added to the number of reconnection requests, and a certain waiting time (e.g., 5 minutes) can be set between each reconnection request. If a device still cannot reconnect to the server after initiating more than a preset number of reconnection requests (e.g., 3 or 5 times), the reconnection request process stops.

[0082] In practical applications, the server can maintain an array or list to record the reconnection status of the target device, which defaults to "not connected". If the target device successfully reconnects within the first time frame, the reconnection status is updated to "connected". If the server detects that the target device is still "not connected" beyond the first time frame, it can determine that the target device has failed to reconnect.

[0083] Reference Figure 2 This illustrates another network connection processing method provided in an embodiment of the present invention. This network connection processing method is applied to a server and may specifically include the following steps:

[0084] Step 201: In response to the restart request, obtain the restart time and connected device information;

[0085] Restart time refers to the planned time for a server to restart, such as when the server is scheduled to restart at a certain point in time after the current time.

[0086] Connected device information refers to information about devices that have established a network connection with the server, such as device serial number and device model.

[0087] Step 202: Determine multiple first time ranges after the restart time;

[0088] Step 203: Based on the connected device information and the plurality of first time ranges, determine the first time range corresponding to each target device, and generate reconnection time information corresponding to each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information;

[0089] The target device refers to the device that needs to reconnect to the server based on the reconnection time information after the server disconnects. Specifically, it can include all currently connected devices, or it can include only a subset of currently connected devices.

[0090] In practical implementation, since all devices need to be disconnected before the server restarts, the reconnection time information can include the time point or time range after the server restart time to indicate when the target device will reconnect. Different reconnection time information is generated for different target devices, which can avoid receiving a large number of reconnection requests from devices in a concentrated period of time after the server restart, thus avoiding server load pressure or network bandwidth pressure.

[0091] For example, the first time range can be a specific time range, such as 15:00, then the first time range can be 15:05-15:10, 15:10-15:15, etc.; or it can be a relative time range defined based on the restart time, such as 5 to 10 minutes after the restart time, 15 to 20 minutes after the restart time, etc. In this case, the restart time also needs to be included in the restart time information.

[0092] In practical applications, the number and specific values ​​of the first time range can be determined based on the number of target devices or the actual needs. Multiple first time ranges can be discrete or continuous.

[0093] For example, suppose 10 different first time ranges are determined after the restart time. There are currently 100 target devices. Following the principle of average allocation, 10 target devices can be assigned to the same first time range, and corresponding reconnection time information is generated. Upon receiving the reconnection time information, these target devices will reconnect to the server within their assigned first time range.

[0094] In practical applications, once the first time range corresponding to each target device is determined, the server can maintain multiple arrays or lists. Each array or list corresponds to a first time range and is used to record relevant information for each target device (such as device ID), the specific value of the first time range, and the reconnection status. When it is detected that a target device has successfully reconnected to the server within its corresponding first time range, the reconnection status is updated, or the corresponding data is directly deleted, so as to track and maintain the device reconnection status.

[0095] In practical applications, information such as user usage of the target device (e.g., whether there are relevant identifiers of user use in a short period of time) and device type can also be obtained to sort the target devices and allocate the devices with higher reconnection priority to the first time range.

[0096] Step 204: Send the reconnection time information to the target device and disconnect the network connection with the connected device.

[0097] Once the reconnection time information is sent to the target device, the network connection of all devices currently connected to the server is disconnected based on the server restart requirement. After the server restarts, different target devices will reconnect to the server according to their corresponding reconnection time information. By actively controlling the reconnection time of target devices, the problem of excessive short-term server load caused by a concentrated stream of reconnection requests from target devices can be effectively avoided.

[0098] Step 205: If the restart is completed, identify the devices that failed to reconnect within each of the first time ranges;

[0099] Step 206: Determine the second time range corresponding to each of the failed reconnection devices, and initiate a reconnection request to the failed reconnection device within the second time range.

[0100] After the server restarts, the target device may fail to reconnect to the server within the first time range indicated by the reconnection time information due to network failure, configuration failure, or other reasons. In this case, the server can retrieve these failed reconnection devices, determine the second time range corresponding to the failed reconnection devices, and initiate a reconnection request to the failed reconnection devices within the corresponding second time range.

[0101] For example, 100 target devices initially need to initiate reconnection requests to the server within a certain time range A. However, 10 target devices fail to reconnect successfully within time range A; these 10 target devices are considered reconnection failure devices. The server then determines another time range B and initiates reconnection requests to the reconnection failure devices within time range B. Similarly, a limit can be added to the number of reconnection requests, and a certain waiting time (e.g., 5 minutes) can be set between each reconnection request. If a device still cannot reconnect to the server after initiating more than a preset number of reconnection requests (e.g., 3 or 5 times), the reconnection request process stops.

[0102] In practical applications, the server can maintain an array or list to record the reconnection status of the target device, which defaults to "not connected". If the target device successfully reconnects within the first time frame, the reconnection status is updated to "connected". If the server detects that the target device is still "not connected" beyond the first time frame, it can determine that the target device has failed to reconnect.

[0103] Reference Figure 3 This illustrates another network connection processing method provided in an embodiment of the present invention. This network connection processing method is applied to a server and may specifically include the following steps:

[0104] Step 301: In response to the restart request, obtain the restart time and connected device information;

[0105] Restart time refers to the planned time for a server to restart, such as when the server is scheduled to restart at a certain point in time after the current time.

[0106] Connected device information refers to information about devices that have established a network connection with the server, such as device serial number and device model.

[0107] Step 302: Generate reconnection time information for each target device based on the connected device information and the restart time; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information.

[0108] The target device refers to the device that needs to reconnect to the server based on the reconnection time information after the server disconnects. Specifically, it can include all currently connected devices, or it can include only a subset of currently connected devices.

[0109] In practical implementation, since all devices need to be disconnected before the server restarts, the reconnection time information can include the time point or time range after the server restart time to indicate when the target device will reconnect. Different reconnection time information is generated for different target devices, which can avoid receiving a large number of reconnection requests from devices in a concentrated period of time after the server restart, thus avoiding server load pressure or network bandwidth pressure.

[0110] Step 303: Send the reconnection time information to the target device and disconnect the network connection with the connected device.

[0111] In this embodiment, after the reconnection time information is sent to the target device, the network connection of all devices currently connected to the server is disconnected based on the server restart requirement. Once the server restarts, different target devices will reconnect to the server according to their corresponding reconnection time information. By actively controlling the reconnection time of target devices, the problem of excessive short-term server load caused by a concentrated stream of reconnection requests from target devices can be effectively avoided.

[0112] Step 304: If the restart is completed, identify the target device that did not receive the reconnection time information;

[0113] In this embodiment, the target device may fail to receive the reconnection time information due to power outages, network failures, or other reasons. Therefore, after the server restarts, the server needs to actively initiate a reconnection request to these target devices that have not received the reconnection time information, so that these target devices can reconnect to the server and avoid the interruption of the device's original services due to the server restart.

[0114] In practice, the server can determine whether the target device has successfully received the reconnection time information by checking the response from the target device. If the target device returns a response indicating failure to receive the information, the server can mark it as a target device that has not received the reconnection time information.

[0115] Step 305: Initiate a reconnection request to the target device that did not receive the reconnection time information.

[0116] In practical applications, the server can also maintain a list of devices in an "unconfirmed connection state." This list stores information about devices that were connected before the restart but may not have received reconnection time information due to a power outage. Furthermore, after the server restarts, it proactively initiates reconnection requests to devices in the "unconfirmed connection state" list. A limit can be added to the number of reconnection requests, and a waiting time (e.g., 5 minutes) can be set between each request. If a device fails to reconnect to the server after more than a preset number of reconnection requests (e.g., 3 or 5), the reconnection request process stops. If a device successfully reconnects, its information is removed from the "unconfirmed connection state" list. Additionally, before initiating a reconnection request, a heartbeat packet can be sent to check the status of these devices to determine if they are powered on and operating normally.

[0117] Reference Figure 4 The diagram illustrates a flowchart of a network connection processing method according to an embodiment of the present invention. This network connection processing method is applied to a device and may specifically include the following steps:

[0118] Step 401: Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time;

[0119] For example, reconnection time information may include instructions for the target device to reconnect at a specific point in time or within a specific time range after the server's restart time.

[0120] Step 402: If the network connection with the server is lost, reconnect to the server according to the reconnection time information.

[0121] In practical applications, when a device receives reconnection time information and its network connection with the server is lost, the device does not immediately attempt to reconnect to the server. Instead, it enters a waiting state and reconnects according to the instructions in the reconnection time information. When the device detects that the current time matches the reconnection time information, it initiates a reconnection request to the server. Once a connection is successfully established with the server, normal communication resumes.

[0122] In some embodiments of the present invention, the reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes:

[0123] According to the reconnection time information, reconnect to the server within the first time range.

[0124] In this embodiment, the device reconnects to the server within the first time range according to the reconnection time information. Since different devices may receive different reconnection time information, that is, the first time range may also be different, by having the device cooperate with the server to reconnect, it is possible to avoid a large number of devices sending reconnection requests to the server at the same time, which would increase the short-term load pressure on the server.

[0125] In practical applications, a limit can be added to the number of times a device can send reconnection requests to the server within the first time frame, and a certain waiting time (e.g., 5 minutes) can be set between each reconnection. If more than the preset number of reconnection requests (e.g., 3 or 5 times) is initiated, or if the current time has exceeded the first time frame and the device still cannot reconnect to the server, then sending more reconnection requests to the server will stop.

[0126] In some embodiments of the present invention, the method further includes:

[0127] If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined.

[0128] Within the third time frame, reconnect to the server.

[0129] In this embodiment, the device may still be unable to connect to the server within the first time period due to its own failure, network failure, etc. Therefore, the device can specify a third time period and reconnect to the server within the third time period until it succeeds.

[0130] In practical applications, an exponential backoff strategy can be used for reconnection. That is, within the third time frame, after each failed reconnection attempt, a waiting period is waited before trying again, with each waiting period increasing exponentially.

[0131] In some embodiments of the present invention, such as Figure 5 As shown, an implementation process for network connection processing in conjunction with actual business scenarios is also provided, as detailed below:

[0132] 1) The server enters the restart process;

[0133] 2) The server startup script prepares for restarting or updating the service;

[0134] 3) The server discretizes all connected devices into n time slices and maintains n arrays, with each time array corresponding to a device that needs to be reconnected within a time slice;

[0135] 4) Send a message to the connected device, informing it of the time slot in which it needs to reconnect;

[0136] 5) If the device fails to reconnect, it will allocate a time slice and initiate a reconnection when the time slice expires; if the device fails to reconnect due to a power outage, the server will randomly generate a time slice and actively connect to the device.

[0137] 6) The device reconnection is complete.

[0138] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0139] Reference Figure 6 The diagram illustrates a network connection processing device according to an embodiment of the present invention, which is applied to a server and may specifically include the following modules:

[0140] The restart information acquisition module 601 is used to acquire the restart time and connected device information in response to the restart request;

[0141] The reconnection time information generation module 602 is used to generate reconnection time information for each target device based on the connected device information and the restart time; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information;

[0142] The reconnection time information sending module 603 is used to send the reconnection time information to the target device and disconnect the network connection with the target device.

[0143] In some embodiments of the present invention, the apparatus further includes:

[0144] The non-receiving device determination module is used to determine the target device that has not received the reconnection time information after a restart is completed;

[0145] The first reconnection request initiation module is used to initiate a reconnection request to the target device that has not received the reconnection time information.

[0146] In some embodiments of the present invention, the reconnection time information generation module 602 includes:

[0147] The first time range determination submodule is used to determine multiple first time ranges after the restart time;

[0148] Based on the connected device information and the multiple first time ranges, the first time range corresponding to each target device is determined, and reconnection time information corresponding to each target device is generated.

[0149] In some embodiments of the present invention, the apparatus further includes:

[0150] The reconnection failure device determination module is used to determine the reconnection failure devices within each first time range after a restart is completed.

[0151] The second reconnection request initiation module determines a second time range corresponding to each of the failed reconnection devices, and initiates a reconnection request to the failed reconnection device within the second time range.

[0152] Reference Figure 7 The diagram illustrates a network connectivity processing device according to an embodiment of the present invention, which is applied to a device and may specifically include the following modules:

[0153] The reconnection time information receiving module 701 is used to receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time.

[0154] The reconnection processing module 702 is used to reconnect to the server in the event that the network connection with the server is lost, based on the indication of the reconnection time information.

[0155] In some embodiments of the present invention, the reconnection time information includes a first time range after the restart time, and the reconnection processing module 702 includes:

[0156] The reconnection processing submodule is used to reconnect to the server within the first time range according to the indication of the reconnection time information.

[0157] In some embodiments of the present invention, the apparatus further includes:

[0158] The third time range determination module is used to determine a third time range when a connection to the server cannot be successfully established within the first time range.

[0159] The third time range reconnection processing module is used to reconnect to the server within the third time range.

[0160] In some embodiments of the present invention, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.

[0161] Memory 803 is used to store computer programs;

[0162] When processor 801 executes a program stored in memory 803, it performs the following steps:

[0163] In response to a reboot request, obtain the reboot time and information about connected devices;

[0164] Based on the connected device information and the restart time, reconnection time information is generated for each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the instructions of the reconnection time information;

[0165] The reconnection time information is sent to the target device, and the network connection with the connected device is disconnected.

[0166] In some embodiments of the present invention, it further includes:

[0167] If the reboot is completed, identify the target device that did not receive the reconnection time information;

[0168] A reconnection request is initiated to the target device that did not receive the reconnection time information.

[0169] In some embodiments of the present invention, determining the reconnection time information corresponding to each target device based on the connected device information and the restart time includes:

[0170] Determine multiple first time ranges following the restart time;

[0171] Based on the connected device information and the multiple first time ranges, the first time range corresponding to each target device is determined, and reconnection time information corresponding to each target device is generated.

[0172] In some embodiments of the present invention, it further includes:

[0173] Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes;

[0174] A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

[0175] Alternatively, perform the following steps:

[0176] Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time;

[0177] If the network connection with the server is lost, the system reconnects to the server according to the reconnection time information.

[0178] In some embodiments of the present invention, the reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes:

[0179] According to the reconnection time information, reconnect to the server within the first time range.

[0180] In some embodiments of the present invention, it further includes:

[0181] If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined.

[0182] Within the third time frame, reconnect to the server.

[0183] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0184] The communication interface is used for communication between the aforementioned terminal and other devices.

[0185] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0186] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0187] Some embodiments of the present invention also provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:

[0188] In response to a reboot request, obtain the reboot time and information about connected devices;

[0189] Based on the connected device information and the restart time, reconnection time information is generated for each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the instructions of the reconnection time information;

[0190] The reconnection time information is sent to the target device, and the network connection with the connected device is disconnected.

[0191] In some embodiments of the present invention, it further includes:

[0192] If the reboot is completed, identify the target device that did not receive the reconnection time information;

[0193] A reconnection request is initiated to the target device that did not receive the reconnection time information.

[0194] In some embodiments of the present invention, determining the reconnection time information corresponding to each target device based on the connected device information and the restart time includes:

[0195] Determine multiple first time ranges following the restart time;

[0196] Based on the connected device information and the multiple first time ranges, the first time range corresponding to each target device is determined, and reconnection time information corresponding to each target device is generated.

[0197] In some embodiments of the present invention, it further includes:

[0198] Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes;

[0199] A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

[0200] Alternatively, perform the following steps:

[0201] Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time;

[0202] If the network connection with the server is lost, the system reconnects to the server according to the reconnection time information.

[0203] In some embodiments of the present invention, the reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes:

[0204] According to the reconnection time information, reconnect to the server within the first time range.

[0205] In some embodiments of the present invention, it further includes:

[0206] If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined.

[0207] Within the third time frame, reconnect to the server.

[0208] Some embodiments of the present invention also provide a computer program product, including a computer program, which, when executed by a processor, performs the following steps:

[0209] In response to a reboot request, obtain the reboot time and information about connected devices;

[0210] Based on the connected device information and the restart time, reconnection time information is generated for each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the instructions of the reconnection time information;

[0211] The reconnection time information is sent to the target device, and the network connection with the connected device is disconnected.

[0212] In some embodiments of the present invention, it further includes:

[0213] If the reboot is completed, identify the target device that did not receive the reconnection time information;

[0214] A reconnection request is initiated to the target device that did not receive the reconnection time information.

[0215] In some embodiments of the present invention, determining the reconnection time information corresponding to each target device based on the connected device information and the restart time includes:

[0216] Determine multiple first time ranges following the restart time;

[0217] Based on the connected device information and the multiple first time ranges, the first time range corresponding to each target device is determined, and reconnection time information corresponding to each target device is generated.

[0218] In some embodiments of the present invention, it further includes:

[0219] Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes;

[0220] A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

[0221] Alternatively, perform the following steps:

[0222] Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time;

[0223] If the network connection with the server is lost, the system reconnects to the server according to the reconnection time information.

[0224] In some embodiments of the present invention, the reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes:

[0225] According to the reconnection time information, reconnect to the server within the first time range.

[0226] In some embodiments of the present invention, it further includes:

[0227] If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined.

[0228] Within the third time frame, reconnect to the server.

[0229] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0230] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0231] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0232] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0233] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0234] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0235] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0236] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0237] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0238] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.

[0239] The above provides a detailed description of the network connection processing methods, devices, products, equipment, and media. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for processing network connections, characterized in that, Applied to a server, the method includes: In response to a reboot request, obtain the reboot time and information about connected devices; Based on the connected device information and the restart time, reconnection time information is generated for each target device; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information; the reconnection time information includes an indication of the target device to reconnect at a certain point in time or within a certain time range after the server's restart time, and different reconnection time information is generated for different target devices; The reconnection time information is sent to the target device, and the network connection with the connected device is disconnected. The step of determining the reconnection time information for each target device based on the connected device information and the restart time includes: Determine multiple first time ranges following the restart time; Based on the connected device information and the multiple first time ranges, determine the first time range corresponding to each target device, and generate reconnection time information corresponding to each target device; Different target devices will reconnect to the server according to the reconnection time information they correspond to; Obtain information such as user usage and device type of the target devices, sort the target devices, and assign devices with high reconnection priority to the first time range.

2. The method according to claim 1, characterized in that, The method further includes: If the reboot is completed, identify the target device that did not receive the reconnection time information; A reconnection request is initiated to the target device that did not receive the reconnection time information.

3. The method according to claim 1, characterized in that, The method further includes: Upon successful reboot, identify the devices that failed to reconnect within each of the first timeframes; A second time range is determined for each of the failed reconnection devices, and a reconnection request is initiated to the failed reconnection device within the second time range.

4. A method for processing network connections, characterized in that, Applied to a device, the method includes: Receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time; If the network connection with the server is lost, reconnect to the server according to the reconnection time information. The reconnection time information includes the time point or time range after the server restart time that the target device should reconnect. Different reconnection time information is generated for different target devices. Different target devices will reconnect to the server according to the reconnection time information they correspond to; Obtain information such as user usage and device type of the target devices, sort the target devices, and assign devices with high reconnection priority to the first time range.

5. The method according to claim 4, characterized in that, The reconnection time information includes a first time range after the restart time, and the step of reconnecting to the server according to the indication of the reconnection time information includes: According to the reconnection time information, reconnect to the server within the first time range.

6. The method according to claim 5, characterized in that, The method further includes: If a connection to the server cannot be successfully established within the first time frame, a third time frame is determined. Within the third time frame, reconnect to the server.

7. A network connection processing apparatus, characterized in that, Applied to a server, the device includes: The restart information acquisition module is used to obtain the restart time and connected device information in response to restart requests; A reconnection time information generation module is used to generate reconnection time information for each target device based on the connected device information and the restart time; wherein, the reconnection time information is used by the target device to reconnect to the server according to the indication of the reconnection time information; A reconnection time information sending module is used to send the reconnection time information to the target device and disconnect the network connection with the target device; The reconnection time information generation module includes: The first time range determination submodule is used to determine multiple first time ranges after the restart time; Based on the connected device information and the multiple first time ranges, determine the first time range corresponding to each target device, and generate reconnection time information corresponding to each target device; The device is also used to include reconnection time information including instructing the target device to reconnect at a specific time point or within a specific time range after the server's restart time, and to generate different reconnection time information for different target devices. Different target devices will reconnect to the server according to the reconnection time information they correspond to; Obtain information such as user usage and device type of the target devices, sort the target devices, and assign devices with high reconnection priority to the first time range.

8. A network connection processing apparatus, characterized in that, Applied to a device, the device includes: A reconnection time information receiving module is used to receive reconnection time information sent by the server; wherein the reconnection time information is generated based on the server's restart time. A reconnection processing module is used to reconnect to the server according to the reconnection time information when the network connection with the server is lost. The device is also used for The reconnection time information includes the time point or time range after the server restart time that the target device should reconnect. Different reconnection time information is generated for different target devices. Different target devices will reconnect to the server according to the instructions of their corresponding reconnection time information. Obtain information such as user usage and device type of the target devices, sort the target devices, and assign devices with high reconnection priority to the first time range.

9. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the network connection processing method as described in any one of claims 1 to 3, or the network connection processing method as described in any one of claims 4 to 6.

10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the network connection processing method as described in any one of claims 1 to 3, or the network connection processing method as described in any one of claims 4 to 6.

11. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the network connection processing method as described in any one of claims 1 to 3, or the network connection processing method as described in any one of claims 4 to 6.

Citation Information

Patent Citations

  • Processing method for emergency request, terminal, and computer-readable storage medium

    CN107666513A

  • Long connection recovery method, system and device, electronic equipment and storage medium

    CN111193769A