CN106851758B - Communication network switching method and terminal equipment - Google Patents
Communication network switching method and terminal equipment Download PDFInfo
- Publication number
- CN106851758B CN106851758B CN201710160572.XA CN201710160572A CN106851758B CN 106851758 B CN106851758 B CN 106851758B CN 201710160572 A CN201710160572 A CN 201710160572A CN 106851758 B CN106851758 B CN 106851758B
- Authority
- CN
- China
- Prior art keywords
- communication network
- website
- access
- target
- currently connected
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000004891 communication Methods 0.000 title claims abstract description 352
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000001514 detection method Methods 0.000 claims description 26
- 230000001960 triggered effect Effects 0.000 claims description 13
- 238000012216 screening Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 8
- 230000004044 response Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 230000001413 cellular effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0055—Transmission or use of information for re-establishing the radio link
- H04W36/0077—Transmission or use of information for re-establishing the radio link of access information of target access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/14—Reselecting a network or an air interface
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/08—Access restriction or access information delivery, e.g. discovery data delivery
- H04W48/14—Access restriction or access information delivery, e.g. discovery data delivery using user query or user detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a communication network switching method and terminal equipment, which are applied to the technical field of communication networks and computer terminals, wherein the method comprises the following steps: when the target website access fails, inquiring access information of a target communication network which does not limit the target website access in a preset database; switching to connect to the target communication network from the currently connected communication network according to the inquired access information of the target communication network; and accessing the target website again through the target communication network. The embodiment of the invention realizes the full-automatic switching of the communication network based on the website access limitation under the multi-network environment, simplifies the operation of network switching, improves the switching speed and ensures the rapid, high-efficiency and barrier-free access to the limited website.
Description
Technical Field
The invention belongs to the technical field of communication networks and computer terminals, and particularly relates to a communication network switching method and terminal equipment.
Background
In a multi-wifi (wireless fidelity) network environment, the functionality of each wifi hotspot may be different. For example: com, some wifi hotspots may restrict the user's access to certain specific web sites (e.g., google), but at a faster network speed. While some wifi hotspots may be slow (e.g., vpn) but have no access restrictions to websites. However, in the existing communication network switching technology, wifi hotspots are usually selected according to the speed of the network, which results in that when a user wants to access a specific website which is restricted to be accessed, the original wifi network is always disconnected manually, and then the wifi hotspots which can access the specific website are searched by accessing the searched wifi hotspots one by one through the manual control terminal and refreshing the access mode, so that the wifi hotspots which can access the specific website are searched, and the operation is complicated and the efficiency is low.
Disclosure of Invention
The invention provides a communication network switching method and terminal equipment, and aims to solve the technical problems that the existing communication network switching technology is complicated to operate and lacks efficiency in a multi-wifi network environment.
A first aspect of an embodiment of the present invention provides a method for switching a communication network, including: when the target website access fails, inquiring access information of a target communication network which does not limit the target website access in a preset database; switching to connect to the target communication network from the currently connected communication network according to the inquired access information of the target communication network; and accessing the target website again through the target communication network.
A second aspect of an embodiment of the present invention provides a terminal device, including: the information query module is used for querying access information of a target communication network which does not limit the access of the target website in a preset database when the access of the target website fails; the network switching module is used for switching and connecting the current connected communication network to the target communication network according to the inquired access information of the target communication network; and the access module is used for accessing the target website again through the target communication network.
It can be known from the foregoing embodiments of the present invention that, according to the communication network switching and terminal device provided by the present invention, when access to a target website fails, access information of a target communication network that has no access restriction on the target website is automatically queried, and according to a query result, the target communication network is switched to be connected to the target communication network, and then the target website is accessed again through the target communication network, so that full automatic switching of a communication network based on website access restriction in a multi-network environment is achieved, operation of network switching is simplified, switching speed is increased, and fast, efficient and barrier-free access to a restricted website is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a schematic flow chart illustrating an implementation of a communication network handover method according to a first embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of a communication network handover method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention;
fig. 5 shows a hardware configuration diagram of a terminal device.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a flow chart of a method for switching a communication network according to a first embodiment of the present invention, where the method is applicable to a terminal device, and the terminal device includes: electronic data processing devices such as smart phones, tablet computers, notebook computers and the like which can be used in a mobile manner, or other electronic data processing devices which can not be used in a mobile manner, such as: a desktop computer. The method mainly comprises the following steps:
s101, when the target website access fails, inquiring access information of a target communication network which does not limit the target website access in a preset database;
the preset database is at least used for recording the access information of one or more communication networks without access limitation to the target website. Access information may include, but is not limited to: identification information of the communication network, the name of the corresponding network access point, an access password, and the like.
When the website access operation of a user is detected, a target website pointed by the website access operation is obtained, an access request is sent to a server to which the target website belongs according to the target website, if response information returned by the server is not received within preset time, failure in accessing the target website is confirmed, and the currently connected communication network has access limitation on the target website. Then, whether a target communication network without access limitation to the target website exists is inquired in a preset database, and if yes, the access information of the target communication network is acquired.
S102, switching to connect to a target communication network from the currently connected communication network according to the inquired access information of the target communication network;
and disconnecting the communication network which is currently connected with the communication network, and sending an access request to a network access point of the target communication network according to the inquired access information of the target communication network so as to access the corresponding target communication network through the network access point.
It is to be understood that the communication network before the handover and the communication network after the handover are not limited to the same type of communication network. For example: the communication network before switching and the communication network after switching may be both wired networks or both wireless networks, or the communication network before switching may be a wired network and the communication network after switching may be a wireless network. When the communication network before the handover and the communication network after the handover are both wireless networks, the communication network before the handover and the communication network after the handover are not limited to the same wireless network, for example: the communication network before the handover may be a mobile communication cellular network (e.g., a 3G network), and the communication network after the handover may be a wifi wireless network.
Optionally, if there are multiple queried target communication networks, the connection with each queried target communication network may be sequentially tried according to the query sequence until one of the communication networks is successfully connected. Alternatively, the connection with each target communication network may be tried in sequence according to the signal strength until one of the communication networks is successfully connected.
Optionally, if the target communication network is not queried, or the queried target communication networks are unavailable, the current network connection is continuously maintained and prompt information is displayed to prompt the user that the target network access is limited and no candidate communication network is available.
S103, accessing the target website again through the target communication network.
And after the connection with the target communication network is successfully established, sending an access request to the server to which the target website belongs again through the target communication network so as to access the target website.
In the embodiment of the invention, when the target website access fails, the access information of the target communication network without access limitation to the target website is automatically inquired, the target communication network is switched and connected according to the inquiry result, and then the target website is accessed again through the target communication network, so that the full-automatic switching of the communication network based on the website access limitation under the multi-network environment is realized, the network switching operation is simplified, the switching speed is improved, and the quick, efficient and barrier-free access to the limited website is ensured.
Referring to fig. 2, fig. 2 is a schematic diagram of a flow chart of a method for switching a communication network according to a second embodiment of the present invention, where the method is applicable to a terminal device, and the terminal device includes: electronic data processing devices such as smart phones, tablet computers, notebook computers and the like which can be used in a mobile manner, or other electronic data processing devices which can not be used in a mobile manner, such as: a desktop computer. The method comprises the following steps:
s201, when the communication network is connected, detecting whether the currently connected communication network limits access to websites in a preset website list;
and at any time when the terminal equipment operates, responding to the triggered network connection instruction, connecting the communication network pointed by the network connection instruction, and detecting whether the currently connected communication network has access limitation to the websites in the preset website list when the communication network is successfully connected.
It is understood that the steps in this step, when connected to a communication network, include: a case of connecting to a communication network after a certain period of network disconnection, and a case of switching connection from one communication network to another communication network.
In this embodiment, the type of the communication network is not limited, and the communication network may be various wired networks (for example, wired networks connected by coaxial cables, optical fibers, and the like) that must be accessed through a network cable, or various wireless networks (for example, a mobile communication cellular network, a wifi network, a bluetooth network, and the like).
Alternatively, the web addresses in the web address list (web address list) may be customized by the user. Specifically, in response to a website list setting operation of the user, a website to which the website list setting operation points is acquired, and the website list is updated according to the acquired website. Wherein the updating comprises: adding, modifying and deleting. The web addresses in the web address list may include, but are not limited to www.googel.com, www.youtube.com, etc., for example.
S202, obtaining a detection result, and updating a preset database according to the detection result;
optionally, the detecting whether the currently connected communication network restricts access to the websites in the preset website list may specifically include the following steps:
sending data packets to servers to which all websites in the website list belong one by one, and requesting a return code to the servers, wherein the return code is used for identifying normal communication; if the return code is received within the preset time, determining that the currently connected communication network does not limit the access to the website; and if the return code is not received within the preset time length, determining that the currently connected communication network limits the access to the website.
The detection results obtainable by the above steps include: the currently connected communication network has access limitation to which websites in the preset website list, and the currently connected communication network has no access limitation to which websites in the preset website list.
It can be understood that, assuming that the terminal device is a mobile phone, when the mobile phone is connected to a wifi network, the request packet is automatically sent to the server of each website in the website list, for example, by means of ping, if the server has a return code indicating that normal communication is possible, the "capability" of the wifi network is recorded in a preset database, and which websites in the list can be accessed by the wifi network are recorded.
The preset database may be used for recording, but is not limited to: access information for each web site, one or more communication networks without access restrictions for each web site. Further, it can be used to record access information of one or more communication networks having access restrictions to each web site. The access information may include, but is not limited to: identification information of the communication network, the name of the corresponding network access point, an access password, and the like. The identification information of the communication network may be a name of a corresponding network access point or other information that can uniquely identify the communication network.
And updating the preset database according to the detection result, and recording the corresponding relation between the access information of the currently connected communication network and the website which is not limited to access in the preset database. Alternatively, the following data may be recorded in a preset database respectively: the corresponding relation between the access information of the currently connected communication network and the website address which the currently connected communication network limits to access, and the access information of the currently connected communication network and the website address which the currently connected communication network does not limit to access.
Optionally, in order to avoid repeated detection and improve the website detection speed, before detecting whether the currently connected communication network restricts access to the websites in the preset website list, the websites in the website list may be screened by querying the preset database. Specifically, when the network is connected to a communication network, the preset database is queried to obtain the website which is limited to be accessed by the currently connected communication network; according to the website which is limited to be accessed by the currently connected communication network, screening out the website to be detected from the website list; according to the screened website to be detected, executing step S201: and detecting whether the currently connected communication network limits the access to the websites in the preset website list. That is, at this time, it is only necessary to detect a website in the website list that has no access restriction record corresponding to the currently connected communication network in the preset database. Therefore, the number of the websites to be detected can be reduced, and the detection speed is improved.
S203, responding to the triggered website access instruction, and acquiring a target website corresponding to the website access instruction;
the website access instruction may be triggered by the user through a web browsing plug-in, or by the terminal device upon detecting a preset event.
S204, judging whether the currently connected communication network limits the access to the target website or not by inquiring the database;
s205, if the query result is that the currently connected communication network limits access to the target website, confirming that the access to the target website fails, and if the query result is that the currently connected communication network does not limit access to the target website, or no query result exists, accessing the target website and judging whether the access fails;
specifically, before accessing the target website, access information of a communication network restricting access to the target website is queried from a preset database, and identification information of the currently connected communication network is matched with the queried access information. And if the inquired access information contains information matched with the identification information of the currently connected communication network, determining that the inquiry result is that the currently connected communication network restricts access to the target website, and directly judging that the access to the target website fails. And if the inquired access information does not contain information matched with the identification information of the currently connected communication network, determining that the inquired result is that the currently connected communication network does not limit the access to the target website, and executing the access operation on the target website.
Or before accessing the target website, respectively inquiring first access information of a communication network which limits accessing the target website and second access information of the communication network which does not limit accessing the target website from a preset database, and respectively matching the identification information of the currently connected communication network with the inquired first access information and second access information. And if the first access information contains information matched with the identification information of the currently connected communication network, determining that the query result is that the currently connected communication network restricts access to the target website, and directly judging that the access to the target website fails. And if the second access information contains information matched with the identification information of the currently connected communication network, determining that the query result is that the currently connected communication network does not limit the access to the target website, executing the access operation on the target website, and judging whether the access fails. And if the first access information and the second access information do not contain information matched with the identification information of the currently connected communication network, determining that no query result exists, executing access operation on the target website, and judging whether the access fails.
In this way, before accessing the target website, the preset database is firstly inquired to prejudge whether the currently connected communication network restricts the access to the target website, and then whether the subsequent network switching operation is directly executed is selected according to the prejudging result, so that unnecessary waiting can be avoided, and the network switching efficiency is further improved.
S206, when the target website access fails, inquiring access information of the communication network which does not limit the target website access in the database;
if the access to the target website fails to be judged directly in the pre-judging process, the access operation to the target website is not executed, and the access information of the communication network which does not limit the access to the target website is directly inquired in a preset database.
If the access limiting information corresponding to the website and the currently connected communication network is not found in the database in the pre-judging process, sending an access request to a server of the target website, if webpage data returned by the server is not received within a preset time length or other information used for determining that the communication with the server cannot be normally carried out is received, judging that the access to the target website fails, and then inquiring access information of the communication network which does not limit the access to the target website in the preset database.
Optionally, when the target website access fails, the target website is updated to the website list, and the currently connected communication network is recorded in the database to restrict the target website access. In this way, even when the communication network switching method provided in the present embodiment is executed for the first time, when the prejudgment is performed in step S204, a prejudgment result with high accuracy can be obtained. Meanwhile, dynamic adjustment of the website list can be achieved, so that timely updating of data in a preset database is facilitated, and the efficiency of the whole network switching operation is improved.
S207, acquiring the inquired signal strength of each communication network which does not limit the access to the target website, and determining the access information of the communication network with the strongest signal in each communication network which does not limit the access to the target website as the access information of the target communication network;
and acquiring the signal strength of the inquired communication networks which do not limit the access to the target website, sequencing the communication networks according to the sequence of the signals from strong to weak to determine the communication network with the strongest signal, and taking the access information of the communication network with the strongest signal as the access information of the target communication network.
S208, switching to connect to the target communication network from the currently connected communication network according to the inquired access information of the target communication network;
and disconnecting the communication network which is currently connected with the communication network, and sending an access request to a network access point of the target communication network according to the inquired access information of the target communication network so as to access the corresponding target communication network through the network access point.
It is to be understood that the communication network before the handover and the communication network after the handover are not limited to the same type of communication network. For example: the communication network before switching and the communication network after switching may be both wired networks or both wireless networks, or the communication network before switching may be a wired network and the communication network after switching may be a wireless network. When the communication network before the handover and the communication network after the handover are both wireless networks, the communication network before the handover and the communication network after the handover are not limited to the same wireless network, for example: the communication network before the handover may be a mobile communication cellular network (e.g., a 3G network), and the communication network after the handover may be a wifi wireless network.
And S209, accessing the target website again through the target communication network.
And after the connection with the target communication network is successfully established, sending an access request to the server to which the target website belongs again through the target communication network so as to access the target website.
Meanwhile, steps S201 and S202 are executed to dynamically update the data recorded in the preset database, so as to further improve the feasibility and reliability of the queried target communication network.
In the embodiment of the invention, on one hand, when the target website access fails, the access information of the target communication network without access limitation on the target website is automatically inquired, the target communication network is switched and connected according to the inquiry result, and then the target website is accessed again through the target communication network, so that the full-automatic switching of the communication network based on the website access limitation is realized under the multi-network environment, the network switching operation is simplified, the switching speed is improved, and the quick, efficient and barrier-free access to the limited website is ensured. On the other hand, the website list and the preset database are dynamically updated, so that the method can adapt to the continuous change of the multi-network environment, and the continuous feasibility and reliability of network switching are ensured.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The terminal device illustrated in fig. 3 may be an execution subject of the communication network switching method provided in the foregoing embodiment illustrated in fig. 1. The terminal device illustrated in fig. 3 mainly includes: an information inquiry module 31, a network switching module 32 and an access module 33. The above functional modules are described in detail as follows:
the information query module 31 is configured to query, in a preset database, access information of a target communication network that does not limit access to a target website when access to the target website fails;
a network switching module 32, configured to switch to a target communication network from a currently connected communication network according to the queried access information of the target communication network;
and an accessing module 33, configured to access the target website again through the target communication network.
Specifically, the preset database is at least used for recording access information of one or more communication networks without access limitation to the target website. Access information may include, but is not limited to: identification information of the communication network, the name of the corresponding network access point, an access password, and the like.
When the website access operation of a user is detected, a target website pointed by the website access operation is obtained, an access request is sent to a server to which the target website belongs according to the target website, if response information returned by the server is not received within preset time, failure in accessing the target website is confirmed, and the currently connected communication network has access limitation on the target website. Then, the information query module 31 queries whether a target communication network without access limitation to the target website exists in a preset database, and if so, acquires access information of the target communication network. Then, the network switching module 32 disconnects the currently connected communication network, and sends an access request to the network access point of the target communication network according to the queried access information of the target communication network, so as to access the corresponding target communication network through the network access point. After the connection with the target communication network is successfully established, the access module 33 sends an access request to the server to which the target website belongs again through the target communication network, so as to access the target website.
Optionally, if the information query module 31 does not query the target communication network, or if the queried target communication networks are unavailable, the network switching module 32 continues to maintain the current network connection and displays the prompt information to prompt the user that the target network access is limited and no candidate communication network is available.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 1, which is not described herein again.
It should be noted that, in the above embodiment of the terminal device illustrated in fig. 3, the division of each functional module is only an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the terminal device is divided into different functional modules to complete all or part of the above described functions. In addition, in practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
In the embodiment of the invention, when the target website access fails, the access information of the target communication network without access limitation to the target website is automatically inquired, the target communication network is switched and connected according to the inquiry result, and then the target website is accessed again through the target communication network, so that the full-automatic switching of the communication network based on the website access limitation under the multi-network environment is realized, the network switching operation is simplified, the switching speed is improved, and the quick, efficient and barrier-free access to the limited website is ensured.
Referring to fig. 4, a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention is shown, which only shows parts related to the embodiment of the present invention for convenience of description. The terminal device illustrated in fig. 4 may be an execution subject of the communication network switching method provided in the foregoing embodiments illustrated in fig. 1 and fig. 2. The terminal device illustrated in fig. 4 differs from the terminal device in the embodiment illustrated in fig. 3 mainly in that:
further, the terminal device further includes:
the detecting module 41 is configured to, when the communication network is connected to a communication network, detect whether the currently connected communication network restricts access to a website in a preset website list, and obtain a detection result;
an updating module 42, configured to update the database according to the detection result;
the detecting module 41 detects whether the currently connected communication network restricts access to a website in a preset website list, and specifically includes: sending a data packet to the server to which each website in the website list belongs one by one, and requesting a return code to the server, wherein the return code is used for identifying normal communication; if the return code is received within the preset time length, determining that the currently connected communication network does not limit the access to the website; and if the return code is not received within the preset time length, determining that the currently connected communication network limits the access to the website.
In this embodiment, the predetermined database may be used for recording, but not limited to: access information for each web site, one or more communication networks without access restrictions for each web site. Further, it can be used to record access information of one or more communication networks having access restrictions to each web site. The access information may include, but is not limited to: identification information of the communication network, the name of the corresponding network access point, an access password, and the like. The identification information of the communication network may be a name of a corresponding network access point or other information that can uniquely identify the communication network.
Specifically, at any time when the terminal device operates, in response to a triggered network connection instruction, the communication network to which the network connection instruction points is connected, and when the communication network is successfully connected to the communication network, the detection module 41 detects whether the currently connected communication network has access limitation to the websites in the preset website list, and obtains a detection result. The detection result comprises: the currently connected communication network has access limitation to which websites in the preset website list, and the currently connected communication network has no access limitation to which websites in the preset website list.
Then, the updating module 42 records the corresponding relationship between the access information of the currently connected communication network and the website that the currently connected communication network does not limit access to in a preset database. Alternatively, the update module 42 may also record: the corresponding relation between the access information of the currently connected communication network and the website address which the currently connected communication network limits to access, and the access information of the currently connected communication network and the website address which the currently connected communication network does not limit to access.
Optionally, the updating module 42 further responds to the website list setting operation of the user, acquires the website pointed by the website list setting operation, and updates the website list according to the acquired website. Wherein the updating comprises: adding, modifying and deleting.
Further, the information query module 31 is specifically configured to query, in the database, access information of a communication network that does not limit access to the target website, obtain signal strength of the queried communication networks that do not limit access to the target website, and determine access information of a communication network with a strongest signal in the communication networks that do not limit access to the target website, as the access information of the target communication network.
Further, the terminal device further includes:
a website checking and screening module 43, configured to, when connecting to the communication network, obtain a website to which the currently connected communication network has limited access by querying the database, screen a website to be detected from the website list according to the website to which the currently connected communication network has limited access, and trigger the detecting module 41 to perform the step of detecting whether the currently connected communication network has limited access to the website in the preset website list according to the screened website to be detected.
Specifically, in order to avoid repeated detection and increase the website detection speed, before the detection module 41 detects whether the currently connected communication network restricts access to the websites in the preset website list, the website checking and screening module 43 is used to obtain the website restricted for access by the currently connected communication network by querying the preset database when the currently connected communication network is connected, and the website to be detected is screened from the website list according to the website restricted for access by the currently connected communication network. Then, the detection module 41 is triggered to detect whether the currently connected communication network restricts access to the websites in the preset website list according to the screened websites to be detected. That is, at this time, it is only necessary to detect a website in the website list that has no access restriction record corresponding to the currently connected communication network in the preset database. Therefore, the number of the websites to be detected can be reduced, and the detection speed is improved.
Further, the terminal device further includes:
a website acquisition module 44, configured to respond to the triggered website access instruction, and acquire a target website corresponding to the website access instruction;
a judging module 45, configured to judge whether the currently connected communication network restricts access to the target website by querying the database, and if the query result is that the currently connected communication network restricts access to the target website, determine that access to the target website fails, and if the query result is that the currently connected communication network does not restrict access to the target website, or no query result is available, access the target website and judge whether access fails;
the updating module 42 is further configured to update the target website to the website list, and record in the database that the currently connected communication network restricts access to the target website.
Specifically, before accessing the target website in response to the triggered website access instruction, the website acquisition module 44 acquires the target website corresponding to the website access instruction. Then, the determining module 45 queries the access information of the communication network restricting access to the target website from the preset database, and matches the identification information of the currently connected communication network with the queried access information. And if the inquired access information contains information matched with the identification information of the currently connected communication network, determining that the inquiry result is that the currently connected communication network restricts access to the target website, and directly judging that the access to the target website fails. And if the inquired access information does not contain information matched with the identification information of the currently connected communication network, determining that the inquired result is that the currently connected communication network does not limit the access to the target website, and executing the access operation on the target website.
Alternatively, before accessing the target website in response to the triggered website access instruction, the website acquisition module 44 acquires the target website corresponding to the website access instruction. Then, the determining module 45 queries, from a preset database, first access information of a communication network that restricts access to the target website and second access information of a communication network that does not restrict access to the target website, and matches the identification information of the currently connected communication network with the queried first access information and second access information, respectively. And if the first access information contains information matched with the identification information of the currently connected communication network, determining that the query result is that the currently connected communication network restricts access to the target website, and directly judging that the access to the target website fails. And if the second access information contains information matched with the identification information of the currently connected communication network, determining that the query result is that the currently connected communication network does not limit the access to the target website, executing the access operation on the target website, and judging whether the access fails. And if the first access information and the second access information do not contain information matched with the identification information of the currently connected communication network, determining that no query result exists, executing access operation on the target website, and judging whether the access fails.
In this way, before the access module 33 accesses the target website, the predetermined database is queried to pre-determine whether the currently connected communication network restricts access to the target website, and whether to directly execute the subsequent network switching operation is selected according to the pre-determined result, so that unnecessary waiting can be avoided, and the network switching efficiency can be further improved.
If the determining module 45 directly determines that the access to the target website is failed in the pre-determining process, the accessing operation to the target website is not executed, but the information querying module 31 is directly triggered to query the access information of the communication network which is not limited to access to the target website in the preset database.
If the judgment module 45 does not find the access restriction information corresponding to the website and the currently connected communication network in the database in the pre-judgment process, an access request is sent to the server of the target website, if the webpage data returned by the server is not received within the preset time period or other information used for determining that the communication with the server cannot be performed normally is received, the failure of accessing the target website is judged, and then the information inquiry module 31 is triggered to inquire the access information of the communication network which does not restrict the access of the target website in the preset database.
Optionally, when the determining module 45 determines that the access to the target website fails, the updating module 42 updates the target website into the website list, and records the currently connected communication network in the database to restrict the access to the target website. Thus, even when the communication network switching method provided by the embodiment is executed for the first time, when the trigger determining module 45 performs the pre-determination, a pre-determination result with high accuracy can be obtained. Meanwhile, dynamic adjustment of the website list can be achieved, so that timely updating of data in a preset database is facilitated, and the efficiency of the whole network switching operation is improved.
For details of the embodiment, please refer to the description of the embodiment shown in fig. 1 and fig. 2, which is not repeated herein.
In the embodiment of the invention, on one hand, when the target website access fails, the access information of the target communication network without access limitation on the target website is automatically inquired, the target communication network is switched and connected according to the inquiry result, and then the target website is accessed again through the target communication network, so that the full-automatic switching of the communication network based on the website access limitation is realized under the multi-network environment, the network switching operation is simplified, the switching speed is improved, and the quick, efficient and barrier-free access to the limited website is ensured. On the other hand, the website list and the preset database are dynamically updated, so that the method can adapt to the continuous change of the multi-network environment, and the continuous feasibility and reliability of network switching are ensured.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal device for executing a method for switching a communication network according to an embodiment of the present invention.
The terminal device described in this embodiment includes:
at least one input device 51; at least one output device 52; at least one processor 53, such as a central processor; and a memory 54.
The input device 51, the output device 52, the processor 53, and the memory 54 are connected by a bus 55.
The input device 51 may be a camera, a touch panel, a physical button, a mouse, or the like. The output device 52 may specifically be a display screen.
The Memory 54 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 54 is used for storing a set of executable program codes, the processor 53 is coupled to the memory 54, and the input device 51, the output device 52 and the processor 53 are used for calling the executable program codes stored in the memory 54, and performing the following operations:
the code is executed by the processor 53 to perform the communication network handover method as described in the embodiments of fig. 1 and 2.
Specifically, when the target website access fails, inquiring access information of a target communication network which does not limit the target website access in a preset database; switching to connect to the target communication network from the currently connected communication network according to the inquired access information of the target communication network; and accessing the target website again through the target communication network.
Further, the processor 53 performs, when connecting to the communication network, detecting whether the currently connected communication network restricts access to a website in the preset website list; and acquiring a detection result, and updating the database according to the detection result.
Further, the processor 53 performs detection on whether the currently connected communication network restricts access to websites in the preset website list, specifically including: sending data packets to servers to which the websites belong in the website list one by one, and requesting a return code from the servers, wherein the return code is used for identifying normal communication; if the return code is received within a preset time length, determining that the currently connected communication network does not limit the access to the website; and if the return code is not received within the preset time length, determining that the currently connected communication network limits access to the website.
Further, the processor 53 executes the query of the preset database for the access information of the target communication network that does not limit the access to the target website, specifically including: inquiring access information of a communication network which does not limit the access to the target website in the database; acquiring the signal intensity of each inquired communication network which does not limit the access to the target website; and determining the access information of the communication network with the strongest signal in the communication networks which do not limit the access to the target website as the access information of the target communication network.
Further, before the processor 53 detects whether the currently connected communication network restricts access to the websites in the preset website list, the method further includes: when the communication network is connected, the website which is limited to be accessed by the currently connected communication network is obtained by inquiring the database; according to the website which is limited to be accessed by the currently connected communication network, screening out the website to be detected from the website list; and executing the step of detecting whether the currently connected communication network limits the access to the websites in the preset website list or not according to the screened websites needing to be detected.
Further, the processor 53 performs, when the access to the target website fails, before querying the preset database for the access information of the target communication network that does not limit the access to the target website, the following steps: responding to a triggered website access instruction, and acquiring a target website corresponding to the website access instruction; judging whether the currently connected communication network limits the access to the target website or not by inquiring the database; if the query result is that the currently connected communication network limits the access to the target website, confirming that the access to the target website is failed; and if the query result is that the currently connected communication network does not limit the access to the target website or no query result exists, accessing the target website and judging whether the access fails.
Further, before the processor 53 performs the handover connection to the target communication network from the currently connected communication network, the method further includes: and updating the target website to the website list, and recording the limitation of the currently connected communication network to the target website in the database.
In the embodiments provided in the present application, it should be understood that the disclosed terminal device and method may be implemented in other ways. For example, the above-described embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication link may be through some interfaces, and the indirect coupling or communication link of the modules may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the above description, for a person skilled in the art, there are variations to the communication network switching method and the terminal device according to the concepts of the embodiments of the present invention, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A method of handover of a communication network, the method comprising:
responding to a triggered website access instruction, and acquiring a target website corresponding to the website access instruction;
judging whether the currently connected communication network limits the access to the target website or not by inquiring a database; if the query result is that the currently connected communication network limits access to the target website, confirming that the access to the target website is failed;
when the target website is failed to be accessed, inquiring access information of a target communication network which does not limit the access to the target website in the database;
switching to connect to the target communication network from the currently connected communication network according to the inquired access information of the target communication network;
and accessing the target website again through the target communication network.
2. The communication network handover method of claim 1, wherein the method further comprises:
when the communication network is connected, detecting whether the currently connected communication network limits the access to the websites in the preset website list;
and acquiring a detection result, and updating the database according to the detection result.
3. The method for switching a communication network according to claim 2, wherein the detecting whether the currently connected communication network restricts access to the websites in the preset website list specifically comprises:
sending data packets to servers to which the websites belong in the website list one by one, and requesting a return code from the servers, wherein the return code is used for identifying normal communication;
if the return code is received within a preset time length, determining that the currently connected communication network does not limit the access to the website;
and if the return code is not received within the preset time length, determining that the currently connected communication network limits access to the website.
4. The method for switching communication network according to claim 2, wherein before detecting whether the currently connected communication network restricts access to the websites in the preset website list, the method further comprises:
when the communication network is connected, the website which is limited to be accessed by the currently connected communication network is obtained by inquiring the database;
according to the website which is limited to be accessed by the currently connected communication network, screening out the website to be detected from the website list;
and executing the step of detecting whether the currently connected communication network limits the access to the websites in the preset website list or not according to the screened websites needing to be detected.
5. The method as claimed in any one of claims 1 to 4, wherein said determining whether the currently connected communication network restricts access to the target website by querying a database comprises:
and if the query result is that the currently connected communication network does not limit the access to the target website or no query result exists, accessing the target website and judging whether the access fails.
6. The communication network handover method according to any one of claims 2 to 4, wherein before the handover connection from the currently connected communication network to the target communication network, further comprising:
and updating the target website to the website list, and recording the limitation of the currently connected communication network to the target website in the database.
7. A terminal device, characterized in that the terminal device comprises:
the website acquisition module is used for responding to a triggered website access instruction and acquiring a target website corresponding to the website access instruction;
the judging module is used for judging whether the currently connected communication network limits the access to the target website by inquiring the database; if the query result is that the currently connected communication network limits access to the target website, confirming that the access to the target website is failed;
the information query module is used for querying access information of a target communication network which does not limit the access to the target website in the database when the access to the target website fails;
the network switching module is used for switching and connecting the currently connected communication network to the target communication network according to the inquired access information of the target communication network;
and the access module is used for accessing the target website again through the target communication network.
8. The terminal device of claim 7, wherein the terminal device further comprises:
the detection module is used for detecting whether the currently connected communication network limits the access to the websites in the preset website list or not when the communication network is connected to the communication network, and acquiring a detection result;
the updating module is used for updating the database according to the detection result;
the detecting whether the currently connected communication network restricts access to the websites in the preset website list specifically includes:
sending data packets to servers to which the websites belong in the website list one by one, and requesting a return code from the servers, wherein the return code is used for identifying normal communication;
if the return code is received within a preset time length, determining that the currently connected communication network does not limit the access to the website;
and if the return code is not received within the preset time length, determining that the currently connected communication network limits access to the website.
9. The terminal device of claim 8, wherein the terminal device further comprises:
and the website searching and screening module is used for obtaining the website which is limited to be accessed by the currently connected communication network by inquiring the database when the communication network is connected, screening the website to be detected from the website list according to the website which is limited to be accessed by the currently connected communication network, triggering the detection module to execute the step of detecting whether the currently connected communication network is limited to access the website in the preset website list according to the screened website to be detected.
10. The terminal device of claim 8,
the judging module is further configured to: if the query result is that the currently connected communication network does not limit the access to the target website, or no query result exists, accessing the target website, and judging whether the access fails;
the updating module is further configured to update the target website to the website list and record in the database that the currently connected communication network restricts access to the target website before the network switching module switches connection to the target communication network from the currently connected communication network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710160572.XA CN106851758B (en) | 2017-03-17 | 2017-03-17 | Communication network switching method and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710160572.XA CN106851758B (en) | 2017-03-17 | 2017-03-17 | Communication network switching method and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106851758A CN106851758A (en) | 2017-06-13 |
CN106851758B true CN106851758B (en) | 2021-03-23 |
Family
ID=59144849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710160572.XA Expired - Fee Related CN106851758B (en) | 2017-03-17 | 2017-03-17 | Communication network switching method and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106851758B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107181624A (en) * | 2017-06-30 | 2017-09-19 | 联想(北京)有限公司 | A kind of method for connecting network, electronic equipment and computer-readable storage medium |
CN107832329B (en) * | 2017-09-26 | 2020-11-13 | 中国平安人寿保险股份有限公司 | Page resource obtaining method and terminal equipment |
CN109511146A (en) * | 2018-12-29 | 2019-03-22 | 联想(北京)有限公司 | A kind of connection method, electronic equipment and network access equipment |
CN112312507A (en) * | 2020-10-12 | 2021-02-02 | 广东电网有限责任公司广州供电局 | Power grid communication network switching method and device and power grid communication system |
CN113992578B (en) * | 2021-09-09 | 2023-11-03 | 新华三大数据技术有限公司 | Method, device, equipment and storage medium for switching servers of cloud desktop terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909110A (en) * | 2010-06-17 | 2010-12-08 | 惠州Tcl移动通信有限公司 | Mobile phone browser connection access method and device |
CN104350802A (en) * | 2014-04-16 | 2015-02-11 | 华为技术有限公司 | Wireless local area network WLAN access method, terminal and server |
CN104852915A (en) * | 2015-04-30 | 2015-08-19 | 广东欧珀移动通信有限公司 | Network access control method and device |
CN105429800A (en) * | 2015-12-03 | 2016-03-23 | 小米科技有限责任公司 | Network connection processing method and device and terminal equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI231900B (en) * | 2002-08-19 | 2005-05-01 | Ntt Docomo Inc | Communication terminal providing function against connection with specific website and method thereof and memory media memorizing the program |
US9398525B2 (en) * | 2013-03-14 | 2016-07-19 | Qualcomm Incorporated | Selecting a network for a wireless device |
CN103987130B (en) * | 2014-05-16 | 2017-11-28 | 北京奇虎科技有限公司 | Terminal access method, device and system based on WIFI equipment |
-
2017
- 2017-03-17 CN CN201710160572.XA patent/CN106851758B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909110A (en) * | 2010-06-17 | 2010-12-08 | 惠州Tcl移动通信有限公司 | Mobile phone browser connection access method and device |
CN104350802A (en) * | 2014-04-16 | 2015-02-11 | 华为技术有限公司 | Wireless local area network WLAN access method, terminal and server |
CN104852915A (en) * | 2015-04-30 | 2015-08-19 | 广东欧珀移动通信有限公司 | Network access control method and device |
CN105429800A (en) * | 2015-12-03 | 2016-03-23 | 小米科技有限责任公司 | Network connection processing method and device and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106851758A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106851758B (en) | Communication network switching method and terminal equipment | |
EP2854378B1 (en) | Method, device and network equipment for acquiring feature information | |
CN105376107B (en) | Terminal testing method and proxy server | |
US10999721B2 (en) | Communication identifier binding processing method and terminal | |
US20160259800A1 (en) | Webpage loading method, client and server | |
US10165507B2 (en) | Network access method and apparatus applied to mobile application | |
EP3468256B1 (en) | Fast wireless fidelity connection method and apparatus | |
CN104320161A (en) | Method and system for rapid Bluetooth pairing | |
US20170289243A1 (en) | Domain name resolution method and electronic device | |
US11695623B2 (en) | Method and apparatus for binding network card in multi-network card server, and electronic device and storage medium | |
CN109413759B (en) | Method and equipment for wireless connection | |
CN107274222B (en) | Advertisement putting method and device | |
CN107148022B (en) | A kind of anti-loiter network based reminding method and relevant device | |
US20230045914A1 (en) | Method and apparatus for controlling device in internet of things, and gateway device and storage medium | |
CN105530222A (en) | Method for establishing connection among terminals, and device and system | |
US20140282057A1 (en) | System for applying applications of different operating systems in one electronic device and method thereof | |
CN109446445B (en) | Resource acquisition method and device | |
CN105704190A (en) | Method for sharing data, device and terminal | |
US10554760B2 (en) | Method and networking equipment for acquiring feature information | |
CN104144170A (en) | URL filtering method, device and system | |
KR101419275B1 (en) | Data synchronizing and servicing apparatus and method based on cloud storage | |
CN105956202A (en) | Web page display method and web page display apparatus in browser as well as terminal | |
CN106657281B (en) | File sharing method and device | |
CN114788393B (en) | Inter-device communication method, device and storage medium | |
CN107635264B (en) | Cell reselection method, mobile terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210323 |