Method for recovering network and related equipment

By identifying and determining the ability of the target terminal device, and using its cellular and access point capabilities to restore network connections when the WAN side of the routing device is abnormal, the problem of the terminal device being disconnected due to the abnormality of the routing device network is solved, and the user experience is improved.

CN119865839AActive Publication Date: 2025-04-22HONOR DEVICE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311330146.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-04-22
Estimated Expiration
2043-10-13

AI Technical Summary

Technical Problem

The network abnormality on the WAN side of the routing device causes the terminal device to be unable to connect to the network, affecting the user experience.

Method used

By identifying the capability information of the terminal device, the terminal device that meets the target capability is determined as the target terminal device, and when a network abnormality occurs on the wide area network side of the routing device, a message is sent to the target terminal device to instruct it to initiate cellular capabilities and access point capabilities, thereby restoring the network connection.

Benefits of technology

Quickly restore network connections, improve user experience, and ensure that terminal devices can still provide services normally when the routing equipment is disconnected from the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865839A_ABST
    Figure CN119865839A_ABST
Patent Text Reader

Abstract

The invention discloses a network recovery method and related equipment, applied to routing equipment, and the method comprises the following steps: receiving first messages sent by one or more terminal equipment respectively, the first messages comprising capability information of the corresponding terminal equipment; identifying whether the capability information of each terminal device satisfies a target capability, wherein the target capability comprises a cellular capability and an access point capability; determining the terminal device, of which the capability information satisfies the target capability and which is successfully connected with the routing device, in the one or more terminal devices as a target terminal device; when the network connectivity of the wide area network side of the routing equipment is abnormal, a second message is sent to the target terminal equipment, and the second message is used for indicating the target terminal equipment to start the target capability; and if the target terminal device starts the target capability, connecting the target terminal device. By adopting the embodiment of the invention, the network can be quickly recovered to improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method for restoring a network and related equipment. Background Art

[0002] With the popularization of communication technology, terminal devices such as mobile phones and smart homes need to connect to the network to support various services of users. However, due to network anomalies of routing devices, such as user arrears, abnormalities of uplink optical modems, abnormalities of network cables, or abnormalities of community backbone networks, the wide area network (WAN) side of the routing device is abnormal, resulting in abnormal connectivity between the routing device and the core network, causing the user's home devices such as smart homes and other IoT devices to be unable to connect to the network, thereby failing to provide services to users, affecting the user experience. Summary of the invention

[0003] The embodiments of the present application provide a method for restoring a network and related devices, which can quickly restore the network to improve the user experience when a network anomaly occurs on the wide area network side of a routing device and causes a terminal to suddenly be unable to connect to the network.

[0004] In a first aspect, an embodiment of the present application provides a method for restoring a network, which is applied to a routing device, and the method may include: receiving a first message sent by one or more terminal devices respectively, the first message including capability information of the corresponding terminal device; identifying whether the capability information of each terminal device meets the target capability, the target capability including cellular capability and access point capability; determining the terminal device whose capability information in the one or more terminal devices meets the target capability and is successfully connected to the routing device as a target terminal device; when a network connectivity abnormality occurs on the wide area network side of the routing device, sending a second message to the target terminal device, the second message being used to instruct the target terminal device to start the target capability; if the target terminal device starts the target capability, connecting the target terminal device.

[0005] In an embodiment of the present application, when a routing device (e.g., a router) and one or more terminal devices (e.g., a mobile phone, a laptop computer, a smart speaker) establish a network connection, by identifying the first message carrying the capability information of the corresponding terminal device sent by one or more terminal devices, it is determined whether each terminal device meets the target capability, wherein the target capability may include cellular capability and access point capability, so that the terminal device that meets the target capability and is successfully connected to the routing device is determined as the target terminal device, so that in the case of a sudden network disconnection due to abnormal network connectivity on the wide area network side of the routing device, information can be sent to the target terminal device in a targeted manner. Furthermore, when a network connectivity abnormality occurs on the wide area network side of the routing device, the routing device sends a second message to the target terminal device, and the second message is used to instruct the target terminal device to start the target capability. If the target terminal device activates the target capability, the routing device establishes a network connection with the target terminal device, so that the routing device can utilize the target capability of the target terminal device to restore the network of other terminal devices connected to the routing device (such as terminal devices that do not have cellular capabilities and / or access point capabilities, or target terminal devices that have not activated the target capability), so that users can normally use the services provided by the terminal device when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0006] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the one or more terminal devices before the one or more terminal devices are successfully connected to the routing device, or an operation frame sent by the one or more terminal devices after the one or more terminal devices are successfully connected to the routing device. Optionally, the probe request is used by the terminal device to detect nearby available routing devices, the authentication request is used by the routing device to authenticate or authenticate the terminal device, the association request is used by the terminal device to request to establish a network connection with the routing device, the dynamic host configuration protocol is used by the terminal device to obtain the network configuration information assigned by the routing device, and the operation frame is used to indicate the capability information of the terminal device.

[0007] In an embodiment of the present application, the first message may be one of the following: a probe request, an authentication request, an association request, and a dynamic host configuration protocol, which are respectively sent before one or more terminal devices are successfully connected to a routing device, or an operation frame, which is respectively sent after one or more terminal devices are successfully connected to a routing device. Optionally, a probe request may be used by a terminal device to detect nearby available routing devices, an authentication request may be used by a routing device to authenticate or authenticate a terminal device, an association request may be used by a terminal device to request to establish a network connection with a routing device, a dynamic host configuration protocol may be used by a terminal device to obtain network configuration information assigned by a routing device, and an operation frame may be used to indicate capability information of a terminal device. Therefore, one of the following: a probe request, an authentication request, an association request, and a dynamic host configuration protocol, which are respectively sent before one or more terminal devices are successfully connected to a routing device, or an operation frame, which are respectively sent after one or more terminal devices are successfully connected to a routing device, may be used as a first message carrying capability information of the corresponding terminal device, so that the routing device may identify and determine whether the corresponding terminal device is a target terminal device.

[0008] In a possible implementation manner, the method further includes: establishing a network connection between the routing device and a corresponding terminal device based on the detection request, the authentication request, the association request, and the dynamic host configuration protocol.

[0009] In an embodiment of the present application, based on the detection requests, authentication requests, association requests, and dynamic host configuration protocols sent by one or more terminal devices before the successful connection with the routing device, the routing device can establish a network connection with one or more terminal devices by responding to the received detection requests, authentication requests, association requests, and dynamic host configuration protocols.

[0010] In a possible implementation manner, the cellular capability is used to connect to a cellular network; and the access point capability is used to create a wireless network access point.

[0011] In this embodiment of the application, since the cellular capability is used to connect to the cellular network and the access point capability is used to create a wireless network access point, starting the target capability includes connecting to the cellular network (for example, accessing the Internet through the cellular network) and creating a wireless network access point (for example, turning on a hotspot).

[0012] In a possible implementation manner, the method further includes: recording a network address of the target terminal device, where the network address includes a media access control address and / or a network protocol address.

[0013] In the embodiment of the present application, when the routing device determines that the capability information in one or more terminal devices meets the target capability and the terminal device successfully connected to the routing device is determined as the target terminal device, the network address of the target terminal device can be recorded. Specifically, the network address can include a media access control address (such as a MAC address) and / or a network protocol address (such as an IP address). Through the embodiment of the present application, by recording the media access control address and / or network protocol address of the target terminal device, when a network connectivity anomaly occurs on the wide area network side of the routing device, a second message can be sent to the target terminal device to instruct the target terminal device to start the target capability.

[0014] In one possible implementation, the method further includes: periodically detecting the network connectivity of the wide area network side of the routing device; or, when a network anomaly occurs in at least one terminal device that is successfully connected to the routing device, detecting the network connectivity of the wide area network side of the routing device.

[0015] In an embodiment of the present application, after the routing device successfully establishes a network connection with one or more terminal devices, the routing device may periodically perform a network connectivity check on the wide area network side of the routing device, for example, triggering the check once every minute, and the specific detection period may vary accordingly with the sensitivity of the routing device to network anomalies; or when at least one terminal device that has successfully connected to the routing device has a network anomaly, such as a service anomaly or an inability to access the Internet, the routing device may be triggered to perform a network connectivity check on the wide area network side, thereby promptly detecting whether a network connectivity anomaly occurs on the wide area network side of the routing device, so as to notify the target terminal device as quickly as possible to start the target capability to restore network communication.

[0016] In one possible implementation, the detecting of the network connectivity of the wide area network side of the routing device includes: detecting whether the routing device has downlink data transmission, and if so, determining that the network connectivity of the wide area network side is normal; if not, sending a network detection request to the wide area network side, the network detection request being used to request a network connectivity test; if a response to the network detection request is received, determining that the network connectivity of the wide area network side is normal; if no response to the network detection request is received, determining that the network connectivity of the wide area network side is abnormal.

[0017] In the embodiment of the present application, how the routing device performs network connectivity detection on the WAN side may specifically include: detecting whether the routing device has downlink data transmission (i.e., whether there is data transmission between the routing device and the server on the WAN side); if so, determining that the network connectivity on the WAN side is normal; if not, sending a network detection request to the WAN side, the network detection request is used to request a network connectivity test; illustratively, the routing device sends a network detection data packet (Ping packet) through a Ping command, or sends an address resolution protocol packet (ARP packet) through an address resolution protocol (ARP) to request a network connectivity test to the WAN side inside the routing device. If the routing device receives a response to the network detection request, it determines that the network connectivity on its WAN side is normal; if no response to the network detection request is received, it determines that the network connectivity on its WAN side is abnormal. Through the embodiment of the present application, the routing device can detect whether the network connectivity on its internal WAN side is abnormal, so as to restore network communication by activating the target capability through the target terminal device.

[0018] In a possible implementation, sending the second message to the target terminal device includes: when the number of the target terminal devices is 1, sending the second message to the target terminal device; connecting to the target terminal device includes: accessing a wireless network access point created by the target terminal device.

[0019] In an embodiment of the present application, when the number of target terminal devices determined by the routing device is single, the routing device sends a second message to the target terminal device for instructing the target terminal device to enable the target capability; further, if the target terminal device enables the target capability (for example, accessing the Internet through a cellular network and turning on the hotspot function), the routing device connects to the target terminal device by accessing the wireless network access point (for example, a hotspot) created by the target terminal device to restore its own network, so that other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capabilities and / or access point capabilities, or terminal devices that do not have target capabilities enabled) can also restore Internet access capabilities for normal use by users, thereby reducing the inconvenience caused to users by sudden network disconnection, thereby improving the user experience.

[0020] In a possible implementation, the sending of the second message to the target terminal device includes: when the number of the target terminal devices is multiple, sending the second message to a first target terminal device, the first target terminal device being the target terminal device that is closest to the routing device and / or has the best connection performance; the connecting to the target terminal device includes: accessing a wireless network access point created by the target terminal device that is closest to the routing device and / or has the best connection performance.

[0021] In an embodiment of the present application, when the number of target terminal devices determined by the routing device is multiple, the routing device sends a second message to the first target terminal device for instructing the target terminal device to enable the target capability, and the first target terminal device is the target terminal device that is closest to the routing device and / or has the best connection performance; further, if the target terminal device activates the target capability (for example, accessing the Internet through a cellular network and turning on the hotspot function), the routing device connects to the first target terminal device by accessing the wireless network access point (for example, a hotspot) created with the first target terminal device to restore its own network, so that other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capabilities and / or access point capabilities, or target terminal devices that have not enabled the target capabilities) can also restore Internet access capabilities for normal use by users, thereby reducing the inconvenience caused to users by sudden network disconnection, thereby improving the user experience.

[0022] In a second aspect, an embodiment of the present application provides a method for restoring a network, which is applied to a terminal device. The method may include: sending a first message to a routing device, the first message including capability information of the terminal device; if the capability information of the terminal device meets the target capability and meets a preset condition, receiving a second message sent by the routing device; the second message is used to instruct the terminal device to start the target capability; the target capability includes cellular capability and access point capability; based on the second message, starting the target capability.

