Access processing method and apparatus for wireless network, and electronic device

By pre-configuring keys on wireless network devices, the access delay caused by wireless network key distribution and configuration is resolved, enabling terminals to quickly access the wireless network.

CN112601226BActive Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011403220.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-02
Publication Date
2025-11-25
Estimated Expiration
2040-12-02

AI Technical Summary

Technical Problem

In existing technologies, the access delay caused by the wireless network key distribution and configuration process makes it difficult for users to use the key in a timely manner.

Method used

A key is generated for the terminal to access the wireless network and pre-configured on the wireless network device. The terminal directly uses the configured key for access authentication. The security and consistency of the key are ensured through encryption and decryption processing.

Benefits of technology

It significantly improves the speed of terminal access to wireless networks, reduces key activation delay, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112601226B_ABST
    Figure CN112601226B_ABST
Patent Text Reader

Abstract

The application provides an access processing method and device of a wireless network, electronic equipment and a computer readable storage medium; relates to network and access technology in the field of cloud technology; the method comprises the following steps: generating a key for a terminal to access a wireless network; sending the key to a wireless network device, so that the wireless network device configures the key as an access credential capable of accessing the wireless network; in response to a request of the terminal to access the wireless network, sending the key to the terminal, so that the terminal passes the access credential verification of the wireless network device based on the key, and accesses the wireless network through the wireless network device after successful verification. Through the application, the terminal can quickly access the wireless network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to computer network technology, and particularly relates to a wireless network access processing method and device, electronic equipment and a computer readable storage medium. BACKGROUND

[0002] Wireless access points are basic equipment for setting up wireless networks. Wireless access points share network resources with existing wired architectures in a wireless mode, and mainly serve as a bridge between wireless workstations and wired local area networks in the media access control layer, so that wireless workstations can quickly and easily connect to the network.

[0003] In many application scenarios, a user is provided with a service of accessing a wireless network. For example, in an airport, a visitor user obtains a key for accessing a wireless network from a cloud management platform of a wireless access point through a social client of the visitor user, and then a terminal of the visitor user inputs the key to the wireless access point to obtain the permission of accessing the wireless network. However, the process of the cloud management platform of the wireless access point issuing the key to the wireless access point and the process of the key being configured in the wireless access point both cause time delay, which leads to the difficulty of the user using the key in time.

[0004] There is no effective technical solution to the access delay caused by issuing and configuring the key in the related art. SUMMARY

[0005] The embodiments of the present application provide a wireless network access processing method and device, electronic equipment and a computer readable storage medium, which can realize fast access of a terminal to a wireless network.

[0006] The technical solution of the embodiments of the present application is as follows:

[0007] The embodiments of the present application provide a wireless network access processing method, which comprises the following steps.

[0008] generating a key for a terminal to access a wireless network;

[0009] sending the key to a wireless network device, so that the wireless network device configures the key as an access credential capable of accessing the wireless network;

[0010] in response to a request of the terminal accessing the wireless network, sending the key to the terminal, so that

[0011] the terminal verifies the access credential of the wireless network device based on the key, and accesses the wireless network through the wireless network device after the verification is successful.

[0012] The embodiments of the present application provide a wireless network access processing device, which comprises the following steps.

[0013] A random key generation module is used to generate keys for terminals to access the wireless network;

[0014] A key pre-allocation module is used to send the key to a wireless network device so that the wireless network device configures the key as an access credential for accessing the wireless network;

[0015] The sending module is configured to send the key to the terminal in response to the terminal's request to access the wireless network, so that the terminal can verify the access credentials of the wireless network device based on the key, and access the wireless network through the wireless network device after successful verification.

[0016] In the above scheme, the random key generation module is further configured to: in response to a key creation request from the terminal or another terminal different from the terminal, determine a set of characters for generating the key; acquire a file containing system environmental noise and obtain random numbers from the file using a random number acquisition function; select characters corresponding to the random numbers from the character set as a pending key; when the pending key is duplicated with a key already stored in the key database, continue to generate a new pending key; when the pending key is not duplicated with an existing key, determine the pending key as a key for the terminal to access the wireless network.

[0017] In the above scheme, before determining the undetermined key as the key for the terminal to access the wireless network when the undetermined key does not duplicate the existing key, the random key generation module is further configured to: map the undetermined key to at least one point in a bit array using at least one hash function; and determine that the undetermined key does not duplicate the existing key when there is a zero value in the at least one point.

[0018] In the above scheme, after generating the key for the terminal to access the wireless network, the random key generation module is further configured to: encrypt the key using an encryption key to obtain the ciphertext of the key; store the ciphertext of the key in a key database and record the key as an unassigned key; before sending the key to the terminal, the sending module is further configured to: decrypt the ciphertext of the key using a decryption key to obtain the key to be sent to the terminal; wherein the encryption key and the decryption key are the same.

[0019] In the above scheme, after sending the key to the wireless network device, the key pre-allocation module is further configured to: detect the configuration of the wireless network device for the key; and remove the ciphertext of the key from the key database if the key is not successfully configured within a set detection period.

[0020] In the above scheme, after sending the key to the terminal, the sending module is further configured to: record the key as an assigned key, and bind the key and the terminal information; encrypt the binding result using the encryption key to obtain the ciphertext of the binding result, and store the ciphertext of the binding result in the key database; in response to the terminal's request to reconnect to the wireless network, query the key database for the ciphertext of the binding result corresponding to the terminal; decrypt the ciphertext of the binding result using the decryption key to obtain the key in the binding result, and then send the key to the terminal again.

[0021] In the above scheme, the sending module is further configured to: obtain a key request type from the terminal's request to access the wireless network; search the key database according to the key request type; when an unassigned key matching the key request type is found in the key database, send the unassigned key matching the key request type to the terminal; wherein, the key request type includes: permanent key and dynamic key.

[0022] In the above scheme, the sending module is further configured to: obtain the number of key-authorized terminals and the number of key requests from the terminal's request to access the wireless network; when the key pre-allocation template adaptation condition is met, query the key database for the number of unallocated keys corresponding to the key pre-allocation template, and send one of the unallocated keys to each of the terminals with the number of key requests, wherein the unallocated keys sent to each terminal are different; wherein the key pre-allocation template adaptation condition includes: the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys corresponding to the key pre-allocation template is not less than the number of key requests.

[0023] In the above scheme, the sending module is further configured to: when the key pre-allocation template adaptation condition is not met, perform the following processing: generate a new key for the number of key requests; wherein the number of key authorization terminals configured for the new key is the same as the number of key authorization terminals; send one of the new keys to each terminal in the number of key requests, and the new keys sent to each terminal are different, and send the new key to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network; wherein the new key is used for the terminals in the number of key requests to verify the access credential of the wireless network device, and access the wireless network through the wireless network device after successful verification.

[0024] In the above scheme, the sending module is further configured to: obtain the number of key requests from the terminal's requests to access the wireless network; when the actual number of unallocated keys in the key database is less than the number of key requests, perform the following processing: generate a new key for the number of key requests; send one of the new keys to each of the terminals with the number of key requests, and the new keys sent to each terminal are different; when sending one of the new keys to each of the terminals with the number of key requests, the key pre-allocation module is further configured to: send the new key to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network; wherein, the new key is used for the terminal to verify the access credential of the wireless network device, and access the wireless network device through the wireless network device after successful verification.

[0025] In the above scheme, the key pre-allocation module is further configured to: when the actual number of unallocated keys in the key database is less than the number of key requests, perform the following processing: determine a first difference between the actual number of unallocated keys in the key database and the upper limit number of unallocated keys; generate a new key with the number of the first difference; and send the new key with the number of the first difference to the wireless network device, so that the wireless network device configures the new key with the number of the first difference as the access credential of the wireless network.

[0026] In the above scheme, the sending module is further configured to: obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, perform the following processing: determine a second difference between the actual number of unassigned keys in the key database and the number of key requests; send one of the unassigned keys to each of the actual number of terminals, wherein the unassigned keys sent to each of the actual number of terminals are different; generate a new key with a number equal to the second difference; send one of the new keys to each of the terminals with a number equal to the second difference, and send the new key to each of the terminals with a number equal to the second difference, wherein the unassigned keys sent to each of the actual number of terminals are different; generate a new key with a number equal to the second difference; and send the new key to each of the terminals with a number equal to the second difference, wherein the new key is sent to each of the terminals with a number equal to the second difference. Each terminal in the second difference has a different new key, and the number of terminals requesting the key and the number of terminals with the second difference are different terminals. When sending one of the new keys to each of the terminals with the second difference, the key pre-allocation module is further configured to: send the number of new keys with the second difference to the wireless network device, so that the wireless network device configures the new keys as access credentials for the wireless network. The number of new keys with the second difference is used for the terminals with the second difference to verify the access credentials of the wireless network device, and to access the wireless network through the wireless network device after successful verification.

[0027] In the above scheme, after sending one of the new keys to each of the terminals whose number is equal to the second difference, the key pre-allocation module is further configured to: generate a set upper limit number of new keys; and send the upper limit number of new keys to the wireless network device so that the wireless network device configures the upper limit number of new keys as access credentials for the wireless network.

[0028] In the above scheme, the sending module is further configured to: obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is not less than the number of key requests, perform the following processing: send one of the unassigned keys to each of the terminals with the number of key requests, and the unassigned keys sent to each terminal are different.

