WO2019233311A1 - Method and apparatus for device to be configured with network to access network hotspot device - Google Patents

Method and apparatus for device to be configured with network to access network hotspot device Download PDF

Info

Publication number
WO2019233311A1
WO2019233311A1 PCT/CN2019/088716 CN2019088716W WO2019233311A1 WO 2019233311 A1 WO2019233311 A1 WO 2019233311A1 CN 2019088716 W CN2019088716 W CN 2019088716W WO 2019233311 A1 WO2019233311 A1 WO 2019233311A1
Authority
WO
WIPO (PCT)
Prior art keywords
encoding
packet
value
network
password
Prior art date
Application number
PCT/CN2019/088716
Other languages
French (fr)
Chinese (zh)
Inventor
肖月振
于海龙
陈辰
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019233311A1 publication Critical patent/WO2019233311A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method for a network device to be configured to access a network hotspot device and an apparatus for accessing a network device to be configured to access a network hotspot device.
  • the current distribution network scheme mainly includes two types, one is a WiFi broadcast network distribution scheme, and the other is a WiFi multicast network distribution scheme.
  • the WiFi broadcast distribution network uses the Length field to transmit the router's SSID and Password, while the WiFi multicast distribution network uses the Destination field to transmit the router's SSID and Password. Both of these distribution schemes use plaintext to send the SSID and Password of the router in a cyclic manner. Because the plaintext transmission is used, illegal devices can obtain the router's SSID and Password after capturing and analyzing in the air. Security risks.
  • embodiments of the present application are provided in order to provide a method for accessing a network hotspot device to be configured by a network device to be configured and a network hotspot device to be configured to overcome the above problem or at least partially solve the above problem. installation.
  • an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, which is applied to a wireless network.
  • the wireless network includes the network device to be configured, a user terminal, and a user terminal connected to the user terminal.
  • Network hotspot device the method includes:
  • the step of encoding the service set identifier and the encrypted password to obtain the distribution network encoding information includes:
  • the step of sending the distribution network coding information to the network equipment to be configured includes:
  • the step of encapsulating the distribution network encoding information into a user datagram protocol packet includes:
  • the step of sending the user datagram protocol packet to the network device to be configured includes:
  • the encoded packet includes at least one encoded value
  • the step of sending the encoded packet to the network device to be distributed cyclically includes:
  • the encoded packet includes at least one encoded value
  • the step of sending the encoded packet to the network device to be distributed cyclically includes:
  • Generating a synchronization frame of each encoded packet according to a group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes a value of the group sequence number
  • an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, which is applied to a wireless network.
  • the wireless network includes the network device to be configured, a user terminal, and Network hotspot device, the method includes:
  • the step of the network device to be distributed receiving the distribution network coding information sent by the user terminal includes:
  • the step of receiving the user datagram protocol packet sent by the network device to be configured includes:
  • the steps of decoding and decrypting the distribution network coding information to obtain the service set identifier and password of the network hotspot device include:
  • the steps of decoding and decrypting the distribution network encoding information to obtain the service set identifier and password of the network hotspot device include:
  • the steps of decoding and decrypting each encoded value of the user datagram protocol packet to obtain the service set identifier and password of the network hotspot device include:
  • the encoding method information includes a preset encoding rule
  • the encryption method information includes a preset encryption method
  • the preset password is used to decrypt the encrypted password to obtain the password of the network hotspot device.
  • an embodiment of the present application discloses an apparatus for accessing a network hotspot device by a network device to be configured, which is applied to a wireless network, and the wireless network includes the network device to be configured, a user terminal, and a device connected to the user terminal.
  • Network hotspot equipment, the device includes:
  • a network configuration information acquisition module configured to acquire a service set identifier and password of the network hotspot device
  • An encryption module configured to encrypt the password by using a preset encryption method
  • An encoding module configured to encode the service set identifier and the encrypted password to obtain distribution network encoding information
  • a sending module configured to send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is used to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and And use the service set ID and password to access the network hotspot device.
  • the encoding module includes:
  • a preset character judging submodule configured to determine whether the service set identifier consists of preset characters in ASCII code
  • a first encoding submodule configured to encode the service set identifier by using a preset encoding rule to obtain service set identifier encoding information
  • a first digit conversion submodule configured to perform a digit conversion on each byte in the service set identifier according to a digit conversion rule to obtain service set identifier coding information
  • a second digit conversion submodule configured to perform digit conversion on each byte in the encrypted password according to the digit conversion rule to obtain password encoding information
  • the encoding information determination submodule is configured to determine the service set identification encoding information and the password encoding information as distribution network encoding information.
  • the sending module includes:
  • An encapsulation submodule configured to encapsulate the distribution network encoding information into a user datagram protocol packet
  • a sending submodule is configured to send the user datagram protocol packet to the network device to be configured.
  • the packaging submodule includes:
  • An encryption method information generating unit configured to generate encryption method information corresponding to the preset encryption method
  • a coding mode information generating unit configured to generate coding mode information corresponding to the preset coding rule
  • a password length counting unit configured to count the password length of the password encoding information to obtain a password length value
  • a service set identifier length statistics unit configured to count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value
  • the encapsulating unit is configured to encapsulate the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information into a user datagram protocol packet according to a preset encapsulation format.
  • the sending submodule includes:
  • a grouping unit configured to divide the encoded value in the user datagram protocol packet into several encoded packets according to a preset byte length
  • a coded packet sending unit is configured to cyclically send the coded packet to the network device to be configured.
  • the encoded packet includes at least one encoded value
  • the encoded packet sending unit includes:
  • a first group of sequence number determining subunits configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
  • a first synchronization frame generating subunit configured to generate a synchronization frame of each encoding packet according to a group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet is equal to the each encoding packet The value of the group sequence number;
  • the first group of internal offset value determination subunits is configured to determine that each coded value is within a group of the coded group according to a position of each coded value in each of the coded packets. Offset value
  • a first data frame generating subunit configured to generate a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and a length value of the data frame is equal to the intra-group of each coding value The sum of the offset value and each coded value;
  • the first sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  • the encoded packet includes at least one encoded value
  • the encoded packet sending unit includes:
  • a second group of sequence number determining subunits configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
  • a second synchronization frame generating subunit configured to generate the synchronization frame of each encoded packet according to the group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes the group sequence number The value of
  • An offset value determination subunit in the second group configured to determine that each encoding value is within the group of the encoding packet according to the position of each encoding value in the each encoding packet Offset value
  • a second data frame generating subunit configured to generate a data frame corresponding to each encoded value according to the offset value in the group and each encoded value, and a destination address of the data frame includes the group of each encoded value The sum of the internal offset value and each coded value;
  • a second sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  • an embodiment of the present application discloses an apparatus for accessing a network hotspot device by a network device to be configured, which is applied to a wireless network, and the wireless network includes the network device to be configured, a user terminal, and a device connected to the user terminal.
  • Network hotspot equipment, the device includes:
  • a receiving module configured to receive distribution network coding information sent by the user terminal
  • a decoding and decryption module configured to decode and decrypt the distribution network coding information to obtain a service set identifier and password of the network hotspot device;
  • the access module is configured to access the network hotspot device by using the service set identifier and password.
  • the receiving module includes:
  • the user datagram protocol packet receiving submodule is configured to receive the user datagram protocol packet sent by the network device to be configured.
  • the user datagram protocol packet receiving submodule includes:
  • the synchronization frame and data frame receiving unit is configured to receive a synchronization frame and a data frame of each encoded packet sent by the network device to be configured.
  • the decoding and decryption module includes:
  • a first set of sequence number calculating submodules configured to calculate a group sequence number of each coded packet according to the length value of the synchronization frame
  • the first set of internal offset determination sub-modules is used to determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the order of receiving the data frames of each encoding packet;
  • a first encoding value calculation sub-module configured to calculate an encoding value corresponding to each data frame according to a length of each data frame and an intra-group offset value
  • a first coded packet combination sub-module configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
  • a first user datagram protocol packet encapsulation submodule configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet
  • a decoding and decryption submodule is configured to decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  • the decoding and decryption module includes:
  • a second group number calculating submodule configured to calculate a group number of each coded packet according to a destination address of the synchronization frame
  • An offset value determination sub-module in the second group configured to determine an offset value of the encoding value corresponding to each data frame within the encoding packet group according to the sequence of receiving the data frames of each encoding packet;
  • a second encoding value calculation sub-module configured to calculate an encoding value corresponding to each data frame according to a destination address and an intra-group offset value of each data frame
  • a second coded packet combination submodule configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
  • a second user datagram protocol packet encapsulation submodule configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet
  • a decoding and decryption submodule is configured to decode and decrypt each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  • the decoding and decryption submodule includes:
  • a parsing unit configured to parse each encoding value of the user datagram protocol packet to obtain encoding mode information, encryption mode information, service set identification encoding information, and password encoding information of a preset encapsulation format, the encoding mode information Contains a preset encoding rule, and the encryption method information includes a preset encryption method;
  • a digit conversion unit configured to perform digit conversion on the service set identification encoding information and the password encoding information by using a digit conversion rule
  • a decoding unit configured to decode the service set identifier encoding information after the number of bits conversion by using the preset encoding rule to obtain the service set identifier of the network hotspot device;
  • the decryption unit is configured to decrypt the encrypted password by using a preset encryption method to obtain a password of the network hotspot device.
  • an embodiment of the present application discloses an apparatus, including: one or more processors; and one or more machine-readable media having instructions stored thereon. When executed, the apparatus is caused to execute the method for accessing a network hotspot device by one or more network devices to be configured according to the embodiments of the present application.
  • the embodiments of the present application disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the device to execute one or more of the embodiments described in the embodiments of the present application.
  • the user terminal uses a preset encryption method to encrypt the password, encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and sends the distribution network coding information to the network equipment to be distributed.
  • the distribution network device After receiving the distribution network encoding information, the distribution network device decodes and decrypts to obtain the service set ID and password, and uses the service set ID and password to access the network hotspot device. Because the password is encrypted and encoded before the password is sent, it is avoided Sending passwords in clear text causes password leakage, which improves the security performance of network communications.
  • the encoded information of the encoded service set identifier and password is encapsulated into a user datagram protocol packet, and the encoded value in the user datagram protocol packet is divided into several encoded packets, and then the serial number of the encoded packet Send synchronization frame, each coded value is sent within the group of the coded packet to send a data frame, which can further encrypt each coded value and accurately locate the position of each coded value in the coded packet, improving transmission efficiency .
  • FIG. 1 is a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 2 is a flowchart of steps in a second embodiment of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 3 is a schematic diagram of median conversion according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of sending encoded information in an embodiment of the present application.
  • Embodiment 5 is a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 6 is a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 7 is a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device to a network device to be configured according to the present application;
  • FIG. 8 is a structural block diagram of a second embodiment of a device for a network device to be configured to access a network hotspot device according to the present application.
  • a method for accessing a network hotspot device with a network device to be configured can be applied to
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
  • Step 101 The user terminal obtains a service set identifier and password of the network hotspot device.
  • the network hotspot device may be a wireless router or a wireless access point AP (AccessPoint) without a routing function
  • the user terminal may be a wireless communication device that supports the 802.11 and 802.2 communication protocols, such as a mobile phone.
  • the network device to be configured may be a device to be connected to a network hotspot device, the network device to be configured may have wireless network communication functions, for example, the network device to be configured may be a smart socket, a smart door lock, etc Devices without an interactive interface.
  • the user terminal can be installed with a network distribution APP (Application, application).
  • the password and service set identifier of the network hotspot device can be entered by the user into the network distribution APP of the user terminal, or after the user terminal establishes a connection with the network hotspot device.
  • the network distribution APP sent by the network hotspot device to the user terminal.
  • Step 102 Encrypt the password by using a preset encryption method.
  • the user terminal After the user terminal obtains the password of the network hotspot device, it needs to encrypt the password before sending the password to the network device to be configured.
  • the user terminal uses the AES128-CFB, AES128-OFB and other encryption methods to encrypt the password.
  • Password The encrypted password can be a non-plaintext password.
  • Step 103 encode the service set identifier and the encrypted password to obtain distribution network encoding information.
  • the user terminal Before sending the service set identifier and the encrypted password, the user terminal can encode the SSID and the encrypted password to obtain the distribution network encoding information. For example, ASCII encoding, UTF-8 encoding, GBK encoding, etc. can be used. It is also possible to convert the service set identifier and the encrypted password according to the number of bits conversion rule, for example, to convert bits according to 8 bits to 7 bits.
  • Step 104 Send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is used to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and password, And using the service set identifier and password to access the network hotspot device.
  • the user terminal may send the distribution network coding information through broadcast and multicast through the wireless communication module, and the network equipment to be configured may obtain the distribution network coding information by capturing packets in the air. After receiving the distribution network coding information, the network equipment to be configured may decode and decrypt the distribution network coding information to obtain the password and service set identifier of the network hotspot device.
  • the user terminal before sending the password and the service set identifier, the user terminal encrypts the password by using a preset encryption method, and encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and The coded information is sent to the network equipment to be configured. After receiving the network network coding information, the network equipment decodes and decrypts it to obtain the service set ID and password, and uses the service set ID and password to access the network hotspot device.
  • the password is encrypted and encoded, which avoids the problem of password leakage caused by sending the password in clear text and improves the security performance of network communication.
  • FIG. 2 there is shown a flowchart of steps in a second embodiment of a method for accessing a network hotspot device by a network device to be configured according to the present application.
  • the method for accessing a network hotspot device with a network device to be configured can be applied to
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
  • Step 201 The user terminal obtains a service set identifier and password of the network hotspot device.
  • Step 202 Encrypt the password by using a preset encryption method.
  • the user terminal After the user terminal obtains the password of the network hotspot device, it needs to encrypt the password before sending the password to the network device to be configured. For example, the user terminal uses the AES128-CFB, AES128-OFB and other encryption methods to encrypt the password. Password.
  • the encrypted password is a non-plaintext password.
  • Step 203 Determine whether the service set identifier is composed of a preset character in ASCII code.
  • the preset character may be a visible character in an ASCII code.
  • ASCII American Standard Code for Information Interchange
  • ASCII is a set of computer coding systems based on the Latin alphabet. It is mainly used to display modern English and other Western European languages. It is a universal single-byte coding system.
  • control characters or communication-specific characters are control characters or communication-specific characters. They are invisible characters, and the rest are displayable characters. Invisible characters such as control characters: LF (line feed), CR (carriage return), FF (form feed), DEL (delete), BS (backspace), BEL (bell), etc .; communication-specific characters: SOH (header), EOT (end of text), ACK (confirmation), etc .; ASCII value is 8 , 9, 10, and 13 are converted to backspace, tab, line feed, and carriage return characters, respectively. They do not have a specific graphic display, but they will have different effects on the text display depending on the application.
  • 32 to 126 (a total of 95) are visible characters (32 is a space), of which 48 to 57 are 0 to 9 ten Arabic numerals. 65 to 90 are 26 uppercase English letters, 97 to 122 are 26 lowercase English letters, and the rest are punctuation marks and operation symbols.
  • step 204 is performed; otherwise, step 205 is performed.
  • Step 204 Use a preset encoding rule to encode the service set identifier to obtain service set identifier encoding information.
  • the preset encoding rule may be an ASCII encoding rule.
  • the ASCII encoding rule may be used to encode the service set identifier to obtain the service set identifier encoding information.
  • the service set identifier encoding information may be multiple bytes. The encoded value.
  • the service set identifier is "TPLINK"
  • the ASCII value of "T” in the ASCII code is 84, and it is represented as “54” in hexadecimal, and so on, and "TPLINK” is converted into “54” as hexadecimal. 50 49 4E 4B ". Then “54, 50, 4C, 49, 4E, 4B” is the service set identification code information.
  • post-operation coding may also be performed, for example, coding is performed by the following formula:
  • Origin [i] is the original encoding
  • 0X20 is the decimal number 32, which is the beginning of the visible characters in ASCII code
  • SSID [i] is the encoded value after encoding.
  • each byte in the service set identifier is converted into digits according to the digit conversion rule to obtain service set identifier coding information.
  • the service set identifier contains invisible characters, for example, a service set identifier composed of Chinese or other non-English letters
  • the service set identifier is converted according to a digit conversion rule to obtain service set identifier coding information.
  • the digit conversion rule may be a conversion rule from 8 bits to 7 bits, so that the converted SSID [i] value ranges from [0x00 to 0x7F].
  • the service set identifier is: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, after 8bits to 7bits: 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F.
  • step 206 each byte in the encrypted password is converted into digits according to the digit conversion rule to obtain password encoding information.
  • the encrypted password can be converted according to the digit conversion rule to obtain the password encoding information.
  • Figure 3 shows the process of password encryption and digit conversion
  • plain_stream is an unencrypted cipher stream, which is encrypted to form an encrypted cipher stream cipher_stream.
  • Utf8_cipher_stream uses 7bits to represent a byte of encrypted cipher. After 7bits to 8bits, it is converted to tx_cipher_stream. If 8bits to 7bits, the process is exactly the opposite.
  • Step 207 Determine the service set identification coding information and the password coding information as distribution network coding information.
  • the user terminal After the user terminal obtains the service set identification encoding information and the password encoding information, the user terminal may use the service set identification encoding information and the password encoding information as the distribution network encoding information.
  • Step 208 Encapsulate the distribution network coding information into a user datagram protocol packet.
  • step 208 may include the following sub-steps:
  • Sub-step S11 generating encryption method information corresponding to the preset encryption method.
  • Sub-step S12 generating encoding mode information corresponding to the preset encoding rule.
  • Sub-step S13 Count the password length of the password encoding information to obtain the password length value.
  • Sub-step S14 Count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value.
  • step S15 the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information are encapsulated into a user datagram protocol packet according to a preset encapsulation format.
  • the encapsulation format of the user datagram protocol packet can be shown in Table 1 below:
  • Tlen Total Length, which indicates the packet length
  • Flag indicates the password encryption method and SSID encoding format, a total of 8 bits, for example:
  • Bit0 indicates whether the SSID is included
  • Bit2 ⁇ Bit1 indicates the password encryption method.
  • 10 is AES OFB encryption
  • 11 is AES CFB encryption
  • 00 is plain text
  • 01 is stream cipher
  • Bit4 ⁇ Bit3 indicates the protocol version
  • Bit5 indicates the SSID encoding method. For example, 0 is ASCLL encoding and 1 is other encoding (UTF-8).
  • Bit6 is a reserved bit
  • SSID_Len indicates the length of the SSID after encoding. This field is optional. It can be omitted if there is no SSID.
  • Password_Len indicates the length of the password after encoding
  • SSID Represents the encoded SSID data, which contains a multi-byte encoded value. This field is optional. It can be omitted without an SSID;
  • Password Represents the encoded Password data, including a multi-byte encoded value
  • CRC indicates the check code. Only the lower 7 bits of Checksum are retained.
  • the user terminal can generate the encryption method information according to the preset encryption method for encrypting the password, generate the encoding method information according to the encoding method of the service set identifier, and count the length of the password encoding information and the service set identifier encoding information and the length of the entire protocol packet. , And generate a check code and fill it in the corresponding field of the above table for encapsulation to obtain the user datagram protocol package.
  • Step 209 Send the user datagram protocol packet to the network device to be configured.
  • the user datagram protocol packet may be sent to the network device to be configured in the form of an encoded packet.
  • step 209 may include the following sub-steps:
  • Sub-step S21 divide the encoding value in the user datagram protocol packet into several encoding packets according to a preset byte length.
  • the user datagram protocol packet may include multiple encoding values, and the multiple encoding values are obtained by encoding the service set identifier and the password after encryption.
  • the user datagram protocol packet also includes information such as the packet length field, the encoding method information field, the encryption information field, the service set identifier length field, the password length field, and the check code field. The above information can be represented by the encoded value.
  • the user terminal may divide the encoded values in the user datagram protocol packet into several encoded packets.
  • the encoded values in the user datagram protocol packet may be grouped according to a length of 8 bytes to obtain several encoded packets.
  • Sub-step S22 Send the coded packet to the network device to be distributed cyclically.
  • the coded packet can be sent cyclically.
  • the coded value can be written into the packet length field for sending.
  • the sub-step S22 can include the following: step:
  • Sub-step S22-1 determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet.
  • each coded packet After the user terminal divides the user datagram protocol packet into several coded packets, each coded packet has a certain position in the user data protocol packet, and the group sequence number of each coded packet can be determined according to the position.
  • the user datagram protocol packet grouping and group sequence number are shown in Table 2 below:
  • 0XE0 represents the first encoded packet
  • 0XE1 represents the second encoded packet
  • 0XE2 represents the third encoded packet, and so on, so that each encoded packet has a determined position and a corresponding group number.
  • Substep S22-2 generating a synchronization frame of each encoding packet according to the group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet being equal to the group sequence number of each encoding packet value.
  • the user terminal Before sending multiple coded values in each coded packet, the user terminal sends the synchronization frame of the coded packet to inform the network equipment to be sent the data from the synchronization frame of the current coded packet to the data before the synchronization frame of the next coded packet.
  • the frames are the data frames of the current encoded packet. Therefore, a synchronization frame needs to be generated for each coded packet. Specifically, a synchronization frame with arbitrary content and a packet length of the value of the group sequence number of the coded packet can be generated.
  • a synchronization frame with a packet length of 0XE0 is generated, and the packet length is included in the packet length field of the synchronization frame.
  • Sub-step S22-3 determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in each encoding packet in the each encoding packet.
  • each encoding packet For the encoding value in each encoding packet, it has a certain position in the encoding packet, so the user terminal can determine its intra-group offset value in the encoding packet according to its position in the encoding packet.
  • Table 3 shows the position and intra-group offset of the encoded value in the encoded packet after the user datagram protocol packet is encoded and grouped according to a length of 8 bytes.
  • the offset value in the group is represented by a decimal number.
  • other values or the offset value in the group can be used to represent the offset value in the group, so as to be able to indicate the position of the encoded value in the group.
  • This application implements The example does not limit the representation of the offset value within the group.
  • Sub-step S22-4 generating a data frame corresponding to each encoding value according to the intra-group offset value and each encoding value, and the length value of the data frame is equal to the intra-group offset value of each encoding value And the sum of each encoded value.
  • each coded value may be sent in a format of a combination of an offset value and a coded value in the group. Specifically, a sum of each coded value and the offset value in the group of the coded value may be calculated. And are used as the value of the packet length field of the data frame, and a data frame with a packet length of this value is generated.
  • the decimal value of the ASCII code is less than 128, the binary value of 128 is 10000000, a total of 8 bits, the binary value of 127 is 01111111, and the binary value of 0-127
  • the high-order bits are 0 and can be omitted. Only 7 bits are used.
  • 8-bits to 7-bits are converted like the password. So the coded value can be expressed using 7bits.
  • the encoding value is 0x12 and the offset value in the group is 0x100
  • a data frame with a packet length of 0x112 can be generated, and
  • the packet length value written in the long field is 0x112.
  • Sub-step S22-5 sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be allocated.
  • the synchronization frame and the data frame can be sent to the network device to be configured. Specifically, the synchronization frame of the current encoding packet can be sent first, and then the current encoding can be sent. After sending the data frame of the packet, after sending the data frame of the current encoding packet, the synchronization frame and data frame of the next encoding packet are sent, and so on. After all the encoding packets have been transmitted, the cyclic transmission of the encoding packets is restarted.
  • the encoded value may be written in the destination field for transmission, and the sub-step S22 may include the following sub-steps:
  • Sub-step S22-6 determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet.
  • Sub-step S22-7 generating a synchronization frame of each encoded packet according to a group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes a value of the group sequence number.
  • the user terminal may generate a synchronization frame for each encoded packet, and encode the value of the group sequence number of each encoded packet into the last three bits of the destination address of the synchronization frame.
  • Sub-step S22-8 determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet.
  • Sub-step S22-9 generating a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and the destination address of the data frame includes the intra-group offset value of each coding value And the sum of each encoded value.
  • the user terminal may generate a data frame for each encoding value in each encoding packet, and encode each encoding value and the intra-group offset value of each encoding value into the last three bits of the destination address of the data frame.
  • Sub-step S22-10 sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be allocated.
  • a data frame having a packet length of an encoded value of the encoded packet can be generated.
  • a destination address including the encoded packet A data frame of encoded values.
  • the first coded packet 12 0F 0C 00 34 D 4 41 C
  • the second coded packet 00, 32, 4F, 55, 54, 52, 0D
  • the intra-group offset of each coded value is expressed as: 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480.
  • 0x100 the intra-group offset value of the encoded value of the first byte in the encoded packet
  • 0x180 indicates the intra-group offset value of the encoded value of the second byte in the encoded packet
  • the group numbers of each coded packet are: 0x3E0, 0x3E1, 0x3E2, ...., 0x3EF
  • 0x3E0 indicates the group number of the first coded packet
  • 0x3E1 indicates the group number of the second coded packet
  • the user terminal sends the sequence as follows:
  • Synchronization frame of the first coded packet the length of the synchronization frame is 0x3E0 (can be sent multiple times in succession to improve the success rate of synchronization);
  • Synchronization frame of the second coded packet the length of the synchronization frame is 0x3E1 (can be sent multiple times in succession to improve the success rate of synchronization);
  • the synchronization frame of the third coded packet is 0x3E2 (can be sent multiple times in succession to improve the success rate of synchronization);
  • the synchronization frame of the first coded packet is returned to be transmitted in a cyclic manner.
  • FIG. 4 is a schematic diagram of sending encoded information according to an embodiment of the present application.
  • the user terminal sends at least one synchronization frame before each group of data frames is sent.
  • the length of each synchronization frame reflects the group number and sequence of the corresponding coded packet.
  • the user terminal After sending a set of data frames, the user terminal sends a synchronization frame of the next coded packet, and then sends a data frame of the next set of coded packets. After the user terminal sends the data frames of all the encoded packets, it can repeatedly send the data frames of all the encoded packets.
  • the user terminal uses a preset encryption method to encrypt the password, encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and sends the distribution network coding information to the network equipment to be distributed.
  • the distribution network equipment decodes and decrypts the received service set identification and password after receiving the distribution network encoding information, and uses the service set identification and password to access the network hotspot device. Because the password is encrypted before the password is sent, the use of clear text is avoided. The problem of password leakage caused by sending passwords improves the security performance of network communications.
  • the encoded information of the encoded service set identifier and password is encapsulated into a user datagram protocol packet, and the encoded value in the user datagram protocol packet is divided into several encoded packets, and then the group number of the encoded packet is used.
  • Sending a synchronization frame, and sending a data frame with each coded value offset within the group of the coded packet can not only further encrypt the password, but also accurately locate the position of each coded value in the coded packet, improving transmission efficiency.
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
  • Step 301 The network equipment to be distributed receives the distribution network coding information sent by the user terminal.
  • the network hotspot device may be a wireless router or a wireless access point AP (AccessPoint) without a routing function
  • the user terminal may be a wireless communication device that supports the 802.11 and 802.2 communication protocols, such as a mobile phone.
  • the network device to be configured may be a device to be connected to a network hotspot device, the network device to be configured may have wireless network communication functions, for example, the network device to be configured may be a smart socket, a smart door lock, etc Devices without an interactive interface.
  • the network equipment to be configured can capture packets in the air and receive the distribution information from the user terminal.
  • Step 302 Decode and decrypt the distribution network coding information to obtain the service set identifier and password of the network hotspot device.
  • the distribution network encoding information sent by the user terminal may be a user datagram protocol package encapsulated in a predetermined format.
  • the user datagram protocol package may include fields such as a packet length, an encoding rule, an encryption method, service set identification encoding information, and password encoding information.
  • the distribution network device After the distribution network device receives the distribution network encoding information, it can decode the service set identification encoding information according to the encoding rules to obtain the service set identification of the network hotspot device, and decrypt the password encoding information according to the encryption method to obtain the network hotspot device. Access password.
  • Step 303 Use the service set identifier and password to access the network hotspot device.
  • the network device to be configured After the network device to be configured obtains the service set ID and access password of the network hotspot device, it can request access to the network hotspot device according to the service set ID and access password. After the network hotspot device verifies the password, the network hotspot device is allowed to access to implement Internet connection.
  • the network equipment to be distributed decodes and decrypts to obtain the service set identifier and password, and uses the service set identifier and password to access the network hotspot device. Encryption and decryption are performed.
  • the network device to be configured needs to be decrypted and decrypted to obtain the password, which avoids the problem of password leakage caused by sending the password in plain text and improves the security performance of network communication.
  • FIG. 6 there is shown a flowchart of steps in Embodiment 4 of a method for accessing a network hotspot device by a network device to be configured according to the present application.
  • the method for accessing a network hotspot device with a network device to be configured can be applied to
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
  • Step 401 Receive a synchronization frame and a data frame of each coded packet sent by the network device to be configured.
  • the user terminal may encapsulate the distribution network coding information into a user datagram protocol packet of a preset format, divide the user datagram protocol packet into coded packets of a preset length, and send the coded packets through a synchronization frame.
  • the group sequence number sends the encoded value contained in the encoded packet through multiple data frames. Therefore, the network device to be configured can receive a synchronization frame and a data frame of each encoded packet sent by the user terminal.
  • Step 402 Calculate a group number of each coded packet according to the length value of the synchronization frame.
  • the length value of the packet length of the synchronization frame is equal to the encoded value.
  • the packet length field of the synchronization frame can be obtained. Calculate the group number of each coded packet.
  • the packet length field of the received synchronization frame is 0x3E0, that is, the packet length value is 0x3E0
  • the next received data frame is the data frame of the encoded packet with the group number of 0x3E0
  • the group of the encoded packets is grouped according to a predetermined Sequence number
  • Step 403 Determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet.
  • the user terminal sends the data frames of each coded packet in sequence.
  • the network device to be configured can determine the offset value of each data frame within the group of the coded packet in which the data frame is received. For example, an agreement
  • the intra-group offset values of a coded packet are as follows:
  • the intra-group offset of the first coded value is 0x100
  • the intra-group offset of the second coded value is 0x180;
  • the intra-group offset of the third coded value is 0x200;
  • the intra-group offset value of the next data frame received next is 0x100
  • the intra-group offset value of the second data frame is 0x180
  • the third data frame is within the group The offset is 0x200, and so on.
  • Step 404 Calculate a coding value corresponding to each data frame according to the length of each data frame and the offset within the group.
  • the length value of the packet length of the data frame is equal to the sum of the offset value of each coded value and each coded value.
  • the first encoding value is 0x12.
  • Step 405 Combine each encoded value into an encoded packet according to the offset value of each encoded value within the group of encoded packets.
  • the position of the coded value in the coded packet may be determined according to the intra-group offset value of the coded value, and then All the encoded values of the encoded packets are combined into encoded packets (such as the sequence in Table 3 is combined into encoded packets).
  • Step 406 Encapsulate each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet.
  • the group number of each coded packet indicates the sequence of each coded packet. According to the group number of the coded packet, all coded packets can be encapsulated into a user datagram protocol packet according to a preset format.
  • the user datagram protocol packet can include a packet length. Field, encoding method information field, encryption method information field, service set identification encoding information field, password encoding information field, check code field, etc.
  • Step 407 Decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  • step 407 may include the following sub-steps:
  • Sub-step S31 analyzing each encoding value of the user datagram protocol packet to obtain encoding method information, encryption method information, service set identification encoding information, and password encoding information in a preset encapsulation format.
  • the encoding method information includes a preset Encoding rules
  • encryption method information includes preset encryption methods.
  • the network equipment to be configured can parse the user datagram protocol packet according to a predetermined encapsulation format, and obtain the user datagram protocol packet shown in Table 1, including encoding method information, encryption method information, service set identification encoding information, and password encoding information. And other fields, where the encoding method information includes a preset encoding rule, and the encryption method information includes a preset encryption method.
  • a digit conversion rule is used to perform digit conversion on the service set identification encoding information and the password encoding information.
  • the user terminal performs a digit conversion on the service set identification encoding information and the password encoding information, for example, 8 bits to 7 bits.
  • the digit conversion rules must be agreed. Digit conversion is performed on the service set identification encoding information and the password encoding information, for example, 7 bits to 8 bits, to obtain the service set identification encoding information and the password encoding information after the digit conversion.
  • Sub-step S33 Decode the service set identifier encoding information after the number of bits conversion by using the preset encoding method rule to obtain the service set identifier of the network hotspot device.
  • the user datagram protocol packet contains the encoding method information.
  • the network device to be configured can decode the service set identifier encoding information after the number of bits is converted according to the encoding rules in the encoding method information to obtain the service set identifier of the network hotspot device.
  • ASCII encoding decodes each encoded value in the service set identification encoding information to obtain the service set identification of the network hotspot device.
  • Sub-step S34 Decrypt the encrypted password by using a preset encryption method to obtain the password of the network hotspot device.
  • the user datagram protocol packet contains the encryption method information.
  • the network device to be configured can decrypt the bit-coded password encoding information according to the encryption method in the encryption method information to obtain the password of the network hotspot device, for example, through AES OFB encryption method. Decrypt each encoded value in the password encoding information to obtain the password of the network hotspot device.
  • step 402- 404 can be changed to the following steps:
  • the network equipment to be distributed receives the following data:
  • the first frame a length of 0x3E0 (may be received multiple times), is a synchronization frame of the first encoding packet, and indicates that the next 8 data frames are synchronized to the first encoding packet;
  • the second frame the length is 0x112, the offset value in the group is 0x100, and the first encoding value of the first encoding packet is 0x12;
  • the third frame the length is 0x18F, the offset value in the group is 0x180, and the second encoding value of the first encoding packet is 0x0F;
  • the fourth frame the length is 0x20C, the offset value in the group is 0x200, and the third encoding value of the first encoding packet is 0x0C;
  • the fifth frame the length is 0x280, the offset value in the group is 0x280, and the fourth encoding value of the first encoding packet is 0x00;
  • the sixth frame the length is 0x334, the offset value in the group is 0x300, and the fifth encoding value of the first encoding packet is 0x34;
  • the seventh frame the length is x3CD, the offset value in the group is 0x380, and the sixth encoding value of the first encoding packet is 0x4D;
  • the eighth frame the length is 0x441, the offset value in the group is 0x400, and the seventh encoding value of the first encoding packet is 0x41;
  • the ninth frame the length is 0x4CC, the offset value in the group is 0x480, and the eighth encoding value of the first encoded packet is 0x4C;
  • the 10th frame a length of 0x3E1 (may be received multiple times), a synchronization frame for the second encoding packet, indicating that the next 8 data frames are synchronized to the second encoding packet
  • the 11th frame the length is 0x100, the offset value in the group is 0x100, and the first encoding value of the second encoding packet is 0x00;
  • the encoding packet to which the data frame belongs is determined by the packet length of the synchronization frame
  • the encoding value is determined by the packet length of the data frame
  • the encoding value is combined into an encoding.
  • the distribution network encoding information is decoded and decrypted according to the parsed encoding method and encryption method to obtain the service set identifier and Password, and use the service set ID and password to access network hotspot devices. The need to decode and decrypt the received synchronization frames and data frames, avoiding the problem of password leakage caused by using clear passwords, and improving the security performance of network communications .
  • the encoding value corresponding to the data frame needs to be calculated according to the offset value in the group and the length value of the packet length of the data frame, which increases the difficulty of decoding and decryption, which can further ensure the password.
  • the confidentiality can accurately locate the position of each encoded value in the encoded packet, which improves the transmission efficiency.
  • a network hotspot device for accessing a network device to be configured can be applied to a wireless network.
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following modules:
  • a network configuration information obtaining module 501 configured to obtain a service set identifier and password of the network hotspot device
  • An encryption module 502 configured to encrypt the password by using a preset encryption method
  • An encoding module 503, configured to encode the service set identifier and the encrypted password to obtain distribution network encoding information
  • a sending module 504 configured to send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is configured to decode and decrypt the network set information to obtain the service set identifier after receiving the distribution network coding information. And password, and using the service set identifier and password to access the network hotspot device.
  • the encoding module 503 includes:
  • a preset character judging submodule configured to determine whether the service set identifier consists of preset characters in ASCII code
  • a first encoding submodule configured to encode the service set identifier by using a preset encoding rule to obtain service set identifier encoding information
  • a first digit conversion submodule configured to perform a digit conversion on each byte in the service set identifier according to a digit conversion rule to obtain service set identifier coding information
  • a second digit conversion submodule configured to perform digit conversion on each byte in the encrypted password according to the digit conversion rule to obtain password encoding information
  • the encoding information determination submodule is configured to determine the service set identification encoding information and the password encoding information as distribution network encoding information.
  • the sending module 504 includes:
  • An encapsulation submodule configured to encapsulate the distribution network encoding information into a user datagram protocol packet
  • a sending submodule is configured to send the user datagram protocol packet to the network device to be configured.
  • the packaging submodule includes:
  • An encryption method information generating unit configured to generate encryption method information corresponding to the preset encryption method
  • a coding mode information generating unit configured to generate coding mode information corresponding to the preset coding rule
  • a password length counting unit configured to count the password length of the password encoding information to obtain a password length value
  • a service set identifier length statistics unit configured to count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value
  • the encapsulating unit is configured to encapsulate the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information into a user datagram protocol packet according to a preset encapsulation format.
  • the sending submodule includes:
  • a grouping unit configured to divide the coded value in the user datagram protocol packet into coded groups according to a preset byte length
  • a coded packet sending unit is configured to cyclically send the coded packet to the network device to be configured.
  • the encoded packet includes at least one encoded value
  • the encoded packet sending unit includes:
  • a first group of sequence number determining subunits configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
  • a first synchronization frame generating subunit configured to generate a synchronization frame of each encoding packet according to a group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet is equal to the each encoding packet The value of the group sequence number;
  • the first group of internal offset value determination subunits is configured to determine that each coded value is within a group of the coded group according to a position of each coded value in each of the coded packets. Offset value
  • a first data frame generating subunit configured to generate a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and a length value of the data frame is equal to the intra-group of each coding value The sum of the offset value and each coded value;
  • the first sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  • the encoded packet includes at least one encoded value
  • the encoded packet sending unit includes:
  • a second group of sequence number determining subunits configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
  • a second synchronization frame generating subunit configured to generate the synchronization frame of each encoded packet according to the group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes the group sequence number The value of
  • An offset value determination subunit in the second group configured to determine that each encoding value is within the group of the encoding packet according to the position of each encoding value in the each encoding packet Offset value
  • a second data frame generating subunit configured to generate a data frame corresponding to each encoded value according to the offset value in the group and each encoded value, and a destination address of the data frame includes the group of each encoded value The sum of the internal offset value and each coded value;
  • a second sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  • FIG. 8 there is shown a structural block diagram of a second embodiment of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application.
  • the access to a network hotspot device by a network device to be configured can be applied to a wireless network
  • the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following modules:
  • a decoding and decryption module 602 configured to decode and decrypt the distribution network coding information to obtain a service set identifier and password of the network hotspot device;
  • the access module 603 is configured to access the network hotspot device by using the service set identifier and password.
  • the receiving module 601 includes:
  • the user datagram protocol packet receiving submodule is configured to receive the user datagram protocol packet sent by the network device to be configured.
  • the user datagram protocol packet receiving submodule includes:
  • the synchronization frame and data frame receiving unit is configured to receive a synchronization frame and a data frame of each encoded packet sent by the network device to be configured.
  • the decoding and decryption module 602 includes:
  • a first set of sequence number calculating submodules configured to calculate a group sequence number of each coded packet according to the length value of the synchronization frame
  • the first set of internal offset determination sub-modules is used to determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the order of receiving the data frames of each encoding packet;
  • a first encoding value calculation sub-module configured to calculate an encoding value corresponding to each data frame according to a length of each data frame and an intra-group offset value
  • a first coded packet combination sub-module configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
  • a first user datagram protocol packet encapsulation submodule configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet
  • a decoding and decryption submodule is configured to decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  • the decoding and decryption module 602 includes:
  • a second group number calculating submodule configured to calculate a group number of each coded packet according to a destination address of the synchronization frame
  • An offset value determination sub-module in the second group configured to determine an offset value of the encoding value corresponding to each data frame within the encoding packet group according to the sequence of receiving the data frames of each encoding packet;
  • a second encoding value calculation sub-module configured to calculate an encoding value corresponding to each data frame according to a destination address and an intra-group offset value of each data frame
  • a second coded packet combination submodule configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
  • a second user datagram protocol packet encapsulation submodule configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet
  • a decoding and decryption submodule is configured to decode and decrypt each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  • the decoding and decryption submodule includes:
  • a parsing unit configured to parse each encoding value of the user datagram protocol packet to obtain encoding mode information, encryption mode information, service set identification encoding information, and password encoding information of a preset encapsulation format, the encoding mode information Contains a preset encoding rule, and the encryption method information includes a preset encryption method;
  • a digit conversion unit configured to perform digit conversion on the service set identification encoding information and the password encoding information by using a digit conversion rule
  • a decoding unit configured to decode the service set identifier encoding information after the number of bits conversion by using the preset encoding rule to obtain the service set identifier of the network hotspot device;
  • the decryption unit is configured to decrypt the encrypted password by using a preset encryption method to obtain a password of the network hotspot device.
  • An embodiment of the present application further provides an apparatus, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause The device executes the method described in the embodiment of the present application.
  • the embodiments of the present application further provide one or more machine-readable media, on which instructions are stored, which when executed by one or more processors, cause the apparatus to execute the method described in the embodiments of the present application.
  • the description is relatively simple. For the relevant part, refer to the description of the method embodiment.
  • the embodiments of the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal device Means are generated for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including the instruction means, the The instruction means implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing terminal device, so that a series of operation steps can be performed on the computer or other programmable terminal device to produce a computer-implemented process, so that the computer or other programmable terminal device can
  • the instructions executed on the steps provide steps for implementing the functions specified in one or more of the flowcharts and / or one or more of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiments of the present application provide a method and an apparatus for a device to be configured with a network to access a network hotspot device, being applied to a wireless network, the wireless network comprising a device to be configured with a network, a user terminal, and a network hotspot device connected to the user terminal. The method comprises: the user terminal acquiring a service set identifier and a password of the network hotspot device; using a preset encryption method to encrypt the password; encoding the service set identifier and the encrypted password, so as to obtain network configuration encoded information; sending the network configuration encoded information to the device to be configured with a network, the device to be configured with a network being configured to, upon receipt of the network configuration encoded information, perform decoding and decryption to obtain the service set identifier and the password, and using the service set identifier and the password to access the network hotspot device. As a password is encrypted and encoded prior to being sent, the problem of password leakage caused by sending the password in a plaintext manner is avoided, improving the security performance of network communication.