[0023] In an embodiment of the present application, a terminal device can send a first message to a routing device, and the first message includes the capability information of the terminal device, so that the routing device can identify whether the capability information of the terminal device meets the target capability based on the first message, thereby determining whether the terminal device can be determined as a target terminal device. If the capability information of the terminal device meets the target capability and meets the preset conditions, the terminal device can receive a second message sent by the routing device, and the second message can be used to instruct the terminal device to start the target capability. Further, the second message can be used to instruct the terminal device to start the target capability. Based on the second message, the terminal device starts the target capability, so that the routing device can establish a network connection with the terminal device, thereby using the target capability of the target terminal device to restore the Internet access capability of the routing device. At the same time, other terminal devices connected to the routing device (for example, terminal devices without cellular capabilities and / or access point capabilities, or terminal devices that have not turned on the target capability, etc.) can also restore the network, so that the terminal device can still provide services to the user normally when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0024] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or is an operation frame sent by the terminal device after the terminal device is successfully connected to the routing device.

[0025] In the embodiment of the present application, the first message may be one of the detection request, authentication request, association request, and dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or may be an operation frame sent by the terminal device after the terminal device is successfully connected to the routing device. Therefore, the detection request, authentication request, association request, and dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or the operation frame sent by the terminal device after the terminal device is successfully connected to the routing device, can be used as the first message carrying the capability information of the terminal device, so that the routing device can identify and determine whether the terminal device is the target terminal device.

[0026] In a possible implementation, the method further includes: establishing a network connection with the routing device based on a response of the routing device to the detection request, the authentication request, the association request, and the dynamic host configuration protocol.

[0027] In an embodiment of the present application, after the terminal device sends a probe request, an authentication request, an association request, and a response to the dynamic host configuration protocol to the routing device, the terminal device establishes a network connection with the routing device by receiving the response of the routing device to the probe request, the authentication request, the association request, and the dynamic host configuration protocol.

[0028] In a possible implementation, the preset condition includes: the terminal device is successfully connected to the routing device, and a network anomaly occurs on the wide area network side of the routing device.

[0029] In the embodiment of the present application, since the preset conditions may include that the terminal device is successfully connected to the routing device and a network anomaly occurs on the wide area network side of the routing device, if the capability information of the terminal device meets the target capability and the preset conditions are met, that is, the terminal device is successfully connected to the routing device and a network anomaly occurs on the wide area network side of the routing device, the terminal device receives a second message sent by the routing device, and the second message can be used to instruct the routing device to start the target capability.

[0030] In a possible implementation, the preset condition further includes: the terminal device is the terminal device that is closest to the routing device and / or has the best connection performance.

[0031] In the embodiment of the present application, since the preset conditions may also include that the terminal device is the terminal device that is closest to the routing device and / or has the best connection performance, therefore, if the capability information of the terminal device meets the target capability and the preset conditions are met, that is, the terminal device is successfully connected to the routing device and a network abnormality occurs on the wide area network side of the routing device, and at the same time, the terminal device is the terminal device that is closest to the routing device and / or has the best connection performance, the terminal device receives a second message sent by the routing device, and the second message can be used to instruct the routing device to start the target capability.

[0032] In a possible implementation manner, the cellular capability is used to connect to a cellular network; and the access point capability is used to create a wireless network access point.

[0033] In this embodiment of the application, since the cellular capability is used to connect to the cellular network and the access point capability is used to create a wireless network access point, starting the target capability includes connecting to the cellular network (for example, accessing the Internet through the cellular network) and creating a wireless network access point (for example, turning on the hotspot function).

[0034] In a third aspect, an embodiment of the present application provides a routing device, which may include:

[0035] A first receiving unit, configured to receive first messages respectively sent by one or more terminal devices; the first messages include capability information of the corresponding terminal devices;

[0036] An identification unit, used to identify whether the capability information of each terminal device meets the target capability, wherein the target capability includes cellular capability and access point capability;

[0037] A determining unit, configured to determine the terminal device whose capability information in the one or more terminal devices meets the target capability and the terminal device that is successfully connected as the target terminal device;

[0038] A first sending unit, configured to send a second message to the target terminal device when a network anomaly occurs on the wide area network side of the routing device, wherein the second message is used to instruct the target terminal device to enable the target capability;

[0039] The first connecting unit is configured to connect to the target terminal device if the target terminal device activates the target capability.

[0040] In the embodiment of the present application, in a routing device, a first receiving unit receives a first message sent by one or more terminal devices respectively, and the first message may include capability information of the corresponding terminal device; an identification unit identifies whether the capability information of each terminal device meets the target capability based on the first message, and the target capability includes cellular capability and access point capability; then a terminal device whose capability information in one or more terminal devices meets the target capability and is successfully connected is determined as a target terminal device by a determination unit; when a network abnormality occurs on the wide area network side of the routing device, a second message is sent to the target terminal device by the first sending unit, and the second message may be used to instruct the target terminal device to start the target capability; if the target terminal device starts the target capability, the routing device may connect to the target terminal device through the first connection unit, so that the routing device can use the target capability of the target terminal device to restore the Internet access capability, so that other terminal devices connected to the routing device (for example, terminal devices without cellular capability and / or access point capability, or target terminal devices without target capability) can restore the network, so that users can still use the services provided by the terminal device normally when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0041] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the one or more terminal devices before the one or more terminal devices are successfully connected to the routing device, or is an operation frame sent by the one or more terminal devices after the one or more terminal devices are successfully connected to the routing device.

[0042] In a possible implementation manner, the routing device further includes:

[0043] The second connection unit is used to establish a network connection between the routing device and the corresponding terminal device based on the detection request, the authentication request, the association request and the dynamic host configuration protocol.

[0044] In a possible implementation, the cellular capability is used to connect to a cellular network; the access point capability is used to create a wireless network access point; and the initiating the target capability includes connecting to a cellular network and creating a wireless network access point.

[0045] In a possible implementation manner, the routing device further includes:

[0046] The recording unit is used to record the network address of the target terminal device, where the network address includes a media access control address and / or a network protocol address.

[0047] In a possible implementation manner, the routing device further includes:

[0048] A detection unit is used to periodically detect the network connectivity of the wide area network side of the routing device; or, when a network anomaly occurs in at least one terminal device that is successfully connected to the routing device, detect the network connectivity of the wide area network side of the routing device.

[0049] In a possible implementation, the detection unit is specifically configured to:

[0050] Detecting whether the routing device has downlink data transmission, and if so, determining that the network connectivity on the wide area network side is normal;

[0051] If not, sending a network detection request to the wide area network side, wherein the network detection request is used to request a network connectivity test;

[0052] If a response to the network detection request is received, it is determined that the network connectivity on the wide area network side is normal;

[0053] If no response to the network detection request is received, it is determined that the network connectivity on the wide area network side is abnormal.

[0054] In a possible implementation manner, the first sending unit is specifically configured to:

[0055] When the number of the target terminal device is 1, sending the second message to the target terminal device;

[0056] The first connecting unit is specifically used for:

[0057] Access the wireless network access point created by the target terminal device.

[0058] In a possible implementation manner, the first sending unit is specifically configured to:

[0059] When there are multiple target terminal devices, sending the second message to a first target terminal device, where the first target terminal device is a target terminal device that is closest to the routing device and / or has the best connection performance;

[0060] The first connecting unit is specifically used for:

[0061] Access the wireless network access point created by the first target terminal device.

[0062] In a fourth aspect, an embodiment of the present application provides a terminal device, which may include:

[0063] A second sending unit, configured to send a first message to the routing device; the first message includes capability information of the terminal device;

[0064] A second receiving unit is configured to receive a second message sent by the routing device if the capability information of the terminal device meets the target capability and a preset condition is met; the second message is used to instruct the terminal device to start the target capability; the target capability includes a cellular capability and an access point capability;

[0065] A starting unit is used to start the target capability based on the second message.

[0066] In an embodiment of the present application, the terminal device can send a first message to the routing device through a second sending unit, and the first message may include capability information of the terminal device; if the capability information of the terminal device meets the target capability and meets a preset condition, the terminal device can receive a second message sent by the routing device through a second receiving unit, and the second message can be used to instruct the terminal device to start the target capability, wherein the target capability includes cellular capability and access point capability; finally, the terminal device starts the target capability through the starting unit based on the received second message, so that the routing device can establish a network connection with the terminal device, thereby utilizing the target capability of the target terminal device to restore the Internet access capability of the routing device. At the same time, other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capability and / or access point capability, or terminal devices that have not enabled the target capability, etc.) can also restore the network, so that the terminal device can still provide services to the user normally when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0067] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or is an operation frame sent by the terminal device after the terminal device is successfully connected to the routing device.

[0068] In a possible implementation manner, the terminal device further includes:

[0069] The third connection unit is used to establish a network connection with the routing device based on the response of the routing device to the detection request, the authentication request, the association request and the dynamic host configuration protocol.

[0070] In a possible implementation, the preset condition includes: the terminal device is successfully connected to the routing device, and a network abnormality occurs on the wide area network side of the routing device.

[0071] In a possible implementation manner, the preset condition further includes: the terminal device is a terminal device that is closest to the routing device and / or has the best connection performance.

[0072] In a possible implementation, the cellular capability is used to connect to a cellular network; the access point capability is used to create a wireless network access point; and the initiating the target capability includes connecting to a cellular network and creating a wireless network access point.

[0073] In a fifth aspect, an embodiment of the present application provides a routing device, which may include a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the routing device performs any method described in the first aspect above.

[0074] In a sixth aspect, an embodiment of the present application provides a terminal device, which may include a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal device executes any method described in the second aspect above.

[0075] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by the processor to implement the method described in any one of the first aspect or the second aspect above.

[0076] In an eighth aspect, an embodiment of the present application provides a computer program, wherein the computer program includes instructions, and the computer program is executed by a computing device to implement the method described in any one of the first aspect or the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0078] Figure 1 The present invention is a flowchart of restoring a network in the prior art.

[0079] Figure 2A This is an example diagram of a network connection system structure provided in an embodiment of the present application.

[0080] Figure 2B It is a schematic diagram of the hardware structure of a routing device provided in an embodiment of the present application.

[0081] Figure 2C It is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application.

[0082] Figure 3A This is a schematic diagram of an operation interface for a user to restore a network using a mobile terminal device, provided in an embodiment of the present application.

[0083] Figure 3BThis is another schematic diagram of an operation interface for a user to restore a network using a mobile terminal device, provided in an embodiment of the present application.

[0084] Figure 4 This is an example flow chart of a method for restoring a network provided in an embodiment of the present application.

[0085] Figure 5 This is a flowchart of another method for restoring a network provided in an embodiment of the present application.

[0086] Figure 6 It is an example flow chart of a network recovery method of a network connection system provided in an embodiment of the present application.

[0087] Figure 7 It is a structural diagram of a routing device provided in an embodiment of the present application.

[0088] Figure 8 It is a structural diagram of a terminal device provided in an embodiment of the present application.

[0089] Fig. 9 It is a structural diagram of another routing device provided in an embodiment of the present application.

[0090] Fig.10 It is a structural diagram of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0091] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.

[0092] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the embodiments of the present application. As used in the specification and the appended claims of the embodiments of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the embodiments of the present application refers to and includes any or all possible combinations of one or more listed items.

[0093] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0094] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0095] First, some terms in the present application are explained to facilitate those skilled in the art to understand the embodiments of the present application.

[0096] (1) Core Network (CN) is a network infrastructure used to support large-scale communications. It is the core part of the Wide Area Network (WAN). As a key infrastructure for telecommunications operators, Internet service providers, and other organizations, the core network provides high-capacity, high-reliability, and flexible data transmission. It is usually composed of a series of high-performance routers, switches, and other key network devices. The core network is responsible for processing data routing, forwarding, and switching to transfer data between different network nodes.

[0097] (2) Internet of Things (IoT) devices refer to various physical devices, sensors or objects connected to the IoT. IoT devices can be of various types, including but not limited to: smart home devices, health monitoring devices, sensors, etc. These devices have network connectivity and can communicate and exchange data with other devices through the Internet or other networks.

[0098] (3) Routing is the process and technology of transmitting data packets from source address to destination address in computer networks. It refers to selecting and determining the path and forwarding method for data packets from source address to destination address in the network according to specific rules and algorithms. It provides a reliable and efficient data transmission method for packet switching networks.