[0029] In the above scheme, after each terminal in the terminal requesting the key sends one of the unallocated keys, the key pre-allocation module is further configured to: determine a third difference between the actual number of unallocated keys in the key database and the median number of unallocated keys; generate a new key with the number of the third difference; and send the new key to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network.

[0030] In the above scheme, the random key generation module is further configured to: determine the number of key requests for all requests to access the wireless network within the nth historical time range, so as to use the predicted key number for the nth time range; where n is an integer and its value satisfies 1≤n≤N, and N is an integer greater than 2; when n is 1, generate a key that conforms to the predicted key number for the nth time range within the Nth time range; when n is a positive integer greater than 1 and not greater than N, generate a key that conforms to the predicted key number for the nth time range within the (n-1)th time range.

[0031] This application provides an electronic device, including:

[0032] Memory, used to store executable instructions;

[0033] The processor, when executing executable instructions stored in the memory, implements the wireless network access processing method provided in the embodiments of this application.

[0034] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the wireless network access processing method provided in this application.

[0035] The embodiments of this application have the following beneficial effects:

[0036] Before sending the key to the terminal, the key is sent to the wireless network device, so that the wireless network device is pre-configured with a key that can be used immediately. When responding to the terminal's request to access the wireless network, the terminal can directly use the key that has been pre-configured on the wireless network device. Then, the terminal can directly access the wireless network by passing the access authentication of the wireless network device based on the key, which greatly improves the speed of accessing the wireless network using the key. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the architecture of the wireless network access processing system provided in the embodiments of this application;

[0038] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0039] Figures 3A-3D This is a flowchart illustrating the wireless network access processing method provided in an embodiment of this application;

[0040] Figure 4 This is a system architecture diagram of the wireless network access processing method provided in the embodiments of this application;

[0041] Figure 5 This is a schematic diagram illustrating the deduplication process of the wireless network access handling method provided in this application embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0044] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0046] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0047] 1) WiFi, also known as "mobile hotspot" in Chinese, is a wireless local area network technology based on the IEEE 802.11 standard.

[0048] 2) Access Controller (AC): A wireless LAN access control device used to aggregate data from different wireless access points and connect it to the network. It also performs control functions such as configuration management of wireless access points, authentication management of wireless users, bandwidth management, access management, handover management, and security management.

[0049] 3) Wireless Access Point (AP): A carrier-grade wireless coverage device that acts as a bridge between wired and wireless networks. Its main function is to connect various wireless network clients together to achieve wide-area, multi-user wireless access. Depending on the application scenario, wireless access points can usually be divided into indoor and outdoor types.

[0050] 4) STA, Client Station in a wireless LAN. Each terminal (laptop and other network-connected user devices) connected to the wireless network can be called a station. It can be a computer with a wireless network card, a smartphone with a WIFI module, or a mobile terminal or a fixed terminal.

[0051] 5) WPA / WPA2-PPSK is an upgraded version of WPA / WPA2-PSK authentication. It is easy to deploy and can provide different pre-shared keys to different clients, effectively improving network security.

[0052] In related technologies, wireless network keys are created directly for users through the cloud management platform of wireless network equipment manufacturers, and simultaneously distributed to the wireless network devices. At this time, both the user's terminal and the wireless network device have the key, which can be used for pre-shared key authorization and authentication, thereby meeting the user's Internet access needs. However, since the key is created directly through the cloud management platform of the wireless network equipment manufacturer and distributed to the device, the key cannot be used immediately and there is an effective delay. During this period (effective delay), the key distributed to the user's terminal cannot be used normally. To prevent frequent key distribution from impacting the wireless network device, some wireless network manufacturers take protective measures, such as distributing all keys to the wireless network device every two minutes. This solution will result in a longer effective delay for the key, including the interval between batch distributions (e.g., 2 minutes) and the effective delay of the key on the device.

[0053] This application provides a wireless network access processing method, apparatus, electronic device, and computer-readable storage medium, enabling terminals to quickly access the wireless network. The following describes exemplary applications of the electronic device provided in this application, which can be implemented as a server. Exemplary applications when the device is implemented as a server will be described below.

[0054] As an example, a server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0055] See Figure 1 , Figure 1This is a schematic diagram of the access processing system architecture for a wireless network provided in this application embodiment. To support a social application 410, the terminal 400, server 200, wireless network device 500, and vendor cloud platform 600 can be connected via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. The server 200 receives a key creation request from the terminal 400 to create a wireless network for a specific group. This request can be sent through the social application 410. The server 200 (core network management server, which can be deployed as a core network cloud management platform) generates the wireless access corresponding to that group. The server 200 generates a key for the network and stores it in a key database 700. The server 200 sends the key to the wireless network devices 500 under its jurisdiction through the vendor's cloud platform 600. The wireless network devices 500 configure the key as an access credential for accessing the wireless network. In response to the server 200 receiving a request from the terminal 400 to access the wireless network, the server 200 sends the key to the terminal. The terminal 400 verifies the key with the wireless network device and accesses the wireless network through the wireless network device 500 after successful verification. The terminal that sends the key creation request can be the same terminal or a different terminal from the terminal that sends the request to access the wireless network.

[0056] In some embodiments, the terminal 400 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, or smartwatch, but is not limited thereto. The terminal 400 and server 200 can be directly or indirectly connected via wired or wireless communication, and this application embodiment does not impose any limitations. The terminal 400 can implement the wireless network access processing method provided in this application embodiment by running a computer program. For example, the computer program may be a native program or software module in an operating system; it may be a native application (APP), i.e., a program that needs to be installed in the operating system to run; it may also be a small program, i.e., a program that only needs to be downloaded to a browser environment to run; or it may be a small program that can be embedded in any APP. In short, the above-mentioned computer program may be any form of application, module, or plugin.

[0057] The server in this embodiment can be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, network, and other resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technology network system require a large amount of computing and storage resources.

[0058] See Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, wherein the electronic device is... Figure 2 Taking server 200 as an example, it includes at least one processor 210, memory 250, at least one network interface 220, and user interface 230. The various components in server 200 are coupled together via bus system 240. It is understood that bus system 240 is used to implement communication between these components. In addition to a data bus, bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 2 The general labeled all buses as Bus System 240.

[0059] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0060] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices physically located away from the processor 210.

[0061] Memory 250 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 250 described in this application embodiment is intended to include any suitable type of memory.

[0062] In some embodiments, memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0063] Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0064] The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220, such as Bluetooth, WiFi, and Universal Serial Bus (USB).

[0065] In some embodiments, the wireless network access processing device provided in this application can be implemented in software. Figure 2 A wireless network access processing device 255 stored in memory 250 is shown. It can be software in the form of programs and plug-ins, including the following software modules: random key generation module 2551, key pre-allocation module 2552, and sending module 2553. These modules are logical and can therefore be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.

[0066] Below, by Figure 1 The following description uses the server 200 in the example of executing the wireless network access processing method provided in the embodiments of this application. See also... Figure 3A , Figure 3A This is a flowchart illustrating the access processing method for a wireless network provided in an embodiment of this application, which will be combined with... Figure 3A The steps shown are explained.

[0067] In step 101, a key is generated for the terminal to access the wireless network.

[0068] As an example, a key for terminals to access the wireless network is generated through the core network management server. The number of terminals can be one or more. The core network management server is the aforementioned server 200. It can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0069] In some embodiments, see Figure 3B , Figure 3B This is a flowchart illustrating the access processing method for a wireless network provided in an embodiment of this application, which will be combined with... Figure 3B The steps shown are explained below. Step 101, which generates a key for the terminal to access the wireless network, can be achieved through the following steps.

[0070] In step 1011, in response to the client's key creation request, a set of words for generating the key is determined.

[0071] As an example, in response to a client's key creation request, a character set for generating a key is determined. The client can be a social client installed on a terminal. The terminal can be either the terminal requesting access to the wireless network or a different terminal from the terminal requesting access to the wireless network. For example, a first terminal requests key creation; this first terminal could be a terminal used by a network administrator of an organization, requesting the creation of a key for distribution to access the wireless network. Alternatively, the terminal requesting access to the wireless network may be different from the terminal requesting the creation of a key for distribution to access the wireless network. A first terminal requests key creation, while a second terminal requests network access; this second terminal could be a temporary visitor's terminal. The key creation request can also be issued through a mini-program within the client. For example, if the client is an enterprise social client, a key creation request can be sent to the server through a mini-program within the enterprise social client. The key creation request requests the creation of a key specific to a particular community. The key for the wireless network is unique among multiple keys for the community's wireless network. The key generated in response to the request is used to access the community's private wireless network. The request also carries configuration information for key creation, including the key's composition, the number of terminals restricted to using the key, and the key's validity period. Since the keys have different compositions, different character sets can be used as the basis for constructing the key. For example, three character sets can be involved, including: 1. The character set consists of 12 characters, generated from 26 uppercase letters, 26 lowercase letters, and 10 digits. The key obtained from this character set consists of uppercase letters, lowercase letters, and digits; 2. The character set consists of 10 characters, generated from 26 lowercase letters and 10 digits. The key obtained from this character set consists of lowercase letters and digits; 3. The character set consists of 8 characters, generated from 10 digits. The key obtained from this character set consists of digits.

[0072] In step 1012, a file containing records of system environmental noise is obtained, and a random number is obtained from the file using a random number generation function.

