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

By presetting the network abnormal time period in the smart device, when the smart device receives the network abnormal signal, it selects the best network connection operation according to the position of the preset time period, which solves the problem that smart products increase resource consumption and cannot recover network connection in time when facing long-term network abnormalities, and achieves the efficiency of resource conservation and network recovery.

CN115834651BActive Publication Date: 2025-05-02BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211416830.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-05-02
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

When faced with long-term network abnormalities, smart products continuously or intermittently reconnect to the target router, resulting in increased resource consumption, shortened service life, and may not be able to recover network connections in time.

Method used

By presetting the network abnormal time period, when the intelligent device receives the network abnormal signal, it determines that the current time is within or before the preset time period and performs the corresponding network connection operation. Specifically, it includes ignoring network exceptions within the preset time period and performing local operations; before the preset time period, try to connect to the target router immediately, and reconnect intermittently at the preset time interval after failure.

Benefits of technology

It effectively avoids waste of resources caused by unnecessary network reconnection operations, and restores network connections in time within the optimal time period, extending the service life of smart devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0003938126960000011
    Figure HDA0003938126960000011
  • Figure HDA0003938126960000012
    Figure HDA0003938126960000012
  • Figure HDA0003938126960000021
    Figure HDA0003938126960000021
Patent Text Reader

Abstract

The present disclosure provides a network connection method, device, equipment and storage medium, which can be applied to the field of Internet of Things devices. The network connection method includes: in response to receiving a signal indicating a network anomaly, obtaining a first time when a network anomaly occurs; when it is determined that the first time is within a preset network anomaly time period, performing a first network connection operation; and when it is determined that the first time is before the preset network anomaly time period, performing a second network connection operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet of Things devices, and in particular to a network connection method, device, equipment, medium and program product. Background Art

[0002] For smart products with communication capabilities, maintaining smooth network access is a prerequisite for achieving intelligence. When network anomalies occur, in order to maintain normal working conditions, smart products usually automatically start the network reconnection mechanism to restore normal network connection. For example, smart products can continuously try to reconnect to the target router to establish a communication connection. Smart products can also intermittently try to reconnect to the target router.

[0003] However, if the network status of the target router cannot be restored, long-term continuous reconnection to the target router will cause the consumption of processor and other resources, reducing the service life of the smart product. Intermittent reconnection to the target router will cause the smart product to be unable to establish a communication connection with the target router in time when the network status of the target router is restored. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a network connection method, apparatus, device, medium and program product.

[0005] According to a first aspect of the present disclosure, a network connection method is provided, comprising: in response to receiving a signal indicating a network anomaly, obtaining a first moment at which the network anomaly occurs; when it is determined that the first moment is within a preset network anomaly time period, performing a first network connection operation; and when it is determined that the first moment is before the preset network anomaly time period, performing a second network connection operation.

[0006] According to an embodiment of the present disclosure, the preset network abnormality time period includes a preset end time; when it is determined that the first time is within the preset network abnormality time period, performing the first network connection operation includes: obtaining a first time difference between the first time and the preset end time; after the first time difference has passed, determining a target router; and connecting to the target router.

[0007] According to an embodiment of the present disclosure, the preset network abnormality time period includes a preset starting moment; when it is determined that the first moment is before the preset network abnormality time period, the second network connection operation is performed, including: obtaining a second time difference between the first moment and the preset starting moment; when it is determined that the second time difference is less than or equal to the preset time difference, connecting to a target router within the duration of the second time difference; when it is determined that the connection to the target router fails, obtaining a second moment when the connection to the target router fails; and when it is determined that the second moment is within the preset network abnormality time period, performing the first network connection operation.

[0008] According to an embodiment of the present disclosure, in the case where it is determined that the first moment is before a preset network abnormality time period, performing a second network connection operation also includes: in the case where it is determined that the second time difference is greater than the preset time difference, connecting to the target router within the duration of the preset time difference; in the case where it is determined that the connection to the target router fails, intermittently connecting to the target router at preset time intervals; in the case where it is determined that the intermittent connection to the target router fails, obtaining a third moment when the intermittent connection to the target router fails; and in the case where it is determined that the third moment is within the preset network abnormality time period, performing the first network connection operation.

[0009] According to an embodiment of the present disclosure, when it is determined that the first moment is before a preset network abnormality time period, performing a second network connection operation also includes: obtaining a third time difference between a third moment and a preset start moment; when it is determined that the third time difference is less than or equal to the time interval, performing the first network connection operation after the third time difference has passed.

[0010] According to an embodiment of the present disclosure, when it is determined that the first moment is within a preset network abnormality time period, performing a first network connection operation further includes: performing a local operation within the duration of the first time difference.

[0011] According to an embodiment of the present disclosure, the network connection method further includes: in response to receiving instruction information, obtaining the transmission type of the instruction information; calling a parsing method corresponding to the transmission type; and parsing the information through the parsing method to obtain a preset network abnormal time period.