Description

一种待配网设备接入网络热点设备的方法和装置Method and device for network equipment to be connected to network hotspot equipment
本申请要求2018年06月08日递交的申请号为201810589802.9、发明名称为“一种待配网设备接入网络热点设备的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on June 08, 2018 with the application number 201810589802.9 and the invention name "A method and device for accessing network hotspot equipment by a network device to be distributed", the entire contents of which are incorporated by reference In this application.
技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种待配网设备接入网络热点设备的方法和一种待配网设备接入网络热点设备的装置。The present application relates to the field of communications technologies, and in particular, to a method for a network device to be configured to access a network hotspot device and an apparatus for accessing a network device to be configured to access a network hotspot device.
背景技术Background technique
随着物联网的发展,在物联网的智慧家庭场景中,越来越多的智能设备使用WiFi接入家庭路由器来实现远程设备控制、场景联动等功能。With the development of the Internet of Things, in the smart home scene of the Internet of Things, more and more smart devices use WiFi to access home routers to implement functions such as remote device control and scene linkage.
智能设备接入互联网Internet之前需要先借助于配网方案获得路由器的SSID(Service Set Identifier,服务集标识)和密码Password。目前的配网方案主要包括两种,一种是WiFi广播配网方案,另一种是WiFi组播配网方案。Before a smart device accesses the Internet, it is necessary to obtain the SSID (Service Set Identifier, Service Set Identifier) and password of the router by means of a network distribution scheme. The current distribution network scheme mainly includes two types, one is a WiFi broadcast network distribution scheme, and the other is a WiFi multicast network distribution scheme.
WiFi广播配网采用Length字段传输路由器的SSID和Password,而WiFi组播配网采用Destination字段传输路由器的SSID和Password。这两种配网方案都采用明文循环发送路由器的SSID和Password的各个字节,由于采用明文发送,非法设备经空中抓包和分析后可以获得路由器的SSID和Password,造成路由器Password的泄露,存在安全隐患。The WiFi broadcast distribution network uses the Length field to transmit the router's SSID and Password, while the WiFi multicast distribution network uses the Destination field to transmit the router's SSID and Password. Both of these distribution schemes use plaintext to send the SSID and Password of the router in a cyclic manner. Because the plaintext transmission is used, illegal devices can obtain the router's SSID and Password after capturing and analyzing in the air. Security risks.
发明内容Summary of the Invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种待配网设备接入网络热点设备的方法和一种待配网设备接入网络热点设备的装置。In view of the above problems, embodiments of the present application are provided in order to provide a method for accessing a network hotspot device to be configured by a network device to be configured and a network hotspot device to be configured to overcome the above problem or at least partially solve the above problem. installation.
为了解决上述问题,本申请实施例公开了一种待配网设备接入网络热点设备的方法,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述方法包括:In order to solve the above problems, an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, which is applied to a wireless network. The wireless network includes the network device to be configured, a user terminal, and a user terminal connected to the user terminal. Network hotspot device, the method includes:
所述用户终端获取所述网络热点设备的服务集标识和密码;Obtaining, by the user terminal, a service set identifier and password of the network hotspot device;
采用预设加密方式对所述密码进行加密;Encrypting the password by using a preset encryption method;
对所述服务集标识和加密后的密码进行编码,得到配网编码信息;Encoding the service set identifier and the encrypted password to obtain distribution network encoding information;
将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。Sending the distribution network coding information to the network equipment to be configured, the network equipment to be configured to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and password, and adopt The service set identifier and password are used to access the network hotspot device.
可选地,所述对所述服务集标识和加密后的密码进行编码,得到配网编码信息的步骤包括:Optionally, the step of encoding the service set identifier and the encrypted password to obtain the distribution network encoding information includes:
判断所述服务集标识是否由ASCII码中的预设字符组成;Determining whether the service set identifier is composed of preset characters in ASCII code;
若是,采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息;If yes, encoding the service set identifier by using a preset encoding rule to obtain service set identifier encoding information;
若否,则将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到服务集标识编码信息;If not, converting each byte in the service set identifier according to the digit conversion rule to obtain service set identifier coding information;
将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息;Converting each byte of the encrypted password according to the number of bits conversion rule to obtain password encoding information;
将所述服务集标识编码信息和所述密码编码信息确定为配网编码信息。Determining the service set identification encoding information and the password encoding information as distribution network encoding information.
可选地,所述将所述配网编码信息发送至所述待配网设备的步骤包括:Optionally, the step of sending the distribution network coding information to the network equipment to be configured includes:
将所述配网编码信息封装到用户数据报协议包中;Encapsulating the distribution network coding information into a user datagram protocol packet;
向所述待配网设备发送所述用户数据报协议包。And sending the user datagram protocol packet to the network device to be configured.
可选地,所述将所述配网编码信息封装到用户数据报协议包中的步骤包括:Optionally, the step of encapsulating the distribution network encoding information into a user datagram protocol packet includes:
生成与所述预设加密方式对应的加密方式信息;Generating encryption method information corresponding to the preset encryption method;
生成与所述预设编码规则对应的编码方式信息;Generating encoding method information corresponding to the preset encoding rule;
统计所述密码编码信息的密码长度,得到密码长度值;Count the password length of the password encoding information to obtain the password length value;
统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值;Count the service set identifier length of the service set identifier encoding information to obtain the service set identifier length value;
按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务集标识编码信息和密码编码信息封装到用户数据报协议包。Encapsulating the encryption method information, password length value, service set identifier length value, service set identification encoding information, and password encoding information into a user datagram protocol packet according to a preset encapsulation format.
可选地,所述向所述待配网设备发送所述用户数据报协议包的步骤包括:Optionally, the step of sending the user datagram protocol packet to the network device to be configured includes:
按照预设字节长度,将所述用户数据报协议包中的编码值分为若干编码分组;Dividing the encoded value in the user datagram protocol packet into several encoded packets according to a preset byte length;
向所述待配网设备循环发送所述编码分组。Send the coded packet to the network device to be distributed cyclically.
可选地,所述编码分组包括至少一个编码值,所述向所述待配网设备循环发送所述编码分组的步骤包括:Optionally, the encoded packet includes at least one encoded value, and the step of sending the encoded packet to the network device to be distributed cyclically includes:
依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;Determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet;
依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值;Generating the synchronization frame of each encoding packet according to the group sequence number of each encoding packet, and the length value of the synchronization frame of each encoding packet is equal to the value of the group sequence number of each encoding packet;
依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;Determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet;
依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和;Generating a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and the length value of the data frame is equal to the sum of the intra-group offset value and each coding value of each coding value ;
向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
可选地,所述编码分组包括至少一个编码值,所述向所述待配网设备循环发送所述编码分组的步骤包括:Optionally, the encoded packet includes at least one encoded value, and the step of sending the encoded packet to the network device to be distributed cyclically includes:
依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;Determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet;
依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值;Generating a synchronization frame of each encoded packet according to a group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes a value of the group sequence number;
依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;Determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet;
依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和;Generate a data frame corresponding to each encoding value according to the intra-group offset value and each encoding value, and the destination address of the data frame includes the intra-group offset value of each encoding value and the with;
向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
为了解决上述问题,本申请实施例公开了一种待配网设备接入网络热点设备的方法,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述方法包括:In order to solve the above problems, an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, which is applied to a wireless network. The wireless network includes the network device to be configured, a user terminal, and Network hotspot device, the method includes:
所述待配网设备接收所述用户终端发送的配网编码信息;Receiving, by the network device to be distributed, the distribution network coding information sent by the user terminal;
对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码;Decode and decrypt the distribution network encoding information to obtain a service set identifier and password of the network hotspot device;
采用所述服务集标识和密码接入所述网络热点设备。And using the service set identifier and password to access the network hotspot device.
可选地,所述待配网设备接收所述用户终端发送的配网编码信息的步骤包括:Optionally, the step of the network device to be distributed receiving the distribution network coding information sent by the user terminal includes:
接收所述待配网设备发送所述用户数据报协议包。Receiving the user datagram protocol packet sent by the network device to be configured.
可选地,所述接收所述待配网设备发送所述用户数据报协议包的步骤包括:Optionally, the step of receiving the user datagram protocol packet sent by the network device to be configured includes:
接收所述待配网设备发送的每个编码分组的同步帧和数据帧,Receiving a synchronization frame and a data frame of each coded packet sent by the network device to be configured,
可选地,所述对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务 集标识和密码的步骤包括:Optionally, the steps of decoding and decrypting the distribution network coding information to obtain the service set identifier and password of the network hotspot device include:
依据所述同步帧的长度值,计算每个编码分组的组序号;Calculating a group number of each coded packet according to the length value of the synchronization frame;
依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;Determining the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet;
依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值,Calculate the encoding value corresponding to each data frame according to the length of each data frame and the offset within the group,
依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;Combining each coded value into a coded group according to the offset value of each coded value within the group of the coded group;
依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;Encapsulating each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet;
对所述用户数据报协议包进行解码和解密,得到所述网络热点设备的服务集标识和密码。Decoding and decrypting the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
可选地,所述对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码的步骤包括:Optionally, the steps of decoding and decrypting the distribution network encoding information to obtain the service set identifier and password of the network hotspot device include:
依据所述同步帧的目的地地址,计算每个编码分组的组序号;Calculating the group number of each coded packet according to the destination address of the synchronization frame;
依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;Determining the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet;
依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值,Calculate the encoding value corresponding to each data frame according to the destination address of each data frame and the offset within the group,
依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;Combining each coded value into a coded group according to the offset value of each coded value within the group of the coded group;
依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;Encapsulating each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet;
对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码。Decode and decrypt each encoded value of the user datagram protocol packet to obtain the service set identifier and password of the network hotspot device.
可选地,所述对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码的步骤包括:Optionally, the steps of decoding and decrypting each encoded value of the user datagram protocol packet to obtain the service set identifier and password of the network hotspot device include:
对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,所述编码方式信息包含预设编码规则,所述加密方式信息包含预设加密方式;Parsing each encoding value of the user datagram protocol packet to obtain encoding method information, encryption method information, service set identification encoding information, and password encoding information in a preset encapsulation format, the encoding method information includes a preset encoding rule The encryption method information includes a preset encryption method;
采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换;Adopting a digit conversion rule to perform digit conversion on the service set identification encoding information and the password encoding information;
采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识;Decoding the service set identification encoding information after the number of bits conversion by using the preset encoding method rule to obtain the service set identification of the network hotspot device;
采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。The preset password is used to decrypt the encrypted password to obtain the password of the network hotspot device.
为了解决上述问题,本申请实施例公开了一种待配网设备接入网络热点设备的装置,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连 接的网络热点设备,所述装置包括:In order to solve the above problem, an embodiment of the present application discloses an apparatus for accessing a network hotspot device by a network device to be configured, which is applied to a wireless network, and the wireless network includes the network device to be configured, a user terminal, and a device connected to the user terminal. Network hotspot equipment, the device includes:
配网信息获取模块,用于获取所述网络热点设备的服务集标识和密码;A network configuration information acquisition module, configured to acquire a service set identifier and password of the network hotspot device;
加密模块,用于采用预设加密方式对所述密码进行加密;An encryption module, configured to encrypt the password by using a preset encryption method;
编码模块,用于对所述服务集标识和加密后的密码进行编码,得到配网编码信息;An encoding module, configured to encode the service set identifier and the encrypted password to obtain distribution network encoding information;
发送模块,用于将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。A sending module, configured to send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is used to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and And use the service set ID and password to access the network hotspot device.
可选地,所述编码模块包括:Optionally, the encoding module includes:
预设字符判断子模块,用于判断所述服务集标识是否由ASCII码中的预设字符组成;A preset character judging submodule, configured to determine whether the service set identifier consists of preset characters in ASCII code;
第一编码子模块,用于采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息;A first encoding submodule, configured to encode the service set identifier by using a preset encoding rule to obtain service set identifier encoding information;
第一位数转换子模块,用于将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到服务集标识编码信息;A first digit conversion submodule, configured to perform a digit conversion on each byte in the service set identifier according to a digit conversion rule to obtain service set identifier coding information;
第二位数转换子模块,用于将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息;A second digit conversion submodule, configured to perform digit conversion on each byte in the encrypted password according to the digit conversion rule to obtain password encoding information;
编码信息确定子模块,用于将所述服务集标识编码信息和所述密码编码信息确定为配网编码信息。The encoding information determination submodule is configured to determine the service set identification encoding information and the password encoding information as distribution network encoding information.
可选地,所述发送模块包括:Optionally, the sending module includes:
封装子模块,用于将所述配网编码信息封装到用户数据报协议包中;An encapsulation submodule, configured to encapsulate the distribution network encoding information into a user datagram protocol packet;
发送子模块,用于向所述待配网设备发送所述用户数据报协议包。A sending submodule is configured to send the user datagram protocol packet to the network device to be configured.
可选地,所述封装子模块包括:Optionally, the packaging submodule includes:
加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
编码方式信息生成单元,用于生成与所述预设编码规则对应的编码方式信息;A coding mode information generating unit, configured to generate coding mode information corresponding to the preset coding rule;
密码长度统计单元,用于统计所述密码编码信息的密码长度,得到密码长度值;A password length counting unit, configured to count the password length of the password encoding information to obtain a password length value;
服务集标识长度统计单元,用于统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值;A service set identifier length statistics unit, configured to count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value;
封装单元,用于按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务集标识编码信息和密码编码信息封装到用户数据报协议包。The encapsulating unit is configured to encapsulate the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information into a user datagram protocol packet according to a preset encapsulation format.
可选地,所述发送子模块包括:Optionally, the sending submodule includes:
分组单元,用于按照预设字节长度,将所述用户数据报协议包中的编码值分为若干 编码分组;A grouping unit, configured to divide the encoded value in the user datagram protocol packet into several encoded packets according to a preset byte length;
编码分组发送单元,用于向所述待配网设备循环发送所述编码分组。A coded packet sending unit is configured to cyclically send the coded packet to the network device to be configured.
可选地,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:Optionally, the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
第一组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A first group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
第一同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值;A first synchronization frame generating subunit, configured to generate a synchronization frame of each encoding packet according to a group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet is equal to the each encoding packet The value of the group sequence number;
第一组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;The first group of internal offset value determination subunits is configured to determine that each coded value is within a group of the coded group according to a position of each coded value in each of the coded packets. Offset value
第一数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和;A first data frame generating subunit, configured to generate a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and a length value of the data frame is equal to the intra-group of each coding value The sum of the offset value and each coded value;
第一发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。The first sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
可选地,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:Optionally, the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
第二组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A second group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
第二同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值;A second synchronization frame generating subunit, configured to generate the synchronization frame of each encoded packet according to the group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes the group sequence number The value of
第二组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;An offset value determination subunit in the second group, configured to determine that each encoding value is within the group of the encoding packet according to the position of each encoding value in the each encoding packet Offset value
第二数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和;A second data frame generating subunit, configured to generate a data frame corresponding to each encoded value according to the offset value in the group and each encoded value, and a destination address of the data frame includes the group of each encoded value The sum of the internal offset value and each coded value;
第二发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。A second sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
为了解决上述问题,本申请实施例公开了一种待配网设备接入网络热点设备的装置,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述装置包括:In order to solve the above problem, an embodiment of the present application discloses an apparatus for accessing a network hotspot device by a network device to be configured, which is applied to a wireless network, and the wireless network includes the network device to be configured, a user terminal, and a device connected to the user terminal. Network hotspot equipment, the device includes:
接收模块,用于接收所述用户终端发送的配网编码信息;A receiving module, configured to receive distribution network coding information sent by the user terminal;
解码和解密模块,用于对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码;A decoding and decryption module, configured to decode and decrypt the distribution network coding information to obtain a service set identifier and password of the network hotspot device;
接入模块,用于采用所述服务集标识和密码接入所述网络热点设备。The access module is configured to access the network hotspot device by using the service set identifier and password.
可选地,所述接收模块包括:Optionally, the receiving module includes:
用户数据报协议包接收子模块,用于接收所述待配网设备发送所述用户数据报协议包。The user datagram protocol packet receiving submodule is configured to receive the user datagram protocol packet sent by the network device to be configured.
可选地,所述用户数据报协议包接收子模块包括:Optionally, the user datagram protocol packet receiving submodule includes:
同步帧和数据帧接收单元,用于接收所述待配网设备发送的每个编码分组的同步帧和数据帧。The synchronization frame and data frame receiving unit is configured to receive a synchronization frame and a data frame of each encoded packet sent by the network device to be configured.
可选地,所述解码和解密模块包括:Optionally, the decoding and decryption module includes:
第一组序号计算子模块,用于依据所述同步帧的长度值,计算每个编码分组的组序号;A first set of sequence number calculating submodules, configured to calculate a group sequence number of each coded packet according to the length value of the synchronization frame;
第一组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;The first set of internal offset determination sub-modules is used to determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the order of receiving the data frames of each encoding packet;
第一编码值计算子模块,用于依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值,A first encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a length of each data frame and an intra-group offset value,
第一编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A first coded packet combination sub-module, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
第一用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A first user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
解码和解密子模块,用于对所述用户数据报协议包进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
可选地,所述解码和解密模块包括:Optionally, the decoding and decryption module includes:
第二组序号计算子模块,用于依据所述同步帧的目的地地址,计算每个编码分组的组序号;A second group number calculating submodule, configured to calculate a group number of each coded packet according to a destination address of the synchronization frame;
第二组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;An offset value determination sub-module in the second group, configured to determine an offset value of the encoding value corresponding to each data frame within the encoding packet group according to the sequence of receiving the data frames of each encoding packet;
第二编码值计算子模块,用于依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值,A second encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a destination address and an intra-group offset value of each data frame,
第二编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A second coded packet combination submodule, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
第二用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A second user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
解码和解密子模块,用于对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
可选地,所述解码和解密子模块包括:Optionally, the decoding and decryption submodule includes:
解析单元,用于对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,所述编码方式信息包含预设编码规则,所述加密方式信息包含预设加密方式;A parsing unit, configured to parse each encoding value of the user datagram protocol packet to obtain encoding mode information, encryption mode information, service set identification encoding information, and password encoding information of a preset encapsulation format, the encoding mode information Contains a preset encoding rule, and the encryption method information includes a preset encryption method;
位数转换单元,用于采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换;A digit conversion unit, configured to perform digit conversion on the service set identification encoding information and the password encoding information by using a digit conversion rule;
解码单元,用于采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识;A decoding unit, configured to decode the service set identifier encoding information after the number of bits conversion by using the preset encoding rule to obtain the service set identifier of the network hotspot device;
解密单元,用于采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。The decryption unit is configured to decrypt the encrypted password by using a preset encryption method to obtain a password of the network hotspot device.
为了解决上述问题,本申请实施例公开了一种装置,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行本申请实施例所述的一个或多个的待配网设备接入网络热点设备的方法。In order to solve the above problems, an embodiment of the present application discloses an apparatus, including: one or more processors; and one or more machine-readable media having instructions stored thereon. When executed, the apparatus is caused to execute the method for accessing a network hotspot device by one or more network devices to be configured according to the embodiments of the present application.
为了解决上述问题,本申请实施例公开了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行本申请实施例所述的一个或多个的待配网设备接入网络热点设备的方法。In order to solve the above-mentioned problems, the embodiments of the present application disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the device to execute one or more of the embodiments described in the embodiments of the present application. Method for network equipment to be connected to network hotspot equipment.
本申请实施例包括以下优点:The embodiments of the present application include the following advantages:
本申请实施例中,用户终端采用预设加密方式对密码进行加密,并对服务集标识和加密后的密码进行编码,得到配网编码信息,将配网编码信息发送至待配网设备,待配网设备在接收到配网编码信息后进行解码和解密得到服务集标识和密码,并采用服务集标识和密码接入网络热点设备,由于在发送密码前对密码进行了加密和编码,避免了采用明文发送密码造成密码泄露的问题,提高了网络通信的安全性能。In the embodiment of the present application, the user terminal uses a preset encryption method to encrypt the password, encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and sends the distribution network coding information to the network equipment to be distributed. After receiving the distribution network encoding information, the distribution network device decodes and decrypts to obtain the service set ID and password, and uses the service set ID and password to access the network hotspot device. Because the password is encrypted and encoded before the password is sent, it is avoided Sending passwords in clear text causes password leakage, which improves the security performance of network communications.
本申请实施例中,将编码后的服务集标识和密码的编码信息封装为用户数据报协议包,并将用户数据报协议包中的编码值分为若干编码分组,然后以编码分组的组序号发 送同步帧,每个编码值在编码分组的组内偏移值发送数据帧,既可以对每个编码值进一步加密,又可以精准定位每个编码值在编码分组中的位置,提高了传输效率。In the embodiment of the present application, the encoded information of the encoded service set identifier and password is encapsulated into a user datagram protocol packet, and the encoded value in the user datagram protocol packet is divided into several encoded packets, and then the serial number of the encoded packet Send synchronization frame, each coded value is sent within the group of the coded packet to send a data frame, which can further encrypt each coded value and accurately locate the position of each coded value in the coded packet, improving transmission efficiency .
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请的一种待配网设备接入网络热点设备的方法实施例一的步骤流程图;FIG. 1 is a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application; FIG.
图2是本申请的一种待配网设备接入网络热点设备的方法实施例二的步骤流程图;2 is a flowchart of steps in a second embodiment of a method for a network device to be configured to access a network hotspot device according to the present application;
图3是本申请实施例中位数转换的示意图;3 is a schematic diagram of median conversion according to an embodiment of the present application;
图4是本申请实施例中发送编码信息的示意图;4 is a schematic diagram of sending encoded information in an embodiment of the present application;
图5是本申请的一种待配网设备接入网络热点设备的方法实施例三的步骤流程图;5 is a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application;
图6是本申请的一种待配网设备接入网络热点设备的方法实施例四的步骤流程图;6 is a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application;
图7是本申请的一种待配网设备接入网络热点设备的装置实施例一的结构框图;7 is a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device to a network device to be configured according to the present application;
图8是本申请的一种待配网设备接入网络热点设备的装置实施例二的结构框图。FIG. 8 is a structural block diagram of a second embodiment of a device for a network device to be configured to access a network hotspot device according to the present application.
具体实施方式Detailed ways
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。In order to make the foregoing objects, features, and advantages of the present application more comprehensible, the present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
参照图1,示出了本申请的一种待配网设备接入网络热点设备的方法实施例一的步骤流程图,本申请的一种待配网设备接入网络热点设备的方法可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下步骤:Referring to FIG. 1, there is shown a flowchart of steps in a method for accessing a network hotspot device by a network device to be configured according to the present application. A method for accessing a network hotspot device with a network device to be configured can be applied to The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
步骤101,所述用户终端获取所述网络热点设备的服务集标识和密码。Step 101: The user terminal obtains a service set identifier and password of the network hotspot device.
在本申请实施例中,网络热点设备可以是无线路由器,也可以是不具备路由功能的无线访问接入点AP(AccessPoint),用户终端可以是支持802.11和802.2通信协议的无线通信设备,例如手机、平板电脑、个人数字助理等设备,待配网设备可以是待接入网络热点设备的设备,待配网设备可以具有无线网络通信功能,例如待配网设备可以是智能插座、智能门锁等无交互界面的设备。In the embodiment of the present application, the network hotspot device may be a wireless router or a wireless access point AP (AccessPoint) without a routing function, and the user terminal may be a wireless communication device that supports the 802.11 and 802.2 communication protocols, such as a mobile phone. , Tablet computer, personal digital assistant and other devices, the network device to be configured may be a device to be connected to a network hotspot device, the network device to be configured may have wireless network communication functions, for example, the network device to be configured may be a smart socket, a smart door lock, etc Devices without an interactive interface.
用户终端中可以安装有配网APP(Application,应用程序),网络热点设备的密码和服务集标识可以由用户输入到用户终端的配网APP,也可以是在用户终端与网络热点设备建立连接后,由网络热点设备发送给用户终端的配网APP。The user terminal can be installed with a network distribution APP (Application, application). The password and service set identifier of the network hotspot device can be entered by the user into the network distribution APP of the user terminal, or after the user terminal establishes a connection with the network hotspot device. , The network distribution APP sent by the network hotspot device to the user terminal.
步骤102,采用预设加密方式对所述密码进行加密。Step 102: Encrypt the password by using a preset encryption method.
用户终端在获取网络热点设备的密码后,在将密码发送至待配网设备之前需要对密码进行加密,例如用户终端采用AES128-CFB、AES128-OFB等加密方式对密码进行加密,得到加密后的密码,该加密后的密码可以为非明文密码。After the user terminal obtains the password of the network hotspot device, it needs to encrypt the password before sending the password to the network device to be configured. For example, the user terminal uses the AES128-CFB, AES128-OFB and other encryption methods to encrypt the password. Password. The encrypted password can be a non-plaintext password.
步骤103,对所述服务集标识和加密后的密码进行编码,得到配网编码信息。Step 103: encode the service set identifier and the encrypted password to obtain distribution network encoding information.
用户终端在发送服务集标识和加密后的密码之前,可以对SSID和加密后的密码进行编码,得到配网编码信息。例如可以采用ASCII编码、UTF-8编码、GBK编码等等。还可以是对服务集标识和加密后的密码按照位数转换规则进行转换,例如按照8bits转7bits进行位数转换。Before sending the service set identifier and the encrypted password, the user terminal can encode the SSID and the encrypted password to obtain the distribution network encoding information. For example, ASCII encoding, UTF-8 encoding, GBK encoding, etc. can be used. It is also possible to convert the service set identifier and the encrypted password according to the number of bits conversion rule, for example, to convert bits according to 8 bits to 7 bits.
步骤104,将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。Step 104: Send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is used to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and password, And using the service set identifier and password to access the network hotspot device.
本申请实施例中,用户终端可以通过无线通信模块进行广播和组播方式发送配网编码信息,待配网设备可以通过空中抓包获取配网编码信息。待配网设备在接收到配网编码信息后,可以对配网编码信息进行解码和解密,以获得网络热点设备的密码和服务集标识。In the embodiment of the present application, the user terminal may send the distribution network coding information through broadcast and multicast through the wireless communication module, and the network equipment to be configured may obtain the distribution network coding information by capturing packets in the air. After receiving the distribution network coding information, the network equipment to be configured may decode and decrypt the distribution network coding information to obtain the password and service set identifier of the network hotspot device.
在本申请实施例中,用户终端在发送密码和服务集标识之前,采用预设加密方式对密码进行加密,并对服务集标识和加密后的密码进行编码,得到配网编码信息,将配网编码信息发送至待配网设备,待配网设备在接收到配网编码信息后进行解码和解密得到服务集标识和密码,并采用服务集标识和密码接入网络热点设备,由于在发送密码前对密码进行了加密和编码,避免了采用明文发送密码造成密码泄露的问题,提高了网络通信的安全性能。In the embodiment of the present application, before sending the password and the service set identifier, the user terminal encrypts the password by using a preset encryption method, and encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and The coded information is sent to the network equipment to be configured. After receiving the network network coding information, the network equipment decodes and decrypts it to obtain the service set ID and password, and uses the service set ID and password to access the network hotspot device. The password is encrypted and encoded, which avoids the problem of password leakage caused by sending the password in clear text and improves the security performance of network communication.
参照图2,示出了本申请的一种待配网设备接入网络热点设备的方法实施例二的步骤流程图,本申请的一种待配网设备接入网络热点设备的方法可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下步骤:Referring to FIG. 2, there is shown a flowchart of steps in a second embodiment of a method for accessing a network hotspot device by a network device to be configured according to the present application. The method for accessing a network hotspot device with a network device to be configured can be applied to The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
步骤201,所述用户终端获取所述网络热点设备的服务集标识和密码。Step 201: The user terminal obtains a service set identifier and password of the network hotspot device.
步骤202,采用预设加密方式对所述密码进行加密。Step 202: Encrypt the password by using a preset encryption method.
用户终端在获取网络热点设备的密码后,在将密码发送至待配网设备之前需要对密码进行加密,例如用户终端采用AES128-CFB、AES128-OFB等加密方式对密码进行加密,得到加密后的密码,该加密后的密码为非明文密码。After the user terminal obtains the password of the network hotspot device, it needs to encrypt the password before sending the password to the network device to be configured. For example, the user terminal uses the AES128-CFB, AES128-OFB and other encryption methods to encrypt the password. Password. The encrypted password is a non-plaintext password.
步骤203,判断所述服务集标识是否由ASCII码中的预设字符组成。Step 203: Determine whether the service set identifier is composed of a preset character in ASCII code.
本申请实施例中,预设字符可以是ASCII码中的可见字符。ASCII(American Standard Code for Information Interchange,美国信息交换标准代码)是基于拉丁字母的一套电脑编码***,主要用于显示现代英语和其他西欧语言,是通用的单字节编码***。In the embodiment of the present application, the preset character may be a visible character in an ASCII code. ASCII (American Standard Code for Information Interchange) is a set of computer coding systems based on the Latin alphabet. It is mainly used to display modern English and other Western European languages. It is a universal single-byte coding system.
ASCII码中0~31和127(共33个)是控制字符或通信专用字符,为不可见字符,其余为可显示字符,不可见字符如控制符:LF(换行)、CR(回车)、FF(换页)、DEL(删除)、BS(退格)、BEL(响铃)等;通信专用字符:SOH(文头)、EOT(文尾)、ACK(确认)等;ASCII值为8、9、10和13分别转换为退格、制表、换行和回车字符。它们并没有特定的图形显示,但会依不同的应用程序,而对文本显示有不同的影响。In the ASCII code, 0 to 31 and 127 (a total of 33) are control characters or communication-specific characters. They are invisible characters, and the rest are displayable characters. Invisible characters such as control characters: LF (line feed), CR (carriage return), FF (form feed), DEL (delete), BS (backspace), BEL (bell), etc .; communication-specific characters: SOH (header), EOT (end of text), ACK (confirmation), etc .; ASCII value is 8 , 9, 10, and 13 are converted to backspace, tab, line feed, and carriage return characters, respectively. They do not have a specific graphic display, but they will have different effects on the text display depending on the application.
32~126(共95个)是可见字符(32是空格),其中48~57为0到9十个***数字。65~90为26个大写英文字母,97~122号为26个小写英文字母,其余为一些标点符号、运算符号等。32 to 126 (a total of 95) are visible characters (32 is a space), of which 48 to 57 are 0 to 9 ten Arabic numerals. 65 to 90 are 26 uppercase English letters, 97 to 122 are 26 lowercase English letters, and the rest are punctuation marks and operation symbols.
用户终端在获取到服务集标识后,先判断服务集标识是否由ASCII码中的可见字符(32~126的字符)组成,如果是则执行步骤204,若否则执行步骤205。After the user terminal obtains the service set identifier, it is first determined whether the service set identifier is composed of visible characters (32 to 126 characters) in ASCII code. If so, step 204 is performed; otherwise, step 205 is performed.
步骤204,采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息。Step 204: Use a preset encoding rule to encode the service set identifier to obtain service set identifier encoding information.
本申请实施例中,预设编码规则可以是ASCII码编码规则,可以采用ASCII码编码规则对服务集标识进行编码,得到服务集标识编码信息,该服务集标识编码信息可以为多个字节的编码值。In the embodiment of the present application, the preset encoding rule may be an ASCII encoding rule. The ASCII encoding rule may be used to encode the service set identifier to obtain the service set identifier encoding information. The service set identifier encoding information may be multiple bytes. The encoded value.
例如,服务集标识为“TPLINK”,“T”在ASCII码中的ASCII值为84,用16进制表示为“54”,以此类推,“TPLINK”转换为16进制为“54 50 4C 49 4E 4B”。则“54 50 4C 49 4E 4B”即为服务集标识编码信息。For example, the service set identifier is "TPLINK", the ASCII value of "T" in the ASCII code is 84, and it is represented as "54" in hexadecimal, and so on, and "TPLINK" is converted into "54" as hexadecimal. 50 49 4E 4B ". Then "54, 50, 4C, 49, 4E, 4B" is the service set identification code information.
在本申请实施例中,还可以进行运算后编码,例如通过以下公式进行编码:In the embodiment of the present application, post-operation coding may also be performed, for example, coding is performed by the following formula:
SSID[i]=SSID_Origin[i]–0x20,SSID [i] = SSID_Origin [i] –0x20,
其中,Origin[i]为原编码,0X20为10进制数32,即ASCII码中可见字符的开始,SSID[i]为编码后的编码值。Among them, Origin [i] is the original encoding, 0X20 is the decimal number 32, which is the beginning of the visible characters in ASCII code, and SSID [i] is the encoded value after encoding.
在实际应用中不仅仅限于0X20,还可以是减去其它的数值,本申请实施例对此不加以限制。In practical applications, it is not limited to 0X20, but may be subtracted from other values, which is not limited in the embodiment of the present application.
步骤205,将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到 服务集标识编码信息。In step 205, each byte in the service set identifier is converted into digits according to the digit conversion rule to obtain service set identifier coding information.
如果服务集标识中包含不可见字符,例如中文或者其它非英文字母组成的服务集标识,则将服务集标识按照位数转换规则进行转换,得到服务集标识编码信息。If the service set identifier contains invisible characters, for example, a service set identifier composed of Chinese or other non-English letters, the service set identifier is converted according to a digit conversion rule to obtain service set identifier coding information.
位数转换规则可以是8bits转7bits的转换规则,使得转换后的SSID[i]取值范围为[0x00~0x7F]。The digit conversion rule may be a conversion rule from 8 bits to 7 bits, so that the converted SSID [i] value ranges from [0x00 to 0x7F].
例如,服务集标识为:0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,经8bits转7bits后为:0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F。For example, the service set identifier is: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, after 8bits to 7bits: 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F.
步骤206,将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息。In step 206, each byte in the encrypted password is converted into digits according to the digit conversion rule to obtain password encoding information.
经加密后的密码,可以按照位数转换规则进行转换,得到密码编码信息。The encrypted password can be converted according to the digit conversion rule to obtain the password encoding information.
如图3所示为密码加密和位数转换的流程:Figure 3 shows the process of password encryption and digit conversion:
图3中,plain_stream为未经加密的密码流,经加密后形成加密后的密码流cipher_stream,utf8_cipher_stream采用7bits表示一个字节的加密后的密码,经7bits转8bits后转换为位数转换后的tx_cipher_stream,如果8bits转7bits则过程刚好相反。In Figure 3, plain_stream is an unencrypted cipher stream, which is encrypted to form an encrypted cipher stream cipher_stream. Utf8_cipher_stream uses 7bits to represent a byte of encrypted cipher. After 7bits to 8bits, it is converted to tx_cipher_stream. If 8bits to 7bits, the process is exactly the opposite.
步骤207,将所述服务集标识编码信息和所述密码编码信息确定为配网编码信息。Step 207: Determine the service set identification coding information and the password coding information as distribution network coding information.
用户终端在得到服务集标识编码信息和密码编码信息后,可以将服务集标识编码信息和密码编码信息作为配网编码信息。After the user terminal obtains the service set identification encoding information and the password encoding information, the user terminal may use the service set identification encoding information and the password encoding information as the distribution network encoding information.
步骤208,将所述配网编码信息封装到用户数据报协议包中。Step 208: Encapsulate the distribution network coding information into a user datagram protocol packet.
用户数据报协议包是面向非连接的协议,无需建立连接,而是可以直接发送数据包,本申请实施例中,步骤208可以包括如下子步骤:The user datagram protocol packet is a non-connection-oriented protocol, and does not need to establish a connection, but can directly send a data packet. In the embodiment of this application, step 208 may include the following sub-steps:
子步骤S11,生成与所述预设加密方式对应的加密方式信息。Sub-step S11, generating encryption method information corresponding to the preset encryption method.
子步骤S12,生成与所述预设编码规则对应的编码方式信息。Sub-step S12, generating encoding mode information corresponding to the preset encoding rule.
子步骤S13,统计所述密码编码信息的密码长度,得到密码长度值。Sub-step S13: Count the password length of the password encoding information to obtain the password length value.
子步骤S14,统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值。Sub-step S14: Count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value.
子步骤S15,按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务集标识编码信息和密码编码信息封装到用户数据报协议包。In step S15, the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information are encapsulated into a user datagram protocol packet according to a preset encapsulation format.
本申请实施例中,用户数据报协议包的封装格式可以如下表1所示:In the embodiment of the present application, the encapsulation format of the user datagram protocol packet can be shown in Table 1 below:
表1Table 1
TelnTeln FlagFlag SSID_LenSSID_Len Password_LenPassword_Len SSIDSSID PasswordPassword CRCCRC
1Byte1Byte 1Byte1Byte 1Byte1Byte 1Byte1Byte m Bytem Byte N ByteN byte 1Byte1Byte
在表1中各字段含义如下:The meaning of each field in Table 1 is as follows:
Tlen:Total Length,表示包长度;Tlen: Total Length, which indicates the packet length;
Flag:表示Password的加密方式、SSID的编码格式,共8位,例如:Flag: indicates the password encryption method and SSID encoding format, a total of 8 bits, for example:
Bit0:表示是否包含SSID;Bit0: indicates whether the SSID is included;
Bit2~Bit1:表示Password的加密方式,例如10为AES OFB加密,11为AES CFB加密,00为明文,01为stream cipher;Bit2 ~ Bit1: indicates the password encryption method. For example, 10 is AES OFB encryption, 11 is AES CFB encryption, 00 is plain text, and 01 is stream cipher;
Bit4~Bit3:表示协议版本;Bit4 ~ Bit3: indicates the protocol version;
Bit5:表示SSID编码方式,例如0为ASCLL编码,1为其他编码(UTF-8);Bit5: indicates the SSID encoding method. For example, 0 is ASCLL encoding and 1 is other encoding (UTF-8).
Bit6为预留位;Bit6 is a reserved bit;
Bit7固定为0。Bit7 is fixed at 0.
SSID_Len:表示编码后的SSID长度,该字段可选,在没有SSID时可以不带该字段;SSID_Len: indicates the length of the SSID after encoding. This field is optional. It can be omitted if there is no SSID.
Password_Len:表示编码后的Password的长度;Password_Len: indicates the length of the password after encoding;
SSID:表示编码后的SSID数据,包含多个字节的编码值,该字段可选,在没有SSID可以不带该字段;SSID: Represents the encoded SSID data, which contains a multi-byte encoded value. This field is optional. It can be omitted without an SSID;
Password:表示编码后的Password数据,包含多个字节的编码值;Password: Represents the encoded Password data, including a multi-byte encoded value;
CRC:表示校验码,只保留Checksum的低7位。CRC: indicates the check code. Only the lower 7 bits of Checksum are retained.
用户终端可以根据对密码进行加密的预设加密方式生成加密方式信息,根据对服务集标识的编码方式生成编码方式信息,同时统计密码编码信息和服务集标识编码信息的长度以及整个协议包的长度,并且生成校验码填入上表的相应字段中进行封装,得到用户数据报协议包。The user terminal can generate the encryption method information according to the preset encryption method for encrypting the password, generate the encoding method information according to the encoding method of the service set identifier, and count the length of the password encoding information and the service set identifier encoding information and the length of the entire protocol packet. , And generate a check code and fill it in the corresponding field of the above table for encapsulation to obtain the user datagram protocol package.
步骤209,向所述待配网设备发送所述用户数据报协议包。Step 209: Send the user datagram protocol packet to the network device to be configured.
在本申请实施例中,可以将用户数据报协议包以编码分组的形式发送至待配网设备,具体地,步骤209可以包括如下子步骤:In the embodiment of the present application, the user datagram protocol packet may be sent to the network device to be configured in the form of an encoded packet. Specifically, step 209 may include the following sub-steps:
子步骤S21,按照预设字节长度,将所述用户数据报协议包中的编码值分为若干编码分组。Sub-step S21: divide the encoding value in the user datagram protocol packet into several encoding packets according to a preset byte length.
本申请实施例中,用户数据报协议包中可以包含多个编码值,该多个编码值为服务集标识编码以及密码加密后编码得到的。用户数据报协议包中还包括包长字段、编码方 式信息字段、加密信息字段、服务集标识长度字段、密码长度字段和校验码字段等信息,以上信息均可以通过编码值表示。In the embodiment of the present application, the user datagram protocol packet may include multiple encoding values, and the multiple encoding values are obtained by encoding the service set identifier and the password after encryption. The user datagram protocol packet also includes information such as the packet length field, the encoding method information field, the encryption information field, the service set identifier length field, the password length field, and the check code field. The above information can be represented by the encoded value.
用户终端可以将用户数据报协议包中的编码值分为若干编码分组,例如,可以按照8个字节的长度对用户数据报协议包中的多个编码值进行分组,得到若干编码分组。The user terminal may divide the encoded values in the user datagram protocol packet into several encoded packets. For example, the encoded values in the user datagram protocol packet may be grouped according to a length of 8 bytes to obtain several encoded packets.
子步骤S22,向所述待配网设备循环发送所述编码分组。Sub-step S22: Send the coded packet to the network device to be distributed cyclically.
用户终端将用户数据报协议包分为若干分组后,可以循环发送编码分组,在本申请的一种实施例中,可以将编码值写入包长字段中进行发送,则子步骤S22可以包括如下步骤:After the user terminal divides the user datagram protocol packet into several packets, the coded packet can be sent cyclically. In one embodiment of the present application, the coded value can be written into the packet length field for sending. The sub-step S22 can include the following: step:
子步骤S22-1,依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号。Sub-step S22-1, determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet.
用户终端将用户数据报协议包划分为若干编码分组后,每个编码分组在用户数据协议包中都有确定的位置,可以根据位置确定每个编码分组的组序号。After the user terminal divides the user datagram protocol packet into several coded packets, each coded packet has a certain position in the user data protocol packet, and the group sequence number of each coded packet can be determined according to the position.
在本申请实施例中,用户数据报协议包分组和组序号如下表2所示:In the embodiment of the present application, the user datagram protocol packet grouping and group sequence number are shown in Table 2 below:
表2Table 2
分组Group 0XE00XE0 0XE10XE1 0XE20XE2 0XE30XE3 0XE40XE4 0XE50XE5 0XE60XE6 0XE70XE7
表2中,0XE0表示第一个编码分组,0XE1表示第二个编码分组,0XE2表示第三个编码分组,以此类推,使得每个编码分组都具有确定的位置和相应的组序号。In Table 2, 0XE0 represents the first encoded packet, 0XE1 represents the second encoded packet, 0XE2 represents the third encoded packet, and so on, so that each encoded packet has a determined position and a corresponding group number.
子步骤S22-2,依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值。Substep S22-2, generating a synchronization frame of each encoding packet according to the group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet being equal to the group sequence number of each encoding packet value.
用户终端在发送每个编码分组内的多个编码值之前,先发送编码分组的同步帧,以告知待配网设备发送当前编码分组的同步帧之后到发送下一个编码分组的同步帧之前的数据帧都是当前编码分组的数据帧。因此需要为每个编码分组生成一个同步帧,具体地,可以生成任意内容的、包长为编码分组的组序号的值的同步帧。Before sending multiple coded values in each coded packet, the user terminal sends the synchronization frame of the coded packet to inform the network equipment to be sent the data from the synchronization frame of the current coded packet to the data before the synchronization frame of the next coded packet. The frames are the data frames of the current encoded packet. Therefore, a synchronization frame needs to be generated for each coded packet. Specifically, a synchronization frame with arbitrary content and a packet length of the value of the group sequence number of the coded packet can be generated.
例如,第一个编码分组的组序号为0XE0,则生成包长度为0XE0的同步帧,并将包长度包含在同步帧的包长字段中。For example, if the group number of the first encoded packet is 0XE0, a synchronization frame with a packet length of 0XE0 is generated, and the packet length is included in the packet length field of the synchronization frame.
子步骤S22-3,依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值。Sub-step S22-3, determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in each encoding packet in the each encoding packet.
对于每个编码分组中的编码值,其在编码分组中具有确定的位置,因此用户终端可以根据编码值在其所在编码分组中的位置,确定其在编码分组中的组内偏移值。For the encoding value in each encoding packet, it has a certain position in the encoding packet, so the user terminal can determine its intra-group offset value in the encoding packet according to its position in the encoding packet.
如下表3为编码值在编码分组中的示例:The following table 3 is an example of the encoded value in the encoded packet:
表3table 3
组内偏移值Offset value within the group 22 33 44 55 66 77 88 99
表3为按8个字节长度对用户数据报协议包进行编码分组后,编码分组中的编码值的位置和组内偏移值。该示例中是以10进制数表示组内偏移值,在实际应用中可以使用其它数值或者进制表示组内偏移值,以能够表示编码值在组内的位置即可,本申请实施例对组内偏移值的表示方式不加以限制。Table 3 shows the position and intra-group offset of the encoded value in the encoded packet after the user datagram protocol packet is encoded and grouped according to a length of 8 bytes. In this example, the offset value in the group is represented by a decimal number. In actual applications, other values or the offset value in the group can be used to represent the offset value in the group, so as to be able to indicate the position of the encoded value in the group. This application implements The example does not limit the representation of the offset value within the group.
子步骤S22-4,依据所述组内偏移值和每个编码值,生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和。Sub-step S22-4, generating a data frame corresponding to each encoding value according to the intra-group offset value and each encoding value, and the length value of the data frame is equal to the intra-group offset value of each encoding value And the sum of each encoded value.
本申请实施例中,可以以组内偏移值和编码值组合的格式发送每个编码值,具体地,可以计算每个编码值和该编码值的组内偏移值的和,将计算得到的和作为数据帧的包长字段的值,并生成包长为该值的数据帧。In the embodiment of the present application, each coded value may be sent in a format of a combination of an offset value and a coded value in the group. Specifically, a sum of each coded value and the offset value in the group of the coded value may be calculated. And are used as the value of the packet length field of the data frame, and a data frame with a packet length of this value is generated.
如下表4为组内偏移值和编码值组合的格式的示例:The following table 4 is an example of the format of the combination of offset and coded values in the group:
表4Table 4
组内偏移(4bits)Intra-group offset (4bits) 编码值(7bit)Encoded value (7bit)
在表4中,由于服务集标识为ASCII码中的可见字符时,由于ASCII码的10进制值小于128,128的二进制为10000000,共8bits,127的二进制为01111111,由于0-127的二进制高位均为0,可以省略,仅使用7bits表示,并且在服务集标识为ASCII码中的不可见字符时,也和密码一样进行了8bits到7bits的位数转换。因此编码值可以使用7bits表示。In Table 4, when the service set identifier is a visible character in the ASCII code, the decimal value of the ASCII code is less than 128, the binary value of 128 is 10000000, a total of 8 bits, the binary value of 127 is 01111111, and the binary value of 0-127 The high-order bits are 0 and can be omitted. Only 7 bits are used. When the service set identifier is an invisible character in the ASCII code, 8-bits to 7-bits are converted like the password. So the coded value can be expressed using 7bits.
例如,编码值为0x12,其组内偏移值为0x100,则编码值和组内偏移值的和为:0x100+0x12=0x112,则可以生成一个包长为0x112的数据帧,并在包长字段中写入包长度值为0x112。For example, if the encoding value is 0x12 and the offset value in the group is 0x100, the sum of the encoding value and the offset value in the group is: 0x100 + 0x12 = 0x112, then a data frame with a packet length of 0x112 can be generated, and The packet length value written in the long field is 0x112.
子步骤S22-5,向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sub-step S22-5, sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be allocated.
在生成编码分组的同步帧和编码分组的每个编码值的数据帧后,可以向待配网设备发送同步帧和数据帧,具体地,可以先发送当前编码分组的同步帧,然后发送当前编码分组的数据帧,发送完当前编码分组的数据帧后,接着发送下一编码分组的同步帧和数据帧,以此类推,直至所有编码分组发送完之后,再重新开始循环发送编码分组。After generating the synchronization frame of the encoding packet and the data frame of each encoding value of the encoding packet, the synchronization frame and the data frame can be sent to the network device to be configured. Specifically, the synchronization frame of the current encoding packet can be sent first, and then the current encoding can be sent. After sending the data frame of the packet, after sending the data frame of the current encoding packet, the synchronization frame and data frame of the next encoding packet are sent, and so on. After all the encoding packets have been transmitted, the cyclic transmission of the encoding packets is restarted.
在本申请的另一实施例中,可以将编码值写入目的地字段中进行发送,则子步骤S22可以包括如下子步骤:In another embodiment of the present application, the encoded value may be written in the destination field for transmission, and the sub-step S22 may include the following sub-steps:
子步骤S22-6,依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号。Sub-step S22-6, determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet.
子步骤S22-7,依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值。Sub-step S22-7, generating a synchronization frame of each encoded packet according to a group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes a value of the group sequence number.
用户终端可以为每个编码分组生成一个同步帧,并且将每个编码分组的组序号的值编码到同步帧的目的地地址的后三位中。The user terminal may generate a synchronization frame for each encoded packet, and encode the value of the group sequence number of each encoded packet into the last three bits of the destination address of the synchronization frame.
子步骤S22-8,依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值。Sub-step S22-8, determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet.
子步骤S22-9,依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和。Sub-step S22-9, generating a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and the destination address of the data frame includes the intra-group offset value of each coding value And the sum of each encoded value.
用户终端可以为每个编码分组内的每一个编码值生成一个数据帧,并且将每个编码值以及每个编码值的组内偏移值编码到数据帧的目的地地址的后三位中。The user terminal may generate a data frame for each encoding value in each encoding packet, and encode each encoding value and the intra-group offset value of each encoding value into the last three bits of the destination address of the data frame.
子步骤S22-10,向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sub-step S22-10, sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be allocated.
本申请实施例中,用户终端通过广播方式发送编码分组时,可以生成包长为编码分组的编码值的数据帧,用户终端通过组播方式发送编码分组时,可以生成目的地地址包含编码分组的编码值的数据帧。In the embodiment of the present application, when a user terminal sends an encoded packet in a broadcast manner, a data frame having a packet length of an encoded value of the encoded packet can be generated. When the user terminal sends an encoded packet in a multicast manner, a destination address including the encoded packet A data frame of encoded values.
为了使本领域技术人员能够更好地理解本申请实施例中用户数据报协议包的发送,以下通过一个示例加以说明:In order to enable those skilled in the art to better understand the sending of user datagram protocol packets in the embodiments of the present application, the following description is given by using an example:
假设需要发送的用户数据报协议包中包含以下编码值:Assume that the user datagram protocol packet to be sent contains the following encoded values:
12 0F 0C 00 34 4D 41 4C 00 32 4F 55 54 45 52 0D 0812 0F 0C 00 00 34D 4 41C 4 00F 32F 55 54 45 52 0D 08
按照每8个字节分成一个编码分组:Divided into a coded packet according to every 8 bytes:
第1编码分组:12 0F 0C 00 34 4D 41 4CThe first coded packet: 12 0F 0C 00 34 D 4 41 C
第2编码分组:00 32 4F 55 54 45 52 0DThe second coded packet: 00, 32, 4F, 55, 54, 52, 0D
第3编码分组:083rd coding group: 08
每个编码值的组内偏移量分别表示为:0x100,0x180,0x200,0x280,0x300,0x380,0x400,0x480。The intra-group offset of each coded value is expressed as: 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480.
0x100:表示编码分组内第1个字节的编码值的组内偏移值;0x100: the intra-group offset value of the encoded value of the first byte in the encoded packet;
0x180:表示编码分组内第2个字节的编码值的组内偏移值;0x180: indicates the intra-group offset value of the encoded value of the second byte in the encoded packet;
0x200,表示编码分组内第3个字节的编码值的组内偏移值;0x200, the intra-group offset value of the encoded value of the third byte in the encoded packet;
……...
以此类推;And so on;
每个编码分组的组序号为:0x3E0,0x3E1,0x3E2,…….,0x3EFThe group numbers of each coded packet are: 0x3E0, 0x3E1, 0x3E2, ...., 0x3EF
0x3E0:表示第1个编码分组的组序号;0x3E0: indicates the group number of the first coded packet;
0x3E1:表示第2个编码分组的组序号;0x3E1: indicates the group number of the second coded packet;
……...
以此类推;And so on;
用户终端发送顺序如下:The user terminal sends the sequence as follows:
第1编码分组的同步帧:同步帧的长度为0x3E0(可以连续发多次,提高同步的成功率);Synchronization frame of the first coded packet: the length of the synchronization frame is 0x3E0 (can be sent multiple times in succession to improve the success rate of synchronization);
第1编码分组的第1个数据帧:数据帧长度为0x100+0x12=0x112;The first data frame of the first coded packet: the data frame length is 0x100 + 0x12 = 0x112;
第1编码分组的第2个数据帧:数据帧长度为0x180+0x0F=0x18F;The second data frame of the first coded packet: the data frame length is 0x180 + 0x0F = 0x18F;
第1编码分组的第3个数据帧:数据帧长度为0x200+0x0C=0x20C;The third data frame of the first coded packet: the data frame length is 0x200 + 0x0C = 0x20C;
第1编码分组的第4个数据帧:数据帧长度为0x280+0x00=0x280;The fourth data frame of the first coded packet: the data frame length is 0x280 + 0x00 = 0x280;
第1编码分组的第5个数据帧:数据帧度为0x300+0x34=0x334;The fifth data frame of the first coded packet: the data frame degree is 0x300 + 0x34 = 0x334;
第1编码分组的第6个数据帧:数据帧度为0x380+0x4D=0x3CD;The sixth data frame of the first coded packet: the data frame degree is 0x380 + 0x4D = 0x3CD;
第1编码分组的第7个数据帧:数据帧长度为0x400+0x41=0x441;The seventh data frame of the first coded packet: the data frame length is 0x400 + 0x41 = 0x441;
第1编码分组的第8个数据帧:数据帧长度为0x480+0x4C=0x4CC;The eighth data frame of the first coded packet: the data frame length is 0x480 + 0x4C = 0x4CC;
第2编码分组的同步帧:同步帧的长度为0x3E1(可以连续发多次,提高同步的成功率);Synchronization frame of the second coded packet: the length of the synchronization frame is 0x3E1 (can be sent multiple times in succession to improve the success rate of synchronization);
第2编码分组的第1个数据帧:数据帧长度为0x100+0x00=0x100;The first data frame of the second coded packet: the data frame length is 0x100 + 0x00 = 0x100;
第2编码分组的第2个数据帧:数据帧长度为0x180+0x32=0x1B2;The second data frame of the second coded packet: the data frame length is 0x180 + 0x32 = 0x1B2;
第2编码分组的第3个数据帧:数据帧长度为0x200+0x4F=0x24F;The third data frame of the second coded packet: the data frame length is 0x200 + 0x4F = 0x24F;
第2编码分组的第4个数据帧:数据帧长度为0x280+0x55=0x2D5;The fourth data frame of the second coded packet: the data frame length is 0x280 + 0x55 = 0x2D5;
第2编码分组的第5个数据帧:数据帧长度为0x300+0x54=0x354;The fifth data frame of the second coded packet: the data frame length is 0x300 + 0x54 = 0x354;
第2编码分组的第6个数据帧:数据帧长度为0x380+0x45=0x3C5;The sixth data frame of the second coded packet: the data frame length is 0x380 + 0x45 = 0x3C5;
第2编码分组的第7个数据帧:数据帧长度为0x400+0x52=0x452;The seventh data frame of the second coded packet: the data frame length is 0x400 + 0x52 = 0x452;
第2编码分组的第8个数据帧:数据帧长度为0x480+0x0D=0x48D;The eighth data frame of the second coded packet: the data frame length is 0x480 + 0x0D = 0x48D;
第3编码分组的同步帧:同步帧的长度为0x3E2(可以连续发多次,提高同步的成功率);The synchronization frame of the third coded packet: the length of the synchronization frame is 0x3E2 (can be sent multiple times in succession to improve the success rate of synchronization);
第3编码分组的第1个数据帧:数据帧长度为0x100+0x08=0x108;The first data frame of the third coded packet: the data frame length is 0x100 + 0x08 = 0x108;
第3编码分组的数据帧发送完之后,返回发送第1编码分组的同步帧,以此循环发送。After the data frame of the third coded packet is sent, the synchronization frame of the first coded packet is returned to be transmitted in a cyclic manner.
参照图4所示为本申请实施例中发送编码信息的示意图。用户终端在每发送一组数据帧之前,先发送至少一个同步帧。每个同步帧的长度反映了对应编码分组的组序号和顺序。用户终端在发送完一组数据帧之后,发送下一编码分组的同步帧,然后再发送下一组编码分组的数据帧。用户终端在发送完所有编码分组的数据帧后,可以重复发送所有编码分组的数据帧。FIG. 4 is a schematic diagram of sending encoded information according to an embodiment of the present application. The user terminal sends at least one synchronization frame before each group of data frames is sent. The length of each synchronization frame reflects the group number and sequence of the corresponding coded packet. After sending a set of data frames, the user terminal sends a synchronization frame of the next coded packet, and then sends a data frame of the next set of coded packets. After the user terminal sends the data frames of all the encoded packets, it can repeatedly send the data frames of all the encoded packets.
本申请实施例中,用户终端采用预设加密方式对密码进行加密,并对服务集标识和加密后的密码进行编码,得到配网编码信息,将配网编码信息发送至待配网设备,待配网设备在接收到配网编码信息后进行解码和解密得到服务集标识和密码,并采用服务集标识和密码接入网络热点设备,由于在发送密码前对密码进行了加密,避免了采用明文发送密码造成密码泄露的问题,提高了网络通信的安全性能。In the embodiment of the present application, the user terminal uses a preset encryption method to encrypt the password, encodes the service set identifier and the encrypted password to obtain the distribution network coding information, and sends the distribution network coding information to the network equipment to be distributed. The distribution network equipment decodes and decrypts the received service set identification and password after receiving the distribution network encoding information, and uses the service set identification and password to access the network hotspot device. Because the password is encrypted before the password is sent, the use of clear text is avoided. The problem of password leakage caused by sending passwords improves the security performance of network communications.
本申请实施例中,将编码后的服务集标识和密码的编码信息封装为用户数据报协议包,并将用户数据报协议包中的编码值分为若干编码分组,然后以编码分组的组序号发送同步帧,每个编码值在编码分组的组内偏移值发送数据帧,既可以进一步对密码进行加密,又可以精准定位每个编码值在编码分组中的位置,提高了传输效率。In the embodiment of the present application, the encoded information of the encoded service set identifier and password is encapsulated into a user datagram protocol packet, and the encoded value in the user datagram protocol packet is divided into several encoded packets, and then the group number of the encoded packet is used. Sending a synchronization frame, and sending a data frame with each coded value offset within the group of the coded packet, can not only further encrypt the password, but also accurately locate the position of each coded value in the coded packet, improving transmission efficiency.
参照图5,示出了本申请的一种待配网设备接入网络热点设备的方法实施例三的步骤流程图,本申请的一种待配网设备接入网络热点设备的方法可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下步骤:Referring to FIG. 5, there is shown a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application. The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
步骤301,所述待配网设备接收所述用户终端发送的配网编码信息。Step 301: The network equipment to be distributed receives the distribution network coding information sent by the user terminal.
在本申请实施例中,网络热点设备可以是无线路由器,也可以是不具备路由功能的无线访问接入点AP(AccessPoint),用户终端可以是支持802.11和802.2通信协议的无线通信设备,例如手机、平板电脑、个人数字助理等设备,待配网设备可以是待接入网络热点设备的设备,待配网设备可以具有无线网络通信功能,例如待配网设备可以是智能插座、智能门锁等无交互界面的设备。In the embodiment of the present application, the network hotspot device may be a wireless router or a wireless access point AP (AccessPoint) without a routing function, and the user terminal may be a wireless communication device that supports the 802.11 and 802.2 communication protocols, such as a mobile phone. , Tablet computer, personal digital assistant and other devices, the network device to be configured may be a device to be connected to a network hotspot device, the network device to be configured may have wireless network communication functions, for example, the network device to be configured may be a smart socket, a smart door lock, etc Devices without an interactive interface.
用户终端可以通过广播或者组播的方式发送配网编码信息后,待配网设备可以进行空中抓包,接收到用户终端发送配网编码信息。After the user terminal can send the distribution network coding information through broadcast or multicast, the network equipment to be configured can capture packets in the air and receive the distribution information from the user terminal.
步骤302,对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集 标识和密码。Step 302: Decode and decrypt the distribution network coding information to obtain the service set identifier and password of the network hotspot device.
用户终端发送的配网编码信息可以是按照预定格式封装的用户数据报协议包,例如用户数据报协议包可以包括包长、编码规则、加密方式、服务集标识编码信息和密码编码信息等字段。待配网设备接收到配网编码信息后,可以根据编码规则对服务集标识编码信息进行解码,得到网络热点设备的服务集标识,以及,根据加密方式对密码编码信息进行解密,得到网络热点设备的接入密码。The distribution network encoding information sent by the user terminal may be a user datagram protocol package encapsulated in a predetermined format. For example, the user datagram protocol package may include fields such as a packet length, an encoding rule, an encryption method, service set identification encoding information, and password encoding information. After the distribution network device receives the distribution network encoding information, it can decode the service set identification encoding information according to the encoding rules to obtain the service set identification of the network hotspot device, and decrypt the password encoding information according to the encryption method to obtain the network hotspot device. Access password.
步骤303,采用所述服务集标识和密码接入所述网络热点设备。Step 303: Use the service set identifier and password to access the network hotspot device.
待配网设备获取到网络热点设备的服务集标识和接入密码后,可以根据服务集标识和接入密码请求接入网络热点设备,网络热点设备验证密码后允许待配网设备接入以实现网络连接。After the network device to be configured obtains the service set ID and access password of the network hotspot device, it can request access to the network hotspot device according to the service set ID and access password. After the network hotspot device verifies the password, the network hotspot device is allowed to access to implement Internet connection.
在本申请实施例中,待配网设备在接收到配网编码信息后进行解码和解密得到服务集标识和密码,并采用服务集标识和密码接入网络热点设备,由于用户终端在发送密码前进行了加密和解密,待配网设备需要解密和解密后得到密码,避免了明文发送密码造成密码泄露的问题,提高了网络通信的安全性能。In the embodiment of the present application, after receiving the distribution network coding information, the network equipment to be distributed decodes and decrypts to obtain the service set identifier and password, and uses the service set identifier and password to access the network hotspot device. Encryption and decryption are performed. The network device to be configured needs to be decrypted and decrypted to obtain the password, which avoids the problem of password leakage caused by sending the password in plain text and improves the security performance of network communication.
参照图6,示出了本申请的一种待配网设备接入网络热点设备的方法实施例四的步骤流程图,本申请的一种待配网设备接入网络热点设备的方法可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下步骤:Referring to FIG. 6, there is shown a flowchart of steps in Embodiment 4 of a method for accessing a network hotspot device by a network device to be configured according to the present application. The method for accessing a network hotspot device with a network device to be configured can be applied to The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following steps:
步骤401,接收所述待配网设备发送的每个编码分组的同步帧和数据帧。Step 401: Receive a synchronization frame and a data frame of each coded packet sent by the network device to be configured.
本申请实施例中,用户终端可以将配网编码信息封装为预设格式的用户数据报协议包,并将用户数据报协议包分为预设长度的编码分组,通过一个同步帧发送编码分组的组序号,通过多个数据帧发送编码分组包含的编码值。因此,待配网设备可以接收到用户终端发送的每个编码分组的同步帧和数据帧。In the embodiment of the present application, the user terminal may encapsulate the distribution network coding information into a user datagram protocol packet of a preset format, divide the user datagram protocol packet into coded packets of a preset length, and send the coded packets through a synchronization frame. The group sequence number sends the encoded value contained in the encoded packet through multiple data frames. Therefore, the network device to be configured can receive a synchronization frame and a data frame of each encoded packet sent by the user terminal.
步骤402,依据所述同步帧的长度值,计算每个编码分组的组序号。Step 402: Calculate a group number of each coded packet according to the length value of the synchronization frame.
在本申请实施例中,用户终端在生成编码分组的同步帧时,该同步帧的包长的长度值等于编码值,则待配网设备接收到同步帧后,可以从同步帧的包长字段计算出每个编码分组的组序号。In the embodiment of the present application, when a user terminal generates a synchronization frame of an encoded packet, the length value of the packet length of the synchronization frame is equal to the encoded value. After receiving the synchronization frame from the network device to be configured, the packet length field of the synchronization frame can be obtained. Calculate the group number of each coded packet.
例如,接收到同步帧的包长字段为0x3E0,即包长度值为0x3E0,则可以确定接下来接收到的数据帧为组序号为0x3E0的编码分组的数据帧,按照预先约定的编码分组的组序号,可以确定0x3E0的编码分组为第一个编码分组(如表2)。For example, if the packet length field of the received synchronization frame is 0x3E0, that is, the packet length value is 0x3E0, then it can be determined that the next received data frame is the data frame of the encoded packet with the group number of 0x3E0, and the group of the encoded packets is grouped according to a predetermined Sequence number, it can be determined that the coded packet of 0x3E0 is the first coded packet (see Table 2).
步骤403,依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值。Step 403: Determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet.
用户终端在发送每个编码分组的数据帧时是按顺序发送的,待配网设备可以按照接收数据帧的顺序确定每个数据帧在其所在的编码分组的组内偏移值,例如,约定编码分组的组内偏移值如下:The user terminal sends the data frames of each coded packet in sequence. The network device to be configured can determine the offset value of each data frame within the group of the coded packet in which the data frame is received. For example, an agreement The intra-group offset values of a coded packet are as follows:
第一个编码值的组内偏移为0x100;The intra-group offset of the first coded value is 0x100;
第二个编码值的组内偏移为0x180;The intra-group offset of the second coded value is 0x180;
第三个编码值的组内偏移为0x200;The intra-group offset of the third coded value is 0x200;
以此类推。And so on.
当接收到同步帧之后,接下来接收到的第一个数据帧的组内偏移值即为0x100、第二个数据帧的组内偏移值即为0x180、第三个数据帧的组内偏移为0x200,以此类推。When a synchronization frame is received, the intra-group offset value of the next data frame received next is 0x100, the intra-group offset value of the second data frame is 0x180, and the third data frame is within the group The offset is 0x200, and so on.
步骤404,依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值。Step 404: Calculate a coding value corresponding to each data frame according to the length of each data frame and the offset within the group.
用户终端在为每个编码值生成数据帧时,数据帧的包长的长度值等于每个编码值的组内偏移值和每个编码值的和,则待配网设备接收到数据帧后,可以根据组内偏移值和数据帧的长度值计算编码值。When the user terminal generates a data frame for each coded value, the length value of the packet length of the data frame is equal to the sum of the offset value of each coded value and each coded value. , You can calculate the encoding value based on the offset value in the group and the length value of the data frame.
例如,第一个数据帧的长度值为0x112,组内偏移值为0x100,则第一编码值为0x12。For example, if the length of the first data frame is 0x112 and the offset value in the group is 0x100, the first encoding value is 0x12.
步骤405,依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组。Step 405: Combine each encoded value into an encoded packet according to the offset value of each encoded value within the group of encoded packets.
本申请实施例中,待配网设备在接收到每个编码分组的数据帧并计算出编码值之后,可以根据编码值的组内偏移值确定该编码值在编码分组中的位置,然后将编码分组的所有编码值组合为编码分组(如表3的顺序组合为编码分组)。In the embodiment of the present application, after the network device to be configured receives the data frame of each coded packet and calculates the coded value, the position of the coded value in the coded packet may be determined according to the intra-group offset value of the coded value, and then All the encoded values of the encoded packets are combined into encoded packets (such as the sequence in Table 3 is combined into encoded packets).
步骤406,依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包。Step 406: Encapsulate each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet.
每个编码分组的组序号表示了各个编码分组的先后关系,可以根据编码分组的组序号,将所有编码分组按照预设格式封装为用户数据报协议包,该用户数据报协议包可以包括包长字段、编码方式信息字段、加密方式信息字段、服务集标识编码信息字段和密码编码信息字段、检验码字段等。The group number of each coded packet indicates the sequence of each coded packet. According to the group number of the coded packet, all coded packets can be encapsulated into a user datagram protocol packet according to a preset format. The user datagram protocol packet can include a packet length. Field, encoding method information field, encryption method information field, service set identification encoding information field, password encoding information field, check code field, etc.
步骤407,对所述用户数据报协议包进行解码和解密,得到所述网络热点设备的服务集标识和密码。Step 407: Decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
待配网设备在将所有编码分组封装为用户数据报协议包之后,可以对其进行解码和 解密,在本申请实施例中,步骤407可以包括如下子步骤:After the network equipment to be configured encapsulates all encoded packets into user datagram protocol packets, it can decode and decrypt them. In the embodiment of this application, step 407 may include the following sub-steps:
子步骤S31,对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,编码方式信息包含预设编码规则,加密方式信息包含预设加密方式。Sub-step S31, analyzing each encoding value of the user datagram protocol packet to obtain encoding method information, encryption method information, service set identification encoding information, and password encoding information in a preset encapsulation format. The encoding method information includes a preset Encoding rules, encryption method information includes preset encryption methods.
待配网设备可以按照预定的封装格式对用户数据报协议包进行解析,得到如表1所示的户数据报协议包,包括编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息等字段,其中,编码方式信息包含预设编码规则,加密方式信息包含预设加密方式。The network equipment to be configured can parse the user datagram protocol packet according to a predetermined encapsulation format, and obtain the user datagram protocol packet shown in Table 1, including encoding method information, encryption method information, service set identification encoding information, and password encoding information. And other fields, where the encoding method information includes a preset encoding rule, and the encryption method information includes a preset encryption method.
子步骤S32,采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换。In sub-step S32, a digit conversion rule is used to perform digit conversion on the service set identification encoding information and the password encoding information.
在本申请的一种实施例中,用户终端对服务集标识编码信息密码编码信息进行了位数转换,例如8bits转7bits,待配网设备在解码或者解密之前,需要按照约定的位数转换规则对服务集标识编码信息和密码编码信息进行位数转换,例如7bits转8bits,得到位数转换之后的服务集标识编码信息和密码编码信息。In an embodiment of the present application, the user terminal performs a digit conversion on the service set identification encoding information and the password encoding information, for example, 8 bits to 7 bits. Before decoding or decryption by the network equipment to be configured, the digit conversion rules must be agreed. Digit conversion is performed on the service set identification encoding information and the password encoding information, for example, 7 bits to 8 bits, to obtain the service set identification encoding information and the password encoding information after the digit conversion.
子步骤S33,采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识。Sub-step S33: Decode the service set identifier encoding information after the number of bits conversion by using the preset encoding method rule to obtain the service set identifier of the network hotspot device.
户数据报协议包中包含了编码方式信息,待配网设备可以根据编码方式信息中的编码规则对位数转换后的服务集标识编码信息进行解码,得到网络热点设备的服务集标识,例如通过ASCII编码对服务集标识编码信息中的每个编码值进行解码,即可以得到网络热点设备的服务集标识。The user datagram protocol packet contains the encoding method information. The network device to be configured can decode the service set identifier encoding information after the number of bits is converted according to the encoding rules in the encoding method information to obtain the service set identifier of the network hotspot device. ASCII encoding decodes each encoded value in the service set identification encoding information to obtain the service set identification of the network hotspot device.
子步骤S34,采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。Sub-step S34: Decrypt the encrypted password by using a preset encryption method to obtain the password of the network hotspot device.
户数据报协议包中包含了加密方式信息,待配网设备可以根据加密方式信息中的加密方式对位数转换后的密码编码信息进行解密,得到网络热点设备的密码,例如通过AES OFB加密方式对密码编码信息中的每个编码值进行解密,即可以得到网络热点设备的密码。The user datagram protocol packet contains the encryption method information. The network device to be configured can decrypt the bit-coded password encoding information according to the encryption method in the encryption method information to obtain the password of the network hotspot device, for example, through AES OFB encryption method. Decrypt each encoded value in the password encoding information to obtain the password of the network hotspot device.
以上是用户终端通过包长字段发送编码值的实施例,在本申请另一实施例中,用户终端还可以采用组播方式发送编码值,将编码值包含在目的地地址中,则步骤402-404可以变为如下步骤:The above is an embodiment in which the user terminal sends the encoded value through the packet length field. In another embodiment of the present application, the user terminal may also send the encoded value in a multicast manner to include the encoded value in the destination address. Then step 402- 404 can be changed to the following steps:
依据所述同步帧的目的地地址,计算每个编码分组的组序号;依据接收每个编码分 组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值。Calculating the group number of each encoding packet according to the destination address of the synchronization frame; determining the offset value of the encoding value corresponding to each data frame within the encoding packet group according to the order of receiving the data frames of each encoding packet; According to the destination address of each data frame and the offset value within the group, the encoding value corresponding to each data frame is calculated.
为了使本领域技术人员能够更好地理解本申请实施例中用户终端接收同步帧和数据帧的过程,以下通过一个例子加以说明:In order to enable those skilled in the art to better understand the process in which the user terminal receives the synchronization frame and the data frame in the embodiments of the present application, an example is described below:
待配网设备接收到如下数据:The network equipment to be distributed receives the following data:
第1个帧:长度为0x3E0(可能收到多次),为第一编码分组的同步帧,指示接下来8个数据帧同步到第一个编码分组;The first frame: a length of 0x3E0 (may be received multiple times), is a synchronization frame of the first encoding packet, and indicates that the next 8 data frames are synchronized to the first encoding packet;
第2个帧:长度为0x112,组内偏移值为0x100,第一编码分组的第一个编码值为0x12;The second frame: the length is 0x112, the offset value in the group is 0x100, and the first encoding value of the first encoding packet is 0x12;
第3个帧:长度为0x18F,组内偏移值为0x180,第一编码分组的第二个编码值为0x0F;The third frame: the length is 0x18F, the offset value in the group is 0x180, and the second encoding value of the first encoding packet is 0x0F;
第4个帧:长度为0x20C,组内偏移值为0x200,第一编码分组的第三个编码值为0x0C;The fourth frame: the length is 0x20C, the offset value in the group is 0x200, and the third encoding value of the first encoding packet is 0x0C;
第5个帧:长度为0x280,组内偏移值为0x280,第一编码分组的第四个编码值为0x00;The fifth frame: the length is 0x280, the offset value in the group is 0x280, and the fourth encoding value of the first encoding packet is 0x00;
第6个帧:长度为0x334,组内偏移值为0x300,第一编码分组的第五个编码值为0x34;The sixth frame: the length is 0x334, the offset value in the group is 0x300, and the fifth encoding value of the first encoding packet is 0x34;
第7个帧:长度为x3CD,组内偏移值为0x380,第一编码分组的第六个编码值为0x4D;The seventh frame: the length is x3CD, the offset value in the group is 0x380, and the sixth encoding value of the first encoding packet is 0x4D;
第8个帧:长度为0x441,组内偏移值为0x400,第一编码分组的第七个编码值为0x41;The eighth frame: the length is 0x441, the offset value in the group is 0x400, and the seventh encoding value of the first encoding packet is 0x41;
第9个帧:长度为0x4CC,组内偏移值为0x480,第一编码分组的第八个编码值为0x4C;The ninth frame: the length is 0x4CC, the offset value in the group is 0x480, and the eighth encoding value of the first encoded packet is 0x4C;
第10个帧:长度为0x3E1(可能收到多次),为第二编码分组的同步帧,指示接下来8个数据帧同步到第二个编码分组The 10th frame: a length of 0x3E1 (may be received multiple times), a synchronization frame for the second encoding packet, indicating that the next 8 data frames are synchronized to the second encoding packet
第11个帧:长度为0x100,组内偏移值为0x100,第二编码分组的第一个编码值为0x00;The 11th frame: the length is 0x100, the offset value in the group is 0x100, and the first encoding value of the second encoding packet is 0x00;
……...
以此类推。And so on.
当接收到完之后,可以将编码值和编码值所属的编码分组,将编码值组合为编码分组,然后根据编码分组和组序号以及预设封装格式封装为用户数据报协议包,再进行解 析之后解码和解密即可以得到服务集标识和密码。After receiving it, you can combine the encoded value and the encoded packet to which the encoded value belongs, combine the encoded value into an encoded packet, and then encapsulate it into a user datagram protocol packet according to the encoded packet and group sequence number and a preset encapsulation format. After parsing Decode and decrypt to get the service set ID and password.
本申请实施例中,待配网设备接收到同步帧和数据帧之后,通过同步帧的包长确定数据帧所属的编码分组,通过数据帧的包长确定编码值,并将编码值组合为编码分组以及将编码分组封装为用户数据报协议包,在对用户数据报协议包解析后,根据解析后的编码方式和加密方式对配网编码信息进行解码和解密获得网络热点设备的服务集标识和密码,并采用服务集标识和密码接入网络热点设备,由于需要对接收到的同步帧和数据帧进行解码和解密,避免了采用明发送密码造成密码泄露的问题,提高了网络通信的安全性能。In the embodiment of the present application, after the synchronization network and the data frame are received by the network equipment to be configured, the encoding packet to which the data frame belongs is determined by the packet length of the synchronization frame, the encoding value is determined by the packet length of the data frame, and the encoding value is combined into an encoding. Grouping and encapsulating encoded packets into user datagram protocol packets. After parsing the user datagram protocol packets, the distribution network encoding information is decoded and decrypted according to the parsed encoding method and encryption method to obtain the service set identifier and Password, and use the service set ID and password to access network hotspot devices. The need to decode and decrypt the received synchronization frames and data frames, avoiding the problem of password leakage caused by using clear passwords, and improving the security performance of network communications .
本申请实施例中,接收到数据帧之后,需要根据组内偏移值和数据帧的包长的长度值计算数据帧对应的编码值,增加了解码和解密的难道,既可以进一步保证密码的保密性,又可以精准定位每个编码值在编码分组中的位置,提高了传输效率。In the embodiment of the present application, after receiving a data frame, the encoding value corresponding to the data frame needs to be calculated according to the offset value in the group and the length value of the packet length of the data frame, which increases the difficulty of decoding and decryption, which can further ensure the password. The confidentiality can accurately locate the position of each encoded value in the encoded packet, which improves the transmission efficiency.
参照图7,示出了本申请的一种待配网设备接入网络热点设备的装置实施例一的结构框图,本申请的一种待配网设备接入网络热点设备可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下模块:Referring to FIG. 7, there is shown a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device of a network device to be configured according to the present application. A network hotspot device for accessing a network device to be configured can be applied to a wireless network. The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following modules:
配网信息获取模块501,用于获取所述网络热点设备的服务集标识和密码;A network configuration information obtaining module 501, configured to obtain a service set identifier and password of the network hotspot device;
加密模块502,用于采用预设加密方式对所述密码进行加密;An encryption module 502, configured to encrypt the password by using a preset encryption method;
编码模块503,用于对所述服务集标识和加密后的密码进行编码,得到配网编码信息;An encoding module 503, configured to encode the service set identifier and the encrypted password to obtain distribution network encoding information;
发送模块504,用于将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。A sending module 504, configured to send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is configured to decode and decrypt the network set information to obtain the service set identifier after receiving the distribution network coding information. And password, and using the service set identifier and password to access the network hotspot device.
可选地,所述编码模块503包括:Optionally, the encoding module 503 includes:
预设字符判断子模块,用于判断所述服务集标识是否由ASCII码中的预设字符组成;A preset character judging submodule, configured to determine whether the service set identifier consists of preset characters in ASCII code;
第一编码子模块,用于采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息;A first encoding submodule, configured to encode the service set identifier by using a preset encoding rule to obtain service set identifier encoding information;
第一位数转换子模块,用于将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到服务集标识编码信息;A first digit conversion submodule, configured to perform a digit conversion on each byte in the service set identifier according to a digit conversion rule to obtain service set identifier coding information;
第二位数转换子模块,用于将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息;A second digit conversion submodule, configured to perform digit conversion on each byte in the encrypted password according to the digit conversion rule to obtain password encoding information;
编码信息确定子模块,用于将所述服务集标识编码信息和所述密码编码信息确定为配网编码信息。The encoding information determination submodule is configured to determine the service set identification encoding information and the password encoding information as distribution network encoding information.
可选地,所述发送模块504包括:Optionally, the sending module 504 includes:
封装子模块,用于将所述配网编码信息封装到用户数据报协议包中;An encapsulation submodule, configured to encapsulate the distribution network encoding information into a user datagram protocol packet;
发送子模块,用于向所述待配网设备发送所述用户数据报协议包。A sending submodule is configured to send the user datagram protocol packet to the network device to be configured.
可选地,所述封装子模块包括:Optionally, the packaging submodule includes:
加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
编码方式信息生成单元,用于生成与所述预设编码规则对应的编码方式信息;A coding mode information generating unit, configured to generate coding mode information corresponding to the preset coding rule;
密码长度统计单元,用于统计所述密码编码信息的密码长度,得到密码长度值;A password length counting unit, configured to count the password length of the password encoding information to obtain a password length value;
服务集标识长度统计单元,用于统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值;A service set identifier length statistics unit, configured to count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value;
封装单元,用于按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务集标识编码信息和密码编码信息封装到用户数据报协议包。The encapsulating unit is configured to encapsulate the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information into a user datagram protocol packet according to a preset encapsulation format.
可选地,所述发送子模块包括:Optionally, the sending submodule includes:
分组单元,用于按照预设字节长度,将所述用户数据报协议包中的编码值分为若干编码分组;A grouping unit, configured to divide the coded value in the user datagram protocol packet into coded groups according to a preset byte length;
编码分组发送单元,用于向所述待配网设备循环发送所述编码分组。A coded packet sending unit is configured to cyclically send the coded packet to the network device to be configured.
可选地,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:Optionally, the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
第一组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A first group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
第一同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值;A first synchronization frame generating subunit, configured to generate a synchronization frame of each encoding packet according to a group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet is equal to the each encoding packet The value of the group sequence number;
第一组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;The first group of internal offset value determination subunits is configured to determine that each coded value is within a group of the coded group according to a position of each coded value in each of the coded packets. Offset value
第一数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和;A first data frame generating subunit, configured to generate a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and a length value of the data frame is equal to the intra-group of each coding value The sum of the offset value and each coded value;
第一发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。The first sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
可选地,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:Optionally, the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
第二组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A second group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
第二同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值;A second synchronization frame generating subunit, configured to generate the synchronization frame of each encoded packet according to the group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes the group sequence number The value of
第二组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;An offset value determination subunit in the second group, configured to determine that each encoding value is within the group of the encoding packet according to the position of each encoding value in the each encoding packet Offset value
第二数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和;A second data frame generating subunit, configured to generate a data frame corresponding to each encoded value according to the offset value in the group and each encoded value, and a destination address of the data frame includes the group of each encoded value The sum of the internal offset value and each coded value;
第二发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。A second sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
参照图8,示出了本申请的一种待配网设备接入网络热点设备的装置实施例二的结构框图,本申请的一种待配网设备接入网络热点设备可以应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,具体可以包括如下模块:Referring to FIG. 8, there is shown a structural block diagram of a second embodiment of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application. The access to a network hotspot device by a network device to be configured can be applied to a wireless network, The wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, and may specifically include the following modules:
接收模块601,用于接收所述用户终端发送的配网编码信息;A receiving module 601, configured to receive distribution network coding information sent by the user terminal;
解码和解密模块602,用于对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码;A decoding and decryption module 602, configured to decode and decrypt the distribution network coding information to obtain a service set identifier and password of the network hotspot device;
接入模块603,用于采用所述服务集标识和密码接入所述网络热点设备。The access module 603 is configured to access the network hotspot device by using the service set identifier and password.
可选地,所述接收模块601包括:Optionally, the receiving module 601 includes:
用户数据报协议包接收子模块,用于接收所述待配网设备发送所述用户数据报协议包。The user datagram protocol packet receiving submodule is configured to receive the user datagram protocol packet sent by the network device to be configured.
可选地,所述用户数据报协议包接收子模块包括:Optionally, the user datagram protocol packet receiving submodule includes:
同步帧和数据帧接收单元,用于接收所述待配网设备发送的每个编码分组的同步帧和数据帧。The synchronization frame and data frame receiving unit is configured to receive a synchronization frame and a data frame of each encoded packet sent by the network device to be configured.
可选地,所述解码和解密模块602包括:Optionally, the decoding and decryption module 602 includes:
第一组序号计算子模块,用于依据所述同步帧的长度值,计算每个编码分组的组序号;A first set of sequence number calculating submodules, configured to calculate a group sequence number of each coded packet according to the length value of the synchronization frame;
第一组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每 个数据帧对应的编码值在编码分组的组内偏移值;The first set of internal offset determination sub-modules is used to determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the order of receiving the data frames of each encoding packet;
第一编码值计算子模块,用于依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值,A first encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a length of each data frame and an intra-group offset value,
第一编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A first coded packet combination sub-module, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
第一用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A first user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
解码和解密子模块,用于对所述用户数据报协议包进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
可选地,所述解码和解密模块602包括:Optionally, the decoding and decryption module 602 includes:
第二组序号计算子模块,用于依据所述同步帧的目的地地址,计算每个编码分组的组序号;A second group number calculating submodule, configured to calculate a group number of each coded packet according to a destination address of the synchronization frame;
第二组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;An offset value determination sub-module in the second group, configured to determine an offset value of the encoding value corresponding to each data frame within the encoding packet group according to the sequence of receiving the data frames of each encoding packet;
第二编码值计算子模块,用于依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值,A second encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a destination address and an intra-group offset value of each data frame,
第二编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A second coded packet combination submodule, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
第二用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A second user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
解码和解密子模块,用于对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
可选地,所述解码和解密子模块包括:Optionally, the decoding and decryption submodule includes:
解析单元,用于对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,所述编码方式信息包含预设编码规则,所述加密方式信息包含预设加密方式;A parsing unit, configured to parse each encoding value of the user datagram protocol packet to obtain encoding mode information, encryption mode information, service set identification encoding information, and password encoding information of a preset encapsulation format, the encoding mode information Contains a preset encoding rule, and the encryption method information includes a preset encryption method;
位数转换单元,用于采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换;A digit conversion unit, configured to perform digit conversion on the service set identification encoding information and the password encoding information by using a digit conversion rule;
解码单元,用于采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识;A decoding unit, configured to decode the service set identifier encoding information after the number of bits conversion by using the preset encoding rule to obtain the service set identifier of the network hotspot device;
解密单元,用于采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。The decryption unit is configured to decrypt the encrypted password by using a preset encryption method to obtain a password of the network hotspot device.
本申请实施例还提供了一种装置,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行本申请实施例所述方法。An embodiment of the present application further provides an apparatus, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause The device executes the method described in the embodiment of the present application.
本申请实施例还提供了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行本申请实施例所述的方法。The embodiments of the present application further provide one or more machine-readable media, on which instructions are stored, which when executed by one or more processors, cause the apparatus to execute the method described in the embodiments of the present application.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant part, refer to the description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may refer to each other.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本申请实施例是参照根据本申请实施例的方法、终端设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The embodiments of the present application are described with reference to flowcharts and / or block diagrams of the method, the terminal device (system), and the computer program product according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal device Means are generated for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including the instruction means, the The instruction means implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在 计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing terminal device, so that a series of operation steps can be performed on the computer or other programmable terminal device to produce a computer-implemented process, so that the computer or other programmable terminal device can The instructions executed on the steps provide steps for implementing the functions specified in one or more of the flowcharts and / or one or more of the block diagrams.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make other changes and modifications to these embodiments once they know the basic inventive concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between OR operations. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements but also those that are not explicitly listed Other elements, or elements inherent to such a process, method, article, or terminal. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, article, or terminal device including the elements.
以上对本申请所提供的一种待配网设备接入网络热点设备的方法和一种待配网设备接入网络热点设备的装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The method for accessing a network hotspot device and the device for accessing a network hotspot device provided by the network device to be configured in the present application have been described in detail above. Specific examples are applied in this article to explain the principles and The embodiments are described. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, both the specific implementation and the scope of application are There may be changes. In summary, the content of this specification should not be construed as a limitation on this application.

