Abstract:
Disclosed in the present invention are a wireless network access method and an apparatus, and the method includes: obtaining the identification information of a client to be accessed; according to the identification information, querying a communication terminal having a binding relationship with the identification information; generating a matching verification code; transmitting the matching verification code to the communication terminal; receiving a return verification code transmitted from the client to be accessed; and according to the matching verification code and the return verification code, allowing or refusing the access of the client to be accessed. Meanwhile, the present invention also discloses a computer storage medium.

Description:
TECHNICAL FIELD 
       [0001]    The present disclosure relates to wireless access in the field of communication, and in particular to a method and device for wireless network access, a station (STA), and a computer-readable storage medium. 
       BACKGROUND 
       [0002]    A Wireless Local Area Network (WLAN) has become an essential part of daily work and life. With a WLAN, people may check mail, chat on WeChat, browse Weibo, watch a video, browse news, etc. anytime anywhere, such as at home, on the way to work, in office, and the like. 
         [0003]    While greatly facilitating daily work and life, a WLAN is subject to greater risk of being hacked compared with a wired network, due to openness of a WLAN channel. Therefore, security issue has been a major factor hindering development of WLAN. 
         [0004]    To secure a WLAN, Institute of Electrical and Electronics Engineers (IEEE) has proposed various technologies for wireless network encryption, such as that for filtering a Media Access Control (MAC) address. 
         [0005]    By MAC address filtering, it is verified whether a MAC address of a client station (STA) is legal. A STA with a legal MAC address is deemed as a legal STA. A legal STA is allowed to access a network. Network access by an illegal STA is refused. 
         [0006]    However, in a specific application, a legal MAC address may be stolen by intercepting a wireless frame between an Access Point (AP) and equipment with a legal MAC address using MAC address changing software such as MacChanger. Illegal equipment may then access a wireless network and steal a network resource by tampering a MAC address thereof with the stolen legal MAC address. 
         [0007]    It thus may be seen that although security in wireless network resource utilization may be enhanced and network resource theft may be prevented to some extent by verifying a MAC address, there is still a serious issue of security and theft of bandwidth resources of a wireless network. 
       SUMMARY 
       [0008]    In view of this, embodiments herein provide a method and device for wireless network access, a STA, and a computer-readable storage medium, capable of reducing probability of illegal access and improving security in wireless network access. 
         [0009]    To this end, a technical solution herein may be implemented as follows. 
         [0010]    According to a first aspect herein, a method for wireless network access includes: 
         [0011]    acquiring identification information of a station (STA) requesting access; 
         [0012]    searching, according to the identification information, for a communication terminal corresponding to the identification information; 
         [0013]    generating a verification code, and sending the verification code to the communication terminal; 
         [0014]    receiving a returned code returned by the STA; and 
         [0015]    granting or rejecting, according to the verification code and the returned code, access by the STA. 
         [0016]    The searching, according to the identification information, for a communication terminal corresponding to the identification information may include: 
         [0017]    determining, according to the identification information, whether the STA is a legal STA; and 
         [0018]    in response to determining that the STA is a legal STA, searching, according to the identification information, for the communication terminal corresponding to the identification information. 
         [0019]    The acquiring the identification information of the STA may include: 
         [0020]    receiving a probe frame sent by the STA; and 
         [0021]    extracting the identification information contained in the probe frame. 
         [0022]    The determining, according to the identification information, whether the STA is a legal STA may include: 
         [0023]    after receiving the probe frame, determining whether the identification information matches legal identification information; 
         [0024]    in response to determining that the identification information matches the legal identification information, determining that the STA is legal; 
         [0025]    in response to determining that the identification information matches no legal identification information, determining that the STA is illegal. 
         [0026]    The granting or rejecting, according to the verification code and the returned code, access by the STA may include: 
         [0027]    determining whether the returned code matches the verification code; 
         [0028]    in response to determining that the returned code matches the verification code, granting access by the STA. 
         [0029]    The granting or rejecting, according to the verification code and the returned code, access by the STA may further include: 
         [0030]    in response to determining that the returned code does not match the verification code, rejecting access by the STA. 
         [0031]    The granting or rejecting, according to the verification code and the returned code, access by the STA may include: 
         [0032]    determining whether the returned code matches a verification code; and 
         [0033]    in response to determining that the returned code matches at least one verification code, granting access by the STA. 
         [0034]    The granting or rejecting, according to the verification code and the returned code, access by the STA may further include: 
         [0035]    in response to determining that the returned matches no verification code sent to any of the communication terminal, rejecting access by the STA. 
         [0036]    The method may further include: 
         [0037]    after sending the verification code to the communication terminal, starting a timer. The verification code may expire when a specified period of time expires. 
         [0038]    The granting or rejecting, according to the verification code and the returned code, access by the STA may include: 
         [0039]    determining whether the verification code has expired; 
         [0040]    in response to determining that the verification code is unexpired and that the returned code matches the verification code, granting access by the STA; otherwise in response to determining that the verification code has expired and/or that the returned code fails to match the verification code, rejecting access by the STA. 
         [0041]    The sending the verification code to the communication terminal may include: 
         [0042]    sending the communication terminal a short message containing the verification code. 
         [0043]    According to a second aspect herein, a method for wireless network access includes: 
         [0044]    sending, by a station (STA), identification information to a device for wireless network access; 
         [0045]    acquiring, by the STA, a verification code generated by the device for wireless network access and sent by a communication terminal corresponding to the identification information; and 
         [0046]    returning, by the STA, the verification code to the device for wireless network access as a returned code. 
         [0047]    The device for wireless network access grants or rejects access by the STA according to the returned code. 
         [0048]    According to a third aspect herein, a device for wireless network access includes: 
         [0049]    a first acquiring unit arranged for: acquiring identification information of a station (STA) requesting access; 
         [0050]    a searching unit arranged for: searching, according to the identification information, for a communication terminal corresponding to the identification information; 
         [0051]    a generating unit arranged for: generating a verification code; 
         [0052]    a first sending unit arranged for: sending the verification code to the communication terminal; 
         [0053]    a receiving unit arranged for: receiving a returned code returned by the STA; and 
         [0054]    an accessing unit arranged for: granting or rejecting, according to the verification code and the returned code, access by the STA. 
         [0055]    The searching unit may include: 
         [0056]    a determining module arranged for: determining, according to the identification information, whether the STA is a legal STA; and 
         [0057]    a searching module arranged for: in response to determining that the STA is a legal STA, searching, according to the identification information, for the communication terminal corresponding to the identification information. 
         [0058]    The accessing unit may include: 
         [0059]    a first matching module arranged for: determining whether the returned code matches the verification code; and 
         [0060]    a first accessing module arranged for: in response to determining that the returned code matches the verification code, granting access by the STA. 
         [0061]    The first accessing module may be further arranged for: in response to determining that the returned code does not match the verification code, rejecting access by the STA. 
         [0062]    The accessing unit may include: 
         [0063]    a second matching module arranged for: determining whether the returned code matches a verification code; and 
         [0064]    a second accessing module arranged for: in response to determining that the returned code matches at least one verification code, granting access by the STA. 
         [0065]    The second accessing module may be further arranged for: in response to determining that the returned matches no verification code sent to any of the communication terminal, rejecting access by the STA. 
         [0066]    The first sending unit may be arranged for: sending the communication terminal a short message containing the verification code. 
         [0067]    According to a fourth aspect herein, a station (STA) includes: 
         [0068]    a second sending unit arranged for: sending identification information to a device for wireless network access; and 
         [0069]    a second acquiring unit arranged for: acquiring a verification code generated by the device for wireless network access and sent by a communication terminal corresponding to the identification information. 
         [0070]    The second sending unit is further arranged for: returning the verification code to the device for wireless network access as a returned code. 
         [0071]    The device for wireless network access grants or rejects access by the STA according to the returned code. 
         [0072]    According to a fifth aspect herein, a computer-readable storage medium stores therein computer-executable instructions for executing at least one aforementioned method. 
         [0073]    With a method and device for wireless network access, a STA, and a computer-readable storage medium according to at least one embodiment herein, a verification code is generated and sent. An illegal user cannot acquire the verification code through a communication terminal having a binding relationship with a legal STA, and therefore cannot access a corresponding device for wireless network access. It is difficult for the illegal user trying to access a network illegally to get a hold of the communication terminal of a legal user, thereby increasing difficulty in illegal access, reducing probability of illegal access, enhancing security in wireless network access. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0074]      FIG. 1  is a flowchart of a method for wireless network access according to an embodiment herein. 
           [0075]      FIG. 2  is a flowchart of a method for wireless network access according to an embodiment herein. 
           [0076]      FIG. 3  is a diagram of a structure of a device for wireless network access according to an embodiment herein. 
           [0077]      FIG. 4  is a diagram of a structure of a device for wireless network access according to an embodiment herein. 
           [0078]      FIG. 5  is a flowchart of a method for wireless network access according to an embodiment herein. 
           [0079]      FIG. 6  is a diagram of a structure of a STA according to an embodiment herein. 
           [0080]      FIG. 7  is a diagram of a structure of a device for wireless network access according to an example herein. 
           [0081]      FIG. 8  is a flowchart of a wireless access method according to an example herein. 
           [0082]      FIG. 9  is a flowchart of a wireless access method according to an example herein. 
       
    
    
     DETAILED DESCRIPTION 
       [0083]    A technical solution herein may be elaborated below with reference to accompanying drawings and embodiments. Note that embodiments described below are but for illustrating the present disclosure and not intended to limit the present disclosure. 
       Method Embodiment 1 
       [0084]    As shown in  FIG. 1 , a method for wireless network access according to an embodiment herein includes steps as follows. 
         [0085]    In step S 110 , identification information of a STA requesting access is acquired. 
         [0086]    In step S 120 , a communication terminal corresponding to the identification information is searched for according to the identification information. 
         [0087]    In step S 130 , a verification code is generated. 
         [0088]    In step S 140 , the verification code is sent to the communication terminal. 
         [0089]    In step S 150 , a returned code returned by the STA is received. 
         [0090]    In step S 160 , access by the STA is granted or rejected according to the verification code and the returned code. 
         [0091]    The identification information may be an identifier such as a MAC address. The identification information may be contained in a header of a data packet. The identification information may also be information such as a nickname of the STA. 
         [0092]    The identification information may be acquired from a probe frame sent to wireless hotspot equipment AP by the STA. The identification information may also be sent to the AP by dedicated signaling. 
         [0093]    The verification code may be a character string, such as a verification identifier serving for a verification function, formed by numbers, letters and/or various symbols. The verification code in step S 130  may be generated dynamically and randomly. Different communication terminals may receive different verification codes at the same time. 
         [0094]    A tablet of user A may wish to access a wireless AP1. If the tablet is a legal STA, a verification code will be sent to a communication terminal, such as a mobile phone A, bound with a MAC address corresponding to the tablet. The tablet may receive a returned code input by the user, and send the returned code to the AP1. If the user has learned the returned code from the mobile phone A, then the returned code will be the same as the verification code. This will lead to a successful verification. Otherwise the returned code may not match the verification code and the verification may fail. 
         [0095]    A mobile phone of a user B attempting to access the AP1 may steal the identification information of the tablet, such as the MAC address. However, the mobile phone A of the user A is unavailable to the user B. Therefore, the user B cannot learn the verification code, nor can user B perform subsequent verification. Thus, even if the legal MAC address of the tablet has been stolen by another user, the other user will not be able to access the AP1. Accordingly, illegal access, i.e., access by an illegal STA, may be intercepted successfully. 
         [0096]    It may be seen that compared with existing solution of verification by a MAC address, the method herein may stop login of an illegal STA by sending and verifying a verification code, thereby increasing probability of blocking illegal access, enhancing security in wireless network resource utilization. 
         [0097]    In step S 160 , granting access by the STA may be understood as allowing the STA to exchange data, such as to initiate a data service, with other equipment using network bandwidth resources of the AP; rejecting access by the STA may be understood as rejecting use of the network bandwidth resources of the AP by the STA to exchange data, such as to initiate a data service, with other equipment. 
         [0098]    The step S 120  may include steps as follows. 
         [0099]    It may be determined, according to the identification information, whether the STA is a legal STA. 
         [0100]    When the STA is a legal STA, the communication terminal bound with the identification information may be searched for according to the identification information. 
         [0101]    Only the identification information of a legal STA may be recorded in the AP as being bound with a communication terminal. 
         [0102]    In step S 120 , before searching for the communication terminal, it may first be determined whether the STA is a legal STA that is authorized to access the AP. This is advantageous compared to direct search, which may lead to a situation where a result that no communication terminal is found is returned only after the AP has searched a large amount of data. In this way, it is possible to reject illegal access identifiable based on identification information thereof, thereby reducing workload as well as power consumption of the AP. 
         [0103]    A binding relationship between the identification information (such as the MAC address) of a legal STA and a communication terminal may be pre-stored in the AP or a storage medium that the AP may access in real time. 
         [0104]    The binding relationship may be in form of a mapping table. Identification information, such as a legal MAC address, and a communication identifier of a communication terminal may be recorded in the mapping table. The communication identifier may be a phone number or a number of a cell phone. The communication identifier may also be an identifier, such as a WeChat ID, a Fetion ID, etc., of a communication application that runs on the communication terminal. 
         [0105]    An illegal STA may acquire the identification information of a legal STA by intercepting communication between the AP and the legal STA or by some other illegal means. However, it is difficult for an illegal user to get a hold of a communication terminal corresponding to the legal STA. Having sent a verification code to the communication terminal bound with the identification information, the AP may wait for a returned code returned by the STA requesting access. If the returned code matches the verification code, the STA requesting access may be deemed to have acquired the verification code from the communication terminal, and be a legal STA. 
         [0106]    A client station (STA) may position itself by scanning a beacon frame sent by the AP, access the AP, and may access a wireless network through the AP. To access the wireless network, the STA may send a probe frame to the AP. Identification information such as a MAC address may be contained in the probe frame and sent. Therefore, step S 110  may include that: the AP receives the probe frame, and extracts the identification information contained in the probe frame. 
         [0107]    After extracting the identification information, the AP may determine whether the STA is legal based on the identification information. 
         [0108]    During wireless access by a STA, the AP may have to send a probe response frame to the STA. According to an IEEE communication protocol, authentication and association between the STA and the AP may have to be performed before a wireless connection between the STA and the AP can be established. Step S 120  may be performed any time before the AP grant access of the STA. However, in order to determine whether the STA requesting access is a legal STA as soon as possible, and reduce useless operation and operating load of the AP, the determination of whether the requesting STA is legal in S 120  may be performed before the AP sends the probe response frame. After the requesting STA is determined to be legal, the probe response frame may be sent to the STA requesting access. This may save useless operations such as the discovery, authentication, and association between the STA and the AP executed via information exchange before the STA is found to be of an illegal user. 
         [0109]    It may be determined whether a STA requesting access is legal based on a MAC address of any legal STA stored in the AP or a storage medium that the AP may access anytime. In view of this, step S 120  may include steps as follows. 
         [0110]    After the probe frame is received, it may be determined whether the identification information of the STA requesting access matches legal identification information. For example, it may be determined whether the MAC address of the STA requesting access matches a legal MAC address. 
         [0111]    When the identification information matches the legal identification information, it may be determined that the STA is legal. 
         [0112]    When the identification information matches no legal identification information, it may be determined that the STA is of an illegal user. 
         [0113]    It has been further illustrated, based on the technical solution previously described, how to determine whether a STA requesting access is a legal STA, implementation of which is simple and fast. 
         [0114]    Step S 160  may be implemented in at least two modes as follows. 
         [0115]    In Mode 1, step S 160  may include steps as follows. 
         [0116]    Access by a STA may be granted or rejected according to a verification code and a returned code as follows. 
         [0117]    It may be determined whether the returned code matches a verification code. 
         [0118]    When the returned code matches at least one verification code, access by the STA may be granted. 
         [0119]    Step S 160  may also include a step as follows. 
         [0120]    When the returned matches no verification code sent to any of the communication terminal, access by the STA may be rejected. 
         [0121]    The AP may generate a verification code for each STA requesting access. Access by a STA requesting access may be granted only when a returned code returned by the STA matches a verification code sent to a communication terminal corresponding to the STA. 
         [0122]    With Mode 1, in case both STA1 and STA2 are legal STAs, assume that a communication terminal bound with the MAC address of the STA1 has received a verification code 01101, and a communication terminal bound with the MAC address of the STA2 has received a verification code 01034. In executing step S 160  by the AP, the STA1 is allowed to access the AP only when the STA1 returns a returned code 01101 to the AP. If the STA1 returns a returned code 01034 to the AP, the STA2 will not be allowed to access the AP even though 01034 is one of the verification codes sent by the AP, as the verification code 01034 has been sent to the communication terminal bound with the MAC address of the STA2. 
         [0123]    With the Mode 1, it is very difficult for an illegal user to acquire both the address of a legal STA and a verification code corresponding to the legal STA, greatly increasing difficulty in illegal access of a wireless network by an illegal user. 
         [0124]    In Mode 2, step S 160  steps as follows. 
         [0125]    It may be determined whether the returned code matches a verification code. 
         [0126]    When the returned code matches at least one verification code, access by the STA may be granted. 
         [0127]    When the returned matches no verification code sent to any of the communication terminal, access by the STA may be rejected. 
         [0128]    The AP may simultaneously send 10 verification codes to multiple STAs requesting access. A STA requesting access is legal when a returned code returned by the STA matches one of the 10 verification codes, without further determining whether the returned code is of the STA. This may simplify AP operation. 
         [0129]    With the Mode 2, in case both STA1 and STA2 are legal STAs, assume that a communication terminal bound with the MAC address of the STA1 has received a verification code 01101, and a communication terminal bound with the MAC address of the STA2 has received a verification code 01034. In executing step S 160  by the AP, the STA1 is allowed to access the AP whenever the STA1 returns a returned code 01101 or 01034 to the AP. 
         [0130]    The AP will record a verification code sent by the AP per se. In the first mode, the AP must record a relationship between a STA requesting access and a verification code. When determining whether a returned code matches a verification code, the AP has to probe both an identifier (such as a MAC address) of the STA and a verification code to determine a final result of the verification. In the second mode, the AP may record but any verification code sent. After receiving a returned code, the AP may simply search the recorded any verification code for a match, which simplifies AP operation. 
         [0131]    No matter which mode is adopted in step S 160 , assuming that a verification code is an 8-bit binary sequence, there may be 256 possible verification codes. It is difficult for an illegal STA to spot which one binary sequence as the actual verification code. A verification code is not limited to the form of a binary sequence, but may also include any other letter, number, symbol, and/or picture. This further increases difficulty for the illegal STA to acquire a verification code. 
         [0132]    With either mode in S 160 , a same verification code may be used in multiple accesses by a STA. For example, a STA may use a verification code having been used last time the STA accessed the AP. The AP may send a same verification code to different communication terminals bound with the STA. That is, there is no certain order in executing step S 130  and step S 110 , as long as both step S 130  and step S 110  are executed before step S 140 . 
         [0133]    A verification code is used only when verifying whether access is granted. Even if a verification code is used for multiple accesses by a legal STA or for access by multiple legal STAs, it is still difficult for an illegal STA to acquire the verification code by intercepting information exchanged between a legal STA and the AP. A verification code may be generated dynamically at each STA access request, so as to minimize possibility of illegal access. 
         [0134]    To sum up, due to lack of access to a communication terminal corresponding to identification information of a STA requesting access, and thus lack of access to a verification code, an illegal user is prevented from accessing an AP easily and stealing a wireless network resource. 
         [0135]    To further enhance security of legal access and reduce probability of illegal access, improvements may be made as follows. 
         [0136]    As shown in  FIG. 2 , the method may further include steps as follows. 
         [0137]    In step S 141 , after the verification code is sent to the communication terminal bound with the identification information, a timer may be started. The verification code may expire when a specified period of time expires. 
         [0138]    Step S 160  may include steps as follows. 
         [0139]    It may be determined whether the verification code has expired. 
         [0140]    When the verification code is unexpired and the returned code matches the verification code, access by the STA may be granted. Otherwise when the verification code has expired and/or the returned code fails to match the verification code, access by the STA may be rejected. 
         [0141]    The verification code may expire after the specified period of time, such as 1 minute, 30 seconds, etc. The specified period of time may be determined depending on how long it takes to perform the specific operation. 
         [0142]    It is difficult for an illegal user to get a hold of a communication terminal bound with legal identification information. Thus it is very difficult for the illegal user to steal a verification code. In addition, a verification code may expire or lapse after a valid period of time. This makes it even more difficult for the illegal user to steal the verification code within the relatively short period of time. With the method for wireless network access according to the embodiment, illegal accesses may be reduced greatly, reducing chance of wireless resource theft, enhancing security in wireless network access. 
         [0143]    A verification code may be used for a limited number of times. For example, a verification code may be used once for verification, and may automatically lapse (lose its effectiveness) after a successful verification. 
         [0144]    In steps S 130 -S 140 , verification codes generated by the AP for different STAs may or may not be the same. To simplify AP processing, verification codes generated at the same time may be identical. 
         [0145]    Step S 140  may include steps as follows. 
         [0146]    A communication identifier of a communication terminal may be searched for according to a MAC address. 
         [0147]    The verification code may be sent to the communication terminal according to the communication identifier. 
         [0148]    If a STA requesting access is found to be illegal, access by the STA may be rejected straightforwardly, such as by blocking a subsequent flow of wireless access. 
         [0149]    Step S 140  may include that a short message containing the verification code may be sent to the communication terminal. 
         [0150]    Relatively speaking, among existing communication technologies, a Short Message Service (SMS) is highly secure. A data format used for wireless network access is different from a data format of a short message. An ordinary illegal STA may not be able to intercept information in the two data formats within a short period of time and log into the AP using a legal MAC address and a corresponding verification code. 
       Device Embodiment 1 
       [0151]    As shown in  FIG. 3 , a device for wireless network access according to the embodiment includes a first acquiring unit, a searching unit, a generating unit, a first sending unit, a receiving unit, and an accessing unit. 
         [0152]    The first acquiring unit  110  is arranged for: acquiring identification information of a station (STA) requesting access. The identification information may include a MAC address or a nickname of the STA. 
         [0153]    The searching unit  120  is arranged for: searching, according to the identification information, for a communication terminal having a binding relationship with the identification information. 
         [0154]    The generating unit  130  is arranged for: generating a verification code, such as when the STA is legal. 
         [0155]    The first sending unit  140  is arranged for: sending the verification code to the communication terminal. 
         [0156]    The receiving unit  150  is arranged for: receiving a returned code returned by the STA. 
         [0157]    The accessing unit  160  is arranged for: granting or rejecting, according to the verification code and the returned code, access by the STA. 
         [0158]    The first acquiring unit  110  may have different structures depending on a mode in which the identification information is acquired. If the identification information sent by the STA is received, the first acquiring unit  110  may include a communication interface. In general, the communication interface may be a wireless interface, such as a receiving antenna, etc. 
         [0159]    A structure of the searching unit  120  as well as that of the generating unit  130  may include various types of processors or processing chips. Such a processor or processing chip may serve for information processing. Such processors may include an application processor, a Central Processing Unit (CPU), a Microprocessor Unit (MPU), a Digital Signal Processor (DSP), a programmable array, etc. The searching unit  120  and the generating unit  130  may be separate processors or be integrated in one processor. When one processor corresponds to multiple aforementioned units, functions of different units may be implemented respectively via time division multiplexing or concurrent threads. 
         [0160]    A structure of the first sending unit  130  as well as that of the receiving unit  140  may include a communication interface, such as a transceiver antenna, a WIFI antenna, etc. 
         [0161]    The accessing unit  160  may include wireless network connecting equipment, such as a wireless connecting port, etc. 
         [0162]    The device for wireless network access according to the embodiment may be a device capable of entering a wireless network, such as a wireless router, a wireless interaction machine, or the like, and provide hardware for implementing the method for wireless network access according to Method Embodiment 1. With the device for wireless network access, probability of illegal access can be reduced. 
         [0163]    The searching unit  120  may include a determining module and a searching module. 
         [0164]    The determining module may be arranged for: determining, according to the identification information, whether the STA is a legal STA. 
         [0165]    The searching module may be arranged for: in response to determining that the STA is a legal STA, searching, according to the identification information, for the communication terminal corresponding to the identification information. 
         [0166]    The determining module and the searching module may be integrated in one processor or may correspond to different processors. 
         [0167]    The accessing unit  160  may grant or reject access by the STA in at least two modes. Accordingly, the accessing unit  160  may include at least two structures as follows. 
         [0168]    The accessing unit  160  with a first structure may include a first matching module and a first accessing module. 
         [0169]    The first matching module may be arranged for: determining whether the returned code matches the verification code sent to the communication terminal corresponding to the STA requesting access. 
         [0170]    The first accessing module may be arranged for: in response to determining that the returned code matches the verification code, granting access by the STA. The first accessing module may be further arranged for: in response to determining that the returned code does not match the verification code, rejecting access by the STA. 
         [0171]    The accessing unit  160  with a second structure may include a second matching module and a second accessing module. 
         [0172]    The second matching module may be arranged for: determining whether the returned code matches a verification code. 
         [0173]    The second accessing module may be arranged for: in response to determining that the returned code matches at least one verification code, granting access by the STA. The second accessing module may be further arranged for: in response to determining that the returned matches no verification code sent to any of the communication terminal, rejecting access by the STA. 
         [0174]    Both the first matching module and the second matching module may include a comparator or a processor with a comparing function. Both the first accessing module and the second accessing module may correspond to wireless network connecting equipment, such as a wireless connecting port, etc. The wireless connecting port may be connected to the comparator or the processor with the comparing function. After receiving a signal sent by the comparator or the processing with the comparing function, the wireless connecting port may establish a connection between the AP and the STA to allow access by the STA, or establish no connection between the AP and the STA and reject access by the STA. 
         [0175]    As shown in  FIG. 4 , the device may further include a timing unit. 
         [0176]    The timing unit  170  may be arranged for: after sending the verification code to the communication terminal bound with the MAC address, starting a timer. The verification code may expire when a specified period of time expires. 
         [0177]    The accessing unit  160  may be arranged for: determining whether the verification code has expired; in response to determining that the verification code is unexpired and that the returned code matches the verification code, granting access by the STA; otherwise in response to determining that the verification code has expired and/or that the returned code fails to match the verification code, rejecting access by the STA. 
         [0178]    The timing unit  170  may include a timer arranged for timing. The AP may determine whether a verification code has expired according to timing of the timer. 
         [0179]    The first acquiring unit  110  may be arranged for: receiving a probe frame sent by the STA, and extracting the MAC address contained in the probe frame. The first acquiring unit  110  may include a communication interface. 
         [0180]    The searching unit  120  may be arranged for: after receiving the probe frame, determining whether the identification information matches legal identification information; in response to determining that the identification information matches the legal identification information, determining that the STA is legal; in response to determining that the identification information matches no legal identification information, determining that the STA is illegal. 
         [0181]    The first sending unit  140  may be arranged for: sending the communication terminal a short message containing the verification code. 
         [0182]    To sum up, with the method for wireless network access according to the embodiment, access by a STA may be implemented, greatly reducing illegal access, enhancing security in wireless network access, reducing probability of wireless resource theft. 
       Method Embodiment 2 
       [0183]    As shown in  FIG. 5 , a method for wireless network access according to the embodiment includes steps as follows. 
         [0184]    In step S 210 , a STA requesting access sends identification information to a device for wireless network access. The identification information may include a MAC address or a nickname of the STA. 
         [0185]    In step S 220 , the STA acquires a verification code generated by the device for wireless network access and sent by a communication terminal corresponding to the identification information. 
         [0186]    In step  230 , the STA returns the verification code to the device for wireless network access as a returned code. 
         [0187]    The device for wireless network access grants or rejects access by the STA according to the returned code. 
         [0188]    The STA may be any terminal capable of accessing a wireless network. The communication terminal may be any terminal that performs wireless communication, such as a cell phone. The STA and the communication terminal may or may not be the same equipment. 
         [0189]    One may refer to Method Embodiment 1 for composition of a verification code, which will not be repeated here. 
         [0190]    The verification code acquired in step S 220  may be input by a user manually or acquired from the communication terminal. When the communication terminal and the STA correspond to the same physical device, the verification code may be acquired automatically. 
         [0191]    When a verification code acquired by a communication terminal requesting access may be used for accessing the AP repeatedly, step S 220  may be performed before step S 210 , or steps S 220  and S 210  may be executed at the same time. When a verification code is for accessing the AP just once, step S 220  may be performed after step S 210 . Therefore, there is no certain order in executing step S 210  and step S 220 , as long as both steps are executed before step S 230 . 
         [0192]    To sum up, according to the embodiment, to access the device for wireless network access, the STA requesting access not only has to have identification information identified as usual, but also has to return a returned code to the AP. The STA may be granted of access only when the returned code matches a corresponding verification code, thereby preventing an illegal STA from accessing the wireless network. 
       Device Embodiment 2 
       [0193]    As shown in  FIG. 6 , a STA according to the embodiment includes a second sending unit and a second acquiring unit. 
         [0194]    The second sending unit  210  is arranged for: sending identification information of the STA to a device for wireless network access. 
         [0195]    The second acquiring unit  220  is arranged for: acquiring a verification code generated by the device for wireless network access and sent by a communication terminal corresponding to the identification information. 
         [0196]    The second sending unit  220  is further arranged for: returning the verification code to the device for wireless network access as a returned code. 
         [0197]    The device for wireless network access grants or rejects access by the STA according to the returned code. 
         [0198]    One may refer to the first sending unit for a structure of the second sending unit  230 , which will not be repeated here. The second acquiring unit may be a receiving interface, such as a receiving antenna or a cable receiving interface. The second acquiring unit may be a man-machine interaction interface. 
         [0199]    To sum up, the STA may be electronic equipment serving for a wireless network access function, such as a cell phone, a tablet, an e-Book/Kindle, etc., and provide hardware for implementing the method according to Method Embodiment 2. 
         [0200]    Application examples will be provided below with reference to a method/device embodiment. 
         [0201]    As shown in  FIG. 7 , a device for wireless network access according to an example may include: a network user-interface module, a network serving module, a main controlling module, a WLAN controlling module, a WLAN Beacon module, a WLAN probing module, a WLAN authenticating module, a WLAN associating module, a network connecting module, a MAC address verifying module, a Key Management Center (KMC) module, a dynamic password sending module, and a dynamic password verifying module. 
         [0202]    The network user-interface module may be a page for interaction between a user and a data terminal. With the page, the user may perform an operation, such as selecting a mode of network connection, searching a phone book, sending a short message, etc. 
         [0203]    The network serving module may include background processing of a network service interface WEB UI, which is mainly for processing various requests of the user. 
         [0204]    The two modules may be mainly arranged for an administrator or user of the device for wireless network access to perform information interaction and information processing on the device for wireless network access. Data transmission and data exchange between the network user-interface module and the network serving module may be based on a HyperText Transfer Protocol (HTTP). 
         [0205]    The main controlling module, being that of the data terminal, may be arranged for: maintaining a state machine of the data terminal, and controlling functional modules, such as network connection, phone book, SMS, etc., according to different messages. 
         [0206]    The WLAN controlling module may be arranged for: implementing a function such as scanning, authentication, association, etc., under the WLAN. 
         [0207]    The WLAN Beacon module may be arranged for: broadcasting a Beacon frame periodically, to inform a nearby STA of a supported rate, a channel, a Services Set Identity (SSID) of the AP, etc. 
         [0208]    The WLAN probing module may be arranged for: sending a probe response frame in response to a probe request frame of the STA. 
         [0209]    The WLAN authenticating module may be arranged for: sending an authentication response frame in response to an authentication request frame (i.e., an authentication frame) of the STA. 
         [0210]    The WLAN associating module may be arranged for: sending an association request response in response to an association request frame of the STA. 
         [0211]    The network connecting module may be mainly arranged for: after the STA is associated with the AP successfully, controlling whether the STA is allowed to access the Internet. 
         [0212]    The MAC address verifying module may be arranged for: verifying a MAC address, and determining whether the MAC address of the STA is of a legal user. 
         [0213]    The KMC module may be a dynamic password managing module, and may be hardware or software for generating a dynamic password. 
         [0214]    The dynamic password sending module may be arranged for: before the STA initiates a data-service connection, sending a short message containing a dynamic password to a communication terminal corresponding to a security number bound with the MAC address. 
         [0215]    The dynamic password verifying module may be arranged for: verifying the dynamic password. 
         [0216]    The AP may grant or reject access by the STA based on a result given by the dynamic password verifying module. 
         [0217]    The MAC address authenticating module may be part of a determining unit in a device embodiment, and may be mainly arranged for: verifying whether a STA requesting access is legal. 
         [0218]    The KMC module may be part of the generating unit in a device embodiment, and may be arranged for: generating a first verification code. The first verification code may be the dynamic password in the example. 
         [0219]    The dynamic password sending module may be part of the first sending unit in a device embodiment. 
         [0220]    The dynamic password verifying module may be part of the accessing unit in a device embodiment, and may correspond to the first matching module or the second matching module. 
         [0221]    The network connecting module may also be deemed as part of the access unit in a device embodiment, and may be arranged for: grant or reject accessing the AP by the STA. The network connecting module may correspond to the first accessing module or the second accessing module. 
         [0222]      FIG. 8  is an example of the method according to an embodiment herein. 
         [0223]    The example may include four stages, namely, discovery, authentication, association, and confidentiality verification. 
         [0224]    The stage of discovery may include steps as follows. 
         [0225]    The AP may send a beacon frame. 
         [0226]    The STA may receive the beacon frame. To access the AP, the STA may send a probe request frame to the AP. The probe request frame may contain a MAC address of the STA. 
         [0227]    After receiving the probe request frame, the AP may perform MAC address matching to determine whether the STA is legal. 
         [0228]    When the STA is legal, the AP may send a probe response frame to the STA. 
         [0229]    The STA may receive the probe response frame. 
         [0230]    The stage of authentication may include steps as follows. 
         [0231]    According to a communication protocol of IEEE, the STA will also receive authentication ciphertext sent by the AP. The STA may decipher the received authentication cryptograph sent by the AP using a password known to the STA, and generate plaintext corresponding to the ciphertext. The plaintext may be included in an authentication request frame, which then may be sent to the AP. 
         [0232]    The AP may receive the authentication request frame and determine whether the plaintext is correct. If it is correct, the AP may send an authentication response frame to the STA. 
         [0233]    The stage of association may include steps as follows. 
         [0234]    After receiving the authentication response frame, the STA may send an association request frame to the AP. The association request frame may include an access-associated parameter associated with wireless network access, such as an SSID, a monitoring interval, a supported rate, etc. 
         [0235]    After receiving the association request frame, the AP may perform association between the STA and the AP to establish a connection between the STA and the AP. A parameter such as result of interception will be acquired according to the access-associated parameter, so as to maintain a fair wireless connection between the STA and the AP. 
         [0236]    After a connection between the STA and the AP is established, the AP may send an association response to the STA. The STA may then initiate data service connection with the AP. 
         [0237]    The stage of confidentiality verification may include steps as follows. 
         [0238]    When receiving the data service connection request, the AP will generate a dynamic password, and send the dynamic password to a communication terminal having a binding relationship with the STA. If the STA is legal, the STA will acquire the dynamic password indirectly. 
         [0239]    The AP may receive the dynamic password sent by the STA and perform dynamic password verification. 
         [0240]    If the dynamic password is verified, a service data connection between the STA and the AP may be established. The AP may send a service data connection response to the STA to implement access of the AP by the STA. 
         [0241]    The STA requesting access and the communication terminal may correspond to one physical terminal, such as a cell phone. The cell phone may be a terminal supporting wireless Internet access, such as a communication terminal supporting WIFI. The cell phone may receive a short message. 
         [0242]    An example 3 may include steps as follows. 
         [0243]    In a first step, a device for wireless access may be powered on and initialized. A main control process may read a Wi-Fi configuration item to decide whether to call a Wi-Fi process. 
         [0244]    In a second step, if the Wi-Fi configuration item is closed, no Wi-Fi process may be called. In this case, the device for wireless access may work in a modem mode. 
         [0245]    In a third step, if the Wi-Fi configuration item is opened, the Wi-Fi process is called. In this case, data terminal may work in a modem&amp;wi-fi mode. 
         [0246]    In a fourth step, the Wi-Fi process may call a function wifi_ap_whitename_read( ), update a file ap_whitename.xml. The function wifi_ap_whitename_read( ) may serve for the Wi-Fi process to read legal identification information, and may be, for example, a function for reading the legal MAC address. The Wi-Fi process is for Wi-Fi processing. One may refer to prior art for specific content of the process. The whitename may represent the legal identification information. 
         [0247]    In a fifth step, a WEB SERVER process may call a function web_server_whitename_read( ), and read the xml file. The function web_server_whitename_read( ) may serve for the WEB SERVER process to read the legal identification information, and may be for example, a function for reading the legal MAC address. One may refer to prior art for specific content of the process. 
         [0248]    In a sixth step, a network interface WEB UI process may call a function web_ui_whitename_show( ) to read the xml file, and display the information on the network user interface. The function web_ui_whitename_show( ) may serve for the WEB UI process to display the legal identification information, and may be for example, a function for reading the legal MAC address. The WEB UI process is for processing WEB UI. One may refer to prior art for specific content of the process. 
         [0249]    In a seventh step, a network administrator may log in to the WEB UI, and add a whitelist allowed of access. The WEB UI process may transmit the information to the WEB SERVER process through an HTTP request. The whitelist may include a legal MAC address. 
         [0250]    In an eighth step, the WEB SERVER process may transmit the information to the Wi-Fi process via message queuing. 
         [0251]    In a ninth step, the Wi-Fi process may call a function wifi_ap_whitename_write( ) to write the information into the file ap_whitename.xml. The function wifi_ap_whitename_write( ) may serve for the Wi-Fi process to modify the legal identification information. 
         [0252]    In a tenth step, the Wi-Fi process may call a function wifi_ap_beacon_broadcast( ), to inform a nearby STA periodically of an SSID, a channel, a supported rate per se, etc. The function wifi_ap_beacon_broadcast( ) may serve for the Wi-Fi process to broadcast the legal identification information. 
         [0253]    In an eleventh step, to access the AP, the STA may select a corresponding SSID and input a WLAN password. In this case, the STA may send a probe request frame containing the information. 
         [0254]    In a twelfth step, after the AP receives the frame, the Wi-Fi process may call a function wifi_ap_mac_filter( ) to check whether a current MAC address is legal. The function wifi_ap_mac_filter( ) may serve for the Wi-Fi process to check whether the current MAC address is legal. The function may also serve for a search for determining whether identification information of another type is legal. 
         [0255]    In a thirteenth step, depending on a result of the twelfth step, if the STA requesting access is illegal, the AP may not respond to the probe request frame of the STA. 
         [0256]    In a fourteenth step, depending on the result of the twelfth step, if the STA requesting access is legal, the Wi-Fi process may call a function wifi_ap_probe_response( ) to reply to the request frame. The function wifi_ap_probe_response( ) may serve for the Wi-Fi process to respond to the probe frame. 
         [0257]    In a fifteenth step, after receiving the probe response frame, the STA may send an authentication frame. 
         [0258]    In a sixteenth step, after the AP receives the frame, the Wi-Fi process may call a function wifi_ap_authentication_response( ) to respond to the frame and confirm that the authentication is successfully. The function wifi_ap_authentication_response( ) may serve for the Wi-Fi process to respond to the authentication frame. 
         [0259]    In a seventeenth step, when receiving the authentication response frame, the STA may send an association request frame. 
         [0260]    In a eighteenth step, after the AP receives the frame, the Wi-Fi process may call a function wifi_ap_association_response( ) to respond to the frame and confirm that the association is successfully. In this case, a connection between the STA and the AP may be established successfully. The function wifi_ap_association_response( ) may serve for the Wi-Fi process to associate the AP and the STA. 
         [0261]    In a nineteenth step, when the STA initiates a data service connection, a KMC process may call a function wifi_ap_dpwd_generate( ) to generate a dynamic password. The Wi-Fi process may call a function wifi_ap_dpwd_send( ). The AP may automatically send a short message to a security number bound with the MAC address. The short message may contain the dynamic password. The function wifi_ap_dpwd_generate( ) may serve for the Wi-Fi process to generate the dynamic password (which may be one type of verification code). The function wifi_ap_dpwd_send( ) may serve for the Wi-Fi process to send the dynamic password (which may be one type of verification code). 
         [0262]    In a twentieth step, after a cell phone receives the short message, the STA may input the dynamic password on a secondary authentication page. 
         [0263]    In a 21st step, the AP may receive the dynamic password. The Wi-Fi process may call a function wifi_ap_dpwd_check( ) to verify the dynamic password. The function wifi_ap_dpwd_check( ) may serve for the Wi-Fi process to verify the dynamic password (which may be one type of verification code). 
         [0264]    In a 22nd step, depending a result of the 21st step, if the dynamic password is not verified to be correct, the STA is refused to initiate the data service connection. 
         [0265]    In a 23rd step, depending the result of the 21st step, if the dynamic password is verified to be correct, the STA is allowed to initiate the data service connection. 
         [0266]    As shown in  FIG. 9 , a method for wireless network access according to an example may include steps as follows. 
         [0267]    In step S 310 , identification information of a STA requesting access may be acquired. The identification information may be a MAC address. 
         [0268]    In step S 320 , it may be determined whether the STA is legal according to the identification information. 
         [0269]    In step S 330 , a verification code may be generated when the STA is legal. 
         [0270]    In step S 340 , the verification code may be sent to a communication terminal corresponding to the identification information. 
         [0271]    In step S 350 , a returned code returned by the STA is received. 
         [0272]    In step S 360 , access by the STA is granted or rejected according to the verification code and the returned code. 
         [0273]    Steps S 310 -S 360  may all be executed by wireless access equipment AP, such as a wireless router or a wireless switch. By granting access by the STA, it means that the STA is allowed to acquire a network service using a network bandwidth of the AP. By rejecting access by the STA, it means that the STA is not allowed to acquire a network service using the network bandwidth of the AP. 
         [0274]    A computer-readable storage medium according to an embodiment herein stores therein computer-executable instructions. The computer-executable instructions are for executing at least one aforementioned method, such as at least one method as shown in  FIG. 1 ,  FIG. 2 , and  FIG. 5 . 
         [0275]    The computer-readable storage medium may include various media capable of storing program codes, such as a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, etc. The computer-readable storage medium may be a non-transitory storage medium so as to store the program codes stably. 
         [0276]    What described are merely embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. Any modification made according to the principle of the disclosure shall fall within the scope of the present disclosure.