[0012] A second aspect of the present disclosure provides a network connection device, including: an acquisition module, used to obtain a first moment when a network abnormality occurs in response to a network abnormality signal; a first determination module, used to perform a first network connection operation when it is determined that the first moment is within a preset network abnormality time period; and a second determination module, used to perform a second network connection operation when it is determined that the first moment is before the preset network abnormality time period.

[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.

[0014] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.

[0015] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0016] According to the network connection method provided by the present disclosure, by presetting the network abnormality time period, the smart device can determine the best network connection operation at different times based on the preset network abnormality time period. Since the corresponding best network connection operation is performed at different times, the waste of resources caused by continuous reconnection to the target router and the inability to restore the network connection in time caused by intermittent reconnection to the target router are at least partially solved, thereby achieving the technical effect of improving the operating efficiency of the smart device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0018] Figure 1 A system architecture diagram schematically illustrates a network connection method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;

[0019] Figure 2 A diagram schematically illustrates an application scenario of a network connection method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;

[0020] Figure 3 A flowchart of a network connection method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 4A A flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown;

[0022] Figure 4B A flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown;

[0023] Figure 5A A flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown;

[0024] Figure 5B A flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown;

[0025] Figure 6 A flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown;

[0026] Figure 7 A schematic diagram showing a structural block diagram of a network connection device according to an embodiment of the present disclosure; and

[0027] Figure 8A block diagram of an electronic device suitable for implementing a network connection method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0032] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of the data involved (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0033] An embodiment of the present disclosure provides a network connection method, which, in response to receiving a signal indicating a network anomaly, obtains a first moment when a network anomaly occurs; when it is determined that the first moment is within a preset network anomaly time period, performs a first network connection operation; and when it is determined that the first moment is before the preset network anomaly time period, performs a second network connection operation.

[0034] Figure 1The system architecture diagram of the network connection method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0035] like Figure 1 As shown, the system architecture diagram 100 according to this embodiment may include a first terminal device 110, a second terminal device 120, and a third terminal device 130. The network 140 is used to provide a medium for communication links between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the server 150. The network 140 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The network 140 is a local area network.

[0036] The user may use at least one of the first terminal device 110, the second terminal device 120, and the third terminal device 130 to interact with the server 150 through the network 140 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 110, the second terminal device 120, and the third terminal device 130, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0037] The first terminal device 110, the second terminal device 120, and the third terminal device 130 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc. The first terminal device 110, the second terminal device 120, and the third terminal device 130 may also be smart home devices or IoT products with communication capabilities, including but not limited to smart lamps and smart speakers, etc.

[0038] The server 150 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 110, the second terminal device 120, and the third terminal device 130. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0039] It should be noted that the network connection method provided in the embodiment of the present disclosure can generally be executed by the server 150. Accordingly, the network connection device provided in the embodiment of the present disclosure can generally be set in the server 150. The network connection method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 150 and can communicate with the first terminal device 110, the second terminal device 120, the third terminal device 130 and / or the server 150. Accordingly, the network connection device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 150 and can communicate with the first terminal device 110, the second terminal device 120, the third terminal device 130 and / or the server 150.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0041] Figure 2 The application scenario diagram of the network connection method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0042] The network connection device provided by the present disclosure can be applied to any IoT device with communication capability. IoT devices may include smart phones, smart computers, smart speakers, smart lamps, smart watches, etc.

[0043] like Figure 2 As shown, the smart speaker 210 and the router 220 can be connected wirelessly or wired to establish a communication connection with the outside world. When the router 220 has a network anomaly or the network link between the smart speaker 210 and the router 220 has an anomaly, the communication connection between the smart speaker 210 and the outside world may be disconnected. In the case of a network disconnection, the smart speaker 210 may be in an uncontrolled state, and the smart speaker 210 cannot share the operating status information with the outside world.

[0044] In some examples, when the smart speaker 210 needs to be upgraded and maintained, the connection with the router 220 may be actively disconnected. Or when it is detected that the smart speaker 210 may be subject to a potential network attack, the connection with the router 220 may also be actively disconnected.

[0045] For example, the smart speaker 210 performs system upgrades and maintenance during the idle time periods of 6:00-7:00, 12:00-13:00, and 22:00-23:00. During the idle time period, the smart speaker 210 may have network anomalies. However, during this idle time period, even if the smart speaker 210 has network anomalies, it can be considered a "normal" phenomenon without the need to perform a network reconnection operation. Therefore, if the smart speaker 210 immediately performs a continuous reconnection operation whenever a network anomaly is detected, it will cause resource consumption, thereby affecting the normal operation of other functions of the smart speaker 210.

[0046] According to the embodiments of the present disclosure, when the time when the network anomaly occurs is within the normal network anomaly time period, the network anomaly problem can be ignored, and local operations can be performed normally to avoid resource consumption. According to the time when the network anomaly occurs, the network reconnection operation is adaptively adjusted to ensure that the corresponding optimal network reconnection operation is performed at different times, which can avoid resource waste caused by unnecessary network reconnection operations and can also restore the network in time within the optimal time period.

