WO2015131562A1 - Wifi连接方法及装置 - Google Patents

Wifi连接方法及装置 Download PDF

Info

Publication number
WO2015131562A1
WO2015131562A1 PCT/CN2014/092074 CN2014092074W WO2015131562A1 WO 2015131562 A1 WO2015131562 A1 WO 2015131562A1 CN 2014092074 W CN2014092074 W CN 2014092074W WO 2015131562 A1 WO2015131562 A1 WO 2015131562A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
wifi hotspot
location information
saved
wifi
Prior art date
Application number
PCT/CN2014/092074
Other languages
English (en)
French (fr)
Inventor
王战盟
张文娜
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015131562A1 publication Critical patent/WO2015131562A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of communications, and in particular to a wireless Fidelity (WIFI) connection method and apparatus.
  • WIFI wireless Fidelity
  • the endurance capability of a mobile terminal is increasingly becoming one of the most concerned performances of users. Reducing the power consumption of a mobile terminal and increasing the endurance capability can directly enhance the market competitiveness of the mobile terminal. Reducing power consumption has also become a major research topic for researchers.
  • WIFI Worldwide Interoperability for Microwave Access
  • WIFI is an important function of mobile terminals, and the frequency of use is getting higher and higher.
  • WIFI is also a big aspect of power consumption.
  • WIFI scans hotspots, it consumes a lot of power.
  • People have also made efforts to reduce the power consumption of WIFI in many aspects, but some of these methods will affect the performance of WIFI, and some of them are less obvious.
  • the embodiment of the invention provides a WIFI connection method and device, so as to at least solve the problem that the method for reducing WIFI power consumption in the related art is not effective.
  • a WIFI connection method including: acquiring current location information of a mobile terminal before a WIFI hotspot scan; determining a current location information of the mobile terminal and a WIFI hotspot saved by the mobile terminal In the case that the corresponding location information is matched, a connection is directly established to the saved WIFI hotspot of the mobile terminal.
  • determining that the current location information of the mobile terminal and the location information corresponding to the WIFI hotspot that the mobile terminal has saved specifically includes: acquiring a location information table corresponding to the saved WIFI hotspot, where the location information table is Include the WIFI hotspot and its corresponding location range; determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, consider the current location of the mobile terminal The location information matches the location information corresponding to the saved WIFI hotspot.
  • the location range corresponding to the WIFI hotspot is a range in which the coordinates of the WIFI hotspot are used as a dot, and the preset distance value R is a radius.
  • the method further includes: counting the number of failures when the connection to the WIFI hotspot that has been saved by the mobile terminal fails.
  • the method further includes: if the connection is successfully established to the mobile saved WIFI hotspot, the counted number of the failures is cleared. zero.
  • a WIFI connection method including: acquiring current location information of a mobile terminal before scanning a WIFI hotspot; determining current location information of the mobile terminal and WIFI saved by the mobile terminal If the location information corresponding to the hotspot is matched, the WIFI hotspot scan is started, and after the WIFI hotspot that has been saved by the mobile terminal is scanned, the WIFI hotspot scan is stopped; and the WIFI hotspot that has been saved by the mobile terminal is established.
  • determining that the current location information of the mobile terminal and the location information corresponding to the WIFI hotspot that the mobile terminal has saved specifically includes: acquiring a location information table corresponding to the saved WIFI hotspot, where the location information table is Include the WIFI hotspot and its corresponding location range; determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, consider the current location of the mobile terminal The location information matches the location information corresponding to the saved WIFI hotspot.
  • the location range corresponding to the WIFI hotspot is a range in which the coordinates of the WIFI hotspot are used as a dot, and the preset distance value R is a radius.
  • a WIFI connection apparatus including: a first acquisition module, configured to acquire current location information of the mobile terminal before scanning the WIFI hotspot; and the first connection establishment module is configured to determine If the current location information of the mobile terminal matches the location information corresponding to the WIFI hotspot that has been saved by the mobile terminal, the connection is directly established to the saved WIFI hotspot of the mobile terminal.
  • the first connection establishing module includes: a first acquiring unit, configured to acquire a location information table corresponding to the saved WIFI hotspot, where the location information table includes a WIFI hotspot and a corresponding bit thereof.
  • a first matching unit configured to determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, the mobile terminal is considered to be current The location information is matched with the location information corresponding to the saved WIFI hotspot; the connection establishing unit is configured to establish a connection directly to the saved WIFI hotspot of the mobile terminal if the result of the first matching unit is matched.
  • the device further includes: a statistics module, configured to count the number of failures when the connection to the WIFI hotspot that has been saved by the mobile terminal fails; and the number of failures does not reach the threshold In case, the connection to the saved WIFI hotspot of the mobile terminal is continued; and/or, if the number of failures reaches the threshold, the WIFI hotspot scanning is started.
  • a statistics module configured to count the number of failures when the connection to the WIFI hotspot that has been saved by the mobile terminal fails; and the number of failures does not reach the threshold In case, the connection to the saved WIFI hotspot of the mobile terminal is continued; and/or, if the number of failures reaches the threshold, the WIFI hotspot scanning is started.
  • the apparatus further includes: a clearing module, configured to clear the counted number of failures in the case that the connection is successfully established to the mobile saved WIFI hotspot.
  • a WIFI connection device including: a second acquisition module, configured to acquire current location information of the mobile terminal before scanning the WIFI hotspot; and the scanning module is configured to determine the If the current location information of the mobile terminal matches the location information corresponding to the saved WIFI hotspot of the mobile terminal, the WIFI hotspot scanning is started, and after scanning the WIFI hotspot that has been saved by the mobile terminal, the WIFI hotspot scanning is stopped;
  • the connection establishing module is configured to establish a connection to the saved WIFI hotspot of the mobile terminal.
  • the scanning module includes: a second acquiring unit, configured to acquire a location information table corresponding to the saved WIFI hotspot, where the location information table includes a WIFI hotspot and a corresponding location range thereof;
  • the matching unit is configured to determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, the current location information of the mobile terminal is saved and saved.
  • the location information corresponding to the WIFI hotspot is matched; the scanning unit is configured to enable the WIFI hotspot scan when the result of the second matching unit is matched, and stop after scanning the WIFI hotspot that has been saved by the mobile terminal WIFI hotspot scanning.
  • the current location information of the mobile terminal is obtained before the WIFI hotspot scanning; and when the current location information of the mobile terminal is determined to match the location information corresponding to the saved WIFI hotspot of the mobile terminal, directly
  • the method for establishing a connection by the saved WIFI hotspot of the mobile terminal solves the problem that the method for reducing WIFI power consumption in the related art is not effective, reduces the power consumption of the WIFI, thereby reducing the power consumption of the mobile terminal, and improving the mobile The battery life of the terminal battery.
  • FIG. 1 is a flowchart of a WIFI connection method according to an embodiment of the present invention.
  • FIG. 2 is a structural block diagram of a WIFI connection apparatus according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of another WIFI connection method according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of another WIFI connection device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a workflow of a method for reducing WIFI power consumption by using location information of a mobile terminal according to a preferred embodiment of the present invention
  • FIG. 6 is a structural block diagram of a mobile terminal in accordance with a preferred embodiment of the present invention.
  • FIG. 7 is a flow diagram of an implementation of an alternative in accordance with a preferred embodiment of the present invention.
  • the so-called hardware method is to control the power supply of WIFI from the design and operation of the hardware circuit to save power.
  • Some related technologies are to add corresponding devices to turn WIFI on or off, such as adding an output data judging device, and setting to judge whether the data output end of the WIFI baseband signal processor outputs data, and when outputting data, all power supply circuits of the WIFI are connected. Pass, otherwise the power circuit is disconnected.
  • Such a method will increase the hardware cost and increase the routing of the PCB circuit board, increasing the electromagnetic interference drop; on the other hand, because of the process of opening the WIFI, it takes time from the operation of the upper layer software to the loading of the underlying driver, when there is data required When the WIFI is turned on during transmission, it will bring certain delays and the possibility of losing data, reducing the performance of the user.
  • Some of the hardware technologies are used to reduce the power consumption by changing the power supply of the WIFI, that is, changing the power supply voltage of the WIFI or turning off the power supply.
  • the WIFI module at work sleep and shutdown Different power supplies are provided in the same state.
  • the WIFI When the WIFI is working, it supplies all the power, and in the sleep state, only a small part of the power is supplied, and when the WIFI is turned off, all the power supplies are turned off. This method can save power when WIFI sleeps or is turned off, but can not reduce the power consumption when WIFI works.
  • the so-called software method is to optimize the working process of WIFI from the software aspect to reduce power consumption.
  • the inventor found that in the various power consumption of WIFI, the power consumed by the terminal when scanning the hotspot is very large, so it is thought to use the other methods to save or shorten the WIFI scan.
  • the hotspot process which saves or reduces the power consumption consumed by the scanning process, thereby reducing the power consumption of the WIFI.
  • the current technical solution will perform a full scan operation before connecting to the hotspot, scan the nearby hotspots, and then establish a connection to the hotspots that need to be connected after the scan is completed. For the hotspots that have been connected before, if you want to scan again before connecting, it will cause WIFI to consume too much power, resulting in an increase in overall power consumption. That is, when the mobile terminal is in a place where the hot spot is connected before, the current technical solution will perform a full scan action before connecting the hot spot, scan all the hotspots around, and scan the hotspots that have been connected before. Make a connection. In this case, it is a process of connecting first and then scanning.
  • the power consumption of WIFI is at least 100 mA per scan.
  • some of the current positioning technologies for acquiring location information such as GPS positioning, consume less than 50 mA, and some positioning technologies such as cellular positioning do not need to be used. Consumes additional power consumption.
  • the location information of the mobile terminal is obtained by using the positioning technology to reduce the scanning before the connection, and the number of scans before the hotspot is reduced is much more than the number of scans reduced in the related scheme, from the overall power consumption.
  • the solution provided in this embodiment can greatly reduce the WIFI power consumption.
  • FIG. 1 is a flowchart of a WIFI connection method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • Step S102 Acquire current location information of the mobile terminal before scanning the WIFI hotspot
  • Step S104 If it is determined that the current location information of the mobile terminal matches the location information corresponding to the WIFI hotspot that has been saved by the mobile terminal, the connection is directly established to the saved WIFI hotspot of the mobile terminal.
  • the scanning step is skipped, and the connection is directly established with the matching WIFI hotspot.
  • the number of scans of the WIFI hotspot is greatly reduced, the problem of reducing the WIFI power consumption in the related art is solved, the WIFI power consumption is reduced, the power consumption of the mobile terminal is reduced, and the battery life of the mobile terminal is improved.
  • determining that the current location information of the mobile terminal matches the location information corresponding to the WIFI hotspot that has been saved by the mobile terminal may be as follows: acquiring a location information table corresponding to the saved WIFI hotspot, where the location information The table includes a WIFI hotspot and a corresponding location range thereof; determining, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, considering the mobile terminal The current location information matches the location information corresponding to the saved WIFI hotspot.
  • the location range corresponding to the WIFI hotspot may be a circle with the coordinates of the WIFI hotspot as a dot, and the preset distance value R being a radius.
  • the saved WIFI hotspot may change under actual conditions, for example, the hotspot has been turned off, etc., and therefore, after establishing a connection directly to the saved WIFI hotspot of the mobile terminal, it may also be established. In the case of a connection failure, the number of failures is counted.
  • the connection may be established to the saved WIFI hotspot of the mobile terminal; and/or, if the number of failures reaches the threshold, Then start the WIFI hotspot scan. If the connection is successfully established to the saved WIFI hotspot of the mobile terminal, the counted number of failures may be cleared.
  • the current location information of the mobile terminal may be acquired by at least one of the following positioning modes: Global Positioning System (GPS) positioning, and cellular positioning.
  • GPS Global Positioning System
  • the hotspot name, hotspot information, and hotspot location may be saved.
  • the hotspot information may include a service set identifier (Service Set Identifier, SSID for short) and a hotspot login password.
  • a WIFI connection device is also provided in the embodiment, and the device is configured to implement the above-mentioned embodiments and preferred embodiments, and the description thereof has been omitted.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a structural block diagram of a WIFI connection device according to an embodiment of the present invention. As shown in FIG. 2, the device includes a first acquisition module 22 and a first connection establishment module 24. The following describes each module in detail:
  • the first obtaining module 22 is configured to obtain the current location information of the mobile terminal before the WIFI hotspot scanning; the first connection establishing module 24 is connected to the first obtaining module 22, and is configured to determine the current current of the mobile terminal. If the location information matches the location information corresponding to the saved WIFI hotspot of the mobile terminal, the connection is directly established to the saved WIFI hotspot of the mobile terminal.
  • the first connection establishing module 24 may include: a first acquiring unit, configured to acquire a location information table corresponding to the saved WIFI hotspot, where the location information table includes a WIFI hotspot and a corresponding location thereof a first matching unit, connected to the first acquiring unit, configured to determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, The current location information of the mobile terminal is matched with the location information corresponding to the saved WIFI hotspot; the connection establishing unit is connected to the first matching unit, and is set to directly connect to the first matching unit if the result is matched.
  • the WIFI hotspot that has been saved by the mobile terminal establishes a connection.
  • the device may further include: a statistics module, configured to be connected to the first connection establishing module 24, configured to count the number of failures in the case that a connection failure is established to the saved WIFI hotspot of the mobile terminal; If the number of failures does not reach the threshold, continue to establish a connection to the saved WIFI hotspot of the mobile terminal; and/or, if the number of failures reaches the threshold, initiate a WIFI hotspot scan.
  • a statistics module configured to be connected to the first connection establishing module 24, configured to count the number of failures in the case that a connection failure is established to the saved WIFI hotspot of the mobile terminal; If the number of failures does not reach the threshold, continue to establish a connection to the saved WIFI hotspot of the mobile terminal; and/or, if the number of failures reaches the threshold, initiate a WIFI hotspot scan.
  • the device may further include: a clearing module, connected to the first connection establishing module 24 and the statistic module, and configured to: in the case that the connection to the mobile saved WIFI hotspot is successful, the statistical office is The number of failures is cleared.
  • a clearing module connected to the first connection establishing module 24 and the statistic module, and configured to: in the case that the connection to the mobile saved WIFI hotspot is successful, the statistical office is The number of failures is cleared.
  • FIG. 3 is a flowchart of another WIFI connection method according to an embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
  • Step S302 Obtain current location information of the mobile terminal before scanning the WIFI hotspot;
  • Step S304 in the case that it is determined that the current location information of the mobile terminal matches the location information corresponding to the WIFI hotspot that has been saved by the mobile terminal, the WIFI hotspot scanning is started, and after scanning the WIFI hotspot that has been saved by the mobile terminal, Stop WIFI hotspot scanning;
  • Step S306 establishing a connection to the WIFI hotspot that has been saved by the mobile terminal.
  • the scanning is only performed when the WIFI scanning step is started.
  • the matched saved WIFI hotspot can stop scanning and establish a connection with it, thereby greatly reducing the scanning time of the WIFI hotspot, solving the problem that the method of reducing WIFI power consumption in the related art is not effective, and reducing the WIFI power consumption. In turn, the power consumption of the mobile terminal is reduced, and the battery life of the mobile terminal battery is improved.
  • determining that the current location information of the mobile terminal matches the location information corresponding to the WIFI hotspot that has been saved by the mobile terminal may be as follows: acquiring a location information table corresponding to the saved WIFI hotspot, where the location information The table includes a WIFI hotspot and a corresponding location range thereof; determining, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, considering the mobile terminal The current location information matches the location information corresponding to the saved WIFI hotspot.
  • the location range corresponding to the WIFI hotspot may be a circle with the coordinates of the WIFI hotspot as a dot, and the preset distance value R being a radius.
  • FIG. 4 is a structural block diagram of another WIFI connection device according to an embodiment of the present invention.
  • the device includes a second obtaining module 42, a scanning module 44 and a second connection establishing module 46, and each module is described in detail below:
  • the second obtaining module 42 is configured to obtain the current location information of the mobile terminal before the WIFI hotspot scanning, and the scanning module 44 is connected to the second obtaining module 42 and configured to determine that the current location information of the mobile terminal and the mobile terminal have been If the location information corresponding to the saved WIFI hotspot matches, the WIFI hotspot scan is enabled, and after scanning the WIFI hotspot that has been saved by the mobile terminal, the WIFI hotspot scanning is stopped; the second connection establishing module 46 is connected to the scanning module 44. And being configured to establish a connection to the saved WIFI hotspot of the mobile terminal.
  • the scanning module 44 may include: a second acquiring unit, configured to acquire a location information table corresponding to the saved WIFI hotspot, where the location information table includes a WIFI hotspot and a corresponding location range thereof;
  • the second matching unit is connected to the second acquiring unit, and is configured to determine, according to the current location information of the mobile terminal, whether the current location of the mobile terminal is located in a location range corresponding to the WIFI hotspot, and if yes, the mobile device is considered to be the mobile terminal
  • the current location information of the terminal is matched with the location information corresponding to the saved WIFI hotspot;
  • the scanning unit is connected to the second matching unit, and is configured to enable the WIFI hotspot scanning when the result of the second matching unit is matched, and After scanning out the WIFI hotspot that has been saved by the mobile terminal, the WIFI hotspot scanning is stopped.
  • the hardware method will increase the hardware cost and increase the routing of the PCB circuit board, increase the electromagnetic interference drop, and also bring certain delay and loss of data when the WIFI is turned on.
  • the possibility of reducing user performance Among the software methods, some are not practical, and some may make the speed of WIFI slow and the user experience deteriorates.
  • the frequency of WIFI scanning is only slightly reduced to a certain extent, and the effect is not good enough.
  • the preferred embodiment provides a method for reducing WIFI power consumption by using location information of a mobile terminal, and a mobile terminal using the method, which uses the location location information of the mobile terminal in space to match the connection to the current location.
  • the hotspot is directly connected after the hotspot, omitting the scanning process before connecting the hotspot.
  • the power consumption of WIFI is greatly reduced without affecting the user experience.
  • the preferred embodiment uses the location location information of the mobile terminal in the space to match the spatial location information list of the hotspots stored in the system in advance, and when the mobile terminal matches the WIFI hotspot, directly To automatically connect to the hotspot; if there is no matching hotspot, scan it.
  • the method for locating the location of the mobile terminal and the hot spot to obtain location information includes, but is not limited to, GPS positioning and cellular positioning.
  • the hotspot space location information list is searched, the hotspot location information is matched according to the last saved hotspot location information, and the hotspot is not scanned. This can ensure that the user can connect to the effective hotspot, which can reduce the scanning process and effectively reduce the number of WIFI scans without affecting the user's use and experience, thereby reducing the power consumption of the WIFI.
  • FIG. 5 is a schematic diagram of a working process for reducing WIFI power consumption by using location information of a mobile terminal according to a preferred embodiment of the present invention. As shown in FIG. 5, in order to achieve the above object, a mobile terminal is provided in the preferred embodiment.
  • the method for reducing the power consumption of the WIFI includes the following steps:
  • S508 is executed to determine whether the value of the connection count counter is less than a preset threshold N. It is assumed that the value of N obtained by experience is set to be the best. The number of connection counters here is to prevent the hotspot from being present and available but the connection fails due to the abnormality of the connection operation. Therefore, the connection operation is performed for a maximum of N times. If the connection is successful N times, the connection is considered The hotspot is not open or abnormal. This ensures the reliability of the connection.
  • step S508 determines that the value of the connection count counter is less than N, perform S510 to automatically connect to the matched hotspot; and perform S512 to add 1 to the value of the connection count counter;
  • step S506 If the matching result of step S506 is no, that is, there is no matching hotspot in the location where the mobile terminal is currently located, it means that there is no previously connected hotspot in the location, so scan S518 is restarted;
  • step S520 If the result of step S520 is YES, the user is manually connected to a searched hotspot, and then S522 is executed to save the location information of the connected hotspot to the hotspot location information list.
  • step S508 to S514 are repeated, and the hotspot is directly connected, thereby eliminating the scanning process and saving power consumption.
  • the hotspot location information list can be as shown in Table 1 below.
  • the hotspot name, hotspot information, and hotspot location are saved in the table.
  • the hotspot information contains all the information that the terminal needs to connect to the hotspot, such as encryption method and password.
  • the location of the hotspot because the hotspot will cover a certain range, so the location of the hotspot here is not a specific coordinate value, but may be the circle of the hot spot, and the distance R is a range of the radius.
  • the R value can be set according to the specific situation.
  • the name, hotspot information, and hotspot location of the hotspot are saved in the list for the next query.
  • FIG. 6 is a structural block diagram of a mobile terminal according to a preferred embodiment of the present invention.
  • the mobile terminal may include a location positioning module, a location information acquiring module, a control module, and a WIFI module.
  • the position locating module completes positioning of the position of the mobile terminal in space.
  • the method for positioning the mobile terminal in a spatial location includes, but is not limited to, GPS positioning and cellular positioning;
  • a location information obtaining module configured to acquire location information of the mobile terminal, and match the hotspot location information list in the system to obtain a hotspot in the address range;
  • the control module sends an instruction to the WIFI module according to the matched hotspot
  • the WIFI module completes the corresponding operation according to the instructions issued by the control module.
  • an alternative to the above described preferred embodiment is also provided.
  • the scanning process before the connection is saved, which greatly saves the power consumption of the WIFI.
  • it is required to scan before connecting to the hotspot so it is impossible to save the scanning operation before connecting the hotspot, and this alternative can be adopted.
  • the alternative is to select a hotspot according to the location information of the mobile terminal and the hotspot location information list in the system, and the targeted hotspot needs to be connected. After the scanning, the scanning process is ended immediately, and the scanning of the hotspot is stopped.
  • FIG. 7 is a flow diagram of an implementation of an alternative in accordance with a preferred embodiment of the present invention, as shown in FIG. 7, including the following steps:
  • step S710 is performed to determine the search result in step S708. If the hot spot matching in S704 is searched, the scanning process is stopped in S712. If the hot spot matching in S704 is not found, the hotspot is not opened or abnormal. Then executing S716 to continue scanning other hot spots in the range;
  • step S706 If the matching result of step S706 is no, that is, the matching is unsuccessful, it means that there is no previously connected hotspot in the location, so scan S718 is restarted;
  • step S720 If the result of step S720 is YES, the user is manually connected to a searched hotspot, and then S722 is executed to save the location of the hotspot to the hotspot location information list.
  • step S708 to S714 When the next time the mobile terminal is in the range of the hotspot, the steps of S708 to S714 are repeated, and the hotspot is directly connected, thereby eliminating the scanning process and saving power consumption.
  • the preferred embodiment uses the location location information of the mobile terminal in the space to match the spatial location information list of the hotspots stored in the system in advance.
  • the mobile terminal matches the WIFI hotspot of the location, the mobile terminal directly connects to the hotspot directly; The matched hotspots are scanned. Connect directly without scanning before connecting to the hotspot. This can ensure that the user can connect to the effective hotspot, which can reduce the scanning process, does not affect the WIFI rate and signal strength, and saves the number of WIFI scans without affecting the user's use and experience. Low power consumption of WIFI.
  • the solution of the preferred embodiment is implemented using a software method, which is simple and practical, and does not add any hardware cost.
  • a software is provided that is configured to perform the technical solutions described in the above embodiments and preferred embodiments.
  • a storage medium in which the above software is stored, including but not limited to an optical disk, a floppy disk, a hard disk, an erasable memory, and the like.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the WIFI connection method and device provided by the embodiments of the present invention have the following beneficial effects: solving the problem that the method for reducing WIFI power consumption in the related art is not effective, reducing the WIFI power consumption, and further reducing The power consumption of the mobile terminal improves the battery life of the mobile terminal.