Claims (28)

  1. 一种待配网设备接入网络热点设备的方法,其特征在于,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述方法包括:A method for a network device to be connected to a network hotspot device, which is characterized in that it is applied to a wireless network, the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, the method include:
    所述用户终端获取所述网络热点设备的服务集标识和密码;Obtaining, by the user terminal, a service set identifier and password of the network hotspot device;
    采用预设加密方式对所述密码进行加密;Encrypting the password by using a preset encryption method;
    对所述服务集标识和加密后的密码进行编码,得到配网编码信息;Encoding the service set identifier and the encrypted password to obtain distribution network encoding information;
    将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。Sending the distribution network coding information to the network equipment to be configured, the network equipment to be configured to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and password, and adopt The service set identifier and password are used to access the network hotspot device.
  2. 如权利要求1所述的方法,其特征在于,所述对所述服务集标识和加密后的密码进行编码,得到配网编码信息的步骤包括:The method according to claim 1, wherein the step of encoding the service set identifier and the encrypted password to obtain distribution network encoding information comprises:
    判断所述服务集标识是否由ASCII码中的预设字符组成;Determining whether the service set identifier is composed of preset characters in ASCII code;
    若是,采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息;If yes, encoding the service set identifier by using a preset encoding rule to obtain service set identifier encoding information;
    若否,则将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到服务集标识编码信息;If not, converting each byte in the service set identifier according to the digit conversion rule to obtain service set identifier coding information;
    将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息;Converting each byte of the encrypted password according to the number of bits conversion rule to obtain password encoding information;
    将所述服务集标识编码信息和所述密码编码信息确定为配网编码信息。Determining the service set identification encoding information and the password encoding information as distribution network encoding information.
  3. 如权利要求2所述的方法,其特征在于,所述将所述配网编码信息发送至所述待配网设备的步骤包括:The method according to claim 2, wherein the step of sending the distribution network coding information to the network equipment to be distributed comprises:
    将所述配网编码信息封装到用户数据报协议包中;Encapsulating the distribution network coding information into a user datagram protocol packet;
    向所述待配网设备发送所述用户数据报协议包。And sending the user datagram protocol packet to the network device to be configured.
  4. 如权利要求3所述的方法,其特征在于,所述将所述配网编码信息封装到用户数据报协议包中的步骤包括:The method according to claim 3, wherein the step of encapsulating the distribution network encoding information into a user datagram protocol packet comprises:
    生成与所述预设加密方式对应的加密方式信息;Generating encryption method information corresponding to the preset encryption method;
    生成与所述预设编码规则对应的编码方式信息;Generating encoding method information corresponding to the preset encoding rule;
    统计所述密码编码信息的密码长度,得到密码长度值;Count the password length of the password encoding information to obtain the password length value;
    统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值;Count the service set identifier length of the service set identifier encoding information to obtain the service set identifier length value;
    按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务 集标识编码信息和密码编码信息封装到用户数据报协议包。According to a preset encapsulation format, the encryption method information, password length value, service set identifier length value, service set identification encoding information, and password encoding information are encapsulated into a user datagram protocol packet.
  5. 如权利要求3所述的方法,其特征在于,所述向所述待配网设备发送所述用户数据报协议包的步骤包括:The method according to claim 3, wherein the step of sending the user datagram protocol packet to the network device to be configured comprises:
    按照预设字节长度,将所述用户数据报协议包中的编码值分为若干编码分组;Dividing the encoded value in the user datagram protocol packet into several encoded packets according to a preset byte length;
    向所述待配网设备循环发送所述编码分组。Send the coded packet to the network device to be distributed cyclically.
  6. 如权利要求5所述的方法,其特征在于,所述编码分组包括至少一个编码值,所述向所述待配网设备循环发送所述编码分组的步骤包括:The method according to claim 5, wherein the coded packet includes at least one coded value, and the step of transmitting the coded packet to the network device to be distributed cyclically comprises:
    依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;Determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet;
    依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值;Generating the synchronization frame of each encoding packet according to the group sequence number of each encoding packet, and the length value of the synchronization frame of each encoding packet is equal to the value of the group sequence number of each encoding packet;
    依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;Determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet;
    依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和;Generating a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and the length value of the data frame is equal to the sum of the intra-group offset value and each coding value of each coding value ;
    向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  7. 如权利要求5所述的方法,其特征在于,所述编码分组包括至少一个编码值,所述向所述待配网设备循环发送所述编码分组的步骤包括:The method according to claim 5, wherein the coded packet includes at least one coded value, and the step of transmitting the coded packet to the network device to be distributed cyclically comprises:
    依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;Determining a group sequence number of each encoded packet according to a position of each encoded packet in the user datagram protocol packet;
    依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值;Generating a synchronization frame of each encoded packet according to a group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes a value of the group sequence number;
    依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;Determining an intra-group offset value of each encoding value in the encoding packet according to a position of each encoding value in the each encoding packet in the each encoding packet;
    依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和;Generate a data frame corresponding to each encoding value according to the intra-group offset value and each encoding value, and the destination address of the data frame includes the intra-group offset value of each encoding value and the with;
    向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。Sending a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  8. 一种待配网设备接入网络热点设备的方法,其特征在于,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述 方法包括:A method for a network device to be connected to a network hotspot device, which is characterized in that it is applied to a wireless network, the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, the method include:
    所述待配网设备接收所述用户终端发送的配网编码信息;Receiving, by the network device to be distributed, the distribution network coding information sent by the user terminal;
    对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码;Decode and decrypt the distribution network encoding information to obtain a service set identifier and password of the network hotspot device;
    采用所述服务集标识和密码接入所述网络热点设备。And using the service set identifier and password to access the network hotspot device.
  9. 如权利要求8所述的方法,其特征在于,所述待配网设备接收所述用户终端发送的配网编码信息的步骤包括:The method according to claim 8, characterized in that the step of the network equipment to be distributed receiving the distribution network coding information sent by the user terminal comprises:
    接收所述待配网设备发送所述用户数据报协议包。Receiving the user datagram protocol packet sent by the network device to be configured.
  10. 如权利要求9所述的方法,其特征在于,所述接收所述待配网设备发送所述用户数据报协议包的步骤包括:The method according to claim 9, wherein the step of receiving the user datagram protocol packet sent by the network device to be distributed comprises:
    接收所述待配网设备发送的每个编码分组的同步帧和数据帧。Receiving a synchronization frame and a data frame of each coded packet sent by the network device to be configured.
  11. 如权利要求10所述的方法,其特征在于,所述对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码的步骤包括:The method according to claim 10, wherein the step of decoding and decrypting the distribution network coding information to obtain a service set identifier and password of the network hotspot device comprises:
    依据所述同步帧的长度值,计算每个编码分组的组序号;Calculating a group number of each coded packet according to the length value of the synchronization frame;
    依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;Determining the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet;
    依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值;Calculate the encoding value corresponding to each data frame according to the length of each data frame and the offset within the group;
    依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;Combining each coded value into a coded group according to the offset value of each coded value within the group of the coded group;
    依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;Encapsulating each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet;
    对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码。Decode and decrypt each encoded value of the user datagram protocol packet to obtain the service set identifier and password of the network hotspot device.
  12. 如权利要求10所述的方法,其特征在于,所述对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码的步骤包括:The method according to claim 10, wherein the step of decoding and decrypting the distribution network coding information to obtain a service set identifier and password of the network hotspot device comprises:
    依据所述同步帧的目的地地址,计算每个编码分组的组序号;Calculating the group number of each coded packet according to the destination address of the synchronization frame;
    依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;Determining the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the sequence of receiving the data frames of each encoding packet;
    依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值;Calculate the coding value corresponding to each data frame according to the destination address of each data frame and the offset within the group;
    依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;Combining each coded value into a coded group according to the offset value of each coded value within the group of the coded group;
    依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;Encapsulating each encoded packet into a user datagram protocol packet according to the group sequence number of each encoded packet;
    对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的 服务集标识和密码。Decode and decrypt each encoded value of the user datagram protocol packet to obtain the service set identifier and password of the network hotspot device.
  13. 如权利要求11或12所述的方法,其特征在于,所述对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码的步骤包括:The method according to claim 11 or 12, wherein the step of decoding and decrypting each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device comprises :
    对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,所述编码方式信息包含预设编码规则,所述加密方式信息包含预设加密方式;Parsing each encoding value of the user datagram protocol packet to obtain encoding method information, encryption method information, service set identification encoding information, and password encoding information in a preset encapsulation format, the encoding method information includes a preset encoding rule The encryption method information includes a preset encryption method;
    采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换;Adopting a digit conversion rule to perform digit conversion on the service set identification encoding information and the password encoding information;
    采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识;Decoding the service set identification encoding information after the number of bits conversion by using the preset encoding method rule to obtain the service set identification of the network hotspot device;
    采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。The preset password is used to decrypt the encrypted password to obtain the password of the network hotspot device.
  14. 一种待配网设备接入网络热点设备的装置,其特征在于,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述装置包括:An apparatus for accessing a network hotspot device by a network device to be configured, which is characterized in that it is applied to a wireless network, the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, the device include:
    配网信息获取模块,用于获取所述网络热点设备的服务集标识和密码;A network configuration information acquisition module, configured to acquire a service set identifier and password of the network hotspot device;
    加密模块,用于采用预设加密方式对所述密码进行加密;An encryption module, configured to encrypt the password by using a preset encryption method;
    编码模块,用于对所述服务集标识和加密后的密码进行编码,得到配网编码信息;An encoding module, configured to encode the service set identifier and the encrypted password to obtain distribution network encoding information;
    发送模块,用于将所述配网编码信息发送至所述待配网设备,所述待配网设备用于在接收到所述配网编码信息后进行解码和解密得到所述服务集标识和密码,并采用所述服务集标识和密码接入所述网络热点设备。A sending module, configured to send the distribution network coding information to the network equipment to be configured, where the network equipment to be configured is used to decode and decrypt after receiving the distribution network coding information to obtain the service set identifier and And use the service set ID and password to access the network hotspot device.
  15. 如权利要求14所述的装置,其特征在于,所述编码模块包括:The apparatus according to claim 14, wherein the encoding module comprises:
    预设字符判断子模块,用于判断所述服务集标识是否由ASCII码中的预设字符组成;A preset character judging submodule, configured to determine whether the service set identifier consists of preset characters in ASCII code;
    第一编码子模块,用于采用预设编码规则对所述服务集标识进行编码,得到服务集标识编码信息;A first encoding submodule, configured to encode the service set identifier by using a preset encoding rule to obtain service set identifier encoding information;
    第一位数转换子模块,用于将所述服务集标识中的每个字节按照位数转换规则进行位数转换,得到服务集标识编码信息;A first digit conversion submodule, configured to perform a digit conversion on each byte in the service set identifier according to a digit conversion rule to obtain service set identifier coding information;
    第二位数转换子模块,用于将所述加密后的密码中的每个字节按照位数转换规则进行位数转换,得到密码编码信息;A second digit conversion submodule, configured to perform digit conversion on each byte in the encrypted password according to the digit conversion rule to obtain password encoding information;
    编码信息确定子模块,用于将所述服务集标识编码信息和所述密码编码信息确定为 配网编码信息。The coding information determination submodule is configured to determine the service set identification coding information and the password coding information as distribution network coding information.
  16. 如权利要求15所述的装置,其特征在于,所述发送模块包括:The apparatus according to claim 15, wherein the sending module comprises:
    封装子模块,用于将所述配网编码信息封装到用户数据报协议包中;An encapsulation submodule, configured to encapsulate the distribution network encoding information into a user datagram protocol packet;
    发送子模块,用于向所述待配网设备发送所述用户数据报协议包。A sending submodule is configured to send the user datagram protocol packet to the network device to be configured.
  17. 如权利要求16所述的装置,其特征在于,所述封装子模块包括:The apparatus according to claim 16, wherein the packaging sub-module comprises:
    加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
    编码方式信息生成单元,用于生成与所述预设编码规则对应的编码方式信息;A coding mode information generating unit, configured to generate coding mode information corresponding to the preset coding rule;
    密码长度统计单元,用于统计所述密码编码信息的密码长度,得到密码长度值;A password length counting unit, configured to count the password length of the password encoding information to obtain a password length value;
    服务集标识长度统计单元,用于统计所述服务集标识编码信息的服务集标识长度,得到服务集标识长度值;A service set identifier length statistics unit, configured to count the service set identifier length of the service set identifier encoding information to obtain a service set identifier length value;
    封装单元,用于按照预设封装格式,将所述加密方式信息、密码长度值、服务集标识长度值、服务集标识编码信息和密码编码信息封装到用户数据报协议包。The encapsulating unit is configured to encapsulate the encryption method information, the password length value, the service set identifier length value, the service set identification encoding information, and the password encoding information into a user datagram protocol packet according to a preset encapsulation format.
  18. 如权利要求16所述的装置,其特征在于,所述发送子模块包括:The apparatus according to claim 16, wherein the sending sub-module comprises:
    分组单元,用于按照预设字节长度,将所述用户数据报协议包中的编码值分为若干编码分组;A grouping unit, configured to divide the coded value in the user datagram protocol packet into coded groups according to a preset byte length;
    编码分组发送单元,用于向所述待配网设备循环发送所述编码分组。A coded packet sending unit is configured to cyclically send the coded packet to the network device to be configured.
  19. 如权利要求18所述的装置,其特征在于,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:The apparatus according to claim 18, wherein the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
    第一组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A first group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
    第一同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的长度值等于所述每个编码分组的组序号的值;A first synchronization frame generating subunit, configured to generate a synchronization frame of each encoding packet according to a group sequence number of each encoding packet, and a length value of the synchronization frame of each encoding packet is equal to the each encoding packet The value of the group sequence number;
    第一组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;The first group of internal offset value determination subunits is configured to determine that each coded value is within a group of the coded group according to a position of each coded value in each of the coded packets. Offset value
    第一数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的长度值等于所述每个编码值的组内偏移值和每个编码值的和;A first data frame generating subunit, configured to generate a data frame corresponding to each coding value according to the intra-group offset value and each coding value, and a length value of the data frame is equal to the intra-group of each coding value The sum of the offset value and each coded value;
    第一发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。The first sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  20. 如权利要求18所述的装置,其特征在于,所述编码分组包括至少一个编码值,所述编码分组发送单元包括:The apparatus according to claim 18, wherein the encoded packet includes at least one encoded value, and the encoded packet sending unit includes:
    第二组序号确定子单元,用于依据每个编码分组在所述用户数据报协议包中的位置确定所述每个编码分组的组序号;A second group of sequence number determining subunits, configured to determine a group sequence number of each coded packet according to a position of each coded packet in the user datagram protocol packet;
    第二同步帧生成子单元,用于依据所述每个编码分组的组序号生成所述每个编码分组的同步帧,所述每个编码分组的同步帧的目的地地址中包含所述组序号的值;A second synchronization frame generating subunit, configured to generate the synchronization frame of each encoded packet according to the group sequence number of each encoded packet, and a destination address of the synchronization frame of each encoded packet includes the group sequence number The value of
    第二组内偏移值确定子单元,用于依据所述每个编码分组中每个编码值在所述每个编码分组中的位置,确定所述每个编码值在编码分组中的组内偏移值;An offset value determination subunit in the second group, configured to determine that each encoding value is within the group of the encoding packet according to the position of each encoding value in the each encoding packet Offset value
    第二数据帧生成子单元,用于依据所述组内偏移值和每个编码值生成每个编码值对应的数据帧,所述数据帧的目的地地址包含所述每个编码值的组内偏移值和每个编码值的和;A second data frame generating subunit, configured to generate a data frame corresponding to each encoded value according to the offset value in the group and each encoded value, and a destination address of the data frame includes the group of each encoded value The sum of the internal offset value and each coded value;
    第二发送子单元,用于向所述待配网设备发送所述编码分组的同步帧和每个编码值对应的数据帧。A second sending subunit is configured to send a synchronization frame of the encoded packet and a data frame corresponding to each encoded value to the network device to be configured.
  21. 一种待配网设备接入网络热点设备的装置,其特征在于,应用于无线网络,所述无线网络包括待配网设备、用户终端以及与所述用户终端连接的网络热点设备,所述装置包括:An apparatus for accessing a network hotspot device by a network device to be configured, which is characterized in that it is applied to a wireless network, the wireless network includes a network device to be configured, a user terminal, and a network hotspot device connected to the user terminal, the device include:
    接收模块,用于接收所述用户终端发送的配网编码信息;A receiving module, configured to receive distribution network coding information sent by the user terminal;
    解码和解密模块,用于对所述配网编码信息进行解码和解密,得到所述网络热点设备的服务集标识和密码;A decoding and decryption module, configured to decode and decrypt the distribution network coding information to obtain a service set identifier and password of the network hotspot device;
    接入模块,用于采用所述服务集标识和密码接入所述网络热点设备。The access module is configured to access the network hotspot device by using the service set identifier and password.
  22. 如权利要求21所述的装置,其特征在于,所述接收模块包括:The apparatus according to claim 21, wherein the receiving module comprises:
    用户数据报协议包接收子模块,用于接收所述待配网设备发送所述用户数据报协议包。The user datagram protocol packet receiving submodule is configured to receive the user datagram protocol packet sent by the network device to be configured.
  23. 如权利要求22所述的装置,其特征在于,所述用户数据报协议包接收子模块包括:The apparatus according to claim 22, wherein the user datagram protocol packet receiving submodule comprises:
    同步帧和数据帧接收单元,用于接收所述待配网设备发送的每个编码分组的同步帧和数据帧。The synchronization frame and data frame receiving unit is configured to receive a synchronization frame and a data frame of each encoded packet sent by the network device to be configured.
  24. 如权利要求23所述的装置,其特征在于,所述解码和解密模块包括:The apparatus according to claim 23, wherein the decoding and decryption module comprises:
    第一组序号计算子模块,用于依据所述同步帧的长度值,计算每个编码分组的组序 号;A first group of sequence calculation submodules, configured to calculate a group sequence number of each coded packet according to the length value of the synchronization frame;
    第一组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;The first set of internal offset determination sub-modules is used to determine the offset value of the encoding value corresponding to each data frame within the group of encoding packets according to the order of receiving the data frames of each encoding packet;
    第一编码值计算子模块,用于依据每个数据帧的长度和组内偏移值,计算每个数据帧对应的编码值,A first encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a length of each data frame and an intra-group offset value,
    第一编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A first coded packet combination sub-module, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
    第一用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A first user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
    解码和解密子模块,用于对所述用户数据报协议包进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  25. 如权利要求23所述的装置,其特征在于,所述解码和解密模块包括:The apparatus according to claim 23, wherein the decoding and decryption module comprises:
    第二组序号计算子模块,用于依据所述同步帧的目的地地址,计算每个编码分组的组序号;A second group number calculating submodule, configured to calculate a group number of each coded packet according to a destination address of the synchronization frame;
    第二组内偏移值确定子模块,用于依据接收每个编码分组的数据帧的顺序,确定每个数据帧对应的编码值在编码分组的组内偏移值;An offset value determination sub-module in the second group, configured to determine an offset value of the encoding value corresponding to each data frame within the encoding packet group according to the sequence of receiving the data frames of each encoding packet;
    第二编码值计算子模块,用于依据每个数据帧的目的地地址和组内偏移值,计算每个数据帧对应的编码值,A second encoding value calculation sub-module, configured to calculate an encoding value corresponding to each data frame according to a destination address and an intra-group offset value of each data frame,
    第二编码分组组合子模块,用于依据每个编码值在编码分组的组内偏移值,将每个编码值组合为编码分组;A second coded packet combination submodule, configured to combine each coded value into a coded packet according to the offset value of each coded value within the group of the coded packet;
    第二用户数据报协议包封装子模块,用于依据每个编码分组的组序号,将所述每个编码分组封装为用户数据报协议包;A second user datagram protocol packet encapsulation submodule, configured to encapsulate each encoded packet into a user datagram protocol packet according to a group sequence number of each encoded packet;
    解码和解密子模块,用于对所述用户数据报协议包的每个编码值进行解码和解密,得到所述网络热点设备的服务集标识和密码。A decoding and decryption submodule is configured to decode and decrypt each encoded value of the user datagram protocol packet to obtain a service set identifier and password of the network hotspot device.
  26. 如权利要求24或25所述的装置,其特征在于,所述解码和解密子模块包括:The apparatus according to claim 24 or 25, wherein the decoding and decryption sub-module comprises:
    解析单元,用于对所述用户数据报协议包的每个编码值进行解析,得到预设封装格式的编码方式信息、加密方式信息、服务集标识编码信息和密码编码信息,所述编码方式信息包含预设编码规则,所述加密方式信息包含预设加密方式;A parsing unit, configured to parse each encoding value of the user datagram protocol packet to obtain encoding mode information, encryption mode information, service set identification encoding information, and password encoding information of a preset encapsulation format, the encoding mode information Contains a preset encoding rule, and the encryption method information includes a preset encryption method;
    位数转换单元,用于采用位数转换规则对所述服务集标识编码信息和所述密码编码信息进行位数转换;A digit conversion unit, configured to perform digit conversion on the service set identification encoding information and the password encoding information by using a digit conversion rule;
    解码单元,用于采用所述预设编码方式规则对位数转换后的服务集标识编码信息进行解码,得到所述网络热点设备的服务集标识;A decoding unit, configured to decode the service set identifier encoding information after the number of bits conversion by using the preset encoding rule to obtain the service set identifier of the network hotspot device;
    解密单元,用于采用预设加密方式对所述加密后的密码进行解密,得到所述网络热点设备的密码。The decryption unit is configured to decrypt the encrypted password by using a preset encryption method to obtain a password of the network hotspot device.
  27. 一种待配网设备接入网络热点设备的装置,其特征在于,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行如权利要求1-7和/或8-13所述的一个或多个的方法。An apparatus for accessing a network hotspot device by a network device to be configured, comprising: one or more processors; and one or more machine-readable media having instructions stored thereon. When the processors execute, the apparatus is caused to execute the method according to one or more of claims 1-7 and / or 8-13.
  28. 一个或多个机器可读介质,其上存储有指令,其特征在于,当由一个或多个处理器执行时,使得装置执行如权利要求1-7和/或8-13所述的一个或多个的方法。One or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause a device to perform one or more of claims 1-7 and / or 8-13 Multiple methods.
