Summary of the invention
Based on above-mentioned situation, the present invention proposes a kind of recognition methods and recognition device of mobile phone focus, to judge whether a focus is the focus that mobile phone virtual goes out, and for this reason, the scheme of employing is as follows.
A recognition methods for mobile phone focus, comprises step:
Focus under scanning current environment, therefrom selects focus to be identified;
Connect focus to be identified, and obtain IP address;
Search mobile phone focus IP address range, determine that the IP address that obtains whether in scope, if in scope, judges that focus to be identified is as mobile phone focus.
A recognition device for mobile phone focus, comprising:
Focus is chosen module, for scanning the focus under current environment, therefrom selects focus to be identified;
IP address acquisition module, for connecting focus to be identified, and obtains IP address;
IP address judgment module, for searching mobile phone focus IP address range, determines that the IP address that obtains whether in scope, if in scope, judges that focus to be identified is as mobile phone focus.
The IP address that the focus of mobile phone virtual distributes is in fixed range, and the recognition methods of mobile phone focus of the present invention and recognition device, according to this feature, judge whether current focus is mobile phone focus, method is simple, effective fast, has facilitated user to make connection whether selection.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is described in further detail.Should be appreciated that embodiment described herein, only in order to explain the present invention, does not limit protection scope of the present invention.
The recognition methods of mobile phone focus of the present invention, as shown in Figure 1, comprises the steps.
Focus under step s101, scanning current environment, therefrom selects focus to be identified.
For example, in certain position, open smart mobile phone and search 10 WIFI focuses.Now, user can only see hotspot name and signal strength signal intensity, in the focus searching, whether there is the mobile phone focus that is not suitable for connection, user cannot intuitive judgment, adopt this method, can manually select a focus to test as focus to be identified by user, or by mobile phone test one by one automatically.
Step s102, connect focus to be identified, and obtain IP address.
Focus to be identified is connected as common focus, and focus to be identified is by the devices allocation IP address for connecting.The IP address of distributing not is random distribution, but in fixing address field, as the IP address that smart mobile phone the distributed acquiescence of Android operating system is limited within the scope of following 7 sector addresses:
192.168.42.2-192.168.42.254
192.168.43.2-192.168.43.254
192.168.44.2-192.168.44.254
192.168.45.2-192.168.45.254
192.168.46.2-192.168.46.254
192.168.47.2-192.168.47.254
192.168.48.2-192.168.48.254
And adopt the IP address acquiescence that the smart mobile phone of IOS operating system distributes to be limited in following scope:
172.20.10.2-172.20.10.254
Be more than the feature of smart mobile phone institute's distributing IP address of common two kinds of operating systems, this distribution feature belongs to the common practise in field, and any technical staff can both be known.This method is utilized this feature just, the IP address range that pre-stored mobile phone focus distributes, and carry out step below.
Step s103, search mobile phone focus IP address range, determine that the IP address that obtains whether in scope, if in scope, judges that focus to be identified is as mobile phone focus.
By the IP address comparison in the IP address getting and pre-stored IP address range, if there is consistent IP address, show that the current IP address obtaining distributed by smart mobile phone, focus to be identified is mobile phone focus.Thereby can provide prompting, be determined whether to abandon to connect by user.If there is no consistent IP address, show that focus to be identified is not mobile phone focus, can continue to connect.
Except the IP address of distributing has These characteristics, also there is certain feature in the cipher mode of mobile phone focus: cipher mode is confined to specifically several, and various unlike common WIFI focus cipher mode.Wherein, the cipher mode of the focus of Android operating system mobile phone virtual is limited to tri-kinds of OPEN, WPA PSK and WPA2PSK, and the cipher mode of the focus of IOS operating system mobile phone virtual only limits to WPA2 PSK.
Based on above analysis, basis of characterization that can be using cipher mode as mobile phone focus, but because the cipher mode of common WIFI focus has covered the above-mentioned cipher mode of mobile phone focus, thereby cipher mode is only suitable for as assistant criteria.Preferred embodiment be combined with cipher mode in IP address as one, judge according to these two features, can identify more exactly mobile phone focus.
Above mention, the IP address that the smart mobile phone of the smart mobile phone of Android operating system and IOS operating system distributes is in different address fields, according to this feature, can further judge that mobile phone focus is by the mobile phone virtual of which kind of operating system.
Flow chart shown in Fig. 2 be one preferred embodiment, this execution mode drops in Android system mobile phone focus IP address range and still drops in IOS system mobile phone focus IP address range according to obtained IP address, and the cipher mode obtaining belongs to Android system mobile phone focus cipher mode and still belong to IOS system mobile phone focus cipher mode, judge that focus to be identified is as Android system mobile phone focus or IOS system mobile phone focus.
After judging that focus to be identified is as mobile phone focus, if user selects to keep connecting this mobile phone focus, this method can also detect the flow consuming from this mobile phone focus, concurrent outflow prompting.For example, certain user has a smart mobile phone and an Intelligent flat, and smart mobile phone can be networked by mobile network, also can network by wireless network, and Intelligent flat can only be networked by wireless network.Not having in the attachable environment of valid wireless signal, user wants to surf the Net by Intelligent flat, therefore utilizes its mobile phone to create a focus, and Intelligent flat is connected to after this focus, gets final product free interconnection, but what consume is the data traffic of mobile phone.Now, this method shows the window of traffic statistics on user's Intelligent flat, and user can understand how many flows that used mobile phone at any time, the situation that is unlikely to occur to transfinite flow user but knows nothing.
In addition, cell phone manufacturer generally all provides the function of in the time connecting wifi focus automatic updating system version or update software, if current wifi focus is the focus of mobile phone virtual, upgrading will consume the even flow of tens M of mobile phone tens M with the large packet upgrading, and will be a no small loss to the user of flow-sensitive.Thereby this method also, after to identify current focus be the focus that gone out by mobile phone virtual, stops upgrading and the renewal of software automatically.
Be more than the execution mode of the recognition methods of mobile phone focus of the present invention, introduce the recognition device corresponding with above-mentioned recognition methods below.
The recognition device of mobile phone focus of the present invention, as shown in Figure 3, comprising:
Focus is chosen module, for scanning the focus under current environment, therefrom selects focus to be identified;
IP address acquisition module, for connecting focus to be identified, and obtains IP address;
IP address judgment module, for searching mobile phone focus IP address range, determines that the IP address that obtains whether in scope, if in scope, judges that focus to be identified is as mobile phone focus.
Focus is chosen module, IP address acquisition module is connected successively with IP address judgment module, forms an embodiment of this recognition device.
Further, as a preferred embodiment, described IP address acquisition module, also, in obtaining IP address, obtains the cipher mode of focus to be identified; Described IP address judgment module, also for searching mobile phone focus cipher mode kind, determines that whether the cipher mode obtaining is at row, if at row, further judge that focus to be identified is as mobile phone focus.
Further, as a preferred embodiment, described mobile phone focus IP address range comprises Android system mobile phone focus IP address range and IOS system mobile phone focus IP address range; Described mobile phone focus cipher mode kind comprises Android system mobile phone focus cipher mode and IOS system mobile phone focus cipher mode; Described IP address judgment module, also still drop in IOS system mobile phone focus IP address range for dropping on according to obtained IP address in Android system mobile phone focus IP address range, and the cipher mode obtaining belongs to Android system mobile phone focus cipher mode and still belong to IOS system mobile phone focus cipher mode, judge that focus to be identified is as Android system mobile phone focus or IOS system mobile phone focus.
Further, as a preferred embodiment, this recognition device can also comprise traffic monitoring module, for judging that in described IP address judgment module focus to be identified is as mobile phone focus, and keep connecting after this mobile phone focus, detect the flow consuming from above-mentioned mobile phone focus, concurrent outflow prompting.
Further, as a preferred embodiment, this recognition device can also comprise upgrading blocking-up module, after judging that in described IP address judgment module focus to be identified is as mobile phone focus, stops upgrading and the renewal of software.
Because the module of this recognition device and the step of above-mentioned recognition methods are corresponding, thereby technical characterictic is repetition of explanation no longer.
To sum up, the recognition methods of mobile phone focus of the present invention and recognition device by the correlated characteristic of mobile phone focus, identify mobile phone focus from common wifi focus, are beneficial to user and make a choice pointedly.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.