[0047] Figure 3 The flowchart of the network connection method according to the embodiment of the present disclosure is schematically shown.

[0048] like Figure 3 As shown, the network connection method of this embodiment includes operations S310 to S330.

[0049] In operation S310 , in response to receiving a signal indicating a network abnormality, a first time at which the network abnormality occurs is acquired.

[0050] In operation S320, when it is determined that the first moment is within a preset network abnormality time period, a first network connection operation is performed.

[0051] In operation S330, when it is determined that the first time is before the preset network abnormality time period, a second network connection operation is performed.

[0052] In the disclosed embodiment, the first moment may be the current moment when the IoT device has a network anomaly. The preset network anomaly time period may be a pre-set time period during which system upgrade and maintenance needs to be performed, or may be a security protection time period. During the system upgrade and maintenance time period and the security protection time period, the IoT device needs to be actively disconnected from the network.

[0053] In the case where it is determined that the current moment when the IoT device has a network anomaly is within a preset network anomaly time period, at this current moment, the network anomaly state of the IoT device can be considered a "normal" state, and there is no need to immediately perform a network reconnection operation. In the case where it is determined that the current moment when the IoT device has a network anomaly is before a preset network anomaly time period, at this current moment, the network anomaly state of the IoT device can be considered an abnormal state, and it is necessary to immediately perform a network reconnection operation to restore the normal network state of the IoT device.

[0054] In the embodiment of the present disclosure, the first network connection operation may include: when the current moment is within a preset network abnormality time period, not performing a network reconnection operation, and performing a network reconnection operation after the preset network abnormality time period has passed.

[0055] For example, the preset network abnormality time period is 6:00-7:00. At 6:01, the IoT device has a network abnormality state, and the network reconnection operation is not performed temporarily. At 7:00, the IoT device starts to perform the network reconnection operation.

[0056] In an embodiment of the present disclosure, the second network connection operation may include: when the current moment is before the preset network abnormality time period, a network reconnection operation may be performed first until the preset network abnormality time period is reached. During the preset network abnormality time period, the network reconnection operation is not performed; after the preset network abnormality time period has passed, the network reconnection operation is performed.

[0057] For example, the preset network abnormality time period is 6:00-7:00. At 5:50, the IoT device experiences a network abnormality, and the IoT device performs a network reconnection operation until 6:00. If the IoT device successfully reconnects to the network during the 5:50-6:00 time period, the network reconnection operation is stopped. If the IoT device fails to successfully connect to the network during the 5:50-6:00 time period, the IoT device can repeatedly perform the network reconnection operation during the time period until 6:00. After reaching 6:00, the IoT device will not perform the network reconnection operation during the 6:00-7:00 time period, and the IoT device will start to perform the network reconnection operation at 7:00.

[0058] According to the embodiment of the present disclosure, by determining the time relationship between the network abnormality moment and the pre-set network abnormality time period, the corresponding network connection operation is adaptively performed. By selecting the corresponding optimal network connection operation at different times, it is possible to avoid the waste of resources caused by unnecessary network reconnection operations, and to restore the network in time at the optimal time.

[0059] Figure 4A The flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown.

[0060] like Figure 4A As shown, the network connection method of the embodiment of the present disclosure is applied to the first device and the second device. The network connection method of this embodiment includes operations S410 to S420.

[0061] In operation S410, the second device performs a first determination operation in response to the first device sending a signal indicating a network abnormality.

[0062] In operation S420, the first device performs a first network connection operation in response to the second device sending the first instruction.

[0063] In the disclosed embodiment, the first device may be an IoT device that needs to be connected to a network. The second device may be a device that controls the first device to execute the IoT device. The first device and the second device may be connected via a local area network, a data transmission line, or Bluetooth. When the first device is disconnected from the network, the first device and the second device may perform data transmission via a local area network, a data transmission line, or Bluetooth.

[0064] For example, the second device may include a server and a terminal device, etc.

[0065] In the embodiment of the present disclosure, when a network anomaly occurs in the first device, the first device sends a signal indicating the network anomaly to the second device. The memory of the second device stores a preset network anomaly time period of the first device.

[0066] In the step of operation S410, the second device can determine the current time when the first device sends the signal indicating network anomaly, and determine whether the current time is within the preset network anomaly time period. If it is determined that the current time is within the preset network anomaly time period, the second device sends a first instruction to the first device.

[0067] In operation 420 , the first device may perform a first network connection operation based on the first instruction.

[0068] In an embodiment of the present disclosure, the first device may obtain the current time when the network anomaly occurs, and determine the time difference between the current time and the preset end time of the preset network anomaly. After the length of the time difference has passed, the first device determines the target router and connects to the target router. After successfully connecting to the target router, the first device may also send a signal indicating a successful network connection to the second device.

[0069] For example, the first device may scan a router list to determine a list of connectable routers, and determine a target router from the list of connectable routers. The first device may also obtain multiple historically connected routers and determine a target router from historically connected routers.

