Disclosure of Invention
In view of this, embodiments of the present invention provide an access method for a wireless network and a wireless access node, which can distinguish whether a device to be connected is a temporary device or a fixed device, and meet a user requirement that the temporary device is disconnected from an AP after a preset time or disconnection, and the fixed device is connected to the AP for a long time, thereby reducing manual operations and bringing great convenience to users.
The embodiment of the invention provides an access method of a wireless network, which is applied to a wireless access node, and comprises the following steps: the wireless access node broadcasts a beacon message; the wireless access node receives a request message sent by the device to be connected according to the beacon message, wherein the request message comprises identification information of the device to be connected; the wireless access node searches identification information of the equipment to be connected in the fixed user list and the temporary user list, if the identification information of the equipment to be connected is found in the fixed user list, the equipment to be connected is determined to be the fixed equipment, if the identification information of the equipment to be connected is found in the temporary user list, the equipment to be connected is determined to be the temporary equipment, if the identification information of the equipment to be connected is not found in the fixed user list and the temporary user list, the equipment to be connected is determined to be the untrusted equipment, wherein the identification information of the connecting equipment with long-term effective trust state is recorded in the fixed user list, and the identification information of the connecting equipment with failure after the trust state exceeds preset time or the connection is disconnected is recorded in the temporary user list.
Optionally, after the wireless access node determines that the device to be connected is a fixed device, the method further includes: the wireless access node sends access information to the first connected device, wherein the access information comprises identification information of the wireless access node and a fixed connection password, so that the first connected device generates a two-dimensional code graph according to the identification information of the wireless access node and the fixed connection password and displays the two-dimensional code graph in a display of the first connected device, the device to be connected obtains the identification information of the wireless access node and the fixed connection password by scanning the two-dimensional code image, and the wireless access node is accessed according to the identification information of the wireless access node and the fixed connection password.
Optionally, after the wireless access node determines that the device to be connected is a temporary device, the method further includes: the wireless access node sends access information to the first connected device, wherein the access information comprises identification information of the wireless access node and a temporary connection password, so that the first connected device generates a two-dimensional code graph according to the identification information of the wireless access node and the temporary connection password and displays the two-dimensional code graph in a display of the first connected device, the device to be connected is made to obtain the identification information of the wireless access node and the temporary connection password by scanning the two-dimensional code image, and the wireless access node is accessed according to the identification information of the wireless access node and the temporary connection password.
Optionally, the method further comprises: and when the wireless access node detects that the equipment to be connected stops accessing the wireless access node or accesses the wireless access node for more than preset time, the wireless access node disables the temporary connection password.
Optionally, after the wireless access node determines that the device to be connected is an untrusted device, the method further includes: the wireless access node sends information to second connected equipment, wherein the information comprises identification information of equipment to be accessed, so that the second connected equipment requests a user to select the equipment to be connected as fixed equipment or temporary equipment, receives a selection result input by the user, and sends selection information comprising the selection result to the wireless access node; and the wireless access node receives the selection information, adds the identification information of the equipment to be connected into the fixed equipment list when the selection result is that the equipment to be connected is selected as the fixed equipment, and adds the identification information of the equipment to be connected into the temporary equipment list when the selection result is that the equipment to be connected is selected as the temporary equipment.
An embodiment of the present invention provides a wireless access node, including: a sending module for broadcasting a beacon message; the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a request message sent by the device to be connected according to the beacon message, and the request message comprises identification information of the device to be connected; the storage module is used for storing a fixed user list and a temporary user list, wherein the fixed user list records identification information of the connecting equipment with a long-term effective trust state, and the temporary user list records identification information of the connecting equipment with a trust state exceeding a preset time or losing effectiveness after disconnection; the device to be connected is determined to be a fixed device if the identification information of the device to be connected is found in the fixed user list, is determined to be a temporary device if the identification information of the device to be connected is found in the temporary user list, and is determined to be a non-trusted device if the identification information of the device to be connected is not found in both the fixed user list and the temporary user list.
Optionally, the sending module is further configured to send access information to the first connected device, where the access information includes identification information of the wireless access node and a fixed connection password, so that the first connected device generates a two-dimensional code graph according to the identification information of the wireless access node and the fixed connection password and displays the two-dimensional code graph in a display of the first connected device, and further, the device to be connected obtains the identification information of the wireless access node and the fixed connection password by scanning the two-dimensional code image, and accesses the wireless access node according to the identification information of the wireless access node and the fixed connection password.
Optionally, the sending module is further configured to send access information to the first connected device, where the access information includes identification information of the wireless access node and a temporary connection password, so that the first connected device generates a two-dimensional code graph according to the identification information of the wireless access node and the temporary connection password and displays the two-dimensional code graph in a display of the first connected device, and further, the device to be connected obtains the identification information of the wireless access node and the temporary connection password by scanning the two-dimensional code image, and accesses the wireless access node according to the identification information of the wireless access node and the temporary connection password.
Optionally, the wireless access node further includes a detection module, where the detection module is configured to detect whether the device to be connected stops accessing the wireless access node or whether the device to be connected accesses the wireless access node for more than a predetermined time, and if so, disable the temporary connection password.
Optionally, the sending module is further configured to send device information to a second connected device, where the device information includes identification information of a device to be accessed, so that the second connected device requests a user to select the device to be connected as a fixed device or the temporary device, receives a selection result input by the user, and sends selection information including the selection result to the wireless access node; the receiving module is further configured to receive the selection information, add the identification information of the device to be connected to the fixed device list when the selection result is that the device to be connected is selected as the fixed device, and add the identification information of the device to be connected to the temporary device list when the selection result is that the device to be connected is selected as the temporary device.
In the wireless network access method and the wireless access node of the embodiment of the invention, the fixed user list, the temporary user list and the corresponding identification information are preset in the AP, and the identification information of the device to be connected is compared with the preset identification information, so that whether the device to be connected is the temporary device, the fixed device or the non-trusted device is distinguished. The invention can meet the user requirements that the temporary equipment is disconnected with the AP after exceeding the preset time or the disconnection and the fixed equipment is connected with the AP for a long time, reduces the complicated manual operation and brings great convenience to the user.
Detailed Description
The embodiment of the invention provides an access method of a wireless network shown in fig. 1, so that a temporary device is disconnected from an AP after a preset time or disconnection is exceeded, and a fixed device can be connected with the AP for a long time and access to the wireless network such as Wi-Fi. In order to achieve the beneficial effect, the method comprises two stages, wherein the first stage is used for judging the type of the current equipment to be connected, namely judging whether the current equipment to be connected is temporary equipment or fixed equipment or non-trusted equipment, and the second stage is used for carrying out corresponding connection according to the judgment result.
The core of the method is a first phase, as shown in fig. 1, comprising:
s11: the wireless access node broadcasts beacon information.
The AP may send out beacon messages, i.e., beacon messages, in Wi-Fi wireless networks or the like at a preset frequency at a preset time interval (e.g., 100 milliseconds) to inform devices to be connected in the surrounding environment that there is an accessible wireless network.
S12: and the wireless access node receives a request message sent by the device to be connected according to the beacon message, wherein the request message comprises the identification information of the device to be connected.
The device to be connected sends a request message according to the beacon message, where the request message includes Identification information of the device to be connected, where the Identification information may be a BSSID (Basic Service Set Identifier) code, a security key PIN (Personal Identification Number) code used to generate an encrypted message, or other identity information that may identify the device to be connected, such as a Media Access Control (MAC) address of the device to be connected, a user-readable device name, and the like.
S13: the wireless access node searches the identification information of the equipment to be connected in the fixed user list and the temporary user list, if the identification information of the equipment to be connected is found in the fixed user list, the equipment to be connected is determined to be the fixed equipment, if the identification information of the equipment to be connected is found in the temporary user list, the equipment to be connected is determined to be the temporary equipment, and if the identification information of the equipment to be connected is not found in the fixed user list and the temporary user list, the equipment to be connected is determined to be the untrusted equipment.
The fixed user list records identification information of the connection equipment with a long-term effective trust state, and the temporary user list records identification information of the connection equipment with a trust state which is invalid after a preset time is exceeded or the connection is disconnected.
The following clearly and completely describes the technical solutions of the embodiments of the fixed device, the temporary device, and the untrusted device, respectively, in combination with the determination result of the type of the device to be connected.
Referring to fig. 2 and 3, for the case that the AP determines that the device to be connected is a fixed device, the first phase of the access method of the embodiment of the present invention includes the following steps S21 to S23, and the second phase includes the following steps S24 to S26:
s21: the wireless access node broadcasts a beacon message.
S22: and the wireless access node receives a request message sent by the device to be connected according to the beacon message, wherein the request message comprises the identification information of the device to be connected.
S23: and the wireless access node finds the identification information of the equipment to be connected in the fixed user list, and then determines that the equipment to be connected is fixed equipment.
S24: and the wireless access node sends access information to the connected equipment, wherein the access information comprises the identification information of the wireless access node and the fixed connection password.
The fixed connection password is a long-term effective password and is used for indicating that the device to be connected can establish connection with the AP for a long time and access the wireless network for a long time according to the password.
S25: and the connected equipment generates a two-dimensional code graph according to the identification information of the wireless access node and the fixed connection password in the access information and displays the two-dimensional code graph on a display of the connected equipment.
S26: and the equipment to be connected acquires the identification information and the fixed connection password of the wireless access node by scanning the two-dimensional code image, and accesses the wireless access node according to the identification information and the fixed connection password of the wireless access node.
In the process of accessing the AP, as shown in fig. 3, the device to be connected sends a request authorization including the identification information of the wireless access node and the fixed connection password to the AP, the AP establishes a connection with the device to be connected after passing the authentication, and the device to be connected accesses the wireless network.
Referring to fig. 4 and 5, for the case that the AP determines that the device to be connected is a temporary device, the first phase of the access method according to the embodiment of the present invention includes the following steps S41 to S43, and the second phase includes the following steps S44 to S46 or includes steps S44 to S47:
s41: the wireless access node broadcasts a beacon message.
S42: and the wireless access node receives a request message sent by the device to be connected according to the beacon message, wherein the request message comprises the identification information of the device to be connected.
S43: and the wireless access node finds the identification information of the equipment to be connected in the temporary user list, and then determines that the equipment to be connected is temporary equipment.
S44: and the wireless access node sends access information to the connected equipment, wherein the access information comprises the identification information of the wireless access node and the temporary connection password.
The temporary connection password is a short-term effective password and is used for indicating that the device to be connected can establish connection with the AP within preset time and access the wireless network within the preset time according to the password, or the device to be connected can not establish connection with the AP again after establishing connection and disconnecting with the AP for the first time according to the password and cannot access the wireless network.
S45: and the connected equipment generates a two-dimensional code graph according to the identification information of the wireless access node and the temporary connection password and displays the two-dimensional code graph on a display of the connected equipment.
S46: and the equipment to be connected acquires the identification information and the temporary connection password of the wireless access node by scanning the two-dimensional code image, and accesses the wireless access node according to the identification information and the temporary connection password of the wireless access node.
In the process of accessing the AP, as shown in fig. 5, the device to be connected sends a request authorization including the identification information of the wireless access node and the temporary connection password to the AP, the AP establishes connection with the device to be connected after authentication, and the device to be connected accesses the wireless network.
Based on the function of the temporary connection password set forth in the foregoing step S44, after accessing the wireless network, the method of the embodiment of the present invention may further include step S47: and when the wireless access node detects that the equipment to be connected stops accessing the wireless access node or accesses the wireless access node for more than preset time, the wireless access node disables the temporary connection password.
For an application scenario in which a device to be connected is an untrusted device, that is, after the AP determines that the device to be connected is the untrusted device, the device to be connected may be used as a fixed device or a temporary device according to a selection result of a user, where the selection result of the user may be generated by sending of a connected device in the embodiments described in fig. 1, fig. 2, and fig. 4, or may be generated by another device, and the another device does not have to establish a connection with the AP, that is, does not have to access a wireless network, as shown in fig. 6 and fig. 7, a second stage of the access method in the embodiment of the present invention includes the following steps:
s61: the wireless access node broadcasts a beacon message.
S62: and the wireless access node receives a request message sent by the device to be connected according to the beacon message, wherein the request message comprises the identification information of the device to be connected.
S63: and if the wireless access node cannot find the identification information of the equipment to be connected in the fixed user list and the temporary user list, determining that the equipment to be connected is the non-trusted equipment.
S64: and the wireless access node sends information to the connected equipment, wherein the information comprises identification information of the equipment to be accessed.
S65: the connected device identification information requests a user to select a device to be connected as a fixed device or a temporary device, receives a selection result input by the user, and sends selection information including the selection result to the wireless access node.
Specifically, the connected device may display a piece of information through a screen to ask the user to select the device to be currently accessed as the fixed device or the temporary device. Further, the user may be prompted to make a selection by means of a sound, flashing lights, etc.
S66: and the wireless access node receives the selection information, adds the identification information of the equipment to be connected into the fixed equipment list when the selection result is that the equipment to be connected is selected as the fixed equipment, and adds the identification information of the equipment to be connected into the temporary equipment list when the selection result is that the equipment to be connected is selected as the temporary equipment.
The same steps as in the embodiments of fig. 2 and 4 are then performed correspondingly. It should be noted that the connected device in the step performed after step S66 corresponds to the first connected device, and the connected device in the previous step corresponds to the second connected device. Preferably, the first connected device may be a smart tv and the second connected device may be a smartphone used by the owner of the wireless access node.
Of course, the embodiment of the present invention may also directly deny the access of the device to be connected after the wireless access node determines that the device to be connected is an untrusted device.
Fig. 8 is a schematic block diagram of a wireless access node according to an embodiment of the present invention. As shown in fig. 8, the wireless access node (AP)81 includes:
atransmitting module 811 for broadcasting the beacon message.
A receivingmodule 812, configured to receive a request message sent by the device to be connected 82 according to the beacon message, where the request message includes identification information of the device to be connected 82.
The determiningmodule 813 is configured to search for identification information of the device 82 to be connected in a fixed user list and a temporary user list, where the fixed user list and the temporary user list may be stored in thestorage module 814 of the fixed user list and the temporary user list, where the fixed user list records identification information of the connection device 82 whose trust status is valid for a long time, and the temporary user list records identification information of a connection device whose trust status is invalid after exceeding a preset time or being disconnected.
If the identification information of the device to be connected 82 is found in the fixed user list, the determiningmodule 813 determines that the device to be connected 82 is a fixed device; if the identification information of the device to be connected 82 is found in the temporary user list, the determiningmodule 813 determines that the device to be connected 82 is a temporary device; if the identification information of the device to be connected 82 cannot be found in both the fixed user list and the temporary user list, the determiningmodule 813 determines that the device to be connected 82 is an untrusted device.
In the case where thedetermination block 813 determines that the device to be connected 82 is a fixed device,
the sendingmodule 811 is further configured to send access information to the connected device 83, where the access information includes identification information of the wireless access node and a fixed connection password, so that the connected device 83 generates a two-dimensional code graph according to the identification information of thewireless access node 81 and the fixed connection password and displays the two-dimensional code graph on a display of the connected device, and further, the device to be connected 82 obtains the identification information and the fixed connection password of thewireless access node 81 by scanning the two-dimensional code image and accesses thewireless access node 81 according to the identification information of thewireless access node 81 and the fixed connection password.
In the case where thedetermination block 813 determines that the device to be connected 82 is a temporary device,
the sendingmodule 811 is further configured to send access information to the connected device 83, where the access information includes the identification information of thewireless access node 81 and the temporary connection password, so that the connected device 83 generates a two-dimensional code graph according to the identification information of thewireless access node 81 and the temporary connection password and displays the two-dimensional code graph on a display of the connected device, and further, the device to be connected 82 obtains the identification information and the temporary connection password of thewireless access node 81 by scanning the two-dimensional code image and accesses thewireless access node 81 according to the identification information of thewireless access node 81 and the temporary connection password.
The temporary connection password is a short-term valid password, and is used to indicate that the device to be connected 82 can establish a connection with the AP within a predetermined time and access the wireless network within the predetermined time by using the password, or the device to be connected cannot establish a connection with the AP again after establishing and disconnecting the connection with the AP for the first time by using the password and cannot access the wireless network. Based on this, after accessing the wireless network, thedetection module 815 of thewireless access node 81 is configured to detect whether the to-be-connected device 82 has stopped accessing thewireless access node 81 or whether it has accessed thewireless access node 81 for more than a predetermined time, and if so, disable the temporary connection password.
For the case that the determiningmodule 813 determines that the device 82 to be connected is an untrusted device, the device 82 to be connected may be used as a fixed device or a temporary device according to a selection result of the user, where the selection result of the user may be generated by sending the connected device 83 or by generating the other device 84, and the other device 84 does not have to establish a connection with the AP, i.e., does not have to access the wireless network, if the other device 84 accesses the wireless network, the other device 84 is equivalent to a second connected device (described below with the connected device 84), and correspondingly, the connected device 83 is equivalent to a first connected device.
In this embodiment, the sendingmodule 811 is further configured to send information to the connected device 84, where the information includes identification information of the device to be connected 82, so that the connected device 84 requests the user to select the device to be connected 82 as a fixed device or the temporary device, receives a selection result input by the user, and sends selection information including the selection result to thewireless access node 81.
The receivingmodule 812 of thewireless access node 81 is further configured to receive the selection information, add the identification information of the device to be connected 82 to the fixed device list when the selection result is that the device to be connected 82 is selected as the fixed device, and add the identification information of the device to be connected 82 to the temporary device list when the selection result is that the device to be connected 82 is selected as the temporary device.
The above-described structure of the modules of theradio access node 81 correspondingly performs the access method described in the above embodiments, and has the same technical effect.
It should be understood that the above-described embodiment of thewireless access node 81 is merely illustrative, and the division of the modules is only one logical functional division, and that in actual implementation, there may be other divisions, for example, two modules may be integrated into another system, or some features may be omitted, or not implemented. In addition, the modules may be connected to each other through some interfaces, and may be in an electrical or other form. The above modules, which are used as the components of thewireless access node 81, may or may not be physical blocks, may be located in one place, or may be distributed on multiple network units, and may be implemented in the form of software function blocks or hardware.
For example, as shown in fig. 9, an embodiment of the present invention provides a hardware configuration diagram of awireless access node 81. May include at least one processor (e.g., CPU), at least one network interface or other communication interface, memory, and at least one communication bus for enabling communications among the devices. The processor is used to execute executable modules, such as computer programs, stored in the memory. The Memory may comprise a Random Access Memory (RAM) and may also include a non-volatile Memory, such as at least one disk Memory. The communication connection between the system gateway and at least one other network element is realized through at least one network interface (which can be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network and the like can be used.
The memory stores program instructions, and the program instructions may be executed by the processor, where the program instructions may include each unit indicated in the above embodiments of the present invention, and specific implementation manners of each unit may refer to corresponding contents in the above embodiments of the present invention, and are not described herein again.
The device described in this embodiment includes a device to be accessed and an accessed device (83, 84), and may be any terminal having a display function, such as a mobile phone, a PDA (Personal Digital Assistant or tablet computer), a portable communication device, or wearable devices such as a smart band, and wearable devices embedded in clothing accessories such as clothes and jewelry.
In addition, if the above functions of this embodiment are implemented in the form of software functional units and sold or used as a stand-alone product, the functions may be stored in a computer readable storage medium, that is, the embodiments of the present invention may be embodied in the form of a software product, which includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
On the basis of the above, the above mentioned embodiments are only examples of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent flow transformations made by using the contents of the present specification and the drawings, such as the combination of technical features between the embodiments, or the direct or indirect application to other related technical fields, are included in the scope of the present invention.