A kind of method and device for preventing from accessing invalid Wi-Fi Hotspot
Technical field
The invention belongs to Wi-Fi technology field, more particularly to a kind of method and dress for preventing from accessing invalid Wi-Fi Hotspot
Put.
Background technology
For open " be automatically added to the mobile terminal of Wi-Fi " functions, after the Wi-Fi Hotspot for exempting from password is searched,
The Wi-Fi Hotspot will be automatically accessed.But in fact, many Wi-Fi Hotspots for exempting from password are all invalid, by accessing these nothings
The Wi-Fi Hotspot of effect, it can not actually access wireless network.
In order to prevent mobile terminal from accessing above-mentioned invalid Wi-Fi Hotspot, existing mobile terminal needs to close " to be added automatically
Enter Wi-Fi " functions, it is still, above-mentioned anti-in access Wi-Fi Hotspot every time, to ask the user whether to access the Wi-Fi Hotspot
The operating efficiency for only accessing the mode of invalid Wi-Fi Hotspot is low.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method for preventing from accessing invalid Wi-Fi Hotspot, existing to improve
The operating efficiency for preventing from accessing the mode of invalid Wi-Fi Hotspot.
The embodiment of the present invention is achieved in that a kind of method for preventing from accessing invalid Wi-Fi Hotspot, including:
Adopting wireless fidelity technology Wi-Fi Hotspot is scanned, Wi-Fi Hotspot list is generated according to the Wi-Fi Hotspot scanned,
The Wi-Fi Hotspot being sequentially ingressed into the Wi-Fi Hotspot list;
After some current described Wi-Fi Hotspot is successfully accessed, preset instructions are sent to server;
If not receiving the feedback information of the server in preset time, the connection with the Wi-Fi Hotspot is disconnected, and
The invalid weighted value of the Wi-Fi Hotspot is set to add 1, when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, to forbid accessing
The Wi-Fi Hotspot.
The another object of the embodiment of the present invention is to provide a kind of device for preventing from accessing invalid Wi-Fi Hotspot, including:
Wi-Fi Hotspot List Generating Module, for scanning adopting wireless fidelity technology Wi-Fi Hotspot, according to scanning
Wi-Fi Hotspot generates Wi-Fi Hotspot list, the Wi-Fi Hotspot being sequentially ingressed into the Wi-Fi Hotspot list;
Preset instructions sending module, for after some current described Wi-Fi Hotspot is successfully accessed, sending preset instructions extremely
Server;
Invalid Wi-Fi Hotspot setup module, if the feedback information for not receiving the server in preset time,
Disconnect with the connection of the Wi-Fi Hotspot, and the invalid weighted value of the Wi-Fi Hotspot is added 1, with invalid when the Wi-Fi Hotspot
When weighted value is more than preset value, forbid accessing the Wi-Fi Hotspot.
Existing beneficial effect is the embodiment of the present invention compared with prior art:The embodiment of the present invention passes through in access Wi-
After Fi focuses, preset instructions are sent to server, if not receiving the feedback information of server in preset time, are disconnected and are somebody's turn to do
The connection of Wi-Fi Hotspot, and the invalid weighted value of the Wi-Fi Hotspot is added 1, it is big with the invalid weighted value when the Wi-Fi Hotspot
When preset value, forbid accessing the Wi-Fi Hotspot, thus achieving prevents from accessing invalid Wi-Fi Hotspot, and substantially increases anti-
Only access the operating efficiency of invalid Wi-Fi Hotspot.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
In the required accompanying drawing used be briefly described, it should be apparent that, drawings in the following description be only the present invention some
Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these
Accompanying drawing obtains other accompanying drawings.
Fig. 1 is the implementation process figure provided in an embodiment of the present invention for preventing from accessing the method for invalid Wi-Fi Hotspot;
Fig. 2 be Wi-Fi Hotspot is added in the method provided in an embodiment of the present invention for preventing from accessing invalid Wi-Fi Hotspot it is black
The schematic diagram of list;
Fig. 3 is the structured flowchart provided in an embodiment of the present invention for preventing from accessing the device of invalid Wi-Fi Hotspot.Specific implementation
Mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The embodiment of the present invention is by after Wi-Fi Hotspot is accessed, sending preset instructions to server, if in preset time
The feedback information of server is not received, then disconnects the connection with the Wi-Fi Hotspot, and make the invalid weighted value of the Wi-Fi Hotspot
Add 1, when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, to forbid accessing the Wi-Fi Hotspot, thus achieve anti-
Invalid Wi-Fi Hotspot is only accessed, and substantially increases the operating efficiency for preventing accessing invalid Wi-Fi Hotspot.
What the present embodiment provided prevents from accessing invalid Wi-Fi (Wireless Fidelity, adopting wireless fidelity technology) focus
Method can be realized by the mobile terminal with Wi-Fi functional modules.Herein, mobile terminal include mobile phone (or
For " honeycomb " phone) and with mobile terminal computer, for example, it may be in portable, pocket, hand-held, computer
Mobile device put or vehicle-mounted, they exchange language and/or data with wireless access network.For example, PCS
(Personal Communication Service, PCS) phone, wireless phone, Session initiation Protocol (Session
Initiation Protocol, SIP) phone, WLL (Wireless Local Loop, WLL) stand, individual digital
The equipment such as assistant (Personal Digital Assistant, PDA), are not limited thereto.
Fig. 1 shows the implementation process figure provided in an embodiment of the present invention for preventing from accessing the method for invalid Wi-Fi Hotspot, in detail
State as follows:
In S101, adopting wireless fidelity technology Wi-Fi Hotspot is scanned, Wi-Fi is generated according to the Wi-Fi Hotspot scanned
Hotspot list, the Wi-Fi Hotspot being sequentially ingressed into the Wi-Fi Hotspot list.
In embodiments of the present invention, mobile terminal, which opens, " is automatically added to Wi-Fi " functions, i.e. mobile terminal is detecting
After accessible Wi-Fi Hotspot, the Wi-Fi Hotspot is automatically accessed.Herein, accessible Wi-Fi Hotspot includes exempting from password Wi-
Fi focuses, and mobile terminal have preserved the Wi-Fi Hotspot of its password.
When mobile terminal not yet accesses Wi-Fi Hotspot, the Wi-Fi heat of signal can be received around mobile scanning terminal
Point.Alternatively, the Wi-Fi Hotspot scanned has preserved the Wi-Fi Hotspot of its password including mobile terminal, has exempted from password Wi-Fi heat
Point and the Wi-Fi Hotspot for needing password.Alternatively, the Wi-Fi Hotspot scanned only includes mobile terminal and has preserved its password
Wi-Fi Hotspot and exempt from password Wi-Fi Hotspot.Mobile terminal generates Wi-Fi Hotspot list according to the Wi-Fi Hotspot scanned,
Here, Wi-Fi Hotspot list can be according to the power of the signal of Wi-Fi Hotspot, by by force to weak arrangement;Wi-Fi Hotspot list
The number of the Wi-Fi Hotspot can be once accessed according to mobile terminal, was arranged from more to less.
After Wi-Fi Hotspot list is generated, order of the mobile terminal in Wi-Fi Hotspot list, access is attempted one by one
Wi-Fi Hotspot in Wi-Fi Hotspot list, until mobile terminal accesses an effective Wi-Fi Hotspot.
As the present invention another example, before adopting wireless fidelity technology Wi-Fi Hotspot is scanned, in addition to:
Receive the information of scanning adopting wireless fidelity technology Wi-Fi Hotspot;
Wherein, the information for receiving scanning adopting wireless fidelity technology Wi-Fi Hotspot includes receiving the scanning nothing that user sends
The instruction of line Fidelity technology Wi-Fi Hotspot, or receive and adopting wireless fidelity technology Wi- is scanned according to caused by default time interval
The triggering information of Fi focuses.
Further, the instruction for receiving the scanning adopting wireless fidelity technology Wi-Fi Hotspot that user sends, which includes receiving, uses
Swept by what the combination of a button in pre-set button on the mobile terminal or existing button or multiple buttons was sent at family
Retouch the information of adopting wireless fidelity technology Wi-Fi Hotspot;Or receive the scanning nothing that user is sent by the mobile terminal touch screen
The touch slip instruction (such as sliding two circles counterclockwise) of line Fidelity technology Wi-Fi Hotspot.
In S102, after some current described Wi-Fi Hotspot is successfully accessed, preset instructions are sent to server.
After mobile terminal accesses some Wi-Fi Hotspot, mobile terminal sends preset instructions to server, to judge to move
Whether terminal accesses effective Wi-Fi Hotspot.If the Wi-Fi Hotspot is effective, mobile terminal can be connected by the Wi-Fi Hotspot
Wireless network is connect, preset instructions usually can reach server by wireless network;It is mobile whole if the Wi-Fi Hotspot is invalid
Terminate after the Wi-Fi Hotspot and wireless network can not be connected, preset instructions also can not just pass through wireless network transmissions to servicing
Device.
Preset instructions carry request server checking connection whether successful information.If server receives the preset instructions,
Feedback information is then replied to mobile terminal, the information of successful connection is carried in feedback information.Wherein, server can be mobile whole
The maintenance server of the production firm at end.
In S103, if not receiving the feedback information of the server in preset time, disconnect and the Wi-Fi Hotspot
Connection, and the invalid weighted value of the Wi-Fi Hotspot is added 1, to be more than preset value when the invalid weighted value of the Wi-Fi Hotspot
When, forbid accessing the Wi-Fi Hotspot.
If mobile terminal does not receive the feedback information of server in preset time, largely show, it is mobile
The Wi-Fi Hotspot that terminal is currently accessed is invalid Wi-Fi Hotspot.The present embodiment is that each Wi-Fi Hotspot sets invalid weight
Value parameter, the initial value of invalid weighted value can be 0.Attempting to access some Wi-Fi Hotspot, and verifying that the Wi-Fi Hotspot is
After invalid Wi-Fi Hotspot, the connection with the Wi-Fi Hotspot is disconnected immediately, and the invalid weighted value of the Wi-Fi Hotspot is added 1.
When the invalid weighted value of some Wi-Fi Hotspot is more than preset value, then it is long-term nothing largely to show the Wi-Fi Hotspot
The Wi-Fi Hotspot of effect, mobile terminal are forbidden accessing the Wi-Fi Hotspot again.For example, preset value can be 3, when mobile terminal exceedes
Access some Wi-Fi Hotspot and can not all access wireless network for 3 times, then mobile terminal is forbidden accessing the Wi-Fi Hotspot again.Preset value
Setting, the mobile terminal of accuracy judgement of to(for) the validity of Wi-Fi Hotspot can be ensured.
As one embodiment of the present of invention, if the Wi-Fi Hotspot list that Current Scan arrives include wifi1, wifi2 and
Tri- Wi-Fi Hotspots of wifi3, mobile terminal are attempted after accessing these three Wi-Fi Hotspots one by one, can not all access wireless network,
The invalid weighted value of these three Wi-Fi Hotspots is respectively then added 1.After separated in time, mobile terminal, which reattempts, accesses these three
Invalid weighted value is not more than the Wi-Fi Hotspot of preset value in Wi-Fi Hotspot.
If mobile terminal Current Scan to Wi-Fi Hotspot list in Wi-Fi Hotspot not can access invalid network,
User is notified currently without effective Wi-Fi Hotspot, so that user specifies the Wi-Fi Hotspot for wanting connection manually.
Further, described in S103 when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, forbid access should
Wi-Fi Hotspot includes:
When the invalid weighted value of the Wi-Fi Hotspot is more than preset value, the Wi-Fi Hotspot is added into blacklist;
Forbid the access of Wi-Fi Hotspot in the blacklist.
Fig. 2, which is shown in the method provided in an embodiment of the present invention for preventing from accessing invalid Wi-Fi Hotspot, adds Wi-Fi Hotspot
Enter the schematic diagram of blacklist.Reference picture 2:
In the present embodiment, when the invalid weighted value of some Wi-Fi Hotspot is more than preset value, mobile terminal is by the Wi-
Fi focuses add blacklist.Preferably, only display is currently able to the invalid Wi-Fi Hotspot scanned in blacklist.In Fig. 2
In, wifi1, wifi2, wifi3 and wifi4 are the Wi-Fi Hotspots for not being added into blacklist for being currently able to scan, mobile whole
End attempts to access this four Wi-Fi Hotspots one by one, until mobile terminal is successfully accessed wireless network.Wifi7 in blacklist,
Wifi8 and wifi9 is that be currently able to scan the be added into Wi-Fi Hotspot of blacklist, mobile terminal are not attempted to connect black
Wi-Fi Hotspot in list.
In addition, specified Wi-Fi Hotspot can be added blacklist by mobile terminal according to the instruction of user.When mobile terminal connects
User is received by after the instruction of specified Wi-Fi Hotspot addition blacklist, specifies the invalid weighted value of Wi-Fi Hotspot to be set to refer to this
Definite value, the designated value are more than preset value.
Preferably, methods described also includes:
When receive by some Wi-Fi Hotspot is set to the instruction of effective Wi-Fi Hotspot in the blacklist after, by the Wi-
The invalid weighted value of Fi focuses resets to initial value, and the Wi-Fi Hotspot is deleted from the blacklist.
As one embodiment of the present of invention, mobile terminal can be according to the instruction of user, and display is all to be added into blacklist
Wi-Fi Hotspot, thus make user find in time mistake setting blacklist Wi-Fi Hotspot.When mobile terminal receives user
After Wi-Fi Hotspot in blacklist to be set to the instruction of effective Wi-Fi Hotspot, the invalid weighted value of the Wi-Fi Hotspot is reset
For initial value, and the Wi-Fi Hotspot is deleted from blacklist.
As an alternative embodiment of the invention, the Wi-Fi Hotspot in blacklist is set when mobile terminal receives user
After instruction for effective Wi-Fi Hotspot, the invalid weighted value of the Wi-Fi Hotspot is not only reset to initial value by mobile terminal, also
Effective weighted value of the Wi-Fi Hotspot is superimposed a larger value, to clearly indicate that the validity of the Wi-Fi Hotspot.
Alternatively, methods described also includes:
If receiving the feedback information of the server in preset time, the connection with the Wi-Fi Hotspot is kept, and make
Effective weighted value of the Wi-Fi Hotspot adds 1.
As one embodiment of the present of invention, when mobile terminal accesses some Wi-Fi Hotspot, and pass through the Wi-Fi Hotspot
After accessing wireless network, it is effective Wi-Fi Hotspot to show the Wi-Fi Hotspot.Mobile terminal keeps the company with the Wi-Fi Hotspot
Connect, and be no longer attempt to other Wi-Fi Hotspots accessed in Wi-Fi Hotspot list.When mobile terminal verifies that some Wi-Fi Hotspot has
After effect, effective weighted value of the Wi-Fi Hotspot is added 1.Effective weighted value largely shows having for Wi-Fi Hotspot
Effect property, effective weighted value is bigger, shows that mobile terminal can be bigger by the possibility of Wi-Fi Hotspot access wireless network.
Alternatively, the Wi-Fi Hotspot being sequentially ingressed into described in S101 in the Wi-Fi Hotspot list includes:
The size of effective weighted value of Wi-Fi Hotspot according to the Wi-Fi Hotspot list, it is sequentially ingressed into described
The Wi-Fi Hotspot in Wi-Fi Hotspot list.
In embodiments of the present invention, begin attempt to access Wi-Fi Hotspot list from the maximum Wi-Fi Hotspot of effective weighted value
In Wi-Fi Hotspot.Because effective weighted value of Wi-Fi Hotspot is bigger, show that mobile terminal can be connect by the Wi-Fi Hotspot
It is bigger to enter the possibility of wireless network, therefore, the embodiment can save the time of mobile terminal access wireless network.
The embodiment of the present invention is by after Wi-Fi Hotspot is accessed, sending preset instructions to server, if in preset time
The feedback information of server is not received, then disconnects the connection with the Wi-Fi Hotspot, and make the invalid weighted value of the Wi-Fi Hotspot
Add 1, when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, to forbid accessing the Wi-Fi Hotspot, thus achieve anti-
Invalid Wi-Fi Hotspot is only accessed, and substantially increases the operating efficiency for preventing accessing invalid Wi-Fi Hotspot.
Fig. 3 shows the structured flowchart provided in an embodiment of the present invention for preventing from accessing the device of invalid Wi-Fi Hotspot, the dress
Put and can be used for service chart 1 and the method for preventing from accessing invalid Wi-Fi Hotspot described in Fig. 2.For convenience of description, illustrate only
Part related to the present embodiment.
Reference picture 3, the device include:
Wi-Fi Hotspot List Generating Module 31, adopting wireless fidelity technology Wi-Fi Hotspot is scanned, according to the Wi- scanned
Fi focuses generate Wi-Fi Hotspot list, the Wi-Fi Hotspot being sequentially ingressed into the Wi-Fi Hotspot list.
Preset instructions sending module 32, after some current described Wi-Fi Hotspot is successfully accessed, preset instructions are sent to clothes
Business device.
Invalid Wi-Fi Hotspot setup module 33, if not receiving the feedback information of the server in preset time, breaks
The connection with the Wi-Fi Hotspot is opened, and the invalid weighted value of the Wi-Fi Hotspot is added 1, with when the invalid power of the Wi-Fi Hotspot
When weight values are more than preset value, forbid accessing the Wi-Fi Hotspot.
Further, the invalid Wi-Fi Hotspot setup module 33 includes:
Blacklist sets submodule, when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, by the Wi-Fi Hotspot
Add blacklist.
Blacklist is forbidden accessing submodule, forbids the access of Wi-Fi Hotspot in the blacklist.
Preferably, described device also includes:
Blacklist removing module, some Wi-Fi Hotspot in the blacklist is set to effective Wi-Fi Hotspot when receiving
After instruction, the invalid weighted value of the Wi-Fi Hotspot is reset into initial value, and the Wi-Fi Hotspot is deleted from the blacklist
Remove.
Preferably, described device also includes:
Effective weighted value setup module, if receiving the feedback information of the server in preset time, keep and be somebody's turn to do
The connection of Wi-Fi Hotspot, and effective weighted value of the Wi-Fi Hotspot is added 1.
Preferably, the Wi-Fi Hotspot List Generating Module is specifically used for:
The size of effective weighted value of Wi-Fi Hotspot according to the Wi-Fi Hotspot list, it is sequentially ingressed into described
The Wi-Fi Hotspot in Wi-Fi Hotspot list.
The embodiment of the present invention is by after Wi-Fi Hotspot is accessed, sending preset instructions to server, if in preset time
The feedback information of server is not received, then disconnects the connection with the Wi-Fi Hotspot, and make the invalid weighted value of the Wi-Fi Hotspot
Add 1, when the invalid weighted value of the Wi-Fi Hotspot is more than preset value, to forbid accessing the Wi-Fi Hotspot, thus achieve anti-
Invalid Wi-Fi Hotspot is only accessed, and substantially increases the operating efficiency for preventing accessing invalid Wi-Fi Hotspot.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.