[0099] (4) A router is a device that performs routing functions. The router checks the destination address information of the data packet and decides which network interface to forward the data packet to based on a predefined routing table or routing protocol in order to achieve the destination address.

[0100] (5) Wide Area Network port (WAN port) is also called a WAN port. A WAN port is usually a port on the back or side of a router. It has different interface types, such as Ethernet port, fiber port, or digital subscriber line (DSL) port, depending on the model of the router and the network connection method.

[0101] After connecting to the broadband network of the Internet Service Provider (ISP) through the WAN port, the router can forward the data packets in the internal network and local area network (LAN) to the WAN port and send them to the external network through the routing function. At the same time, it can also receive data packets from the external network and forward them to the appropriate internal network devices.

[0102] When setting up a router, you usually need to configure the connection method and parameters of the WAN port, such as the Internet Protocol (IP) address, subnet mask, gateway, etc., so that the router can correctly connect to the network provided by the ISP.

[0103] (6) An optical network terminal (ONT) is a device used to access a fiber-optic broadband network. The ONT acts as a bridge between the fiber-optic network and user terminal devices, converting fiber-optic signals into network signals suitable for user devices.

[0104] (7) Backbone Network (BN) refers to the high-speed transmission routes in the network that connect various subnets and larger networks. Backbone networks are usually composed of large enterprises, Internet service providers (ISPs), telecommunications operators, etc. They establish backbone networks through high-speed connections such as optical fibers, satellite links, and dedicated lines, forming a network architecture that covers a wide area. It is a high-bandwidth, high-speed connection network backbone that is responsible for transmitting large amounts of data and connecting network nodes in different geographical locations. The backbone network is the foundation for building a large-scale Internet. It carries most of the Internet traffic and provides high-speed and stable data transmission capabilities.

[0105] (8) Cellular Capability generally refers to the capabilities of mobile communication systems, especially cellular mobile communication systems. Having cellular capability generally means that a device or system has the ability to connect to a cellular mobile communication network. This means that the device can communicate with base stations in the cellular network through wireless signals and utilize the services and functions provided by the mobile communication network.

[0106] (9) Wireless terminal (Station, STA) refers to the client device or terminal device in the wireless local area network (Wireless Local Area Network, WLAN). In WLAN, devices can be divided into two categories: wireless terminal STA and access point (Access Point, AP). Among them, STA refers to a mobile device or terminal device connected to the WLAN, such as a smartphone, laptop, tablet computer, etc. STA is the terminal user of the wireless network. By establishing a connection with the AP, it can access network resources, send and receive data, and communicate. AP is the access point of the wireless LAN, responsible for providing wireless signal coverage and network connection. AP acts as a bridge between the LAN and wireless devices, accepting data from STA and forwarding it to the wired network or other wireless devices.

[0107] The connection between STA and AP is usually achieved through Wi-Fi or other wireless technologies. STA scans available networks, selects a suitable AP to connect to, and performs authentication and association processes. Once the connection is successful, STA can exchange data with AP, access the Internet and other network services.

[0108] (10) Address Resolution Protocol (ARP) is a data packet used in a network communication protocol to resolve and map the relationship between the physical address (Media Access Control address, MAC address) and IP address of a network device in a local area network. ARP packets are usually used to implement address conversion when communicating between hosts in an IP network. When a host needs to communicate with another host, before sending a data packet, it will first check its own ARP cache (or ARP table) to determine the physical address of the target host. If the corresponding physical address is found in the cache, the data packet is directly sent to the device. However, if the physical address of the target device is not in the cache, the sending host will send an ARP request broadcast packet (ARP Request Packet) to all devices on the local area network. After receiving the broadcast packet, the target device will send an ARP reply packet (ARP Reply Packet) to reply to the sending host and provide its own physical address. After receiving the response, the sending host will bind the physical address of the target device with the IP address and update its own ARP cache for future communication.

[0109] (11) A network probe packet, also known as a Ping packet, is a type of data packet used in basic tools for performing network testing and diagnosis. It is a specific type of data packet sent by the Ping tool to test connectivity between hosts and measure round-trip time (RTT). Ping packets typically use the Internet Control Message Protocol (ICMP) to send and receive data. It sends an ICMP echo request message to the target host and waits for the target host to reply with an ICMP echo response message. By sending and receiving these Ping packets, you can determine whether the target host is online, whether the network path is unobstructed, and measure round-trip delay.

[0110] (12) Dynamic Host Configuration Protocol (DHCP) is a network protocol used to automatically assign IP addresses and other network configuration information. DHCP allows devices in a network (called clients) to automatically obtain network parameters such as IP address, subnet mask, default gateway, DNS server, etc. when connecting to the network, without having to manually configure these parameters. The main goal of DHCP is to simplify network management and improve the utilization of network resources.

[0111] (13) A Media Access Control (MAC) address, also known as a physical address, is a unique hardware address used to identify a network device (such as a computer, router, switch, network adapter, etc.) in a local area network (LAN). A MAC address is hardware-fixed and is usually assigned by the device's manufacturer at the time of manufacture and will not change substantially throughout the device's life cycle.

[0112] (14) An Internet Protocol (IP) address is a logical address used to identify and locate a device in a computer network. It is part of the Internet Protocol (IP) and plays an important role in network communications. Among them, IP addresses are divided into two main types: public IP addresses and private IP addresses. Public IP addresses are unique globally and are used to access devices on the Internet; private IP addresses are addresses used in local area networks (LANs) for internal communications and cannot be accessed directly from the Internet. The selection and allocation of private IP address ranges are subject to relevant network specifications and standards.

[0113] (15) Service Set Identifier (SSID) is a name used to identify a wireless local area network (WLAN). It is an identifier used to distinguish different wireless networks. The role of SSID is to guide wireless devices to the correct wireless network. It is usually configured by the network administrator or in the router settings and can be changed as needed. For security reasons, some WLANs can hide their SSID, which means that the wireless router will not actively broadcast the SSID, but requires the user to manually enter the SSID to connect.

[0114] (16) Access Point (AP) is a device in a wireless local area network (WLAN) that is used to connect wireless devices (such as laptops, smartphones, tablets, etc.) to a wired local area network (LAN) or the Internet. AP acts as a bridge between wireless devices and wired networks, enabling wireless devices to access wired network resources through Wi-Fi connections.

[0115] (17) Wireless Local Area Network (WLAN) is a wireless communication technology that connects computers, mobile devices, and other wireless devices to a local area network (LAN) or the Internet. WLAN transmits data via wireless signals instead of using traditional wired connections. It is based on wireless communication standards (such as Wi-Fi) and allows devices to communicate within the wireless coverage area.

[0116] First, the technical problems that this application specifically aims to solve are further analyzed and proposed.

[0117] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a network recovery process in the prior art. Figure 1 The router 10 shown establishes network connections with the terminal devices STA11 and STA12, respectively, wherein the terminal device STA11 is a terminal device with cellular capabilities (such as a mobile phone), and the terminal device STA12 is a terminal device without cellular capabilities (such as a smart home appliance).

[0118] When a network connection is established between the terminal device STA11 and the router 10, the following steps may be included:

[0119] Step S101: the terminal device STA11 sends a probe request (Probe req) to the router 10; the router 10 receives the probe request sent by the terminal device STA11.

[0120] The probe request usually includes identification information of the corresponding terminal device, usually a MAC address, and other related parameters and identifiers, which can be used to detect available wireless network access points nearby.

[0121] Step S102 : the router 10 sends a probe response (Probe rsp) to the terminal device STA11 , and the terminal device STA11 receives the probe response sent by the router 10 .

[0122] The probe response typically includes identification information of the wireless access point, network name (SSID), security settings, supported encryption methods, transmission rate and other network details, etc., and can be used to respond to the probe request sent by the terminal device STA11 to provide the terminal device STA11 with corresponding wireless network information.

[0123] Step S103: the terminal device STA11 sends an authentication request (Auth Req) to the router 10, and the router 10 receives the authentication request sent by the terminal device STA11.

[0124] The authentication request generally includes the identity information of the device, the supported authentication methods and other related parameters, which can be used to verify or authenticate the identity of the terminal device STA11.

[0125] Step S104 : the router 10 sends an authentication response (Auth Rsp) to the terminal device STA11 ; the terminal device STA11 receives the authentication response sent by the router 10 .

[0126] Specifically, the authentication response may include the authentication result and related information of the router 10 for the terminal device STA11, which can be used to respond to the authentication request sent by the terminal device STA11; if the authentication request of the terminal device STA11 is accepted, the authentication response may generally include confirmation information of successful authentication; otherwise, the authentication response sent to the terminal device STA11 will include corresponding rejection or error information to indicate the reason for the authentication failure.

[0127] Step S105 : the terminal device STA11 sends an association request (Assoc Req) to the router 10 ; the router 10 receives the association request sent by the terminal device STA11 .

[0128] The association request generally includes identity information of the terminal device STA11 , such as identity information such as a MAC address, and related information of requesting to access a wireless network access point provided by the router 10 , and can be used to request to access a wireless network access point provided by the router 10 .

[0129] Step S106 : the router 10 sends an association response (Assoc Rsp) to the terminal device STA11 ; the terminal device STA11 receives the association response sent by the router 10 .

[0130] Specifically, if the terminal device STA11 is successfully connected to the router 10, the authentication response may include information about the successful connection and some important network parameters, such as the static IP address, subnet mask, gateway address, etc. assigned to the terminal device STA11, which is used to respond to the association request sent by the terminal device STA11 and allow the terminal device STA11 to access the wireless network access point provided by the router 10; otherwise, the authentication response will usually include information describing the reason for the connection failure to help the terminal device STA11 understand the reason for the connection failure and take corresponding measures.

[0131] Step S107 : the router 10 sends a first handshake message (MSG1) to the terminal device STA11 ; the terminal device STA11 receives the first handshake message (MSG1) sent by the router 10 .

[0132] Specifically, the router 10 may send a first handshake message (MSG1) to the terminal device STA11 by broadcasting, and the first handshake message (MSG1) may be an Extensible Authentication Protocol Over LAN (EAPOL) message, which is used to transmit authentication information between a client (e.g., the terminal device STA11) and an authentication server (e.g., the router 10) to establish a secure network connection. The EAPOL message may include an authenticator random number (ANonce) generated by the authentication server (e.g., the router 10), which is used for authentication of the Wi-Fi network and generation of a temporary key.

[0133] Step S108 : in response to the first handshake message ( MSG1 ) sent by the router 10 , the terminal device STA11 sends a second handshake message ( MSG2 ) to the router 10 ; the terminal device STA11 receives the second handshake message ( MSG2 ) sent by the router 10 .

[0134] Specifically, when the terminal device STA11 receives the first handshake message (MSG1) sent by the router 10, the terminal device STA11 can generate a requester random number (SNonce) for filling in the 802.1x message, and combine the authenticator random number (ANonce) in the received first handshake message (MSG1) to calculate the corresponding symmetric key (Pairwise Transient Key, PTK) through a key derivation function, thereby deriving the key confirmation key (Key Confirmation Key, KCK), and then calculate the corresponding message integrity check code (Message Integrity Code, MIC) together with the 802.1x message, and then send a second handshake message (MSG2) to the router 10. The second handshake message (MSG2) can be a second EAPOL message, wherein the EAPOL message may include a single packet authorization (Single packet authorization, SPA) and a message integrity check code (MIC value).

[0135] Step S109 : in response to the second handshake message (MSG2) sent by the terminal device STA11, the router 10 sends a third handshake message (MSG3) to the terminal device STA11; the terminal device STA11 receives the third handshake message (MSG3) sent by the router 10.

[0136] Specifically, when the router 10 receives the second handshake message (MSG2) sent by the terminal device STA11, the router 10 can calculate the corresponding PTK based on the SPA and MIC values ​​therein through a key derivation function, thereby deriving the KCK, and then calculate the corresponding MIC value, and compare it with the MIC value in the received second handshake message (MSG2). If they are inconsistent, the authentication process is directly terminated; if they are consistent, a third handshake message (MSG3) is sent to the terminal device STA11. The third handshake message (MSG3) can be a third EAPOL message, wherein the EAPOL message can include a group temporary key (GTK) generated using a group master key (GMK), an authenticator random number (ANonce), and authentication and association (AA), and the group temporary key GTK encrypted using a key encryption key (KEK), and the calculated current MIC value.

[0137] Step S110 : in response to the third handshake message ( MSG3 ) sent by the router 10 , the terminal device STA11 sends a fourth handshake message ( MSG4 ) to the router 10 ; the terminal device STA11 receives the fourth handshake message ( MSG4 ) sent by the router 10 .

[0138] Specifically, when the terminal device STA11 receives the third handshake message (MSG3) sent by the router 10, the MIC value is first calculated by the above method, and compared with the MIC value in the received third handshake message (MSG3). If they are inconsistent, the handshake fails; if they are consistent, the terminal device STA11 uses the peer transient key (Pairwise Transient Key, PTK) to derive the key encryption key KEK, decrypt the group temporary key GTK, and then install the obtained key (Transient Key, TK) into the system as the key for subsequent data encryption, and send a fourth handshake message (MSG4) to the router 10. The fourth handshake message (MSG4) can be an acknowledgement (ACK) message used to indicate that the key has been installed, and the ACK message may include the calculated MIC value.

[0139] Step S111 : A Dynamic Host Configuration Protocol (DHCP) process is performed between the terminal device STA11 and the router 10 .

[0140] Specifically, when the terminal device STA11 is connected to the router 10 for the first time, the terminal device STA11 can broadcast a DHCP discovery message to the DHCP server in the routing device to find an available DHCP server; after the DHCP server in the routing device receives the DHCP discovery message, it can respond with a DHCP offer message, which may include an available IP address and other configuration information. If there are responses from multiple DHCP servers, the terminal device STA11 will usually select one of the DHCP offer messages. Furthermore, if the terminal device STA11 receives a DHCP offer message, it can send a DHCP request to the router 10 to confirm and request the assigned IP address and other configuration information; based on the DHCP request of the terminal device, the DHCP server in the router 10 sends a DHCP confirmation message to the terminal device STA11, which may include the IP address requested by the terminal device STA11 and other configuration information, so that the terminal device STA11 successfully obtains an IP address to maintain the network communication connection with the routing device.

[0141] It should be noted that steps S112-S122 of establishing a network connection between the terminal device STA12 and the router 10 are the normal access process between the terminal device and the router, which is similar to the steps S101-S111 of establishing a network connection between the terminal device STA12 and the router 10, and will not be repeated here. In addition, there is no clear order between the steps of establishing a network connection between the terminal device STA11 and the terminal device STA12 and the router 10, that is, steps S101-S111 can be executed synchronously with steps S112-S122, or before or after steps S112-S122, and the embodiment of the present application does not specifically limit this.

[0142] Step S123: A network anomaly occurs at the WAN port of the router 10.

[0143] Specifically, due to arrears, optical modem abnormality, network cable abnormality, backbone network abnormality, etc., the WAN port of router 10 has a network abnormality, which causes the terminal devices STA11 and STA12 connected thereto to have abnormal Internet access.

[0144] Step S124A: The terminal device STA11 cannot access the Internet and waits for the route to be restored, or uses its own cellular capabilities to access the Internet.

[0145] Step S124B: The terminal device STA12 cannot access the Internet and waits for routing to be restored.

[0146] Specifically, when a network anomaly occurs at the WAN port of the router, both the terminal device STA11 and the terminal device STA12 cannot access the Internet and can wait for the router 10 to recover before they can access the Internet normally. However, since the terminal device STA11 has cellular capabilities, the terminal device STA11 can also use its own cellular capabilities to access the Internet. The terminal device STA12 can only wait for the network of the router 10 to recover, and thus cannot provide normal services to the user, which reduces the user experience. Therefore, when the network on the WAN side of the routing device is abnormal and the terminal device connected to it cannot connect to the network, how to quickly restore the network is an urgent problem to be solved.

[0147] To summarize, the technical problems that the present application actually aims to solve include the following aspects: In view of the technical problem in the prior art that due to network abnormalities on the WAN side of the routing device, the terminal devices connected to it are unable to connect to the network, thereby being unable to provide services to users and affecting the user experience, a solution for restoring the network is provided, so that when the network on the WAN side of the routing device is abnormal, the terminal devices connected to it can quickly restore the network, so as to provide services to users normally and improve the user experience.

[0148] In order to facilitate understanding of the embodiments of the present application, the network connection system on which the embodiments of the present application are based is described below.

[0149] See also Figure 2A , Figure 2A This is an example diagram of a network connection system structure provided in an embodiment of the present application. The network connection system mainly includes a routing device 20 (such as a router), terminal devices 21-23 (usually wireless terminal devices), the Internet, and a cellular network. Among the terminal devices 21-23, at least one terminal device connected to the routing device has cellular capabilities and access point (AP) capabilities. The routing device can be connected to the Internet via a network cable, and data transmission between the routing device 20 and the terminal devices 21-23 can be wireless or connected via a network cable, which is not limited in the embodiment of the present application.

[0150] For ease of explanation, Figure 2A The network connection system shown is composed of a routing device 20 and three terminal devices 21-23, wherein the terminal device 22 is a terminal device having both cellular capability and access point capability, the capabilities of the terminal devices 21 and 23 are not specifically limited, the port of the routing device 20 connected to the Internet is a wide area network port (WAN port), and the port of the routing device 20 connected to the terminal devices 21-23 is an air port. It is easy to understand that the structure of the network connection system is only exemplary, and in fact, in other possible embodiments, the network connection system may also include more or fewer routing devices and terminal devices (at least one routing device and at least one terminal device having both cellular capability and access point capability), and accordingly, the number of WAN ports and air ports will also change accordingly. Among them, the terminal device can be of various types, for example, it can be a mobile phone, and can also include a tablet computer, a desktop computer, a desktop computer with a touch-sensitive surface or a touch panel, a laptop computer (laptop), a handheld computer, a notebook computer, a smart screen, a wearable device (such as a smart watch, a smart bracelet, etc.), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a car computer, a smart headset, a game console, and can also be an Internet of Things (IOT) device or a smart home device such as a smart water heater, a smart lamp, a smart air conditioner, etc., and the embodiments of the present application do not specifically limit this.

[0151] Exemplarily, the routing device 20 is generally a network device that performs data packet storage and packet forwarding processing functions between different networks based on network addresses. The routing device can identify the network address and place it in the internal address table, and establish a temporary exchange path between the sending end and the receiving end of the data frame, so that the data frame reaches the destination address from the source address. The routing device 20 of the embodiment of the present application may include a router, and may also include a routing device that performs a routing function. For example, a gateway, a switch, and a mobile device with a wireless hotspot function turned on, in this case, the mobile device is the routing device 20.

[0152] Exemplarily, the terminal device 22 is a terminal device that has both cellular capability and access point capability, such as a mobile phone. Among them, the cellular capability is the ability of the device to use the mobile communication services provided by the cellular network. Furthermore, the cellular network is a wireless communication network that divides the entire geographical area into multiple small areas (cells), each of which is covered by a base station (cellular tower) to achieve wide-range signal coverage, so that devices with cellular capabilities can communicate with the base station through wireless signals and transmit data. The cellular network technology may include communication technologies such as 2G / 3G / 4G / 5G, which are not specifically limited in the embodiments of the present application. In addition, the access point (AP) capability is that the device can provide a wireless network access point (Access Point, AP), so that other devices can connect to the network (such as the Internet or a cellular network) through the wireless network access point to achieve network communication and data transmission.

[0153] For more information about the hardware structure of the routing device 20, see Figure 2B , Figure 2B A schematic diagram of the hardware structure of a routing device provided in an embodiment of the present application. The routing device 20 may include a processor 201, an internal memory 202, an external memory interface 203, a universal serial bus (USB) interface 204, a charging management module 205, a power management module 206, a battery 207, a wireless communication module 208, and an antenna 209, etc. It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the routing device 20. In other embodiments of the present application, the routing device 20 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0154] The processor 201 may include one or more processing units. For example, the processor 201 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the wireless routing device 20 may also include one or more processors. The processor may generate an operation control signal according to an instruction opcode and a timing signal to complete the control of obtaining instructions and executing instructions.

[0155] Optionally, the processor 201 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. Among them, the USB interface 204 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 204 can be used to connect a charger to charge the wireless routing device 20, and can also be used to transmit data between the wireless routing device 20 and peripheral devices.

[0156] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the wireless routing device 20. In other embodiments of the present application, the wireless routing device 20 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0157] The internal memory 202 can be used to store one or more computer programs, which include instructions. The internal memory 202 may include, but is not limited to, a read-only memory (ROM), a static random access memory (SRAM), a synchronous dynamic random access memory (SDRAM), or a random access memory (RAM). Further, the internal memory 202 may include a code storage area and a data storage area. Among them, the code storage area can store an operating system. The data storage area can store data created during the use of the routing device 20. The processor 201 can enable the routing device 20 to execute the method for restoring the network provided in the embodiment of the present application, as well as other applications and data processing by running instructions stored in the memory 202 and / or instructions stored in the memory provided in the processor 210.

[0158] The external memory interface 203 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the routing device 20. The external memory card communicates with the processor 201 through the external memory interface 203 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.

[0159] The antenna 209 is used to transmit and receive wireless signals. The wireless communication function of the routing device 20 can be implemented through the antenna and the wireless communication module 208 and the like.

[0160] The wireless communication module 208 can provide wireless communication solutions including Wi-Fi (including Wi-Fi sensing and Wi-Fi AP), Bluetooth (BT), wireless data transmission modules (for example, 433MHz, 868MHz, 915MHz) applied to the wireless routing device 20. The wireless communication module 250 can be one or more devices integrating at least one communication processing module. The wireless communication module 208 receives electromagnetic waves via the antenna 209, filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 201. The wireless communication module 208 can also receive the signal to be sent from the processor 201, frequency modulate and amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0161] In the embodiment of the present application, the router device 20 can send a broadcast message through the wireless communication module, and the broadcast message can carry the device identification or product identification of the router device 20, so that the surrounding mobile devices can send messages to the router device. The router device 20 can also receive messages sent by mobile devices through the wireless communication module.

[0162] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the routing device 20. In other embodiments of the present application, the routing device 20 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0163] For further information on the hardware structure of the terminal device 22, see Figure 2C , Figure 2C A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application. The terminal device 22 may include a processor 2201, an internal memory 2202, an external memory interface 2203, a universal serial bus (USB) interface 2204, a charging management module 2205, a power management module 2206, a battery 2207, a mobile communication module 2208, a wireless communication module 2209, an antenna 1, an antenna 2, an audio module 2210, a speaker 2210A, a receiver 2210B, a microphone 2210C, an earphone interface 2210D, a sensor module 2211, a button 2212, a motor 2213, an indicator 2214, a camera 2215, a display screen 2216, and a subscriber identification module (SIM) card interface 2217. Among them, the sensor module 2211 may include a pressure sensor 2211A, a gyroscope sensor 2211B, an air pressure sensor 2211C, a magnetic sensor 2211D, an acceleration sensor 2211E, a distance sensor 2211F, a proximity light sensor 2211G, a fingerprint sensor 2211H, a temperature sensor 2211J, a touch sensor 2211K, an ambient light sensor 2211L, a bone conduction sensor 2211M, etc.

[0164] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 22. In other embodiments of the present application, the terminal device 22 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0165] The processor 100 may include one or more processing units (also referred to as processing cores), for example: the processor 2201 may include a central processing unit (CPU), an application processing unit (application processor, AP), a modulation and demodulation processing unit, a graphics processing unit (graphics processing unit, GPU), an image signal processing unit (image signalprocessor, ISP), a video codec unit, a digital signal processing unit (digital signal processor, DSP), a baseband processing unit and a neural network processing unit (neural-network processing unit, NPU) and the like. Among them, different processing units can be independent devices or integrated in one or more devices. Optionally, a memory can also be set in the processor 2201 for storing instructions and data. The processor 2201 can enable the terminal device 22 to execute the method for restoring the network provided in the embodiment of the present application, as well as other applications and data processing by running instructions stored in the internal memory 2202 and / or instructions stored in the memory provided in the processor 2201.