[0073] In step 1013, the character corresponding to the random number is selected from the character set as the pending key.

[0074] As an example, the key generation algorithm is based on the aforementioned character set and a random seed generator (random number acquisition function). Random numbers are generated using the random number acquisition function, and characters corresponding to these random numbers are selected from the character set to form the key. There are two methods for implementing the random seed generator: obtaining random numbers by reading the ` / dev / urandom` and ` / dev / random` files. These two files record the operating system's entropy pool, which represents the environmental noise of the current system and describes the degree of system disorder. Environmental noise consists of at least one of the following: memory usage, file usage, the number of different types of processes, etc. Typically, system noise is lower during boot. The difference between these two generators is that the ` / dev / random` random pool depends on system interrupts. When the number of system interrupts is insufficient, the ` / dev / random` device will remain blocked, and processes attempting to read it will enter a waiting state until the number of system interrupts is sufficient. The ` / dev / random` device can guarantee the randomness of the data. The ` / dev / urandom` random pool does not depend on system interrupts, thus avoiding process busy or waiting situations. The m-file generates random numbers, and then selects the corresponding character from the character set as the key based on the random numbers.

[0075] In step 1014, if the pending key is the same as a key already stored in the key database, a new pending key is generated.

[0076] As an example, different communities have their own dedicated wireless networks, so it is necessary to ensure that the key is unique within the community. The key can uniquely identify the user to whom it was assigned, thus allowing the user's relevant information to be traced back. For example, if the request asks to generate 10 keys, but when generating the 5th pending key (123456), it is found that the 5th pending key already exists in the key database, so this key (123456) is discarded, and the 5th pending key (123457) is generated through steps 1011-1013. Since this key does not exist in the key database, it can be identified as the key in step 101.

[0077] In step 1015, when the pending key does not duplicate an existing key, the pending key is determined as the key for the terminal to access the wireless network.

[0078] In some embodiments, before determining the pending key as the key for terminal access to the wireless network in step 1015 when the pending key does not duplicate an existing key, the following technical solution may also be performed: the pending key is mapped to at least one point in a bit array by at least one hash function; when there is a zero value in at least one point, it is determined that the pending key does not duplicate an existing key.

[0079] As an example, the above method maps the undetermined key to at least one point in the bit array using at least one hash function. For example, three hash functions can be used to map the undetermined key to three points in the bit array, with each point having a value of 1 or 0. When there is a zero value among the three points, it can be determined that the undetermined key is not duplicated with an existing key. However, when all three points are 1, it cannot be completely determined that it is duplicated with an existing key. Although the above implementation method may erroneously filter some undetermined keys, it can accurately guarantee that the unfiltered keys do not have the possibility of duplication.

[0080] As an example, configuration information is obtained from the key creation request. The configuration information records the number of keys of various types, such as the number of keys that the terminal limits to 1, the number of keys that consist only of numbers, and steps 1011-1015 will generate a sufficient number of keys that satisfy the configuration information.

[0081] In some embodiments, generating the key for the terminal to access the wireless network in step 101 can be achieved through the following technical solution: within the nth historical time range, determine the number of key requests for all requests to access the wireless network, as the predicted key number for the nth time range; where n is an integer and its value satisfies 1≤n≤N, and N is an integer greater than 2; when n is 1, generate a key that conforms to the predicted key number for the nth time range within the Nth time range; when n is a positive integer greater than 1 and not greater than N, generate a key that conforms to the predicted key number for the nth time range within the (n-1)th time range.

[0082] As an example, any historical time period can be divided into multiple historical time ranges. Within the nth historical time range, the number of key requests for all requests to access the wireless network is determined, which serves as the predicted key number for the nth time range. This involves counting the number of key requests for all requests to access the wireless network within each historical time range of the historical time period. Some requests request the allocation of one key, while others request the allocation of multiple keys. When n is 1, a key matching the predicted key number for the nth time range is generated within the Nth time range. When n is a positive integer greater than 1 and not greater than N, a key matching the predicted key number for the nth time range is generated within the (n-1)th time range. For example, there are multiple historical time ranges: 0:00-6:00 on any historical day (counting 1000), 6:00-12:00 (counting 50...). If the timeframes are 0:00-06:00 (4000 keys), 12:00-18:00 (2000 keys), and 18:00-24:00 (2000 keys), then during key generation, 5000 keys will be generated for use between 0:00-06:00 (6:00-12:00), 4000 keys between 0:00-12:00 (12:00-18:00), 2000 keys between 0:00-18:00 (18:00-24:00), and 1000 keys between 0:00-24:00 (0:00-06:00). This proactively maintains a stable key count and uses historical statistics as a reference, allowing for the pre-generation of keys to accommodate the number of access requests in different time periods. This avoids too many keys being idle and also prevents users from waiting due to the real-time generation of new keys.

[0083] In step 102, a key is sent to the wireless network device so that the wireless network device configures the key as an access credential for accessing the wireless network.

[0084] As an example, the wireless network device can be a device that integrates an AP device and an AC device, or it can be just an AP device or just an AC device. The server sends the key generated in step 101 to the wireless network device so that the wireless network device can configure the key as an access credential to access the wireless network. That is, when the terminal accesses the wireless network, it can verify the access credential of the wireless network device based on the key, which is equivalent to completing the identity authentication for accessing the wireless network.

[0085] In some embodiments, since the wireless network device has already configured the key as an access credential for accessing the wireless network, for example, if the key 123456 has already been configured as an access credential for accessing the wireless network, then when a request for the terminal to access the wireless network is received subsequently, the server can directly return the key 123456 to the terminal. The terminal can then directly use the key 123456 to complete the handshake process based on the authentication protocol with the wireless network device, thereby completing the identity authentication for accessing the wireless network.

[0086] In some embodiments, after generating the key for the terminal to access the wireless network in step 101, the following technical solution may also be performed: encrypting the key with an encryption key to obtain the ciphertext of the key; storing the ciphertext of the key in the key database, and recording the key as an unassigned key.

[0087] As an example, symmetric encryption algorithms can be used during storage to prevent security risks caused by data breaches. For unassigned keys, they can be directly encrypted to obtain ciphertext for storage and recorded as unassigned keys, thus using a key database as the basis for deduplication filtering.

[0088] In some embodiments, after sending the key to the wireless network device in step 102, the configuration of the wireless network device for the key can also be detected; if the key is not successfully configured within a set detection period, the ciphertext of the key is removed from the key database.

[0089] As an example, even though a key has been sent to the wireless network device, the following possibility still exists: due to line issues, key 123456 may not be configured as an access credential for accessing the wireless network on the wireless network device. In the subsequent request from the terminal to access the wireless network, if the server still directly returns key 123456 to the terminal, since the server is unaware that key 123456 has not been configured as an access credential, it will send key 123456 as a pre-allocated key to the terminal. However, the terminal cannot directly complete the handshake process based on the authentication protocol with the wireless network device using key 123456, thus causing unexplained delays. To detect the configuration of the key on the wireless network device, a detection event can be created to check the synchronization between the key in the key database and the key on the wireless network device. If the key in the key database and the key on the wireless network device are inconsistent, a rollback operation is performed. For example, to check whether the key has been successfully deployed in the wireless network device, if the key is not successfully configured within the set detection period (detection result), the server removes the encrypted key from the key database. The event detection module is used to perform the key operation rollback and remove the key from the key database.

[0090] By performing a key rollback operation, it can be ensured that the key database is consistent with the keys on the wireless network device, so that when the server returns the key to the user, it can ensure that each key can be effectively detected.

[0091] In step 103, in response to the terminal's request to access the wireless network, a key is sent to the terminal so that the terminal can verify the access credentials of the wireless network device based on the key, and access the wireless network device after successful verification.

[0092] In some embodiments, before sending the key to the terminal in step 103, the ciphertext of the key can be decrypted using the decryption key to obtain the key to be sent to the terminal; wherein the encryption key and the decryption key are the same.

[0093] As an example, unassigned keys and assigned keys can be stored in different databases, such as storing unassigned keys in a Redis database and assigned keys in a MySQL database, which facilitates database queries and improves query efficiency.

[0094] In some embodiments, see Figure 3C , Figure 3C This is a flowchart illustrating the access processing method for a wireless network provided in an embodiment of this application, which will be combined with... Figure 3C The steps shown are explained below. After sending the key to the terminal in step 103, the following steps can also be performed.

[0095] In step 104, the key is recorded as an assigned key, and the key and terminal information are bound together.

[0096] In step 105, the binding process result is encrypted using an encryption key to obtain the ciphertext of the binding process result, and the ciphertext of the binding process result is stored in the key database.

[0097] In step 106, in response to the terminal's request to reconnect to the wireless network, the encrypted result of the corresponding terminal's binding process is queried from the key database.

[0098] In step 107, the ciphertext of the binding process result is decrypted using the decryption key to obtain the key in the binding process result, which is then sent to the terminal again.

[0099] As an example, the key is recorded as an assigned key, and the key and terminal information are bound together. The binding result is encrypted using an encryption key to obtain the ciphertext of the binding result, which is then stored in the key database. The assigned key is bound to the returned user and then encrypted and stored. When a user requests access again, i.e., the terminal requests to access the wireless network again, the ciphertext of the corresponding terminal's binding result can be directly queried in the key database. The ciphertext of the binding result is then decrypted using a decryption key to obtain the key from the binding result, which is then sent to the terminal again.

