Disclosure of Invention
In order to solve the above-mentioned drawbacks, the present invention provides a method for automatically accessing an AP, which enables a terminal to automatically access the AP without inputting a password even when the terminal first accesses or after the password of the AP is changed, and is convenient and fast.
The invention discloses a method for automatically accessing an AP, which comprises the following steps:
s100, when a new terminal requests to access the AP for the first time, reading historical connection information of the new terminal;
s200, reading historical connection information of each terminal accessed to the AP;
s300, acquiring a correlation value between the new terminal and each terminal accessed to the AP according to the historical connection information of the new terminal and the historical connection information of each terminal accessed to the AP;
s400, judging whether a correlation value which is larger than or equal to a preset threshold value exists in the correlation values of the new terminal and each terminal accessed to the AP or not, if so, entering a step S500, otherwise, entering a step S600;
s500, allowing the new terminal to access the AP to realize automatic network access;
s600, the new terminal is refused to automatically access the AP.
Further, the historical connection information comprises SSID, BSSID and connection time information records of the historical connection wireless network.
Further, the step S200 includes: s210 reads the historical connection information of each terminal currently accessing the AP. Or: s220 reads the historical connection information of each terminal currently accessing the AP and the stored historical terminals historically accessing the AP.
Further, the step S300 includes:
s310, selecting a terminal related to the new terminal from all terminals accessed to the AP as a target terminal;
s320, determining a correlation value between the new terminal and the target terminal according to the historical connection information of the target terminal and the historical connection information of the new terminal;
the step S400 includes: s410, judging whether the correlation values of the new terminal and the target terminal are greater than or equal to a preset threshold value, if so, entering a step S500, otherwise, entering a step S600.
Further, the step S310 includes:
s311, searching whether SSID information with the recording times larger than the preset times exists or not according to SSID records in the historical connection information of the new terminal, if so, entering S312, and otherwise, entering S600;
s312, marking the SSID with the recording times larger than the preset times as a target SSID;
s313, searching whether the information record of the target SSID exists in the historical connection information of each terminal accessed to the AP, if so, entering S314;
s314, selecting the terminal which is recorded with the information record of the target SSID and accesses the AP as a target terminal.
Further, the step S320 includes:
s321, determining a correlation value between the new terminal and the target terminal by adopting a preset correlation algorithm according to the historical connection information of the target terminal and the historical connection information of the new terminal;
wherein, the preset correlation algorithm is as follows:
Tm=e-h/12 (2)
wherein, R: the correlation value of the new terminal and the target terminal;
m: the number of the wireless AP of the historical connection of the target terminal is started from 1;
a: the total number of the historical access wireless APs of the target terminal;
tm: the target terminal is historically connected with a time constant of a wireless AP with the number m;
f (m): the value of the coefficient of the wireless AP with the target terminal connection number m is 1 when the BSSID of the historical connection wireless AP accessed by the target terminal and the new terminal is the same; when different, the value is 0;
h: the last connection time between the target terminal and the wireless AP with the number m is the number of months from the current time.
The invention also discloses a device for automatically accessing the AP, which can adopt the method for automatically accessing the AP, and the device comprises: the reading module is used for reading the historical connection information of a new terminal and the historical connection information of each terminal accessed to the AP when the new terminal requests to access the AP for the first time; the acquisition module is used for acquiring the correlation value between the new terminal and each terminal accessed to the AP according to the historical connection information of the new terminal read by the reading module and the historical connection information of each terminal accessed to the AP; the operation module is used for allowing or refusing the new terminal to access the AP according to the judgment result of the judgment processing module; the judgment processing module is configured to judge whether a correlation value greater than or equal to a preset threshold exists in the correlation values of the new terminal and each terminal accessing the AP, which are acquired by the acquisition module, if yes, the operation module is controlled to allow the new terminal to access the AP, so as to achieve automatic network access, and if not, the operation module is controlled to reject the new terminal to automatically access the AP.
Further, the obtaining module comprises: a selecting submodule, configured to select, from terminals accessing the AP, a terminal related to the new terminal as a target terminal; the algorithm submodule is used for determining a correlation value between the new terminal and the target terminal according to the historical connection information of the target terminal and the historical connection information of the new terminal; the judgment processing module is further configured to judge whether a correlation value greater than or equal to a preset threshold exists in the correlation values of the new terminal and the target terminal determined by the algorithm sub-module, if yes, the operation module is controlled to allow the new terminal to access the AP, so as to achieve automatic network access, and if not, the operation module is controlled to reject the new terminal to automatically access the AP.
Further, the algorithm submodule determines a correlation value between the new terminal and the target terminal by adopting a preset correlation algorithm according to the historical connection information of the target terminal and the historical connection information of the new terminal; wherein, the preset correlation algorithm is as follows:
Tm=e-h/12 (2)
wherein, R: the correlation value of the new terminal and the target terminal;
m: the number of the wireless AP of the historical connection of the target terminal is started from 1;
a: the total number of the historical access wireless APs of the target terminal;
tm: the historical connection of the target terminal is changed into a time constant of the wireless AP of m;
f (m): the value of the coefficient of the wireless AP with the target terminal connection number m is 1 when the BSSID of the historical connection wireless AP accessed by the target terminal and the new terminal is the same; when different, the value is 0;
h: the last connection time between the target terminal and the wireless AP with the number m is the number of months from the current time.
In addition, the invention also discloses a wireless router which comprises the device for automatically accessing the AP.
The invention adopts a wireless hotspot AP end to read information of each current wireless terminal device which is requested to be connected for the first time or is connected for the first time, obtains a historical wireless hotspot connection record of the wireless terminal device, calculates the correlation degree, identifies the wireless terminal device which is requested to be added for the first time, judges whether the wireless terminal device is allowed to be added or not by comparing with the preset correlation degree value of the wireless AP, and does not need a password any more. According to the invention, for the future intelligent household wireless device set, through the mode of transferring one device, other devices are also transferred at the same time, so that the management of a large number of wireless devices is facilitated. The personnel who have certain close relation with the wireless AP accessed person are allowed to share the wireless AP, so that repeated and complicated password input work can be better saved. The identification of the wireless AP to the access person is realized, and the intelligence of the wireless AP is improved to a great extent.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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.
The invention discloses a method for automatically accessing an AP, the embodiment of which is shown in figure 1 and comprises the following steps:
s100, when a new terminal requests to access the AP for the first time, reading historical connection information of the new terminal;
s200, reading historical connection information of each terminal accessed to the AP;
s300, acquiring a correlation value between the new terminal and each terminal accessed to the AP according to the historical connection information of the new terminal and the historical connection information of each terminal accessed to the AP;
s400, judging whether a correlation value which is larger than or equal to a preset threshold value exists in the correlation values of the new terminal and each terminal accessed to the AP or not, if so, entering a step S500, otherwise, entering a step S600;
s500, allowing the new terminal to access the AP to realize automatic network access;
s600, the new terminal is refused to automatically access the AP.
In this embodiment, the step S200 includes: s210 reads the historical connection information of each terminal currently accessing the AP. Or: s220 reads the historical connection information of each terminal currently accessing the AP and the stored historical terminals historically accessing the AP. That is, the terminal accessing the AP includes a terminal currently accessing the AP or a terminal accessing the AP (a terminal currently and once accessing the AP), and two schemes are included herein:
1. reading historical connection information of each terminal currently accessed to the AP, acquiring correlation values of the new terminal and each terminal currently accessed to the AP according to the historical connection information of the new terminal and the historical connection information of each terminal currently accessed to the AP, comparing the correlation values with a preset threshold value respectively, and allowing the new terminal to be automatically accessed for the first time as long as one correlation value (the correlation value of the new terminal and one of the terminals currently accessed to the AP) is larger than or equal to the preset threshold value without manually inputting a password. For example, if you go to a restaurant for eating with colleagues for the first time without connecting to the restaurant network, then under the condition that your colleagues are connected to the restaurant network, the correlation between your mobile phone and your colleagues can be determined to be high according to the read previous history connection records of your colleagues mobile phone and the read previous connection records of your mobile phone (you and your colleagues are connected to the same network in the company), so that even if you enter the restaurant for the first time, the mobile phone can be automatically connected to the network without inputting passwords.
2. And reading the current historical connection information and the historical connection information of the terminal which is connected with the AP once. And judging whether the new terminal has higher correlation with the currently connected terminal or the terminal connected at one time or not by combining the historical connection information of the new terminal, and if the correlation is higher (higher than or equal to a preset threshold), automatically accessing the network. In the present scheme, on the basis of the previous scheme, historical connection information of a terminal that has been connected to the AP may also be read, but this requires that the read historical connection information of the terminal that has accessed the AP is stored in the AP, for example, after the terminal a connects to the AP, the historical connection information of the terminal a is read and stored, so that even if the terminal disconnects from the AP, the previously read historical connection information of the terminal is stored in the AP. This gives more possibilities for automatic access to the relevant new terminals for later access. Also taking the wireless network of a restaurant as an example, if your colleague has previously gone to the restaurant to eat, the restaurant's network is connected. Then, even if you do not go with your colleague for the first time but you go to the restaurant for eating, the correlation between your mobile phone and your colleague's mobile phone can be judged to be very high according to the historical connection information of your colleague's mobile phone, which is stored before, combined with the historical connection information of your mobile phone, so you are allowed to access the network without inputting a password.
Both schemes can be adopted, and in addition, in view of that historical connection information of the terminal is more and more along with the passage of time, historical connection information in a preset time period can be selected according to requirements, for example, historical connection information in the last two months can be read.
In the above embodiment, the historical connection information includes SSID, BSSID, and connection time information record of the historical connected wireless network.
SSID (service Set identifier) can also be written as ESSID to distinguish different networks, there may be 32 characters at most, the wireless network card can enter different networks if it is Set with different SSIDs, the SSID is usually broadcast by AP, and the SSID in the current area can be seen through the scan function of the XP itself. For security reasons, the SSID may not be broadcast, and the user may manually set the SSID to access the corresponding network. In brief, the SSID is the name of a lan, and only computers with the same SSID name can communicate with each other.
The BSSID refers to the MAC address of the station, (STA) at an access point, (AP) in an infrastructure mode, and the BSS is defined by the IEEE802.11-1999 wlan specification. This area uniquely defines each BSS. In an IBSS, the BSSID is a locally administered IEEE MAC address, generated from an arbitrary encoding of 46 bits. The individual/group bit of the address is set to 0. The universal/local address bit is set to 1. Colloquially, the SSID is the router broadcast address and the BSSID is the router mac address.
And acquiring the correlation degree of the new terminal and the terminal accessed to the AP according to the historical connection information of the new terminal and the terminal accessed to the AP, and judging whether the new terminal is allowed to have the authority of automatically accessing the network or not according to the correlation degree. In the historical connection information, if the new terminal and one of the terminals accessing the AP have accessed the same network, it indicates that the two terminals have correlation, and the degree of correlation can be further determined according to the information such as the MAC address (i.e., BSSID) and the connection time of the access point. For example, you and colleague a often access the company's network, and then through comparison, it can be determined that you and colleague a have a relatively high degree of correlation, so that even if you first apply for access to the network, you can obtain the authority of automatically connecting the network in view of the high degree of correlation between you and colleague, under the condition that you and colleague are currently accessed to the network or you and colleague have ever accessed to the network, which is convenient and fast.
The automatic access method can be also suitable for a future intelligent household wireless device set, and by migrating one device to a new network, other devices can be migrated at the same time because the other devices and the device are in the same intelligent household wireless network before and have high correlation degree, so that the new network can be automatically accessed without independently inputting a network password on each device to connect the new network, and the management of a large number of wireless devices is greatly facilitated.
The embodiment allows the personnel who have certain intimacy with the wireless AP accessed person to share the wireless AP, so that the repeated and complicated password input work can be better saved. The identification of the wireless AP to the access person is realized, and the intelligence of the wireless AP is improved to a great extent.
Another embodiment of the present invention, as shown in fig. 2, comprises:
s100, when a new terminal requests to access the AP for the first time, reading historical connection information of the new terminal;
s200, reading historical connection information of each terminal accessed to the AP;
s310, selecting a terminal related to the new terminal from all terminals accessed to the AP as a target terminal;
s320, determining a correlation value between the new terminal and the target terminal according to the historical connection information of the target terminal and the historical connection information of the new terminal;
s410, judging whether a correlation value larger than or equal to a preset threshold value exists in the correlation values of the new terminal and the target terminal, if so, entering a step S500, otherwise, entering a step S600;
s500, allowing the new terminal to access the AP to realize automatic network access;
s600, refusing the historical connection information of each terminal newly read and accessed to the AP;
in the embodiment of the invention, a terminal related to a new terminal is selected from terminals accessed to an AP (access point) as a target terminal, then the correlation value between the new terminal and each target terminal is determined according to the historical connection information of the target terminal and the new terminal, and then whether the authority of accessing a network is given is judged according to the comparison between the correlation value obtained by determination and a preset threshold value. As in the previous example of a restaurant, if the mobile phone of your colleague is connected to the network of the restaurant or currently connected to the network of the restaurant, and then if you enter the restaurant for the first time, the mobile phone of your colleague is selected from a plurality of terminals accessing the AP as the target terminal, and then the correlation value between your mobile phone and the mobile phone of your colleague is calculated. Of course, the number of the target terminals is not limited, and may be one or more. And the target terminal is selected according to the historical connection record of the new terminal, and then the target terminal is matched with the historical record of the terminal accessed to the AP (currently accessed or accessed) so as to select the target terminal related to the new terminal. The selection threshold of the destination terminal may also be set by itself, for example, the destination terminal has once connected to the same network, or has once connected to the same network for more than a times, or history connection information records the connection records of the same BSSID, that is, the destination terminal has connected to the same router. Of course, more than two identical SSIDs (networks) may be connected in the last two months, for example, the SSIDs connected by the terminal a accessing the AP include: x, Y, Z, M, S, respectively; the SSID read that the new terminal b has connected in the last two months is: y, B, M, D, A, respectively; then, the new terminal b and the terminal a accessing the AP are both connected through the network Y, M, so the terminal a accessing the AP can be set as the target terminal of the new terminal b, and of course, if the terminal c accessing the AP is connected through the network U, Y, D, A, Q, Z in about two months, the terminal c accessing the AP can also be the target terminal of the new terminal b because 3 identical SSIDs (Y, D, A, respectively) are found in match with the new terminal; after the target terminal is selected (if only two target terminals are a and c), determining the correlation value of the new terminal b and the target terminal a according to historical connection information, judging whether the correlation value is larger than or equal to a preset threshold value, if so, allowing the new terminal to access the network, otherwise, calculating the correlation value of the new terminal b and the terminal c, judging whether the correlation value is larger than the preset threshold value, if so, allowing the new terminal to access the network, otherwise, refusing the new terminal b to automatically access the network, and requiring the new terminal b to input a connection password and then verifying the access. Of course, the correlation value between the new terminal b and the target terminal a and the correlation value between the new terminal b and the target terminal c may also be calculated, and then compared with the preset threshold, and the new terminal c may be allowed to access the current network only if the correlation value greater than or equal to the preset threshold exists.
Another embodiment of the present invention, as shown in fig. 3, comprises:
s100, when a new terminal requests to access the AP for the first time, reading historical connection information of the new terminal;
s200, reading historical connection information of each terminal accessed to the AP;
s311, searching whether SSID information with the recording times larger than the preset times exists or not according to SSID records in the historical connection information of the new terminal, if so, entering S312, and otherwise, entering S600;
s312, marking the SSID with the recording times larger than the preset times as a target SSID;
s313, searching whether the information record of the target SSID exists in the historical connection information of each terminal accessed to the AP, if so, entering S314;
s314, selecting the terminal which is recorded with the information record of the target SSID and accesses the AP as a target terminal. (ii) a
S320, determining a correlation value between the new terminal and the target terminal according to the historical connection information of the target terminal and the historical connection information of the new terminal;
s410, judging whether a correlation value larger than or equal to a preset threshold value exists in the correlation values of the new terminal and the target terminal, if so, entering a step S500, otherwise, entering a step S600;
s500, allowing the new terminal to access the AP to realize automatic network access;
s600, the new terminal is refused to automatically access the AP.
On the basis of the above embodiments, the embodiments of the present invention explain in detail the selection of the target terminal. Specifically, for example, if the preset number of times is set to 5, the network with SSID 123 and the network with SSID 456 are searched in the historical connection record of the new terminal, for example, 6 networks with SSID 123 and 8 networks with SSID 456 are found, both the network with SSID 123 and the network with SSID 456 can be used as target SSIDs, then whether a network with SSID 123 is connected or not is found in the historical connection information of the terminal accessing the AP, or whether a network with SSID 456 is connected or not is found, if yes, the terminal connected to the network 123 or the network 456 is selected as the target terminal, then a correlation value between the new terminal and the target terminal is calculated, and then the correlation value is compared with the preset correlation value to determine whether the new terminal has the authority to automatically connect to the network. Preferably, the target SSID and the target terminal may also be obtained by only searching the historical connection record of the preset time period. Or more strictly, selecting the target BSSID of the new terminal by the same method, selecting the target terminal from the terminals accessed to the AP according to the target BSSID, determining the correlation value of the new terminal and each target terminal, and comparing to determine whether to give access authority. If the correlation between the two devices is high, the number of times of connecting the same network is also high, for example, if the company is colleagues, the number of times of connecting the company network is high, and therefore, the network of the company can be used as the target SSID. And then searching a target terminal in the terminals accessed to the AP according to the information, and calculating the correlation degree of the new terminal and the target terminal so as to determine whether to give the new terminal the authority of automatically accessing the network.
Preferably, step S320 of the above embodiment includes: s321, determining a correlation value between the new terminal and the target terminal by adopting a preset correlation algorithm according to the historical connection information of the target terminal and the historical connection information of the new terminal; wherein, the preset correlation algorithm is as follows:
Tm=e-h/12 (2)
wherein, R: the correlation value of the new terminal and the target terminal;
m: the number of the wireless AP of the historical connection of the target terminal is started from 1;
a: the total number of the historical access wireless APs of the target terminal;
tm: the target terminal is historically connected with a time constant of a wireless AP with the number m;
f (m): the value of the coefficient of the wireless AP with the target terminal connection number m is 1 when the BSSID of the historical connection wireless AP accessed by the target terminal and the new terminal is the same; when different, the value is 0;
h: the last connection time between the target terminal and the wireless AP with the number m is the number of months from the current time.
For example, a correlation value between the new terminal x and the target terminal y is calculated, and if the target terminal y has 5 connection records in which BSSIDs of two connections (if items 3 and 5) are present, the new terminal x has been connected. Then the correlation value between the new terminal x and the target terminal y is:
R=[T1f(1)+T2f(2)+T3f(3)+T4f(4)+T5f(5)]/(T1+T2+T3+T4+T5)
and (m) is a coefficient value of the target terminal, which is 1 when BSSIDs of historically connected wireless APs to which the target terminal and the new terminal access are the same; when different, the value is 0; therefore, the method comprises the following steps:
R=(T3+T5)/(T1+T2+T3+T4+T5)
and then, according to the connection time for connecting each AP in the connection record, obtaining the number of months (which can be a decimal number) from the current time, then obtaining the value of each time constant Tm according to a formula (2), and substituting the value into the formula to obtain the correlation value between the terminal x and the target terminal y. And then the judgment is carried out according to the preset correlation value. In the algorithm, the time constant Tm is closely related to the connection time, and the influence is smaller as the connection time between the directory terminal y and the wireless AP (number m) connected in history is longer than the current time. The preset correlation value can be set between 0 and 1 (including itself) according to the requirement, for example, 0.2 (i.e. 20%) is set, and the wireless network cannot be accessed if the calculated correlation value R is less than 0.2.
In this embodiment, according to the historical access records of the wireless terminal devices that are accessed, the access authority of the wireless terminal devices is judged by adopting a correlation calculation method, and through calculation with the wireless terminal devices that have already accessed the wireless AP, the wireless terminal devices with higher correlation can be automatically accessed, and the wireless terminal devices with lower correlation refuse automatic access, and seek access by other methods, so that new people can automatically connect according to intimacy, otherwise access by a password input method is performed.
Another embodiment of the present invention is schematically shown in fig. 4, and the main contents thereof include:
1, a plurality of wireless terminal devices already exist in a wireless network, and the wireless AP reads the stored SSID and BSSID of the historically connected wireless AP from the wireless terminal devices; for the wireless terminal equipment which requests to join for the first time, the SSID and BSSID of the wireless AP which is connected with the wireless terminal equipment in history are read;
and 2, the wireless hotspot AP calculates the SSID and BSSID of the historical connection wireless hotspot of the wireless terminal equipment which requests access for the first time and the information retrieval algorithm of the accessed equipment to obtain a correlation value, namely an R value (Relevance value), and the wireless AP compares the R value obtained by calculation with a preset value to determine the authority of the wireless terminal equipment.
Specifically, the detailed scheme of the embodiment comprises the following steps:
1, if a wireless terminal device requests to access a wireless AP, and the wireless AP does not currently access the wireless terminal device, the wireless terminal device needs to use a form of inputting a password or adopt an automatic connection technology. The wireless terminal equipment starts the authority allowing the wireless AP to acquire the historical connection record of the wireless AP, and the wireless terminal equipment records the SSID and BSSID information of the router which is connected currently. Meanwhile, the wireless AP end acquires SSID and BSSID information of the historical connected wireless AP of the equipment
2, if a wireless terminal device requests to access the wireless AP, the wireless AP end has the wireless terminal device access, at the wireless terminal device end, the wireless terminal device starts the authority of allowing the wireless AP to obtain the historical connection record, and simultaneously the wireless terminal device records the SSID and BSSID information of the router which is connected currently. At the wireless AP end, the SSID and BSSID information of the wireless AP which is in historical connection with the wireless terminal equipment which requests to join the network is obtained, algorithm processing is carried out on the SSID and BSSID information and the SSID and BSSID of the wireless terminal equipment which is in the connection state at the same time, the R value of the wireless AP is obtained, the authority of the wireless AP is output by calling the judgment logic of the R value and the preset value, different R values are obtained by calculating the wireless AP with different accessed wireless terminals until the authority is found to allow access.
And 3, the logic for judging the R value by the wireless AP is carried out by adopting the following method:
a. if: r ≧ MCS (preset value). Then the authority: the addition is allowed.
b. If: r < MCS (preset value). Then the authority: the join is denied.
And searching in the relation table through the MCS function according to the set preset value, and searching the corresponding correlation value. The search table is as shown in Table 1:
preset value
|
Corresponding degree of correlation
|
Remarks for note
|
0.9
|
90%
| Level | 1
|
0.8
|
80%
|
Stage 2
|
0.6
|
60%
|
Grade 3
|
0.4
|
40%
|
4 stage
|
0.2
|
20%
|
Others |
Table 1 relationship correspondence search table
If the predetermined threshold is 0.2, the wireless terminals below 20% request for joining, refuse to join, require other ways such as a key, etc.
4, R value calculation algorithm:
and the R value calculation algorithm adopts an algorithm of adding a repetition rate and a time coefficient. The following were used:
Tm=e-h/12
m: the wireless AP number of the history connection of the target terminal (wireless terminal device having access to the wireless AP for calculating the degree of correlation), the number starting from 1;
tm: connecting a target terminal with a time constant of a wireless AP with the number m;
h: the last connection time between the target terminal and the wireless AP with the number m is the number of months from the current time.
A: the total number of historically accessed wireless APs for the target terminal.
f (m): the target terminal is connected with the coefficient value of the wireless AP with the serial number m, and when the target terminal and the request access terminal are both accessed to the wireless AP with the serial number m and the BSSIDs of the accessed wireless APs are the same, the value is 1; when different, the value is 0.
In the embodiment, an R value calculation algorithm is introduced to the wireless AP end; and at the wireless terminal equipment end, starting a router reader to historically connect SSID and BSSID information of the wireless AP. The workflow path of this embodiment is shown in fig. 5, and includes:
a. the new equipment starts the authority which allows the wireless AP to obtain the historical connection record, approaches the wireless AP network and automatically requests to access the wireless AP network;
b. the wireless AP reads the historical connection BSSID and SSID of the new equipment and adds the BSSID and SSID into a cache;
c. calling a correlation calculation algorithm, and calculating the cached BSSID and SSID of the new equipment and the BSSID and SSID of one connected equipment;
d. the program is called and calculated to obtain an R value, the R value is compared with the MCS retrieval table value of a preset value logically, and if the permission is allowed to be added, the process is ended; if the authority does not allow to join, the correlation operation of the historical connection of the wireless terminal equipment which is joined next is carried out, the steps are repeated until the authority which can allow to join is obtained, the process is ended, otherwise, the process is compared with all the accessed equipment, and the process is ended.
For the first-time connection equipment, if the correlation degree is high, the work of requesting the wireless terminal equipment to access, seeking the password and inputting the password is omitted; for a future intelligent household wireless device set, through the mode of transferring one device, other devices are also transferred at the same time, and management of a large number of wireless devices is facilitated.
The invention also discloses a device for automatically accessing the AP, which can adopt the method for automatically accessing the AP, and the embodiment is shown in FIG. 6, the device comprises: a reading module 10, configured to read historical connection information of a new terminal and historical connection information of terminals accessing the AP when the new terminal first requests to access the AP; an obtaining module 20, configured to obtain a correlation value between the new terminal and each terminal accessing the AP according to the historical connection information of the new terminal read by the reading module 10 and the historical connection information of each terminal accessing the AP; an operation module 30, configured to allow or deny the new terminal to access the AP according to the determination result of the determination processing module 40; the judgment processing module 40 is configured to judge whether a correlation value greater than or equal to a preset threshold exists in the correlation values of the new terminal and each terminal accessing the AP, which are acquired by the acquisition module 20, if yes, control the operation module 30 to allow the new terminal to access the AP, so as to achieve automatic network access, and otherwise, control the operation module 30 to refuse the new terminal to automatically access the AP.
In this embodiment of the apparatus, the terminal accessing the AP may be a terminal currently accessing the AP, and in addition, may be a terminal once connected with the AP. If the terminal is the terminal which is connected with the AP once, before reading, the historical connection information of the terminal needs to be stored or updated after the terminal is connected with the AP each time, so that when a subsequent new terminal is accessed, the historical connection information of the terminal which is currently accessed by the AP and the terminal which is accessed once is read, and the correlation degree between the new terminal and each terminal which is accessed to the AP is determined. And then comparing the correlation value with a preset threshold value to see whether the new terminal is allowed to automatically access.
In another embodiment of the apparatus of the present invention, as shown in fig. 7, on the basis of the above embodiment of the apparatus, the obtaining module 20 includes: a selecting submodule 21, configured to select, from terminals accessing the AP, a terminal related to the new terminal as a target terminal; the algorithm submodule 22 is configured to determine a correlation value between the new terminal and the target terminal according to the historical connection information of the target terminal and the historical connection information of the new terminal; the judgment processing module 40 is further configured to judge whether a correlation value greater than or equal to a preset threshold exists in the correlation values of the new terminal and the target terminal determined by the algorithm sub-module 22, if yes, control the operation module 30 to allow the new terminal to access the AP, so as to achieve automatic network access, and otherwise, control the operation module 30 to reject the new terminal to automatically access the AP.
In the embodiment of the device, the terminal related to the new terminal is selected as the target terminal through the selection submodule, other unrelated terminals are eliminated, the calculation process is reduced, the time is saved, and a user can automatically access the network under the condition of no perception. Specifically, the selection of the target terminal may search, according to SSID information or BSSID information in historical connection information of the new terminal, historical connection information of terminals accessing the AP, to see whether the same SSID or BSSID information exists, and if so, it indicates that the terminal and the new terminal have connected to the same network or accessed to the same router, so that the terminal and the new terminal have a certain correlation and may be selected as the target terminal, and then the correlation between the terminal and the new terminal may be determined by combining specific connection times, connection time, and the like. Because the selection of the target terminal is not limited to one terminal, the correlation values of the new terminal and each target terminal can be calculated, whether at least one correlation value larger than a preset threshold exists or not is judged, if yes, the new terminal is allowed to access the AP, otherwise, the new terminal is refused to access the AP, and meanwhile, the new terminal can also be fed back to the new terminal to require to input a connection password and the like. Of course, the correlation values of each target terminal and the new terminal may be compared after being calculated, if the correlation values are greater than the preset threshold, the correlation values of the following target terminals are not required to be calculated, and the network access is directly allowed, otherwise, the correlation values of the next target terminal and the new terminal are calculated and then compared, if the correlation values are still less than the preset threshold, the preset threshold of the next target terminal and the new terminal is continuously calculated, and the request of the new terminal for accessing the network is rejected until all the target terminals are compared and no correlation values greater than or equal to the preset threshold appear. Preferably, the selected target terminals may be further sorted, the target terminals with higher correlation are arranged in front according to the records in the historical connection information, the correlation value between the target terminal and the new terminal is preferentially calculated, whether the correlation value is greater than or equal to a preset threshold value is judged, if yes, the terminal is allowed to automatically access the network, if not, the correlation value between the next target terminal and the new terminal is calculated, and then comparison is performed, if the correlation value is still less than the preset threshold value, the preset threshold value between the next target terminal and the new terminal is continuously calculated, in this case, if more target terminals are available, only a plurality of target terminals with the top sorting may be calculated according to the requirement, because the most probable correlation value of the target terminals with the top sorting is higher than the preset threshold value, if the correlation values of the target terminals and the new terminal are also less than the preset threshold value, then those target terminals that are ranked further back are ranked due to relevance and need not be calculated.
Preferably, on the basis of the above device embodiment, the algorithm sub-module determines the correlation value between the new terminal and the target terminal by using a preset correlation algorithm according to the historical connection information of the target terminal and the historical connection information of the new terminal; wherein, the preset correlation algorithm is as follows:
Tm=e-h/12 (2)
wherein, R: the correlation value of the new terminal and the target terminal;
m: the number of the wireless AP of the historical connection of the target terminal is started from 1;
a: the total number of the historical access wireless APs of the target terminal;
tm: the target terminal is historically connected with a time constant of a wireless AP with the number m;
f (m): the value of the coefficient of the wireless AP with the target terminal connection number m is 1 when the BSSID of the historical connection wireless AP accessed by the target terminal and the new terminal is the same; when different, the value is 0;
h: the last connection time between the target terminal and the wireless AP with the number m is the number of months from the current time.
The embodiment provides a specific algorithm for calculating the correlation value between the new terminal and a terminal accessing the AP, where the correlation value is closely related to the BSSID of access, the time of access, and the like.
The device embodiment of the invention corresponds to the method embodiment of the invention, and the technical details of the method embodiment of the invention are also applicable to the device embodiment of the invention.
In addition, the invention also discloses a wireless router which comprises the device for automatically accessing the AP, which is disclosed by any embodiment of the invention.
The router obtains the correlation value of the new terminal and the terminal accessed to the router by reading the historical connection information of each terminal accessed to the router and the historical connection information of the new terminal requested to be accessed, and then compares the correlation value with a preset threshold value to see whether the router has the authority of automatic access. The router of the invention can select the target terminal from all the terminals accessed into the router according to the historical connection information of the new terminal, then calculate the correlation value of the new terminal and the target terminal, and further judge whether the router can be automatically accessed into the network. Therefore, the time for calculation and comparison is reduced, the user can realize non-perception access, and the user experience is high.
The router can be suitable for a future intelligent household wireless device set, one device is migrated to a new network where the router is located, and other devices are located in the same intelligent household wireless network before and have high correlation degree, so that the other devices can be migrated simultaneously, a network password does not need to be independently input on each device to connect with the new network, the new network where the router is located can be automatically accessed, and management of a large number of wireless devices is greatly facilitated.
The router embodiment of the present invention may refer to the above device embodiment, and is not described again for reducing repetition.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.