[0070] In the disclosed embodiment, the first device can perform local operations within the duration of the time difference. For example, the current time when the first device has a network anomaly is 6:00, and the preset network anomaly time period is 6:00-7:00. Within 1 hour between 6:00 and 7:00, the first device can perform local operations. For example, the first device can be a smart speaker, and within 1 hour between 6:00 and 7:00, the smart speaker continues to play the cached audio.

[0071] According to an embodiment of the present disclosure, within a preset network abnormality time period, the first device may preferentially perform local operations and ignore network abnormality problems, thereby avoiding resource consumption caused by invalid network reconnection operations.

[0072] Figure 4B The flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown.

[0073] like Figure 4B As shown, the network connection method of the embodiment of the present disclosure is applied to the first device and the second device. The network connection method of this embodiment includes operations S430 to S460.

[0074] In operation S430, the second device performs a first determination operation in response to the first device sending a signal indicating a network abnormality.

[0075] In operation S440, the first device performs a second network connection operation in response to the second device sending the second instruction.

[0076] In operation S450, the second device performs a second determination operation in response to the first device sending a signal indicating a network connection failure.

[0077] In operation S460, the first device performs a first network connection operation in response to the second device sending the third instruction.

[0078] In the embodiment of the present disclosure, the first device and the second device are Figure 4A The first device and the second device shown in the embodiment are similar and will not be described again for brevity.

[0079] In the embodiment of the present disclosure, when a network anomaly occurs in the first device, the first device sends a signal indicating the network anomaly to the second device. The memory of the second device stores a preset network anomaly time period of the first device.

[0080] In the step of operation S430, the second device can determine the current time when the first device sends the signal indicating network anomaly, and determine whether the current time is within the preset network anomaly time period. If it is determined that the current time is before the preset network anomaly time period, the second device sends a second instruction to the first device.

[0081] In an embodiment of the present disclosure, in operation S440, the first device responds to the second device sending a second instruction, and the step of performing the second network connection operation may include: the first device may obtain the current time when the network abnormality occurs, and determine the time difference between the current time and the preset start time of the preset network abnormality, and when it is determined that the time difference is less than or equal to the preset time difference, connect to the target router within the duration of the time difference.

[0082] For example, the preset time difference can be 10 minutes, the current time when the network abnormality occurs in the first device is 5:50, and the preset network abnormality time period is 6:00-7:00. The time difference between 5:50 and 6:00 is 10 minutes. When it is determined that the time difference between the current time and the preset start time of the preset network abnormality is equal to the preset time difference, the first device can immediately perform the operation of connecting to the target router when the network abnormality occurs.

[0083] When the time difference between the current time when the network anomaly occurs and the preset start time of the preset network anomaly is short, a continuous network reconnection operation can be performed in a short time. After the first device performs the network reconnection operation, there may be a situation where the connection to the target router fails. When the first device determines that the connection to the target router fails, it sends a signal indicating the network connection failure to the second device.

[0084] In the step of operation S450, the second device can determine the current time when the first device sends the signal indicating the network connection failure, and determine whether the current time is within the preset network abnormality time period. If it is determined that the current time is within the preset network abnormality time period, the second device sends a third instruction to the first device.

[0085] In operation 460 , the first device may perform a first network connection operation based on the third instruction.

[0086] In the embodiment of the present disclosure, since the first device has started to perform the network reconnection operation before the preset network abnormality time period, if the first device still fails to connect to the network until the preset start time of the preset network abnormality time period is reached, the first device can ignore the network abnormality and start to perform local operations at the preset start time of the preset network abnormality time period. After the preset network abnormality time period ends, the first device determines the target router and connects to the target router. After successfully connecting to the target router, the first device can also send a signal indicating that the network connection is successful to the second device.

[0087] For example, the current time when the first device has a network anomaly is 5:50, and the preset network anomaly time period is 6:00-7:00. Within 10 minutes between 5:50 and 6:00, the first device can perform the operation of connecting to the target router. If the first device still fails to successfully connect to the target router by 6:00, the first device can ignore the network anomaly problem and start to perform local operations within 1 hour between 6:00 and 7:00.

[0088] In an embodiment of the present disclosure, in operation S440, the first device responds to the second device sending the second instruction, and the step of performing the second network connection operation may also include: the first device obtains the current time when the network abnormality occurs, and determines the time difference between the current time and the preset start time of the preset network abnormality, and when it is determined that the time difference is greater than the preset time difference, connects to the target router within the duration of the preset time difference; when it is determined that the connection to the target router fails, intermittently connects to the target router at preset time intervals.

[0089] For example, the preset time difference can be 10 minutes, the current time when the network anomaly occurs in the first device is 5:00, and the preset network anomaly time period is 6:00-7:00. The time difference between 5:00 and 6:00 is 1 hour, and the time difference between the current time and the preset start time of the preset network anomaly is greater than the preset time difference. The first device can continue to perform the operation of connecting to the target router from 5:00 to 5:10. If the network connection still fails, the first device can intermittently perform the operation of connecting to the target router from 5:10 to 6:00.