[0100] In some embodiments, see Figure 3D , Figure 3D This is a flowchart illustrating the access processing method for a wireless network provided in an embodiment of this application, which will be combined with... Figure 3D The steps shown are explained below. Sending the key to the terminal in step 103 can be achieved through the following steps.

[0101] In step 1031, the key request type is obtained from the terminal's request to access the wireless network.

[0102] In step 1032, the key database is searched according to the key request type.

[0103] In step 1033, when an unassigned key matching the key request type is found in the key database, the unassigned key matching the key request type is sent to the terminal.

[0104] As an example, the key request type is one of the configuration information in the above embodiments. The key request type includes permanent keys and dynamic keys. Dynamic keys have time limits, such as keys with a validity period of 8 hours, or keys with a permanent validity period.

[0105] In some embodiments, step 103, sending the key to the terminal, can be implemented through the following technical solution: obtaining the number of key-authorized terminals and the number of key requests from the terminal's request to access the wireless network; when the key pre-allocation template adaptation conditions are met, querying the unallocated keys of the corresponding key pre-allocation template number of key requests from the key database, and sending an unallocated key to each terminal of the key request number, wherein the unallocated key sent to each terminal is different; wherein the key pre-allocation template adaptation conditions include: the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys corresponding to the key pre-allocation template is not less than the number of key requests.

[0106] As an example, the number of key-authorized terminals and the number of key requests are obtained from the terminal's request to access the wireless network. For instance, if three terminal requests to access the wireless network are received, each request seeking a key, then the number of key requests is the same as the number of terminals sending the requests. Each request also carries the number of key-authorized terminals for the requested key. The number of key-authorized terminals is the number of terminals on which the requested key can be applied. For example, user A requests a key, but the key-authorized terminals for that key are 3, meaning user A can access the wireless network on three terminals using the allocated key. When the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys in the corresponding key pre-allocation template is not less than the number of key requests, that is, assuming the number of key requests is obtained from the terminal's request to access the wireless network... The number of key requests is 3, and the number of authorized terminals for these three keys is 2. The key database is then queried for the number of unassigned keys corresponding to the key pre-allocation template (keys with 2 authorized terminals), which is the number of key requests (i.e., 3 keys with 2 authorized terminals). This results in three keys, each with 2 authorized terminals. One unassigned key is sent to each of the terminals with the requested key number, and each unassigned key sent to each terminal is different. Since three terminals have been requested to access the wireless network, one unassigned key is returned to each of the three terminals that sent the request. The process for determining the one-to-one correspondence between the three unassigned keys and the three terminals is not limited; it can be that the three unassigned keys are randomly assigned to the three terminals, or that they are assigned one-to-one according to a preset rule.

[0107] In some embodiments, when the key pre-allocation template adaptation condition is not met, the following process is performed: generating a new key for the number of key requests; wherein the number of key authorization terminals configured for the new key is the same as the number of key authorization terminals; sending a new key to each of the terminals in the number of key requests, wherein the new key sent to each terminal is different, and sending the new key to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key is used for the terminals in the number of key requests to verify the access credential of the wireless network device, and to access the wireless network through the wireless network device after successful verification.

[0108] As an example, the number of key-authorized terminals and the number of key requests are obtained from the terminal access wireless network requests. For instance, if three terminal requests to access the wireless network are received, each request seeking a key, then the number of key requests is the same as the number of terminals sending the requests. Each request also carries the number of key-authorized terminals for the requested key, which is the number of terminals for which the requested key can be used. For example, user A requests a key, but the key-authorized terminals for that key are 3, meaning user A can access the wireless network on three terminals using the allocated key. When the number of key-authorized terminals is different from the number of terminals set in the key pre-allocation template, or when the actual number of unallocated keys in the corresponding key pre-allocation template is less than the number of key requests, i.e., assuming... Suppose that the number of key requests obtained from the terminal's request to access the wireless network is 3, and the number of authorized terminals for these three keys is 2. However, the key database does not have an unassigned key with the number of key requests corresponding to the key pre-allocation template (key with 2 authorized terminals) (i.e., 3 keys with 2 authorized terminals). Therefore, a new key with the number of key requests is generated, that is, 3 different new keys are generated. Each key is configured to authorize 2 terminals. Since three terminal requests to access the wireless network have been received, a new key is returned to each of the three terminals that sent the request. The process of determining the one-to-one correspondence between the three new keys and the three terminals is not limited. It can be that the three new keys are randomly assigned to the three terminals, or that they are assigned one-to-one according to a preset rule.

[0109] In some embodiments, the number of unassigned keys can be kept above a certain threshold, which can be half of the upper limit of the number of unassigned keys, thereby ensuring that the configured keys can be sent directly to the user in most cases, improving network access efficiency and user experience.

[0110] In some embodiments, a detection event is created for the number of unassigned keys. When the number of unassigned keys is detected to be less than half of the upper limit of unassigned keys, a new key is generated and sent to the wireless network device, so that the wireless network device configures the new key as an access credential for accessing the wireless network.

[0111] In some embodiments, the detection event can be a triggered detection event, that is, once a key allocation event occurs, the number of unallocated keys after the key allocation user is detected, or the detection event can be a periodic detection event, that is, the number of unallocated keys is detected once every certain period of time.

[0112] The following description describes a method for maintaining the number of detection events triggered by the above-mentioned detection events.

[0113] In some embodiments, the number of key requests is obtained from the terminal's request to access the wireless network. After completing an operation of sending a key to the terminal, when the actual number of unassigned keys in the key database is less than the number of key requests, a first difference is determined between the actual number of unassigned keys in the key database and the upper limit of the number of unassigned keys. A new key with the number of the first difference is generated. The new key with the number of the first difference is sent to the wireless network device so that the wireless network device configures the new key with the number of the first difference as the access credential of the wireless network.

[0114] For example, if a request returns 80 keys to the terminal, but the key database only has 30 unassigned keys (keys that have been configured as access credentials by the wireless network device, with a maximum of 100), then 70 new keys are directly generated and sent to the wireless network device. These 70 new keys are then configured, and the key database will then have 100 keys that can be used directly, thus completing a dynamic maintenance process for the number of unassigned keys.

[0115] In some embodiments, step 103, sending a key to the terminal, can be implemented through the following technical solutions: obtaining the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, performing the following processing: generating a new key for the number of key requests; sending a new key to each terminal among the terminals with the number of key requests, wherein the new key sent to each terminal is different; when sending a new key to each terminal among the terminals with the number of key requests, the following technical solution can also be performed: sending the new key to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key is used for the terminal to verify through the access credential of the wireless network device, and access the wireless network through the wireless network device after successful verification.

[0116] As an example, the above implementation describes a batch key request process. Multiple terminals (e.g., 70 terminals) can send a request to the server to access the wireless network through a web interface, requesting 70 keys. However, if only 30 keys are unassigned, 70 new keys are directly generated. The number of new keys requested is sent to each of the 70 terminals through the web interface. While sending the number of new keys requested to each of the 70 terminals, the 70 new keys are also sent to the wireless network device so that the wireless network device can configure the 70 new keys as access credentials for the wireless network. The new keys are used by the terminals to verify their access credentials through the wireless network device. After successful verification, the terminals can access the wireless network through the wireless network device. After returning the new keys to the terminals, in addition to displaying the new keys on the terminals, a prompt message can also be displayed to indicate that the returned new keys have not yet been configured as access credentials for the wireless network and that a waiting period is required. This waiting period can be an estimate based on historical data, or a prompt message indicating that the configuration as access credentials for the wireless network has been detected and has taken effect is sent to the terminals.

[0117] In some embodiments, step 103, sending a key to the terminal, can be implemented through the following technical solution: obtaining the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, performing the following processing: determining a second difference between the actual number of unassigned keys in the key database and the number of key requests; sending one unassigned key to each of the actual number of terminals, and the unassigned keys sent to each of the actual number of terminals are different; generating a new key equal to the second difference; sending a new key to each of the terminals equal to the second difference, and the new keys sent to each of the terminals equal to the second difference are different, wherein the actual number of terminals and the number of terminals equal to the second difference are each different terminals; when sending the new key equal to the second difference to the terminals equal to the second difference, the following technical solution can also be performed: sending the new key equal to the second difference to the wireless network device, so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key equal to the second difference is used for the terminals equal to the second difference to verify through the access credential of the wireless network device, and access the wireless network through the wireless network device after successful verification.

[0118] As an example, the above implementation describes a batch key request process. Multiple terminals (e.g., 70 terminals) can send requests to the server for access to the wireless network via a web interface, requesting 70 keys. However, only 30 keys may be unassigned. One unassigned key is sent to each of the 30 terminals via the web interface, for a total of 30 unassigned keys, which are the 30 unassigned keys in the key database corresponding to the number of key requests. Then, 40 new keys (the second difference) are generated. One new key is then sent to each of the remaining 40 terminals via the web interface, for a total of 40 new keys. Finally, the process is repeated for each of the 40 terminals. When 40 new keys are required, 40 new keys are simultaneously sent to the wireless network device so that the wireless network device can configure these 40 new keys as access credentials for the wireless network. These new keys are used by the terminal to verify its access credentials through the wireless network device, and upon successful verification, the terminal can access the wireless network. After returning the new keys to the terminal, in addition to displaying the new keys on the terminal, a prompt message can also be displayed to indicate that the returned new keys have not yet been configured as access credentials for the wireless network and that a waiting period is required. This waiting period can be an estimate based on historical data, or a prompt message indicating that the configuration as access credentials for the wireless network has been detected and is now effective can be sent to the terminal.