[0166] The internal memory 2202 can be used to store one or more computer programs, which include instructions. The internal memory may include, but is not limited to, a read-only memory (ROM), a static random access memory (SRAM), a synchronous dynamic random access memory (SDRAM), or a random access memory (RAM). Further, the internal memory 2202 may include a code storage area and a data storage area. Among them, the code storage area can store an operating system. The data storage area can store data created during the use of the terminal device 22. Optionally, an internal memory 2202 can also be set in the processor 2201 for storing instructions and data. The processor 2201 can enable the terminal device 22 to execute the method for restoring the network provided in the embodiment of the present application, as well as other applications and data processing by running instructions stored in the internal memory 2202 and / or instructions stored in a memory provided outside the processor 2201.

[0167] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device 22 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can also be used in combination with a tuning switch.

[0168] The mobile communication module 2208 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 22. The mobile communication module 2208 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 2208 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 2208 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 2208 can be set in the processor 2201.

[0169] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 2210A, a receiver 2210B, etc.), or displays an image or video through a display screen 2216. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 2201 and be set in the same device as the mobile communication module 2208 or other functional modules.

[0170] The wireless communication module 2209 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 22. The wireless communication module 2209 can be one or more devices integrating at least one communication processing module. The wireless communication module 2209 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 2201. The wireless communication module 2209 can also receive the signal to be sent from the processor 2201, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0171] In some embodiments, the antenna 1 of the terminal device 22 is coupled to the mobile communication module 2208, and the antenna 2 is coupled to the wireless communication module 2209, so that the mobile device 22 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0172] The terminal device 22 can realize the shooting function through ISP, camera 2215, video codec, GPU, display screen 2216 and application processor.

[0173] The external memory interface 2203 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 22. The external memory card communicates with the processor 2201 through the external memory interface 2203 to implement a data storage function. For example, files such as music and videos are stored in the external memory card. The terminal device 22 can implement audio functions through the audio module 2210, the speaker 2210A, the receiver 2210B, the microphone 2210C, the headphone interface 2210D, and the application processor, etc. For example, music playback, recording, etc.

[0174] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 22. In other embodiments of the present application, the terminal device 22 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0175] The above introduces the system structure of network connection. Figure 2A A network connection system is provided, and the following is a schematic diagram of an operation interface for a user to restore a network using a mobile terminal device provided in an embodiment of the present application.