Landscapes

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

Abstract

本发明公开了一种WIFI连接方法及装置,其中,该方法包括:在WIFI热点扫描前,获取移动终端当前的位置信息;在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。通过本发明,解决了相关技术中的减少WIFI功耗的方式效果不佳的问题,降低了WIFI功耗,进而降低了移动终端的电量消耗,提升了移动终端电池的续航能力。

Description

WIFI连接方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种无线保真(Wireless-Fidelity,简称为WIFI)连接方法及装置。
背景技术
移动终端的续航能力越来越成为用户最关心的性能之一,降低移动终端的功耗增加续航能力能够直接提升移动终端的市场竞争力。降低功耗也成了研发人员的一大研究课题。
目前人们对于WIFI的使用越来越多,而WIFI作为移动终端的一个重要功能,使用频率也越来越高。然而,WIFI也是消耗功率的一个很大方面,当WIFI在扫描热点的时候会消耗掉很多功耗。人们也从很多方面对降低WIFI的功耗做了努力,但这些方法中有的会影响WIFI的性能,有些是效果不太明显。
针对相关技术中的减少WIFI功耗的方式效果不佳的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种WIFI连接方法及装置,以至少解决相关技术中的减少WIFI功耗的方式效果不佳的问题。
根据本发明的一个实施例,提供了一种WIFI连接方法,包括:在WIFI热点扫描前,获取移动终端当前的位置信息;在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
本实施例中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体包括:获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
本实施例中,所述WIFI热点对应的位置范围为以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
本实施例中,在直接向所述移动终端已保存的WIFI热点建立连接之后,还包括:在向所述移动终端已保存的WIFI热点建立连接失败的情况下,统计所述失败的次数。
本实施例中,在所述失败的次数未达到阈值的情况下,继续向所述移动终端已保存的WIFI热点建立连接;和/或,在所述失败的次数达到所述阈值的情况下,启动WIFI热点扫描。
本实施例中,在直接向所述移动终端已保存的WIFI热点建立连接之后,还包括:在向所述移动已保存的WIFI热点建立连接成功的情况下,将统计的所述失败的次数清零。
根据本发明的另一实施例,提供了一种WIFI连接方法,包括:在WIFI热点扫描前,获取移动终端当前的位置信息;在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;向所述移动终端已保存的WIFI热点建立连接。
本实施例中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体包括:获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
本实施例中,所述WIFI热点对应的位置范围为以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
根据本发明的再一实施例,提供了一种WIFI连接装置,包括:第一获取模块,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;第一连接建立模块,设置为在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
本实施例中,所述第一连接建立模块包括:第一获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位 置范围;第一匹配单元,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与保存的WIFI热点对应的位置信息匹配;连接建立单元,设置为在所述第一匹配单元的结果为匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
本实施例中,所述装置还包括:统计模块,设置为在向所述移动终端已保存的WIFI热点建立连接失败的情况下,统计所述失败的次数;在所述失败的次数未达到阈值的情况下,继续向所述移动终端已保存的WIFI热点建立连接;和/或,在所述失败的次数达到所述阈值的情况下,启动WIFI热点扫描。
本实施例中,所述装置还包括:清零模块,设置为在向所述移动已保存的WIFI热点建立连接成功的情况下,将统计的所述失败的次数清零。
根据本发明的再一实施例,还提供了一种WIFI连接装置,包括:第二获取模块,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;扫描模块,设置为在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;第二连接建立模块,设置为向所述移动终端已保存的WIFI热点建立连接。
本实施例中,所述扫描模块包括:第二获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;第二匹配单元,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配;扫描单元,设置为在所述第二匹配单元的结果为匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描。
通过本发明实施例,采用在WIFI热点扫描前,获取移动终端当前的位置信息;在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接的方式,解决了相关技术中的减少WIFI功耗的方式效果不佳的问题,降低了WIFI功耗,进而降低了移动终端的电量消耗,提升了移动终端电池的续航能力。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的一种WIFI连接方法的流程图;
图2是根据本发明实施例的一种WIFI连接装置的结构框图;
图3是根据本发明实施例的另一种WIFI连接方法的流程图;
图4是根据本发明实施例的另一种WIFI连接装置的结构框图;
图5是根据本发明优选实施例的一种利用移动终端的位置信息降低WIFI功耗方法的工作流程示意图;
图6是根据本发明优选实施例的移动终端的结构框图;
图7是根据本发明优选实施例的替代方案的实现流程图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
在目前的减少WIFI功耗的方法中,大体来说分为两类:一类是硬件方法,另一类是软件的方法。
所谓硬件方法,就是从硬件电路的设计与操作上对WIFI的供电进行控制以达到节省功耗的目的。相关技术中有的是增加相应的器件来打开或者关闭WIFI,如增加一个输出数据判断装置,设置为判断WIFI基带信号处理器的数据输出端是否输出数据,当输出数据时,将WIFI的所有电源电路接通,否则就将电源电路断开。这样的方法会增加硬件成本以及增加PCB电路板的走线,增加了电磁干扰降;另一方面,因为打开WIFI的过程,从上层软件的运行到底层驱动的加载都需要时间,当有数据需要传输的时候才去打开WIFI,会带来一定的延迟和丢失数据的可能,降低用户体现性能。
采用硬件技术中还有的是通过改变WIFI的供电,即改变WIFI的供电电压或者关闭供电的方法来达到降低功耗的目的。例如根据WIFI模块在工作、休眠和关闭的不 同状态下来分别进行不同的电源供给。在WIFI工作时供给全电源,在休眠状态下只供给少部分电源,在WIFI关闭时则关闭其所有电源供给。该方法能够在WIFI休眠或者关闭的情况下节省功耗,但不能降低WIFI工作时候的功耗。
所谓软件方法,就是从软件方面对WIFI的工作过程进行优化来降低功耗。在以往的终端项目中,发明人发现在WIFI的各种功耗中,终端扫描热点的时候消耗的功耗很大,因此想到针对WIFI使用的场景,利用其它的方法来省掉或者缩短WIFI扫描热点的过程,这样就省掉或者减少了扫描过程消耗的功耗,从而降低了WIFI的功耗。
目前的技术方案都会在连接热点之前先做一次全扫描操作,对附近的热点进行扫描,扫描完成后再对需要连接的热点建立连接。这对于之前连接过的热点而言,在连接之前还要再进行扫描的话,就会使WIFI消耗过多的功率,造成整体功耗的增加。也就是当移动终端处于一个有之前连接过热点的地方时,目前的技术方案都会在连接该热点之前先做一次全扫描动作,对周围所有的热点进行扫描,扫描到之前连接过的热点后再进行连接。这样的话,是一个先扫描后连接的过程。既然当移动终端处于有之前连接过热点的地方,先扫描后再连接到该热点,那么就完全可以省掉这个扫描的过程而直接连接到该热点。这样就会减少了一次扫描过程,而这种情况的扫描次数是相当多的。WIFI每做一次扫描的功耗至少是100多毫安,而目前的获取位置信息的定位技术中,有的是定位技术比如GPS定位消耗的功耗不到50毫安,有的定位技术比如蜂窝定位不用消耗额外的功耗。本实施例利用定位技术获取移动终端的位置信息减少了连接前的扫描,减少了这种连接热点前的扫描的次数要比相关方案中减少的扫描次数要多很多,从整体的功率消耗来说,本实施例提供的方案能够极大的降低WIFI功耗。
基于上述思路,在本实施例中,提供了一种WIFI连接方法,图1是根据本发明实施例的一种WIFI连接方法的流程图,如图1所示,该方法包括如下步骤:
步骤S102,在WIFI热点扫描前,获取移动终端当前的位置信息;
步骤S104,在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
本实施例通过上述步骤,在WIFI热点扫描前,如果发现移动终端当前的位置信息与WIFI保存的热点对应的位置信息相匹配,则跳过扫描步骤而是直接与匹配的WIFI热点建立连接,从而大大减少了WIFI热点的扫描次数,解决了相关技术中的减少WIFI功耗的方式效果不佳的问题,降低了WIFI功耗,进而降低了移动终端的电量消耗,提升了移动终端电池的续航能力。
在本实施例中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体可以如下:获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
其中,所述WIFI热点对应的位置范围可以是以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
本实施例中,考虑到已保存的WIFI热点在实际情况下有可能发生改变,例如热点已经被关闭等,因此,在直接向所述移动终端已保存的WIFI热点建立连接之后,还可以在建立连接失败的情况下,统计所述失败的次数。
可选地,在所述失败的次数未达到阈值的情况下,可以继续向所述移动终端已保存的WIFI热点建立连接;和/或,在所述失败的次数达到所述阈值的情况下,则启动WIFI热点扫描。而如果向所述移动终端已保存的WIFI热点建立连接成功,则可以将统计的所述失败的次数清零。
在本实施例中,可以通过以下定位方式至少之一获取所述移动终端当前的位置信息:全球定位系统(Global Positioning System,简称为GPS)定位、蜂窝定位。
在本实施例中,在手动或自动登录一个WIFI热点后,可以保存该热点的名称、热点信息、以及热点位置。其中,所述热点信息可以包括热点的服务集标识(Service Set Identifier,简称为SSID)及热点登录密码。
对应于上述的一种WIFI连接方法,在本实施例中还提供了一种WIFI连接装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的一种WIFI连接装置的结构框图,如图2所示,该装置包括第一获取模块22和第一连接建立模块24,下面对各个模块进行详细说明:
第一获取模块22,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;第一连接建立模块24,与第一获取模块22相连,设置为在确定所述移动终端当前的 位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
可选地,所述第一连接建立模块24可以包括:第一获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;第一匹配单元,与第一获取单元相连,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与保存的WIFI热点对应的位置信息匹配;连接建立单元,与第一匹配单元相连,设置为在所述第一匹配单元的结果为匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
可选地,所述装置还可以包括:统计模块,与第一连接建立模块24相连,设置为在向所述移动终端已保存的WIFI热点建立连接失败的情况下,统计所述失败的次数;在所述失败的次数未达到阈值的情况下,继续向所述移动终端已保存的WIFI热点建立连接;和/或,在所述失败的次数达到所述阈值的情况下,启动WIFI热点扫描。
可选地,所述装置还可以包括:清零模块,与第一连接建立模块24和统计模块相连,设置为在向所述移动已保存的WIFI热点建立连接成功的情况下,将统计的所述失败的次数清零。
在本实施例中,还提供了另一种WIFI连接方法,图3是根据本发明实施例的另一种WIFI连接方法的流程图,如图3所示,该方法包括如下步骤:
步骤S302,在WIFI热点扫描前,获取移动终端当前的位置信息;
步骤S304,在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;
步骤S306,向所述移动终端已保存的WIFI热点建立连接。
本实施例通过上述步骤,本实施例通过上述步骤,在WIFI热点扫描前,如果发现移动终端当前的位置信息与保存的WIFI热点对应的位置信息相匹配,则在启动WIFI扫描步骤时仅扫描到匹配的已保存的WIFI热点即可停止扫描并与其建立连接,从而大大降低了WIFI热点的扫描时长,解决了相关技术中的减少WIFI功耗的方式效果不佳的问题,降低了WIFI功耗,进而降低了移动终端的电量消耗,提升了移动终端电池的续航能力。
在本实施例中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体可以如下:获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
其中,所述WIFI热点对应的位置范围可以是以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
对应于上述另一种WIFI连接方法,在本实施例中还提供了另一种WIFI连接装置,图4是根据本发明实施例的另一种WIFI连接装置的结构框图,如图4所示,该装置包括第二获取模块42、扫描模块44和第二连接建立模块46,下面对各个模块进行详细说明:
第二获取模块42,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;扫描模块44,与第二获取模块42相连,设置为在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;第二连接建立模块46,与扫描模块44相连,设置为向所述移动终端已保存的WIFI热点建立连接。
可选地,所述扫描模块44可以包括:第二获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;第二匹配单元,与第二获取单元相连,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配;扫描单元,与第二匹配单元相连,设置为在所述第二匹配单元的结果为匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描。
下面结合优选实施例进行说明,以下优选实施例结合了上述实施例及其优选实施方式。
考虑到目前的降低移动终端WIFI功耗的方法中,硬件方法会增加硬件成本以及增加PCB电路板的走线,增加了电磁干扰降,同时还会有在打开WIFI带来一定的延迟和丢失数据的可能,降低用户体现性能。软件方法中,有的是不实用,有的是会使得WIFI的速度变慢而导致用户体验变差。对于目前采用最多的通过对WIFI扫描频率 的改变来降低功耗的方法中,都只是在一定程度上少许的减少了WIFI扫描的频率,效果还不够好。
因此,本优选实施例提供了一种利用移动终端的位置信息降低WIFI功耗的方法及使用该方法的移动终端,是利用移动终端在空间中的位置定位信息来匹配到当前场所中之前连接过的热点之后直接进行连接,省略了在连接该热点之前的扫描过程。在不影响用户体验的前提下极大的降低了WIFI的功耗。
具体地,本优选实施例在相关技术方案的基础上,利用移动终端在空间中的位置定位信息与系统中事先保存的热点的空间位置信息列表进行匹配,当移动终端匹配到WIFI热点后则直接去自动连接该热点;若没有匹配的热点,才进行扫描。本优选实施例中,所提到的对移动终端和热点的位置进行定位获取位置信息的方法包括但不仅限于GPS定位、蜂窝定位。当用户手动连接热点时,就获取到该WIFI热点的空间位置信息,并保存在热点的空间位置信息列表中。当以后移动终端再次处于该热点的区域内时,就通过查找热点空间位置信息列表,根据上次保存的热点位置信息匹配到该热点,不再进行扫描而连接到该热点。这样既能确保用户连接到有效热点既能减少了扫描过程,在确保不影响用户使用及体验的前提下有效减少WIFI扫描的次数,从而降低了WIFI的功耗。
下面结合附图详细说明本优选实施例提供的方案:
为解决上述不足,降低WIFI功耗,本优选实施例提供了一种较佳的实施方案,即利用移动终端的空间位置定位信息匹配到当前场所中的热点,不用扫描直接连接到该热点,从而省掉了WIFI的扫描降低功耗。图5是根据本发明优选实施例的一种利用移动终端的位置信息降低WIFI功耗方法的工作流程示意图,如图5所示,为达到上述目的,本优选实施例提出的一种利用移动终端的位置信息降低WIFI功耗的方法,具体包括以下步骤:
1)在WIFI扫描前,先获取移动终端的位置信息S502;
2)将获取到的移动终端的位置信息与系统中保存的热点位置信息列表进行匹配S504;
3)对匹配结果进行判断S506;若匹配成功则去执行S508准备连接热点;若匹配失败,则去执行S518启动扫描;
4)若S506的结果匹配成功则准备连接该热点,先去执行S508判断连接次数计数器的值是否小于预设的阈值N,假设根据经验所得N的值设为3效果最好。此处的连接次数计数器,是为了防止该热点确实存在且可用但是由于连接操作的异常而造成连接失败的情况,所以做了最多N次的连接操作,若N次都没有连接成功,则认为该热点没有打开或者异常。这样就确保了连接的可靠性。
5)若步骤S508的结果判断连接次数计数器的值是小于N,执行S510自动去连接匹配到的热点;并执行S512对连接次数计数器的值加1;
6)执行S514判断连接是否成功,如果连接成功,则执行S516将连接次数计数器的值清零,流程结束;
7)若S514的结果为连接失败,则转去执行S508,重复S508~S514的步骤,再次进行连接操作;直到S508中判断连接次数计数器的值不小于N,转去执行S518启动扫描。在做了N次连接操作后,如果都还没有连接成功的话,则说明该热点当前没有被打开或者异常,此时转去执行S518启动扫描,搜索该位置范围内的所有热点;
8)如果步骤S506的匹配结果为否,即没有匹配到移动终端当前所处场所中的热点,则说明在该位置中没有之前连接过的热点,所以再启动扫描S518;
9)对S518的扫描结果进行判断是否有手动连接到热点的操作S520;
10)若步骤S520的结果为是,说明用户手动连接到了一个搜索到的热点,然后执行S522将该连接的热点的位置信息保存到热点位置信息列表中。当下次移动终端再处于该热点的范围内时,就重复S508~S514的步骤,直接连接到该热点,这样就省掉了扫描的过程,节省了功耗。
热点位置信息列表可以如下表1所示。该表中保存了热点名称、热点信息及热点位置。
表1
热点序号 热点名称 热点的信息 热点的位置
1 名称 信息 位置坐标
2 名称 信息 位置坐标
...
n 名称 信息 位置坐标
其中:
热点的信息,包含了终端连接热点所需要的所有信息,如加密方式、密码等。
热点的位置,因为热点会覆盖一定的范围,所以,此处所说的热点的位置,并非一个具体的坐标值,而可以是以该热点的坐标为圆点,一定距离值R为半径的一个范围,该R值可根据具体情况进行设置。
当每次有手动连接热点的操作时,就将该热点的名称、热点信息、热点位置保存在该列表中,以便下次查询。
图6是根据本发明优选实施例的移动终端的结构框图,如图6所示,该移动终端中可以包括位置定位模块、位置信息获取模块、控制模块、WIFI模块。
其中:
位置定位模块,完成对移动终端在空间中的位置进行定位。本优选实施例中,对移动终端在空间位置进行定位的方法包括但不仅限于GPS定位、蜂窝定位;
位置信息获取模块,用来获取移动终端的位置信息,并与系统中的热点位置信息列表进行匹配,得到该地址范围内的热点;
控制模块,根据匹配到的热点,对WIFI模块发出指令进行相应操作;
WIFI模块,根据控制模块发出的指令,完成相应的操作。
此外,在本优选实施例中,还提供了一种上述较佳实施方案的替代方案。在上述较佳方案中,省掉了连接前的扫描过程,极大的节省了WIFI的功耗。但在有些需求中,要求在连接热点前必须进行扫描,所以就无法省掉连接热点前的扫描操作,则可以采用本替代方案。本替代方案是根据移动终端的位置信息与系统中热点位置信息列表匹配到的热点,有针对性的搜索需要连接的热点,扫描到之后就立即结束扫描过程,停止不需要热点的扫描。而且因为移动终端处于需要连接的热点范围内,在该范围内该热点的信号是最强或者比较强的,一般会最先被搜到。这样就在极短的时间内搜到了需要连接的热点,极大的缩短了连接热点之前的这次扫描的时间,减少了WIFI的功耗。图7是根据本发明优选实施例的替代方案的实现流程图,如图7所示,包括以下步骤:
1)在WIFI扫描前,先获取移动终端的位置信息S702;
2)将获取到的移动终端的位置信息与系统中之前保存的热点位置信息列表进行匹配S704;
3)对匹配结果进行判断S706;若匹配成功则去执行S708;若匹配失败,则去执行S718启动扫描;
4)若S706的结果匹配成功则说明给区域范围内存在有效的热点,先去执行S708根据匹配的结果,针对性的搜索匹配到的热点;
5)对步骤S708的搜索结果进行判断S710,若搜索到S704中匹配成功的热点,则执行S712停止扫描过程;若没有搜索到S704中匹配成功的热点,则说明该热点没有被打开或者异常,然后执行S716,继续扫描该范围内的其它的热点;
6)执行S714自动连接到S712中搜到的热点,流程结束;这样就有针对性的搜索需要连接的热点,扫描到之后就立即结束扫描过程,停止扫描不需要的热点。而且因为移动终端处于需要连接的热点范围内,该热点的信号是最强或者比较强的,一般会被最先搜到。这样就在极短的时间内搜到了需要连接的热点,极大的缩短了这次扫描的时间,减少了WIFI的功耗。
7)如果步骤S706的匹配结果为否,即匹配不成功,则说明在该位置中没有之前连接过的热点,所以再启动扫描S718;
8)对扫描的结果判断是否有手动连接到热点的操作S720;
9)若步骤S720的结果为是,说明用户手动连接到了一个搜索到的热点,然后执行S722将该热点的位置保存到热点位置信息列表中。当下次移动终端再处于该热点的范围内时,就重复S708~S714的步骤,直接连接到该热点,这样就省掉了扫描的过程,节省了功耗。
本优选实施例能够实现如下技术效果:
本优选实施例利用移动终端在空间中的位置定位信息与系统中事先保存的热点的空间位置信息列表进行匹配,当移动终端匹配到该位置的WIFI热点后就直接去自动连接该热点;若没有匹配的热点才进行扫描。在连接热点前不再进行扫描而直接连接。这样既能确保用户连接到有效热点既能减少了扫描过程,不会影响到WIFI的速率及信号强度,在确保不影响用户使用及体验的前提下省掉了WIFI扫描的次数,从而降 低了WIFI的功耗。本优选实施例的方案使用软件方法实现,简单实用,不会增加任何的硬件成本。
在另外一个实施例中,还提供了一种软件,该软件设置为执行上述实施例及优选实施例中描述的技术方案。
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于光盘、软盘、硬盘、可擦写存储器等。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
如上所述,本发明实施例提供的一种WIFI连接方法及装置,具有以下有益效果:解决了相关技术中的减少WIFI功耗的方式效果不佳的问题,降低了WIFI功耗,进而降低了移动终端的电量消耗,提升了移动终端电池的续航能力。

