CN106714274B - access point connection method and device - Google Patents

access point connection method and device Download PDF

Info

Publication number
CN106714274B
CN106714274B CN201610464451.XA CN201610464451A CN106714274B CN 106714274 B CN106714274 B CN 106714274B CN 201610464451 A CN201610464451 A CN 201610464451A CN 106714274 B CN106714274 B CN 106714274B
Authority
CN
China
Prior art keywords
information
access
password
target
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610464451.XA
Other languages
Chinese (zh)
Other versions
CN106714274A (en
Inventor
徐森圣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610464451.XA priority Critical patent/CN106714274B/en
Publication of CN106714274A publication Critical patent/CN106714274A/en
Application granted granted Critical
Publication of CN106714274B publication Critical patent/CN106714274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

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

Abstract

The invention discloses a kind of access point connection method and devices, belong to radio network technique field.Method includes:When detecting the attended operation to target access, target access information is determined, target access information is for identifying target access;According to target access information, target password is obtained from locally stored offline database, offline database is and the matched password of access-in point information for storing access-in point information and corresponding password, target password;According to target password, linking objective access point.The present invention is offline database by that will obtain access-in point information and corresponding password storage from server, when so that terminal being in arbitrary network connection status, offline database can be utilized to get the password for the access point for needing to connect, and then the access point is connected, the limitation of access point could be connected in network connection state by having broken only terminal.

Description

Access point connection method and device
Technical field
The present invention relates to radio network technique field, more particularly to a kind of access point connection method and device.
Background technology
With the development of radio network technique, the portion of a large amount of WiFi (Wireless Fidelity, Wireless Fidelity) access points It affixes one's name to and brings great convenience to the life of user.For example, in many public arenas, multiple WiFi access points are deployed with, eventually End can connect any WiFi access points, can achieve the purpose that access internet.
In the prior art, most of WiFi access points are both provided with password, and WiFi access points are obtained in order to facilitate user Password can store the access-in point information of larger WiFi access points and corresponding password in server.Terminal is set in connection When having set the WiFi access points of password, corresponding password can be obtained from server according to the access-in point information of the WiFi access points, And then according to the password got, connect the WiFi access points.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
During above-mentioned WiFi access points connection, terminal needs to obtain password from server so that terminal necessarily is in When network connection state, the WiFi access points could be connected.Once terminal can not network, just cannot obtain WiFi from server connects The password of access point, and then the WiFi access points cannot be connected, therefore, above-mentioned connection method is restricted strong.
Invention content
In order to solve problems in the prior art, an embodiment of the present invention provides a kind of access point connection method and devices.Institute It is as follows to state technical solution:
In a first aspect, a kind of access point connection method is provided, the method includes:
When detecting the attended operation to target access, target access information, the target access letter are determined Breath is for identifying the target access;
According to the target access information, obtain target password from locally stored offline database, it is described from For storing access-in point information and corresponding password, the target password is and described access point information matches line database Password;
According to the target password, the target access is connected.
Second aspect provides a kind of access point connection method, the method includes:
Receive the download request of terminal, carried terminal location information in the download request;
Data to be sent are obtained, the data include being located at the access of same geographic area with the terminal positional information Point information and corresponding password;
The data are sent to the terminal, by the terminal according to the data connection access point.
The third aspect, provides a kind of access point attachment device, and described device includes:
Determining module, it is described for when detecting the attended operation to target access, determining target access information Target access information is for identifying the target access;
Acquisition module, for according to the target access information, mesh to be obtained from locally stored offline database Password is marked, the offline database is to be connect with described for storing access-in point information and corresponding password, the target password The password of access point information matches;
Link block, for according to the target password, connecting the target access.
Fourth aspect, provides a kind of access point attachment device, and described device includes:
Receiving module, the download for receiving terminal are asked, carried terminal location information in the download request;
First acquisition module, for obtaining data to be sent, the data include being located at the terminal positional information The access-in point information of same geographic area and corresponding password;
Sending module is accessed by the terminal according to the data connection for the data to be sent to the terminal Point.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
It is offline database by the way that access-in point information and corresponding password storage will be obtained from server so that at terminal When arbitrary network connection status, offline database can be utilized to get the password for the access point for needing to connect, and then connect The access point, the limitation of access point could be connected in network connection state by having broken only terminal.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is a kind of flow chart of access point connection method provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of access point connection method provided in an embodiment of the present invention;
Fig. 3 A are a kind of flow charts of access point connection method provided in an embodiment of the present invention;
Fig. 3 B are the flow charts that a kind of terminal provided in an embodiment of the present invention obtains target password;
Fig. 3 C are a kind of flow charts of terminal update offline database provided in an embodiment of the present invention;
Fig. 4 A are a kind of flow charts of access point connection method provided in an embodiment of the present invention;
Fig. 4 B are the flow charts that a kind of terminal provided in an embodiment of the present invention obtains target password;
Fig. 4 C are a kind of search order schematic diagrames from the near to the distant provided in an embodiment of the present invention;
Fig. 5 is a kind of block diagram of access point attachment device provided in an embodiment of the present invention;
Fig. 6 is a kind of block diagram of access point attachment device provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention;
Fig. 8 is a kind of block diagram of access point attachment device provided in an embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Fig. 1 is a kind of flow chart of access point connection method provided in an embodiment of the present invention, is used for terminal, referring to Fig. 1, originally Inventive embodiments provide method flow include:
101, when detecting the attended operation to target access, target access information, target access letter are determined Breath is for identifying target access.
102, according to target access information, target password is obtained from locally stored offline database, offline number It is and the matched password of access-in point information for storing access-in point information and corresponding password, target password according to library.
103, according to target password, linking objective access point.
Method provided in an embodiment of the present invention, by the way that access-in point information and corresponding password storage will be obtained from server For offline database so that when terminal is in arbitrary network connection status, can be got using offline database and need to connect Access point password, and then connect the access point, access point could be connected in network connection state by having broken only terminal Limitation.
Optionally, target access information includes SSID (Service Set Identifier, the service of target access Set identification) and BSSID (Basic Service Set Identifier, infrastructure service set mark).
Optionally, the access-in point information and corresponding password stored in offline database is to be encrypted by server Obtained ciphertext,
Correspondingly, according to target access information, acquisition target password includes from locally stored offline database:
Target access information is encrypted, target access information ciphertext is obtained;
Judge in offline database whether to include target access information ciphertext;
If including obtaining Crypted password corresponding with target access information ciphertext from offline database, will obtain The Crypted password got is decrypted, and obtains target password.
Optionally, target access information is encrypted, obtaining target access information ciphertext includes:
According to the first Encryption Algorithm, the cryptographic Hash of SSID and the cryptographic Hash of BSSID are calculated;
The cryptographic Hash of the cryptographic Hash of SSID and BSSID is combined, access point ciphertext is obtained.
Optionally, target access information includes the SSID and terminal positional information of target access.
Optionally, according to target access information, acquisition target password includes from locally stored offline database:
According to terminal positional information, multiple regions information is obtained, each area information is located at the default of terminal positional information In range;
According to multiple regions information and SSID, multiple information to be checked are determined, each information to be checked is used to indicate SSID With an area information in multiple regions information;
Judge in multiple information to be checked whether to include target query information, target query information is to be stored in off-line data Information to be checked in library;
If including, password corresponding with target query information is obtained from offline database, the password got is true It is set to target password.
Optionally, the access-in point information and corresponding password stored in offline database is to be encrypted by server Obtained ciphertext,
According to multiple regions information and SSID, determine that multiple information to be checked include:
According to pre-arranged code mode, multiple regions information is encoded, SSID is added according to the second Encryption Algorithm It is close, obtain multiple information to be checked;
Password corresponding with target query information is obtained from offline database, and it is close that the password got is determined as target Code include:
Crypted password corresponding with target query information is obtained from offline database, and the Crypted password got is carried out Decryption, obtains target password.
Optionally, this method further includes:
It is sent to server and downloads request, download request carried terminal location information;
The data that server returns are received, offline database is stored data as, data are to be located at terminal positional information The access-in point information of same geographic area and corresponding password.
Optionally, the first Encryption Algorithm is irreversible Encryption Algorithm.
Optionally, pre-arranged code mode is irreversible coding mode, and the second Encryption Algorithm is irreversible Encryption Algorithm.
The alternative embodiment that any combination forms the disclosure may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
Fig. 2 is a kind of flow chart of access point connection method provided in an embodiment of the present invention, is used for server, referring to Fig. 2, Method flow provided in an embodiment of the present invention includes:
201, the download request of terminal, carried terminal location information in download request are received.
202, data to be sent are obtained, data include being located at the access point letter of same geographic area with terminal positional information Breath and corresponding password.
203, terminal is sent data to, by terminal according to data connection access point.
Method provided in an embodiment of the present invention, by the way that the access-in point information screened and corresponding password to be sent to Terminal is offline database by terminal storage so that when terminal is in arbitrary network connection status, can utilize offline database The password for getting the access point for needing to connect, the limit of access point could be connected in network connection state by having broken only terminal System.
Optionally, this method further includes:
Obtain be located at same geographic area in be requested number be more than the first predetermined threshold value the first access-in point information and Corresponding password is grouped storage according to geographic area to the first access-in point information got and corresponding password;With/ Or,
It obtains and is located at the second access point letter that data network signals intensity in same geographic area is less than the second predetermined threshold value Breath and corresponding password, are grouped and deposit to the second access-in point information got and corresponding password according to geographic area Storage.
Optionally, data are the ciphertext that access-in point information and corresponding password are encrypted.
Optionally, this method further includes:
When access-in point information includes SSID and BSSID of access point, according to the first Encryption Algorithm, to access-in point information into Row encryption, obtains access-in point information ciphertext;According to third Encryption Algorithm, a pair password corresponding with access-in point information is encrypted, Obtain Crypted password corresponding with access-in point information ciphertext;Or,
When access-in point information includes the SSID and terminal positional information of access point, according to the second Encryption Algorithm, to SSID It is encrypted, obtains SSID ciphertexts;According to pre-arranged code mode, terminal positional information is encoded, is obtained position encoded;It will SSID ciphertexts are combined with position encoded, obtain access-in point information ciphertext;According to third Encryption Algorithm, to access-in point information pair The password answered is encrypted, and obtains Crypted password corresponding with access-in point information ciphertext.
Optionally, when access-in point information includes SSID and BSSID of access point, according to the first Encryption Algorithm, to access Point information is encrypted, and obtaining access-in point information ciphertext includes:
Calculate the cryptographic Hash of SSID and the cryptographic Hash of BSSID;
The cryptographic Hash of the cryptographic Hash of SSID and BSSID is combined, access-in point information ciphertext is obtained.
The alternative embodiment that any combination forms the disclosure may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
Fig. 3 A are a kind of flow charts of access point connection method provided in an embodiment of the present invention, and interaction agent is terminal kimonos Business device, access-in point information includes the SSID and BSSID of access point, referring to Fig. 3 A, method flow packet provided in an embodiment of the present invention It includes:
301, terminal to server, which is sent, downloads request, which asks carried terminal location information.
In embodiments of the present invention, terminal has the function of connecting access point.Terminal can send to download to server and ask It asks, to be located at the access-in point information of same geographic area and corresponding password with terminal positional information from server acquisition. Terminal can periodically send download request or terminal sends download request when detecting trigger condition, and the present invention is real Example is applied to be not especially limited this.Wherein, it when trigger condition can be that terminal is in network connection state, or is detected for terminal The trigger action downloaded to data, or detect that access point attended operation, the embodiment of the present invention are not made this specifically for terminal It limits.
302, server obtains data to be sent, by the data to be sent after the download request for receiving terminal It is sent to terminal, which includes being located at the access-in point information of same geographic area and right with terminal positional information The password answered, access-in point information include the SSID and BSSID of access point.
In the prior art, usually when terminal is in network connection state, if detecting the company to any access point Operation is connect, the password that terminal can send out access point to server obtains request, by server according to the access-in point information of the access point The password of the access point is returned to, terminal connects the access point according to the password received.But based on some reasons (for example, eventually The data network signals of end data underfed or terminal position are poor etc.), terminal can not Connection Service device, in turn Access point can not be connected.
In embodiments of the present invention, server can store a large amount of access-in point information and corresponding password, such as WiFi The access-in point information of access point and corresponding WiFi passwords etc..Especially it is non-net to make terminal under arbitrary network state The password of access point can be got under network connection status, and then is connected to access point to achieve the purpose that online, server can It is asked according to the download of terminal, the data (including access-in point information and corresponding password) of storage is sent to terminal so that The data received can be stored as offline database by terminal, and directly can obtain access point by offline database Password.
Further, it is contemplated that the memory capacity of terminal is limited, in order to improve the utilization rate of terminal storage space, protects simultaneously The success rate of terminal connection access point is demonstrate,proved, server can be according to default screening conditions, in the access-in point information and correspondence of storage Password in, filter out a part be worth higher access-in point information for a user, later, obtained from the data filtered out The data to be sent for being located at same geographic area with terminal positional information are taken, and data to be sent are sent to terminal.
Wherein, since the scope of activities of user is usually fixed, server, can when the data to storage are screened It is screened according to geographic area, to reduce the range subsequently further screened, improves screening efficiency, specific screening process can To be divided into following several situations:
The first situation:Obtain the first access for being located at and being requested that number is more than the first predetermined threshold value in same geographic area Point information and corresponding password, divide the first access-in point information got and corresponding password according to geographic area Group storage.
Wherein, the first predetermined threshold value can be pre-set or changed as needed by server, the embodiment of the present invention This is not especially limited.
It should be noted that for any access-in point information of server storage, receiving terminal-pair, this connects server It, can the requested number of the corresponding record access-in point information when password of access point obtains request.It is more than first pre- by requested number If threshold value is as the reason of screening conditions, which reflects the corresponding connected number of access point, correspondingly, should The corresponding requested number of access-in point information is higher, illustrate terminal connect corresponding access point probability it is higher, that is to say, the access Point is worth higher for users.Therefore, it is screened by the way that terminal is connected the high access-in point information of probability, disclosure satisfy that end The connection requirement to access point is held, while avoiding the waste of terminal storage space.
Wherein, it can be requested number within a preset period of time to be requested number also, which can be by servicing Device is pre-set or is changed according to demand, which can be 1 day, 1 week, 1 month etc., and the embodiment of the present invention is to this It is not especially limited.Since the connected situation of access point may constantly change with the time, than if any access point exist At least 10 terminal connections daily in a period of time, and may be closed due to businessman causes not having subsequently terminal connection should Access point, therefore by counting the connected number in preset time period so that the data screened can more meet access point Practical connection, improve the accuracy of screening, ensure that terminal connection access point success rate.
The second situation:It obtains and is located at data network signals intensity in same geographic area and is less than the of the second predetermined threshold value Two access-in point informations and corresponding password, according to geographic area to the second access-in point information got and corresponding password It is grouped storage.
Wherein, the second predetermined threshold value can be pre-set or changed as needed by server, the embodiment of the present invention This is not especially limited.
It should be noted that for any access-in point information of server storage, server can also correspond to access point letter The data network signals intensity of breath record terminal.Specifically, terminal can be reported when searching neighbouring access point to server The access-in point information searched and the data network signals intensity of itself correspond to corresponding access-in point information by server and record The data signal strength.Wherein, it when the data network signals of record are weaker, can not be connected when illustrating terminal near the access point Network that is to say at this point, terminal needs the possibility for connecting the access point bigger, the weaker corresponding access of data network signals The value for users of point is higher.Therefore, by screening the weaker access-in point information of data network signals, Neng Gouman The connection requirement of sufficient end-on access point, while avoiding the waste of terminal storage space.
The third situation:It is screened in conjunction with the first above-mentioned situation and the second situation so that the data filtered out were both The higher access-in point information of connected number can be covered, and the weaker access-in point information of data network signals can be covered, is expanded The big coverage area of the selection result, can be further improved the success rate of terminal connection access point.
It should be noted that above-mentioned geographic area can be divided according to administrative region, for example, according to different cities into Row division etc.;Or divided according to other region division modes, the embodiment of the present invention is not especially limited this.Specifically Ground, for any access-in point information of server storage, server can correspond to the location information for storing the access point, the access The location information of point can be obtained by server when user (such as businessman) registers access-in point information;Or it is connect in connection by terminal Report the location information of itself, server that the location information that terminal reports is stored as to the location information of the access point when access point. Server can determine the geographic area where it according to the location information of access point.
It should be noted that since the access-in point information of server storage and corresponding password can update, for example, The record or access-in point information for increasing new access-in point information and corresponding password are changed, such as access point SSID is changed or change etc. occurs for the password of access point, and sieve can be performed a plurality of times according to actual situation of change in server The process of choosing, to ensure the accuracy of the data filtered out.For the data filtered out each time, server can be according to the number It is the version of its interpolation data so that terminal can be updated local data according to version according to affiliated geographic area.Example Such as, when geographic area is Beijing, the version of the data of above-mentioned screening conditions is met in the Beijing Area that server filters out for the first time This is bj-version1, and the version for the data for meeting above-mentioned screening conditions in the Beijing Area that server programmed screening goes out is Bj-version2 etc. so that when the version of terminal local data is bj-version1, it is bj- that version can be obtained from server The data of version2 are updated.
In embodiments of the present invention, in order to ensure that the safety of data, the data to be sent that server is got can be The ciphertext that access-in point information and corresponding password are encrypted.Specifically, server is being got and terminal location Information is after the access-in point information and corresponding password of same geographic area, according to the first Encryption Algorithm, to access-in point information Including SSID and BSSID be encrypted, obtain access-in point information ciphertext;According to third Encryption Algorithm, pair and access-in point information Corresponding password is encrypted, and obtains Crypted password corresponding with access-in point information ciphertext.Further, since encrypted ciphertext accounts for Memory space is less than the memory space that plaintext before encrypting occupies, and therefore, can also further be reduced and be waited for by encryption The memory space that the data of transmission are occupied in terminal, and then improve the memory space utilization rate of terminal.
Wherein, the first Encryption Algorithm and third Encryption Algorithm can be the same or different.It is accessed due to being connected in terminal When point, the representation to access-in point information is in plain text or ciphertext does not require, and when terminal connects access point, it need to define Therefore the plaintext of password connects the actual demand of access point in conjunction with terminal, while further reinforcing the safety of data, excellent Selection of land, the first Encryption Algorithm are irreversible encryption algorithm, and third Encryption Algorithm is irreversible cryptographic algorithm.
When the first Encryption Algorithm is irreversible encryption algorithm, which can be hash algorithm, correspondingly, right The process that the SSID and BSSID that access-in point information includes are encrypted can be:Calculate the cryptographic Hash of SSID and the Kazakhstan of BSSID Uncommon value;The cryptographic Hash of the cryptographic Hash of SSID and BSSID is combined, access-in point information ciphertext is obtained.Wherein, by the Kazakhstan of SSID Uncommon value and the cryptographic Hash of BSSID are combined, and can be the simple concatenation of the cryptographic Hash of the cryptographic Hash and BSSID of SSID, for The sequencing of the two, the embodiment of the present invention are not especially limited.In addition, the first Encryption Algorithm can also be in addition to hash algorithm it Other outer irreversible Encryption Algorithm, the embodiment of the present invention are not especially limited this.
When third Encryption Algorithm be reversible Encryption Algorithm when, the third Encryption Algorithm can be XXTea Encryption Algorithm or its Its reversible Encryption Algorithm, the embodiment of the present invention are not especially limited this.
303, the data are stored as offline database by terminal after the data for receiving server transmission.
In embodiments of the present invention, since the access-in point information of server storage and corresponding password may in real time more Newly, in the offline database in order to ensure terminal data real-time, terminal can also be updated offline database, specifically more New paragon includes following several situations:
The first situation:Terminal from server obtain latest edition data, by the data of the latest edition be stored as from Line database.
Specifically, it when terminal detects the trigger action of update offline database, is asked to the update of server transmission data It asks, carried terminal location information in data update request, by server according to the terminal positional information, obtains and return and be somebody's turn to do Terminal positional information is located at the data of the latest edition of same geographic area.After terminal receives the data of the latest edition, delete Except original offline database, the data of the latest edition are stored as offline database.
The second situation:What terminal did not included from the local offline database of server acquisition updates the data, by the update Data are inserted into local offline database.
Specifically, it when terminal detects the trigger action of update offline database, is asked to the update of server transmission data It asks, which asks carried terminal location information and terminal current version, by server according to the terminal positional information And terminal current version, acquisition update the data.This update the data refer to latest edition data and the terminal current version Have discrepant access-in point information and corresponding password between data.Later, updated the data according to this, to offline database into Row update, detailed process can be:
For each of including newer access-in point information in updating the data, judge in offline database with the presence or absence of this more New access-in point information;If it does not exist, then the newer access-in point information and corresponding newer password are added to offline In database.If it is present first deleting the corresponding record of the newer access-in point information from offline database, then again will The newer access-in point information and corresponding newer password are added in offline database.
It should be noted that the first above-mentioned situation and the second situation, terminal can also be according to predetermined period, periodically Offline database is updated, which can be pre-set or be changed by server;Alternatively, when server has newly When version updating, terminal is reminded to carry out the update etc. of offline database, the embodiment of the present invention carries out offline database more to terminal New opportunity is not especially limited.
It should be noted that if in preset duration, the trigger action of update offline database is not detected, then terminal Also offline database can be updated automatically.Specifically, preset duration is alreadyd exceed not to off-line data when terminal detects When library is updated, local offline database is deleted.Later, it is sent from trend server and downloads request, obtained again from server The data of latest edition are taken, and the data of latest edition are stored as offline database.Preset duration can be carried out pre- by server It first sets, when offline database does not update more than preset duration, illustrates that the data of the offline database are expired, Wu Faman The connection requirement of sufficient end-on access point.Wherein, the opportunity that terminal obtains the data of latest edition from server can be to delete It is obtained when local offline database, or when detecting the attended operation of access point after the offline database of terminal deletion local Obtain etc., the embodiment of the present invention is not especially limited this.
It should be noted that the offline database of terminal local is the database of key-value types, using key-value The database of type can improve efficiency data query, while improve the utilization rate of terminal storage space.
In embodiments of the present invention, terminal is after being locally stored offline database, and using offline database, acquisition connects The password of access point, and then the connection of access point is carried out, detailed process is referring to following step 304 to step 306.
304, when terminal detects the attended operation to target access, target access information, target access are determined Point information is for identifying target access.
In embodiments of the present invention, terminal can scan for neighbouring access point, for the access point searched, eventually End can obtain the access-in point information of the access point, that is to say, terminal can get the SSID and BSSID of the access point, and show Show the access-in point information.In the access point searched, when terminal detects the attended operation to target access, terminal can The target access information for determining target access that is to say the SSID and BSSID of target access.
305, terminal obtains target password according to target access information from locally stored offline database, should Target password be and the matched password of access-in point information.
In embodiments of the present invention, it according to the different form of access-in point information in offline database and corresponding password, obtains Take the process of target password that can be divided into the following two kinds situation:
The first situation:What is stored in offline database is the plaintext of access-in point information and corresponding password, and terminal obtains The process of target password can be:For terminal whether according to the target access information of acquisition, it includes to be somebody's turn to do to search in offline database Target access information;If including obtaining password corresponding with the target access information, the password of acquisition is determined as Target password.If do not included, acquisition failed message is returned.
The second situation:The access-in point information and corresponding password stored in offline database is to be added by server Close obtained ciphertext, that is to say, off-line data library storage is access-in point information ciphertext and corresponding Crypted password, then terminal The process for obtaining target password is as shown in Figure 3B, includes the following steps:
Step 1:Terminal-pair target access information is encrypted, and obtains target access information ciphertext.
Step 2:Whether terminal judges in offline database to include target access information ciphertext.
Step 3:If including encryption corresponding with target access information ciphertext is obtained if terminal from offline database Password.
Step 4:The Crypted password got is decrypted terminal, obtains target password.
Step 5:If do not included, acquisition failed message is returned.
Wherein, terminal need to use Encryption Algorithm identical with server, target access information be encrypted, to obtain Target access information ciphertext, detailed process can be:According to the first Encryption Algorithm, the cryptographic Hash and BSSID of SSID are calculated Cryptographic Hash;The cryptographic Hash of the cryptographic Hash of SSID and BSSID is combined, access point ciphertext is obtained.Terminal is by the Kazakhstan of SSID The process that uncommon value and the cryptographic Hash of BSSID are combined, group is carried out with server by the cryptographic Hash of SSID and the cryptographic Hash of BSSID Similarly, details are not described herein for the process of conjunction.Wherein, terminal need to use decipherment algorithm corresponding with server for encrypting algorithm to encryption Password is decrypted, to obtain target password.
In another embodiment, terminal can also independently update offline database.If target password has not been obtained in terminal, It is not to be stored with the password with the target access information matches in offline database, then terminal can be obtained from server Corresponding password, and then offline database is updated according to the target access information and the password got.Specifically Ground, if being in non-network connection status when terminal has not been obtained target password, terminal can to the target access information into Row record, when terminal is in network connection state, server is sent to by the target access information, and being returned by server should The corresponding password of target access information;Terminal is according to the target access information and the password got, to off-line data It is updated.If terminal is in network connection state when target password has not been obtained, terminal can be obtained directly from server Corresponding password, and then offline database is updated.Offline database is independently updated by terminal, it is offline to improve update The flexibility of database.
It is autonomous to terminal below by taking what is stored in offline database is access-in point information and corresponds to the ciphertext of password as an example The process of update offline database is explained, and as shown in Figure 3 C, includes the following steps:
Step 1:The SSID that target access information includes and BSSID are encrypted terminal, obtain target access Information ciphertext.
Step 2:Judge in offline database whether to include the target access information ciphertext.
Step 3:If it is not, then using third Encryption Algorithm identical with server, which is corresponded to Password be encrypted, obtain Crypted password.
Step 4:The target access ciphertext and corresponding Crypted password are stored to offline database.
Step 5:If it is, deleting original record corresponding with the target access information ciphertext.Later, it executes above-mentioned Step 3 is to step 4.
306, terminal is according to target password, linking objective access point.
In embodiments of the present invention, terminal can save the connection of the target access after being successfully connected target access State, for example preserve the target access information of the target access and corresponding password so that terminal searches this next time After access point, the access point can be directly connected to.
Method provided in an embodiment of the present invention, by the way that access-in point information and corresponding password storage will be obtained from server For offline database so that when terminal is in arbitrary network connection status, can be got using offline database and need to connect Access point password, and then connect the access point, access point could be connected in network connection state by having broken only terminal Limitation.Further, by the way that access-in point information and corresponding password are encrypted, the safety of data is improved, together When due to encryption reduce memory space, improve the utilization rate of terminal storage space.
Embodiment shown in above-mentioned Fig. 3 A is explained by the case where SSID and BSSID of access point of access-in point information Illustrate, in embodiments of the present invention, access-in point information can also be the SSID and terminal positional information of access point.With reference to figure The case where SSID and terminal positional information that access-in point information is access point is explained in embodiment shown in 4A.
Fig. 4 A are a kind of flow charts of access point connection method provided in an embodiment of the present invention, and interaction agent is terminal kimonos Business device, access-in point information includes the SSID and terminal positional information of access point, referring to Fig. 4 A, method provided in an embodiment of the present invention Flow includes:
401, terminal to server, which is sent, downloads request, which asks carried terminal location information.
Similarly with step 301, details are not described herein for the step 401.
402, server obtains data to be sent, by the data to be sent after the download request for receiving terminal It is sent to terminal, which includes being located at the access-in point information of same geographic area and right with terminal positional information The password answered, access-in point information include the SSID and terminal positional information of access point.
The process and obtain that server screens the access-in point information of storage and corresponding password in the step 402 Take the processes of data to be sent with step 302 similarly, details are not described herein.
In embodiments of the present invention, the data to be sent that server is got can be to access-in point information and corresponding The ciphertext that password is encrypted.Specifically, server is getting the connecing in same geographic area with terminal positional information After access point information and corresponding password, according to the second Encryption Algorithm, SSID is encrypted, obtains SSID ciphertexts;According to pre- If coding mode encodes terminal positional information, obtain position encoded;SSID ciphertexts are combined with position encoded, Obtain access-in point information ciphertext;According to third Encryption Algorithm, the corresponding password of access-in point information is encrypted, obtains and accesses The corresponding Crypted password of point information ciphertext.Wherein, SSID ciphertexts are combined with position encoded, can are the cryptographic Hash of SSID With the simple concatenation of position encoded value, for the sequencing of the two, the embodiment of the present invention is not especially limited.After encryption Ciphertext occupy memory space be less than plaintext before encrypting occupy memory space, therefore, by encrypt can also further Ground reduces the memory space that data to be sent are occupied in terminal, and then improves the memory space utilization rate of terminal.
Wherein, the second Encryption Algorithm and third Encryption Algorithm can be the same or different.It is accessed due to being connected in terminal When point, the representation to access-in point information is in plain text or ciphertext does not require, and when terminal connects access point, it need to define Therefore the plaintext of password connects the actual demand of access point in conjunction with terminal, while further reinforcing the safety of data, excellent Selection of land, the second Encryption Algorithm are irreversible encryption algorithm, and pre-arranged code mode is irreversible coding mode, third Encryption Algorithm For irreversible cryptographic algorithm.
Wherein, when the second Encryption Algorithm is irreversible encryption algorithm, and pre-arranged code mode is irreversible coding mode, Second Encryption Algorithm can be hash algorithm, which can be that Geohash geographic location areas encode.Correspondingly, SSID ciphertexts are the cryptographic Hash of SSID.In addition, the second Encryption Algorithm can also be other than hash algorithm other are irreversible Encryption Algorithm, pre-arranged code mode can be Geohash other than other geographic location area coding modes, the embodiment of the present invention This is not especially limited.When third Encryption Algorithm is reversible Encryption Algorithm, which can be that XXT encryptions are calculated Method or other reversible Encryption Algorithm, the embodiment of the present invention are not especially limited this.
403, the data are stored as offline database by terminal after the data for receiving server transmission.
Similarly with step 303, details are not described herein for the step 403.
In embodiments of the present invention, terminal is after being locally stored offline database, and using offline database, acquisition connects The password of access point, and then the connection of access point is carried out, detailed process is referring to following step 404 to step 406.
404, when terminal detects the attended operation to target access, target access information, target access are determined Point information is for identifying target access.
In embodiments of the present invention, terminal can scan for neighbouring access point, for the access point searched, eventually End can obtain the SSID and the terminal positional information of itself of the access point, and the SSID of access point and terminal location are believed Breath is determined as the access-in point information of access point, and shows the SSID of the access point.In the access point searched, when terminal detects When to the attended operation of target access, terminal can determine the target access information of target access, that is to say that target connects The SSID and terminal positional information of access point.
405, terminal obtains target password according to target access information from locally stored offline database, should Target password be and the matched password of access-in point information.
In embodiments of the present invention, it according to the different form of access-in point information in offline database and corresponding password, obtains Take the process of target password that can be divided into the following two kinds situation:
The first situation:What is stored in offline database is the plaintext of access-in point information and corresponding password, and terminal obtains The process of target password can be:According to terminal positional information, multiple regions information is obtained, each area information is located at terminal position In the preset range of confidence breath;According to the SSID of multiple regions information and target access, multiple information to be checked are determined, each Information to be checked is used to indicate an area information in the SSID and multiple regions information of target access.It that is to say, target The SSID of access point is combined with each area information, obtains multiple information to be checked.Later, judge multiple information to be checked In whether include target query information, target query information is the information to be checked being stored in offline database;If including, Password corresponding with target query information is obtained from offline database, the password got is determined as target password, and stop Only search.If not including, acquisition failed message is returned.
It wherein, can be according to preset order, one by one when whether including target query information in judging multiple information to be checked Judge in multiple information to be checked whether to include target query information.The preset order can be using terminal positional information as base Standard, the region indicated by information to be checked is away from terminal positional information by closely to remote sequence.
The second situation:The access-in point information and corresponding password stored in offline database is to be added by server Close obtained ciphertext, that is to say, off-line data library storage is access-in point information ciphertext and corresponding Crypted password, then terminal The process for obtaining target password is as shown in Figure 4 B, includes the following steps:
Step 1:According to terminal positional information, multiple regions information is obtained, each area information is located at terminal positional information Preset range in.
Step 2:According to pre-arranged code mode, multiple regions information is encoded, according to the second Encryption Algorithm to target The SSID of access point is encrypted, and obtains multiple information to be checked, and each information to be checked is used to indicate SSID and multiple regions An area information in information.
Specifically, according to pre-arranged code mode, multiple regions information is encoded, it is position encoded to obtain multiple regions, The SSID of target access is encrypted according to the second Encryption Algorithm, obtains SSID ciphertexts.By SSID ciphertexts and each region It is position encoded to be combined, obtain multiple information to be checked.For example, SSID ciphertexts are 1101, three regional location coding difference It is 1010,1001,1011, then it is 11011010,11011001,11011011 that three information to be checked, which can be obtained,.
Step 3:Judge in multiple information to be checked whether to include target query information, target query information be stored in from Information to be checked in line database.
Specifically, according to preset order, judge in multiple information to be checked whether to include target query information one by one.It should Preset order can be on the basis of terminal positional information, and the region indicated by information to be checked is away from terminal positional information by closely extremely Remote sequence.
It should be noted that the physical location due to target access may be located at the same area with terminal positional information, May also target access physical location near terminal location but be located at different regions.Therefore, it is necessary to count offline The access-in point information indicated by all areas near terminal positional information is scanned for according in library, it is accurate just to guarantee Ground gets the target password of target access.It that is to say, terminal needs the access-in point information according to target access, determination more A information to be checked, and each information to be checked being searched in offline database, it is close to guarantee to get target Code.
Step 4:If including obtaining Crypted password corresponding with target query information from offline database, and stop It searches.
Step 5:The Crypted password got is decrypted, target password is obtained.
Wherein, terminal need to be decrypted Crypted password using decipherment algorithm corresponding with server for encrypting algorithm, with To target password.
Step 6:If not including, acquisition failed message is returned.
It should be noted that the preset range in the first above-mentioned situation and the second situation, can be carried out pre- by server First it is arranged or changes, for example the preset range can be the range etc. that radius is 50 meters, the embodiment of the present invention does not limit this specifically It is fixed.
It should be noted that in above-mentioned the second situation, the size of each area information can be by terminal according to self-ability Or the requirement according to server to searching accuracy is pre-set or is changed, the embodiment of the present invention does not limit this specifically It is fixed.Assuming that it is as shown in Figure 4 C to the coding result of multiple regions information according to pre-arranged code mode, in figure 4 c, each rectangle region Area information inner region indicated by domain is position encoded identical.Wherein, the region of coordinate (0,0) instruction is terminal positional information institute Region, then judge in multiple information to be checked whether to include that the preset order of target query information can be as in Fig. 4 C one by one Arrow shown in.It is from left to right, and by being searched clockwise from the near to the distant to illustrate only in Fig. 4 C with start sequence Situation.In addition, start sequence can also be from right to left, from top to bottom, from bottom to up etc., it correspondingly can also be according to counterclockwise by close And far searched, the embodiment of the present invention is not especially limited this.
It should be noted that being in the prior art 50 meters to the coding range least radius in region, that is to say, radius 50 Coding all same in rice region, the embodiment of the present invention can encode more small-scale region, enabling more fine granularity Acquisition information to be checked, and each information to be checked is searched in offline database, improves acquisition target password Accuracy.For example, if the coding mode with the prior art is encoded, centered on by terminal location, 50 meters are half In the region of diameter, be only capable of getting one it is position encoded, be correspondingly only capable of obtaining an information to be checked.If offline database In be not present the Query Information, then can not get target password.It, can will be with terminal and with coding mode provided by the invention Centered on position, 50 meters of region divisions for radius at 25 zonules, obtain 25 it is position encoded, and then obtain 25 it is to be checked Information is ask, as long as at this point, target password can be got there are one of those information to be checked in offline database.
In another embodiment, if target password has not been obtained in terminal, that is to say, be not stored in offline database with The password of the target access information matches, then in order to improve the flexibility of update offline database, terminal can also independently update Offline database, detailed process can be:The terminal-pair target access information is recorded, and network connection shape is in terminal When state, password corresponding with the target access information is obtained from server;Terminal is according to the target access information and right The password answered, is updated offline database.Specific renewal process with the renewal process in step 305 similarly, herein not It repeats again.
406, terminal is according to target password, linking objective access point.
Similarly with step 306, details are not described herein for the step 406.
Method provided in an embodiment of the present invention, by the way that access-in point information and corresponding password storage will be obtained from server For offline database so that when terminal is in arbitrary network connection status, can be got using offline database and need to connect Access point password, and then connect the access point, access point could be connected in network connection state by having broken only terminal Limitation.Further, by the way that access-in point information and corresponding password are encrypted, the safety of data is improved, together When due to encryption reduce memory space, improve the utilization rate of terminal storage space.And since geographical location can also be used as It, therefore, can be close as access point by SSID and geographical location when building database for determining the information of access point The index of code, the method to provide another access point connection.
Further, it is somebody's turn to do the database based on SSID and geographical location, is also used as above-mentioned based on SSID and BSSID Database supplementary data library, that is to say, in the case that terminal can not know the BSSID of access point, SSID can be passed through And geographical location, to search the access point near terminal location, and then obtain the password of access point to realize the connection of access point, The case where can not obtaining access point password is further avoided, the diversity of access point connection type is improved.
Fig. 5 is a kind of block diagram of access point attachment device shown according to an exemplary embodiment.With reference to Fig. 5, the device Including determining module 501, acquisition module 502 and link block 503.
Wherein it is determined that module 501 is connect with acquisition module 502, for working as the attended operation detected to target access When, determine target access information, target access information is for identifying target access;Acquisition module 502 and link block 503 connections, for according to target access information, target password to be obtained from locally stored offline database, offline number It is and the matched password of access-in point information for storing access-in point information and corresponding password, target password according to library;Connect mould Block 503, for according to target password, linking objective access point.
Optionally, target access information includes the SSID and BSSID of target access.
Optionally, the access-in point information and corresponding password stored in offline database is to be encrypted by server Obtained ciphertext,
Correspondingly, acquisition module obtains target access information ciphertext for target access information to be encrypted;Sentence Whether include target access information ciphertext in disconnected offline database;If including acquisition and target from offline database The corresponding Crypted password of access-in point information ciphertext, the Crypted password got is decrypted, target password is obtained.
Optionally, acquisition module is used to, according to the first Encryption Algorithm, calculate the cryptographic Hash of SSID and the Hash of BSSID Value;The cryptographic Hash of the cryptographic Hash of SSID and BSSID is combined, access point ciphertext is obtained.
Optionally, target access information includes the SSID and terminal positional information of target access.
Optionally, acquisition module is used to, according to terminal positional information, obtain multiple regions information, and each area information is located at In the preset range of terminal positional information;According to multiple regions information and SSID, multiple information to be checked are determined, it is each to be checked Information is used to indicate an area information in SSID and multiple regions information;Judge in multiple information to be checked whether to include mesh Query Information is marked, target query information is the information to be checked being stored in offline database;If including from offline database It is middle to obtain password corresponding with target query information, the password got is determined as target password.
Optionally, the access-in point information and corresponding password stored in offline database is to be encrypted by server Obtained ciphertext,
Acquisition module is used to, according to pre-arranged code mode, encode multiple regions information, according to the second Encryption Algorithm SSID is encrypted, multiple information to be checked are obtained;Password corresponding with target query information is obtained from offline database, The password got, which is determined as target password, includes:It is close that encryption corresponding with target query information is obtained from offline database Code, the Crypted password got is decrypted, target password is obtained.
Optionally, which further includes:
Sending module downloads request for being sent to server, downloads request carried terminal location information;
Receiving module, the data for receiving server return, stores data as offline database, and data are and terminal Location information is located at the access-in point information of same geographic area and corresponding password.
Optionally, the first Encryption Algorithm is irreversible Encryption Algorithm.
Optionally, pre-arranged code mode is irreversible coding mode, and the second Encryption Algorithm is irreversible Encryption Algorithm.
The device that the embodiment of the present disclosure provides, by the way that access-in point information and corresponding password storage will be obtained from server For offline database so that when terminal is in arbitrary network connection status, can be got using offline database and need to connect Access point password, and then connect the access point, access point could be connected in network connection state by having broken only terminal Limitation.
Fig. 6 is a kind of block diagram of access point attachment device shown according to an exemplary embodiment.With reference to Fig. 6, the device Including receiving module 601, the first acquisition module 602 and sending module 603.
Wherein, receiving module 601 is connect with the first acquisition module 602, and the download for receiving terminal is asked, and request is downloaded Middle carried terminal location information;First acquisition module 602 is connect with sending module 603, for obtaining data to be sent, data Include being located at the access-in point information of same geographic area and corresponding password with terminal positional information;Sending module 603, is used for Terminal is sent data to, by terminal according to data connection access point.
Optionally, which further includes:
Second acquisition module, be more than the first predetermined threshold value for obtaining the requested number in the same geographic area the One access-in point information and corresponding password, according to geographic area to the first access-in point information got and corresponding password It is grouped storage;And/or it obtains and is located at data network signals intensity in same geographic area and is less than the of the second predetermined threshold value Two access-in point informations and corresponding password, according to geographic area to the second access-in point information got and corresponding password It is grouped storage.
Optionally, data are the ciphertext that access-in point information and corresponding password are encrypted.
Optionally, which further includes:
Encrypting module, for when access-in point information includes SSID and BSSID of access point, according to the first Encryption Algorithm, Access-in point information is encrypted, access-in point information ciphertext is obtained;It is pair corresponding with access-in point information according to third Encryption Algorithm Password is encrypted, and obtains Crypted password corresponding with access-in point information ciphertext;Or, when access-in point information includes access point SSID and when terminal positional information, according to the second Encryption Algorithm, is encrypted SSID, obtains SSID ciphertexts;According to default volume Code mode, encodes terminal positional information, obtains position encoded;SSID ciphertexts are combined with position encoded, are obtained Access-in point information ciphertext;According to third Encryption Algorithm, the corresponding password of access-in point information is encrypted, obtains believing with access point Cease the corresponding Crypted password of ciphertext.
Optionally, encrypting module is for calculating the cryptographic Hash of SSID and the cryptographic Hash of BSSID;By the cryptographic Hash of SSID with The cryptographic Hash of BSSID is combined, and obtains access-in point information ciphertext.
The device that the embodiment of the present disclosure provides, by the way that the access-in point information screened and corresponding password to be sent to Terminal is offline database by terminal storage so that when terminal is in arbitrary network connection status, can utilize offline database The password for the access point for needing to connect is got, and then connects the access point, has broken only terminal in network connection state The limitation of access point could be connected.
It should be noted that:The access point attachment device that above-described embodiment provides is when connecting access point, only with above-mentioned each The division progress of function module, can be as needed and by above-mentioned function distribution by different work(for example, in practical application Energy module is completed, i.e., the internal structure of equipment is divided into different function modules, to complete whole described above or portion Divide function.In addition, the access point attachment device that above-described embodiment provides belongs to same design with access point connection method embodiment, Its specific implementation process refers to embodiment of the method, and which is not described herein again.
Fig. 7 is a kind of structural schematic diagram of terminal provided in this embodiment, which can be used for executing above-mentioned each reality Apply the access point methods that terminal executes in example.Referring to Fig. 7, which includes:
Terminal 700 may include RF (Radio Frequency, radio frequency) circuit 110, include one or more meters The memory 120 of calculation machine readable storage medium storing program for executing, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (Wireless Fidelity, Wireless Fidelity) module 170, include there are one or more than one processing core processing The components such as device 180 and power supply 190.It will be understood by those skilled in the art that terminal structure shown in Fig. 7 is not constituted pair The restriction of terminal may include either combining certain components or different component cloth than illustrating more or fewer components It sets.Wherein:
RF circuits 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 180 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuits 110 include but not limited to antenna, at least one amplifier, tuner, one or more oscillators, use Family identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplex Device etc..In addition, RF circuits 110 can also be communicated with network and other equipment by radio communication.The wireless communication can make With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in memory 120 by operation Software program and module, to perform various functions application and data processing.Memory 120 can include mainly storage journey Sequence area and storage data field, wherein storing program area can storage program area, the application program (ratio needed at least one function Such as sound-playing function, image player function) etc.;Storage data field can be stored uses created number according to terminal 700 According to (such as audio data, phone directory etc.) etc..In addition, memory 120 may include high-speed random access memory, can also wrap Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts. Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory 120 access.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating lever, optics or the input of trace ball signal.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used Family on it or neighbouring touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and the signal that touch operation is brought is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), It is one or more in trace ball, mouse, operating lever etc..
Display unit 140 can be used for showing information input by user or the information and terminal 700 that are supplied to user Various graphical user interface, these graphical user interface can be made of figure, text, icon, video and its arbitrary combination. Display unit 140 may include display panel 141, optionally, LCD (Liquid Crystal Display, liquid crystal may be used Show device), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects on it or neighbouring touches After touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing type of the device 180 according to touch event Corresponding visual output is provided on display panel 141.Although in the figure 7, touch sensitive surface 131 and display panel 141 are conducts Two independent components realize input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and display Panel 141 is integrated and realizes and outputs and inputs function.
Terminal 700 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 141, and proximity sensor can close display when terminal 700 is moved in one's ear Panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally Three axis) acceleration size, size and the direction of gravity are can detect that when static, can be used to identify mobile phone posture application (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely In other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensors that terminal 700 can also configure, herein It repeats no more.
Voicefrequency circuit 160, loud speaker 161, microphone 162 can provide the audio interface between user and terminal 700.Audio The transformed electric signal of the audio data received can be transferred to loud speaker 161 by circuit 160, and sound is converted to by loud speaker 161 Sound signal exports;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160 Audio data is converted to, then by after the processing of audio data output processor 180, through RF circuits 110 to be sent to such as another end End, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that earphone jack, To provide the communication of peripheral hardware earphone and terminal 700.
WiFi belongs to short range wireless transmission technology, and terminal 700 can help user's transceiver electronics by WiFi module 170 Mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 7 is shown WiFi module 170, but it is understood that, and it is not belonging to must be configured into for terminal 700, completely it can exist as needed Do not change in the range of the essence of invention and omits.
Processor 180 is the control centre of terminal 700, utilizes each portion of various interfaces and connection whole mobile phone Point, by running or execute the software program and/or module that are stored in memory 120, and calls and be stored in memory 120 Interior data execute the various functions and processing data of terminal 700, to carry out integral monitoring to mobile phone.Optionally, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor, Wherein, the main processing operation system of application processor, user interface and application program etc., modem processor mainly handles nothing Line communicates.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 700 further includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can pass through electricity Management system and processor 180 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 190 can also include one or more direct current or AC power, recharging system, power supply event Hinder the random components such as detection circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal 700 can also include camera, bluetooth module etc., and details are not described herein.Specifically in this reality It applies in example, the display unit of terminal is touch-screen display, and terminal further includes having memory and one or more than one Program, either more than one program is stored in memory and is configured to by one or more than one processing for one of them Device executes.The one or more programs include executable instruction, and terminal 700 is configured as executing instruction, to execute Method in above-mentioned access point connection method embodiment performed by terminal.
Fig. 8 is a kind of block diagram of access point attachment device shown according to an exemplary embodiment.For example, device 800 can To be provided as a server.With reference to Fig. 8, device 800 includes processing component 822, further comprises one or more processing Device, and by the memory resource representated by memory 832, for store can by the instruction of the execution of processing component 822, such as Application program.The application program stored in memory 832 may include it is one or more each refer to corresponding to one group The module of order.In addition, processing component 822 is configured as executing instruction, taken with executing in above-mentioned access point connection method embodiment The method being engaged in performed by device.
Device 800 can also include the power management that a power supply module 826 is configured as executive device 800, and one has Line or radio network interface 850 are configured as device 800 being connected to network and input and output (I/O) interface 858.Dress Setting 800 can operate based on the operating system for being stored in memory 832, such as Windows ServerTM, Mac OS XTM, UnixTM,LinuxTM, FreeBSDTMOr it is similar.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (22)

1. a kind of access point connection method, which is characterized in that the method includes:
When detecting the attended operation to target access, determine that target access information, the target access information are used In identifying the target access, the target access information includes service set SSID and the end of the target access End position information;
According to the target access information, target password, the offline number are obtained from locally stored offline database It is used to store access-in point information and corresponding password according to library, the target password is close with described access point information matches Code;
According to the target password, the target access is connected;
It is described according to the target access information, from locally stored offline database obtaining target password includes:
According to the terminal positional information, multiple regions information is obtained, each area information is located at the terminal positional information In preset range;
According to the multiple area information and the SSID, multiple information to be checked are determined, each information to be checked is used to indicate An area information in the SSID and the multiple area information;
Judge in the multiple information to be checked whether to include target query information, the target query information is described to be stored in Information to be checked in offline database;
If including, password corresponding with the target query information is obtained from the offline database, it is close by what is got Code is determined as the target password.
2. according to the method described in claim 1, it is characterized in that, the access-in point information stored in the offline database with And corresponding password is the ciphertext being encrypted by server,
Correspondingly, according to the target access information, acquisition target password includes from locally stored offline database:
The target access information is encrypted, target access information ciphertext is obtained;
Judge in the offline database whether to include the target access information ciphertext;
If including obtain corresponding with target access information ciphertext Crypted password from the offline database, The Crypted password got is decrypted, the target password is obtained.
3. according to the method described in claim 2, it is characterized in that, the target access information further includes basic service set mark Know BSSID, the target access information is encrypted, obtaining target access information ciphertext includes:
According to the first Encryption Algorithm, the cryptographic Hash of the SSID and the cryptographic Hash of the BSSID are calculated;
The cryptographic Hash of the SSID and the cryptographic Hash of the BSSID are combined, the target access ciphertext is obtained.
4. according to the method described in claim 1, it is characterized in that, the access-in point information stored in the offline database with And corresponding password is the ciphertext being encrypted by server,
According to the multiple area information and the SSID, determine that multiple information to be checked include:
According to pre-arranged code mode, the multiple area information is encoded, according to the second Encryption Algorithm to the SSID into Row encryption, obtains the multiple information to be checked;
Password corresponding with the target query information is obtained from the offline database, and the password got is determined as institute Stating target password includes:
Crypted password corresponding with the target query information, the Crypted password that will be got are obtained from the offline database It is decrypted, obtains the target password.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
It is sent to server and downloads request, carried terminal location information is asked in the download;
Receive the data that the server returns, the data be stored as the offline database, the data be with it is described Terminal positional information is located at the access-in point information of same geographic area and corresponding password.
6. according to the method described in claim 3, it is characterized in that, first Encryption Algorithm is irreversible Encryption Algorithm.
7. according to the method described in claim 4, it is characterized in that, the pre-arranged code mode be irreversible coding mode, Second Encryption Algorithm is irreversible Encryption Algorithm.
8. a kind of access point connection method, which is characterized in that the method includes:
Receive the download request of terminal, carried terminal location information in the download request;
Data to be sent are obtained, the data include being located at the access point letter of same geographic area with the terminal positional information Breath and corresponding password;
The data are sent to the terminal, by the terminal according to the data connection access point;
The method further includes:
Obtain the first access-in point information and correspondence for being located at and being requested that number is more than the first predetermined threshold value in same geographic area Password, storage is grouped to the first access-in point information got and corresponding password according to geographic area;And/or
Obtain be located at same geographic area in data network signals intensity be less than the second predetermined threshold value the second access-in point information with And corresponding password, storage is grouped to the second access-in point information got and corresponding password according to geographic area.
9. according to the method described in claim 8, it is characterized in that, the data are to described access point information and corresponding The ciphertext that password is encrypted.
10. according to the method described in claim 9, it is characterized in that, the method further includes:
When described access point information includes the service set SSID and Basic Service Set Identification BSSID of access point, according to Described access point information is encrypted in one Encryption Algorithm, obtains access-in point information ciphertext;According to third Encryption Algorithm, pair with The corresponding password of described access point information is encrypted, and obtains Crypted password corresponding with described access point information ciphertext;Or,
When described access point information includes the SSID and terminal positional information of access point, according to the second Encryption Algorithm, to described SSID is encrypted, and obtains SSID ciphertexts;According to pre-arranged code mode, the terminal positional information is encoded, is obtained in place Set coding;By the SSID ciphertexts with it is described it is position encoded be combined, obtain access-in point information ciphertext;It is encrypted and is calculated according to third The corresponding password of described access point information is encrypted in method, obtains Crypted password corresponding with described access point information ciphertext.
11. according to the method described in claim 10, it is characterized in that, when described access point information includes the services set of access point When identifying SSID and Basic Service Set Identification BSSID, according to the first Encryption Algorithm, described access point information is encrypted, is obtained Include to access-in point information ciphertext:
Calculate the cryptographic Hash of the SSID and the cryptographic Hash of the BSSID;
The cryptographic Hash of the SSID and the cryptographic Hash of the BSSID are combined, described access point information ciphertext is obtained.
12. a kind of access point attachment device, which is characterized in that described device includes:
Determining module, for when detecting the attended operation to target access, determining target access information, the target For access-in point information for identifying the target access, the target access information includes the services set of the target access Identify SSID and terminal positional information;
Acquisition module, for according to the target access information, it is close that target to be obtained from locally stored offline database Code, for storing access-in point information and corresponding password, the target password is and described access point the offline database The password of information matches;
Link block, for according to the target password, connecting the target access;
The acquisition module is used to, according to the terminal positional information, obtain multiple regions information, and each area information is located at institute It states in the preset range of terminal positional information;According to the multiple area information and the SSID, multiple information to be checked are determined, Each information to be checked is used to indicate an area information in the SSID and the multiple area information;Judge the multiple Whether include target query information in information to be checked, the target query information is to be stored in the offline database to wait for Query Information;If including obtaining password corresponding with the target query information from the offline database, getting Password be determined as the target password.
13. device according to claim 12, which is characterized in that the access-in point information stored in the offline database And corresponding password is the ciphertext being encrypted by server,
Correspondingly, acquisition module obtains target access information ciphertext for the target access information to be encrypted;Sentence Whether include the target access information ciphertext in the disconnected offline database;If including from the offline database It is middle to obtain Crypted password corresponding with the target access information ciphertext, the Crypted password got is decrypted, is obtained The target password.
14. device according to claim 13, which is characterized in that the target access information further includes basic service set BSSID is identified, the acquisition module is used to, according to the first Encryption Algorithm, calculate the cryptographic Hash of the SSID and the BSSID Cryptographic Hash;The cryptographic Hash of the SSID and the cryptographic Hash of the BSSID are combined, described access point ciphertext is obtained.
15. device according to claim 13, which is characterized in that the access-in point information stored in the offline database And corresponding password is the ciphertext being encrypted by server,
The acquisition module is used to, according to pre-arranged code mode, encode the multiple area information, according to the second encryption The SSID is encrypted in algorithm, obtains the multiple information to be checked;It is obtained and the mesh from the offline database The corresponding password of Query Information is marked, the password got, which is determined as the target password, includes:From the offline database Crypted password corresponding with the target query information is obtained, the Crypted password got is decrypted, the target is obtained Password.
16. device according to claim 12, which is characterized in that described device further includes:
Sending module downloads request for being sent to server, and carried terminal location information is asked in the download;
The data are stored as the offline database by receiving module, the data returned for receiving the server, described Data are to be located at the access-in point information of same geographic area and corresponding password with the terminal positional information.
17. device according to claim 14, which is characterized in that first Encryption Algorithm is calculated for irreversible encryption Method.
18. device according to claim 15, which is characterized in that the pre-arranged code mode is irreversible coding staff Formula, second Encryption Algorithm are irreversible Encryption Algorithm.
19. a kind of access point attachment device, which is characterized in that described device includes:
Receiving module, the download for receiving terminal are asked, carried terminal location information in the download request;
First acquisition module, for obtaining data to be sent, the data include with the terminal positional information positioned at same The access-in point information of geographic area and corresponding password;
Sending module, for the data to be sent to the terminal, by the terminal according to the data connection access point;
Described device further includes:
Second acquisition module is located in same geographic area that be requested number be more than the first of the first predetermined threshold value to connect for obtaining Access point information and corresponding password carry out the first access-in point information got and corresponding password according to geographic area Grouping storage;And/or acquisition is located at second of data network signals intensity less than the second predetermined threshold value in same geographic area and connects Access point information and corresponding password carry out the second access-in point information got and corresponding password according to geographic area Grouping storage.
20. device according to claim 19, which is characterized in that the data are to described access point information and correspondence The ciphertext that is encrypted of password.
21. device according to claim 19, which is characterized in that described device further includes:
Encrypting module, for including the service set SSID and Basic Service Set Identification of access point when described access point information When BSSID, according to the first Encryption Algorithm, described access point information is encrypted, obtains access-in point information ciphertext;According to third Encryption Algorithm, a pair password corresponding with described access point information are encrypted, obtain corresponding with described access point information ciphertext Crypted password;Or, when described access point information includes the SSID and terminal positional information of access point, calculated according to the second encryption The SSID is encrypted in method, obtains SSID ciphertexts;According to pre-arranged code mode, the terminal positional information is compiled Code, obtains position encoded;By the SSID ciphertexts with it is described it is position encoded be combined, obtain access-in point information ciphertext;According to The corresponding password of described access point information is encrypted in third Encryption Algorithm, obtains corresponding with described access point information ciphertext Crypted password.
22. device according to claim 21, which is characterized in that the encrypting module is used to calculate the Hash of the SSID The cryptographic Hash of value and the BSSID;The cryptographic Hash of the SSID and the cryptographic Hash of the BSSID are combined, institute is obtained State access-in point information ciphertext.
CN201610464451.XA 2016-06-23 2016-06-23 access point connection method and device Active CN106714274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610464451.XA CN106714274B (en) 2016-06-23 2016-06-23 access point connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610464451.XA CN106714274B (en) 2016-06-23 2016-06-23 access point connection method and device

Publications (2)

Publication Number Publication Date
CN106714274A CN106714274A (en) 2017-05-24
CN106714274B true CN106714274B (en) 2018-09-25

Family

ID=58940619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610464451.XA Active CN106714274B (en) 2016-06-23 2016-06-23 access point connection method and device

Country Status (1)

Country Link
CN (1) CN106714274B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107708185B (en) * 2017-10-09 2020-04-24 上海连尚网络科技有限公司 Information generation method and equipment
CN110602737B (en) * 2018-06-12 2023-03-14 百度在线网络技术(北京)有限公司 Regional removal identification method and device, computer equipment and storage medium
CN109033762A (en) * 2018-07-05 2018-12-18 南京云信达科技有限公司 A method of for solving complicated checked object soft ware authorization
CN109347666B (en) * 2018-10-11 2021-09-14 安徽独角仙信息科技有限公司 Automatic network access configuration method and system for wifi Internet of things equipment
CN110366229A (en) * 2019-08-01 2019-10-22 深圳市昊一源科技有限公司 A kind of wireless network connecting method, device, equipment and system
CN111010397B (en) * 2019-12-18 2022-07-19 吉林亿联银行股份有限公司 Database password modification method and device
CN114299636B (en) * 2020-09-22 2023-05-12 云丁网络技术(北京)有限公司 Method and apparatus for processing device offline passwords

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458408A (en) * 2013-08-19 2013-12-18 小米科技有限责任公司 Network connection method and network sharing method and device
CN103458409A (en) * 2013-08-19 2013-12-18 小米科技有限责任公司 Network connection method and network sharing method and device
CN103874018A (en) * 2014-02-21 2014-06-18 小米科技有限责任公司 Access point information sharing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458408A (en) * 2013-08-19 2013-12-18 小米科技有限责任公司 Network connection method and network sharing method and device
CN103458409A (en) * 2013-08-19 2013-12-18 小米科技有限责任公司 Network connection method and network sharing method and device
CN103874018A (en) * 2014-02-21 2014-06-18 小米科技有限责任公司 Access point information sharing method and device

Also Published As

Publication number Publication date
CN106714274A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106714274B (en) access point connection method and device
CN103874018B (en) Access-in point information sharing method and device
CN105490919B (en) Message cancelling method and device
CN103475996B (en) Method for connecting network, network share method and device
CN105119806B (en) message updating method and device
CN103294515B (en) A kind of methods, devices and systems for obtaining application program
CN104618217B (en) Share method, terminal, server and the system of resource
CN103389863B (en) A kind of display control method and device
CN106161176A (en) Cluster conversation message treatment method and device
CN104618873B (en) Access-in point information sharing method and device
CN103458409A (en) Network connection method and network sharing method and device
CN105005457A (en) Geographical location display method and apparatus
CN106612250A (en) Resource utilization authority judgment system and method
CN108667884A (en) Mirror image distribution method, mirror image acquisition methods and device
CN103501482A (en) Network access method, network access device and terminal
CN106357808A (en) Data synchronization method and device
CN106131930A (en) A kind of WiFi network connection control method, device and terminal
CN106203228A (en) Two-dimensional code information transmission method, device and equipment
CN106302938A (en) Communication event treating method and apparatus
CN105992026A (en) Method and device for displaying barrage comment information
CN105141458A (en) Remaining duration showing method and device
CN108834132A (en) A kind of data transmission method and equipment and related media production
CN106454976B (en) A kind of switching method of wireless network, device and terminal
CN106713608A (en) Application function state modifying method and apparatus, and terminal
CN105739839B (en) The selection method and device of multimedia menu item

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant