Switching method and switching device of Internet access mode of gateway device
By obtaining the DNS detection domain name and IP protocol online detection, the problem of difficulty in determining the EWAN connection status in the prior art is solved, and the intelligent Internet access mode switching of gateway devices is realized to ensure the network continuity of the terminal user equipment.
Patent Information
- Application Number
- CN202111489272.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The prior art is difficult to accurately determine whether the EWAN connection in each situation is online, resulting in the inability of end users to switch to the Internet mode in time, affecting network continuity, especially in the case of IPV6 connections.
By obtaining the predefined DNS detection domain name, using the DNS server to query whether there is a connection, combining the online detection of the IP protocol, determine the EWAN connection status, and switch to LTE mode when the connection is offline, realizing intelligent switching.
Effectively determine whether the EWAN connection is online, ensure that the switch to LTE mode when the connection is offline, ensure the network continuity of the terminal user equipment, and solve the problem that it is difficult to accurately judge the EWAN connection status in the prior art.
Smart Images

Figure CN114286403B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method for switching an Internet access mode of a gateway device, a switching device, a computer-readable storage medium, and an intelligent switching system. Background Art
[0002] With the development of mobile communication technology, more and more gateway devices support dial-up Internet access using multiple Internet access modes. Usually, the terminal user needs to manually set the Internet access mode of the gateway device. If the current Internet access mode of the gateway device cannot access the Internet, the terminal user needs to manually change the Internet access mode, which is not only cumbersome to operate, but also leads to a poor user experience for the terminal user.
[0003] The inventors learned that although intelligent switching of Internet access modes has been achieved in the prior art, the conditions for determining whether the Internet access mode needs to be switched are relatively simple and cannot cover all situations. It may happen that the terminal user cannot access the Internet due to failure to switch the mode in time. In addition, the current switching methods do not take into account the problem of IPV6 connection, which will cause trouble to users who use IPV6 to connect to the Internet.
[0004] Therefore, there is an urgent need for a method to accurately determine whether the EWAN connection is online in various situations.
[0005] The above information disclosed in the background technology section is only used to enhance the understanding of the background technology of the technology described in this article. Therefore, the background technology may contain certain information that does not form the prior art known in this country for those skilled in the art. Summary of the invention
[0006] The main purpose of this application is to provide a method for switching the Internet access mode of a gateway device, a switching device, a computer-readable storage medium and an intelligent switching system to solve the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in various situations.
[0007] According to one aspect of an embodiment of the present invention, a method for switching an Internet access mode of a gateway device is provided, including: obtaining a DNS detection domain name, wherein the DNS detection domain name is a predefined DNS domain name; determining whether an EWAN connection is online at least based on the DNS detection domain name, wherein the EWAN connection is a network connection in which the gateway device is in EWAN mode; and when the EWAN connection is offline, switching the Internet access mode of the gateway device to an LTE mode.
[0008] Optionally, determining whether the EWAN connection is online at least based on the DNS detection domain name includes: determining whether the connection for dial-up Internet access using the IP protocol is offline at least based on the DNS detection domain name; and determining that the EWAN connection is offline when at least one of the connections for dial-up Internet access using the IP protocol is offline.
[0009] Optionally, determining whether the connection for dial-up Internet access using the IP protocol is offline is performed at least based on the DNS detection domain name, including: sending the DNS detection domain name to a DNS server based on the IP protocol; determining that the connection for dial-up Internet access using the IP protocol is online when the DNS detection domain name is queried in the DNS server; and determining that the connection for dial-up Internet access using the IP protocol is offline when the DNS detection domain name is not queried in the DNS server.
[0010] Optionally, determining whether the connection for dial-up Internet access using the IP protocol is offline is performed at least based on the DNS detection domain name, including: obtaining a preset IP address; sending the DNS detection domain name to a DNS server based on the IP protocol; determining that the connection for dial-up Internet access using the IP protocol is online when the DNS detection domain name is queried in the DNS server and the preset IP address is connectable; determining that the connection for dial-up Internet access using the IP protocol is offline when the DNS detection domain name is not queried in the DNS server and / or the preset IP address is not connectable.
[0011] Optionally, in the case of simultaneously accessing the Internet through multiple IP protocols, when at least one of the connections for dialing up the Internet using the IP protocol is offline, determining that the EWAN connection is offline includes: when all the connections for dialing up the Internet using the IP protocol are offline, determining that the EWAN connection is offline.
[0012] Optionally, after switching the Internet access mode of the gateway device to the LTE mode, the switching method also includes: sending request information at predetermined intervals and determining again whether the EWAN connection is online, the request information being used to request connection to the EWAN connection; when the EWAN connection is online, disconnecting the LTE mode and switching the Internet access mode of the gateway device to the EWAN mode.
[0013] Optionally, determining whether the EWAN connection is online includes: determining that the EWAN connection is online when at least one of the IP protocol dial-up Internet access connections is online.
[0014] According to another aspect of an embodiment of the present invention, a switching device for an Internet access mode of a gateway device is also provided, including: an acquisition unit, used to acquire a DNS detection domain name, wherein the DNS detection domain name is a predefined DNS domain name; a determination unit, used to determine whether an EWAN connection is online based on at least the DNS detection domain name, wherein the EWAN connection is a network connection when the gateway device is in EWAN mode; and a switching unit, used to switch the Internet access mode of the gateway device to an LTE mode when the EWAN connection is offline.
[0015] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the switching methods.
[0016] According to another aspect of an embodiment of the present invention, an intelligent switching system is also provided, comprising: a gateway device, one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include means for executing any one of the switching methods.
[0017] In an embodiment of the present invention, in the method for switching the Internet access mode of the gateway device, first, a DNS detection domain name is obtained, then, at least according to the obtained DNS detection domain name, whether the EWAN connection is online is determined, and finally, when it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, wherein the DNS detection domain name is a predefined DNS domain name, and the EWAN connection is a network connection of the gateway device in the EWAN mode. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined according to whether the WAN port is plugged into a network cable, the present solution realizes determining whether the EWAN connection is online at least according to the obtained DNS detection domain name, that is, at least according to the DNS detection domain name, the EWAN connection established using each IP protocol can be detected, ensuring that it can be more effectively determined whether the EWAN connection is online, and can more accurately detect whether the EWAN connection is online in all situations, and when it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, realizing the intelligent switching of the Internet access mode of the gateway device, ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in each situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 A schematic diagram of a method for switching an Internet access mode of a gateway device according to an embodiment of the present application is shown;
[0020] Figure 2 A schematic diagram of a switching device for an Internet access mode of a gateway device according to an embodiment of the present application is shown;
[0021] Figure 3 A detection logic diagram according to an embodiment of the present application is shown;
[0022] Figure 4 A single / double detection logic diagram according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] As mentioned in the background technology, it is difficult in the prior art to accurately determine whether the EWAN connection is online in various situations. In order to solve the above problem, in a typical implementation of the present application, a method for switching the Internet access mode of a gateway device, a switching device, a computer-readable storage medium and an intelligent switching system are provided.
[0027] According to an embodiment of the present application, a method for switching an Internet access mode of a gateway device is provided.
[0028] Figure 1 1 is a flow chart of a method for switching an Internet access mode of a gateway device according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0029] Step S101, obtaining a DNS (Domain Name System, DNS for short) detection domain name, the DNS detection domain name is a predefined DNS domain name;
[0030] Step S102, determining whether an EWAN (Ethernet Wide Area Network, EWAN for short) connection is online at least according to the DNS detection domain name, the EWAN connection being a network connection in which the gateway device is in EWAN mode;
[0031] Step S103, when the EWAN connection is offline, switching the Internet access mode of the gateway device to LTE (Long Term Evolution, LTE for short) mode.
[0032] In the method for switching the Internet access mode of the above-mentioned gateway device, first, a DNS detection domain name is obtained, and then, at least according to the obtained DNS detection domain name, it is determined whether the EWAN connection is online. Finally, when it is determined that the EWAN connection is offline, the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, wherein the DNS detection domain name is a predefined DNS domain name, and the EWAN connection is a network connection of the above-mentioned gateway device in the EWAN mode. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined according to whether the WAN port is plugged into a network cable, the present solution realizes determining whether the EWAN connection is online at least according to the obtained DNS detection domain name, that is, at least according to the DNS detection domain name, the EWAN connection established using each IP protocol can be detected, ensuring that it can be more effectively determined whether the EWAN connection is online, and can more accurately detect whether the EWAN connection is online in all situations. When it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, realizing the intelligent switching of the Internet access mode of the above-mentioned gateway device, ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in each situation.
[0033] In actual application, the above-mentioned gateway device can be a router, but is not limited to a router, and can also be other gateway devices. In addition, the above-mentioned IP protocol can be an IPV4 protocol, and can also be an IPV6 protocol.
[0034] In addition, it should be noted that the above DNS detection domain name can be a user-defined detection domain name.
[0035] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In order to more effectively and timely determine whether the above-mentioned EWAN connection is online, in an embodiment of the present application, whether the EWAN connection is online is determined at least based on the above-mentioned DNS detection domain name, including: determining whether the connection using IP protocol dial-up Internet access is offline at least based on the above-mentioned DNS detection domain name; when at least one of the above-mentioned IP protocol (Internet Protocol, IP protocol for short) dial-up Internet access connections is offline, determining that the above-mentioned EWAN connection is offline.
[0037] In actual application, if the Internet access mode of the above-mentioned gateway device is the EWAN mode, in the above-mentioned EWAN mode, if the above-mentioned gateway device establishes an Internet connection through the IPV4 (Internet Protocol Version 4, IPV4 for short) protocol, it can at least be determined based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline; if the above-mentioned gateway device establishes an Internet connection through the IPV6 (Internet Protocol Version 6, IPV6 for short) protocol, it can at least be determined based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline; if the above-mentioned gateway device establishes an Internet connection through the IPV4 and IPV6 protocols, it can at least be determined based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline.
[0038] In a specific embodiment of the present application, when the above-mentioned device establishes an Internet connection using the IPV4 protocol or the IPV6 protocol, as long as the Internet connection established using the IPV4 protocol or the Internet connection established using the IPV6 protocol is offline, the gateway device will switch to LTE dial-up Internet access; when the Internet connection established using the IPV4 protocol or the Internet connection established using the IPV6 protocol is restored online, the above-mentioned gateway device will disconnect the LTE dial-up Internet connection and restore to the EWAN connection.
[0039] In another embodiment of the present application, at least according to the above-mentioned DNS detection domain name, determining whether the connection using the IP protocol dial-up Internet access is offline includes: based on the above-mentioned IP protocol, sending the above-mentioned DNS detection domain name to the DNS server; in the case where the above-mentioned DNS detection domain name is queried in the above-mentioned DNS server, determining that the connection using the IP protocol dial-up Internet access is online; in the case where the above-mentioned DNS detection domain name is not queried in the above-mentioned DNS server, determining that the connection using the IP protocol dial-up Internet access is offline. In this embodiment, whether the above-mentioned connection using the IP protocol dial-up Internet access is online is determined based on whether the above-mentioned DNS detection domain name is queried in the above-mentioned DNS server, which ensures that the method for determining whether the connection using the IP protocol dial-up Internet access is offline is relatively flexible, and it is possible to determine whether the above-mentioned connection using the IP protocol dial-up Internet access is online in a relatively timely manner.
[0040] In actual application, when the gateway device can support single detection, that is, the user customizes the DNS detection domain name, and when the gateway device can query the DNS server for the DNS detection domain name, it is considered that the established EWAN connection is online.
[0041] In order to more accurately determine whether the connection using the IP protocol to dial up to the Internet is offline, and further ensure the continuity of the terminal user device network, in another embodiment of the present application, at least based on the above-mentioned DNS detection domain name, determine whether the connection using the IP protocol to dial up to the Internet is offline, including: obtaining a preset IP address; based on the above-mentioned IP protocol, sending the above-mentioned DNS detection domain name to the DNS server; when the above-mentioned DNS detection domain name is queried in the above-mentioned DNS server and the above-mentioned preset IP address is connectable, determine that the connection using the above-mentioned IP protocol to dial up to the Internet is online; when the above-mentioned DNS detection domain name is not queried in the above-mentioned DNS server, and / or the above-mentioned preset IP address is not connectable, determine that the connection using the above-mentioned IP protocol to dial up to the Internet is offline.
[0042] It should be noted that the above-mentioned preset IP address can be any IP address input by the user, and it only needs to be able to be used for Ping IP to detect the connectivity of the network.
[0043] In actual application, when the above-mentioned gateway device can support dual detection, the user can customize the DNS detection domain name and Ping IP address. When the above-mentioned gateway device can query the above-mentioned DNS detection domain name from the DNS server and can ping the customized IP address, the EWAN connection is considered to be online, otherwise the EWAN connection is considered to be offline.
[0044] In addition, the above-mentioned single detection method and the above-mentioned double detection method allow users to flexibly customize the offline conditions of the above-mentioned EWAN connection. When the front-end of the gateway device is disconnected from the Internet, but there is a DNS cache or DNS proxy, a single DNS detection will still consider the connection to be online. However, the use of double DNS+ping detection can determine that the network is offline and switch to LTE mode to access the Internet, which can ensure the continuity of the network of the end-user device.
[0045] In another embodiment of the present application, when multiple IP protocol dial-up Internet access is used at the same time, when at least one of the IP protocol dial-up Internet access connections is offline, determining that the EWAN connection is offline includes: when all the IP protocol dial-up Internet access connections are offline, determining that the EWAN connection is offline. In this embodiment, when multiple IP protocol dial-up Internet access is used, when it is determined that all the IP protocol dial-up Internet access connections are offline, determining that the EWAN connection is offline, this not only further ensures that the determination result of the EWAN connection being offline is relatively accurate, but also further ensures that the user's traffic charges can be reduced as much as possible.
[0046] In a specific embodiment of the present application, when the above-mentioned gateway device establishes an Internet connection using IPV4 and IPV6 protocols, the above-mentioned gateway device will switch to LTE dial-up Internet access only when the Internet connection established using the IPV4 protocol and the Internet connection established using the IPV6 protocol are both offline; when any one of the connections is restored online, the gateway device will disconnect the LTE dial-up Internet access and restore to the above-mentioned EWAN connection.
[0047] In order to ensure that the traffic charges are consumed as little as possible, in one embodiment of the present application, after the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, the above-mentioned switching method also includes: sending request information at predetermined intervals, and determining again whether the above-mentioned EWAN connection is online, and the above-mentioned request information is used to request connection to the above-mentioned EWAN connection; when the above-mentioned EWAN connection is online, disconnecting the above-mentioned LTE mode, and switching the above-mentioned Internet access mode of the above-mentioned gateway device to the above-mentioned EWAN mode. In this embodiment, after the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, the above-mentioned EWAN connection will be reconnected at regular intervals and the above-mentioned EWAN connection will be detected to be online. This not only further ensures that uninterrupted network services can be provided to the user terminal device, but also reduces the traffic charges of the user terminal device.
[0048] In order to further ensure that the traffic charges are consumed as little as possible, in another embodiment of the present application, determining whether the above-mentioned EWAN connection is online includes: when at least one of the above-mentioned IP protocol dial-up Internet access connections is online, determining that the above-mentioned EWAN connection is online.
[0049] The embodiment of the present application also provides a switching device for the Internet access mode of a gateway device. It should be noted that the switching device for the Internet access mode of a gateway device in the embodiment of the present application can be used to execute the switching method for the Internet access mode of a gateway device provided in the embodiment of the present application. The following introduces the switching device for the Internet access mode of a gateway device provided in the embodiment of the present application.
[0050] Figure 2 Schematic diagram of a switching device for Internet access mode of a gateway device according to an embodiment of the present application. Figure 2 As shown, the device comprises:
[0051] An acquisition unit 10 is used to acquire a DNS detection domain name, where the DNS detection domain name is a predefined DNS domain name;
[0052] A determination unit 20, configured to determine whether an EWAN connection is online at least according to the DNS detection domain name, the EWAN connection being a network connection in which the gateway device is in an EWAN mode;
[0053] The switching unit 30 is used to switch the Internet access mode of the gateway device to the LTE mode when the EWAN connection is offline.
[0054] In the switching device for the Internet access mode of the above-mentioned gateway device, the acquisition unit is used to acquire a DNS detection domain name, and the above-mentioned DNS detection domain name is a predefined DNS domain name; the determination unit is used to determine whether the EWAN connection is online at least according to the above-mentioned DNS detection domain name, and the above-mentioned EWAN connection is a network connection of the above-mentioned gateway device in the EWAN mode; the switching unit is used to switch the Internet access mode of the above-mentioned gateway device to the LTE mode when the above-mentioned EWAN connection is offline. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined according to whether the WAN port is plugged into a network cable, the present solution realizes determining whether the above-mentioned EWAN connection is online at least according to the above-mentioned DNS detection domain name obtained, that is, at least according to the DNS detection domain name, the EWAN connection established by each IP protocol can be detected, ensuring that it can be more effectively determined whether the above-mentioned EWAN connection is online, and can more accurately detect whether the above-mentioned EWAN connection is online in all situations. When it is determined that the above-mentioned EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, realizing the intelligent switching of the Internet access mode of the above-mentioned gateway device, ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in various situations.
[0055] In actual application, the above-mentioned gateway device can be a router, but is not limited to a router, and can also be other gateway devices. In addition, the above-mentioned IP protocol can be an IPV4 protocol, and can also be an IPV6 protocol.
[0056] In addition, it should be noted that the above DNS detection domain name can be a user-defined detection domain name.
[0057] In order to more effectively and timely determine whether the above-mentioned EWAN connection is online, in an embodiment of the present application, the above-mentioned determination unit includes a first determination module and a second determination module, wherein the above-mentioned first determination module is used to determine whether the connection using the IP protocol dial-up Internet access is offline based on at least the above-mentioned DNS detection domain name; the above-mentioned second determination module is used to determine that the above-mentioned EWAN connection is offline when at least one of the above-mentioned IP protocol dial-up Internet access connections is offline.
[0058] In actual application, if the Internet access mode of the above-mentioned gateway device is the EWAN mode, in the above-mentioned EWAN mode, if the above-mentioned gateway device establishes an Internet connection through the IPV4 (IP Protocol Version 4, Internet Protocol Version 4, abbreviated as IPV6) protocol, it can at least be based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline; if the above-mentioned gateway device establishes an Internet connection through the IPV6 (IP Protocol Version 6, Internet Protocol Version 6, abbreviated as IPV6) protocol, it can at least be based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline; if the above-mentioned gateway device establishes an Internet connection through the IPV4 and IPV6 protocols, it can at least be based on the above-mentioned DNS detection domain name to determine whether the above-mentioned EWAN connection is offline.
[0059] In a specific embodiment of the present application, when the above-mentioned device establishes an Internet connection using the IPV4 protocol or the IPV6 protocol, as long as the Internet connection established using the IPV4 protocol or the Internet connection established using the IPV6 protocol is offline, the gateway device will switch to LTE dial-up Internet access; when the Internet connection established using the IPV4 protocol or the Internet connection established using the IPV6 protocol is restored online, the above-mentioned gateway device will disconnect the LTE dial-up Internet connection and restore to the EWAN connection.
[0060] In another embodiment of the present application, the first determination module includes a first sending submodule, a first determining submodule and a second determining submodule, wherein the first sending submodule is used to send the DNS detection domain name to the DNS server based on the IP protocol; the first determining submodule is used to determine that the connection for dialing up the Internet using the IP protocol is online when the DNS detection domain name is queried in the DNS server; the second determining submodule is used to determine that the connection for dialing up the Internet using the IP protocol is offline when the DNS detection domain name is not queried in the DNS server. In this embodiment, whether the connection for dialing up the Internet using the IP protocol is online is determined based on whether the DNS detection domain name is queried in the DNS server, which ensures that the method for determining whether the connection for dialing up the Internet using the IP protocol is offline is more flexible and can determine whether the connection for dialing up the Internet using the IP protocol is online in a more timely manner.
[0061] In actual application, when the gateway device can support single detection, that is, the user customizes the DNS detection domain name, and when the gateway device can query the DNS server for the DNS detection domain name, it is considered that the established EWAN connection is online.
[0062] In order to more accurately determine whether the connection for dial-up Internet access using the IP protocol is offline, and further ensure the continuity of the terminal user device network, in another embodiment of the present application, the above-mentioned first determination module includes an acquisition submodule, a second sending submodule, a third determination submodule and a fourth determination submodule, wherein the above-mentioned acquisition submodule is used to obtain a preset IP address; the above-mentioned second sending submodule is used to send the above-mentioned DNS detection domain name to the DNS server based on the above-mentioned IP protocol; the above-mentioned third determination submodule is used to determine that the connection for dial-up Internet access using the above-mentioned IP protocol is online when the above-mentioned DNS detection domain name is queried in the above-mentioned DNS server and the above-mentioned preset IP address is connectable; the above-mentioned fourth determination submodule is used to determine that the connection for dial-up Internet access using the above-mentioned IP protocol is offline when the above-mentioned DNS detection domain name is not queried in the above-mentioned DNS server and / or the above-mentioned preset IP address is not connectable.
[0063] It should be noted that the above-mentioned preset IP address can be any IP address input by the user, and it only needs to be able to be used for Ping IP to detect the connectivity of the network.
[0064] In actual application, when the above-mentioned gateway device can support dual detection, the user can customize the DNS detection domain name and Ping IP address. When the above-mentioned gateway device can query the above-mentioned DNS detection domain name from the DNS server and can ping the customized IP address, the EWAN connection is considered to be online, otherwise the EWAN connection is considered to be offline.
[0065] In addition, the above-mentioned single detection method and the above-mentioned double detection method allow users to flexibly customize the offline conditions of the above-mentioned EWAN connection. When the front-end of the gateway device is disconnected from the Internet, but there is a DNS cache or DNS proxy, a single DNS detection will still consider the connection to be online. However, the use of double DNS+ping detection can determine that the network is offline and switch to LTE mode to access the Internet, which can ensure the continuity of the network of the end-user device.
[0066] In another embodiment of the present application, the second determination module includes a fifth determination submodule, and the fifth determination submodule is used to determine that the EWAN connection is offline when multiple IP protocol dial-up connections are simultaneously used and each of the IP protocol dial-up connections is offline. In this embodiment, when multiple IP protocol dial-up connections are used, when it is determined that all of the IP protocol dial-up connections are offline, the EWAN connection is determined to be offline, which not only further ensures that the determination result of the EWAN connection being offline is relatively accurate, but also further ensures that the user's traffic charges can be reduced as much as possible.
[0067] In a specific embodiment of the present application, when the above-mentioned gateway device establishes an Internet connection using IPV4 and IPV6 protocols, the above-mentioned gateway device will switch to LTE dial-up Internet access only when the Internet connection established using the IPV4 protocol and the Internet connection established using the IPV6 protocol are both offline; when any one of the connections is restored online, the gateway device will disconnect the LTE dial-up Internet access and restore to the above-mentioned EWAN connection.
[0068] In order to ensure that the traffic charges are consumed as little as possible, in one embodiment of the present application, after the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, the above-mentioned switching device also includes a sending unit and a disconnecting unit, wherein the above-mentioned sending unit is used to send request information at predetermined intervals and determine again whether the above-mentioned EWAN connection is online, and the above-mentioned request information is used to request to connect to the above-mentioned EWAN connection; the above-mentioned disconnecting unit is used to disconnect the above-mentioned LTE mode when the above-mentioned EWAN connection is online, and switch the above-mentioned Internet access mode of the above-mentioned gateway device to the above-mentioned EWAN mode. In this embodiment, after the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, the above-mentioned EWAN connection will be reconnected at regular intervals and the above-mentioned EWAN connection will be detected to be online. This not only further ensures that uninterrupted network services can be provided to the user terminal device, but also reduces the traffic charges of the user terminal device.
[0069] In order to further ensure that traffic charges are consumed as little as possible, in another embodiment of the present application, the above-mentioned determination unit also includes a third determination module, which is used to determine that the above-mentioned EWAN connection is online when at least one of the above-mentioned IP protocol dial-up Internet access connections is online.
[0070] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the following will be described in conjunction with specific embodiments:
[0071] Example 1
[0072] like Figure 3 As shown, the gateway device has two Internet access modes: LTE mode and EWAN mode. When the gateway device runs in EWAN mode, it will establish an EWAN connection and periodically detect whether the EWAN connection is online. If it detects that the EWAN connection is offline, the gateway device will automatically switch to LTE mode. When the gateway device switches to LTE mode, it will periodically reconnect the EWAN connection and detect whether the EWAN connection is online. When it is confirmed that the EWAN connection is back online, the gateway device will automatically disconnect the LTE mode and switch back to the EWAN mode. This intelligent Internet access mode switching method can achieve the purpose of providing uninterrupted network services for terminal devices while consuming as little traffic charges as possible.
[0073] In addition, the Internet access mode switching method of this scheme also supports the online detection of IPV4 protocol, IPV6 protocol and IPV4 and IPV6 protocols in EWAN mode. First, determine whether the current Internet access mode of the above-mentioned gateway device is LTE mode. When the current Internet access mode of the above-mentioned gateway device is LTE mode, and the above-mentioned gateway device is a connection established by IPV4 or a connection established by IPV6, then detect whether the connection established by IPV4 is online. When it is determined that the connection established by IPV4 is online, it is determined that the reconnection to the EWAN connection is successful; when the connection established by IPV4 is not online, then detect whether the connection established by IPV6 is online. When it is detected that the connection established by IPV6 is online, it is determined that the reconnection to the EWAN connection is successful. When it is detected that the connection established by IPV6 is not online, the Internet access mode of the above-mentioned gateway device still adopts LTE mode, that is, this scheme realizes that when the Internet access connection is established by the IPV4 protocol or the Internet access connection is established by the IPV6 protocol, as long as the connection is offline, the above-mentioned gateway device will still use the LTE mode to access the Internet. If the EWAN connection is reconnected successfully, the terminal device will disconnect from the LTE mode and return to the EWAN connection to the Internet. When the above-mentioned gateway device uses the IPV4 protocol and the IPV6 protocol to establish an Internet connection, the gateway device will disconnect the EWAN connection and enable the LTE mode only when the Internet connection established using IPV4 and the Internet connection established using IPV6 are both offline; when any of the connections is restored online, the gateway device will disconnect from the LTE mode and return to the EWAN connection to the Internet.
[0074] Example 2
[0075] like Figure 4 As shown, when the gateway device supports single detection and dual detection, when the user selects single detection, the user can customize the DNS detection domain name. If the gateway device can query the address of the domain name from the DNS server (that is, the DNS detection is successful), the connection is considered online. When the user selects dual detection, the user can customize the DNS detection domain name and ping IP address; if the gateway device can query the domain name address from the DNS server and can ping the customized IP address (that is, the Ping detection is successful), the IPV4 (IPV6) connection detection is considered online, otherwise the IPV4 (IPV6) connection detection is considered offline. The above detection method allows users to flexibly customize the offline conditions of the EWAN connection, and when the front end of the gateway device is disconnected from the network, but there is a DNS cache or DNS proxy, a single DNS detection will still be considered online, but the use of dual DNS+ping detection can determine that the network is offline and switch to LTE mode to access the Internet, ensuring the continuity of the terminal user device network.
[0076] The switching device for the Internet access mode of the above-mentioned gateway device includes a processor and a memory. The above-mentioned acquisition unit, determination unit and switching unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0077] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of the difficulty in accurately determining whether the EWAN connection is online in various situations in the prior art is solved by adjusting the kernel parameters.
[0078] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0079] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the method for switching the Internet access mode of the above-mentioned gateway device is implemented.
[0080] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for switching the Internet access mode of the gateway device is executed when the program is running.
[0081] In a typical embodiment of the present application, an intelligent switching system is also provided, including: a gateway device, one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the above-mentioned switching methods.
[0082] The intelligent switching system includes a gateway device, one or more processors, a memory and one or more programs. The intelligent switching system can execute any of the above-mentioned switching methods. In the above-mentioned switching method, first, a DNS detection domain name is obtained, and then, whether the EWAN connection is online is determined at least based on the obtained DNS detection domain name. Finally, when it is determined that the EWAN connection is offline, the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, wherein the above-mentioned DNS detection domain name is a predefined DNS domain name, and the above-mentioned EWAN connection is a network connection when the above-mentioned gateway device is in the EWAN mode. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined based on detecting whether the WAN port is plugged into a network cable, this solution realizes determining whether the EWAN connection is online at least based on the acquired DNS detection domain name, that is, at least based on the DNS detection domain name, the EWAN connection established using each IP protocol can be detected, ensuring that it is possible to more effectively determine whether the EWAN connection is online, and more accurately detect whether the EWAN connection is online in all situations. When it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, thereby realizing intelligent switching of the Internet access mode of the gateway device and ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in various situations.
[0083] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0084] Step S101, obtaining a DNS detection domain name, where the DNS detection domain name is a predefined DNS domain name;
[0085] Step S102, determining whether an EWAN connection is online at least according to the DNS detection domain name, the EWAN connection being a network connection when the gateway device is in EWAN mode;
[0086] Step S103: When the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode.
[0087] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0088] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0089] Step S101, obtaining a DNS detection domain name, where the DNS detection domain name is a predefined DNS domain name;
[0090] Step S102, determining whether an EWAN connection is online at least according to the DNS detection domain name, the EWAN connection being a network connection when the gateway device is in EWAN mode;
[0091] Step S103: When the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode.
[0092] In the above embodiments of the present invention, 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.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above-mentioned units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0094] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0095] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0096] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0097] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0098] 1) In the method for switching the Internet access mode of the gateway device of the present application, first, a DNS detection domain name is obtained, then, at least according to the obtained DNS detection domain name, whether the EWAN connection is online is determined, and finally, when it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, wherein the DNS detection domain name is a predefined DNS domain name, and the EWAN connection is a network connection of the gateway device in the EWAN mode. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined by detecting whether the WAN port is plugged into a network cable, the present solution realizes determining whether the EWAN connection is online at least according to the obtained DNS detection domain name, that is, at least according to the DNS detection domain name, the EWAN connection established using each IP protocol can be detected, ensuring that it can be more effectively determined whether the EWAN connection is online, and can more accurately detect whether the EWAN connection is online in all situations, and when it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, realizing the intelligent switching of the Internet access mode of the gateway device, ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in each situation.
[0099] 2) In the switching device for the Internet access mode of the gateway device of the present application, the acquisition unit is used to acquire a DNS detection domain name, and the DNS detection domain name is a predefined DNS domain name; the determination unit is used to determine whether the EWAN connection is online at least according to the DNS detection domain name, and the EWAN connection is a network connection of the gateway device in the EWAN mode; the switching unit is used to switch the Internet access mode of the gateway device to the LTE mode when the EWAN connection is offline. Compared with the prior art that determines whether to switch the Internet access mode to the LTE mode according to whether the WAN port is plugged into a network cable, the present solution realizes determining whether the EWAN connection is online at least according to the acquired DNS detection domain name, that is, at least according to the DNS detection domain name, the EWAN connection established by each IP protocol can be detected, ensuring that it can be more effectively determined whether the EWAN connection is online, and can more accurately detect whether the EWAN connection is online in all situations. When it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, realizing the intelligent switching of the Internet access mode of the gateway device, ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in each situation.
[0100] 3) The intelligent switching system of the present application includes a gateway device, one or more processors, a memory and one or more programs. The intelligent switching system can execute any of the above-mentioned switching methods. In the above-mentioned switching methods, first, a DNS detection domain name is obtained, and then, at least based on the obtained DNS detection domain name, it is determined whether the EWAN connection is online. Finally, when it is determined that the EWAN connection is offline, the Internet access mode of the above-mentioned gateway device is switched to the LTE mode, wherein the above-mentioned DNS detection domain name is a pre-defined DNS domain name, and the above-mentioned EWAN connection is a network connection when the above-mentioned gateway device is in EWAN mode. Compared with the prior art in which whether to switch the Internet access mode to the LTE mode is determined based on detecting whether the WAN port is plugged into a network cable, this solution realizes determining whether the EWAN connection is online at least based on the acquired DNS detection domain name, that is, at least based on the DNS detection domain name, the EWAN connection established using each IP protocol can be detected, ensuring that it is possible to more effectively determine whether the EWAN connection is online, and more accurately detect whether the EWAN connection is online in all situations. When it is determined that the EWAN connection is offline, the Internet access mode of the gateway device is switched to the LTE mode, thereby realizing intelligent switching of the Internet access mode of the gateway device and ensuring the continuity of the terminal user device network, thereby solving the problem in the prior art that it is difficult to accurately determine whether the EWAN connection is online in various situations.
[0101] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for switching an Internet access mode of a gateway device, characterized in that: include: Obtain a DNS detection domain name, where the DNS detection domain name is a predefined DNS domain name; Determining whether the EWAN connection is online at least according to the DNS detection domain name, including: determining whether a connection using the IP protocol dial-up Internet access is offline at least according to the DNS detection domain name; when at least one of the IP protocol dial-up Internet access connections used is offline, determining that the EWAN connection is offline, and the IP protocol is the IPV6 protocol; The EWAN connection is a network connection in which the gateway device is in EWAN mode; When the EWAN connection is offline, switching the Internet access mode of the gateway device to the LTE mode; Among them, determining whether the connection for dial-up Internet access using the IP protocol is offline at least based on the DNS detection domain name includes: obtaining a preset IP address; sending the DNS detection domain name to a DNS server based on the IP protocol; determining that the connection for dial-up Internet access using the IP protocol is online when the DNS detection domain name is queried in the DNS server and the preset IP address is connectable; determining that the connection for dial-up Internet access using the IP protocol is offline when the DNS detection domain name is not queried in the DNS server and / or the preset IP address is not connectable.
2. The switching method according to claim 1, characterized in that: At least according to the DNS detection domain name, determining whether the connection using the IP protocol dial-up Internet access is offline includes: Based on the IP protocol, sending the DNS detection domain name to a DNS server; In the case where the DNS detection domain name is queried in the DNS server, determining that the connection for dialing up the Internet using the IP protocol is online; When the DNS detection domain name is not found in the DNS server, it is determined that the connection for dialing up the Internet using the IP protocol is offline.
3. The switching method according to claim 1, characterized in that: In the case of simultaneously accessing the Internet through multiple IP protocol dial-ups, when at least one of the IP protocol dial-up Internet connections used is offline, determining that the EWAN connection is offline includes: When all the connections using the IP protocol to dial up to the Internet are offline, it is determined that the EWAN connection is offline.
4. The switching method according to claim 1, characterized in that: After the Internet access mode of the gateway device is switched to the LTE mode, the switching method further includes: Sending a request message at a predetermined interval and determining again whether the EWAN connection is online, the request message being used to request connection to the EWAN connection; When the EWAN connection is online, the LTE mode is disconnected, and the Internet access mode of the gateway device is switched to the EWAN mode.
5. The switching method according to claim 3, characterized in that: Determining whether the EWAN connection is online includes: In the case that at least one of the IP protocol dial-up Internet access connections is online, it is determined that the EWAN connection is online.
6. A device for switching Internet access mode of a gateway device, characterized in that: include: An acquiring unit, configured to acquire a DNS detection domain name, wherein the DNS detection domain name is a predefined DNS domain name; a determining unit, configured to determine whether an EWAN connection is online at least according to the DNS detection domain name, the EWAN connection being a network connection in which the gateway device is in an EWAN mode; The determination unit includes a first determination module and a second determination module, wherein the first determination module is used to determine whether a connection using the IP protocol dial-up Internet access is offline at least according to the DNS detection domain name; the second determination module is used to determine that the EWAN connection is offline when at least one of the IP protocol dial-up Internet access connections used is offline, and the IP protocol is the IPV6 protocol; A switching unit, configured to switch the Internet access mode of the gateway device to the LTE mode when the EWAN connection is offline; The first determination module includes an acquisition submodule, a second sending submodule, a third determination submodule and a fourth determination submodule, wherein the acquisition submodule is used to acquire a preset IP address; the second sending submodule is used to send the DNS detection domain name to the DNS server based on the IP protocol; the third determination submodule is used to determine that the connection for dial-up Internet access using the IP protocol is online when the DNS detection domain name is queried in the DNS server and the preset IP address is connectable; the fourth determination submodule is used to determine that the connection for dial-up Internet access using the IP protocol is offline when the DNS detection domain name is not queried in the DNS server and / or the preset IP address is not connectable.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the switching method according to any one of claims 1 to 5.
8. An intelligent switching system, characterized in that: include: A gateway device, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the switching method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for implementing dynamic domain name update
CN101442566A
Network switching method and device
CN106470170A
Network state determination method and device, storage medium and electronic equipment
CN111447107A
Determination of end-to-end transport quality
US20150215184A1
Apparatus and method for configuring backhaul link in wireless communication system
US20200229078A1
