CN106792698A - A wireless fidelity Wi-Fi connection method and mobile terminal - Google Patents
A wireless fidelity Wi-Fi connection method and mobile terminal Download PDFInfo
- Publication number
- CN106792698A CN106792698A CN201710091096.0A CN201710091096A CN106792698A CN 106792698 A CN106792698 A CN 106792698A CN 201710091096 A CN201710091096 A CN 201710091096A CN 106792698 A CN106792698 A CN 106792698A
- Authority
- CN
- China
- Prior art keywords
- access point
- mobile terminal
- password
- bssid
- hash table
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/08—Reselecting an access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/24—Reselection being triggered by specific parameters
- H04W36/32—Reselection being triggered by specific parameters by location or mobility data, e.g. speed data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及通信技术领域,具体涉及一种无线保真Wi-Fi连接方法及移动终端。The invention relates to the technical field of communication, in particular to a wireless fidelity Wi-Fi connection method and a mobile terminal.
背景技术Background technique
随着信息技术的快速发展,移动终端(如手机、平板电脑等等)使用越来越普及,用户对移动终端的要求也越来越高,不仅需要较高的处理速度,而且对无线保真(WirelessFidelity,Wi-Fi)的依赖也越来越强。随着移动终端以及Wi-Fi的普及,通过移动终端来接入Wi-Fi网络也越来越频繁。With the rapid development of information technology, the use of mobile terminals (such as mobile phones, tablet computers, etc.) is becoming more and more popular, and users have higher and higher requirements for mobile terminals. (Wireless Fidelity, Wi-Fi) dependence is also getting stronger. With the popularity of mobile terminals and Wi-Fi, access to Wi-Fi networks through mobile terminals is becoming more and more frequent.
现有技术中,会出现如下情况,例如,在移动终端漫游到某个区域时,其周围环境可能会存在多个相同的服务集标识(Service Set Identifier,SSID)、加密方式、不同密码的接入点,例如,在进行Wi-Fi扫描之后,若存在两个SSID相同,加密方式相同但是密码不同的接入点,移动终端只会识别为一个接入点,如:输入其中一个密码进行连接,可能存在因密码不匹配无法连接的问题,如何解决在环境中存在多个具有相同SSID和加密方式,但密码不同的接入点的情况下,实现快速接入网络的问题亟待解决。In the prior art, the following situations may occur. For example, when a mobile terminal roams to a certain area, there may be multiple connections with the same service set identifier (Service Set Identifier, SSID), encryption mode, and different passwords in its surrounding environment. Access point, for example, after Wi-Fi scanning, if there are two access points with the same SSID, the same encryption method but different passwords, the mobile terminal will only recognize one access point, such as: enter one of the passwords to connect , there may be a problem of not being able to connect due to a password mismatch. How to solve the problem of fast access to the network when there are multiple access points with the same SSID and encryption method but different passwords in the environment needs to be solved urgently.
发明内容Contents of the invention
本发明实施例提供了一种无线保真Wi-Fi连接方法及移动终端,以期实现在环境中存在多个具有相同SSID和加密方式,但密码不同的接入点的情况下,快速接入网络。Embodiments of the present invention provide a wireless fidelity Wi-Fi connection method and a mobile terminal, in order to achieve fast access to the network when there are multiple access points with the same SSID and encryption method but different passwords in the environment .
本发明实施例第一方面提供了一种无线保真Wi-Fi连接方法,包括:The first aspect of the embodiment of the present invention provides a wireless fidelity Wi-Fi connection method, including:
在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同;When the distance between the mobile terminal and the first access point reaches the roaming condition, acquire the target BSSID of the second access point, wherein the SSID and encryption method of the first access point and the second access point are the same ;
检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数;Detecting whether there is a first password corresponding to the target BSSID in the pre-stored hash table, the hash table includes K records, each record includes a BSSID and a password corresponding to the BSSID, and the K is positive integer;
在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。When the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
本发明实施例第二方面提供了一种移动终端,包括:The second aspect of the embodiment of the present invention provides a mobile terminal, including:
获取单元,用于在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同;An acquiring unit, configured to acquire a target BSSID of a second access point when the distance between the mobile terminal and the first access point reaches a roaming condition, wherein the SSIDs of the first access point and the second access point and the encryption method are the same;
第一检测单元,用于检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数;The first detection unit is configured to detect whether there is a first password corresponding to the target BSSID in a pre-stored hash table, the hash table includes K records, and each record includes a BSSID and a password corresponding to the BSSID password, the K is a positive integer;
接入单元,用于在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。An accessing unit, configured to, when the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
本发明实施例第三方面提供了一种移动终端,包括:The third aspect of the embodiment of the present invention provides a mobile terminal, including:
处理器和存储器;其中,所述处理器通过调用所述存储器中的代码或指令以执行第一方面所描述的方法的部分或者全部步骤。A processor and a memory; wherein, the processor executes part or all of the steps of the method described in the first aspect by invoking codes or instructions in the memory.
实施本发明实施例,具有如下有益效果:Implementing the embodiment of the present invention has the following beneficial effects:
通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的第一密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点。从而,可在环境中存在多个具有相同SSID和加密方式,但密码不同的接入点的情况下,实现快速接入网络。Through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the SSID and encryption method of the first access point and the second access point are all the same, detect whether there is a password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the first password corresponding to the BSSID, K is a positive integer, When the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password. Therefore, fast access to the network can be realized when there are multiple access points with the same SSID and encryption method but different passwords in the environment.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1是本发明实施例提供的一种无线保真Wi-Fi连接方法的第一实施例流程示意图;FIG. 1 is a schematic flowchart of a first embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention;
图2是本发明实施例提供的一种无线保真Wi-Fi连接方法的第二实施例流程示意图;FIG. 2 is a schematic flowchart of a second embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention;
图3是本发明实施例提供的一种无线保真Wi-Fi连接方法的第三实施例流程示意图;FIG. 3 is a schematic flowchart of a third embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention;
图4是本发明实施例提供的一种无线保真Wi-Fi连接方法的第四实施例流程示意图;4 is a schematic flowchart of a fourth embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention;
图5a是本发明实施例提供的一种移动终端的第一实施例结构示意图;Fig. 5a is a schematic structural diagram of a first embodiment of a mobile terminal provided by an embodiment of the present invention;
图5b是本发明实施例提供的图5a所描述的移动终端的又一结构示意图;FIG. 5b is another schematic structural diagram of the mobile terminal described in FIG. 5a provided by an embodiment of the present invention;
图5c是本发明实施例提供的图5b所描述的移动终端的第二检测单元的结构示意图;FIG. 5c is a schematic structural diagram of a second detection unit of the mobile terminal described in FIG. 5b provided by an embodiment of the present invention;
图5d是本发明实施例提供的图5a所描述的移动终端的又一结构示意图;FIG. 5d is another schematic structural diagram of the mobile terminal described in FIG. 5a provided by an embodiment of the present invention;
图5e是本发明实施例提供的图5a所描述的移动终端的又一结构示意图;FIG. 5e is another schematic structural diagram of the mobile terminal described in FIG. 5a provided by an embodiment of the present invention;
图6是本发明实施例提供的一种移动终端的第二实施例结构示意图。Fig. 6 is a schematic structural diagram of a second embodiment of a mobile terminal provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置展示该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The presentation of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are independent or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本发明实施例所描述移动终端可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(MID,MobileInternet Devices)或穿戴式设备等,上述仅是举例,而非穷举,包含但不限于上述移动终端。The mobile terminal described in the embodiment of the present invention may include a smart phone (such as an Android phone, an iOS phone, a Windows Phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a mobile Internet device (MID, MobileInternet Devices) or a wearable device, etc. The above is only an example, not an exhaustive list, including but not limited to the above mobile terminal.
需要说明的是,本发明实施例中主要适用于周围环境中存在两个或者两个以上具有相同的SSID和加密方式,但密码不同的接入点。在进行Wi-Fi扫描之后,若存在两个具有相同SSID和加密方式,但密码不同的接入点,移动终端会识别为一个接入点,如输入其中一个密码连接,可能会存在因密码不匹配无法连接的问题。例如,接入点A和接入点B,其中,接入点A的SSID为:cathay000,加密方式为:WAP_PSK,密码:12345678,接入点B的SSID为:cathay000,加密方式为:WAP_PSK,密码为:88888888。如果移动终端仅用SSID去搜索接入点A和接入点B,则只会搜索到该接入点A或者接入点B中的一个,若移动终端搜索到接入点A,可能会按照接入点B的密码去连接接入点A,因而,导致连接接入点A失败,同理,若移动终端搜索到接入点B,则可能会按照接入点A的密码去连接接入点B,因而,导致连接接入点B失败。It should be noted that the embodiment of the present invention is mainly applicable to two or more access points with the same SSID and encryption method but different passwords in the surrounding environment. After Wi-Fi scanning, if there are two access points with the same SSID and encryption method but different passwords, the mobile terminal will identify them as one access point. If you enter one of the passwords to connect, there may be a Matches the problem of not being able to connect. For example, access point A and access point B, where the SSID of access point A is: cathay000, the encryption method is: WAP_PSK, the password: 12345678, the SSID of access point B is: cathay000, the encryption method is: WAP_PSK, The password is: 88888888. If the mobile terminal only uses the SSID to search for access point A and access point B, only one of the access point A or access point B will be found. If the mobile terminal searches for access point A, it may follow the The password of access point B is used to connect to access point A, so the connection to access point A fails. Similarly, if the mobile terminal searches for access point B, it may use the password of access point A to connect to the access point. Point B, thus, causes the connection to access point B to fail.
需要说明的是,本发明实施例中的哈希表包含多条记录,每一记录中包含一个BSSID和与该BSSID对应的密码。例如,在移动终端连接一个成功了AP后,可记录该AP的SSID、加密方式、BSSID以及密码,并将BSSID、密码作为键值对存入哈希表(HASH)中,哈希表中可包含多条记录,每一条记录形式可如下:以AP1为例,其BSSID:BSSID1,其密码:密码1,可记录为(BSSID1,密码1)。以下本发明实施例仅以移动终端所处环境中存在两个SSID及加密方式相同的接入点的情况加以说明,实际应用中,移动终端所处环境中可能包含两个以上SSID及加密方式相同的接入点,其实现原理与本发明实施例类似。It should be noted that the hash table in this embodiment of the present invention includes multiple records, and each record includes a BSSID and a password corresponding to the BSSID. For example, after a mobile terminal successfully connects to an AP, it can record the SSID, encryption method, BSSID and password of the AP, and store the BSSID and password as a key-value pair in a hash table (HASH). Contains multiple records, and the format of each record can be as follows: Take AP1 as an example, its BSSID: BSSID1, its password: password 1, which can be recorded as (BSSID1, password 1). The following embodiments of the present invention will only be described in the case where there are two access points with the same SSID and encryption method in the environment where the mobile terminal is located. In practical applications, the environment where the mobile terminal is located may contain more than two access points with the same encryption method The implementation principle of the access point is similar to that of the embodiment of the present invention.
请参阅图1,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第一实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:Please refer to FIG. 1 , which is a schematic flowchart of a first embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention. The wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
101、在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同。101. When the distance between the mobile terminal and the first access point reaches the roaming condition, acquire the target BSSID of the second access point, wherein the SSID and encryption method of the first access point and the second access point are the same.
其中,上述第一接入点和第二接入点的SSID和加密方式相同,但是,第一接入点和第二接入点的密码不相同。上述第一接入点的覆盖范围与第二接入点的覆盖范围有一定的交叉区域,当然,第一接入点的覆盖范围也可以与第二接入点的覆盖范围没有交叉区域。移动终端在连接到第一接入点之后,若其离开该第一接入点达到一定距离时,则其检测到的第一接入点的信号强度会越来越弱,从而,可能触发漫游条件,以至于接入其他接入点。在该移动终端漫游到第二接入点的覆盖范围内,则可获取该第二接入点的目标BSSID。上述获取第二接入点的目标BSSID可由移动终端进行Wi-Fi扫描,从而,得到第二接入点的BSSID。当然,移动终端中可预先存储第二接入点的目标BSSID,从而,可直接读取该目标BSSID。Wherein, the SSID and encryption method of the first access point and the second access point are the same, but the passwords of the first access point and the second access point are different. The coverage of the first access point and the coverage of the second access point have a certain overlapping area. Of course, the coverage of the first access point may not overlap with the coverage of the second access point. After the mobile terminal is connected to the first access point, if it reaches a certain distance away from the first access point, the signal strength of the first access point detected by it will become weaker and weaker, thus, roaming may be triggered. conditions, so that access to other access points. When the mobile terminal roams within the coverage of the second access point, the target BSSID of the second access point can be acquired. In the acquisition of the target BSSID of the second access point, the mobile terminal may perform Wi-Fi scanning, thereby obtaining the BSSID of the second access point. Of course, the target BSSID of the second access point can be pre-stored in the mobile terminal, so that the target BSSID can be read directly.
102、检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数。102. Detect whether there is a first password corresponding to the target BSSID in a pre-stored hash table, the hash table includes K records, each record includes a BSSID and a password corresponding to the BSSID, and the K is a positive integer.
其中,由上述可知,预先存储的哈希表中存储有多条记录,假设K条记录,其中,K为正整数,每一条记录均包含一个BSSID和与该BSSID对应的密码。因而,在得到第二接入点的目标BSSID之后,则可以根据该目标BSSID在哈希表中进行查找,若存在该目标BSSID,则可查找到与之对应的密码。若哈希表中不存在与目标BSSID对应的密码,则可提示用户输入该目标BSSID对应的密码,并根据该密码登录第二接入点。Wherein, it can be seen from the above that there are multiple records stored in the pre-stored hash table, assuming K records, wherein K is a positive integer, and each record includes a BSSID and a password corresponding to the BSSID. Therefore, after obtaining the target BSSID of the second access point, the hash table can be searched according to the target BSSID, and if the target BSSID exists, the corresponding password can be found. If the password corresponding to the target BSSID does not exist in the hash table, the user may be prompted to input the password corresponding to the target BSSID, and log in to the second access point according to the password.
103、在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。103. When a first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
其中,在哈希表中存在与目标BSSID对应的第一密码时,则可根据该第一密码接入第二接入点,具体地,可根据该目标BSSID进行Wi-Fi扫描,在扫描到第二接入点之后,则可根据该密码接入该第二接入点。Wherein, when there is a first password corresponding to the target BSSID in the hash table, the second access point can be accessed according to the first password. Specifically, Wi-Fi scanning can be performed according to the target BSSID. After the second access point, the second access point can be accessed according to the password.
例如,移动终端在进行Wi-Fi扫描过程中,则可能会出现两个具有相同SSID和加密方式、但不同密码的接入点,例如:AP1和AP2。具体实现中,若手动连接某个AP时,可记录该AP的SSID、加密方式、BSSID、密码,并将其BSSID、密码作为键值对存入哈希表中,如连接AP1,则记录为(BSSID1,密码1),当移动终端断开AP1,重新进行Wi-Fi连接时,可根据选择到的BSSID从哈希表中选择密码,如选择到密码,则根据该密码进行连接,如没有选择到密码,则提示用户重新输入新的密码进行连接。连接AP2,则可重新输入AP2密码连接,连接成功后,可将AP2的BSSID与密码存入哈希表中,如(BSSID2,密码2),再次从AP2断开后,重新连接时,则可选择密码连接AP1、AP2,例如,若AP1和AP2存在交叉区域,在该区域内,若连接AP1不成功,则可以连接AP2。For example, during the Wi-Fi scanning process of the mobile terminal, two access points with the same SSID and encryption method but different passwords may appear, for example: AP1 and AP2. In the specific implementation, if you manually connect to an AP, you can record the SSID, encryption method, BSSID, and password of the AP, and store its BSSID and password as a key-value pair in the hash table. If you connect to AP1, record it as (BSSID1, password 1), when the mobile terminal disconnects AP1 and re-connects to Wi-Fi, it can select a password from the hash table according to the selected BSSID, if a password is selected, then connect according to the password, if not If the password is selected, the user will be prompted to re-enter a new password to connect. To connect to AP2, you can re-enter the AP2 password to connect. After the connection is successful, you can store the BSSID and password of AP2 in the hash table, such as (BSSID2, password 2). After disconnecting from AP2 and reconnecting, you can Select a password to connect AP1 and AP2. For example, if there is an intersecting area between AP1 and AP2, in this area, if the connection to AP1 fails, you can connect to AP2.
又例如,移动终端的周围环境中存在两个具有相同SSID和加密方式、但不同密码的接入点,例如:AP1和AP2。具体实现中,若手动连接某个AP时,可记录该AP的SSID、加密方式、BSSID、密码,并将其BSSID、密码作为键值对存入哈希表中,如连接AP1,则记录为(BSSID1,密码1),在移动终端远离AP1且达到漫游条件时,可选择AP2,先从哈希表中根据AP2的BSSID2读取对应的密码2,如存在则更新密码进行漫游切换,如不存在则提示用户输入新密码,则重新输入密码连接后,将AP2的BSSID与密码存入哈希表中,如(BSSID2,密码2)再次从AP2漫游AP1时,根据AP1的BSSID1读取密码进行漫游切换,即可达到智能选择密码进行漫游。For another example, there are two access points with the same SSID and encryption method but different passwords in the surrounding environment of the mobile terminal, such as AP1 and AP2. In the specific implementation, if you manually connect to an AP, you can record the SSID, encryption method, BSSID, and password of the AP, and store its BSSID and password as a key-value pair in the hash table. If you connect to AP1, record it as (BSSID1, password 1), when the mobile terminal is far away from AP1 and meets the roaming conditions, you can select AP2, first read the corresponding password 2 from the hash table according to the BSSID2 of AP2, if it exists, update the password to perform roaming switching, if not If it exists, the user will be prompted to enter a new password. After re-entering the password to connect, store the BSSID and password of AP2 in the hash table. Roaming switching, you can achieve intelligent selection of passwords for roaming.
可以看出,通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的第一密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点。从而,可在环境中存在多个具有相同SSID和加密方式,但密码不同的接入点的情况下,实现快速接入网络。It can be seen that, through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the first access point and the second access point SSID and encryption method are the same, detect whether there is the first password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the password corresponding to the BSSID, K is a positive integer, and when the first password corresponding to the target BSSID exists in the hash table, the second access point is accessed according to the first password. Therefore, fast access to the network can be realized when there are multiple access points with the same SSID and encryption method but different passwords in the environment.
与上述一致地,请参阅图2,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第二实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:Consistent with the above, please refer to FIG. 2 , which is a schematic flowchart of a second embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention. The wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
201、在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同。201. When the distance between the mobile terminal and the first access point reaches the roaming condition, acquire the target BSSID of the second access point, wherein the SSID and encryption method of the first access point and the second access point are the same.
202、检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数。202. Detect whether there is a first password corresponding to the target BSSID in a pre-stored hash table, the hash table includes K records, each record includes a BSSID and a password corresponding to the BSSID, and the K is a positive integer.
203、在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。203. When a first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
其中,上述步骤201-步骤203的具体描述可参照图1所描述的Wi-Fi连接方法的对应步骤101-步骤103。Wherein, the specific description of the above steps 201 to 203 can refer to the corresponding steps 101 to 103 of the Wi-Fi connection method described in FIG. 1 .
204、在所述哈希表中不存在所述目标BSSID对应的所述第一密码时,获取输入的第二密码。204. Acquire an input second password when the first password corresponding to the target BSSID does not exist in the hash table.
其中,在哈希表中不存在目标BSSID对应的第一密码时,则可能移动终端第一次连接第二接入点,因而,可由用户自己输入第二接入点的第二密码。Wherein, if the first password corresponding to the target BSSID does not exist in the hash table, it is possible that the mobile terminal connects to the second access point for the first time, and therefore, the user may input the second password of the second access point by himself.
205、根据所述第二密码接入所述第二接入点。205. Access the second access point according to the second password.
其中,移动终端可对该第二密码进行验证,进而,在该第二密码验证成功的情况下,接入第二接入点。Wherein, the mobile terminal may verify the second password, and then, if the verification of the second password is successful, access the second access point.
206、在所述第二密码成功接入所述第二接入点时,将所述目标BSSID和所述第二密码作为一条记录保存在所述哈希表中。206. When the second password successfully accesses the second access point, save the target BSSID and the second password as a record in the hash table.
其中,在第二密码成功接入第二接入点时,可将该目标BSSID和第二密码作为一条记录保存在哈希表中,例如,(目标BSSID,第二密码)。Wherein, when the second password successfully accesses the second access point, the target BSSID and the second password may be saved as a record in the hash table, for example, (target BSSID, second password).
可以看出,通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的第一密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点,在哈希表中不存在目标BSSID对应的第一密码时,可获取用户的第二密码,并根据该第二密码接入第二接入点。从而,可在环境中存在多个具有相同SSID和加密方式、但密码不同的接入点的情况下,实现快速接入网络。It can be seen that, through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the first access point and the second access point SSID and encryption method are the same, detect whether there is the first password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the password corresponding to the BSSID, K is a positive integer. When the first password corresponding to the target BSSID exists in the hash table, the second access point is accessed according to the first password. When the first password corresponding to the target BSSID does not exist in the hash table, the The user's second password, and access to the second access point according to the second password. Therefore, it is possible to quickly access the network when there are multiple access points with the same SSID and encryption method but different passwords in the environment.
与上述一致地,请参阅图3,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第三实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:Consistent with the above, please refer to FIG. 3 , which is a schematic flowchart of a third embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention. The wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
301、在移动终端离第一接入点的距离达到漫游条件时,检测所述移动终端是否漫游到所述第二接入点的覆盖范围。301. When the distance between the mobile terminal and the first access point meets a roaming condition, detect whether the mobile terminal roams into the coverage of the second access point.
其中,在移动终端离第一接入点的距离达到漫游条件时,可按照如下方式检测该移动终端是否漫游到第二接入点的覆盖范围。Wherein, when the distance between the mobile terminal and the first access point reaches the roaming condition, whether the mobile terminal roams to the coverage of the second access point may be detected in the following manner.
可选地,上述步骤301中,检测所述移动终端是否漫游到所述第二接入点的覆盖范围,包括:Optionally, in the above step 301, detecting whether the mobile terminal roams to the coverage of the second access point includes:
31)、确定所述移动终端的当前位置;31), determining the current location of the mobile terminal;
32)、确定所述当前位置与所述第二接入点的位置之间的距离值;32), determining a distance value between the current location and the location of the second access point;
33)、判断所述距离值是否小于预设阈值,在所述距离值小于所述预设阈值时,确认所述移动终端漫游到所述第二接入点的覆盖范围。33) Judging whether the distance value is less than a preset threshold, and confirming that the mobile terminal has roamed to the coverage of the second access point when the distance value is less than the preset threshold.
其中,移动终端可通过全球定位系统(Global Positioning System,GPS)确定移动终端的当前位置,或者,移动终端可通过Wi-Fi定位技术确定移动终端的当前位置。上述移动终端的当前位置可用经纬度进行表示,例如,当前位置可表示为东经113°46',北纬22°27'。当然,若是采用Wi-Fi定位技术确定移动终端的当前位置,那么,将当前Wi-Fi扫描到的某一AP的位置作为该移动终端的位置,该AP的位置若标记在室内地图上可作为是一个点(一个表示移动终端位置的点)。其中,采用Wi-Fi定位技术进行定位的话,第二接入点的位置可为一个已知量,其可以标记在室内地图上。因而,可确定当前位置与第二接入点的位置之间的距离值,可判断该距离值是否小于预设阈值,在距离值小于预设阈值时,确认移动终端漫游到第二接入点的覆盖范围,在距离值大于或等于预设阈值时,则确认移动终端未漫游到第二接入点的覆盖范围。Wherein, the mobile terminal may determine the current location of the mobile terminal through a Global Positioning System (Global Positioning System, GPS), or the mobile terminal may determine the current location of the mobile terminal through a Wi-Fi positioning technology. The current location of the above-mentioned mobile terminal can be represented by latitude and longitude, for example, the current location can be represented as 113°46' east longitude and 22°27' north latitude. Of course, if the Wi-Fi positioning technology is used to determine the current location of the mobile terminal, then the location of an AP scanned by the current Wi-Fi is used as the location of the mobile terminal. If the location of the AP is marked on the indoor map, it can be used as is a point (a point representing the position of the mobile terminal). Wherein, if the Wi-Fi positioning technology is used for positioning, the position of the second access point may be a known quantity, which may be marked on the indoor map. Therefore, the distance value between the current location and the location of the second access point can be determined, whether the distance value is less than a preset threshold can be determined, and when the distance value is less than the preset threshold, it is confirmed that the mobile terminal roams to the second access point If the distance is greater than or equal to the preset threshold, it is confirmed that the mobile terminal has not roamed into the coverage of the second access point.
302、在所述移动终端漫游到所述第二接入点的覆盖范围时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同。302. When the mobile terminal roams into the coverage of the second access point, acquire the target BSSID of the second access point, where the SSIDs of the first access point and the second access point and encryption methods are the same.
303、检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数。303. Detect whether there is a first password corresponding to the target BSSID in a pre-stored hash table, the hash table includes K records, each record includes a BSSID and a password corresponding to the BSSID, and the K is a positive integer.
304、在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。304. When a first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
其中,上述步骤302-步骤304的具体描述可参照图1所描述的Wi-Fi连接方法的对应步骤101-步骤103。Wherein, the specific description of the above steps 302 to 304 can refer to the corresponding steps 101 to 103 of the Wi-Fi connection method described in FIG. 1 .
可以看出,通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的第一密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点。从而,可在环境中存在多个具有SSID和加密方式相同、但密码不同的接入点的情况下,实现快速接入网络。It can be seen that, through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the first access point and the second access point SSID and encryption method are the same, detect whether there is the first password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the password corresponding to the BSSID, K is a positive integer, and when the first password corresponding to the target BSSID exists in the hash table, the second access point is accessed according to the first password. Therefore, in the case where there are multiple access points with the same SSID and encryption method but different passwords in the environment, fast access to the network can be realized.
与上述一致地,请参阅图4,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第四实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:Consistent with the above, please refer to FIG. 4 , which is a schematic flowchart of a fourth embodiment of a wireless fidelity Wi-Fi connection method provided by an embodiment of the present invention. The wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
401、在移动终端离第一接入点的距离达到漫游条件时,检测所述移动终端是否接收由所述第二接入点发送的beacon帧。401. When the distance between the mobile terminal and the first access point reaches a roaming condition, detect whether the mobile terminal receives a beacon frame sent by the second access point.
其中,第二接入点可按照一定频率向周围广播beacon帧,因而,若移动终端在第二接入点的覆盖范围内,则可能会接收到由第二接入点广播的beacon帧。因此,若移动终端接收到由第二接入点发送的beacon帧,则说明移动终端可以根据该第二接入点的目标BSSID扫描到该第二接入点。Wherein, the second access point may broadcast the beacon frame to surroundings according to a certain frequency, therefore, if the mobile terminal is within the coverage of the second access point, it may receive the beacon frame broadcast by the second access point. Therefore, if the mobile terminal receives the beacon frame sent by the second access point, it means that the mobile terminal can scan to the second access point according to the target BSSID of the second access point.
402、在所述移动终端接收到由所述第二接入点发送的beacon帧时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同。402. When the mobile terminal receives the beacon frame sent by the second access point, acquire the target BSSID of the second access point, where the first access point and the second access point The SSID and encryption method are the same.
其中,在移动终端接收到由第二接入点发送的beacon帧时,可获取第二接入点发送的beacon帧时,接入第二接入点的目标BSSID,Wherein, when the mobile terminal receives the beacon frame sent by the second access point, when the beacon frame sent by the second access point can be obtained, the target BSSID of the second access point is accessed,
403、检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数。403. Detect whether the first password corresponding to the target BSSID exists in the pre-stored hash table, the hash table includes K records, each record includes a BSSID and the password corresponding to the BSSID, and the K is a positive integer.
404、在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。404. When the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
其中,上述步骤402-步骤404的具体描述可参照图1所描述的Wi-Fi连接方法的对应步骤101-步骤103。Wherein, for the specific description of the above steps 402 to 404, reference may be made to the corresponding steps 101 to 103 of the Wi-Fi connection method described in FIG. 1 .
可以看出,通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的第一密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点。从而,可在环境中存在多个具有相同SSID和加密方式、但密码不同的接入点的情况下,实现快速接入网络。It can be seen that, through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the first access point and the second access point SSID and encryption method are the same, detect whether there is the first password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the password corresponding to the BSSID, K is a positive integer, and when the first password corresponding to the target BSSID exists in the hash table, the second access point is accessed according to the first password. Therefore, it is possible to quickly access the network when there are multiple access points with the same SSID and encryption method but different passwords in the environment.
与上述一致地,以下为实施上述无线保真Wi-Fi连接方法的装置,具体如下:Consistent with the above, the following is a device for implementing the above wireless fidelity Wi-Fi connection method, specifically as follows:
请参阅图5a,为本发明实施例提供的一种移动终端的第一实施例结构示意图。本实施例中所描述的移动终端,包括:获取单元501、第一检测单元502和接入单元503,具体如下:Please refer to FIG. 5 a , which is a schematic structural diagram of a first embodiment of a mobile terminal provided by an embodiment of the present invention. The mobile terminal described in this embodiment includes: an acquisition unit 501, a first detection unit 502, and an access unit 503, specifically as follows:
获取单元501,用于在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同;The obtaining unit 501 is configured to obtain the target BSSID of the second access point when the distance between the mobile terminal and the first access point reaches the roaming condition, wherein the first access point and the second access point SSID and encryption method are the same;
第一检测单元502,用于检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数;The first detection unit 502 is configured to detect whether there is a first password corresponding to the target BSSID in the pre-stored hash table, the hash table includes K records, and each record includes a BSSID and the corresponding password of the BSSID password, the K is a positive integer;
接入单元503,用于在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。The accessing unit 503 is configured to, when the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
可选地,如图5b,图5b为图5a所描述的移动终端的又一变型结构,图5b与图5a相比较,其还可包括:第二检测单元504,具体如下:Optionally, as shown in FIG. 5b, FIG. 5b is another modified structure of the mobile terminal described in FIG. 5a. Compared with FIG. 5a, FIG. 5b may further include: a second detection unit 504, specifically as follows:
第二检测单元504,用于检测所述移动终端是否漫游到所述第二接入点的覆盖范围,在所述第二检测单元504的检测结果为所述移动终端漫游到所述第二接入点的覆盖范围时,由所述获取单元501执行所述获取第二接入点的目标BSSID。The second detection unit 504 is configured to detect whether the mobile terminal roams to the coverage of the second access point, and the detection result of the second detection unit 504 is that the mobile terminal roams to the second access point When the coverage of the access point is reached, the obtaining unit 501 executes the obtaining of the target BSSID of the second access point.
可选地,如图5c,图5c为图5b所描述的移动终端的第二检测单元504的具体细化结构,所述第二检测单元504可包括:确定模块5041和判断模块5042,具体如下:Optionally, as shown in Figure 5c, Figure 5c is a specific detailed structure of the second detection unit 504 of the mobile terminal described in Figure 5b, the second detection unit 504 may include: a determination module 5041 and a judgment module 5042, specifically as follows :
确定模块5041,用于确定所述移动终端的当前位置;A determining module 5041, configured to determine the current location of the mobile terminal;
所述确定模块5041,还具体用于:The determining module 5041 is also specifically configured to:
确定所述当前位置与所述第二接入点的位置之间的距离值;determining a distance value between the current location and the location of the second access point;
判断模块5042,用于判断所述距离值是否小于预设阈值,在所述判断模块5042的判断结果为所述距离值小于所述预设阈值时,确认所述移动终端漫游到所述第二接入点的覆盖范围。A judging module 5042, configured to judge whether the distance value is less than a preset threshold, and confirm that the mobile terminal roams to the second The coverage area of the access point.
可选地,如图5d,图5d为图5a所描述的移动终端的又一变型结构,图5d与图5a相比较,其还可包括:第三检测单元505,具体如下:Optionally, as shown in FIG. 5d, FIG. 5d is another modified structure of the mobile terminal described in FIG. 5a. Compared with FIG. 5a, FIG. 5d may further include: a third detection unit 505, specifically as follows:
第三检测单元505,用于检测所述移动终端是否接收由所述第二接入点发送的beacon帧,在所述第三检测单元505的检测结果为所述移动终端接收到由所述第二接入点发送的beacon帧时,由所述获取单元501执行所述获取第二接入点的目标BSSID。The third detection unit 505 is configured to detect whether the mobile terminal receives the beacon frame sent by the second access point, and the detection result of the third detection unit 505 is that the mobile terminal receives the beacon frame sent by the second access point. When the beacon frame is sent by the second access point, the acquisition unit 501 executes the acquisition of the target BSSID of the second access point.
可选地,如图5e,图5e为图5a所描述的移动终端的又一变型结构,图5e与图5a相比较,其还可包括:保存单元506,具体如下:Optionally, as shown in FIG. 5e, FIG. 5e is another modified structure of the mobile terminal described in FIG. 5a. Compared with FIG. 5a, FIG. 5e may further include: a saving unit 506, specifically as follows:
所述获取单元501还具体用于:The acquisition unit 501 is also specifically configured to:
在所述哈希表中不存在所述目标BSSID对应的所述第一密码时,获取输入的第二密码;When the first password corresponding to the target BSSID does not exist in the hash table, obtain an input second password;
所述接入单元503还具体用于:The access unit 503 is also specifically configured to:
根据所述第二密码接入所述第二接入点;accessing the second access point according to the second password;
保存单元506,用于在所述第二密码成功接入所述第二接入点时,将所述目标BSSID和所述第二密码作为一条记录保存在所述哈希表中。The storing unit 506 is configured to store the target BSSID and the second password as a record in the hash table when the second password successfully accesses the second access point.
可以看出,通过本发明实施例,在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,第一接入点和第二接入点的SSID和加密方式均相同,检测预先存储的哈希表中是否存在目标BSSID对应的第一密码,该哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,K为正整数,在哈希表中存在目标BSSID对应的第一密码时,根据该第一密码接入第二接入点。从而,可在环境中存在多个具有相同SSID和加密方式、但密码不同的接入点的情况下,实现快速接入网络。It can be seen that, through the embodiment of the present invention, when the distance between the mobile terminal and the first access point reaches the roaming condition, the target BSSID of the second access point is obtained, wherein, the first access point and the second access point SSID and encryption method are the same, detect whether there is the first password corresponding to the target BSSID in the pre-stored hash table, the hash table contains K records, each record contains a BSSID and the password corresponding to the BSSID, K is a positive integer, and when the first password corresponding to the target BSSID exists in the hash table, the second access point is accessed according to the first password. Therefore, it is possible to quickly access the network when there are multiple access points with the same SSID and encryption method but different passwords in the environment.
与上述一致地,请参阅图6,为本发明实施例提供的一种移动终端的第二实施例结构示意图。本实施例中所描述的移动终端,包括:至少一个输入设备1000;至少一个输出设备2000;至少一个处理器3000,例如CPU;和存储器4000,上述输入设备1000、输出设备2000、处理器3000和存储器4000通过总线5000连接。Consistent with the above, please refer to FIG. 6 , which is a schematic structural diagram of a second embodiment of a mobile terminal provided by an embodiment of the present invention. The mobile terminal described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and memory 4000, the above-mentioned input device 1000, output device 2000, processor 3000 and The memory 4000 is connected via a bus 5000 .
其中,上述输入设备1000具体可为触控面板、物理按键或者鼠标。Wherein, the above-mentioned input device 1000 may specifically be a touch panel, a physical button or a mouse.
上述输出设备2000具体可为显示屏。The aforementioned output device 2000 may specifically be a display screen.
上述存储器4000可以是高速RAM存储器,也可为非易失存储器(non-volatilememory),例如磁盘存储器。上述存储器4000用于存储一组程序代码,上述输入设备1000、输出设备2000和处理器3000用于调用存储器4000中存储的程序代码,执行如下操作:The above-mentioned memory 4000 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. The above-mentioned memory 4000 is used to store a set of program codes, and the above-mentioned input device 1000, output device 2000 and processor 3000 are used to call the program codes stored in the memory 4000, and perform the following operations:
上述处理器3000,用于:The above-mentioned processor 3000 is used for:
在移动终端离第一接入点的距离达到漫游条件时,获取第二接入点的目标BSSID,其中,所述第一接入点和所述第二接入点的SSID和加密方式均相同;When the distance between the mobile terminal and the first access point reaches the roaming condition, acquire the target BSSID of the second access point, wherein the SSID and encryption method of the first access point and the second access point are the same ;
检测预先存储的哈希表中是否存在所述目标BSSID对应的第一密码,所述哈希表中包含K条记录,每一条记录中包含一个BSSID及该BSSID对应的密码,所述K为正整数;Detecting whether there is a first password corresponding to the target BSSID in the pre-stored hash table, the hash table includes K records, each record includes a BSSID and a password corresponding to the BSSID, and the K is positive integer;
在所述哈希表中存在所述目标BSSID对应的第一密码时,根据该第一密码接入所述第二接入点。When the first password corresponding to the target BSSID exists in the hash table, access the second access point according to the first password.
可选地,上述处理器3000,还具体用于:Optionally, the above-mentioned processor 3000 is also specifically used for:
检测所述移动终端是否漫游到所述第二接入点的覆盖范围,在所述移动终端漫游到所述第二接入点的覆盖范围时,执行所述获取第二接入点的目标BSSID。Detecting whether the mobile terminal roams to the coverage of the second access point, and when the mobile terminal roams to the coverage of the second access point, performing the acquiring the target BSSID of the second access point .
可选地,上述处理器3000检测所述移动终端是否漫游到所述第二接入点的覆盖范围,包括:Optionally, the processor 3000 detecting whether the mobile terminal roams into the coverage of the second access point includes:
确定所述移动终端的当前位置;determining the current location of the mobile terminal;
确定所述当前位置与所述第二接入点的位置之间的距离值;determining a distance value between the current location and the location of the second access point;
判断所述距离值是否小于预设阈值,在所述距离值小于所述预设阈值时,确认所述移动终端漫游到所述第二接入点的覆盖范围。Judging whether the distance value is less than a preset threshold, and confirming that the mobile terminal has roamed to the coverage area of the second access point when the distance value is less than the preset threshold.
可选地,上述处理器3000,还具体用于:Optionally, the above-mentioned processor 3000 is also specifically used for:
检测所述移动终端是否接收由所述第二接入点发送的beacon帧,在所述移动终端接收到由所述第二接入点发送的beacon帧时,执行所述获取第二接入点的目标BSSID。Detecting whether the mobile terminal receives the beacon frame sent by the second access point, when the mobile terminal receives the beacon frame sent by the second access point, performing the acquiring the second access point of the target BSSID.
可选地,上述处理器3000,还具体用于:Optionally, the above-mentioned processor 3000 is also specifically used for:
在所述哈希表中不存在所述目标BSSID对应的所述第一密码时,获取输入的第二密码;When the first password corresponding to the target BSSID does not exist in the hash table, obtain an input second password;
根据所述第二密码接入所述第二接入点;accessing the second access point according to the second password;
在所述第二密码成功接入所述第二接入点时,将所述目标BSSID和所述第二密码作为一条记录保存在所述哈希表中。When the second password successfully accesses the second access point, save the target BSSID and the second password as a record in the hash table.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种无线保真Wi-Fi连接方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, it includes part or all of any wireless fidelity Wi-Fi connection method described in the above method embodiments step.
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present invention has been described in conjunction with various embodiments herein, in the process of implementing the claimed invention, those skilled in the art can understand and Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
本领域技术人员应明白,本发明的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机程序存储/分布在合适的介质中,与其它硬件一起提供或作为硬件的一部分,也可以采用其他分布形式,如通过Internet或其它有线或无线电信系统。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, devices (devices), or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. The computer program is stored/distributed on suitable media, supplied with or as part of other hardware, and may also take other forms of distribution, such as via the Internet or other wired or wireless telecommunication systems.
本发明是参照本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, apparatus (device) and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
尽管结合具体特征及其实施例对本发明进行了描述,显而易见的,在不脱离本发明的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本发明的示例性说明,且视为已覆盖本发明范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Although the invention has been described in conjunction with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, the specification and drawings are merely illustrative of the invention as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710091096.0A CN106792698A (en) | 2017-02-20 | 2017-02-20 | A wireless fidelity Wi-Fi connection method and mobile terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710091096.0A CN106792698A (en) | 2017-02-20 | 2017-02-20 | A wireless fidelity Wi-Fi connection method and mobile terminal |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106792698A true CN106792698A (en) | 2017-05-31 |
Family
ID=58958709
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710091096.0A Pending CN106792698A (en) | 2017-02-20 | 2017-02-20 | A wireless fidelity Wi-Fi connection method and mobile terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106792698A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019075896A1 (en) * | 2017-10-18 | 2019-04-25 | 广州视睿电子科技有限公司 | Method and apparatus for interconnection between devices, system, device, and storage medium |
| CN110022561A (en) * | 2019-03-29 | 2019-07-16 | 联想(北京)有限公司 | Information processing method and information processing unit |
| CN115002758A (en) * | 2022-05-26 | 2022-09-02 | 深圳市联洲国际技术有限公司 | Configuration method, configuration device and processor of multi-frequency wireless hot spot |
| CN118474739A (en) * | 2023-11-14 | 2024-08-09 | 荣耀终端有限公司 | WiFi connection method and related equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004034205A2 (en) * | 2002-10-08 | 2004-04-22 | Koolspan | Self-managed network access using localized access management |
| CN101977382A (en) * | 2010-10-27 | 2011-02-16 | 福州星网视易信息系统有限公司 | Audio and video integrated control circuit and method for accessing access point |
| CN105323244A (en) * | 2015-09-22 | 2016-02-10 | 小米科技有限责任公司 | Method and device for network identification |
| CN105657706A (en) * | 2015-10-30 | 2016-06-08 | 东莞酷派软件技术有限公司 | An access method, related equipment and access device |
| CN106162818A (en) * | 2015-04-09 | 2016-11-23 | 厦门众联世纪科技有限公司 | The method unlocking WIFI hot spot |
-
2017
- 2017-02-20 CN CN201710091096.0A patent/CN106792698A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004034205A2 (en) * | 2002-10-08 | 2004-04-22 | Koolspan | Self-managed network access using localized access management |
| CN101977382A (en) * | 2010-10-27 | 2011-02-16 | 福州星网视易信息系统有限公司 | Audio and video integrated control circuit and method for accessing access point |
| CN106162818A (en) * | 2015-04-09 | 2016-11-23 | 厦门众联世纪科技有限公司 | The method unlocking WIFI hot spot |
| CN105323244A (en) * | 2015-09-22 | 2016-02-10 | 小米科技有限责任公司 | Method and device for network identification |
| CN105657706A (en) * | 2015-10-30 | 2016-06-08 | 东莞酷派软件技术有限公司 | An access method, related equipment and access device |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019075896A1 (en) * | 2017-10-18 | 2019-04-25 | 广州视睿电子科技有限公司 | Method and apparatus for interconnection between devices, system, device, and storage medium |
| CN110022561A (en) * | 2019-03-29 | 2019-07-16 | 联想(北京)有限公司 | Information processing method and information processing unit |
| CN115002758A (en) * | 2022-05-26 | 2022-09-02 | 深圳市联洲国际技术有限公司 | Configuration method, configuration device and processor of multi-frequency wireless hot spot |
| CN118474739A (en) * | 2023-11-14 | 2024-08-09 | 荣耀终端有限公司 | WiFi connection method and related equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11057948B2 (en) | Method and apparatus for connecting to wireless access point | |
| US10716151B2 (en) | Method and device for establishing wireless connection | |
| US10299197B2 (en) | Wireless fidelity connection method, mobile terminal and storage medium | |
| US10873900B2 (en) | Method for wireless fidelity connection and related products | |
| EP3277027B1 (en) | Wi-fi connection method, mobile terminal and storage medium | |
| CN106686587B (en) | A wireless fidelity Wi-Fi connection method, mobile terminal and medium | |
| EP3565370B1 (en) | Wireless fidelity (wi-fi) connection method and related product | |
| CN106792698A (en) | A wireless fidelity Wi-Fi connection method and mobile terminal | |
| US10034323B2 (en) | Control method for BLE communication between host device and peripheral device | |
| CN106658670A (en) | Wireless fidelity Wi-Fi scanning method and mobile terminal | |
| CN105873180A (en) | Method for establishing wireless connection at network device side, method for establishing wireless connection at user device side, network device and user device for establishing wireless connection, system for establishing wireless connection | |
| CN106793015A (en) | A wireless fidelity Wi-Fi connection method and mobile terminal | |
| US11044766B2 (en) | Method for Wi-Fi connection and related products | |
| CN106793016B (en) | Wireless fidelity Wi-Fi connection method and mobile terminal | |
| CN106793017A (en) | A kind of Wireless Fidelity Wi Fi connection methods and mobile terminal | |
| CN106686588A (en) | Wireless fidelity Wi-Fi connecting method and mobile terminal |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |