CN106714177B - Method for distinguishing wireless hotspots with same name and electronic equipment - Google Patents

Method for distinguishing wireless hotspots with same name and electronic equipment Download PDF

Info

Publication number
CN106714177B
CN106714177B CN201710183750.0A CN201710183750A CN106714177B CN 106714177 B CN106714177 B CN 106714177B CN 201710183750 A CN201710183750 A CN 201710183750A CN 106714177 B CN106714177 B CN 106714177B
Authority
CN
China
Prior art keywords
wireless hotspot
wireless
attribute information
source attribute
hotspots
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
CN201710183750.0A
Other languages
Chinese (zh)
Other versions
CN106714177A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201710183750.0A priority Critical patent/CN106714177B/en
Publication of CN106714177A publication Critical patent/CN106714177A/en
Application granted granted Critical
Publication of CN106714177B publication Critical patent/CN106714177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

The embodiment of the invention provides a method for distinguishing homonymous wireless hotspots and electronic equipment, wherein when connection with a wireless hotspot to be connected is required to be established, a first name and first source attribute information of the wireless hotspot to be connected are acquired; when the first name and the first source attribute information are respectively matched with the second name and the second source attribute information of the target wireless hotspot recorded in advance, the wireless hotspot to be connected and the target wireless hotspot are indicated to be the same wireless hotspot, and at the moment, the electronic equipment can try to establish connection with the wireless hotspot to be connected according to the target login password of the target wireless hotspot. The method and the device have the advantages that connection is tried through the target login password when the wireless hotspot to be connected and the target wireless hotspot are determined to be the same wireless hotspot, the situation that the login password is input again when the wireless hotspot to be connected and the target wireless hotspot are the same in name and different in login password is avoided, time of connecting the electronic device with the wireless hotspot is shortened, and data processing speed of the electronic device is improved.

Description

Method for distinguishing wireless hotspots with same name and electronic equipment
Technical Field
The invention relates to the field of communication, in particular to a method for distinguishing homonymous wireless hotspots and electronic equipment.
Background
Most of existing electronic devices have a Wireless-Fidelity (Wireless) function, and a Wireless communication module can be turned on to connect a nearby Wireless hotspot, and a login password of the Wireless hotspot is generally set in consideration of network security. After the conventional electronic equipment successfully logs in the wireless hotspot, the name and the login password of the wireless hotspot are recorded, so that the user can log in quickly when accessing the wireless hotspot again.
Since wireless hotspots exist in many places at present, the situation that a plurality of wireless hotspots have the same name often occurs, and the plurality of wireless hotspots with the same name are called as the same-name wireless hotspots. Assume that the electronic device stores a login password for a wireless hotspot. When the electronic equipment is connected with the same-name wireless hotspot of the wireless hotspot, the stored login password of the wireless hotspot is tried to be connected with the same-name wireless hotspot, and if the login password is incorrect, the user is required to input the correct login password, so that the time of the electronic equipment for connecting the wireless hotspot is prolonged, and the data processing speed of the electronic equipment is reduced.
Therefore, there is a need in the art for a method of distinguishing between wireless hotspots of the same name.
Disclosure of Invention
In view of this, the present invention provides a method for distinguishing wireless hotspots with the same name and an electronic device, so as to overcome the problems that in the prior art, in the process of establishing connection between the electronic device and the wireless hotspot with the same name, the time for the electronic device to connect to the wireless hotspot is prolonged, and the data processing speed of the electronic device is reduced.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for distinguishing wireless hotspots with the same name is applied to electronic equipment, the electronic equipment records names corresponding to the wireless hotspots successfully connected with the electronic equipment, source attribute information corresponding to the wireless hotspots and login passwords corresponding to the wireless hotspots, and the method for distinguishing the wireless hotspots with the same name comprises the following steps:
acquiring a first name and first source attribute information of a wireless hotspot to be connected;
and when the first name and the first source attribute information are respectively matched with a second name of a target wireless hotspot recorded in advance and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot.
Preferably, the method further comprises the following steps:
and prompting a user to input a login password when the corresponding name of each pre-recorded wireless hotspot is not matched with the first name, or the second source attribute information corresponding to the target wireless hotspot to which the second name matched with the first name belongs is not matched with the first source attribute information.
Wherein determining whether the first source attribute information matches pre-recorded second source attribute information corresponding to the target wireless hotspot comprises:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
The method for determining the prestored source attribute information of each wireless hotspot comprises the following steps:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the login passwords corresponding to the at least two wireless hotspots are the same, judging whether the router media access control addresses corresponding to the at least two wireless hotspots are the same and whether the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are different, determining that the at least two wireless hotspots are a public network;
determining the at least two wireless hotspots as a first wireless hotspot;
and determining a router media access control address corresponding to the first wireless hotspot as the source attribute information of the first wireless hotspot.
Wherein determining whether the first source attribute information matches pre-recorded second source attribute information corresponding to the target wireless hotspot comprises:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
The method for determining the prestored source attribute information of each wireless hotspot comprises the following steps:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the corresponding login passwords of the at least two wireless hotspots are the same, judging whether the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and whether the private internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are different and the private internet protocol addresses corresponding to the at least two wireless hotspots are the same, determining that the at least two wireless hotspots are private networks;
determining the at least two wireless hotspots as a second wireless hotspot;
and determining the private internet protocol address corresponding to the second wireless hotspot as the source attribute information of the second wireless hotspot.
Wherein the source attribute information includes a geographic location where the electronic device is located when connecting to the corresponding wireless hotspot, and determining whether the first source attribute information matches with pre-recorded second source attribute information corresponding to the target wireless hotspot includes:
acquiring a first geographical position where the electronic equipment is located currently;
and judging whether the first geographic position is matched with a second geographic position corresponding to the target wireless hotspot.
An electronic device, comprising:
the memory is used for storing a program, and names corresponding to the wireless hotspots successfully connected with the electronic equipment, source attribute information corresponding to the wireless hotspots and login passwords corresponding to the wireless hotspots;
a processor configured to execute the program, the program specifically configured to:
acquiring a first name and first source attribute information of a wireless hotspot to be connected;
and when the first name and the first source attribute information are respectively matched with a second name of a target wireless hotspot recorded in advance and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot.
When determining whether the first source attribute information matches with pre-recorded second source attribute information corresponding to the target wireless hotspot, the processor is specifically configured to:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
When determining whether the first source attribute information matches with pre-recorded second source attribute information corresponding to the target wireless hotspot, the processor is specifically configured to:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
According to the technical scheme, compared with the prior art, the embodiment of the invention provides a method for distinguishing homonymous wireless hotspots, the electronic equipment records the names corresponding to the wireless hotspots successfully connected with the electronic equipment, the source attribute information corresponding to the wireless hotspots and the login passwords corresponding to the wireless hotspots, and when the electronic equipment needs to establish connection with a wireless hotspot to be connected, the first name and the first source attribute information of the wireless hotspot to be connected are obtained; when the first name and the first source attribute information are respectively matched with the second name of the target wireless hotspot recorded in advance and the second source attribute information of the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are the same wireless hotspot, and at the moment, the electronic equipment can try to establish connection with the wireless hotspot to be connected according to the target login password of the target wireless hotspot. According to the embodiment of the invention, when the current wireless hotspot to be connected and the target wireless hotspot are determined to be the same wireless hotspot, connection is attempted through the target login password of the target wireless hotspot, and compared with the prior art that only the name of the wireless hotspot to be connected is the same as the name of the target wireless hotspot and connection attempt is performed according to the login password of the target wireless hotspot, the situation that the login password is input again due to the fact that the wireless hotspot to be connected and the target wireless hotspot are only the same in name but different in login password is avoided, so that the time for connecting the wireless hotspot by the electronic equipment is shortened, and the data processing speed of the electronic equipment is increased.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for distinguishing wireless hotspots with the same name according to an embodiment of the present invention;
fig. 2 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a flowchart of a method for distinguishing wireless hotspots with the same name provided in an embodiment of the present invention is provided, where the method is applicable to an electronic device, and the electronic device may record a name corresponding to each wireless hotspot with which a connection is successfully established, source attribute information corresponding to each wireless hotspot, and a login password corresponding to each wireless hotspot, and the method for distinguishing wireless hotspots with the same name includes:
step S101: the method comprises the steps of obtaining a first name and first source attribute information of a wireless hotspot to be connected.
The names corresponding to the wireless hotspots successfully connected with the electronic device, the source attribute information corresponding to the wireless hotspots, and the login passwords corresponding to the wireless hotspots, which are recorded by the electronic device, may be stored in preset entries, which may be tables, preset storage spaces, TxT texts, and the like. The embodiments of the present invention are illustrated by taking tables as examples.
Table 1 successful establishment of connection to each wireless hotspot table
Wireless hotspot name Corresponding source attribute information of wireless hotspot Corresponding login password of wireless hotspot
WiFi1 Source attribute information 1 Login password 1
WiFi2 Source attribute information 2 Login password 2
WiFin Source attribute information n Login password n
The source attribute information of the wireless hotspot is used for representing the information of the router or the network card to which the corresponding wireless hotspot belongs.
Step S102: and when the first name and the first source attribute information are respectively matched with a second name of a target wireless hotspot recorded in advance and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot.
Preferably, the method for distinguishing wireless hotspots of the same name provided by the embodiment of the present invention may further include: and prompting a user to input a login password when the corresponding name of each pre-recorded wireless hotspot is not matched with the first name, or the second source attribute information corresponding to the target wireless hotspot to which the second name matched with the first name belongs is not matched with the first source attribute information.
In the method for distinguishing homonymous wireless hotspots provided by the embodiment of the invention, the electronic equipment records the corresponding name of each wireless hotspot successfully establishing connection with the electronic equipment, the source attribute information corresponding to each wireless hotspot and the login password corresponding to each wireless hotspot, and when the electronic equipment needs to establish connection with a wireless hotspot to be connected, the first name and the first source attribute information of the wireless hotspot to be connected are obtained; and when the first name and the first source attribute information are respectively matched with the second name of the target wireless hotspot recorded in advance and the second source attribute information of the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are the same wireless hotspot. At this time, the electronic device may attempt to establish a connection with the wireless hotspot to be connected according to the target login password of the target wireless hotspot.
According to the embodiment of the invention, when the current wireless hotspot to be connected and the target wireless hotspot are determined to be the same wireless hotspot, connection is attempted through the target login password of the target wireless hotspot, and compared with the prior art that only the name of the wireless hotspot to be connected is the same as the name of the target wireless hotspot and connection attempt is performed according to the login password of the target wireless hotspot, the situation that the login password is input again due to the fact that the wireless hotspot to be connected and the target wireless hotspot are only the same in name but different in login password is avoided, so that the time for connecting the wireless hotspot by the electronic equipment is shortened, and the data processing speed of the electronic equipment is increased.
It will be appreciated that the public network and the private network correspond to different source attribute information.
If a wireless hotspot is a public network, the wireless hotspot is managed by a plurality of IP addresses, the management modes of the public network to the IP addresses mainly comprise a static allocation mode and a dynamic allocation mode, and the two modes can be combined according to requirements, namely a mixed allocation mode. The static allocation mode means that each electronic device is allocated with a fixed IP address, and the static allocation mode has the advantage of being convenient to manage. The dynamic allocation mode means that the IP addresses allocated to the same electronic device each time the electronic device is connected to the public network are different, and the IP addresses are dynamic IP addresses.
In the embodiment of the present invention, since the electronic device connected to the wireless hotspot is not fixed, the IP addresses of the public network according to the embodiment of the present invention are all dynamically allocated, and therefore the IP addresses are referred to as dynamic IP addresses.
However, the dynamic IP addresses are all for the same network device, such as a network card, so the login password is the same. A network device can be uniquely identified by a MAC (Media Access Control) address, which is a physical address fixed in a serial EEPROM on a network card and used to define the location of the network device. In the OSI model, the layer two data link layer is responsible for MAC addresses. One network device corresponds to one MAC address.
Therefore, for a wireless hotspot belonging to a public network, the source attribute information is the MAC address.
The private network is a local area network, a wireless hotspot belonging to the private network corresponds to one IP address, and the IP address corresponding to the wireless hotspot belonging to the private network is called as a private IP address in the embodiment of the invention.
Therefore, for the wireless hotspot belonging to the private network, the source attribute information is the private IP address.
A method for determining that the wireless hotspot belongs to a private network or a public network by the electronic device is described below.
Assume that the electronic device has successfully connected 5 wireless hotspots, and the information of the 5 wireless hotspots is as follows.
TABLE 2 information about five Wireless hotspots
Since the login passwords for different wireless hotspots are typically not the same. By utilizing the characteristic, a plurality of wireless hotspots with the same login password, the same MAC address and different IP addresses can be determined as the same wireless hotspot and belong to a public network; and determining a plurality of wireless hotspots with the same login password, the same IP address and different MAC addresses as the same wireless hotspot and belong to a private network.
In summary, as can be seen from table 2, the IP addresses of WiFi1, WiFi3, and WiFi5 are different, but the MAC addresses are the same and the login passwords are the same, so that WiFi1, WiFi3, and WiFi5 belong to the same network device, and thus WiFi1, WiFi3, and WiFi5 are determined to be the same wireless hotspot (referred to as a first wireless hotspot) and belong to a public network.
The login password and the IP address of WiFi2 and WiFi4 are the same, but the MAC addresses are different, so WiFi2 and WiFi4 are the same wireless hotspot (referred to as a second wireless hotspot) and belong to a private network.
In summary, the method for distinguishing wireless hotspots of the same name provided in the embodiment of the present invention includes two cases, "determining whether the first source attribute information matches the second source attribute information corresponding to the pre-recorded target wireless hotspot" or not. It can be understood that the electronic device cannot immediately judge that the wireless hotspot to be connected belongs to a private network or a public network, and the embodiment of the invention ingeniously assumes the network type to which the target wireless hotspot with the same name as the wireless hotspot to be connected belongs to the network type to which the wireless hotspot to be connected belongs, and acquires corresponding source attribute information based on the network type.
First, the target wireless hotspot is a public network.
Judging whether the first source attribute information is matched with second source attribute information corresponding to the pre-recorded target wireless hotspot comprises:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
When the first router media access control address is not matched with the second router media access control address corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are not the same wireless hotspot, and at the moment, the user can be prompted to input a login password. When the first router media access control address is matched with the second router media access control address corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are the same wireless hotspot, and at the moment, connection with the wireless hotspot to be connected can be attempted by using a login password corresponding to the target wireless hotspot.
Optionally, when the first router media access control address is not matched with the second router media access control address corresponding to the target wireless hotspot, the login password corresponding to the target wireless hotspot may try to establish connection with the wireless hotspot to be connected, only the success rate is not high, and when the connection fails, the user is prompted to input the login password.
In a first case, the method for determining the pre-stored source attribute information of each wireless hotspot comprises the following steps:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the login passwords corresponding to the at least two wireless hotspots are the same, judging whether the router media access control addresses corresponding to the at least two wireless hotspots are the same and whether the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are different, determining that the at least two wireless hotspots are a public network;
determining the at least two wireless hotspots as a first wireless hotspot;
and determining a router media access control address corresponding to the first wireless hotspot as the source attribute information of the first wireless hotspot.
Second, the target wireless hotspot is a private network.
Judging whether the first source attribute information is matched with second source attribute information corresponding to the pre-recorded target wireless hotspot comprises:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
When the first private internet protocol address is not matched with the second private internet protocol address corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are not the same wireless hotspot, and at the moment, the user can be prompted to input a login password. When the first private internet protocol address is matched with the second private internet protocol address corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are the same wireless hotspot, and at the moment, connection with the wireless hotspot to be connected can be tried by using a login password corresponding to the target wireless hotspot.
Optionally, when the first private internet protocol address is not matched with the second private internet protocol address corresponding to the target wireless hotspot, the login password corresponding to the target wireless hotspot may try to establish connection with the wireless hotspot to be connected, and only if the success rate is not high, when the connection fails, the user is prompted to input the login password.
In a second case, the method for determining the pre-stored source attribute information of each wireless hotspot comprises the following steps:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the corresponding login passwords of the at least two wireless hotspots are the same, judging whether the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and whether the private internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are different and the private internet protocol addresses corresponding to the at least two wireless hotspots are the same, determining that the at least two wireless hotspots are private networks;
determining the at least two wireless hotspots as a second wireless hotspot;
and determining the private internet protocol address corresponding to the second wireless hotspot as the source attribute information of the second wireless hotspot.
The electronic device determines which wireless hotspots belong to the same wireless hotspot, and after determining the network type to which each wireless hotspot belongs, may update the stored name corresponding to each wireless hotspot, the source attribute information corresponding to each wireless hotspot, and the login password corresponding to each wireless hotspot, taking table 2 as an example, after updating table 2, the storage form may be as shown in table 3.
Table 3 table 2 updated table
It is understood that a user may move with the electronic device and that the user may often go to certain locations, such as a company, a mall, a supermarket, a home, and so on. The hotspot names of the wireless hotspots for these locations may be the same. However, the geographic locations of these places are different, so the geographic location where the electronic device is located when being connected to the wireless hotspot can be used as the source attribute information of the wireless hotspot.
For example, two wireless hotspots in different geographic locations are not generally the same wireless hotspot, e.g., a home wireless hotspot and a company wireless hotspot are not the same wireless hotspot.
Therefore, determining whether the first source attribute information matches pre-recorded second source attribute information corresponding to the target wireless hotspot includes:
acquiring a first geographical position where the electronic equipment is located currently;
and judging whether the first geographic position is matched with a second geographic position corresponding to the target wireless hotspot.
The electronic device may include a GPS (Global Positioning System) module, and the GPS module is used to obtain a geographic location of the electronic device when the electronic device is connected to the wireless hotspot.
It is understood that each wireless hotspot corresponds to a wireless communication coverage area, i.e., electronic devices within the wireless communication coverage area can be connected to the wireless hotspot. Therefore, the geographic location mentioned in the embodiment of the present invention may be a geographic range, and the size of the geographic range may be set according to the communication coverage of each wireless hotspot in an actual situation. The communication coverage of the wireless hotspot is large, the geographic range is large, and the communication coverage of the wireless hotspot is small, the geographic range is small.
The method for determining the communication coverage of the wireless hotspot can comprise the following steps: the method is determined according to the signal intensity of the wireless hotspot and the change condition of the mobile unit in the moving process of the electronic equipment.
The optimal situation is that the geographic position corresponding to each wireless hotspot comprises: the communication coverage of the wireless hotspot includes a geographic location.
When the first geographic position is not matched with the second geographic position corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are not the same wireless hotspot, and at the moment, the user can be prompted to input a login password. When the first geographic position is matched with the second geographic position corresponding to the target wireless hotspot, the wireless hotspot to be connected and the target wireless hotspot are the same wireless hotspot, and at the moment, connection with the wireless hotspot to be connected can be tried by using a login password corresponding to the target wireless hotspot.
Optionally, when the first geographic location is not matched with the second geographic location corresponding to the target wireless hotspot, the login password corresponding to the target wireless hotspot may try to establish connection with the wireless hotspot to be connected, and only if the success rate is not high, when the connection fails, the user is prompted to input the login password.
As shown in fig. 2, a structural diagram of an electronic device provided in an embodiment of the present invention includes:
the memory 21 is used for storing a program, and names corresponding to the wireless hotspots successfully connected with the electronic device, source attribute information corresponding to the wireless hotspots, and login passwords corresponding to the wireless hotspots;
the memory 21 may comprise a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory.
A processor 22 configured to execute the program, the program being specifically configured to:
acquiring a first name and first source attribute information of a wireless hotspot to be connected;
and when the first name and the first source attribute information are respectively matched with a second name of a target wireless hotspot recorded in advance and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot.
The processor 22 may be a central processing unit CPU or an application specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The electronic device may further comprise a communication bus 23, wherein the processor 22 and the memory 21 are in communication with each other via the communication bus 23.
Optionally, the processor may be further configured to:
and prompting a user to input a login password when the corresponding name of each pre-recorded wireless hotspot is not matched with the first name, or the second source attribute information corresponding to the target wireless hotspot to which the second name matched with the first name belongs is not matched with the first source attribute information.
Optionally, when determining whether the first source attribute information matches second source attribute information corresponding to the pre-recorded target wireless hotspot, the processor is specifically configured to:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
Optionally, the processor may be further configured to:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the login passwords corresponding to the at least two wireless hotspots are the same, judging whether the router media access control addresses corresponding to the at least two wireless hotspots are the same and whether the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are different, determining that the at least two wireless hotspots are a public network;
determining the at least two wireless hotspots as a first wireless hotspot;
and determining a router media access control address corresponding to the first wireless hotspot as the source attribute information of the first wireless hotspot.
Optionally, when determining whether the first source attribute information matches second source attribute information corresponding to the pre-recorded target wireless hotspot, the processor is specifically configured to:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
Optionally, the processor may be further configured to:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the corresponding login passwords of the at least two wireless hotspots are the same, judging whether the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and whether the private internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are different and the private internet protocol addresses corresponding to the at least two wireless hotspots are the same, determining that the at least two wireless hotspots are private networks;
determining the at least two wireless hotspots as a second wireless hotspot;
and determining the private internet protocol address corresponding to the second wireless hotspot as the source attribute information of the second wireless hotspot.
Optionally, the source attribute information includes a geographic location where the electronic device is located when connecting to the corresponding wireless hotspot, and when determining whether the first source attribute information matches with the pre-recorded second source attribute information corresponding to the target wireless hotspot, the processor is specifically configured to:
acquiring a first geographical position where the electronic equipment is located currently;
and judging whether the first geographic position is matched with a second geographic position corresponding to the target wireless hotspot.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for distinguishing wireless hotspots with the same name is characterized in that the method is applied to electronic equipment, the electronic equipment records names corresponding to the wireless hotspots successfully connected with the electronic equipment, source attribute information corresponding to the wireless hotspots and login passwords corresponding to the wireless hotspots, wherein the login passwords are the same, the router media access control addresses are the same, and a plurality of wireless hotspots with different private Internet protocol addresses are determined to be the same wireless hotspot and belong to a public network; the method for distinguishing the same-name wireless hotspots comprises the following steps of determining a plurality of wireless hotspots with the same login password, the same private Internet protocol address and different router media access control addresses as the same wireless hotspot and belonging to a private network, wherein the method comprises the following steps:
acquiring a first name and first source attribute information of a wireless hotspot to be connected, wherein the first source attribute information comprises: a first router media access control address under a public network or a first private internet protocol address under a private network;
when the first name and the first source attribute information are respectively matched with a second name of a pre-recorded target wireless hotspot and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot, wherein the second source attribute information comprises: a second router media access control address under a public network or a second private internet protocol address under a private network.
2. The method of claim 1, further comprising:
and prompting a user to input a login password when the corresponding name of each pre-recorded wireless hotspot is not matched with the first name, or the second source attribute information corresponding to the target wireless hotspot to which the second name matched with the first name belongs is not matched with the first source attribute information.
3. The method of claim 1, wherein determining whether the first source attribute information matches pre-recorded second source attribute information corresponding to the target wireless hotspot comprises:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
4. The method of claim 3, wherein the step of determining the pre-stored source attribute information of each wireless hotspot comprises:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the login passwords corresponding to the at least two wireless hotspots are the same, judging whether the router media access control addresses corresponding to the at least two wireless hotspots are the same and whether the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and the dynamic internet protocol addresses corresponding to the at least two wireless hotspots are different, determining that the at least two wireless hotspots are a public network;
determining the at least two wireless hotspots as a first wireless hotspot;
and determining a router media access control address corresponding to the first wireless hotspot as the source attribute information of the first wireless hotspot.
5. The method of claim 1, wherein determining whether the first source attribute information matches pre-recorded second source attribute information corresponding to the target wireless hotspot comprises:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
6. The method of claim 5, wherein the step of determining the pre-stored source attribute information of each wireless hotspot comprises:
when the pre-stored wireless hotspots comprise at least two wireless hotspots with the same name and the corresponding login passwords of the at least two wireless hotspots are the same, judging whether the media access control addresses of the routers corresponding to the at least two wireless hotspots are the same and whether the private internet protocol addresses corresponding to the at least two wireless hotspots are the same;
when the media access control addresses of the routers corresponding to the at least two wireless hotspots are different and the private internet protocol addresses corresponding to the at least two wireless hotspots are the same, determining that the at least two wireless hotspots are private networks;
determining the at least two wireless hotspots as a second wireless hotspot;
and determining the private internet protocol address corresponding to the second wireless hotspot as the source attribute information of the second wireless hotspot.
7. The method according to claim 1, wherein the source attribute information includes a geographical location where the electronic device is located when connecting to the corresponding wireless hotspot, and the determining whether the first source attribute information matches with the pre-recorded second source attribute information corresponding to the target wireless hotspot comprises:
acquiring a first geographical position where the electronic equipment is located currently;
and judging whether the first geographic position is matched with a second geographic position corresponding to the target wireless hotspot.
8. An electronic device, comprising:
the device comprises a memory, a storage and a login password, wherein the memory is used for storing a program, names corresponding to wireless hotspots successfully connected with the electronic equipment, source attribute information corresponding to the wireless hotspots and login passwords corresponding to the wireless hotspots, and the login passwords are the same, the router media access control addresses are the same, and a plurality of wireless hotspots with different private internet protocol addresses are determined to be the same wireless hotspot and belong to a public network; determining a plurality of wireless hotspots with the same login password and the same private internet protocol address but different router media access control addresses as the same wireless hotspot and belong to a private network;
a processor configured to execute the program, the program specifically configured to:
acquiring a first name and first source attribute information of a wireless hotspot to be connected, wherein the first source attribute information comprises: a first router media access control address under a public network or a first private internet protocol address under a private network;
when the first name and the first source attribute information are respectively matched with a second name of a pre-recorded target wireless hotspot and second source attribute information of the target wireless hotspot, trying to establish connection with the wireless hotspot to be connected according to a target login password corresponding to the target wireless hotspot, wherein the second source attribute information comprises: a second router media access control address under a public network or a second private internet protocol address under a private network.
9. The electronic device according to claim 8, wherein the processor, when determining whether the first source attribute information matches second source attribute information corresponding to the pre-recorded target wireless hotspot, is specifically configured to:
when the target wireless hotspot is a public network, acquiring a first router media access control address of the wireless hotspot to be connected;
determining the first router media access control address as the first source attribute information;
and judging whether the first router media access control address is matched with a second router media access control address of the target wireless hotspot, wherein the second source attribute information comprises the second router media access control address.
10. The electronic device according to claim 8, wherein the processor, when determining whether the first source attribute information matches second source attribute information corresponding to the pre-recorded target wireless hotspot, is specifically configured to:
when the target wireless hotspot is a private network, acquiring a first private Internet protocol address of the wireless hotspot to be connected;
determining the first private internet protocol address as first source attribute information of the wireless hotspot to be connected;
and judging whether the first private internet protocol address is matched with a second private internet protocol address of the target wireless hotspot, wherein the second source attribute information comprises the second private internet protocol address.
CN201710183750.0A 2017-03-24 2017-03-24 Method for distinguishing wireless hotspots with same name and electronic equipment Active CN106714177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710183750.0A CN106714177B (en) 2017-03-24 2017-03-24 Method for distinguishing wireless hotspots with same name and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710183750.0A CN106714177B (en) 2017-03-24 2017-03-24 Method for distinguishing wireless hotspots with same name and electronic equipment

Publications (2)

Publication Number Publication Date
CN106714177A CN106714177A (en) 2017-05-24
CN106714177B true CN106714177B (en) 2020-03-24

Family

ID=58886926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710183750.0A Active CN106714177B (en) 2017-03-24 2017-03-24 Method for distinguishing wireless hotspots with same name and electronic equipment

Country Status (1)

Country Link
CN (1) CN106714177B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501482A (en) * 2013-09-26 2014-01-08 小米科技有限责任公司 Network access method, network access device and terminal
CN103781071A (en) * 2012-10-25 2014-05-07 华为技术有限公司 Access point visiting method and related equipment
CN104159226A (en) * 2014-07-24 2014-11-19 小米科技有限责任公司 Network connection method and device
CN104837215A (en) * 2015-04-14 2015-08-12 广东欧珀移动通信有限公司 Wireless access point connecting method and device
CN104902543A (en) * 2015-05-14 2015-09-09 北京奇虎科技有限公司 WiFi connection method, device and system
CN105101338A (en) * 2015-07-23 2015-11-25 中国联合网络通信集团有限公司 Access network method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103781071A (en) * 2012-10-25 2014-05-07 华为技术有限公司 Access point visiting method and related equipment
CN103501482A (en) * 2013-09-26 2014-01-08 小米科技有限责任公司 Network access method, network access device and terminal
CN104159226A (en) * 2014-07-24 2014-11-19 小米科技有限责任公司 Network connection method and device
CN104837215A (en) * 2015-04-14 2015-08-12 广东欧珀移动通信有限公司 Wireless access point connecting method and device
CN104902543A (en) * 2015-05-14 2015-09-09 北京奇虎科技有限公司 WiFi connection method, device and system
CN105101338A (en) * 2015-07-23 2015-11-25 中国联合网络通信集团有限公司 Access network method and apparatus

Also Published As

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

Similar Documents

Publication Publication Date Title
EP3327992B1 (en) Method of selecting network slice and system utilizing same
CN102017677B (en) Access through non-3GPP access networks
KR100764010B1 (en) A method and apparatuses for selecting connection settings by using historydata
US7324489B1 (en) Managing network service access
US10893026B2 (en) Privacy managing entity selection in communication system
KR20220005647A (en) Method for setting pdu type, method for setting ue policy, and related entities
CN108337677B (en) Network authentication method and device
US20210120409A1 (en) User authentication in first network using subscriber identity module for second legacy network
JP6415727B2 (en) Multi-number service provision method
CN105827463A (en) Method, device and system for configuring business of client
MX2014015848A (en) Method, apparatus, and system for accessing mobile network.
CN107396358B (en) Wireless hotspot connection control method, device and equipment and computer storage medium
CN105101274A (en) Configuration method and device of message forwarding mode
US20110158172A1 (en) Method and device for enforcing internet users' geographical positioning traceability
US20170034704A1 (en) Wireless local area network user-side device and information processing method
CN106714177B (en) Method for distinguishing wireless hotspots with same name and electronic equipment
US9854391B2 (en) Zero touch configuration support for universal serial bus modem on a network device
JP2003318939A (en) Communication system and control method thereof
CN109560954B (en) Equipment configuration method and device
US20200021989A1 (en) Controlling Access And Accessing A Traffic Network In A High Density Environment
CN102187717B (en) Methods and apparatus for service provisioning in wireless communication networks
JP6177266B2 (en) Wireless communication terminal authentication control apparatus, wireless communication terminal authentication control system, wireless communication terminal authentication control method, and program
JP2017195632A (en) Radio communication terminal authentication control device, radio communication terminal authentication control system, radio communication terminal authentication control method and program
JP6640949B2 (en) Connection information transmitting device, method and program
JP7060823B2 (en) Communication systems, communication devices and programs

Legal Events

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