[0090] If the time difference between the current time when the network anomaly occurs and the preset start time of the preset network anomaly is long, the network reconnection operation can be continuously performed in a short time. If the first device still fails to successfully connect to the target router, the first device can intermittently perform the network reconnection operation at a preset time interval.

[0091] For example, the preset time interval can be 1 minute, 2 minutes, or 5 minutes, etc. For example, the preset time interval is 2 minutes. From 5:10 to 6:00, the first device can intermittently perform the operation of connecting to the target router at a time interval of 2 minutes. From 5:00 to 5:10, the first device can continue to perform the operation of connecting to the target router. If the connection is not successful, the network reconnection operation is suspended from 5:12 to 5:14. Then, the operation of connecting to the target router continues from 5:14 to 5:24. If the connection is still not successful, the network reconnection operation is suspended from 5:24 to 5:26, and so on.

[0092] For example, the preset time interval can also be increased gradually. The preset time interval and the duration of the continuous execution of the network reconnection operation can be doubled gradually. For example, the first device can intermittently perform the operation of connecting to the target router from 5:10 to 6:00. After the first device can continuously perform the operation of connecting to the target router from 5:00 to 5:10, it can continue to perform the network reconnection operation from 5:10 to 5:11. If the connection is not successful, the network reconnection operation is suspended from 5:11 to 5:13. Then, the operation of continuously connecting to the target router is continued from 5:13 to 5:15. If the connection is still not successful, the network reconnection operation is suspended from 5:15 to 5:19, and so on. The duration of the continuous execution of the network reconnection operation can be increased successively, and the duration of suspending the execution of the network reconnection operation is doubled relative to the duration of the continuous execution of the network reconnection operation.

[0093] Those skilled in the art may determine the preset time interval and the duration of continuously performing the network reconnection operation according to actual network connection requirements and the time difference between the current time when the network anomaly occurs and the preset start time of the preset network anomaly.

[0094] In the case of determining that the intermittent connection to the target router has failed, the first device sends a signal indicating the network connection failure to the second device.

[0095] In the step of operation S450, the second device can determine the current time when the first device sends the signal indicating the network connection failure, and determine whether the current time is within the preset network abnormality time period. If it is determined that the current time is within the preset network abnormality time period, the second device sends a third instruction to the first device.

[0096] In operation 460 , the first device may perform a first network connection operation based on the third instruction.

[0097] In the embodiment of the present disclosure, when the network reconnection operation is intermittently performed, it is also necessary to determine the current time at the end of each continuous execution of the network connection operation. Calculate the time difference between the current time and the preset start time of the preset network abnormality time period. If the time difference is greater than the duration of the next time interval, the network reconnection operation can continue to be suspended for the duration of the time interval. If the time difference is less than or equal to the next time interval, it can be considered that this network reconnection operation is the last reconnection operation before the preset network abnormality time period, and the duration of the time difference is used as the time interval. After the duration of the time difference has passed, the first network connection operation is performed.

[0098] According to the embodiments of the present disclosure, when the time when a network anomaly occurs is before a preset network anomaly time period, a corresponding network connection operation is performed according to the time distance from the preset start time. By performing continuous network reconnection operations in a short period of time, the IoT device can quickly and successfully connect to the network when the router is in a state of temporary network anomaly, thereby increasing the rate of successful network connection. If the IoT device still cannot successfully connect to the network after performing continuous network reconnection operations in a short period of time, the router may be in a state of long-term network anomaly. Intermittent network reconnection operations can reduce resource consumption.

[0099] Figure 5A The flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown.

[0100] like Figure 5A As shown, the network connection method of the embodiment of the present disclosure is applied to the first device and the second device. The network connection method of this embodiment includes operations S510 to S520.

[0101] In operation S510, the first device performs a first determination operation based on the second device sending a preset network abnormality time period and a signal indicating a network abnormality.

[0102] In operation S520, the first device performs a first network connection operation.

[0103] In the disclosed embodiment, the first device may be an IoT device that needs to be connected to a network. The second device may be a device that controls the first device to execute the IoT device. The first device and the second device may be connected via a local area network, a data transmission line, or Bluetooth. When the first device is disconnected from the network, the first device and the second device may perform data transmission via a local area network, a data transmission line, or Bluetooth. For example, the second device may include a server and a terminal device, etc.

[0104] For example, the second device may send the preset network abnormality time period to the first device in advance, and the first device stores the preset network abnormality time period in a memory. When performing operation S510, the preset network abnormality time period may be obtained from the memory.

[0105] For example, the second device may be a smart phone, in which an APP corresponding to the first device is installed. The preset start time and the preset end time of the preset network abnormality time period are input in the control interface of the APP. The APP may transmit the preset start time and the preset end time to the server via a communication protocol such as Hyper Text Transfer Protocol (HTTP) or Message Queuing Telemetry Transport (MQTT), and the server forwards the preset start time and the preset end time to the first device.

[0106] For example, the first device may be a device equipped with an infrared receiver, and the second device may be an infrared remote controller. The second device may send the preset start time and the preset end time of the preset network abnormality time period to the first device via infrared.

[0107] For example, the second device may be a device including a touch display screen. The second device and the first device may be connected via a data cable. A preset start time and a preset end time of the preset network abnormality time period are inputted in the touch display screen, and the second device transmits the preset start time and the preset end time of the preset network abnormality time period to the first device via the data cable.

[0108] In an embodiment of the present disclosure, after the second device sends instruction information including a preset network abnormality time period to the first device, the first device also needs to respond to receiving the instruction information, obtain the transmission type of the instruction information, and call a parsing method corresponding to the transmission type, parse the information through the parsing method, and obtain the preset network abnormality time period.

[0109] For example, the second device sends the command information to the first device through the APP in the transmission mode of MQTT or HTTP communication protocol. The first device parses the command information by calling a JSON data parser, such as C JavaScript Object Notation (CJSON) written in C language, to obtain the preset start time and preset end time of the preset network abnormal time period.

[0110] In an embodiment of the present disclosure, when a network anomaly occurs in the first device, the current time of the network anomaly is determined, and whether the current time is within a preset network anomaly time period is determined. If it is determined that the current time is within the preset network anomaly time period, the first device performs a first network connection operation.

[0111] In the embodiment of the present disclosure, the first device can obtain the current time when the network anomaly occurs, and determine the time difference between the current time and the preset end time of the preset network anomaly. After the length of the time difference has passed, the first device determines the target router and connects to the target router.

[0112] In the embodiment of the present disclosure, the first device can perform local operations within the time difference. During the preset network abnormality time period, the first device can give priority to performing local operations and ignore network abnormality problems, thereby avoiding resource consumption caused by invalid network reconnection operations.

[0113] Figure 5B The flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown.

[0114] like Figure 5B As shown, the network connection method of the embodiment of the present disclosure is performed by the first device and the second device. The network connection method of this embodiment includes operations S530 to S560.

[0115] In operation S530, the first device performs a first determination operation based on the second device sending a preset network abnormality time period and a signal indicating a network abnormality.

[0116] In operation S540, the first device performs a second network connection operation.

[0117] In operation S550, the first device performs a second determination operation based on the signal indicating the network connection failure.

[0118] In operation S560, the first device performs a first network connection operation.

[0119] In the embodiment of the present disclosure, the first device and the second device are Figure 5A The first device and the second device shown in the embodiment are similar and will not be described again for brevity.

[0120] In the embodiment of the present disclosure, the second device may send the preset network abnormality time period to the first device in advance, and the first device stores the preset network abnormality time period in the memory. When performing operation S530 and operation S550, the preset network abnormality time period may be obtained from the memory.

[0121] In an embodiment of the present disclosure, the step of operation S540 includes: the first device obtains the time difference between the time when the network abnormality occurs and the preset start time; when it is determined that the time difference is less than or equal to the preset time difference, connecting to the target router within the duration of the time difference; when it is determined that the connection to the target router fails, obtaining the time when the connection to the target router fails; and when it is determined that the time when the connection to the target router fails is within the preset network abnormality time period, performing the first network connection operation.

[0122] In the embodiment of the present disclosure, the step of operation S540 also includes: when the first device determines that the time difference between the time when the network abnormality occurs and the preset start time is greater than the preset time difference, connecting to the target router within the duration of the preset time difference; when it is determined that the connection to the target router fails, intermittently connecting to the target router at a preset time interval; when it is determined that the intermittent connection to the target router fails, obtaining the time when the intermittent connection to the target router fails; and when it is determined that the time when the intermittent connection to the target router fails is within the preset network abnormality time period, performing the first network connection operation.

[0123] In the embodiment of the present disclosure, the step of operation S540 also includes: obtaining a time difference between a time when the intermittent connection to the target router fails and a preset start time; and when it is determined that the time difference is less than or equal to a preset time interval, performing a first network connection operation after the time difference has elapsed.

[0124] Figure 6 The flowchart of a network connection method according to another embodiment of the present disclosure is schematically shown.

[0125] like Figure 6 As shown, the network connection method of this embodiment includes operations S601 to S612.

[0126] In operation S601 , in response to receiving a signal indicating a network abnormality, a first moment at which the network abnormality occurs is acquired.

[0127] In operation S602, it is determined whether the first moment is in a preset network abnormality time period. The preset network abnormality time period includes a preset start moment and a preset end moment. If yes, operation S603 is performed. If not, operation S605 is performed.

[0128] In operation S603, a first time difference between the first moment and the preset end moment is obtained.

[0129] In operation S604, after the first time difference has elapsed, the target router is connected.

[0130] In operation S605, a target router is connected.

[0131] In operation S606, it is determined whether the connection to the target router fails. If so, operation S607 is performed.

[0132] In operation S607, a second time point at which the connection with the target router fails is acquired.