Claims (15)

  1. 一种WIFI连接方法,包括:
    在WIFI热点扫描前,获取移动终端当前的位置信息;
    在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
  2. 根据权利要求1所述的方法,其中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体包括:
    获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;
    根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
  3. 根据权利要求2所述的方法,其中,
    所述WIFI热点对应的位置范围为以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
  4. 根据权利要求1至3中任一项所述的方法,其中,在直接向所述移动终端已保存的WIFI热点建立连接之后,还包括:
    在向所述移动终端已保存的WIFI热点建立连接失败的情况下,统计所述失败的次数。
  5. 根据权利要求4所述的方法,其中,
    在所述失败的次数未达到阈值的情况下,继续向所述移动终端已保存的WIFI热点建立连接;和/或,
    在所述失败的次数达到所述阈值的情况下,启动WIFI热点扫描。
  6. 根据权利要求4所述的方法,其中,在直接向所述移动终端已保存的WIFI热点建立连接之后,还包括:
    在向所述移动已保存的WIFI热点建立连接成功的情况下,将统计的所述失败的次数清零。
  7. 一种WIFI连接方法,包括:
    在WIFI热点扫描前,获取移动终端当前的位置信息;
    在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;
    向所述移动终端已保存的WIFI热点建立连接。
  8. 根据权利要求7所述的方法,其中,确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配具体包括:
    获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;
    根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配。
  9. 根据权利要求8所述的方法,其中,
    所述WIFI热点对应的位置范围为以所述WIFI热点的坐标为圆点,预设距离值R为半径的范围。
  10. 一种WIFI连接装置,包括:
    第一获取模块,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;
    第一连接建立模块,设置为在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
  11. 根据权利要求10所述的装置,其中,所述第一连接建立模块包括:
    第一获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;
    第一匹配单元,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与保存的WIFI热点对应的位置信息匹配;
    连接建立单元,设置为在所述第一匹配单元的结果为匹配的情况下,直接向所述移动终端已保存的WIFI热点建立连接。
  12. 根据权利要求10或11所述的装置,其中,所述装置还包括:
    统计模块,设置为在向所述移动终端已保存的WIFI热点建立连接失败的情况下,统计所述失败的次数;在所述失败的次数未达到阈值的情况下,继续向所述移动终端已保存的WIFI热点建立连接;和/或,在所述失败的次数达到所述阈值的情况下,启动WIFI热点扫描。
  13. 根据权利要求12所述的装置,其中,所述装置还包括:
    清零模块,设置为在向所述移动已保存的WIFI热点建立连接成功的情况下,将统计的所述失败的次数清零。
  14. 一种WIFI连接装置,包括:
    第二获取模块,设置为在WIFI热点扫描前,获取移动终端当前的位置信息;
    扫描模块,设置为在确定所述移动终端当前的位置信息与移动终端已保存的WIFI热点对应的位置信息匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描;
    第二连接建立模块,设置为向所述移动终端已保存的WIFI热点建立连接。
  15. 根据权利要求14所述的装置,其中,所述扫描模块包括:
    第二获取单元,设置为获取已保存的WIFI热点对应的位置信息表,其中,所述位置信息表中包括WIFI热点及其对应的位置范围;
    第二匹配单元,设置为根据所述移动终端当前的位置信息判断所述移动终端当前的位置是否位于所述WIFI热点对应的位置范围内,如果是,则认为所述移动终端当前的位置信息与已保存的WIFI热点对应的位置信息匹配;
    扫描单元,设置为在所述第二匹配单元的结果为匹配的情况下,开启WIFI热点扫描,并在扫描出所述移动终端已保存的WIFI热点之后,停止WIFI热点扫描。