PCT/CN2019/088716 2018-06-08 2019-05-28 Method and apparatus for device to be configured with network to access network hotspot device WO2019233311A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810589802.9A CN110582107A (en) 2018-06-08 2018-06-08 method and device for accessing network to be configured to network hotspot equipment
CN201810589802.9 2018-06-08

Publications (1)

Publication Number Publication Date
WO2019233311A1 true WO2019233311A1 (en) 2019-12-12

Family

ID=68769245

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088716 WO2019233311A1 (en) 2018-06-08 2019-05-28 Method and apparatus for device to be configured with network to access network hotspot device

Country Status (3)

Country Link
CN (1) CN110582107A (en)
TW (1) TW202002683A (en)
WO (1) WO2019233311A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111555855A (en) * 2020-05-22 2020-08-18 乐鑫信息科技(上海)股份有限公司 Wireless transmission method and device
CN112543492A (en) * 2020-11-30 2021-03-23 青岛海信智慧家居***股份有限公司 Method and device for re-distribution network and storage medium
CN113972996A (en) * 2020-07-24 2022-01-25 深圳Tcl数字技术有限公司 Method and system for accessing door lock to gateway, storage medium and electronic equipment
CN115632898A (en) * 2022-12-05 2023-01-20 深圳市鑫宇鹏电子科技有限公司 Method for carrying out equipment network distribution through infrared signals

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111372300A (en) * 2020-02-19 2020-07-03 珠海格力电器股份有限公司 Method and device for connecting network
CN111586656A (en) * 2020-04-29 2020-08-25 上海庆科信息技术有限公司 WiFi device network distribution method and device, electronic device and storage medium
CN112672400A (en) * 2020-12-15 2021-04-16 成都新潮传媒集团有限公司 Data interaction control method, equipment and storage medium
CN113630727B (en) * 2021-07-09 2023-04-07 珠海荣邦智能科技有限公司 Intelligent household network distribution method, device and system, electronic equipment and storage medium
CN113573313A (en) * 2021-08-10 2021-10-29 海宁奕斯伟集成电路设计有限公司 Intelligent equipment network distribution method and device
CN113950009B (en) * 2021-09-24 2023-05-12 启北公司 Equipment network distribution method, device, system and storage medium
CN114980101A (en) * 2022-06-07 2022-08-30 中移(杭州)信息技术有限公司 Access method, device, equipment and storage medium of wireless network
CN115174372A (en) * 2022-06-23 2022-10-11 盒马(中国)有限公司 Network distribution method, device, system, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120290689A1 (en) * 2011-05-15 2012-11-15 Adam Beguelin Network Interface Auto Configuration of Wireless Devices
CN104066101A (en) * 2014-06-12 2014-09-24 北京联盛德微电子有限责任公司 Wireless local area network card equipment automatic configuration method based on wireless network
CN104703176A (en) * 2015-03-18 2015-06-10 北京联盛德微电子有限责任公司 Configuration method of wireless network, intelligent terminal and wireless network equipment
CN105072665A (en) * 2015-07-01 2015-11-18 北京奇虎科技有限公司 Networking control and access method and corresponding terminal and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120290689A1 (en) * 2011-05-15 2012-11-15 Adam Beguelin Network Interface Auto Configuration of Wireless Devices
CN104066101A (en) * 2014-06-12 2014-09-24 北京联盛德微电子有限责任公司 Wireless local area network card equipment automatic configuration method based on wireless network
CN104703176A (en) * 2015-03-18 2015-06-10 北京联盛德微电子有限责任公司 Configuration method of wireless network, intelligent terminal and wireless network equipment
CN105072665A (en) * 2015-07-01 2015-11-18 北京奇虎科技有限公司 Networking control and access method and corresponding terminal and equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111555855A (en) * 2020-05-22 2020-08-18 乐鑫信息科技(上海)股份有限公司 Wireless transmission method and device
CN111555855B (en) * 2020-05-22 2022-11-11 乐鑫信息科技(上海)股份有限公司 Wireless transmission method and device
CN113972996A (en) * 2020-07-24 2022-01-25 深圳Tcl数字技术有限公司 Method and system for accessing door lock to gateway, storage medium and electronic equipment
CN112543492A (en) * 2020-11-30 2021-03-23 青岛海信智慧家居***股份有限公司 Method and device for re-distribution network and storage medium
CN112543492B (en) * 2020-11-30 2023-01-10 青岛海信智慧生活科技股份有限公司 Method and device for re-distribution network and storage medium
CN115632898A (en) * 2022-12-05 2023-01-20 深圳市鑫宇鹏电子科技有限公司 Method for carrying out equipment network distribution through infrared signals