[0176] See also Figure 3A , Figure 3A A schematic diagram of an operation interface for a user to restore a network using a mobile terminal device provided in an embodiment of the present application. The operation interface is an operation interface of a method for a user to restore a network using a mobile terminal device. The mobile terminal device can be Figure 2A The terminal device 22 in the network connection system shown, such as a mobile phone, can also be other terminal devices that have both cellular capabilities (such as using a cellular network to access the Internet) and access point capabilities (such as providing a hotspot), and the present application embodiment does not limit this. Figure 2A The terminal device 22 shown in the figure first communicates with the router (such as Figure 2A When the router 20 in the system is connected, in the user interface 31, the user clicks the setting button 301 to enter the user interface 32 of the system setting function, and the user further clicks the wireless and network 302 to enter the WLAN function page 33, and clicks the switch button 303 of the WLAN function to turn on the WLAN function, so that the Wi-Fi names provided by the nearby routing devices are displayed in the available WLAN list 304, and the user can select a router that can be connected (such as Figure 2A Click the Wi-Fi provided by the routing device 20 in the available WLAN list, click the corresponding Wi-Fi name in the available WLAN list, that is, click TP-Link001305 in the WLAN list 304, so as to indirectly control the mobile terminal device and the router (such as Figure 2A The terminal device 22 shown in the figure establishes a network connection with the router device 20). If the connection is successful, the navigation bar above the WLAN function page 33 displays a Wi-Fi icon 306 to indicate that the mobile terminal device is currently using Wi-Fi to access the Internet. Figure 2A The WAN side network connectivity abnormality of the routing device 20 in the mobile terminal device (such as Figure 2AWhen the terminal device 22 in the network is suddenly disconnected from the network, an icon 307 of abnormal Wi-Fi appears in the upper navigation bar of the user interface 34, and a prompt message 308 of "The current Wi-Fi is not available, confirm whether to switch to cellular data to continue surfing the Internet" appears in the user interface 34 to remind the user to turn on the cellular network and use the data traffic provided by the operator to surf the Internet. If the user clicks the confirmation button 309 in the prompt message 308, the user interface 35 is transferred to the operator signal icon in the navigation bar of the user interface. The icon 310 of data traffic Internet access appears to indicate that the mobile terminal device is using data traffic to surf the Internet, and the user interface 35 displays a prompt message 311 of "The currently connected router network is abnormal, confirm whether to automatically open the hotspot to restore the router network". If the user clicks the confirmation button 312 in the prompt message 311, the mobile terminal device (such as Figure 2A The terminal device 22 shown in the figure opens the hotspot, allowing the router (such as Figure 2A The router STA22 shown in the figure restores the network by connecting to the hotspot of the mobile terminal device. Figure 2A After the routing device STA22 shown in the figure successfully connects to the hotspot of the mobile terminal device and restores the Internet access function, it enters the user interface 36, and a hotspot icon 313 appears in the upper navigation bar of the user interface 36, indicating that the hotspot function of the mobile terminal device has been turned on; and a prompt message 314 of "Router network has been restored" appears in the user interface 36 to remind the user that the router has connected to the hotspot of the mobile terminal device and restored the network, so that the user can use the data traffic provided by the operator to access the Internet.

[0177] See also Figure 3B , Figure 3B Another operation interface diagram of another method for users to restore the network by using a mobile terminal device provided in the embodiment of the present application. The operation interface is another operation interface of the method for users to restore the network by using a mobile terminal device. The mobile terminal device can be as follows: Figure 2A The terminal device 22 in the network connection system shown is usually a mobile phone, but can also be other terminal devices that have both cellular capabilities (such as using a cellular network to access the Internet) and access point capabilities (such as providing a hotspot), which is not limited in this embodiment of the present application. Figure 2A The terminal device 22 shown in the figure is connected to the previously connected router (such as Figure 2A When the mobile terminal device is connected to the router 20 in the example, in the user interface 37, the user pulls down the screen to enter the user interface 38 of the pull-down notification bar 315, and the user further clicks the pull-down screen to enter the Wi-Fi icon 316 in the pull-down notification bar 315, thereby indirectly controlling the mobile terminal device and the router (such as Figure 2AThe terminal device 22 shown in the figure establishes a network connection with the router device 20). If the connection is successful, the user page 39 is entered. The navigation bar above the user page 39 displays a Wi-Fi icon 317 to indicate that the mobile terminal device is currently using Wi-Fi to access the Internet. Figure 2A The WAN side network connectivity abnormality of the routing device 20 in the mobile terminal device (such as Figure 2A When the terminal device 22 in the network is suddenly disconnected from the network, an icon 307 of abnormal Wi-Fi appears in the upper navigation bar of the user interface 34, and a prompt message 308 of "The current Wi-Fi is not available, confirm whether to switch to cellular data to continue surfing the Internet" appears in the user interface 34 to remind the user to turn on the cellular network and use the data traffic provided by the operator to surf the Internet. If the user clicks the confirmation button 309 in the prompt message 308, the user interface 35 is transferred to the operator signal icon in the navigation bar of the user interface. The icon 310 of data traffic Internet access appears to indicate that the mobile terminal device is using data traffic to surf the Internet, and the user interface 35 displays a prompt message 311 of "The currently connected router network is abnormal, confirm whether to automatically open the hotspot to restore the router network". If the user clicks the confirmation button 312 in the prompt message 311, the mobile terminal device (such as Figure 2A The terminal device 22 shown in the figure opens the hotspot, allowing the router (such as Figure 2A The router STA22 shown in the figure restores the network by connecting to the hotspot of the mobile terminal device. Figure 2A After the router STA22 shown in the figure successfully connects to the hotspot of the mobile terminal device and restores the Internet access function, it will enter the user interface 36. A hotspot icon 313 will appear in the navigation bar above the user interface 36, indicating that the hotspot function of the mobile terminal device has been turned on; and a prompt message 314 of "Router network has been restored" will appear in the user interface 36 to remind the user that the router has connected to the hotspot of the mobile terminal device and restored the network, so that the data traffic provided by the operator can be used to access the Internet. It should be noted that the above Figure 3A and Figure 3B The user interface schematic diagrams shown are all exemplary displays of the embodiments of the present application. The user interface schematic diagrams during actual operation may also be in other styles, and the embodiments of the present application are not limited to this.

[0178] based on Figure 2A The system architecture provided, and Figure 3A and Figure 3B The operation interface provided, combined with the method for restoring the network provided in this application, specifically analyzes and solves the technical problems raised in this application.

[0179] A method for restoring a network provided in an embodiment of the present application is provided in Figure 4 , Figure 4 This is a flowchart of a method for restoring a network provided in an embodiment of the present application. The method can be applied to the above Figure 2A The network connection system and the above Figure 3A and Figure 3B The operation interface mainly includes the method steps of interaction between the terminal device side and the routing device side. The method may include:

[0180] Step S401: one or more terminal devices respectively send a first message to a routing device; the routing device receives the first message respectively sent by one or more terminal devices.

[0181] Specifically, the first message includes capability information of the corresponding terminal device. Exemplarily, assuming that one or more terminal devices send a first message to a routing device respectively, the first message can be sent to the routing device by broadcasting (or other means). The first message can include capability information of the corresponding terminal device, and the capability information can be the manufacturer information of the terminal device. The identifier in the manufacturer information can indicate whether the terminal device has cellular capability and access point capability.

[0182] Optionally, the first message is one of a detection request, an authentication request, an association request, and a dynamic host configuration protocol sent by the one or more terminal devices before the one or more terminal devices are successfully connected to the routing device, or an operation frame sent by the one or more terminal devices after the one or more terminal devices are successfully connected to the routing device. The description of the detection request, authentication request, association request, and dynamic host configuration protocol in the embodiments of the present application can refer to Figure 1 The relevant steps are not repeated here. Figure 1 The difference between any one of the detection request, authentication request, association request, and dynamic host configuration protocol is that the first message in the embodiment of the present application can be any one of the detection request, authentication request, association request, and dynamic host configuration protocol that carries the capability information of the terminal device and is sent by the terminal device when the terminal device and the routing device have not yet established a connection; if the above detection request, authentication request, association request, and dynamic host configuration protocol do not carry the capability information of the terminal device, after the terminal device and the routing device have established a network connection, an operation frame (such as an action frame) carrying the capability information of the terminal device can also be sent to the routing device as the first message to indicate whether the terminal device has cellular capability and access point capability, so that the routing device can start the cellular capability and access point capability according to its relevant parameters by parsing the operation frame. Among them, the detection request, authentication request, association request, dynamic host configuration protocol and / or operation frame can be sent by the terminal device to the nearby routing device by broadcasting, or in other ways, and the embodiment of the present application does not specifically limit this.

[0183] Step S402: The routing device identifies whether the capability information of each terminal device meets the target capability.

[0184] Specifically, the target capability includes cellular capability and access point capability. In some embodiments, cellular capability is used to connect to a cellular network (e.g., surfing the Internet through a cellular network), and access point capability is used to create a wireless network access point (e.g., opening a hotspot). The routing device can determine whether the corresponding terminal device meets the target capability by identifying the first message sent by each terminal device, such as identifying the manufacturer information of the corresponding terminal device carried in the first message.

[0185] Furthermore, since cellular capabilities are used to connect to cellular networks and access point capabilities are used to create wireless network access points, and target capabilities may include cellular capabilities and access point capabilities, it is possible to identify whether the capability information of each terminal device meets the target capabilities, that is, to identify whether each terminal device can connect to a cellular network (for example, access the Internet through a cellular network) and at the same time have the ability to create a wireless network access point (for example, a hotspot function), so that other devices can achieve network communication and data transmission by connecting to the wireless network access point it creates.

[0186] Step S403: The routing device determines the terminal devices whose capability information in the one or more terminal devices meets the target capability and which are successfully connected to the routing device as target terminal devices.

[0187] Specifically, after one or more terminal devices successfully establish a network connection with the routing device, the routing device determines, based on the first information sent by the one or more terminal devices, the terminal devices that meet the target capabilities, that is, the terminal devices that can connect to the cellular network and create wireless network access points, as target terminal devices, so that when the routing device is suddenly disconnected from the network due to abnormal network connectivity on the wide area network side of the routing device, information can be sent to the target terminal device in a targeted manner.

[0188] Step S404: When a network connectivity anomaly occurs on the wide area network side of the routing device, the routing device sends a second message to the target terminal device; the target terminal device receives the second message sent by the routing device.

[0189] Specifically, the second message is used to instruct the target terminal device to start the target capability, and the target capability includes cellular capability and access point capability. In some embodiments, when a terminal device connected to the routing device is suddenly disconnected from the network due to abnormal network connectivity on the wide area network side of the routing device, the routing device sends a second message to the target terminal device determined above. For example, the second message can be an action frame, which is sent to the target terminal device by broadcasting or other means to instruct the target terminal device to start the target capability. In addition, the routing device can also send its own service set identifier SSID, password, encryption method and other network security information to the target terminal device through the second message, so that the routing device can establish a network connection with the target terminal device. The embodiments of the present application do not specifically limit this.

[0190] Optionally, in a possible implementation, when the routing device determines that there is only one target terminal device, the routing device sends a second message (e.g., an action frame) to the target terminal device, which is used to instruct the target terminal device to enable the target capability, so that the target terminal device receives the second message. Exemplarily, the action frame can be parsed to enable the target capability according to its relevant parameters (e.g., network security information such as service set identifier SSID, password, and encryption method), such as surfing the Internet through a cellular network and turning on the hotspot function, thereby allowing the routing device to connect to restore the network.

[0191] In another possible implementation, when there are multiple target terminal devices determined by the routing device, the routing device sends a second message (e.g., an action frame) to the first target terminal device for instructing the target terminal device to enable the target capability, and the first target terminal device is the target terminal device that is closest to the routing device and / or has the best connection performance. The first target terminal device receives the second message, and exemplarily, can parse the second message (e.g., an action frame) and enable the target capability according to its related parameters (e.g., network security information such as a service set identifier SSID, a password, and an encryption method), such as surfing the Internet through a cellular network, and turning on the hotspot function, thereby allowing the routing device to connect to restore the network.

[0192] Step S405: The target terminal device activates the target capability based on the second message.

[0193] Specifically, the target terminal device activates the target capability according to the second message sent by the received routing device. For example, when the second message is an action frame, the target terminal device parses the second message (e.g., action frame) and activates the target capability according to its relevant parameters (e.g., network security information such as service set identifier SSID, password, and encryption method), such as surfing the Internet through a cellular network and turning on the hotspot function, thereby allowing the routing device to connect to restore the network. Accordingly, in one possible implementation, when there is only one target terminal device determined by the routing device, the target terminal device activates the target capability (e.g., surfing the Internet through a cellular network and turning on the hotspot function); in another possible implementation, when there are multiple target terminal devices determined by the routing device, the first target terminal device that is closest to the routing device and / or has the best connection performance activates the target capability (e.g., surfing the Internet through a cellular network and turning on the hotspot function), thereby allowing the routing device to connect to restore the network.

[0194] Step S406: If the target terminal device activates the target capability, the routing device connects to the target terminal device.

[0195] Specifically, when the target terminal device activates the target capability, that is, connects to the cellular network and creates a wireless network access point (for example, accesses the Internet through the cellular network and turns on the hotspot function), the routing device can establish a network connection with the target terminal device by accessing the wireless network access point (for example, a hotspot), thereby using its target capability to enable other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capabilities and / or access point capabilities, or target terminal devices that have not turned on the target capability) to restore the network, so that users can normally use the services provided by the terminal device when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0196] Optionally, in a possible implementation, when the routing device determines that there is only one target terminal device, if the target terminal device activates the target capability (for example, accessing the Internet through a cellular network and turning on the hotspot function), the routing device connects to the target terminal device by accessing the wireless network access point (for example, a hotspot) created by the target terminal device to restore its own network, so that other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capabilities and / or access point capabilities, or terminal devices that do not have target capabilities activated) can also restore Internet access capabilities for normal use by users, thereby reducing the inconvenience caused to users by sudden network disconnection, thereby improving the user experience.

[0197] In another possible implementation, when the number of target terminal devices determined by the routing device is multiple, the routing device sends a second message (e.g., an action frame) to the first target terminal device for instructing the target terminal device to enable the target capability, and the first target terminal device is the target terminal device that is closest to the routing device and / or has the best connection performance; further, if the target terminal device enables the target capability (e.g., accessing the Internet through a cellular network and turning on the hotspot function), the routing device connects to the first target terminal device by accessing the wireless network access point (e.g., a hotspot) created with the first target terminal device to restore its own network, so that other terminal devices connected to the routing device (e.g., terminal devices that do not have cellular capabilities and / or access point capabilities, or target terminal devices that have not enabled the target capabilities) can also restore Internet access capabilities for normal use by users, thereby reducing the inconvenience caused to users by sudden network disconnection, thereby improving the user experience.

[0198] See also Figure 5 , Figure 5 A flowchart of another method for restoring a network provided in an embodiment of the present application is shown, and the method can also be applied to the above Figure 2A The network connection system and the above Figure 3A and Figure 3B The operation interface mainly includes the method steps of interaction between the terminal device side and the routing device side, which includes but is not limited to the following steps:

[0199] Step S501: one or more terminal devices send a first message to a routing device; the routing device receives the first messages sent by one or more terminal devices respectively.

[0200] The first message includes the capability information of the corresponding terminal device. For a detailed description of the routing device sending the first message, please refer to the above Figure 4 The relevant description of step S401 of the method will not be repeated here.

[0201] Step S502: The routing device identifies whether the capability information of each terminal device meets the target capability.

[0202] The target capability includes cellular capability and access point capability. For a detailed description of cellular capability and access point capability, as well as the capability information of the routing device to identify the terminal device, please refer to the above Figure 4 The relevant description of step S402 of the method will not be repeated here.

[0203] Step S503: the routing device determines the terminal devices whose capability information in the one or more terminal devices meets the target capability and which are successfully connected to the routing device as target terminal devices.

[0204] Specifically, the description of how the routing device determines the target terminal device can be found in the above Figure 4 The relevant description of step S403 in the method is not repeated here.

[0205] Step S504: The routing device records the network address of the target terminal device.

[0206] Specifically, the network address includes a media access control address and / or a network protocol address, and the routing device records the network address of the target terminal device based on the determined target terminal device. Exemplarily, the routing device can record the media access control address (e.g., MAC address) and / or network protocol address (e.g., IP address) of the target terminal device, so that when a network connectivity anomaly occurs on the wide area network side of the routing device, a second message (e.g., an action frame) can be sent to the target terminal device through the network address to instruct the target terminal device to start the target capability.

[0207] Step S505: The routing device periodically detects the network connectivity of the WAN side of the routing device; or, when a network anomaly occurs in at least one terminal device that is successfully connected to the routing device, the routing device detects the network connectivity of the WAN side of the routing device.

[0208] Specifically, the routing device may periodically perform a network connectivity check on the WAN side of the routing device, for example, triggering a check once every minute, and the specific detection period may vary accordingly with the sensitivity of the routing device to network anomalies; or when at least one terminal device that has successfully connected to the routing device has a network anomaly, such as a service anomaly or an inability to access the Internet, the routing device may be triggered to perform a network connectivity check on the WAN side, thereby promptly detecting whether a network connectivity anomaly occurs on the WAN side of the routing device, so as to notify the target terminal device as quickly as possible to start the target capability to restore the network communication of the terminal device.

[0209] Further, in a possible implementation, the routing device can detect whether the routing device has downlink data transmission (i.e., whether there is data transmission between the routing device and the server on the wide area network side). If yes, it determines that the network connectivity of the wide area network side (WAN port) is normal; if not, it sends a network detection request to the wide area network side, and the network detection request is used to request a network connectivity test; illustratively, the routing device sends a network detection data packet (Ping packet) through a Ping command, or sends an address resolution protocol packet (ARP packet) through an address resolution protocol (ARP) to request a network connectivity test to the wide area network side inside the routing device. If the routing device receives a response to the network detection request, it determines that the network connectivity of its wide area network side is normal; if no response to the network detection request is received, it determines that the network connectivity of its wide area network side is abnormal. Optionally, when the routing device detects whether the network connectivity of its internal wide area network side is normal, it can also detect the network connectivity of its wireless interface side (air interface) at the same time. Exemplarily, the routing device can detect whether one or more terminal devices connected to it have data generated; if so, it determines that the network connectivity of the wireless interface side of the routing device is normal; if not, it sends an empty data packet; if the routing device receives a response to the empty data packet, it determines that the network connectivity of its wireless interface side (air interface) is normal; or, if no response to the empty data packet is received, it determines that the network connectivity of its wireless interface side (air interface) is abnormal, and the abnormal air interface network connectivity can be indicated by lighting up an indicator light or the like. Through the embodiments of the present application, the routing device can detect whether the network connectivity of its internal wide area network side (WAN port) is abnormal, so as to restore network communication by activating the target capability through the target terminal device.

[0210] Step S506: When a network connectivity anomaly occurs on the wide area network side of the routing device, the routing device sends a second message to the target terminal device via the network address, wherein the second message is used to instruct the target terminal device to activate the target capability; the target terminal device receives the second message sent by the routing device.

[0211] Specifically, when the routing device detects that the network connectivity on its wide area network side is abnormal, the routing device can send a second message to the target terminal device to instruct the target terminal device to start the target capability through the recorded network address of the target terminal device. In some embodiments, in the case where the terminal device connected to the routing device is suddenly disconnected from the network due to abnormal network connectivity on the wide area network side of the routing device, the routing device can send a second message to the target terminal device through the network address of the target terminal device recorded above, and the network address may include a media access control address (such as a MAC address) and / or an Internet protocol address (IP address). Exemplarily, the second message can be an action frame, which is sent to the target terminal device by broadcasting or other means to instruct the target terminal device to start the target capability. In addition, the routing device can also send its own service set identifier SSID, password, encryption method and other network security information to the target terminal device through the second message, so that the routing device can establish a network connection with the target terminal device. The embodiments of the present application do not specifically limit this.

[0212] In a possible implementation, when the routing device determines that there is only one target terminal device, the routing device can determine the forwarding path of the routing device based on the recorded network address of the target terminal (such as the MAC address and / or IP address), and thereby send a second message (such as an action frame) to the target terminal device to instruct the target terminal device to enable the target capability, usually through broadcasting (it can also be other methods, which are not specifically limited in the embodiments of the present application), so that the target terminal device can receive the second message. Exemplarily, the target capability can be enabled by parsing the second message (such as the action frame) according to its relevant parameters (such as the service set identifier SSID, password, encryption method and other network security information), such as surfing the Internet through a cellular network, and turning on the hotspot function to allow the routing device to connect to restore the network.

[0213] In another possible implementation, when there are multiple target terminal devices determined by the routing device, the routing device can determine the forwarding path of the routing device according to the recorded network address of the first target terminal (such as MAC address and / or IP address), thereby sending a second message (such as an action frame) to the first target terminal device to instruct the target terminal device to enable the target capability. The first target terminal device is the target terminal device that is closest to the routing device and / or has the best connection performance. Usually, the routing device sends the above-mentioned second message (such as an action frame) to the target terminal device by broadcasting (or other methods, which are not specifically limited in the embodiments of the present application). The first target terminal device receives the second message and, exemplarily, can parse the action frame and enable the target capability according to its relevant parameters (such as network security information such as service set identifier SSID, password, and encryption method), such as surfing the Internet through a cellular network, and turning on the hotspot function, thereby allowing the routing device to connect to restore the network.

[0214] Step S507: The target terminal device activates the target capability based on the second message.

[0215] Specifically, the target terminal device starts the target capability according to the received second message sent by the routing device. Figure 4 The relevant description of step S405 in the method will not be repeated here.

[0216] Step S508: If the target terminal device activates the target capability, the routing device connects to the target terminal device.

[0217] Specifically, when the target terminal device starts the target capability, the routing device connects to the target terminal device. Figure 4 The relevant description of step S406 in the method will not be repeated here.

[0218] In one possible implementation, see Figure 6 , Figure 6An example flow chart of a method for restoring a network in a network connection system provided in an embodiment of the present application. The network connection system is composed of a router 60 and two terminal devices STA61 and STA62, wherein the terminal device STA61 is a terminal device with both cellular capability and access point capability (such as a mobile phone), and the terminal device STA62 is a terminal device without cellular capability and / or access point capability (such as a smart home appliance). It can be understood that the embodiment of the present application is only a specific implementation method of the method for restoring a network in the network connection system, and does not constitute a specific limitation on the above-mentioned network connection system and / or the method for restoring a network. In other embodiments of the present application, the network connection system may include more or fewer components than the embodiment of the present application, or combine certain components, or split certain components, or arrange the components differently; the method for restoring a network may include but is not limited to the following steps.

[0219] First, when a network connection is established between the terminal device STA61 and the router 60, the following steps may be included:

[0220] Step S601: the terminal device STA61 sends a probe request (Probe req) to the router 60; the router 60 receives the probe request sent by the terminal device STA61.

[0221] Specifically, the detection request may include capability information of the terminal device STA61, which is used to indicate whether the terminal device STA61 has cellular capability and access point capability. For example, the detection request may carry the manufacturer information of the terminal device STA61, so that the router 60 can identify whether the terminal device STA61 has cellular capability and access point capability through the identifier in the manufacturer information. In addition, the detection request may also generally include identification information of the terminal device STA61, generally a MAC address, and other related parameters and identifiers, which may be used to detect nearby available wireless network access points.

[0222] Step S602 : the router 60 sends a probe response (Probe rsp) to the terminal device STA61 , and the terminal device STA61 receives the probe response sent by the router 60 .

[0223] Step S603: the terminal device STA61 sends an authentication request (Auth Req) to the router 60, and the router 60 receives the authentication request sent by the terminal device STA61.

[0224] Step S604 : the router 60 sends an authentication response (Auth Rsp) to the terminal device STA61 ; the terminal device STA61 receives the authentication response sent by the router 60 .

[0225] Step S605: the terminal device STA61 sends an association request (Assoc Req) to the router 60; the router 60 receives the association request sent by the terminal device STA61.

[0226] Step S606 : the router 60 sends an association response (Assoc Rsp) to the terminal device STA61 ; the terminal device STA61 receives the association response sent by the router 11 .

[0227] Step S607 : the terminal device STA61 sends a first handshake message (MSG1) to the router 60 ; the terminal device STA61 receives the first handshake message (MSG1) sent by the router 60 .

[0228] Step S608 : In response to the first handshake message ( MSG1 ) sent by the router 60 , the terminal device STA61 sends a second handshake message ( MSG2 ) to the router 60 ; the terminal device STA61 receives the second handshake message ( MSG2 ) sent by the router 60 .

[0229] Step S609 : in response to the second handshake message (MSG2) sent by the terminal device STA61, the router 60 sends a third handshake message (MSG3) to the terminal device STA61; the terminal device STA61 receives the third handshake message (MSG3) sent by the router 60.

[0230] Step S610 : In response to the third handshake message (MSG3) sent by the router 60 , the terminal device STA61 sends a fourth handshake message (MSG4) to the router 60 ; the terminal device STA61 receives the fourth handshake message (MSG4) sent by the router 60 .

[0231] Step S611: A Dynamic Host Configuration Protocol (DHCP) process is performed between the terminal device STA61 and the router 60.

[0232] Step S612: Identify whether the terminal device STA61 has cellular capability and access point capability.

[0233] Step S613: If the terminal device STA61 has cellular capability and access point capability, the terminal device STA61 is determined as the target terminal device.

[0234] Optionally, the router 60 may record the network address of the target terminal device STA61. Specifically, the network address includes a media access control address and / or a network protocol address, such as a MAC address and / or an IP address. For information about the network address of the target terminal device STA61 recorded by the router 60, see the above Figure 5 The relevant description of step S504 in will not be repeated here.

[0235] It should be noted that the embodiment of the present application is a specific step for establishing a network connection between the terminal device STA61 and the router 60 when the detection request can carry the capability information of the terminal device STA61. In other possible embodiments, the capability information of the terminal device STA61 can also be carried in one of the authentication request, association request, and dynamic host configuration protocol (DHCP) sent by the terminal device STA61. The embodiment of the present application will not be repeated. For the specific description of steps S602-S611 in the embodiment of the present application (including other normal access processes other than the detection request, such as authentication request, association request, four-way handshake process, DHCP process, etc.), please refer to Figure 1 The relevant description of steps S102-S111; the specific description of steps S612-S613 can be found in Figure 5 The relevant description of steps S502-S503. In addition, in the embodiment of the present application, the above steps S601-S613 are the normal access process between the terminal device STA61 and the router 60. Accordingly, the specific steps S614-S626 for establishing a network connection between the terminal device STA62 and the router 60 are similar to the steps S601-S613 for establishing a network connection between the terminal device STA61 and the router 60. Please refer to the relevant description of the above steps S601-S613, which will not be repeated here. In addition, there is no clear order between the steps of the terminal device STA61 and the terminal device STA62 respectively establishing a network connection with the router 60, that is, steps S601-S613 can be executed synchronously with steps S614-S626, or before or after steps S614-S626. The embodiment of the present application does not specifically limit this.

[0236] Furthermore, after the terminal device STA61 and the terminal device STA62 respectively complete the establishment of network connections with the router 60, step S627: the router 60 confirms whether the network is correctly connected by detecting its internal WAN port.

[0237] Specifically, the router 60 can periodically perform network connectivity detection on its own WAN port; or when at least one terminal device successfully connected to the router has a network anomaly, the router can be triggered to perform network connectivity detection on the WAN port, thereby timely detecting whether the WAN port of the router 60 has a network connectivity anomaly, so as to notify the target terminal device (terminal device STA61) as soon as possible to start the target capability to restore the network communication of the terminal device STA62. Among them, the specific method for the router 60 to detect the network connectivity of the WAN port can be referred to the above Figure 5 The relevant description of step S505 is not repeated here.

[0238] Step S628A: If the router 60 detects that the WAN port is abnormal, the router 60 sends an action frame to the target terminal device to notify the terminal device STA61 to start the emergency hotspot.

[0239] Step S628B: If the router 60 detects that the WAN port is abnormal, the terminal device STA62 cannot access the Internet and waits for the router 60 to recover. If the network of the router 60 recovers, it directly proceeds to step S632.

[0240] Specifically, since the terminal device STA61 is determined as the target terminal device, when the router 60 detects that the network connectivity of its internal WAN port is abnormal, an action frame can be sent to the target terminal device (terminal device STA61), and the action frame may include network security information such as the service set identifier SSID, password, and encryption method, which is used to instruct the target terminal device STA61 to use the cellular network to access the Internet and turn on the hotspot capability. However, since the terminal device STA62 does not have cellular capabilities and / or access point capabilities, it cannot access the Internet when the router 60 detects that the network connectivity of its internal WAN port is abnormal, and can only wait for the router 60 to recover. It can be understood that step S628A and step S628B occur almost simultaneously after the router 60 sends the WAN port network connectivity abnormality, and there is no order between the two.

[0241] Step S629: The target terminal device (terminal device STA61) parses the action frame, and based on relevant parameters, accesses the Internet through the cellular network, and simultaneously activates the hotspot capability to provide a wireless network access point (AP) for the router 60.

[0242] Specifically, the target terminal device (terminal device STA61) can parse the action frame and, based on its relevant parameters, activate its own cellular network capability to access the Internet and turn on the hotspot function to provide a wireless network access point (AP) for the router 60.

[0243] Step S630: The router 60 accesses the wireless network access point (AP) provided by the target terminal device (terminal device STA61).

[0244] Specifically, the router 60 establishes a network connection with the terminal device STA61 by accessing the wireless network access point (AP) so as to restore the Internet access capability of the router 60.

[0245] Step S631: The router 60 restores Internet access capability through the terminal device STA61.

[0246] Specifically, the router 60 restores the Internet access capability by connecting to the hotspot of the terminal device STA61.

[0247] Step S632: The Internet access capability of the terminal device STA62 is restored, and the terminal device STA62 is not aware of the entire recovery process.

[0248] Specifically, since the router 60 restores its Internet access capability, the Internet access capability of the terminal device STA62 connected to the router 60 is also restored, and the wireless network access point (AP) of the connected router 60 remains unchanged. The terminal device STA62 will not perceive the entire recovery process. Therefore, when a network anomaly on the wide area network side of the routing device causes a sudden network disconnection, the network of the terminal device can be quickly restored to continue to provide services to the user, thereby improving the user experience.

[0249] The above describes in detail the method of the embodiment of the present application. The following describes the device provided by the embodiment of the present application.

[0250] See also Figure 7 , Figure 7 Schematic diagram of a routing device provided in an embodiment of the present application. The routing device 700 may include a first receiving unit 701, an identifying unit 702, a determining unit 703, a first sending unit 704 and a first connecting unit 705, wherein each unit is described in detail as follows.

[0251] The first receiving unit 701 is used to receive a first message sent by one or more terminal devices respectively; the first message includes capability information of the corresponding terminal device;

[0252] An identification unit 702 is used to identify whether the capability information of each terminal device meets the target capability, where the target capability includes cellular capability and access point capability;

[0253] A determining unit 703 is configured to determine the terminal devices whose capability information in the one or more terminal devices meets the target capability and are successfully connected as target terminal devices;

[0254] The first sending unit 704 is used to send a second message to the target terminal device when a network abnormality occurs on the wide area network side of the routing device, wherein the second message is used to instruct the target terminal device to start the target capability;

[0255] The first connecting unit 705 is configured to connect to the target terminal device if the target terminal device activates the target capability.

[0256] In the embodiment of the present application, in the routing device, a first receiving unit 701 receives a first message sent by one or more terminal devices respectively, and the first message may include capability information of the corresponding terminal device; the identification unit 702 identifies whether the capability information of each terminal device meets the target capability based on the first message, and the target capability includes cellular capability and access point capability; then the terminal device whose capability information in one or more terminal devices meets the target capability and is successfully connected is determined as the target terminal device by the determination unit 703; when a network abnormality occurs on the wide area network side of the routing device, a second message is sent to the target terminal device by the first sending unit 704, and the second message may be used to instruct the target terminal device to start the target capability; if the target terminal device starts the target capability, the routing device may connect to the target terminal device through the first connecting unit 705, so that the routing device can use the target capability of the target terminal device to restore the Internet access capability, so that other terminal devices connected to the routing device (for example, terminal devices without cellular capability and / or access point capability, or target terminal devices without the target capability turned on) can restore the network, so that the user can still use the services provided by the terminal device normally when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0257] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the one or more terminal devices before the one or more terminal devices are successfully connected to the routing device, or is an operation frame sent by the one or more terminal devices after the one or more terminal devices are successfully connected to the routing device.

[0258] In a possible implementation manner, the routing device further includes:

[0259] The second connection unit is used to establish a network connection between the routing device and the corresponding terminal device based on the detection request, the authentication request, the association request and the dynamic host configuration protocol.

[0260] In a possible implementation, the cellular capability is used to connect to a cellular network; the access point capability is used to create a wireless network access point; and the initiating the target capability includes connecting to a cellular network and creating a wireless network access point.

[0261] In a possible implementation manner, the routing device further includes:

[0262] The recording unit is used to record the network address of the target terminal device, where the network address includes a media access control address and / or a network protocol address.

[0263] In a possible implementation manner, the routing device further includes:

[0264] A detection unit is used to periodically detect the network connectivity of the wide area network side of the routing device; or, when a network anomaly occurs in at least one terminal device that is successfully connected to the routing device, detect the network connectivity of the wide area network side of the routing device.

[0265] In a possible implementation, the detection unit is specifically configured to:

[0266] Detecting whether the routing device has downlink data transmission, and if so, determining that the network connectivity on the wide area network side is normal;

[0267] If not, sending a network detection request to the wide area network side, wherein the network detection request is used to request a network connectivity test;

[0268] If a response to the network detection request is received, it is determined that the network connectivity on the wide area network side is normal;

[0269] If no response to the network detection request is received, it is determined that the network connectivity on the wide area network side is abnormal.

[0270] In a possible implementation manner, the first sending unit 704 is specifically configured to:

[0271] When the number of the target terminal device is 1, sending the second message to the target terminal device;

[0272] The first connection unit 705 is specifically used for:

[0273] Access the wireless network access point created by the target terminal device.

[0274] In a possible implementation manner, the first sending unit 704 is specifically configured to:

[0275] When there are multiple target terminal devices, sending the second message to a first target terminal device, where the first target terminal device is a target terminal device that is closest to the routing device and / or has the best connection performance;

[0276] The first connection unit 705 is specifically used for:

[0277] Access the wireless network access point created by the first target terminal device.

[0278] It should be noted that the functions of the various units in the routing device 700 described in the embodiment of the present application can be referred to in the above Figure 4 The method and Figure 5 The relevant description of the method will not be repeated here.

[0279] See also Figure 8 , Figure 8 800 is a schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 800 may include a second sending unit 801, a second receiving unit 802, and a starting unit 803, wherein each unit is described in detail as follows.

[0280] The second sending unit 801 is used to send a first message to the routing device; the first message includes the capability information of the terminal device;

[0281] The second receiving unit 802 is used to receive a second message sent by the routing device if the capability information of the terminal device meets the target capability and the preset condition is met; the second message is used to instruct the terminal device to start the target capability; the target capability includes cellular capability and access point capability;

[0282] The starting unit 803 is used to start the target capability based on the second message.

[0283] In an embodiment of the present application, the terminal device can send a first message to the routing device through the second sending unit 801, and the first message may include capability information of the terminal device; if the capability information of the terminal device meets the target capability and meets the preset conditions, the terminal device can receive the second message sent by the routing device through the second receiving unit 802, and the second message can be used to instruct the terminal device to start the target capability, wherein the target capability includes cellular capability and access point capability; finally, the terminal device starts the target capability through the starting unit 803 based on the received second message, so that the routing device can establish a network connection with the terminal device, thereby using the target capability of the target terminal device to restore the Internet access capability of the routing device. At the same time, other terminal devices connected to the routing device (for example, terminal devices that do not have cellular capability and / or access point capability, or terminal devices that have not enabled the target capability, etc.) can also restore the network, so that the terminal device can still provide services to the user normally when the routing device is suddenly disconnected from the network, thereby improving the user experience.

[0284] In a possible implementation, the first message is one of a probe request, an authentication request, an association request, and a dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or is an operation frame sent by the terminal device after the terminal device is successfully connected to the routing device.

[0285] In a possible implementation manner, the terminal device further includes:

[0286] The third connection unit is used to establish a network connection with the routing device based on the response of the routing device to the detection request, the authentication request, the association request and the dynamic host configuration protocol.

[0287] In a possible implementation, the preset condition includes: the terminal device is successfully connected to the routing device, and a network abnormality occurs on the wide area network side of the routing device.

[0288] In a possible implementation manner, the preset condition further includes: the terminal device is a terminal device that is closest to the routing device and / or has the best connection performance.

[0289] In a possible implementation, the cellular capability is used to connect to a cellular network; the access point capability is used to create a wireless network access point; and the initiating the target capability includes connecting to a cellular network and creating a wireless network access point.

[0290] It should be noted that the functions of the various units in the terminal device 800 described in the embodiment of the present application can be referred to in the above Figure 4 The method embodiments and Figure 5 The relevant description of the method embodiment is not repeated here.

[0291] See also Fig. 9 , Fig. 9 It is a structural diagram of another routing device provided in an embodiment of the present application. For example, the routing device 900 includes at least one processor 901 and a memory 902. Among them, the processor 901 is coupled to the memory 902, and the coupling in the embodiment of the present application can be a communication connection, can be electrical, or other forms. Specifically, the memory 902 is used to store program instructions. The processor 901 is used to call the program instructions stored in the memory 902, so that the routing device 900 executes the steps performed by the routing device 900 in the method for restoring the network provided in an embodiment of the present application. The description of the relevant steps can be referred to above and will not be repeated here.

[0292] It should be noted that a routing device 900 provided in an embodiment of the present application may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or any combination of software and hardware.

[0293] See also Fig.10 , Fig.10 is a schematic diagram of the structure of another terminal device provided in an embodiment of the present application. Fig.10As shown, the terminal device 1000 includes at least one processor 1001 and a memory 1002. The processor 1001 is coupled to the memory 1002, and the coupling in the embodiment of the present application may be a communication connection, an electrical connection, or other forms. Specifically, the memory 1002 is used to store program instructions. The processor 1001 is used to call the program instructions stored in the memory 1002 so that the terminal device 1000 executes the steps performed by the terminal device 1000 in the method for restoring the network provided in the embodiment of the present application. The description of the relevant steps can be referred to above and will not be repeated here.

[0294] It should be noted that a terminal device provided in an embodiment of the present application may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange components differently. The components shown in the figure may be implemented in hardware, software, or any combination of software and hardware.

[0295] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is executed by the processor of the above-mentioned routing device to implement the steps performed by the routing device in the method for restoring a network provided in the above-mentioned embodiment of the present application; or the computer program is executed by the processor of the above-mentioned terminal device to implement the steps performed by the terminal device in the method for restoring a network provided in the above-mentioned embodiment of the present application.

[0296] An embodiment of the present application provides a computer program, which includes instructions. The computer program is executed by the above-mentioned routing device processor to implement the steps performed by the routing device in the method for restoring a network provided in the above-mentioned embodiment of the present application; or the computer program is executed by the above-mentioned terminal device processor to implement the steps performed by the terminal device in the method for restoring a network provided in the above-mentioned embodiment of the present application.

[0297] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0298] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, some steps may be performed in other orders or simultaneously, or some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application. It should also be noted that the features and functions of two or more devices disclosed in the present invention can be concretized in one device. Conversely, the features and functions of a device described above can be further divided into being concretized by multiple devices.

[0299] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the present application is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. 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 includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0300] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0301] In short, the above description is only an embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in the protection scope of this application.

Claims

1. A method for restoring a network, characterized in that: Applied to a routing device, the method comprises: Receiving first messages respectively sent by one or more terminal devices, wherein the first messages include capability information of corresponding terminal devices; Identify whether the capability information of each terminal device meets the target capability, wherein the target capability includes cellular capability and access point capability; Determine the terminal device whose capability information in the one or more terminal devices meets the target capability and is successfully connected to the routing device as the target terminal device; When a network connectivity anomaly occurs on the wide area network side of the routing device, sending a second message to the target terminal device, wherein the second message is used to instruct the target terminal device to activate the target capability; If the target terminal device enables the target capability, the target terminal device is connected.

2. The method according to claim 1, characterized in that: The first message is one of a detection request, an authentication request, an association request, and a dynamic host configuration protocol sent before the one or more terminal devices are successfully connected to the routing device, or is an operation frame sent after the one or more terminal devices are successfully connected to the routing device.

3. The method according to claim 2, characterized in that The method further comprises: Based on the detection request, the authentication request, the association request and the dynamic host configuration protocol, a network connection is established between the routing device and the corresponding terminal device.

4. The method according to any one of claims 1 to 3, characterized in that: The cellular capability is used to connect to a cellular network; and the access point capability is used to create a wireless network access point.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The network address of the target terminal device is recorded, where the network address includes a media access control address and / or a network protocol address.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Periodically detect the network connectivity of the WAN side of the routing device; or, when a network anomaly occurs in at least one terminal device that is successfully connected to the routing device, detect the network connectivity of the WAN side of the routing device.

7. The method according to claim 6, characterized in that The detecting the network connectivity of the wide area network side of the routing device includes: Detecting whether the routing device has downlink data transmission, and if so, determining that the network connectivity on the wide area network side is normal; If not, sending a network detection request to the wide area network side, wherein the network detection request is used to request a network connectivity test; If a response to the network detection request is received, it is determined that the network connectivity on the wide area network side is normal; If no response to the network detection request is received, it is determined that the network connectivity on the wide area network side is abnormal.

8. The method according to any one of claims 1 to 7, characterized in that: The sending a second message to the target terminal device includes: When the number of the target terminal device is 1, sending the second message to the target terminal device; The connecting to the target terminal device includes: Access the wireless network access point created by the target terminal device.

9. The method according to any one of claims 1 to 7, characterized in that: The sending a second message to the target terminal device includes: When there are multiple target terminal devices, sending the second message to a first target terminal device, where the first target terminal device is a target terminal device that is closest to the routing device and / or has the best connection performance; The connecting to the target terminal device includes: Access the wireless network access point created by the first target terminal device.

10. A method for restoring a network, characterized in that: Applied to a terminal device, the method comprises: Sending a first message to a routing device, where the first message includes capability information of the terminal device; If the capability information of the terminal device meets the target capability and the preset conditions are met, receiving a second message sent by the routing device; the second message is used to instruct the terminal device to start the target capability; the target capability includes cellular capability and access point capability; Based on the second message, the target capability is enabled.

11. The method according to claim 10, characterized in that The first message is one of a detection request, an authentication request, an association request, and a dynamic host configuration protocol sent by the terminal device before the terminal device is successfully connected to the routing device, or is an operation frame sent by the terminal device after the terminal device is successfully connected to the routing device.

12. The method according to claim 11, characterized in that The method further comprises: A network connection is established with the routing device based on the routing device's response to the probe request, the authentication request, the association request, and the dynamic host configuration protocol.

13. The method according to any one of claims 10 to 12, characterized in that: The preset conditions include: the terminal device is successfully connected to the routing device, and a network anomaly occurs on the wide area network side of the routing device.

14. The method according to any one of claims 10 to 13, characterized in that: The preset condition also includes: the terminal device is the terminal device that is closest to the routing device and / or has the best connection performance.

15. The method according to any one of claims 10 to 14, characterized in that: The cellular capability is used to connect to a cellular network; and the access point capability is used to create a wireless network access point.

16. A routing device, characterized in that: include: A receiving unit, configured to receive a first message respectively sent by one or more terminal devices; The first message includes capability information of the corresponding terminal device; An identification unit, which identifies whether the capability information of each terminal device meets the target capability, wherein the target capability includes a cellular capability and an access point capability; A determining unit, configured to determine the terminal device whose capability information in the one or more terminal devices meets the target capability and the terminal device that is successfully connected as the target terminal device; A sending unit, configured to send a second message to the target terminal device when a network anomaly occurs on the wide area network side of the routing device; the second message is used to instruct the target terminal device to activate the target capability; A connecting unit is used to connect to the target terminal device if the target terminal device activates the target capability.

17. A terminal device, characterized in that: include: A sending unit, configured to send a first message to a routing device; The first message includes capability information of the terminal device; A receiving unit, configured to receive a second message sent by the routing device if the capability information of the terminal device meets the target capability and a preset condition is met; The second message is used to instruct the terminal device to enable the target capability; The target capabilities include cellular capabilities and access point capabilities; A starting unit is used to start the target capability based on the second message.

18. A routing device, characterized in that: The routing device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the routing device executes the method according to any one of claims 1 to 9.

19. A terminal device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal device executes the method according to any one of claims 10 to 15.

20. A computer storable medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method according to any one of claims 1 to 9, or to implement the method according to any one of claims 10 to 15.

21. A computer program, characterized in that The computer program comprises instructions, and the computer program is executed by a computing device to implement the method according to any one of claims 1 to 9, or to implement the method according to any one of claims 10 to 15.

Citation Information

Patent Citations

  • Management method of router, router and mobile terminal

    CN106487584A

  • Communication method and device

    CN113228730A

  • Network control method and device and electronic equipment

    CN114258037A

  • Packing devices that can save time on meat packaging

    KR1020230010907A

  • Intelligent Message Routing And Delivery In A Telecommunications Network

    US20130110942A1