Wireless network access method, device, equipment and storage medium
By using coding subtables in wireless network distribution networks to shorten the encoded data amount of service set identification and password and encrypted transmission, the problem of long distribution time for screenless devices is solved, and the distribution network efficiency and stability are improved.
Patent Information
- Application Number
- CN202210634362.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-06-07
AI Technical Summary
During the existing wireless network distribution process, screenless devices such as sockets, light bulbs, etc. cannot access the network through input network information, resulting in long distribution time and easy to be affected by interference, and low transmission efficiency.
By determining the encoding subtable in the preset encoding table, the encoded data amount of the service set identifier and password is shortened, the encoded data is generated and propagated to the network device to be allocated, and the encryption key and salt value are used to encrypt the transmission, reducing the packet length and increasing the packet length Distribution network efficiency.
It shortens the distribution network time, improves transmission efficiency, enhances the anti-interference ability of the distribution network, and ensures the stability of wireless network access.
Smart Images

Figure CN114980101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a wireless network access method, device, equipment and storage medium. Background Art
[0002] Network configuration refers to the process of allowing the device to be configured to access the wireless network. Only after the device is connected to the network can it report data to the cloud and receive instructions from the cloud. For devices with screens and input, such as mobile phones and tablets, users can directly enter the service set identifier and / or password through the interface to allow the device to connect to the wireless network. However, for screenless devices, such as sockets and light bulbs, users cannot allow the device to access the network by entering Internet access information. At this time, these devices need to be configured.
[0003] In the existing solution, the user inputs the service set identifier and / or password through the network configuration device, and sends the service set identifier and / or password to the network configuration device to complete the network configuration. However, the effective data transmitted each time between the network configuration device and the network configuration device is very small. For example, each message in the broadcast mode transmits 1 byte, and each multicast transmits 3 bytes, which results in the network configuration data needing to be split into multiple messages for transmission. In addition, factors such as packet loss, signal strength, and interference from other devices have an impact, resulting in disadvantages such as long network configuration time. Summary of the invention
[0004] The main purpose of the present invention is to provide a wireless network access method, device, equipment and storage medium, aiming to solve the problem of how to reduce the long network configuration time.
[0005] To achieve the above object, the present invention provides a method for accessing a wireless network, the method for accessing a wireless network comprising the following steps:
[0006] Determine a coding subtable in a preset coding table according to the service set identifier and / or password input by the user, wherein the number of characters in the coding subtable is less than the number of characters in the coding table;
[0007] Encoding the service set identifier and / or the password according to the encoding subtable to obtain encoded data;
[0008] Generate a message according to the coded data, and propagate the message to the network device to be configured.
[0009] In one embodiment, the step of determining a coding subtable in a preset coding table according to a service set identifier and / or password input by a user comprises:
[0010] Determining a character subset in a preset encoding table according to the service set identifier and / or the password;
[0011] determining a width of the character subset;
[0012] The encoding subtable is determined according to the character subset and the width.
[0013] In one embodiment, after the step of determining a character subset in a preset encoding table according to the service set identifier and / or the password, the method further includes:
[0014] The character subset is sent to the network device to be configured, so that the network device to be configured generates the encoding subtable according to the character subset.
[0015] In one embodiment, the step of generating a message according to the encoded data includes:
[0016] Generate encryption keys and salt values based on the device information of the network to be configured;
[0017] The device information and the encoded data are encrypted according to the encryption key and the salt value to obtain the message.
[0018] To achieve the above object, the present invention further provides a wireless network access device, the wireless network access device comprising:
[0019] A compression module, configured to determine a coding subtable in a preset coding table according to a service set identifier and / or a password input by a user, wherein the number of characters in the coding subtable is smaller than the number of characters in the coding table;
[0020] an encoding module, configured to encode the service set identifier and / or the password according to the encoding sub-table to obtain encoded data;
[0021] The sending module is used to generate a message according to the encoded data and transmit the message to the network device to be configured.
[0022] To achieve the above object, the present invention provides a method for accessing a wireless network, the method for accessing a wireless network comprising the following steps:
[0023] Receive messages sent by distribution network equipment;
[0024] Decoding the encoded data in the message to obtain a service set identifier and / or a password;
[0025] Connecting to a wireless network according to the service set identifier and / or the password.
[0026] In one embodiment, the step of decoding the encoded data in the message to obtain the service set identifier and / or password includes:
[0027] Receiving a character subset sent by the network distribution device;
[0028] Generate a coding subtable according to the character subset;
[0029] The encoded data is decoded according to the encoding subtable to obtain the service set identifier and / or the password.
[0030] In one embodiment, before the step of decoding the encoded data in the message to obtain the service set identifier and / or password, the step further includes:
[0031] Generate a decryption key according to the device information of the device to be configured;
[0032] decrypting the message according to the decryption key;
[0033] If the decryption is successful, the step of decoding the encoded data in the message to obtain the service set identifier and / or password is performed.
[0034] To achieve the above object, the present invention further provides a wireless network access device, the wireless network access device comprising:
[0035] A receiving module, used for receiving messages sent by the distribution network equipment;
[0036] A decoding module, used to decode the encoded data in the message to obtain a service set identifier and / or a password;
[0037] An access module is used to connect to a wireless network according to the service set identifier and / or the password.
[0038] To achieve the above-mentioned purpose, the present invention also provides an access device for a wireless network, wherein the access device for the wireless network includes a memory, a processor, and a wireless network access program stored in the memory and executable on the processor, the access device for the wireless network is a network configuration device or a network configuration device, and when the wireless network access program is executed by the processor, the various steps of the wireless network access method described above are implemented.
[0039] To achieve the above objectives, the present invention also provides a computer-readable storage medium, which stores a wireless network access program. When the wireless network access program is executed by a processor, it implements the various steps of the wireless network access method described above.
[0040] The present invention provides a wireless network access method, device, equipment and storage medium. The network configuration device determines a coding subtable in a preset coding table according to a service set identifier and / or password input by a user, and the number of characters in the coding subtable is less than the number of characters in the coding table; encodes the service set identifier and / or password according to the coding subtable to obtain coding data; generates a message according to the coding data, and transmits the message to the network configuration device. By encoding the service set identifier and / or password through the coding subtable, the amount of the obtained coding data is reduced, thereby shortening the length of the message sent by the network configuration device and reducing the network configuration time. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the hardware structure of a wireless network access device according to an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a flow chart of a first embodiment of a method for accessing a wireless network of the present invention;
[0043] Figure 3 A schematic diagram of the relationship between a network configuration device and a device to be configured in a wireless network access method of the present invention;
[0044] Figure 4 This is a detailed flowchart of step S10 of the second embodiment of the method for accessing a wireless network of the present invention;
[0045] Figure 5 A schematic diagram of a flow chart of a third embodiment of a method for accessing a wireless network of the present invention;
[0046] Figure 6 A schematic diagram of the logical structure of an access device for a wireless network of the present invention;
[0047] Figure 7 The figure is a schematic diagram of the logical structure of the access device of the wireless network of the present invention.
[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] The main solution of the embodiment of the present invention is: the network configuration device determines a coding subtable in a preset coding table according to the service set identifier and / or password input by the user, and the number of characters in the coding subtable is less than the number of characters in the coding table; the service set identifier and / or password are encoded according to the coding subtable to obtain coding data; a message is generated according to the coding data, and the message is transmitted to the network configuration device. By encoding the service set identifier and / or password through the coding subtable, the amount of the obtained coding data is reduced, thereby shortening the length of the message sent by the network configuration device and reducing the network configuration time.
[0051] As an implementation solution, the access device of the wireless network can be as follows Figure 1 shown.
[0052] The embodiment of the present invention relates to a wireless network access device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize connection and communication between these components.
[0053] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a wireless network access program; and the processor 101 may be used to call the wireless network access program stored in the memory 102 and perform the following operations:
[0054] Determine a coding subtable in a preset coding table according to the service set identifier and / or password input by the user, wherein the number of characters in the coding subtable is less than the number of characters in the coding table;
[0055] Encoding the service set identifier and / or the password according to the encoding subtable to obtain encoded data;
[0056] Generate a message according to the coded data, and propagate the message to the network device to be configured.
[0057] In one embodiment, the processor 101 may be configured to call a wireless network access program stored in the memory 102 and perform the following operations:
[0058] Determining a character subset in a preset encoding table according to the service set identifier and / or the password;
[0059] determining a width of the character subset;
[0060] The encoding subtable is determined according to the character subset and the width.
[0061] In one embodiment, the processor 101 may be configured to call a wireless network access program stored in the memory 102 and perform the following operations:
[0062] The character subset is sent to the network device to be configured, so that the network device to be configured generates the encoding subtable according to the character subset.
[0063] In one embodiment, the processor 101 may be configured to call a wireless network access program stored in the memory 102 and perform the following operations:
[0064] Generate encryption keys and salt values based on the device information of the network to be configured;
[0065] The device information and the encoded data are encrypted according to the encryption key and the salt value to obtain the message.
[0066] Or, if Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a wireless network access program; and the processor 101 may be used to call the wireless network access program stored in the memory 102 and perform the following operations:
[0067] Receive messages sent by distribution network equipment;
[0068] Decoding the encoded data in the message to obtain a service set identifier and / or a password;
[0069] Connecting to a wireless network according to the service set identifier and / or the password.
[0070] In one embodiment, the processor 101 may be configured to call a wireless network access program stored in the memory 102 and perform the following operations:
[0071] Receiving a character subset sent by the network distribution device;
[0072] Generate a coding subtable according to the character subset;
[0073] The encoded data is decoded according to the encoding subtable to obtain the service set identifier and / or the password.
[0074] In one embodiment, the processor 101 may be configured to call a wireless network access program stored in the memory 102 and perform the following operations:
[0075] Generate a decryption key according to the device information of the device to be configured;
[0076] decrypting the message according to the decryption key;
[0077] If the decryption is successful, the step of decoding the encoded data in the message to obtain the service set identifier and / or password is performed.
[0078] Based on the hardware architecture of the wireless network access device described above, an embodiment of the wireless network access method of the present invention is proposed.
[0079] Reference Figure 2 , Figure 2 The first embodiment of the wireless network access method of the present invention comprises the following steps:
[0080] Step S10: determining a coding sub-table in a preset coding table according to the service set identifier and / or password input by the user, wherein the number of characters in the coding sub-table is smaller than the number of characters in the coding table.
[0081] Specifically, Figure 3 As shown, the actual network configuration includes a device to be configured with input function as a network configuration device, such as a mobile phone or a personal computer; the actual network configuration also includes a device to be configured, which can be a screenless device, such as a socket or a light bulb; the actual network configuration also includes a network access device that provides a wireless network, such as a WiFi hotspot. The network configuration device sends the network configuration data through the wireless network in a broadcast or multicast manner, and the network configuration device monitors the broadcast or multicast message in the wireless network, extracts the network configuration data from the message, and accesses the wireless network according to the network configuration data.
[0082] If the device to be configured is a device with a screen and input, such as a mobile phone or tablet, the user can directly enter the service set ID and password through the interface of the device with a screen and input, so that the device can connect to the wireless network. However, if the device to be configured is a screenless device, such as a socket or a light bulb, the user cannot enter the Internet access information on the screenless device to connect the device to the wireless network. In this case, the configuration operation can be performed on the device to be configured through the configuration device.
[0083] The network configuration device determines a coding sub-table in a preset coding table according to the SSID (Service Set Identifier) and / or password input by the user, and the number of characters in the coding sub-table is less than the number of characters in the coding table. In other words, the coding table is re-encoded according to the service set identifier and / or password input by the user, shortening the number of bits occupied by each character and reducing the total number of bits required for message transmission. Among them, the coding table is a sub-table in the ASCII (American Standard Code for Information Interchange) table used to represent the service set identifier or password, and the coding table is pre-stored in the network configuration device and the network device to be configured.
[0084] Step S20: Encode the service set identifier and / or the password according to the encoding subtable to obtain encoded data.
[0085] Specifically, the network configuration device encodes the service set identifier and / or password according to the encoding subtable to obtain the encoded data. Exemplarily, the network configuration device uses the encoding subtable to re-encode the string of the service set identifier or password. For example, the string of the service set identifier or password is "AbcdAbcdAbcdAbcd", which has 16 characters in total. Since the newly generated encoding subtable has only 4 characters, 2 bits can be used to represent all the characters. According to the encoding subtable, it can be converted into the following sequence:
[0086]
[0087] Compared with the amount of data encoded by encoding the encoding table, the amount of data encoded by encoding the encoding sub-table is smaller. Exemplarily, the length of the service set identifier is 32 bytes, and the 32 bytes are not repeated. The encoding table has a total of 256 bytes, and 8 bits can represent 32 different characters. The re-encoded encoding sub-table has a total of 32 bytes, and 5 bits can represent 32 different characters. Therefore, the length of the encoded data changes from 32*8=256 bits to 32*5=160 bits, and the amount of encoded data is reduced by 37.5%. Optionally, there are usually multiple repeated characters in the service set identifier. The repeated characters will further reduce the size of the re-encoded encoding subtable. When there are only two different characters in the 32 bytes in the service set identifier, the encoding subtable only needs one bit to represent the two different characters. The length of the encoded data to be transmitted is changed from 32*8=256bit to 32*5=160bit, and the amount of encoded data reduced is (32*8bit-32*1bit)*100% / (32*8bit)=87.5%.
[0088] Step S30, generating a message according to the coded data, and transmitting the message to the network device to be configured.
[0089] Specifically, the network configuration device generates a message according to the coded data, and transmits the message to the network configuration device. Optionally, the message is transmitted to the network configuration device by broadcasting or multicasting.
[0090] When a password is set for the wireless network, the network device to be configured can only passively monitor broadcast / multicast data, and the received data is encrypted by the wireless network. Since the network device to be configured does not have the password of the wireless network at this time, it cannot decrypt the message body. The network device to be configured can only obtain the plaintext information such as the source address, destination address or length in the message, and analyze these three data to determine whether it is network configuration data. If there are a large number of broadcast / multicast interference packets in the network during network configuration, it will affect the network device to be configured and cannot determine which messages are the network configuration data that is really needed, and cannot correctly lock the network configuration data, which will eventually lead to network configuration timeout or failure to obtain network configuration data.
[0091] Therefore, when configuring the network, the user is required to provide the device information of the device to be configured, such as the MAC address (Media Access Control or Medium Access Control, physical address) or SN number (Serial Number, product serial number), etc. Optionally, the configuration device generates an encryption key and salt value based on the device information of the device to be configured; the device information and the coded data are encrypted according to the encryption key and salt value to obtain a message. After receiving the encrypted ciphertext, the device to be configured uses the same algorithm to generate a decryption key based on its own device information, such as the MAC address or SN number, and uses the decryption key to decrypt the ciphertext. If the decryption is successful, it means that this is the required coded data. If the decryption fails, the message is discarded, the next message is listened, and the above steps are repeated until all the coded data are received.
[0092] During the network configuration process, the data sent by the wireless network is encrypted. Although the network device to be configured can receive the data, it cannot decrypt it. The network device to be configured can only extract the three fields of DA (destination MAC address 6 bytes), SA (source MAC address 6 bytes), and LEN (ciphertext length 2 bytes). In the existing solution, SA needs to be kept unchanged, so that the network device to be configured can distinguish and continuously receive data from the same SA during the network configuration process. Only the remaining two fields DA and LEN are available. Before the network device to be configured accesses the wireless network through the password, it can only receive multicast and broadcast messages. This causes some bytes of DA to remain unchanged to identify that this is a multicast / broadcast message. In the end, only 2 to 5 bytes can be used to carry the encoded data. The encoded data needs to be split into multiple small packets for transmission. Due to the large number of packets, the probability of packet loss will increase, and the data transmission time of the network configuration will also increase, which will eventually lead to a long network configuration time and may fail due to timeout or packet loss. After the introduction of identity authentication of the device to be configured, the device to be configured determines the configuration data through the identity authentication mechanism. The SA, DA and LEN fields in the message can be used to carry encoded data. A total of 11 bytes are available, which increases the carrying capacity of each message by 1 to 4 times compared with the existing solution.
[0093] In the technical solution of this embodiment, the network configuration device determines a coding subtable in a preset coding table according to the service set identifier and / or password input by the user, and the number of characters in the coding subtable is less than the number of characters in the coding table; encodes the service set identifier and / or password according to the coding subtable to obtain coding data; generates a message according to the coding data, and transmits the message to the network configuration device. By encoding the service set identifier and / or password through the coding subtable, the amount of the obtained coding data is reduced, thereby shortening the length of the message sent by the network configuration device and reducing the network configuration time.
[0094] Reference Figure 4 , Figure 4 This is a second embodiment of the wireless network access method of the present invention, based on the first embodiment, step S10 includes:
[0095] Step S11, determining a character subset in a preset encoding table according to the service set identifier and / or the password;
[0096] Step S12, determining the width of the encoding subtable according to the character subset;
[0097] Step S13, determining the encoding subtable according to the character subset and the width.
[0098] Specifically, by analyzing the ASCII code table and the service set identifier and / or password, it is found that not all characters can be used as the service set identifier and / or password of the wireless network. Only 94 characters with ASCII code values in the range of [32 to 126] meet the requirements. By re-encoding these 94 characters, a preset encoding table can be obtained, as shown in the following table:
[0099]
[0100]
[0101] The preset encoding table is searched according to the service set identifier or password to find the ASCII code subset that actually needs to be transmitted, and a subset bitmap image, i.e., the character subset, is generated. The bitmap image uses bits to correspond one-to-one with each column and each row of the preset encoding table. If the required character is in the current column or row, the bit corresponding to the row and column in the bitmap image is set to 1, otherwise it is set to 0. The preset encoding table consisting of 94 characters has 10 rows and 10 columns, requiring a total of 3 bytes, and 20 bits can identify the character subset. When the network device receives the 20-bit bitmap, it can restore the situation where the 94 characters are used.
[0102] For example, the service set identifier string is "AbcdAbcdAbcdAbcd", with a total of 16 characters, and the generated bitmap is shown in the following table:
[0103]
[0104] Among them, the first 10 bits represent the rows of the bitmap image, and the last 10 bits represent the columns of the bitmap image.
[0105] Take out all the characters that appear in the service set identifier and form a new encoding subtable according to a certain rule, as shown in the following table:
[0106] value value 0 A 2 c 1 b 3 d
[0107] Among them, four characters only need 2 bits to be represented, the generated encoding subtable has 4 characters, and only 2 bits are needed to represent 4 characters, so the width of the character subset is determined to be 2.
[0108] Optionally, after determining a character subset in a preset coding table according to a service set identifier and / or a password, the character subset is sent to the network device to be configured, so that the network device to be configured generates a coding subtable according to the character subset. Exemplarily, the network configuration device sends a 20-bit bitmap to the network device to be configured, and the network device to be configured generates a coding subtable according to the preset coding table based on the rows and columns identified in the bitmap, and the generated coding subtable is consistent with the coding subtable generated by the network configuration device.
[0109] The network configuration device uses the encoding subtable to re-encode the service set identifier or password string. For example, the service set identifier or password string is "AbcdAbcdAbcdAbcd", which has 16 characters in total. Since the newly generated encoding subtable has only 4 characters, 2 bits can be used to represent all the characters. According to the encoding subtable, it can be converted into the following sequence:
[0110]
[0111] In the technical solution of this embodiment, the network configuration device determines a character subset in a preset coding table according to a service set identifier and / or a password; determines the width of the character subset; and determines a coding subtable according to the character subset and the width. The coding table is reduced by the service set representation and / or the password to obtain a coding subtable, and the service set identifier and / or the password are encoded by the coding subtable to reduce the amount of the obtained coded data, thereby shortening the message length sent by the network configuration device and reducing the network configuration time.
[0112] Reference Figure 5 , Figure 5The third embodiment of the wireless network access method of the present invention comprises the following steps:
[0113] Step S40, receiving a message sent by a distribution network device;
[0114] Step S50, decoding the encoded data in the message to obtain a service set identifier and / or a password;
[0115] Step S60: connecting to a wireless network according to the service set identifier and / or the password.
[0116] Specifically, Figure 3 As shown, the actual network configuration includes a device to be configured with input function as a network configuration device, such as a mobile phone or a personal computer; the actual network configuration also includes a device to be configured, which can be a screenless device, such as a socket or a light bulb; the actual network configuration also includes a network access device that provides a wireless network, such as a WiFi hotspot. The network configuration device sends the network configuration data through the wireless network in a broadcast or multicast manner, and the network configuration device monitors the broadcast or multicast message in the wireless network, extracts the network configuration data from the message, and accesses the wireless network according to the network configuration data.
[0117] If the device to be configured is a device with a screen and input, such as a mobile phone or tablet, the user can directly enter the service set ID and password through the interface of the device with a screen and input, so that the device can connect to the wireless network. However, if the device to be configured is a screenless device, such as a socket or a light bulb, the user cannot enter the Internet access information on the screenless device to connect the device to the wireless network. In this case, the configuration operation can be performed on the device to be configured through the configuration device.
[0118] The network device to be configured receives the message sent by the network configuration device, decodes the coded data in the message, and obtains the service set identifier and / or password. Optionally, a character subset sent by the network configuration device is received; a coding subtable is generated according to the character subset; and the coded data is decoded according to the coding subtable to obtain the service set identifier and / or password. After obtaining the service set identifier and / or password, the network device to be configured connects to the wireless network according to the service set identifier and / or password.
[0119] When a password is set for the wireless network, the network device to be configured can only passively monitor broadcast / multicast data, and the received data is encrypted by the wireless network. Since the network device to be configured does not have the password of the wireless network at this time, it cannot decrypt the message body. The network device to be configured can only obtain the plaintext information such as the source address, destination address or length in the message, and analyze these three data to determine whether it is network configuration data. If there are a large number of broadcast / multicast interference packets in the network during network configuration, it will affect the network device to be configured and cannot determine which messages are the network configuration data that is really needed, and cannot correctly lock the network configuration data, which will eventually lead to network configuration timeout or failure to obtain network configuration data.
[0120] Therefore, when configuring the network, the user is required to provide the device information of the device to be configured, such as the MAC address or SN number, etc. Optionally, the configuration device generates an encryption key and a salt value based on the device information of the device to be configured; the device information and the coded data are encrypted according to the encryption key and the salt value to obtain a message. The device to be configured decodes the coded data in the message and obtains the service set identifier and / or password. Optionally, a decryption key is generated according to the device information of the device to be configured; the message is decrypted according to the decryption key; if the decryption is successful, the coded data in the message is decoded to obtain the service set identifier and / or password. If the decryption fails, the message is discarded, the next message is listened to, and the above steps are repeated until all the coded data are received.
[0121] In the technical solution of this embodiment, the network device to be configured receives the message sent by the network configuration device; decodes the coded data in the message to obtain the service set identifier and / or password; and connects to the wireless network according to the service set identifier and / or password. The service set identifier and / or password are encoded by the encoding subtable to reduce the amount of the obtained coded data, so that the time for the network device to be configured to obtain the message is shortened, thereby improving the network configuration efficiency.
[0122] Reference Figure 6 , a wireless network access device, the wireless network access device comprising:
[0123] The compression module 100 is used to determine a coding subtable in a preset coding table according to a service set identifier and / or a password input by a user, wherein the number of characters in the coding subtable is less than the number of characters in the coding table;
[0124] The encoding module 200 is used to encode the service set identifier and / or the password according to the encoding sub-table to obtain encoded data;
[0125] The sending module 300 is used to generate a message according to the encoded data and transmit the message to the network device to be configured.
[0126] In one embodiment, in determining the encoding sub-table in the preset encoding table according to the service set identifier and / or password input by the user, the compression module 100 is specifically used to:
[0127] Determining a character subset in a preset encoding table according to the service set identifier and / or the password;
[0128] determining a width of the character subset;
[0129] The encoding subtable is determined according to the character subset and the width.
[0130] In one embodiment, after determining a character subset in a preset encoding table according to the service set identifier and / or the password, the compression module 100 is specifically configured to:
[0131] The character subset is sent to the network device to be configured, so that the network device to be configured generates the encoding subtable according to the character subset.
[0132] In one embodiment, in terms of generating a message according to the encoded data, the sending module 300 is specifically used to:
[0133] Generate encryption keys and salt values based on the device information of the network to be configured;
[0134] The device information and the encoded data are encrypted according to the encryption key and the salt value to obtain the message.
[0135] Reference Figure 7 , a wireless network access device, the wireless network access device comprising:
[0136] The receiving module 400 is used to receive the message sent by the distribution network device;
[0137] A decoding module 500, configured to decode the encoded data in the message to obtain a service set identifier and / or a password;
[0138] The access module 600 is used to connect to a wireless network according to the service set identifier and / or the password.
[0139] In one embodiment, in decoding the encoded data in the message to obtain the service set identifier and / or the password, the decoding module 500 is specifically used to:
[0140] Receiving a character subset sent by the network distribution device;
[0141] Generate a coding subtable according to the character subset;
[0142] The encoded data is decoded according to the encoding subtable to obtain the service set identifier and / or the password.
[0143] In one embodiment, before decoding the encoded data in the message to obtain the service set identifier and / or password, the decoding module 500 is specifically used to:
[0144] Generate a decryption key according to the device information of the device to be configured;
[0145] decrypting the message according to the decryption key;
[0146] If the decryption is successful, the step of decoding the encoded data in the message to obtain the service set identifier and / or password is performed.
[0147] The present invention also provides a wireless network access device, the wireless network access device comprising a memory, a processor, and a wireless network access program stored in the memory and executable on the processor, the wireless network access device is a network configuration device or a network configuration device, and the wireless network access program, when executed by the processor, implements the various steps of the wireless network access method described in the above embodiment.
[0148] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a wireless network access program, and when the wireless network access program is executed by a processor, the various steps of the wireless network access method described in the above embodiment are implemented.
[0149] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0150] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, system, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, system, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, system, article or device including the element.
[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment system can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a parking management device, an air conditioner, or a network device, etc.) to execute the system described in each embodiment of the present invention.
[0152] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for accessing a wireless network, characterized in that: Applied to a distribution network device, the wireless network access method includes: According to the service set identifier and / or password input by the user, a character subset is determined in a preset coding table, which includes: searching the preset coding table according to the service set identifier or the password, generating a subset bitmap as the character subset, the bitmap is a one-to-one correspondence between a bit and each column and each row of the preset coding table, if there is a required character in the current column or row, the bit corresponding to the row and column in the bitmap is set to 1, otherwise it is set to 0; the preset coding table is a subtable in the ASCII table used to represent the service set identifier or password of the network; Determine the width of the character subset, where the width can represent the number of bits of all characters in the character subset; Determining a coding subtable according to the character subset and the width; the number of characters in the coding subtable is less than the number of characters in the coding table; Sending the character subset to the network device to be configured, so that the network device to be configured generates the encoding subtable according to the character subset; Encoding the service set identifier and / or the password according to the encoding subtable to obtain encoded data; Generate a message according to the coded data, and propagate the message to the network device to be configured.
2. The method for accessing a wireless network according to claim 1, wherein: The step of generating a message according to the coded data comprises: Generate encryption keys and salt values based on the device information of the device to be configured; The device information and the encoded data are encrypted according to the encryption key and the salt value to obtain the message.
3. A method for accessing a wireless network, characterized in that: Applied to the device to be networked, the wireless network access method includes: Receive a message sent by a network configuration device, wherein the message is the network configuration device determining a character subset in a preset coding table according to a service set identifier and / or password input by a user, including: searching the preset coding table according to the service set identifier or the password, generating a subset bitmap as the character subset, the bitmap using bits to correspond one-to-one with each column and each row of the preset coding table, if the required character is in the current column or row, the bit corresponding to the row and column in the bitmap is set to 1, otherwise it is set to 0; the preset coding table is a subtable in the ASCII table used to represent the service set identifier or password of the network; determine the width of the character subset, the width can represent the number of bits of all characters in the character subset; determine the coding subtable according to the character subset and the width; the number of characters in the coding subtable is less than the number of characters in the coding table; encode the service set identifier and / or the password according to the coding subtable to obtain coded data; generate a message according to the coded data; Receiving a character subset sent by the network configuration device, decoding the encoded data in the message according to the character subset, and obtaining a service set identifier and / or a password; Connecting to a wireless network according to the service set identifier and / or the password.
4. The method for accessing a wireless network as claimed in claim 3, wherein: The step of decoding the coded data in the message according to the character subset to obtain a service set identifier and / or a password comprises: Generate a coding subtable according to the character subset; The encoded data is decoded according to the encoding subtable to obtain the service set identifier and / or the password.
5. The method for accessing a wireless network as claimed in claim 3, wherein: The step of decoding the encoded data in the message to obtain the service set identifier and / or password comprises: Generate a decryption key according to the device information of the device to be configured; decrypting the message according to the decryption key; If the decryption is successful, the encoded data in the message is decoded to obtain the service set identifier and / or password.
6. A wireless network access device, characterized in that: The wireless network access device comprises: A compression module is used to determine a character subset in a preset coding table according to a service set identifier and / or password input by a user, including: searching the preset coding table according to the service set identifier or the password, generating a subset bitmap as the character subset, the bitmap is a one-to-one correspondence between a bit and each column and each row of the preset coding table, if there is a required character in the current column or row, the bit corresponding to the row and column in the bitmap is set to 1, otherwise it is set to 0; the preset coding table is a subtable in the ASCII table used to represent the service set identifier or password of the network; determining the width of the character subset, the width can represent the number of bits of all characters in the character subset; determining the coding subtable according to the character subset and the width; the number of characters in the coding subtable is less than the number of characters in the coding table; An encoding module is used to send the character subset to the network device to be configured, so that the network device to be configured generates the encoding subtable according to the character subset; encode the service set identifier and / or the password according to the encoding subtable to obtain encoding data; The sending module is used to generate a message according to the encoded data and transmit the message to the network device to be configured.
7. A wireless network access device, characterized in that: The wireless network access device includes a memory, a processor, and a wireless network access program stored in the memory and executable on the processor. When the wireless network access device is a network configuration device, the wireless network access program, when executed by the processor, implements the various steps of the wireless network access method as described in any one of claims 1-2; when the wireless network access device is a network configuration device, the wireless network access program, when executed by the processor, implements the various steps of the wireless network access method as described in any one of claims 3-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a wireless network access program, and when the wireless network access program is executed by a processor, each step of the wireless network access method according to any one of claims 1-2 or claims 3-5 is implemented.
