CN107820289B - WIFI network switching method, device, terminal and medium - Google Patents

WIFI network switching method, device, terminal and medium Download PDF

Info

Publication number
CN107820289B
CN107820289B CN201711160659.3A CN201711160659A CN107820289B CN 107820289 B CN107820289 B CN 107820289B CN 201711160659 A CN201711160659 A CN 201711160659A CN 107820289 B CN107820289 B CN 107820289B
Authority
CN
China
Prior art keywords
wifi network
source
signal intensity
network
connection
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.)
Active
Application number
CN201711160659.3A
Other languages
Chinese (zh)
Other versions
CN107820289A (en
Inventor
余哪杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meizu Technology Co Ltd
Original Assignee
Meizu Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Meizu Technology Co Ltd filed Critical Meizu Technology Co Ltd
Priority to CN201711160659.3A priority Critical patent/CN107820289B/en
Publication of CN107820289A publication Critical patent/CN107820289A/en
Application granted granted Critical
Publication of CN107820289B publication Critical patent/CN107820289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0011Control or signalling for completing the hand-off for data sessions of end-to-end connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a WIFI network switching method, a WIFI network switching device, a WIFI network switching terminal and a WIFI network switching medium, which are used for actively switching to a WIFI network with better signal quality when the WIFI signal quality of the terminal is detected to be reduced, reducing network access delay and improving user experience. The WIFI network switching method comprises the following steps: after the intelligent terminal is connected to a source WIFI network, monitoring whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value; if the signal intensity of the source WIFI network is monitored to be lower than a preset signal intensity threshold value, judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists or not; and if the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists according to the judgment result, releasing the connection with the source WIFI network, and selecting the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network to establish the connection.

Description

WIFI network switching method, device, terminal and medium
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a WIFI network switching method, a WIFI network switching device, a WIFI network switching terminal and a WIFI network switching medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Wi-Fi (Wireless Fidelity) is a technology that allows an electronic device to connect to a WIreless Local Area Network (WLAN), typically using 2.4G or 5G radio frequency bands, which is typically password protected; but may be open, allowing any device within range of the WLAN to connect.
According to the prior art, when an electronic device, such as an intelligent terminal, is connected to a WIFI network for the first time, if a password is required, a user is prompted to input the password, if the password input by the user is correct, the user is allowed to be connected to the WIFI network, an intelligent terminal operating system automatically stores the password input by the user, and when the user subsequently enters the coverage range of the WIFI network, the WIFI network is automatically connected without active operation of the user. Coverage of WIFI network signals is limited in certain areas, and if coverage of wireless signals is completed in some large areas, for example, large areas such as offices, malls, etc., by deploying a plurality of WIFI networks.
In the moving process of the intelligent terminal, if the intelligent terminal moves to the coverage edge position of the currently connected WIFI network, although the WIFI signal is weaker and weaker, according to a wireless network connection mechanism of an android operating system, if the quality of the currently connected WIFI signal is poor, even if the WIFI network with stronger signal quality is deployed around the intelligent terminal, the intelligent terminal cannot be actively disconnected with the currently connected WIFI network until the intelligent terminal moves out of the coverage area of the currently connected WIFI network. While a WIFI signal quality degradation will result in an increase in network access latency, which degrades the user experience.
Disclosure of Invention
Embodiments of the present invention provide a WIFI network switching method, apparatus, terminal, and medium, which are used to actively switch to a WIFI network with better signal quality when a reduction in the quality of a terminal WIFI signal is detected, reduce network access delay, and improve user experience.
In a first aspect, a WIFI network switching method is provided, including:
after the intelligent terminal is connected to a source wireless fidelity (WIFI) network, monitoring whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value;
if the signal intensity of the source WIFI network is monitored to be lower than a preset signal intensity threshold value, judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists or not;
and if the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists according to the judgment result, releasing the connection with the source WIFI network, and selecting the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network to establish the connection.
Optionally, the releasing the connection with the source WIFI network specifically includes:
and calling a WIFI connection release Application Program Interface (API) to release the connection with the source WIFI network.
Optionally, before selecting the WIFI network with the signal strength greater than the signal strength of the source WIFI network to establish a connection, the method further includes:
determining the type of the current area according to the detected SSID service set identifier of the WIFI network; and
selecting a WIFI network with signal strength greater than the signal strength of the source WIFI network to establish connection, specifically comprising:
and selecting a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network to establish connection according to the determined region type of the current region.
Preferably, determining the type of the area to which the current area belongs according to the service set identifier SSID of the detected WIFI network specifically includes:
if a plurality of WIFI networks with the same content as at least part of SSIDs of the source WIFI network are detected, determining that the current area is an office area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
selecting a WIFI network which has at least part of the same content as the SSID of the source WIFI network and has the strongest signal strength to establish connection;
if a plurality of WIFI networks different from the SSID of the source WIFI network are detected, determining that the current area is a home area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
selecting the WIFI network which records the connection password and has the strongest signal intensity to establish connection;
if the SSID is detected to exist in at least one WIFI network in a prestored SSID set, determining that the current area is a public area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
requesting a connection password of the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network from a network side according to a target SSID corresponding to the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network; and
and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side.
In a second aspect, a WIFI network switching apparatus is provided, including:
the monitoring unit is used for monitoring whether the signal intensity of the source wireless fidelity (WIFI) network is lower than a preset signal intensity threshold value or not after the intelligent terminal is connected to the source wireless fidelity (WIFI) network;
the judgment unit is used for judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists or not if the monitoring unit monitors that the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value;
and the network connection control unit is used for releasing the connection with the source WIFI network and selecting the WIFI network with the signal strength larger than the signal strength of the source WIFI network to establish the connection if the WIFI network with the signal strength larger than the signal strength of the source WIFI network is determined according to the judgment result of the judgment unit.
Optionally, the network connection control unit is specifically configured to call a WIFI connection release application program interface API, and release the connection with the source WIFI network.
Optionally, the WIFI network switching apparatus further includes a determining unit, wherein:
the determining unit is used for determining the type of the area to which the current area belongs according to the service set identifier SSID of the detected WIFI network before the network connection control unit selects the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network to establish connection;
the network connection control unit is specifically configured to select, according to the determined type of the region to which the current region belongs, a WIFI network having a signal strength greater than the signal strength of the source WIFI network to establish connection.
Preferably, the determining unit is specifically configured to determine that the current area is an office area if a plurality of WIFI networks with at least part of the same content as the SSID of the source WIFI network are detected; the network connection control unit is specifically used for selecting a WIFI network which has at least part of the same content as the SSID of the source WIFI network and has the strongest signal strength to establish connection; or
The determining unit is specifically configured to determine that the current area is a home area if a plurality of WIFI networks different from the SSID of the source WIFI network are detected; the network connection control unit is specifically used for selecting the WIFI network which records the connection password and has the strongest signal intensity to establish connection; or
The determining unit is specifically configured to determine that the current area is a public area if it is detected that the SSID exists in at least one WIFI network in a prestored SSID set; the network connection control unit is specifically configured to request, from a network side, a connection password of the WIFI network having the signal strength greater than the signal strength of the source WIFI network according to a target SSID corresponding to the WIFI network having the signal strength greater than the signal strength of the source WIFI network; and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side.
In a third aspect, a terminal is provided, the terminal comprising a processor and a memory, the processor being configured to implement the steps of any of the above methods when executing a computer program stored in the memory.
In a fourth aspect, a readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of any of the methods described above.
According to the WIFI network switching method, the WIFI network switching device, the WIFI network switching terminal and the WIFI network switching medium, the signal intensity of the WIFI network currently connected with the intelligent terminal is monitored in real time, and if the signal intensity of the current WIFI network is lower than a preset signal intensity threshold value and the WIFI network with higher signal intensity exists, the connection between the WIFI network currently connected with the intelligent terminal is actively released and established with the WIFI network with higher signal intensity, so that the access delay of the intelligent terminal network can be reduced, and the user experience is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic implementation flow diagram of a WIFI network switching method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a WIFI network switching apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to reduce network access delay of an intelligent terminal and improve user experience, embodiments of the present invention provide a WIFI network switching method, apparatus, terminal and medium.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
As shown in fig. 1, which is a schematic view of an implementation flow of a WIFI network switching method provided by an embodiment of the present invention, the method may include the following steps:
s11, after the intelligent terminal is connected to the source WIFI network, monitoring whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value.
When the intelligent terminal is implemented, after the intelligent terminal is connected with the WIFI network, the signal intensity of the currently connected WIFI network is monitored in real time. And if the signal intensity of the currently connected WIFI network is greater than a preset signal intensity threshold value, continuing monitoring.
It should be noted that, in order to distinguish different WIFI networks connected to the intelligent terminal before and after performing WIFI network switching, in the embodiment of the present invention, a WIFI network connected to the intelligent terminal before performing WIFI network switching is referred to as a source WIFI network.
S12, if the signal intensity of the source WIFI network is monitored to be lower than a preset signal intensity threshold value, judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists, if so, executing a step S13, otherwise, executing a step S11.
The signal intensity threshold value can be preset according to actual needs, when the signal intensity of a source WIFI network connected with the intelligent terminal at present is lower than the signal intensity threshold value, the current network environment is poor, and if a connectable WIFI network with a higher signal exists, WIFI network switching can be triggered.
Based on this, in the embodiment of the present invention, if it is monitored that the signal intensity of the source WIFI network is lower than the preset signal intensity threshold, it is further determined whether there is a WIFI network whose signal intensity is greater than the signal intensity of the source WIFI network.
And S13, releasing the connection with the source WIFI network, and selecting the WIFI network with the signal intensity larger than that of the source WIFI network to establish the connection.
In step S13, a WIFI connection release API (application program interface) may be called to release the connection with the source WIFI network. Specifically, a WifiManager can be called, namely, a disconnect () method, and a WifiServiceImpl same-name method is called in a nested manner, wherein the specific implementation procedure is as follows:
Figure BDA0001474975160000061
Figure BDA0001474975160000071
during specific implementation, an internal method of the WIFI state machine needs to be called so as to modify the network connection state of the intelligent terminal. Specifically, a command CMD _ DISCONNECT to DISCONNECT WIFI is sent. Since the state of the intelligent terminal is connecticdtate when the network connection is successful before, the message is processed by its parent state L2 connecticdtate:
Figure BDA0001474975160000072
the DISCONNECTION command is issued by a WifisNative:: disconnect () method, when the connection with the WIFI NETWORK is disconnected, wpa _ s feeds back a DISCONNECTION EVENT, a WifiMonitor receives the EVENT from the wpa _ s and feeds back a NETWORK _ DISCONNECTION _ EVENT message to the WifistatEmachine.
During specific implementation, the intelligent terminal releases and is connected with the WIFI network, and the method mainly comprises the following steps:
1. stopdehcp (): the DHCP (Dynamic Host Configuration Protocol) process, i.e., the dhcpcd process, is stopped.
2、mNwService.clearInterfaceAddresses(mInterfaceName):
The network is notified by the network management service that the address information of the wlan0 is cleared.
3. Reset (): the state of the WifiInfo object is reset.
4、setNetworkDetailedState(DetailedState.DISCONNECTED):
The connection status of the mNetworkInfo is set to DISCONNECTED.
5. mwifinfigstore. updatestatus (mLastNetworkId, detailedstate. disconnectected): the wiconfiguration object state corresponding to mLastNetworkId is set to disconnect.
6. clear linkpproperties (): the configuration information of the mLinkProperties object is cleared.
7. sendworkstatechagebroadcast (): and broadcasting to inform the upper network of the state change.
8. registered disconnected (): and cleaning and recording.
And finally, switching the network connection state of the intelligent terminal to disconnected State, so that the process of releasing the connection with the source WIFI network is completed, and waiting for the initiation of the next connection.
In the embodiment of the invention, after the connection with the source WIFI network is released, a WIFI network with higher signal strength is further selected to establish the connection.
In order to improve the switching efficiency of the WIFI network, in the embodiment of the invention, different area types are identified, and corresponding WIFI network connection methods are provided according to the different area types. The types of areas where WIFI networks are deployed may include public areas, office areas, and home areas. Different types of WIFI networks deployed in areas have their own characteristics. For example, an office area is usually large, and a coverage area of one WIFI network is limited, so that a plurality of WIFI networks with SSID (service set identifier) similarity may be deployed in the WIFI network deployed in the office area, and therefore the WIFI network deployed in the office area has the following specific characteristics: and the WIFI network is provided with a plurality of SSIDs which are at least partially identical in content. That is, the smart terminal may detect multiple WIFI networks in the office area, and SSIDs of these networks are the same, or at least partially the same in content, for example, may have the same prefix name, or the same suffix name, or may have the same content in the middle, and so on, that is, the SSIDs contain a common character string. For a home residence, one WIFI network is deployed according to the area of the residence, so that the entire residential area can be covered basically, and since the SSID can be modified by a user, the home-deployed WIFI has the following characteristics: the WIFI network system is provided with a plurality of WIFI networks with different SSIDs, namely, the SSIDs of the WIFI networks deployed in different families are different. While for public areas it may be possible to deploy a free WIFI network for use by the user. These WIFI networks may be password-free, connectable, or may have a connection password. In order to facilitate a user to access the network, an intelligent terminal generation manufacturer may deploy a WIFI network in cooperation with a public area, such as a large mall, a scenic spot, and the like, a connection password of the WIFI network is stored in a cloud server, an SSID set of the deployed WIFI network and a network address of the cloud server are preset in the intelligent terminal, and when the type of the WIFI network is detected, a corresponding connection password may be requested from the cloud server according to the network address stored in advance.
Based on this, in step S13, before selecting a WIFI network with a signal strength greater than the signal strength of the source WIFI network to establish a connection, the embodiment of the present invention further includes the following steps: determining the type of the current area according to the detected service set identifier SSID of the WIFI network; thus, in step S13, the WIFI network having the signal strength greater than the signal strength of the source WIFI network may be selected to establish a connection according to the determined type of the current region.
The connection process with the WIFI network is described below with reference to different area types.
First, office area.
According to the characteristic that the WIFI network is deployed in the office area, the intelligent terminal can detect a plurality of WIFI networks which are at least partially identical to SSIDs of the source WIFI network in the office area. In this way, in the moving process of the intelligent terminal, if it is determined that the signal intensity of the currently connected WIFI network is lower than the preset signal intensity threshold value and a plurality of WIFI networks with at least partial content of the SSID of the source WIFI network are detected, it can be determined that the current area is an office area, and in this case, in step S13, a WIFI network with at least partial content of the SSID of the source WIFI network and the strongest signal intensity can be selected to establish connection.
It should be noted that, in the specific implementation, if the connection with the selected WIFI network fails, the connection with the source WIFI network may be established again.
And II, a family area.
According to the characteristics of the WIFI networks deployed in the home area, the intelligent terminal can detect the WIFI networks with different SSIDs of the multiple source WIFI networks in the home area. In this way, in the moving process of the intelligent terminal, if it is determined that the signal intensity of the currently connected WIFI network is lower than the preset signal intensity threshold value and the WIFI networks with different SSIDs of the multiple source WIFI networks are detected, it can be determined that the current area is a home area, and in this case, in step S13, the WIFI network with the strongest signal intensity and the connection password recorded can be selected to establish connection.
Similarly, if the connection with the selected WIFI network fails, the connection with the source WIFI network may be reestablished.
Three, common area
According to the characteristics of WIFI networks deployed in a public area, in the public area, if the intelligent terminal detects that the SSID exists in at least one WIFI network in a prestored SSID set, the current area is determined to be the public area. In this way, in the moving process of the intelligent terminal, if the signal intensity of the currently connected WIFI network is judged to be lower than the preset signal intensity threshold value, and the SSID is detected to exist in at least one WIFI network in the prestored SSID set, the current area can be determined to be a public area, and in this case, the WIFI network can be selected to establish connection according to the following procedures: requesting a connection password of the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network from a network side according to a target SSID corresponding to the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network; and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side. Specifically, the intelligent terminal can send a request to the cloud server, wherein the request carries a detected target SSID which exists in a prestored SSID set and has a signal strength greater than that of a target WIFI network corresponding to a source WIFI network, after receiving the request, the cloud server searches for a corresponding connection password according to the target SSID and returns the connection password, and the intelligent terminal selects a WIFI network with the strongest signal strength to establish connection according to the received connection password.
Similarly, if the connection with the selected WIFI network fails, the connection with the source WIFI network may be reestablished.
The following description will be given by taking a process of establishing connection between an intelligent terminal based on an Android operating system and a WIFI network as an example. Specifically, when the intelligent terminal is connected to the WIFI network through Settings, a connect () method of the WIFI manager is indirectly called, and the connect () method has two forms, one of which accepts a WIFI configuration object and the other of which accepts a network id of a certain WIFI network. The WIFI configuration describes all configuration information for one WIFI connection.
The method comprises the following steps that the ServiceHandler of the WifiManager and the ClientHandler of the WifiService communicate through an asynchronous channel, and a CONNECT _ NETWORK message is sent to the WifiServiceImpl through an AsyncChannel mechanism, and the method comprises the following steps:
1. and storing the WIFI network information transmitted by the connect () into the WifiConfigStore object.
2. Updating the Priority attribute of the WificConfigStore and the config through a WificConfigStore function and updating the Priority attribute of the WificConfigStore and the config to a wpa _ s configuration file; the WIFI network to be connected currently by enable, and other WIFI networks by disable.
3. And sending a connection instruction to the wpa _ s through a WifiNative:: reconnect () function, and connecting the selected WIFI network.
In the WIFI network switching method provided by the embodiment of the invention, when the signal intensity of a source WIFI network currently connected with the intelligent terminal is monitored to be lower than a preset signal intensity threshold value, whether a WIFI network with higher signal intensity and capable of being connected exists in a current area is judged, if yes, the connection with the source WIFI network is actively released, and the WIFI network with higher signal intensity is selected to establish the connection. The embodiment of the invention provides different network connection methods aiming at different area types. Therefore, network access delay of the intelligent terminal is reduced, and user experience is improved.
Based on the same inventive concept, the embodiment of the invention also provides a WIFI network switching device, and as the principle of the device for solving the problem is similar to that of the WIFI network switching method, the implementation of the device can refer to the implementation of the method, and repeated parts are not repeated.
As shown in fig. 2, which is a schematic structural diagram of a WIFI network switching apparatus provided in an embodiment of the present invention, the WIFI network switching apparatus includes:
the monitoring unit 21 is configured to monitor whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value after the intelligent terminal is connected to the source WIFI network;
the judging unit 22 is configured to judge whether there is a WIFI network whose signal strength is greater than a signal strength of a source WIFI network if the monitoring unit monitors that the signal strength of the source WIFI network is lower than a preset signal strength threshold;
and the network connection control unit 23 is configured to release the connection with the source WIFI network and select a WIFI network with a signal strength greater than the signal strength of the source WIFI network to establish a connection if it is determined that there is a WIFI network with a signal strength greater than the signal strength of the source WIFI network according to the determination result of the determination unit.
Optionally, the network connection control unit 23 is specifically configured to call a WIFI connection release application program interface API, and release the connection with the source WIFI network.
Optionally, the WIFI network switching apparatus further includes a determining unit, wherein:
the determining unit is configured to determine, according to a service set identifier SSID of the detected WIFI network, an area type to which a current area belongs before the network connection control unit 23 selects a WIFI network whose signal strength is greater than the source WIFI network signal strength to establish a connection;
the network connection control unit 23 is specifically configured to select, according to the determined type of the region to which the current region belongs, a WIFI network whose signal strength is greater than the signal strength of the source WIFI network to establish connection.
Preferably, the determining unit is specifically configured to determine that the current area is an office area if a plurality of WIFI networks with at least part of the same content as the SSID of the source WIFI network are detected; the network connection control unit 23 is specifically configured to select a WIFI network that has at least a portion of the same content as the SSID of the source WIFI network and has the strongest signal strength to establish a connection; or
The determining unit is specifically configured to determine that the current area is a home area if a plurality of WIFI networks different from the SSID of the source WIFI network are detected; the network connection control unit 23 is specifically configured to select the WIFI network in which the connection password is recorded and the signal strength is strongest to establish connection; or
The determining unit is specifically configured to determine that the current area is a public area if it is detected that the SSID exists in at least one WIFI network in a prestored SSID set; the network connection control unit 23 is specifically configured to request, to a network side, a connection password of the WIFI network having the signal strength greater than the signal strength of the source WIFI network according to the target SSID corresponding to the WIFI network having the signal strength greater than the signal strength of the source WIFI network; and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention.
Having described the WIFI network switching method and apparatus according to an exemplary embodiment of the present invention, a terminal according to another exemplary embodiment of the present invention is described next.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a terminal according to the present invention may comprise at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code, which, when executed by the processing unit, causes the processing unit to perform the steps of the WIFI network switching method according to various exemplary embodiments of the present invention described above in this specification. For example, the processing unit may perform step S11 shown in fig. 1, monitoring whether the signal strength of the source WIFI network is lower than a preset signal strength threshold value after the smart terminal is connected to the source WIFI network, and step S12, monitoring whether the signal strength of the source WIFI network is lower than the preset signal strength threshold value after the smart terminal is connected to the source WIFI network, and step S13, releasing the connection with the source WIFI network and selecting a WIFI network having a signal strength greater than the signal strength of the source WIFI network to establish a connection.
The terminal 30 according to this embodiment of the present invention is described below with reference to fig. 3. The terminal 30 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 3, the terminal 30 is in the form of a general purpose computing device. The components of the terminal 30 may include, but are not limited to: the at least one processing unit 31, the at least one memory unit 32, and a bus 33 connecting the various system components (including the memory unit 32 and the processing unit 31).
Bus 33 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The storage unit 32 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
The storage unit 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Terminal 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with terminal 30, and/or with any devices (e.g., router, modem, etc.) that enable terminal 30 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interfaces 35. Also, the terminal 30 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 36. As shown in fig. 3, the network adapter 36 communicates with other modules for the terminal 30 through the bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the terminal 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, various aspects of the WIFI network switching method provided by the present invention may also be implemented in the form of a program product, comprising program code for causing a computer device to perform the steps of the WIFI network switching method according to various exemplary embodiments of the present invention described above in this specification, when said program product is run on said computer device, for example, the computer device may perform step S11 shown in fig. 1, monitor whether the signal strength of the WIFI network is lower than a preset signal strength threshold after the smart terminal is connected to the WIFI network, and step S12, after the intelligent terminal is connected to the source WIFI network, monitoring whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value, step S13, releasing the connection with the source WIFI network, and selecting a WIFI network with signal intensity greater than that of the source WIFI network to establish connection.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for WIFI network switching of embodiments of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1. A WIFI network switching method is characterized by comprising the following steps:
after the intelligent terminal is connected to a source wireless fidelity (WIFI) network, monitoring whether the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value;
if the signal intensity of the source WIFI network is monitored to be lower than a preset signal intensity threshold value, judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists or not;
if the WIFI network with the signal strength larger than the signal strength of the source WIFI network exists according to the judgment result, releasing the connection with the source WIFI network, and selecting the WIFI network with the signal strength larger than the signal strength of the source WIFI network to establish the connection;
before the WIFI network with the signal intensity greater than the signal intensity of the source WIFI network is selected to establish connection, the method further includes:
determining the type of a region to which a current region belongs according to a Service Set Identifier (SSID) of the detected WIFI network, wherein the region type comprises an office region, a home region or a public region; and
selecting a WIFI network with signal strength greater than the signal strength of the source WIFI network to establish connection, specifically comprising:
selecting a WIFI network with signal intensity greater than that of the source WIFI network to establish connection according to the determined type of the region to which the current region belongs;
the method includes the steps of determining a region type to which a current region belongs according to a detected SSID service set identifier of the WIFI network, and specifically includes:
if a plurality of WIFI networks with the same content as at least part of SSIDs of the source WIFI network are detected, determining that the current area is an office area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
selecting a WIFI network which has at least part of the same content as the SSID of the source WIFI network and has the strongest signal strength to establish connection;
if a plurality of WIFI networks different from the SSID of the source WIFI network are detected, determining that the current area is a home area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
selecting the WIFI network which records the connection password and has the strongest signal intensity to establish connection;
if the SSID is detected to exist in at least one WIFI network in a prestored SSID set, determining that the current area is a public area; and
according to the determined region type to which the current region belongs, selecting a WIFI network with the signal intensity greater than the signal intensity of the source WIFI network to establish connection, and specifically comprising the following steps:
requesting a connection password of the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network from a network side according to a target SSID corresponding to the WIFI network with the signal intensity larger than the signal intensity of the source WIFI network; and
and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side.
2. The method of claim 1, wherein releasing the connection with the source WIFI network comprises:
and calling a WIFI connection release Application Program Interface (API) to release the connection with the source WIFI network.
3. A WIFI network switching apparatus, comprising:
the monitoring unit is used for monitoring whether the signal intensity of the source wireless fidelity (WIFI) network is lower than a preset signal intensity threshold value or not after the intelligent terminal is connected to the source wireless fidelity (WIFI) network;
the judgment unit is used for judging whether a WIFI network with the signal intensity larger than the signal intensity of the source WIFI network exists or not if the monitoring unit monitors that the signal intensity of the source WIFI network is lower than a preset signal intensity threshold value;
the network connection control unit is used for releasing the connection with the source WIFI network and selecting the WIFI network with the signal strength larger than the signal strength of the source WIFI network to establish the connection if the WIFI network with the signal strength larger than the signal strength of the source WIFI network is determined according to the judgment result of the judgment unit;
the determining unit is configured to determine, before the network connection control unit selects a WIFI network with a signal strength greater than the signal strength of the source WIFI network to establish a connection, an area type to which a current area belongs according to a service set identifier SSID of the detected WIFI network, where the area type includes an office area, a home area, or a public area;
the network connection control unit is specifically used for selecting a WIFI network with signal strength greater than that of the source WIFI network to establish connection according to the determined region type to which the current region belongs;
the determining unit is specifically configured to determine that the current area is an office area if a plurality of WIFI networks with at least part of the same content as the SSID of the source WIFI network are detected;
the network connection control unit is specifically used for selecting a WIFI network which has at least part of the same content as the SSID of the source WIFI network and has the strongest signal strength to establish connection; or
The determining unit is specifically configured to determine that the current area is a home area if a plurality of WIFI networks different from the SSID of the source WIFI network are detected;
the network connection control unit is specifically used for selecting the WIFI network which records the connection password and has the strongest signal intensity to establish connection; or
The determining unit is specifically configured to determine that the current area is a public area if it is detected that the SSID exists in at least one WIFI network in a prestored SSID set;
the network connection control unit is specifically configured to request, from a network side, a connection password of the WIFI network having the signal strength greater than the signal strength of the source WIFI network according to a target SSID corresponding to the WIFI network having the signal strength greater than the signal strength of the source WIFI network; and selecting the WIFI network with the strongest signal intensity to establish connection according to the connection password returned by the network side.
4. The apparatus of claim 3, wherein the network connection control unit is specifically configured to invoke a WIFI connection release Application Program Interface (API) to release the connection with the source WIFI network.
5. A terminal, characterized in that the terminal comprises a processor and a memory, the processor being adapted to carry out the steps of the method according to any of claims 1-2 when executing a computer program stored in the memory.
6. A readable storage medium, having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the steps of the method according to any of the claims 1-2.
CN201711160659.3A 2017-11-20 2017-11-20 WIFI network switching method, device, terminal and medium Active CN107820289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711160659.3A CN107820289B (en) 2017-11-20 2017-11-20 WIFI network switching method, device, terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711160659.3A CN107820289B (en) 2017-11-20 2017-11-20 WIFI network switching method, device, terminal and medium

Publications (2)

Publication Number Publication Date
CN107820289A CN107820289A (en) 2018-03-20
CN107820289B true CN107820289B (en) 2020-09-25

Family

ID=61609629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711160659.3A Active CN107820289B (en) 2017-11-20 2017-11-20 WIFI network switching method, device, terminal and medium

Country Status (1)

Country Link
CN (1) CN107820289B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379766A (en) * 2018-11-27 2019-02-22 青岛海信宽带多媒体技术有限公司 A kind of method and device switching WiFi network
CN110809300B (en) * 2019-11-19 2024-03-22 上海商米科技集团股份有限公司 WiFi channel switching method and wireless access point
CN111787599B (en) * 2020-08-06 2022-09-16 Oppo(重庆)智能科技有限公司 WIFI frequency band selection method and device, electronic equipment and storage medium
CN113660684A (en) * 2021-08-20 2021-11-16 中国工商银行股份有限公司 Terminal equipment network self-adaptive optimization method and device
CN114339912A (en) * 2021-12-28 2022-04-12 达闼机器人有限公司 Network connection method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959321A (en) * 2010-09-17 2011-01-26 惠州Tcl移动通信有限公司 Scene mode switching method based on mobile phone WIFI and mobile phone
CN102083152A (en) * 2011-03-07 2011-06-01 宇龙计算机通信科技(深圳)有限公司 Method for switching hotspots in wireless local area network (WLAN) and terminal
CN102917424A (en) * 2012-10-25 2013-02-06 陕西科技大学 AP (application process) switching method used in WiFi (wireless fidelity) communication
CN104683546A (en) * 2013-11-29 2015-06-03 深圳富泰宏精密工业有限公司 Profile switching device and method
CN105550591A (en) * 2015-12-10 2016-05-04 厦门美图移动科技有限公司 Security protection device and method for user data in mobile terminal
CN105592517A (en) * 2016-02-17 2016-05-18 宇龙计算机通信科技(深圳)有限公司 Network connection processing method, network connection processing device, and network connection processing terminal
CN105657706A (en) * 2015-10-30 2016-06-08 东莞酷派软件技术有限公司 Access method, related device and access apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070232307A1 (en) * 2004-12-16 2007-10-04 Tarek Ibrahim Pico Cell Wireless Local Area Network (Wlan)
KR100949163B1 (en) * 2008-01-23 2010-03-23 경북대학교 산학협력단 Methods and System for Application-Aware and Power-Efficient Fast Handover in Wireless LAN

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959321A (en) * 2010-09-17 2011-01-26 惠州Tcl移动通信有限公司 Scene mode switching method based on mobile phone WIFI and mobile phone
CN102083152A (en) * 2011-03-07 2011-06-01 宇龙计算机通信科技(深圳)有限公司 Method for switching hotspots in wireless local area network (WLAN) and terminal
CN102917424A (en) * 2012-10-25 2013-02-06 陕西科技大学 AP (application process) switching method used in WiFi (wireless fidelity) communication
CN104683546A (en) * 2013-11-29 2015-06-03 深圳富泰宏精密工业有限公司 Profile switching device and method
CN105657706A (en) * 2015-10-30 2016-06-08 东莞酷派软件技术有限公司 Access method, related device and access apparatus
CN105550591A (en) * 2015-12-10 2016-05-04 厦门美图移动科技有限公司 Security protection device and method for user data in mobile terminal
CN105592517A (en) * 2016-02-17 2016-05-18 宇龙计算机通信科技(深圳)有限公司 Network connection processing method, network connection processing device, and network connection processing terminal

Also Published As

Publication number Publication date
CN107820289A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
CN107820289B (en) WIFI network switching method, device, terminal and medium
US11019536B2 (en) Communication method and apparatus
CN103200601B (en) The fat or thin mode switching method of WAP
US20200169871A1 (en) Method, apparatus, network device, and system for releasing ip address
CN109548037B (en) Control method, distributed unit, centralized unit and storage medium
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
JP6961708B2 (en) Network connection method and equipment
CN105392181A (en) Intelligent equipment networking method and device, and system
US11553560B2 (en) Apparatus and method for supporting continuity of edge computing service in mobile network
CN111698688A (en) Terminal residing method based on 5G co-construction sharing, network equipment and communication network
US20230262572A1 (en) Communication method and related device
WO2014116210A1 (en) Balancing access point workloads
WO2014101042A1 (en) Communication method and device based on redirected circuit switched fallback
CN105960817B (en) Communication equipment and the method for configuration of communications device, storage medium
US9392507B2 (en) Method, apparatus and system for relocating user equipment between radio network controllers
BR112019019243A2 (en) control plan and device connection management method
TW201714481A (en) Method of redirecting terminal equipment to dedicated network, terminal equipment and base station
US10575365B2 (en) PDN connection release method and apparatus, and user equipment
US10079893B2 (en) M2M application request sending method, CSE and system
US8531965B2 (en) Message processing method and system
US10531510B2 (en) Method for service transmission and transmission device
CN117255131A (en) Method, device, equipment and readable medium for carrying out service request based on slice
KR20210064940A (en) Apparatus and method for determining target terminal for handover
JP2023542822A (en) Methods, devices, equipment and readable storage media for terminals to access the network
TWI682686B (en) Connection management techniques for wireless network mobility procedures

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
GR01 Patent grant
GR01 Patent grant