[0133] In operation S608, it is determined whether the second time difference between the second moment and the first moment is greater than the preset time difference. If so, operation S609 is performed. If not, the second moment is used as the first moment, and the process returns to operation S602.

[0134] In operation S609, the target router is intermittently connected at preset time intervals.

[0135] In operation S610, it is determined whether the connection to the target router fails. If so, operation S611 is performed.

[0136] In operation S611, a third time point at which connection to a target router fails is acquired.

[0137] In operation S612, it is determined whether the third time difference between the third moment and the preset start moment is greater than the preset time interval. If so, the process returns to operation S609. If not, the third moment is used as the first moment, and the process returns to operation S604.

[0138] In the embodiment of the present disclosure, the first network connection operation may include operations S603 and S604. The second network connection operation may include operations S605 to S612.

[0139] In the disclosed embodiment, when the first moment of the network abnormality of the IoT device is within the preset network abnormality time period, the IoT device can ignore the network abnormality state and perform local work during the time from the first moment to the preset end time. When the preset end time is reached, the IoT device starts to perform the operation of connecting to the target router.

[0140] In the embodiment of the present disclosure, when the first moment when the IoT device has a network anomaly is before the preset network anomaly time period, the IoT device performs an operation of connecting to the target router. After each failure to connect to the target router, the second moment when the connection to the target router fails is obtained. At this time, by determining the time difference between the second moment and the first moment, the duration of the continuous execution of the connection to the target router is determined.

[0141] For example, if the duration of continuously executing the connection to the target router is less than or equal to the preset time difference, for example, the duration of continuously executing the connection to the target router is less than 10 minutes, it can be re-determined whether the second moment is within the preset network abnormality time period. If the second moment is within the preset network abnormality time period, the first network operation is performed. If the second moment is still before the preset network abnormality time period, the operation of connecting to the target router can continue to be performed.

[0142] For example, if the duration of connecting to the target router is greater than the preset time difference, for example, the duration of connecting to the target router is greater than 10 minutes, it can be considered that the target router may be in a state of long-term network abnormality and cannot be successfully connected to the target router in a short time. In order to reduce resource consumption, intermittent connection to the target router can be executed at preset time intervals.

[0143] After each failure to connect to the target router during intermittent connection to the target router, a third time when the connection to the target router fails is obtained. At this time, by determining the time difference between the third time and the preset start time, it is determined whether this connection is the last operation of connecting to the target router before the preset network abnormality time period, and after the time difference between the third time and the preset start time has passed, the first network connection operation is performed.

[0144] Based on the above network connection method, the present disclosure also provides a network connection device. Figure 7 The device is described in detail.

[0145] Figure 7 The structure block diagram of the network connection device according to the embodiment of the present disclosure is schematically shown.

[0146] like Figure 7 As shown, the network connection device 700 of this embodiment includes an acquisition module 710 , a first determination module 720 and a second determination module 730 .

[0147] The acquisition module 710 is used to acquire the first time when the network anomaly occurs in response to receiving a signal indicating the network anomaly. In one embodiment, the acquisition module 710 can be used to perform the operation S310 described above, which will not be described in detail here.

[0148] The first determination module 720 is used to perform a first network connection operation when it is determined that the first moment is within a preset network abnormality time period. In one embodiment, the first determination module 20 can be used to perform the operation S320 described above, which will not be described in detail here.

[0149] The second determination module 730 is used to perform a second network connection operation when it is determined that the first moment is before a preset network abnormality time period. In one embodiment, the second determination module 730 can be used to perform the operation S330 described above, which will not be described in detail here.

[0150] According to an embodiment of the present disclosure, the preset network abnormality time period includes a preset end time. The first determination module 720 includes a first acquisition unit, a first determination unit, and a first connection unit. The first acquisition unit is used to obtain a first time difference between the first moment and the preset end time. The first determination unit is used to determine the target router after the length of the first time difference has passed. The first connection unit is used to connect to the target router.

[0151] According to an embodiment of the present disclosure, the first determining module 720 further includes an execution unit, which is configured to execute a local operation within the duration of the first time difference.

[0152] According to an embodiment of the present disclosure, the preset network abnormality time period includes a preset start time. The second determination module 730 includes a second acquisition unit, a second determination unit, a third determination unit, and a fourth determination unit.

[0153] The second acquisition unit is used to acquire a second time difference between the first moment and the preset start moment. The second determination unit is used to connect to the target router within the duration of the second time difference when it is determined that the second time difference is less than or equal to the preset time difference. The third determination unit is used to acquire a second moment when the connection to the target router fails when it is determined that the connection to the target router fails. The fourth determination unit is used to perform the first network connection operation when it is determined that the second moment is within a preset network abnormality time period.

