CN102711226A - Method and device for scanning WIFI (wireless fidelity) access point - Google Patents
Method and device for scanning WIFI (wireless fidelity) access point Download PDFInfo
- Publication number
- CN102711226A CN102711226A CN2012101621787A CN201210162178A CN102711226A CN 102711226 A CN102711226 A CN 102711226A CN 2012101621787 A CN2012101621787 A CN 2012101621787A CN 201210162178 A CN201210162178 A CN 201210162178A CN 102711226 A CN102711226 A CN 102711226A
- Authority
- CN
- China
- Prior art keywords
- scanning
- time interval
- access point
- wifi
- time
- 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.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Telephone Function (AREA)
Abstract
Description
技术领域 technical field
本发明涉及通信领域,具体而言,涉及一种无线保真(Wireless Fidelity,简称为WIFI)接入点扫描方法及装置。The present invention relates to the field of communications, in particular to a method and device for scanning a Wireless Fidelity (abbreviated as WIFI) access point.
背景技术 Background technique
目前,具备WIFI连接功能的移动终端,尤其是智能手机越来越多。使用移动终端的WIFI模块连接无线路由器或无线接入点(Access Point,简称为AP)上网,已经成为很多手机用户的选择。At present, there are more and more mobile terminals, especially smart phones, with a WIFI connection function. Using the WIFI module of a mobile terminal to connect to a wireless router or a wireless access point (Access Point, referred to as AP) to surf the Internet has become the choice of many mobile phone users.
移动终端上WIFI模块的扫描可接入网络即接入点的功能是WIFI模块一个非常基本且非常重要的功能。当用户打开WIFI模块后,WIFI模块首先进行的一个动作就是对接入点进行扫描,并将扫描结果呈现给用户,由用户选择某一接入点进行连接。在用户激活WIFI模块后,进行一次接入点的扫描,然后再按一个固定的时间间隔进行下一次扫描。比如,每5秒钟进行一次接入点的扫描,直到用户关闭WIFI模块。The scanning of the WIFI module on the mobile terminal can access the network, that is, the access point function is a very basic and very important function of the WIFI module. When the user turns on the WIFI module, the first action of the WIFI module is to scan the access point, and present the scanning result to the user, and the user selects an access point to connect. After the user activates the WIFI module, a scan of the access point is performed, and then the next scan is performed at a fixed time interval. For example, an access point scan is performed every 5 seconds until the user turns off the WIFI module.
图1是根据相关技术的移动终端上的传统接入点网络扫描方法的流程图,如图1所示,目前移动终端上的接入点网络扫描方法包括如下步骤:Fig. 1 is according to the flow chart of the traditional access point network scanning method on the mobile terminal of related art, as shown in Fig. 1, the access point network scanning method on the mobile terminal currently comprises the following steps:
步骤S102,激活WIFI模块。Step S102, activating the WIFI module.
步骤S104,WIFI模块进行第一次扫描,扫描结束后开启定时器。In step S104, the WIFI module scans for the first time, and starts a timer after the scan ends.
步骤S106,定时器时间到,进行下一次扫描并再次启动定时器。其中定时器中的时长恒定。Step S106, when the timer expires, the next scan is performed and the timer is started again. Wherein the duration in the timer is constant.
步骤S108,用户关闭WIFI。Step S108, the user turns off the WIFI.
这种扫描方法虽然简单直接,但却对移动终端带来一些不好的影响,比如会带来比较大的电量消耗等。目前,移动终端尤其是智能终端,电量消耗过快已经成为一个通病。Although this scanning method is simple and direct, it has some bad effects on the mobile terminal, such as relatively large power consumption. At present, the rapid power consumption of mobile terminals, especially smart terminals, has become a common problem.
针对相关技术中移动终端WIFI接入点按照固定时间间隔扫描所导致的问题,目前尚未提出有效的解决方案。Aiming at the problems caused by the mobile terminal WIFI access point scanning at fixed time intervals in the related art, no effective solution has been proposed yet.
发明内容 Contents of the invention
针对相关技术中移动终端WIFI接入点按照固定时间间隔扫描所导致的问题,本发明提供了一种WIFI接入点扫描方法及装置,以至少解决上述问题。Aiming at the problems caused by scanning WIFI access points of mobile terminals at fixed time intervals in the related art, the present invention provides a method and device for scanning WIFI access points to at least solve the above problems.
根据本发明的一个方面,提供了一种WIFI接入点扫描方法,包括:根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔;按照确定的所述时间间隔进行WIFI接入点扫描。According to one aspect of the present invention, a kind of WIFI access point scanning method is provided, comprising: determining the time interval for scanning WIFI access points according to the state of the mobile terminal; performing WIFI access point scanning according to the determined time interval .
优选地,根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔包括:根据WIFI功能激活的时长和/或移动终端的电池电量确定对WIFI接入点进行扫描的所述时间间隔。Preferably, determining the time interval for scanning the WIFI access point according to the state of the mobile terminal includes: determining the time interval for scanning the WIFI access point according to the duration of WIFI function activation and/or the battery level of the mobile terminal.
优选地,根据WIFI功能激活的时长和/或移动终端的电池电量确定对WIFI接入点进行扫描的所述时间间隔包括:随着激活WIFI功能的时间的增长和/或移动终端的电池电量的降低,增大此次扫描与下一次扫描之间的时间间隔。Preferably, determining the time interval for scanning the WIFI access point according to the duration of WIFI function activation and/or the battery power of the mobile terminal includes: with the increase of the time for activating the WIFI function and/or the battery power of the mobile terminal Decrease to increase the time interval between this scan and the next scan.
优选地,增大此次扫描与下一次扫描之间的时间间隔包括:以指数形式增大此次扫描与下一次扫描之间的时间间隔。Preferably, increasing the time interval between the current scan and the next scan includes: exponentially increasing the time interval between the current scan and the next scan.
优选地,以指数形式增大此次扫描与下一次扫描之间的时间间隔包括:按照以下公式确定此次扫描与下一次扫描之间的时间间隔:y=ax,其中,y为所述此次扫描与下一次扫描之间的时间间隔,a为指数函数的底数且a大于1,x随着激活WIFI功能的时间的增长而增大。Preferably, exponentially increasing the time interval between this scan and the next scan includes: determining the time interval between this scan and the next scan according to the following formula: y=a x , where y is the The time interval between this scan and the next scan, a is the base of the exponential function and a is greater than 1, and x increases with the time of activating the WIFI function.
优选地,所述方法还包括:根据所述移动终端的电池电量确定a的值;和/或,根据所述移动终端的电池电量确定x的初始值和/或增大幅度。Preferably, the method further includes: determining the value of a according to the battery power of the mobile terminal; and/or determining the initial value and/or increasing range of x according to the battery power of the mobile terminal.
优选地,按照确定的所述时间间隔进行WIFI接入点扫描之前,还包括:在激活所述WIFI功能时,对WIFI接入点进行首次扫描。Preferably, before scanning for WIFI access points according to the determined time interval, the method further includes: performing a first scan for WIFI access points when the WIFI function is activated.
优选地,在以下情况至少之一时,认为对WIFI接入点进行了首次扫描:所述移动终端连接充电器,成功连接接入点,断开连接中的接入点。Preferably, the first scan of the WIFI access point is considered to be performed under at least one of the following conditions: the mobile terminal connects to the charger, successfully connects to the access point, or disconnects the access point being connected.
优选地,按照确定的所述时间间隔进行WIFI接入点扫描之前,还包括:在确定的所述时间间隔大于预设的时间阈值的情况下,将所述时间阈值作为所述时间间隔。Preferably, before scanning for WIFI access points according to the determined time interval, the method further includes: when the determined time interval is greater than a preset time threshold, using the time threshold as the time interval.
根据本发明的另一方面,提供了一种WIFI接入点扫描装置,包括:确定模块,用于根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔;扫描模块,用于按照确定的所述时间间隔进行WIFI接入点扫描。According to another aspect of the present invention, a device for scanning WIFI access points is provided, including: a determination module, configured to determine the time interval for scanning WIFI access points according to the state of the mobile terminal; Scan for WIFI access points at the time interval.
优选地,所述装置还包括:处理模块,用于在确定的所述时间间隔大于预设的时间阈值的情况下,将所述时间阈值作为所述时间间隔。Preferably, the device further includes: a processing module, configured to use the time threshold as the time interval when the determined time interval is greater than a preset time threshold.
通过本发明,采用根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔;按照确定的时间间隔进行WIFI接入点扫描的方式,解决了相关技术中移动终端WIFI接入点按照固定时间间隔扫描所导致的问题,为既不影响WIFI功能的使用又降低WIFI接入点的扫描频率提供了可能,进而能够降低WIFI功能对移动终端电池电量的消耗,延长移动终端的待机时间,提升用户体验。Through the present invention, the time interval for scanning WIFI access points is determined according to the state of the mobile terminal; the mode of scanning for WIFI access points is performed according to the determined time interval, which solves the problem that the WIFI access points of mobile terminals are scanned at fixed time intervals in the related art. The problems caused by scanning make it possible to reduce the scanning frequency of WIFI access points without affecting the use of WIFI functions, thereby reducing the consumption of WIFI functions on the battery power of mobile terminals, prolonging the standby time of mobile terminals, and improving user experience .
附图说明 Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1是根据相关技术的移动终端上的传统接入点网络扫描方法的流程图;Fig. 1 is a flow chart of a traditional access point network scanning method on a mobile terminal according to the related art;
图2是根据本发明实施例的WIFI接入点扫描方法的流程图;Fig. 2 is the flow chart of the scanning method of WIFI access point according to the embodiment of the present invention;
图3是根据本发明实施例的WIFI接入点扫描装置的结构框图;Fig. 3 is a structural block diagram of a WIFI access point scanning device according to an embodiment of the present invention;
图4是根据本发明实施例的WIFI接入点扫描装置的优选结构框图;4 is a preferred structural block diagram of a WIFI access point scanning device according to an embodiment of the present invention;
图5是根据本发明实施例二的WIFI接入点扫描方法较佳实施例的实现流程图。Fig. 5 is an implementation flow chart of a preferred embodiment of a method for scanning WIFI access points according to Embodiment 2 of the present invention.
具体实施方式 Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
本实施例提供了一种WIFI接入点扫描方法,图2是根据本发明实施例的WIFI接入点扫描方法的流程图,如图2所示,该方法包括如下步骤:The present embodiment provides a WIFI access point scanning method. FIG. 2 is a flowchart of the WIFI access point scanning method according to an embodiment of the present invention. As shown in FIG. 2 , the method includes the following steps:
步骤S202,根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔;Step S202, determining the time interval for scanning the WIFI access point according to the state of the mobile terminal;
步骤S204,按照确定的时间间隔进行WIFI接入点扫描。Step S204, scan for WIFI access points according to the determined time interval.
本实施例通过上述步骤,根据移动终端的状态来确定扫描WIFI接入点的时间间隔,并按照该时间间隔进行扫描,从而能够随着移动终端的状态来对扫描WIFI接入点的时间间隔进行改变,从而能够自动调整扫描的时间间隔,解决了相关技术中移动终端WIFI接入点按照固定时间间隔扫描所导致的问题,为既不影响WIFI功能的使用又降低WIFI接入点的扫描频率提供了可能,进而能够降低WIFI功能对移动终端电池电量的消耗,延长移动终端的待机时间,提升用户体验。In this embodiment, through the above steps, the time interval for scanning WIFI access points is determined according to the state of the mobile terminal, and scanning is performed according to the time interval, so that the time interval for scanning WIFI access points can be adjusted along with the state of the mobile terminal. change, so that the scanning time interval can be automatically adjusted, which solves the problem caused by the mobile terminal WIFI access point scanning according to a fixed time interval in the related art, and provides a solution for not affecting the use of the WIFI function and reducing the scanning frequency of the WIFI access point. Possibly, it can further reduce the power consumption of the battery of the mobile terminal by the WIFI function, prolong the standby time of the mobile terminal, and improve user experience.
对于步骤S204中按照确定的时间间隔进行WIFI接入点扫描的方式可以有多种,例如,可以在一次扫描之后开启以该时间间隔设置的定时器,在该定时器到时时,进行下一次扫描。或者也可以采用其他方式实现按照上述确定的时间间隔进行WIFI接入点扫描,在此不再赘述。For step S204, there can be multiple ways to scan for WIFI access points according to a certain time interval, for example, after a scan, a timer set with the time interval can be opened, and when the timer expires, the next scan is performed . Alternatively, other methods may also be used to scan for WIFI access points according to the above-mentioned determined time intervals, which will not be repeated here.
作为一种优选实施方式,可以根据WIFI功能激活的时长和/或移动终端的电池电量确定对WIFI接入点进行扫描的时间间隔。例如,可以随着激活WIFI功能的时间的增长和/或移动终端的电池电量的降低,增大此次扫描与下一次扫描之间的时间间隔。通过这种方式,能够使得WIFI功能在激活之后每一次扫描后的时间间隔都会逐渐增大,从而能够快速降低WIFI功能对移动终端电池电量的消耗,进一步延长移动终端的待机时间。As a preferred implementation manner, the time interval for scanning the WIFI access point can be determined according to the duration of WIFI function activation and/or the battery level of the mobile terminal. For example, the time interval between this scan and the next scan can be increased as the time for activating the WIFI function increases and/or the battery power of the mobile terminal decreases. In this way, the time interval after each scan after the WIFI function is activated can be gradually increased, so that the consumption of the battery power of the mobile terminal by the WIFI function can be quickly reduced, and the standby time of the mobile terminal can be further extended.
例如,可以随着WIFI功能激活的时长使该时间间隔线性增长,或者随着移动终端电池电量的降低使该时间的增长与电池电量成反比,或者将WIFI功能激活的时长与移动终端电池电量综合进行考虑以得到该时间间隔。优选地,还可以以指数函数的形式增大此次扫描与下一次扫描之间的时间间隔。For example, the time interval can be linearly increased with the duration of WIFI function activation, or the increase of the time is inversely proportional to the battery power as the battery power of the mobile terminal decreases, or the time interval of WIFI function activation and the battery power of the mobile terminal can be integrated Considerations are made to get this time interval. Preferably, the time interval between this scan and the next scan can also be increased in the form of an exponential function.
比如,可以令此次扫描与下一次扫描之间的时间间隔y=ax,其中,a为指数函数的底数且a大于1,x随着激活WIFI功能的时间的增长而增大,优选地,在将WIFI功能激活的时长与移动终端电池电量综合进行考虑以得到该时间间隔的情况下,还可以根据所述移动终端的电池电量确定a的值;和/或,根据所述移动终端的电池电量确定x的初始值和/或增大幅度,例如,在电池电量较满时,可以设置x首次扫描时值为1,并以1的间隔递增,而在电池电量较低时,可以设置x首次扫描时值为2,并以2的间隔递增等。For example, the time interval between this scan and the next scan can be y=a x , where a is the base of the exponential function and a is greater than 1, and x increases with the time of activating the WIFI function, preferably , in the case of comprehensively considering the duration of WIFI function activation and the battery power of the mobile terminal to obtain the time interval, the value of a may also be determined according to the battery power of the mobile terminal; and/or, according to the battery power of the mobile terminal The battery level determines the initial value and/or increase of x, for example, when the battery level is relatively full, x can be set to a value of 1 on the first scan and incremented at intervals of 1, while when the battery level is low, you can set x has a value of 2 on the first scan and increments at intervals of 2, etc.
此外,在激活WIFI功能时,可以对WIFI接入点进行首次扫描。则此时上述公式中的x可以从首次扫描时值开始递增。而对于其他一些情况,例如移动终端连接充电器、成功连接接入点或者断开连接中的接入点时,也可以认为对WIFI接入点进行了首次扫描,也就是可以在这些情况下对x的值进行复位,则此时上述公式中的x也可以从首次扫描时值开始递增。通过这种方式,能够在用户需要时尽快扫描到WIFI接入点,保证WIFI功能的使用效果。In addition, when the WIFI function is activated, the first scan for WIFI access points can be performed. At this time, x in the above formula can be incremented from the value at the time of the first scan. For some other situations, such as when the mobile terminal is connected to the charger, successfully connected to the access point, or disconnected from the access point, it can also be considered that the WIFI access point has been scanned for the first time, that is, the WIFI access point can be scanned for the first time in these cases. The value of x is reset, then x in the above formula can also be incremented from the value at the first scan at this time. In this way, the WIFI access point can be scanned as soon as possible when the user needs it, so as to ensure the use effect of the WIFI function.
另外,考虑到在上述时间间隔以指数形式递增时,有可能使该时间间隔提高到一个非常大的值,从而在非常长的时间内不再进行扫描,这可能会影响用户对WIFI功能的使用,因此,作为一种优选实施方式,还可以预先设置一个时间阈值,在上述确定的时间间隔大于该时间阈值的情况下,将该时间阈值作为时间间隔。例如,设置时间阈值为300秒,在上述确定的时间间隔超过300秒的情况下,仅按照300秒的时间间隔进行下一次WIFI接入点的扫描。In addition, considering that when the above time interval increases exponentially, it is possible to increase the time interval to a very large value, so that scanning will not be performed for a very long time, which may affect the user's use of the WIFI function Therefore, as a preferred implementation manner, a time threshold may also be preset, and when the above-mentioned determined time interval is greater than the time threshold, the time threshold is used as the time interval. For example, the time threshold is set to 300 seconds, and if the above-mentioned determined time interval exceeds 300 seconds, the next scan of the WIFI access point is only performed according to the time interval of 300 seconds.
对应于上述方法,本实施例还提供了一种WIFI接入点扫描装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。Corresponding to the above method, this embodiment also provides a device for scanning WIFI access points, which is used to implement the above embodiments and preferred implementation modes, and those that have already been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图3是根据本发明实施例的WIFI接入点扫描装置的结构框图,如图3所示,该装置包括:确定模块32和扫描模块34,下面对各个模块进行详细说明。FIG. 3 is a structural block diagram of a device for scanning WIFI access points according to an embodiment of the present invention. As shown in FIG. 3 , the device includes: a determination module 32 and a scanning module 34 , and each module will be described in detail below.
确定模块32,用于根据移动终端的状态确定对WIFI接入点进行扫描的时间间隔;扫描模块34,与确定模块32相连,用于按照确定模块32确定的时间间隔进行WIFI接入点扫描。The determining module 32 is used to determine the time interval for scanning the WIFI access point according to the state of the mobile terminal; the scanning module 34 is connected to the determining module 32 for scanning the WIFI access point according to the time interval determined by the determining module 32.
本实施例通过上述模块,确定模块32根据移动终端的状态来确定扫描WIFI接入点的时间间隔,扫描模块34按照该时间间隔进行扫描,从而能够随着移动终端的状态来对扫描WIFI接入点的时间间隔进行改变,从而能够自动调整扫描的时间间隔,解决了相关技术中移动终端WIFI接入点按照固定时间间隔扫描所导致的问题,为既不影响WIFI功能的使用又降低WIFI接入点的扫描频率提供了可能,进而能够降低WIFI功能对移动终端电池电量的消耗,延长移动终端的待机时间,提升用户体验。In this embodiment, through the above modules, the determination module 32 determines the time interval for scanning WIFI access points according to the state of the mobile terminal, and the scanning module 34 scans according to the time interval, so that the scanning WIFI access can be performed along with the state of the mobile terminal. The time interval of the point is changed, so that the time interval of scanning can be automatically adjusted, which solves the problem caused by the mobile terminal WIFI access point scanning according to a fixed time interval in the related technology, so as not to affect the use of WIFI functions and reduce the number of WIFI access points. The scanning frequency provides the possibility, which can reduce the battery power consumption of the mobile terminal by the WIFI function, prolong the standby time of the mobile terminal, and improve the user experience.
图4是根据本发明实施例的WIFI接入点扫描装置的优选结构框图,如图4所示,该装置还可以包括:处理模块42,与确定模块32和扫描模块34相连,用于在确定模块32确定的时间间隔大于预设的时间阈值的情况下,将时间阈值作为时间间隔。FIG. 4 is a preferred structural block diagram of a WIFI access point scanning device according to an embodiment of the present invention. As shown in FIG. When the time interval determined by the module 32 is greater than the preset time threshold, the time threshold is used as the time interval.
下面结合优选实施例进行说明,以下优选实施例结合了上述实施例及其优选实施方式。The following description will be made in combination with preferred embodiments, and the following preferred embodiments combine the above-mentioned embodiments and preferred implementation modes thereof.
实施例一Embodiment one
本优选实施例提供了一种移动终端上扫描WIFI接入点(也称WIFI可接入网络)的实现方法,该方法通过合理的改善WIFI的扫描方法来降低移动终端的电量消耗,在一定程度上可以提高移动终端的续航能力,提高扫描效率,提升用户体验。This preferred embodiment provides an implementation method for scanning WIFI access points (also known as WIFI accessible networks) on a mobile terminal. The method reduces the power consumption of the mobile terminal by reasonably improving the WIFI scanning method. To a certain extent It can improve the battery life of mobile terminals, improve scanning efficiency, and improve user experience.
在本优选实施例中,当用户激活WIFI模块时,可以立即对接入点进行一次扫描。随后,利用指数函数特性,接入点的扫描时间间隔以指数级别递增,逐渐增加扫描时间间隔的长度。与此同时监测电池的电量,随着电池电量的不同等级,采用不同底数及指数来动态的调整扫描时间间隔的长度。该方案可以包括如下步骤:In this preferred embodiment, when the user activates the WIFI module, a scan for the access point can be performed immediately. Then, by using the characteristic of the exponential function, the scanning time interval of the access point increases exponentially, and gradually increases the length of the scanning time interval. At the same time, the power of the battery is monitored. With the different levels of battery power, different base numbers and indices are used to dynamically adjust the length of the scanning time interval. The program may include the following steps:
步骤A:移动终端用户激活WIFI,WIFI芯片开始工作,WIFI进行第一次接入点扫描;Step A: The mobile terminal user activates WIFI, the WIFI chip starts to work, and WIFI scans for the first access point;
步骤B:扫描结束,将扫描获取的接入点显示给用户;Step B: the scanning is completed, and the access points obtained by the scanning are displayed to the user;
步骤C:开始计算下一次扫描时间间隔,计算公式可以为一个指数函数y=ax(x∈R),其中a为底数且a大于1,x为指数。首先通过电池电量监测模块获取当前电量,根据不同的电量等级,选用不同底数a以及指数x来计算扫描时间间隔,由于时间间隔是递增的过程,因此,底数a大于1且可以为预设的或者根据电池电量确定的固定值,指数x可以从1开始递增,当然也可以从其他数值开始递增,例如从2开始递增;Step C: start to calculate the next scanning time interval, the calculation formula can be an exponential function y=a x (x∈R), where a is the base and a is greater than 1, and x is the exponent. First, the current power is obtained through the battery power monitoring module. According to different power levels, different bases a and exponents x are used to calculate the scanning time interval. Since the time interval is an incremental process, the base a is greater than 1 and can be preset or According to the fixed value determined by the battery power, the index x can increase from 1, of course, it can also increase from other values, such as from 2;
步骤D:计算出下一次扫描的时间间隔后,启动定时器进行计时,时间到后进行下一次扫描;时间间隔是递增的过程,可设置扫描时间间隔的最大值(实现了上述时间阈值的功能),当计算出的时间间隔大于等于该值时,时间间隔取该最大值;Step D: After calculating the time interval of the next scan, start the timer for timing, and start the next scan after the time is up; the time interval is an incremental process, and the maximum value of the scan time interval can be set (realized the function of the above time threshold ), when the calculated time interval is greater than or equal to this value, the time interval takes the maximum value;
步骤E:扫描结束后,将扫描获取的接入点显示给用户并进行下一次扫描时间的计算,指数x递增,其增幅可以不同,回到步骤D;Step E: After the scan is finished, display the access points acquired by the scan to the user and calculate the next scan time, the index x is incremented, and the increment can be different, and return to step D;
步骤F:在用户插上充电器、连接某个接入点以及从某个接入点断开WIFI连接后,对底数a及指数x进行复位,回到步骤C,重新初始化底数a及指数x,开始计算扫描时间间隔;Step F: After the user plugs in the charger, connects to an access point, and disconnects the WIFI connection from an access point, reset the base a and exponent x, return to step C, and reinitialize the base a and exponent x , start to calculate the scanning interval;
步骤G:用户关闭WIFI,WIFI芯片停止工作,停止扫描并将底数a及指数x进行复位;Step G: The user turns off the WIFI, the WIFI chip stops working, stops scanning and resets the base a and the exponent x;
本优选实施例中提出的一种移动终端上WIFI扫描方法的实现方法采用了指数函数特性,扫描间隔呈指数级别递增,同时根据不同的电池电量等级,采用不同的底数及指数来动态调整WIFI扫描时间间隔,该方法对降低电量消耗,提升移动终端的电池续航能力很有帮助。The implementation method of a WIFI scanning method on a mobile terminal proposed in this preferred embodiment adopts the characteristic of an exponential function, and the scanning interval increases exponentially. At the same time, according to different battery power levels, different base numbers and exponents are used to dynamically adjust WIFI scanning. time interval, this method is very helpful for reducing power consumption and improving the battery life of the mobile terminal.
实施例二Embodiment two
在本优选实施例中结合当前移动终端的电池电量,利用指数函数的特性,选取合理的底数及指数来计算扫描时间的间隔,通过这种方式来降低扫描的次数,达到降低对电池电量消耗的目的。同时也充分了考虑一些异常情况,比如用户插入充电器、连接某个接入点、从接入点断开连接等,在降低电池电量消耗目的的同时还考虑到了用户体验。In this preferred embodiment, combined with the battery power of the current mobile terminal, using the characteristics of the exponential function, a reasonable base number and exponent are selected to calculate the interval of the scan time, and in this way the number of scans is reduced to reduce the consumption of battery power. Purpose. At the same time, it also fully considers some abnormal situations, such as the user plugs in the charger, connects to an access point, disconnects from the access point, etc., while reducing battery power consumption, it also takes into account the user experience.
本优选实施例中提供的扫描接入点的实现方法对应的系统可以包括:WIFI扫描模块(实现了上述扫描模块34的功能)、扫描间隔时间计算模块(实现了上述确定模块32以及处理模块42的功能)、接入点管理模块、电池电量监测模块、充电模块等,硬件上还可以包括WIFI芯片、WIFI天线等。The system corresponding to the implementation method of scanning access points provided in this preferred embodiment may include: a WIFI scanning module (realizing the function of the above-mentioned scanning module 34), a scanning interval calculation module (realizing the above-mentioned determination module 32 and processing module 42 function), access point management module, battery power monitoring module, charging module, etc. The hardware can also include WIFI chip, WIFI antenna, etc.
图5是根据本发明实施例二的WIFI接入点扫描方法较佳实施例的实现流程图,如图5所示,该流程可以包括如下步骤:Fig. 5 is the implementation flowchart of the preferred embodiment of the WIFI access point scanning method according to Embodiment 2 of the present invention, as shown in Fig. 5, the process may include the following steps:
步骤S502:用户在移动终端中激活WIFI,准备使用WIFI功能;用户激活WIFI后,WIFI芯片上电、射频开始工作;Step S502: The user activates WIFI in the mobile terminal to prepare to use the WIFI function; after the user activates WIFI, the WIFI chip is powered on and the radio frequency starts to work;
步骤S504:WIFI硬件准备完毕后,WIFI扫描模块进行第一次接入点扫描;Step S504: After the WIFI hardware is ready, the WIFI scanning module scans for the first access point;
步骤S506:扫描完毕后,将扫描获取的接入点通知接入点管理模块,由该模块将接入点列表显示给用户;Step S506: After the scanning is completed, notify the access point management module of the access points acquired through scanning, and the module will display the list of access points to the user;
步骤S508:通过电池电量检测模块获取当前的电池电量,根据不同的电池电量,采用不同的底数a,指数x,进行时间间隔的计算;在本优选实施例中以如下设置方式为例进行说明:电池电量大于80%时,底数a=1.5,指数x从1开始计算;电池电量大于30%小于80%时,底数a=2,指数x从2开始计算;电池电量小于30%,底数a=3,指数从2开始计算;Step S508: Obtain the current battery power through the battery power detection module, and use different base numbers a and exponent x to calculate the time interval according to different battery power levels; in this preferred embodiment, the following setting methods are used as examples for illustration: When the battery power is greater than 80%, the base number a=1.5, and the index x starts from 1; when the battery power is greater than 30% but less than 80%, the base number a=2, and the index x starts from 2; the battery power is less than 30%, the base number a= 3. The index is calculated from 2;
步骤S510:优选地,由于扫描时间间隔呈指数级别递增,因此从用户体验角度考虑,可以设置一个最大时间间隔,在本优选实施例中以选取的最大时间间隔为300秒为例进行说明,若步骤S508计算出的时间间隔大于最大时间间隔,则进入步骤S514,否则进入步骤S512;Step S510: Preferably, since the scanning time interval increases exponentially, from the perspective of user experience, a maximum time interval can be set. In this preferred embodiment, the selected maximum time interval is 300 seconds as an example for illustration. If If the time interval calculated in step S508 is greater than the maximum time interval, then enter step S514, otherwise enter step S512;
步骤S512:采用采用计算出的时间间隔;Step S512: adopting the calculated time interval;
步骤S514:始终采用最大时间间隔,即本优选实施例中的300秒;Step S514: Always use the maximum time interval, that is, 300 seconds in this preferred embodiment;
步骤S516:根据步骤S512和S514中的时间间隔,启动定时器,定时器到时时,通知WIFI扫描模块进行接入点的扫描;Step S516: start the timer according to the time interval in steps S512 and S514, and when the timer expires, notify the WIFI scanning module to scan the access point;
步骤S518:扫描结束后,由接入点管理模块显示扫描结果,并通知扫描时间间隔计算模块来计算下一次扫描时间间隔,同时将指数x递增,本优选实施例以增幅为1为例进行说明,即x=x+1,进入步骤S510;Step S518: After the scan is completed, the access point management module displays the scan result, and notifies the scan time interval calculation module to calculate the next scan time interval, and at the same time increments the index x. In this preferred embodiment, the increment is 1 as an example for illustration , namely x=x+1, enter step S510;
步骤S520:当用户插、拔充电器、连接或断开某个接入点后,可以对接入点进行重新扫描,通知扫描时间间隔计算模块,由该模块对底数a及指数x进行复位,并重新执行步骤S508;Step S520: After the user plugs in, unplugs the charger, connects or disconnects an access point, the access point can be re-scanned, and the scanning time interval calculation module is notified, and the module resets the base a and the exponent x, And re-execute step S508;
步骤S522:用户选择关闭WIFI,不再使用WIFI功能,扫描时间间隔计算模块对底数a及指数x进行复位,停止计算时间间隔,WIFI扫描模块停止扫描。Step S522: The user chooses to turn off the WIFI and no longer use the WIFI function. The scanning time interval calculation module resets the base a and the exponent x, stops calculating the time interval, and the WIFI scanning module stops scanning.
综上可知,本发明实施例提供的一套完整有效的WIFI扫描方法,利用指数函数的特性,选取合理的底数及指数来计算扫描时间的间隔,通过这种方式来降低扫描的次数,达到降低对电池电量消耗的目的。在降低电池电量消耗目的的同时还考虑到了用户体验,提高了移动终端的续航能力。In summary, the complete and effective WIFI scanning method provided by the embodiment of the present invention utilizes the characteristics of the exponential function to select a reasonable base and exponent to calculate the interval of the scanning time. In this way, the number of scanning times is reduced to reduce For battery drain purposes. While reducing the power consumption of the battery, user experience is also taken into consideration, and the battery life of the mobile terminal is improved.
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及优选实施例中描述的技术方案。In another embodiment, software is also provided, and the software is used to implement the technical solutions described in the above embodiments and preferred embodiments.
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于光盘、软盘、硬盘、可擦写存储器等。In another embodiment, there is also provided a storage medium in which the above software is stored, and the storage medium includes but not limited to an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012101621787A CN102711226A (en) | 2012-05-23 | 2012-05-23 | Method and device for scanning WIFI (wireless fidelity) access point |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012101621787A CN102711226A (en) | 2012-05-23 | 2012-05-23 | Method and device for scanning WIFI (wireless fidelity) access point |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102711226A true CN102711226A (en) | 2012-10-03 |
Family
ID=46903738
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2012101621787A Pending CN102711226A (en) | 2012-05-23 | 2012-05-23 | Method and device for scanning WIFI (wireless fidelity) access point |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102711226A (en) |
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102930198A (en) * | 2012-11-13 | 2013-02-13 | 中国科学院微电子研究所 | Computer automatic security protection and energy saving system and method |
| CN103347292A (en) * | 2013-07-02 | 2013-10-09 | 北京播思无线技术有限公司 | Device and method for reducing WIFI power consumption |
| WO2015021784A1 (en) * | 2013-08-12 | 2015-02-19 | 惠州Tcl移动通信有限公司 | Method and terminal for adjusting wifi transmission power |
| CN104869613A (en) * | 2014-02-25 | 2015-08-26 | 中兴通讯股份有限公司 | WiFi connection control method based on environment identification and device thereof |
| WO2016004676A1 (en) * | 2014-07-08 | 2016-01-14 | 中兴通讯股份有限公司 | Wireless network configuration method, terminal, and computer storage medium |
| CN105682115A (en) * | 2014-11-21 | 2016-06-15 | 联想(北京)有限公司 | Information processing method and electronic device |
| CN106255183A (en) * | 2016-07-29 | 2016-12-21 | 宇龙计算机通信科技(深圳)有限公司 | Adjust Wi Fi and launch the method for power, device and terminal |
| CN106714149A (en) * | 2016-12-30 | 2017-05-24 | 广东欧珀移动通信有限公司 | Wireless network accessing method and apparatus, and terminal device |
| CN106792804A (en) * | 2016-12-05 | 2017-05-31 | 成都智慧家信息技术有限公司 | A kind of multicast WIFI for monitoring on demand and responding visits frame mechanism |
| CN107105329A (en) * | 2017-06-20 | 2017-08-29 | 青岛海信电器股份有限公司 | A kind of intelligent television WI FI connection methods, device and intelligent television |
| CN107260140A (en) * | 2017-06-09 | 2017-10-20 | 上海斐讯数据通信技术有限公司 | A kind of whole day rhythm of the heart method and system |
| CN107371224A (en) * | 2017-07-18 | 2017-11-21 | 深圳天珑无线科技有限公司 | A kind of method, equipment and the storage device of Wireless Telecom Equipment connection signal |
| WO2018103402A1 (en) * | 2016-12-07 | 2018-06-14 | 广东欧珀移动通信有限公司 | Wireless fidelity (wifi) scan method and related product |
| CN108366412A (en) * | 2018-01-04 | 2018-08-03 | 福州瑞芯微电子股份有限公司 | A kind of WIFI positioning scan method and device |
| CN109429320A (en) * | 2017-09-01 | 2019-03-05 | 苹果公司 | System recovery of energy budget |
| CN110072269A (en) * | 2019-04-01 | 2019-07-30 | Oppo广东移动通信有限公司 | scanning control method, device, mobile terminal and storage medium |
| CN111970181A (en) * | 2020-08-27 | 2020-11-20 | 深圳市欧瑞博科技股份有限公司 | Network distribution method and device for intelligent household equipment, electronic equipment and storage medium |
| CN114598966A (en) * | 2022-03-01 | 2022-06-07 | 浙江杭钻机械制造股份有限公司 | Cloud voice sound system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1942688A1 (en) * | 2007-01-02 | 2008-07-09 | NEC Electronics Corporation | Power save mode in a dual mode mobile radio terminal |
| US20090131081A1 (en) * | 2007-11-19 | 2009-05-21 | Research In Motion Limited | Adjusting wlan scanning parameters based on rate of change of location of mobile device |
| CN101491144A (en) * | 2006-07-14 | 2009-07-22 | 高通股份有限公司 | Scanning and Selection of WLAN System |
| CN101772980A (en) * | 2007-07-31 | 2010-07-07 | 日本电气株式会社 | Wireless LAN terminal and access point searching method |
| WO2011151071A1 (en) * | 2010-06-03 | 2011-12-08 | Deutsche Telekom Ag | Method, apparatus, and system for connecting a mobile client to wireless networks |
-
2012
- 2012-05-23 CN CN2012101621787A patent/CN102711226A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101491144A (en) * | 2006-07-14 | 2009-07-22 | 高通股份有限公司 | Scanning and Selection of WLAN System |
| EP1942688A1 (en) * | 2007-01-02 | 2008-07-09 | NEC Electronics Corporation | Power save mode in a dual mode mobile radio terminal |
| CN101772980A (en) * | 2007-07-31 | 2010-07-07 | 日本电气株式会社 | Wireless LAN terminal and access point searching method |
| US20090131081A1 (en) * | 2007-11-19 | 2009-05-21 | Research In Motion Limited | Adjusting wlan scanning parameters based on rate of change of location of mobile device |
| WO2011151071A1 (en) * | 2010-06-03 | 2011-12-08 | Deutsche Telekom Ag | Method, apparatus, and system for connecting a mobile client to wireless networks |
Cited By (23)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102930198A (en) * | 2012-11-13 | 2013-02-13 | 中国科学院微电子研究所 | Computer automatic security protection and energy saving system and method |
| CN103347292A (en) * | 2013-07-02 | 2013-10-09 | 北京播思无线技术有限公司 | Device and method for reducing WIFI power consumption |
| WO2015021784A1 (en) * | 2013-08-12 | 2015-02-19 | 惠州Tcl移动通信有限公司 | Method and terminal for adjusting wifi transmission power |
| CN104869613A (en) * | 2014-02-25 | 2015-08-26 | 中兴通讯股份有限公司 | WiFi connection control method based on environment identification and device thereof |
| WO2016004676A1 (en) * | 2014-07-08 | 2016-01-14 | 中兴通讯股份有限公司 | Wireless network configuration method, terminal, and computer storage medium |
| CN105307153A (en) * | 2014-07-08 | 2016-02-03 | 中兴通讯股份有限公司 | Terminal and wireless network configuration method therefor |
| CN105682115A (en) * | 2014-11-21 | 2016-06-15 | 联想(北京)有限公司 | Information processing method and electronic device |
| CN106255183A (en) * | 2016-07-29 | 2016-12-21 | 宇龙计算机通信科技(深圳)有限公司 | Adjust Wi Fi and launch the method for power, device and terminal |
| CN106792804A (en) * | 2016-12-05 | 2017-05-31 | 成都智慧家信息技术有限公司 | A kind of multicast WIFI for monitoring on demand and responding visits frame mechanism |
| CN106792804B (en) * | 2016-12-05 | 2020-07-28 | 成都福立盟环保大数据有限公司 | Multicast WIFI frame detection mechanism capable of monitoring and responding as required |
| WO2018103402A1 (en) * | 2016-12-07 | 2018-06-14 | 广东欧珀移动通信有限公司 | Wireless fidelity (wifi) scan method and related product |
| CN106714149A (en) * | 2016-12-30 | 2017-05-24 | 广东欧珀移动通信有限公司 | Wireless network accessing method and apparatus, and terminal device |
| CN107260140A (en) * | 2017-06-09 | 2017-10-20 | 上海斐讯数据通信技术有限公司 | A kind of whole day rhythm of the heart method and system |
| CN107105329A (en) * | 2017-06-20 | 2017-08-29 | 青岛海信电器股份有限公司 | A kind of intelligent television WI FI connection methods, device and intelligent television |
| CN107371224A (en) * | 2017-07-18 | 2017-11-21 | 深圳天珑无线科技有限公司 | A kind of method, equipment and the storage device of Wireless Telecom Equipment connection signal |
| CN109429320A (en) * | 2017-09-01 | 2019-03-05 | 苹果公司 | System recovery of energy budget |
| CN115348645A (en) * | 2017-09-01 | 2022-11-15 | 苹果公司 | System recovery of energy budget |
| CN115348645B (en) * | 2017-09-01 | 2025-08-26 | 苹果公司 | System recovery of energy budget |
| CN108366412A (en) * | 2018-01-04 | 2018-08-03 | 福州瑞芯微电子股份有限公司 | A kind of WIFI positioning scan method and device |
| CN110072269A (en) * | 2019-04-01 | 2019-07-30 | Oppo广东移动通信有限公司 | scanning control method, device, mobile terminal and storage medium |
| CN110072269B (en) * | 2019-04-01 | 2021-06-22 | Oppo广东移动通信有限公司 | Scanning control method, device, mobile terminal and storage medium |
| CN111970181A (en) * | 2020-08-27 | 2020-11-20 | 深圳市欧瑞博科技股份有限公司 | Network distribution method and device for intelligent household equipment, electronic equipment and storage medium |
| CN114598966A (en) * | 2022-03-01 | 2022-06-07 | 浙江杭钻机械制造股份有限公司 | Cloud voice sound system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102711226A (en) | Method and device for scanning WIFI (wireless fidelity) access point | |
| US10552216B2 (en) | Application heartbeat period adjusting method and apparatus, and terminal | |
| CN102724738B (en) | Multimode terminal and method and device for selecting resident network for multimode terminal | |
| CN104244379B (en) | The wireless network control method and device of mobile terminal | |
| CN104601203B (en) | A kind of low-power consumption bluetooth equipment dynamically adjusts the method and device of Connecting quantity | |
| CN104581646A (en) | A dynamic broadcast method and device for bluetooth devices | |
| CN103887571A (en) | Charging mode switching method and charging mode switching device | |
| CN106130572B (en) | Method and device for switching terminal antenna and mobile terminal | |
| US10645725B2 (en) | Method, apparatus, and system for sending and receiving information | |
| CN104853422A (en) | Power-saving method and device for mobile terminal | |
| CN110176643A (en) | A kind of charging method, method of supplying power to, power supply management device and terminal device | |
| CN105516913A (en) | WIFI connection method and WIFI connection device | |
| CN111698736A (en) | Intelligent household electrical appliance network switching method and device, computer equipment and server | |
| CN113965993A (en) | Direct communication starting control method and related equipment | |
| WO2018072443A1 (en) | Charging method, apparatus, and data storage medium | |
| CN102595540B (en) | Network selection method of multi-mode terminal, and multi-mode terminal | |
| CN104751617A (en) | Remote controller and main machine connecting method and remote control device | |
| CN111641703B (en) | A method for determining the TCP heartbeat cycle of a terminal device, terminal device and server | |
| CN104660482A (en) | Method and device for pushing social network information | |
| CN104980992A (en) | Method of sharing network and mobile terminal | |
| WO2015113464A1 (en) | Power adapter and terminal | |
| CN107113092A (en) | Message sending/receiving method, coverage enhancement level determination/acquisition method and related equipment | |
| CN107729062A (en) | Application freezing methods and related products | |
| CN107257146A (en) | A kind of wireless charging method and wireless charging router based on charging priority | |
| CN102158532B (en) | Communication connection method and data card |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20121003 |