Also Published As

Publication number Publication date
CN110582107A (en) 2019-12-17
TW202002683A (en) 2020-01-01

Similar Documents

Publication Publication Date Title
WO2019233311A1 (en) Method and apparatus for device to be configured with network to access network hotspot device
CN104703176B (en) Configuration method of wireless network, intelligent terminal and wireless network equipment
US7433472B2 (en) Digital content distribution system
TW202002712A (en) Method and apparatus for device to be configured with network to access network hotspot device
US8447968B2 (en) Air-interface application layer security for wireless networks
CN102377803B (en) Data processing method, device and system
US10826876B1 (en) Obscuring network traffic characteristics
KR101570039B1 (en) A system and method for of reducing encryption overhead by concatenating multiple connection packets associated with a security association
CN102231707A (en) Method and system for reliably transmitting data message in bank outlets
JP4593924B2 (en) Synchronous cipher design for wireless communication systems
JP2008527899A (en) Apparatus and method for signal encryption / decryption in communication system
CN103430478A (en) Method and apparatus for encrypting short data in wireless communication system
US20050172119A1 (en) Hardware/software partitioning for encrypted WLAN communications
CN110620762A (en) RDMA (remote direct memory Access) -based data transmission method, network card, server and medium
CN107294913A (en) Safety communicating method, service end and client based on HTTP
JP4344750B2 (en) Method and apparatus for in-line encryption and decryption of radio station
WO2022083448A1 (en) Encryption method, decryption method, an apparatus and a device
CN114189854B (en) Tower foundation safety monitoring terminal based on Beidou communication and 4G communication and data transmission method
CN117098120B (en) Beidou short message data encryption and decryption method, equipment and storage medium
CN102348203A (en) Method for realizing encryption synchronization
WO2023236984A1 (en) Wireless network access method, apparatus and device, and storage medium
CN104158788B (en) A kind of method of end-to-end transmission data
WO2019120533A1 (en) Stream ciphering
US7505598B2 (en) On-the-fly encryption/decryption for WLAN communications
CN111147461B (en) Data transmission method, device, server and user terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19814817

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19814817

Country of ref document: EP

Kind code of ref document: A1