PCT/CN2014/092074 2014-09-22 2014-11-24 Wifi连接方法及装置 WO2015131562A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410486159.9 2014-09-22
CN201410486159.9A CN105516913A (zh) 2014-09-22 2014-09-22 Wifi连接方法及装置

Publications (1)

Publication Number Publication Date
WO2015131562A1 true WO2015131562A1 (zh) 2015-09-11

Family

ID=54054444

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092074 WO2015131562A1 (zh) 2014-09-22 2014-11-24 Wifi连接方法及装置

Country Status (2)

Country Link
CN (1) CN105516913A (zh)
WO (1) WO2015131562A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105517189A (zh) * 2015-11-27 2016-04-20 小米科技有限责任公司 实现wifi连接的方法及装置
WO2016180114A1 (zh) * 2015-10-14 2016-11-17 中兴通讯股份有限公司 终端热点休眠的方法和装置
WO2018006505A1 (zh) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 一种信息处理方法和装置
CN107979865A (zh) * 2017-12-22 2018-05-01 广东小天才科技有限公司 连接WiFi热点的方法、装置、移动终端及存储介质
CN109905911A (zh) * 2019-03-18 2019-06-18 努比亚技术有限公司 WiFi控制方法、装置、可穿戴智能设备及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106130896B (zh) * 2016-06-23 2019-05-03 广州鲁邦通物联网科技有限公司 一种多wifi热点环境下的路由器的选择切换方法和系统
CN106792984B (zh) * 2016-11-29 2019-11-26 努比亚技术有限公司 一种wifi热点扫描连接控制方法及终端
CN109327915B (zh) * 2018-09-29 2021-01-29 Oppo广东移动通信有限公司 一种连接方法、装置及终端
CN110392412B (zh) * 2019-07-23 2022-05-13 歌尔科技有限公司 物联网设备配网方法、装置、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026513A (zh) * 2006-02-17 2007-08-29 联想(北京)有限公司 无线网络配置方法和终端、及无线网络预测方法和设备
CN103024929A (zh) * 2012-12-20 2013-04-03 惠州Tcl移动通信有限公司 一种基于移动终端连接无线网络的方法及移动终端
CN103475996A (zh) * 2013-08-19 2013-12-25 小米科技有限责任公司 网络连接方法、网络共享方法及装置
CN103533635A (zh) * 2012-07-03 2014-01-22 希姆通信息技术(上海)有限公司 移动终端的定位方法及移动终端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790946A (zh) * 2012-05-17 2012-11-21 江苏中科梦兰电子科技有限公司 一种地理位置查询方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026513A (zh) * 2006-02-17 2007-08-29 联想(北京)有限公司 无线网络配置方法和终端、及无线网络预测方法和设备
CN103533635A (zh) * 2012-07-03 2014-01-22 希姆通信息技术(上海)有限公司 移动终端的定位方法及移动终端
CN103024929A (zh) * 2012-12-20 2013-04-03 惠州Tcl移动通信有限公司 一种基于移动终端连接无线网络的方法及移动终端
CN103475996A (zh) * 2013-08-19 2013-12-25 小米科技有限责任公司 网络连接方法、网络共享方法及装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016180114A1 (zh) * 2015-10-14 2016-11-17 中兴通讯股份有限公司 终端热点休眠的方法和装置
CN105517189A (zh) * 2015-11-27 2016-04-20 小米科技有限责任公司 实现wifi连接的方法及装置
CN105517189B (zh) * 2015-11-27 2020-02-07 小米科技有限责任公司 实现wifi连接的方法及装置
WO2018006505A1 (zh) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 一种信息处理方法和装置
CN107979865A (zh) * 2017-12-22 2018-05-01 广东小天才科技有限公司 连接WiFi热点的方法、装置、移动终端及存储介质
CN109905911A (zh) * 2019-03-18 2019-06-18 努比亚技术有限公司 WiFi控制方法、装置、可穿戴智能设备及存储介质
CN109905911B (zh) * 2019-03-18 2023-09-19 努比亚技术有限公司 WiFi控制方法、装置、可穿戴智能设备及存储介质