[0119] In some embodiments, after sending the key to the terminal in step 103, for example, after sending a new key of the number of the second difference to the terminal, the following technical solution may also be performed: generating a set upper limit number of new keys; sending the upper limit number of new keys to the wireless network device, so that the wireless network device configures the upper limit number of new keys as access credentials for the wireless network.

[0120] As an example, after sending the key to the terminal in step 103, for example, after sending a new key with the number of the second difference to the terminal, the number of unassigned keys of the corresponding type is zero, and the set upper limit number of new keys is directly generated; the upper limit number of new keys is sent to the wireless network device so that the wireless network device configures the upper limit number of new keys as access credentials for the wireless network, and then there are 100 keys that can be used directly in the key database, thus completing a process of dynamic maintenance of the number of unassigned keys.

[0121] In some embodiments, sending a key to the terminal in step 103 can be achieved by the following technical solution: obtaining the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is not less than the number of key requests, performing the following process: sending an unassigned key to each terminal among the terminals with the number of key requests, and the unassigned key sent to each terminal is different.

[0122] As an example, the above implementation describes a process of requesting keys in batches. Multiple terminals (e.g., 70 terminals) can send a request to the server to access the wireless network through a web interface. The number of keys requested is 70, but there may be 100 unassigned keys. In this case, one unassigned key is sent directly to each of the 70 terminals, for a total of 70 unassigned keys.

[0123] In some embodiments, after sending the key to the terminal in step 103, for example, after sending the number of unallocated keys to the terminals that requested the key number one by one, the following technical solution can also be performed: determining the third difference between the actual number of unallocated keys in the key database and the median number of unallocated keys; generating a new key with the number of the third difference; and sending the new key to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network.

[0124] As an example, after sending the number of keys to the terminal equal to the number of key requests, the number of unassigned keys of the corresponding type decreases. For instance, if there were originally 100 unassigned keys (assuming 100 is the upper limit and 50 is the median), after returning 70 unassigned keys to the terminal, there are only 30 unassigned keys left, which can be used to directly generate 20 (the third difference) new keys. Sending 20 new keys to the wireless network device allows the wireless network device to configure the new keys (up to the upper limit) as access credentials for the wireless network. Afterward, the key database will have 50 keys that can be used directly, thus completing a dynamic maintenance process for the number of unassigned keys. The reason why the number is not directly increased to the upper limit is that this maintenance is performed after a request and the number of keys responding to the request is sufficient. It is not necessary to increase the number of keys to the upper limit to avoid wasting keys.

[0125] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0126] See Figure 4 , Figure 4 This is a system architecture diagram of the wireless network access processing method provided in the embodiments of this application. Figure 4 The architecture shown is one implementation of a wireless network access processing method, which enables unified generation and management of random keys. To ensure that users obtain keys for the wireless network that are immediately usable, all key generation and distribution are pre-allocated to the wireless network devices through a pre-distribution mechanism, guaranteeing that the keys obtained by users are usable keys already deployed on the devices. Figure 4The architecture shown includes the following modules: a random key generation module (PPskmodule), which generates random keys and supports configuration of multiple key generation methods. The generated keys can be configured in the following forms: uppercase letters, combinations of lowercase letters and numbers, combinations of lowercase letters and numbers, and numbers. This module also supports key grouping and key uniqueness within groups (achieved through a key collision prevention mechanism); the random key generation module can also be configured with an encryption module (CryptModule): this module provides encryption services. Due to the strong privacy requirements of keys, the security of key encryption storage and transmission must be ensured. This encryption module supports configuration of multiple encryption methods, including symmetric and asymmetric keys. The encryption module uses symmetric keys for key encryption and storage; and a key pre-allocation module (RKPSModule). e) The key pre-allocation module performs key pre-allocation for a group or enterprise, supporting multiple pre-allocation templates and dynamically maintaining them. For example, it supports three key templates limiting the number of terminals to 1, 10, and 20, and can also display a key template with an unlimited number of terminals. At the initial architecture startup, the key pre-allocation module can distribute the keys of the above three key templates to wireless network devices, such as access controllers, to make the keys effective on the wireless network devices in advance. Then, based on the user's key configuration requirements, it returns the keys already effective on the devices to the user's terminals. When a key limiting the number of terminals to 1 is requested, it returns the key with that limitation to 1 terminal to the user's terminals. Furthermore, the key pre-allocation module supports dynamic adjustment of pre-allocated keys (keys that have been effective but not yet returned to the user). When the number of each type of pre-allocated key is less than half of the upper limit, the pre-allocated key maintenance mechanism is triggered, and the keys are distributed... The newly added pre-allocated keys to wireless network devices ensure that the number of available pre-allocated keys is always maintained at a healthy level. The Event Detection Module is responsible for detecting the synchronization status of keys in the database and keys on the devices. If an inconsistency is found, a rollback operation is performed. For example, if a key is generated and sent to a wireless network device, but the device does not receive the key or a problem occurs during key deployment, the Event Detection Module rolls back the key and deletes the pre-allocated key from the Redis database. The Redis database stores allocated dynamic keys and pre-allocated keys, while the MySQL database stores allocated permanent keys. Dynamic keys have a validity period within a specific time range, while permanent keys have no expiration date and are permanently valid. The functions of the above modules are all implemented through the management services provided by the core network cloud management platform.

[0127] In some embodiments, in response to the initialization request from the social client mini-program, the network management of the corresponding enterprise is initialized. In response to the key creation request from the social client mini-program, the random key generation module (PPskModule) is triggered to generate a key. The random key generation module (PPskModule) implements two functionalities: a key generation algorithm and a key anti-collision mechanism. The key generation algorithm provides three generation configuration modes, each involving three character sets: 1. The character set consists of 12-bit characters, generated from 26 uppercase letters, 26 lowercase letters, and 10 digits; 2. The character set consists of 10-bit characters, generated from 26 lowercase letters and 10 digits; 3. The character set consists of 8-bit characters... The key generation algorithm, based on the aforementioned character set and a random seed generator, uses a 10-digit number to generate a key. The random seed generator selects corresponding characters from the character set to form the key. There are two methods for implementing the random seed generator: obtaining random numbers by reading the ` / dev / urandom` and ` / dev / random` files. These two files record the operating system's entropy pool, which represents the environmental noise of the current system and describes the degree of system disorder. Environmental noise consists of at least one of the following: memory usage, file usage, the number of different types of processes, etc. Typically, system noise is lower during boot. The difference between these two generators lies in the random pool in ` / dev / random` (random...). The random pool of / dev / urandom relies on system interrupts. When the number of system interrupts is insufficient, the / dev / random device will remain blocked, and processes attempting to read will enter a waiting state until the number of system interrupts is sufficient. The / dev / random device can guarantee the randomness of the data. The random pool of / dev / urandom does not rely on system interrupts, thus avoiding process busy or waiting situations. Therefore, the wireless network access processing method provided in this application generates random numbers by reading the / dev / urandom file, and then selects the corresponding character from the character set as the key based on the random number. The keys involved in the wireless network access processing method provided in this application all need to be grouped. Different enterprises and different communities are in different groups, and it is necessary to ensure that the key is unique within the group. The key can uniquely identify the user to whom the key is assigned, thereby tracing back the user's relevant information. The key anti-collision mechanism involved is implemented by a Bloom filter. When generating keys in the above implementation method, previously generated keys are first filtered by a Bloom filter. If a key has been generated before, it is discarded until a new key that does not exist in the database is generated.

[0128] In some embodiments, see Figure 5 , Figure 5This is a schematic diagram illustrating the deduplication process of the wireless network access processing method provided in this application. When an element d or e is added to set S, K hash functions (hash functions h, such as h1, h2, h3) are used to map the existing elements in the set to K points in a bit array, and these points are set to 1. For example, elements a, b, and c, which already exist in set S, are used for deduplication retrieval. For instance, if the deduplication retrieval targets d and e, K hash functions (hash functions h, such as h1, h2, h3) are used to map d and e to obtain K points. If any of these K points is 0, the element being checked is definitely not an element already existing in set S. If all K points are 1, the element being checked may exist in the set. This is then checked using a Bloom filter. The difference between a hash function and a bitmap is that a Bloom filter uses multiple hash functions, with each string corresponding to k bits, thus reducing the probability of collisions. When applying it, the management first determines the number of elements to add, n (the total number of all generated keys), and the acceptable error rate, P. Using these two parameters, the system can automatically configure the corresponding hash function, bit array, and other parameters of the Bloom filter. A Bloom filter can be implemented using a Redis database. After a batch of keys is generated, the Bloom filter in the Redis database checks for duplicates to see if any previously generated keys exist. If so, a new key is generated using the random key generation module, and the Bloom filter is used again for checking until a new batch of keys is generated that do not exist in the database and is returned to the user.