[0154] According to an embodiment of the present disclosure, the second determination module 730 further includes: a fifth determination unit, a sixth determination unit, a seventh determination unit, and an eighth determination unit. The fifth determination unit is used to connect to the target router within the duration of the preset time difference when it is determined that the second time difference is greater than the preset time difference. The sixth determination unit is used to intermittently connect to the target router at preset time intervals when it is determined that the connection to the target router fails. The seventh determination unit is used to obtain a third moment of failure to intermittently connect to the target router when it is determined that the intermittent connection to the target router fails. The eighth determination unit is used to perform the first network connection operation when it is determined that the third moment is within a preset network abnormality time period.

[0155] According to an embodiment of the present disclosure, the second determination module 730 includes a third acquisition unit and a ninth determination unit. The third acquisition unit is used to acquire a third time difference between the third moment and the preset start moment. The ninth determination unit is used to, when determining that the third time difference is less than or equal to the time interval, perform the first network connection operation after the duration of the third time difference has passed.

[0156] According to an embodiment of the present disclosure, the network connection device 700 is also used to obtain the transmission type of the instruction information in response to receiving the instruction information; call the parsing method corresponding to the transmission type; and parse the information through the parsing method to obtain a preset network abnormality time period.

[0157] According to an embodiment of the present disclosure, any multiple modules in the acquisition module 710, the first determination module 720, and the second determination module 730 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the first determination module 720, and the second determination module 730 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 710, the first determination module 720, and the second determination module 730 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0158] Figure 8 A block diagram of an electronic device suitable for implementing a network connection method according to an embodiment of the present disclosure is schematically shown.

[0159] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0160] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0161] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.

[0162] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0163] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.

[0164] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the network connection method provided by the embodiment of the present disclosure.

[0165] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0166] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0167] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0168] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0169] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0171] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A network connection method, comprising: In response to receiving a signal indicating a network anomaly, obtaining a first moment when the network anomaly occurs; In the case where it is determined that the first moment is within a preset network abnormality time period, performing a first network connection operation, the first network connection operation comprising: performing a network reconnection operation after the preset network abnormality time period has passed; and In the case where it is determined that the first moment is before the preset network abnormality time period, performing a second network connection operation, the second network connection operation comprising: when the first moment is before the preset network abnormality time period, performing a network reconnection operation until the preset network abnormality time period is reached; The preset network abnormality time period includes a preset end time; and when it is determined that the first time is within the preset network abnormality time period, performing the first network connection operation includes: Obtaining a first time difference between the first moment and the preset end moment; After the first time difference has elapsed, determining a target router; and Connect to the target router.

2. The network connection method according to claim 1, wherein: The preset network abnormality time period includes a preset start time; The performing a second network connection operation when it is determined that the first moment is before a preset network abnormality time period includes: Obtaining a second time difference between the first moment and the preset start moment; If it is determined that the second time difference is less than or equal to the preset time difference, connecting to the target router within the duration of the second time difference; When it is determined that the connection to the target router fails, obtaining a second time when the connection to the target router fails; and When it is determined that the second moment is within a preset network abnormality time period, a first network connection operation is performed.

3. The network connection method according to claim 2, wherein: The performing a second network connection operation when it is determined that the first moment is before a preset network abnormality time period also includes: If it is determined that the second time difference is greater than a preset time difference, connecting to a target router within the duration of the preset time difference; If it is determined that the connection to the target router fails, intermittently connect to the target router at a preset time interval; When it is determined that the intermittent connection to the target router fails, obtaining a third time when the intermittent connection to the target router fails; and When it is determined that the third moment is within a preset network abnormality time period, a first network connection operation is performed.

4. The network connection method according to claim 3, wherein: The performing a second network connection operation when it is determined that the first moment is before a preset network abnormality time period also includes: Acquire a third time difference between the third moment and the preset start moment; and In a case where it is determined that the third time difference is less than or equal to the time interval, a first network connection operation is performed after a duration of the third time difference has elapsed.

5. The network connection method according to claim 1, wherein: When determining that the first moment is within a preset network abnormality time period, performing a first network connection operation also includes: The local operation is performed within the duration of the first time difference.

6. The network connection method according to claim 1, further comprising: In response to receiving the instruction information, acquiring a transmission type of the instruction information; Calling a parsing method corresponding to the transmission type; as well as The information is parsed by the parsing method to obtain a preset network abnormality time period.

7. A network connection device, comprising: An acquisition module, used for acquiring the first moment when the network anomaly occurs in response to the network anomaly signal; A first determining module is configured to, when determining that the first moment is within a preset network abnormality time period, perform a first network connection operation, wherein the first network connection operation includes: performing a network reconnection operation after the preset network abnormality time period has passed; and A second determining module is used to perform a second network connection operation when it is determined that the first moment is before a preset network abnormality time period, the second network connection operation comprising: when the first moment is before the preset network abnormality time period, performing a network reconnection operation until the preset network abnormality time period is reached; The preset network abnormality time period includes a preset end time; and when it is determined that the first time is within the preset network abnormality time period, performing the first network connection operation includes: Obtaining a first time difference between the first moment and the preset end moment; After the first time difference has elapsed, determining a target router; and Connect to the target router.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Network connection abnormity processing method and device

    CN106603306A