Also Published As

Publication number Publication date
CN105516913A (zh) 2016-04-20

Similar Documents

Publication Publication Date Title
WO2015131562A1 (zh) Wifi连接方法及装置
WO2020228831A1 (zh) 网络连接的控制方法、终端及存储介质
CN103338473B (zh) 小区失效的处理设备
EP2945418B1 (en) Method and apparatus for adjusting network configuration
CN104244379B (zh) 移动终端的无线网络控制方法和装置
US20140092805A1 (en) Mixed off-site/on-site prediction computation for reducing wireless reconnection time of a computing device
KR101096408B1 (ko) 유선 또는 무선으로 서비스 가능한 가능한 소형 기지국 및 그 운영 방법
CN104145511A (zh) 用于对等通信网络的功率节省机制
US20140286190A1 (en) Wireless network connectivity enhancements
US20160081019A1 (en) Method and apparatus to reduce power consumption in wireless devices
CN102711226A (zh) Wifi接入点扫描方法及装置
JP2016536950A (ja) 信号伝送制御方法、装置、電子デバイス、プログラム及び記録媒体
CN103945476A (zh) 网络切换方法及装置
WO2019233172A1 (zh) 一种唤醒区域更新方法及装置
CN110677869B (zh) 网络连接的控制方法、终端及存储介质
WO2021016755A1 (zh) 数据传输方法及装置
WO2018177431A1 (zh) 一种用户终端省电方法、装置
CN106792694B (zh) 一种接入认证方法,及接入设备
US8457030B2 (en) Mobile phone and method for receiving calls
US8189550B2 (en) Radio communication device, radio communication method and radio recording medium
CN115568038A (zh) 非激活定时器的控制方法、装置及终端
EP2637075A1 (en) Management methods and related computer systems and machine-readable storage mediums using the same
WO2024120230A1 (zh) 网络设备管理方法、装置及存储介质
US8856311B2 (en) System coordinated WLAN scanning
WO2019071986A1 (zh) 一种确定搜索周期的方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14884414

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14884414

Country of ref document: EP

Kind code of ref document: A1