[0129] In some embodiments, the key is highly private, therefore the security of key storage and transmission must be ensured. This necessitates encrypted storage and transmission of the key. The external interface uses a Hypertext Transfer Protocol (HTTP) with security as its goal to ensure the security of key transmission. Initial authentication and authorization of users are performed using JWT tokens (JSON Web Tokens). Regarding key storage, a data breach could cause incalculable losses to the enterprise; therefore, encrypted key storage and decryption upon return to the user must be considered. Encryption methods include symmetric and asymmetric encryption. Symmetric encryption algorithms use the same key for encryption and decryption, offering very fast encryption speeds suitable for frequent data transmission. Asymmetric encryption algorithms use different keys for encryption and decryption, constructed using mathematically difficult problems, typically resulting in slower encryption and decryption speeds, suitable for occasional data transmission. The advantage is convenient key transmission. Common asymmetric encryption algorithms include RSA, ECC, and EIGamal. A random AES key is generated, and the wireless network key is encrypted using AES. The RSA algorithm is then used to encrypt the key. The AES key is encrypted with a public key. Even if the encrypted AES key is intercepted during transmission, it's useless to the interceptor because they don't know the RSA algorithm's private key and cannot decrypt it to obtain the original AES key. Therefore, they cannot decrypt the wireless network key encrypted with AES. The AES key is encrypted using the RSA algorithm and transmitted to the receiver, who decrypts it to obtain the AES key. Then, the sender and receiver use the AES key to communicate. Hypertext Transfer Protocol (HTTP) protocols, designed for security, already use asymmetric encryption algorithms like RSA to ensure data transmission security. Symmetric encryption algorithms can be used for storage, resulting in less performance loss. The specific interaction process includes: binding the generated key with the returned user and storing it encrypted; when the user retrieves the key information, the ciphertext is decrypted and the key is returned to the user.

[0130] In some embodiments, see Figure 4The key pre-allocation module is the main implementation of the wireless network access processing method provided in this application embodiment. It involves two functional points: multiple pre-allocation templates and dynamic maintenance of the pre-allocation key pool. The wireless network access processing method provided in this application embodiment supports three pre-allocation templates: pre-allocation templates with a limit of 1, 10, and unlimited terminals. When creating a new enterprise or community group, at least one configured key matching the creation requirements is created for the enterprise or community (the configuration differs in the character set of the key source). These keys are unique keys generated by the random key generation module as a random string of several characters and filtered by a Bloom filter. After key generation and filtering, the keys are stored in a Redis database for convenient subsequent allocation of pre-allocated keys. After key creation, the created key is... The key is distributed to the corresponding wireless network device to make it effective, facilitating subsequent distribution to users. In response to a user's request, based on the user's requirement for a pre-allocated key template, the key that has already been effective on the device is returned to the user. For example, if the user requests to generate a key that limits the number of terminals to one, the key with a limit of one terminal is returned to the user from the Redis database, and the pre-allocated key in the Redis database is transferred to the MySQL database, indicating that the key has been assigned to a specific user for easy backtracking. If the requirement of the pre-allocated template cannot be met, a new batch of keys is created separately and returned to the user's terminal. At this time, the new key obtained by the user's terminal is temporarily unusable, and the new key is distributed to the wireless network device. It can only be used after the new key is deployed and effective on the wireless network device.

[0131] In some embodiments, the key pre-allocation module dynamically maintains the pre-allocated key pool to ensure that the number of pre-allocated keys is at a healthy level (at least greater than half of the upper limit of pre-allocated keys). Specifically, this includes two maintenance strategies: 1. When the number of keys requested is greater than the total number of pre-allocated keys (keys already in effect), a new batch of keys is created and returned to the user's terminal. At this time, the new keys obtained by the user's terminal are temporarily unusable and must be deployed and effective on the wireless network device before they can be used. In this strategy, the key pre-allocation module needs to asynchronously maintain the total number of pre-allocated keys to reach the upper limit for convenient subsequent maintenance; 2. When the number of keys requested is not greater than the total number of pre-allocated keys, a sufficient number of pre-allocated keys are returned to the user's terminal. At this time, the new keys obtained by the user's terminal can take effect immediately. Simultaneously, in this strategy, the key pre-allocation module asynchronously checks whether the total number of pre-allocated keys is half of the upper limit. If the total number of pre-allocated keys is less than half, a certain number of pre-allocated keys need to be generated to keep the number of pre-allocated keys at a healthy level. The process of distributing keys to wireless network devices can be as follows: first, the key is distributed to the equipment vendor's cloud platform, and then the key is sent to the wireless network device through the equipment vendor's cloud platform.

[0132] In some embodiments, the event detection module is used to detect the synchronization status of the key in the database and the key on the device. If the key in the database and the key on the device are inconsistent, a rollback operation is performed. For example, the server generates a key and distributes it to the wireless network device through the wireless network access processing method provided in this application embodiment, but the key is not successfully deployed in the wireless network device at this time. Then, the event detection module is used to perform a rollback of the key operation and delete the key from the Redis database. The key operation in this scheme involves three types, including: key creation operation, which involves key creation and the subsequent effective process on the wireless network device; key deletion operation, which involves key deletion and the subsequent deletion process on the wireless network device; and pre-allocated key creation operation, which involves... This involves the creation of pre-allocated keys and their subsequent activation on wireless network devices. The event detection module utilizes an event queue. When the three operations mentioned above perform corresponding database write or delete operations, a corresponding event needs to be generated and added to the event queue. At the other end of the event queue, the module synchronously waits for the event processing result. If the event fails, the corresponding rollback logic is triggered to ensure that the key status in the database is consistent with that on the device. Taking the pre-allocated key creation process as an example, when a pre-allocated key is generated, it is written to the Redis database. At the same time, the pre-allocation event in the queue will wait for whether the key deployment is successful. If the pre-allocated key does not take effect on the wireless network device, the pre-allocation event will perform a rollback operation and delete the pre-allocated key from Redis.

[0133] In some embodiments, a batch of keys is pre-configured on the wireless network device through the pre-distribution key method in the wireless network access processing method provided in this application. When the user's terminal obtains a key, this pre-allocated available key is directly returned, which can significantly shorten the key activation time and greatly improve the user experience. By dynamically maintaining the size of the pre-allocated key pool, it is ensured that there are always enough pre-allocated keys available for users. Multiple templates of pre-allocated keys are maintained in the pre-allocated key pool to adapt to more flexible allocation needs. For example, keys with a terminal limit of 1 and 10, keys with an expiration time of 8 hours and keys that never expire are maintained. When the user's terminal needs a key, the corresponding pre-allocated key is returned to the user's terminal. Through a series of safeguards, the availability and security of the keys received by the user are guaranteed. For example, the consistency between the key received by the user and the key deployed on the wireless network device is guaranteed. Based on the PPSK protocol, different random keys can be generated for the user, which is more secure than the globally shared key authentication method PSK. An event mechanism ensures that the key obtained by the user is a key that is effective on the wireless network device. Encrypted storage of the key prevents huge losses caused by data breaches.

[0134] The following description continues to illustrate the exemplary structure of the wireless network access processing device 255 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the wireless network access processing device 255 in the memory 250 may include: a random key generation module 2551, used to generate a key for a terminal to access the wireless network; a key pre-allocation module 2552, used to send the key to the wireless network device so that the wireless network device configures the key as an access credential for accessing the wireless network; and a sending module 2553, used to send the key to the terminal in response to the terminal's request to access the wireless network so that the terminal can verify the access credential of the wireless network device based on the key, and access the wireless network device after successful verification.

[0135] In some embodiments, the random key generation module 2551 is further configured to: in response to a key creation request from a terminal or another terminal distinct from the terminal, determine a set of characters for generating a key; acquire a file containing system environmental noise and obtain random numbers from the file using a random number acquisition function; select characters corresponding to the random numbers from the character set as a pending key; when the pending key is duplicated with a key already stored in the key database, continue generating a new pending key; when the pending key is not duplicated with an existing key, determine the pending key as the key for the terminal to access the wireless network.

[0136] In some embodiments, before determining the pending key as the key for the terminal to access the wireless network when the pending key does not duplicate an existing key, the random key generation module 2551 is further configured to: map the pending key to at least one point in a bit array using at least one hash function; and determine that the pending key does not duplicate an existing key when there is a zero value in at least one point.

[0137] In some embodiments, after generating a key for a terminal to access a wireless network, the random key generation module 2551 is further configured to: encrypt the key using an encryption key to obtain ciphertext of the key; store the ciphertext of the key in a key database and record the key as an unassigned key; before sending the key to the terminal, the sending module 2553 is further configured to: decrypt the ciphertext of the key using a decryption key to obtain the key to be sent to the terminal; wherein the encryption key and the decryption key are the same.

[0138] In some embodiments, after sending the key to the wireless network device, the key pre-allocation module 2552 is further configured to: detect the configuration of the wireless network device for the key; and remove the ciphertext of the key from the key database if the key is not successfully configured within a set detection period.

[0139] In some embodiments, after sending the key to the terminal, the sending module 2553 is further configured to: record the key as an assigned key and bind the key and the terminal information; encrypt the binding result using an encryption key to obtain ciphertext of the binding result and store the ciphertext of the binding result in a key database; in response to a request from the terminal to reconnect to the wireless network, query the key database for the ciphertext of the binding result of the corresponding terminal; and decrypt the ciphertext of the binding result using a decryption key to obtain the key in the binding result, so as to send the key to the terminal again.

[0140] In some embodiments, the sending module 2553 is further configured to: obtain a key request type from a terminal's request to access the wireless network; search a key database according to the key request type; and when an unassigned key matching the key request type is found in the key database, send the unassigned key matching the key request type to the terminal; wherein the key request type includes: a permanent key and a dynamic key.

[0141] In some embodiments, the sending module 2553 is further configured to: obtain the number of key-authorized terminals and the number of key requests from the terminal's request to access the wireless network; when the key pre-allocation template adaptation conditions are met, query the key database for the number of unallocated keys corresponding to the key pre-allocation template, and send an unallocated key to each terminal among the terminals with the number of key requests, wherein the unallocated key sent to each terminal is different; wherein the key pre-allocation template adaptation conditions include: the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys corresponding to the key pre-allocation template is not less than the number of key requests.

[0142] In some embodiments, the sending module 2553 is further configured to: when the key pre-allocation template adaptation condition is not met, perform the following processing: generate a new key for the number of key requests; wherein the number of key authorization terminals configured for the new key is the same as the number of key authorization terminals; send a new key to each terminal in the number of key requests, and the new key sent to each terminal is different, and send the new key to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key is used for the terminals in the number of key requests to verify through the access credential of the wireless network device, and access the wireless network through the wireless network device after successful verification.

[0143] In some embodiments, the sending module 2553 is further configured to: obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unallocated keys in the key database is less than the number of key requests, perform the following processing: generate a new key for the number of key requests; send a new key to each terminal among the terminals with the number of key requests, wherein the new key sent to each terminal is different; when sending a new key to each terminal among the terminals with the number of key requests, the key pre-allocation module 2552 is further configured to: send the new key to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key is used for the terminal to verify through the access credential of the wireless network device, and access the wireless network through the wireless network device after successful verification.

[0144] In some embodiments, the key pre-allocation module 2552 is further configured to: when the actual number of unallocated keys in the key database is less than the number of key requests, perform the following processing: determine a first difference between the actual number of unallocated keys in the key database and the upper limit number of unallocated keys; generate a new key with the number of the first difference; and send the new key with the number of the first difference to the wireless network device so that the wireless network device configures the new key with the number of the first difference as the access credential of the wireless network.

[0145] In some embodiments, the sending module 2553 is further configured to: obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, perform the following processing: determine a second difference between the actual number of unassigned keys in the key database and the number of key requests; send an unassigned key to each of the actual number of terminals, and the unassigned keys sent to each of the actual number of terminals are different; generate a new key equal to the second difference; send a new key to each of the terminals equal to the second difference, and the new keys sent to each of the terminals equal to the second difference are different, wherein the terminals of the key request number and the terminals of the second difference are each different terminals; when sending a new key to each of the terminals of the second difference, the key pre-allocation module 2552 is further configured to: send the new key equal to the second difference to the wireless network device, so that the wireless network device configures the new key as an access credential for the wireless network; wherein the new key equal to the second difference is used for the terminals of the second difference to verify the access credential of the wireless network device, and access the wireless network device after successful verification.

[0146] In some embodiments, after sending a new key to each of the terminals whose number is the second difference, the key pre-allocation module is further configured to: generate a set upper limit number of new keys; send the upper limit number of new keys to the wireless network device so that the wireless network device configures the upper limit number of new keys as access credentials for the wireless network.

[0147] In some embodiments, the sending module 2553 is further configured to: obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is not less than the number of key requests, perform the following processing: send an unassigned key to each terminal among the terminals with the number of key requests, and the unassigned key sent to each terminal is different.

[0148] In some embodiments, after sending an unassigned key to each of the terminals requesting the key, the key pre-allocation module 2552 is further configured to: determine a third difference between the actual number of unassigned keys in the key database and the median number of unassigned keys; generate a new key with the third difference in number; and send the new key to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network.

[0149] In some embodiments, the random key generation module 2551 is further configured to: determine the number of key requests for all requests to access the wireless network within the nth historical time range, as the predicted key number for the nth time range; wherein n is an integer and its value satisfies 1≤n≤N, and N is an integer greater than 2; when n is 1, generate a key that conforms to the predicted key number for the nth time range within the Nth time range; when n is a positive integer greater than 1 and not greater than N, generate a key that conforms to the predicted key number for the nth time range within the (n-1)th time range.

[0150] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the wireless network access processing method provided in the embodiments of this application.

[0151] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figures 3A-3D The wireless network access processing method is shown.

[0152] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0153] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0154] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., files that store one or more modules, subroutines, or code sections).

[0155] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0156] In summary, through the embodiments of this application, a key is sent to the wireless network device before being sent to the terminal, so that the wireless network device is pre-configured with a key that can be used immediately. Therefore, when responding to the terminal's request to access the wireless network, the terminal can directly use the key that has been pre-configured on the wireless network device. Thus, the terminal can directly access the wireless network by passing the access verification of the wireless network device based on the key, which greatly improves the speed of accessing the wireless network using the key.

[0157] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A wireless network access processing method, characterized in that, include: Obtain the predicted key number for the nth time range, where the number of key requests for all terminal access to the wireless network within the nth historical time range is used as the predicted key number for the nth time range; n is an integer and its value satisfies 1≤n≤N, where N is an integer greater than 2; when n is 1, generate a key that conforms to the predicted key number for the nth time range within the Nth time range; when n is a positive integer greater than 1 and not greater than N, generate a key that conforms to the predicted key number for the nth time range within the (n-1)th time range. Send a key to the wireless network device so that the wireless network device can configure the key as an access credential to access the wireless network; In response to a terminal's request to access the wireless network, the method sends the key to the terminal, including: obtaining the number of key-authorized terminals and the number of key requests from the terminal's request to access the wireless network; when the key pre-allocation template adaptation conditions are met, querying the key database for the number of unallocated keys corresponding to the key pre-allocation template, and sending one of the unallocated keys to each of the terminals with the number of key requests, wherein the unallocated keys sent to each terminal are different, so that the terminal can verify the access credentials of the wireless network device based on the key, and access the wireless network through the wireless network device after successful verification; wherein, the key pre-allocation template adaptation conditions include: the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys corresponding to the key pre-allocation template is not less than the number of key requests. When the key pre-allocation template adaptation conditions are not met, a new key for the number of key requests is generated; wherein the number of key authorization terminals configured for the new key is the same as the number of key authorization terminals; one new key is sent to each terminal among the terminals of the number of key requests, and the new key sent to each terminal is different, and the new key is sent to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network; wherein the new key is used for the terminals of the number of key requests to verify the access credential of the wireless network device, and to access the wireless network through the wireless network device after successful verification; Specifically, when performing database write or delete operations on the key, a corresponding event is generated and added to the event queue, and the processing result of the event is awaited. If the processing result is a failure, the corresponding rollback logic is triggered.

2. The method according to claim 1, characterized in that, The key for generating the number of predicted keys that conforms to the nth time range includes: In response to a key creation request from the terminal or a terminal other than the terminal, a character set for generating the key is determined; The following process is performed iteratively until the number of keys reaches the predicted number of keys: Obtain a file containing system environmental noise, and obtain random numbers from the file using a random number generation function; Select the character corresponding to the random number from the character set as the pending key; If the pending key is the same as a key already stored in the key database, a new pending key will be generated. When the pending key does not duplicate the stored key, the pending key is determined as the key for the terminal to access the wireless network.

3. The method according to claim 2, characterized in that, Before determining the undetermined key as the key for the terminal to access the wireless network when the undetermined key does not duplicate the stored key, the method further includes: The undetermined key is mapped to at least one point in a bit array using at least one hash function; When a zero value exists in at least one of the points, it is determined that the pending key is not a duplicate of the stored key.

4. The method according to claim 1, characterized in that, After generating the key that corresponds to the predicted key number within the nth time range, the method further includes: The key is encrypted using the encryption key to obtain the ciphertext of the key; The ciphertext of the key is stored in the key database, and the key is recorded as an unassigned key; Before sending the key to the terminal, the method further includes: The ciphertext of the key is decrypted using the decryption key to obtain the key that will be sent to the terminal. The encryption key is the same as the decryption key.

5. The method according to claim 4, characterized in that, The method further includes: The key is recorded as an assigned key, and the key and the terminal information are bound together. The binding process result is encrypted using the encryption key to obtain the ciphertext of the binding process result, and the ciphertext of the binding process result is stored in the key database. In response to the terminal's request to reconnect to the wireless network, the encrypted binding processing result corresponding to the terminal is queried from the key database; The encrypted data of the binding process result is decrypted using a decryption key to obtain the key in the binding process result, which is then sent to the terminal again.

6. The method according to claim 1, characterized in that, The key database stores unassigned keys, and sending the keys to the terminal includes: Obtain the key request type from the terminal's request to access the wireless network; Search the key database according to the key request type; When an unassigned key matching the key request type is found in the key database, the unassigned key matching the key request type is sent to the terminal; The key request types include: permanent key and dynamic key.

7. The method according to claim 1, characterized in that, Sending the key to the terminal includes: Obtain the number of key requests from the terminal's request to access the wireless network; When the actual number of unassigned keys in the key database is less than the number of key requests, a new key of the number of key requests is generated; Each of the terminals that requested the key sent a new key, and the new key sent to each terminal was different; When sending a new key to each of the terminals requesting the key, the method further includes: The new key is sent to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network; The new key is used by the terminal to verify the access credentials of the wireless network device, and to access the wireless network through the wireless network device after successful verification.

8. The method according to claim 7, characterized in that, The method further includes: When the actual number of unassigned keys in the key database is less than the number of key requests, a first difference is determined between the actual number of unassigned keys in the key database and the upper limit of the number of unassigned keys. Generate a new key with the number of the first difference; Send a new key equal to the first difference to the wireless network device, so that the wireless network device configures the new key equal to the first difference as the access credential of the wireless network.

9. The method according to claim 1, characterized in that, Sending the key to the terminal includes: Obtain the number of key requests from the terminal's request to access the wireless network; When the actual number of unassigned keys in the key database is less than the number of key requests, a second difference between the actual number of unassigned keys in the key database and the number of key requests is determined; One of the unassigned keys is sent to each of the actual number of terminals, and the unassigned keys sent to each of the actual number of terminals are different. Generate a new key with the number of the second difference; A new key is sent to each of the terminals whose number is equal to the second difference, and the new keys sent to each of the terminals whose number is equal to the second difference are different. The number of terminals equal to the actual number and the number of terminals whose number is equal to the second difference are different terminals. When sending the new key to each of the terminals whose number is equal to the second difference, the method further includes: Send a new key equal to the second difference to the wireless network device, so that the wireless network device configures the new key as an access credential for the wireless network; The new key, whose number is equal to the second difference, is used for terminals whose number is equal to the second difference to verify the access credentials of the wireless network device, and to access the wireless network through the wireless network device after successful verification.

10. The method according to claim 9, characterized in that, After sending one of the new keys to each of the terminals whose number is equal to the second difference, the method further includes: Generate a set maximum number of new keys; Send the maximum number of new keys to the wireless network device so that the wireless network device configures the maximum number of new keys as access credentials for the wireless network.

11. The method according to claim 1, characterized in that, Sending the key to the terminal includes: Obtain the number of key requests from the terminal's request to access the wireless network; When the actual number of unassigned keys in the key database is not less than the number of key requests, one unassigned key is sent to each of the terminals in the number of key requests, and the unassigned key sent to each terminal is different.

12. The method according to claim 11, characterized in that, After sending one of the unassigned keys to each of the terminals requesting the key, the method further includes: Determine a third difference between the actual number of unassigned keys in the key database and the median number of unassigned keys; Generate a new key with the number of the third difference; The new key is sent to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network.

13. An access processing device for a wireless network, characterized in that, include: The random key generation module is used to obtain the number of predicted keys for the nth time range. The number of key requests for all terminal access to the wireless network within the nth historical time range is used as the number of predicted keys for the nth time range. n is an integer and its value satisfies 1≤n≤N, where N is an integer greater than 2. When n is 1, a key that conforms to the number of predicted keys for the nth time range is generated within the Nth time range. When n is a positive integer greater than 1 and not greater than N, a key that conforms to the number of predicted keys for the nth time range is generated within the (n-1)th time range. The key pre-allocation module is used to send keys to wireless network devices so that the wireless network devices can configure the keys as access credentials that enable access to the wireless network. A sending module is configured to, in response to a terminal's request to access the wireless network, send the key to the terminal, including: obtaining the number of key-authorized terminals and the number of key requests from the terminal's request to access the wireless network; when the key pre-allocation template adaptation conditions are met, querying the key database for the number of unallocated keys corresponding to the key pre-allocation template's key requests, and sending one of the unallocated keys to each of the terminals with the number of key requests, wherein the unallocated keys sent to each terminal are different, so that the terminal can verify the access credentials of the wireless network device based on the key, and access the wireless network through the wireless network device after successful verification; wherein, the key pre-allocation template adaptation conditions include: the number of key-authorized terminals is the same as the number of terminals set in the key pre-allocation template, and the actual number of unallocated keys corresponding to the key pre-allocation template is not less than the number of key requests; when not... When the key pre-allocation template adaptation conditions are met, a new key is generated for the number of key requests. The number of key-authorized terminals configured for the new key is the same as the number of key-authorized terminals. One new key is sent to each of the terminals in the number of key requests, and the new key sent to each terminal is different. The new key is also sent to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network. The new key is used by the terminals in the number of key requests to verify their access credentials through the wireless network device, and upon successful verification, they access the wireless network through the wireless network device. When performing database write or delete operations on the key, a corresponding event is generated and added to an event queue, awaiting the processing result of the event. If the processing result is a failure, the corresponding rollback logic is triggered.

14. The wireless network access processing apparatus according to claim 13, characterized in that, The random key generation module is further configured to, in response to a key creation request from the terminal or another terminal distinct from the terminal, determine a character set for generating the key; iterate through and execute the following processes until the number of keys reaches the predicted key number: acquire a file containing system environmental noise, and obtain a random number from the file using a random number acquisition function; select a character corresponding to the random number from the character set as a pending key; when the pending key is duplicated with a key already stored in the key database, continue generating a new pending key; When the pending key does not duplicate the stored key, the pending key is determined as the key for the terminal to access the wireless network.

15. The wireless network access processing apparatus according to claim 14, characterized in that, The random key generation module is further configured to map the undetermined key to at least one point in a bit array using at least one hash function; when there is a zero value in the at least one point, it is determined that the undetermined key is not duplicated with the stored key.

16. The wireless network access processing apparatus according to claim 13, characterized in that, The random key generation module is further configured to encrypt the key using an encryption key to obtain the ciphertext of the key; store the ciphertext of the key in the key database and record the key as an unassigned key; the sending module is further configured to decrypt the ciphertext of the key using a decryption key to obtain the key to be sent to the terminal; wherein the encryption key and the decryption key are the same.

17. The wireless network access processing apparatus according to claim 16, characterized in that, The sending module is further configured to record the key as an assigned key and bind the key and the terminal information; encrypt the binding result using the encryption key to obtain the ciphertext of the binding result and store the ciphertext of the binding result in the key database; and, in response to a request from the terminal to reconnect to the wireless network, query the key database for the ciphertext of the binding result corresponding to the terminal. The encrypted data of the binding process result is decrypted using a decryption key to obtain the key in the binding process result, which is then sent to the terminal again.

18. The wireless network access processing apparatus according to claim 13, characterized in that, The sending module is further configured to obtain a key request type from the terminal's request to access the wireless network; search the key database according to the key request type; when an unassigned key matching the key request type is found in the key database, the unassigned key matching the key request type is sent to the terminal; wherein, the key request type includes: permanent key and dynamic key.

19. The wireless network access processing apparatus according to claim 13, characterized in that, The sending module is further configured to obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, a new key of the number of key requests is generated; The key pre-allocation module sends a new key to each of the terminals requesting the key, and the new key sent to each terminal is different; the key pre-allocation module is also used to send the new key to the wireless network device so that the wireless network device configures the new key as the access credential of the wireless network; wherein, the new key is used for the terminal to verify the access credential of the wireless network device, and to access the wireless network through the wireless network device after successful verification.

20. The wireless network access processing apparatus according to claim 19, characterized in that, The key pre-allocation module is further configured to determine a first difference between the actual number of unallocated keys in the key database and the upper limit of the number of unallocated keys when the actual number of unallocated keys in the key database is less than the number of key requests. Generate a new key with the number of the first difference; Send a new key equal to the first difference to the wireless network device, so that the wireless network device configures the new key equal to the first difference as the access credential of the wireless network.

21. The wireless network access processing apparatus according to claim 13, characterized in that, The sending module is further configured to obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is less than the number of key requests, determine a second difference between the actual number of unassigned keys in the key database and the number of key requests; One of the unassigned keys is sent to each of the actual number of terminals, and the unassigned keys sent to each of the actual number of terminals are different. The system generates a new key with a number equal to the second difference; sends one of the new keys to each terminal with a number equal to the second difference, and the new keys sent to each terminal with a number equal to the second difference are different, with the actual number of terminals and the number of terminals with a number equal to the second difference being different terminals; the key pre-allocation module is further configured to send the new keys with a number equal to the second difference to the wireless network device, so that the wireless network device configures the new keys as access credentials for the wireless network; wherein, the new keys with a number equal to the second difference are used for the terminals with a number equal to the second difference to verify their access credentials through the wireless network device, and to access the wireless network through the wireless network device after successful verification.

22. The wireless network access processing apparatus according to claim 21, characterized in that, The key pre-allocation module is further configured to send a new key to each of the terminals whose number is equal to the second difference, generate a set upper limit number of new keys, and send the upper limit number of new keys to the wireless network device so that the wireless network device configures the upper limit number of new keys as access credentials for the wireless network.

23. The wireless network access processing apparatus according to claim 13, characterized in that, The sending module is further configured to obtain the number of key requests from the terminal's request to access the wireless network; when the actual number of unassigned keys in the key database is not less than the number of key requests, send one of the unassigned keys to each of the terminals with the number of key requests, and the unassigned keys sent to each terminal are different.

24. The wireless network access processing apparatus according to claim 23, characterized in that, The key pre-allocation module is further configured to, after sending one of the unallocated keys to each of the terminals requesting the key number, determine a third difference between the actual number of unallocated keys in the key database and the median number of unallocated keys; and generate a new key with the number of the third difference. The new key is sent to the wireless network device so that the wireless network device configures the new key as an access credential for the wireless network.

25. An electronic device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the wireless network access processing method according to any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, It stores executable instructions for use by a processor to implement the wireless network access processing method according to any one of claims 1 to 12.

27. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Support of multiple pre-shared keys in access point

    CN102204304A

  • Terminal authentication method, network access methods, server, wireless access point and terminal

    CN105491093A