CN113099445B - Network configuration method, device connection method, device, equipment and system - Google Patents

Network configuration method, device connection method, device, equipment and system Download PDF

Info

Publication number
CN113099445B
CN113099445B CN201911340681.5A CN201911340681A CN113099445B CN 113099445 B CN113099445 B CN 113099445B CN 201911340681 A CN201911340681 A CN 201911340681A CN 113099445 B CN113099445 B CN 113099445B
Authority
CN
China
Prior art keywords
equipment
random number
network
identifier
key
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911340681.5A
Other languages
Chinese (zh)
Other versions
CN113099445A (en
Inventor
肖月振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201911340681.5A priority Critical patent/CN113099445B/en
Publication of CN113099445A publication Critical patent/CN113099445A/en
Application granted granted Critical
Publication of CN113099445B publication Critical patent/CN113099445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Landscapes

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

Abstract

The embodiment of the invention provides a network configuration method, a device connection method, a device, equipment and a system, wherein the device connection method comprises the following steps: receiving a management frame sent by a wireless hot spot device in a broadcasting way, wherein the management frame comprises the SSID of the wireless hot spot device, the wireless hot spot device generates the SSID according to the device identification of the wireless hot spot device and a first random number generated by the wireless hot spot device, and the wireless hot spot device generates an access key according to the first random number and a private key of the wireless hot spot device; determining that the wireless hot-spot device is the wireless hot-spot device to be connected according to the management frame; and acquiring an access key according to the device identifier and the first random number which are analyzed from the SSID, and connecting the wireless hotspot device according to the access key. According to the scheme, the equipment to be connected with the wireless hot spot equipment can automatically find the wireless hot spot equipment to be connected, and further automatically acquire the access key for accessing the wireless hot spot equipment, so that the automatic connection with the wireless hot spot equipment is realized.

Description

Network configuration method, device connection method, device, equipment and system
Technical Field
The present invention relates to the field of internet/internet of things, and in particular, to a network configuration method, a device connection method, an apparatus, a device, and a system.
Background
Many terminal devices have a wireless Access Point (AP) function, which is simply to convert a network signal received by the terminal device, such as GPRS, 3G, or 4G, into a wifi signal and send the wifi signal. Based on this functionality, the terminal device may act as a wireless hotspot device, commonly referred to as a wifi hotspot. When a certain terminal device is used as a wireless hotspot device, namely, when a wifi hotspot is started, other terminal devices can access the wireless hotspot device.
At present, a common method for starting wifi hotspots is as follows: the user sets a service set identifier (SERVICE SET IDENTIFIER, abbreviated as SSID) and an access key of the wireless hotspot device, and when a certain terminal device wants to establish a connection with the wireless hotspot device, manually searches surrounding SSID to find the SSID of the wireless hotspot device, and then manually inputs the access key of the wireless hotspot device to establish a connection with the wireless hotspot device. This implementation requires manual operation by the user, and is complex and inconvenient to operate.
Disclosure of Invention
The embodiment of the invention provides a device connection method, a device and a system, which are used for realizing automatic connection of wireless hot spot devices.
In a first aspect, an embodiment of the present invention provides a device connection method, including:
receiving a management frame sent by a wireless hot spot device in a broadcasting way, wherein the management frame comprises a service set identifier of the wireless hot spot device, the wireless hot spot device generates the service set identifier according to the device identifier of the wireless hot spot device and a first random number generated by the wireless hot spot device, and the wireless hot spot device generates an access key according to the first random number and a private key of the wireless hot spot device;
Determining that the wireless hot spot device is a wireless hot spot device to be connected according to the management frame;
acquiring the access key according to the equipment identifier and the first random number which are analyzed from the service set identifier;
and connecting the wireless hot spot equipment according to the access key.
In a second aspect, an embodiment of the present invention provides a device connection apparatus, including:
The wireless hotspot device comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving a management frame broadcasted and sent by a wireless hotspot device, the management frame comprises a service set identifier of the wireless hotspot device, the wireless hotspot device generates the service set identifier according to the device identifier of the wireless hotspot device and a first random number generated by the wireless hotspot device, and the wireless hotspot device generates an access key according to the first random number and a private key of the wireless hotspot device;
The determining module is used for determining that the wireless hot-spot device is the wireless hot-spot device to be connected according to the management frame;
The acquisition module is used for acquiring the access key according to the equipment identifier and the first random number which are analyzed from the service set identifier;
And the connection module is used for connecting the wireless hot spot equipment according to the access key.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores executable code, which when executed by the processor, causes the processor to perform the device connection method in the first aspect.
Embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the device connection method in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a device connection method, applied to a wireless hotspot device, where the method includes:
Generating a first random number;
generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hot spot equipment;
And broadcasting and sending a management frame comprising the service set identifier, so that the target equipment to be connected with the wireless hot-spot equipment can acquire the access key according to the equipment identifier and the first random number which are analyzed from the service set identifier after determining that the target equipment needs to be connected with the wireless hot-spot equipment according to the management frame, and can be connected with the wireless hot-spot equipment by the access key.
In a fifth aspect, an embodiment of the present invention provides a device connection apparatus, located in a wireless hotspot device, including:
The generation module is used for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hot spot equipment;
And the sending module is used for broadcasting and sending a management frame comprising the service set identifier, so that the target equipment to be connected with the wireless hot-spot equipment can acquire the access key according to the equipment identifier and the first random number which are analyzed from the service set identifier after the target equipment is determined to be connected with the wireless hot-spot equipment according to the management frame, and is connected with the wireless hot-spot equipment by the access key.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores executable code, and when the executable code is executed by the processor, causes the processor to perform the device connection method in the fourth aspect.
Embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the device connection method in the fourth aspect.
In a seventh aspect, an embodiment of the present invention provides a device connection system, including:
the system comprises wireless hot spot equipment and target equipment to be connected with the wireless hot spot equipment;
The wireless hot spot equipment is used for generating a first random number, generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, generating an access key according to the first random number and a private key of the wireless hot spot equipment, and broadcasting and sending a management frame comprising the service set identifier;
The target device is configured to determine, according to the management frame, that the wireless hotspot device is a wireless hotspot device to be connected, obtain the access key according to the device identifier and the first random number that are parsed from the service set identifier, and connect the wireless hotspot device according to the access key.
In the embodiment of the invention, the device supporting the wifi hotspot function is called a wireless hotspot device, and the device to be connected with the wireless hotspot device is called a target device. In order to realize that the target device is automatically connected to the wireless hotspot device, the wireless hotspot device firstly generates an SSID according to the device identifier of the wireless hotspot device and a first random number generated by the wireless hotspot device, and generates an access key according to the first random number and a private key of the wireless hotspot device, and further broadcasts a management frame containing the SSID. When the target device detects the management frame, firstly, determining whether the wireless hot spot device is the wireless hot spot device which needs to be connected according to the management frame, if so, generating an access key according to the device identification and the first random number which are analyzed from the management frame, and automatically establishing connection with the wireless hot spot device by using the access key. According to the scheme, the target device can automatically find the wireless hot spot device to be connected, and further automatically acquire the access key for accessing the wireless hot spot device, so that the automatic connection with the wireless hot spot device is realized.
In an eighth aspect, an embodiment of the present invention provides a network allocation method, applied to a network allocation device, where the method includes:
receiving a management frame sent by broadcasting of equipment to be accessed to the network, wherein the management frame comprises a service set identifier of the equipment to be accessed to the network, the equipment to be accessed to the network generates the service set identifier according to the equipment identifier of the equipment to be accessed to the network and a random number generated by the equipment to be accessed to the network, and the equipment to be accessed to the network generates an access key according to the random number and a private key of the equipment to be accessed to the network;
determining that the equipment to be accessed to the network is equipment to be connected according to the management frame;
Acquiring the access key according to the equipment identifier and the random number which are analyzed from the service set identifier;
connecting the equipment to be accessed to the network according to the access key;
And sending the network configuration information of the router to the equipment to be accessed to the network so that the equipment to be accessed to the network is connected with the router according to the network configuration information.
In a ninth aspect, an embodiment of the present invention provides a network configuration apparatus, which is applied to a network device, including:
The receiving module is used for receiving a management frame sent by the equipment to be accessed to the network in a broadcasting way, wherein the management frame comprises a service set identifier of the equipment to be accessed to the network, the equipment to be accessed to the network generates the service set identifier according to the equipment identifier of the equipment to be accessed to the network and a random number generated by the equipment to be accessed to the network, and the equipment to be accessed to the network generates an access key according to the random number and a private key of the equipment to be accessed to the network;
the determining module is used for determining that the equipment to be accessed to the network is equipment to be connected according to the management frame;
The acquisition module is used for acquiring the access key according to the equipment identifier and the random number which are analyzed from the service set identifier;
the connection module is used for connecting the equipment to be accessed to the network according to the access key;
And the sending module is used for sending the network configuration information of the router to the equipment to be accessed to the network so that the equipment to be accessed to the network is connected with the router according to the network configuration information.
In a tenth aspect, an embodiment of the present invention provides a network device, including: a memory, a processor; wherein the memory has executable code stored thereon which, when executed by the processor, causes the processor to perform the network configuration method according to the eighth aspect.
In an eleventh aspect, an embodiment of the present invention provides a network configuration method, applied to a device to be networked, where the method includes:
generating a random number;
generating a service set identifier according to the equipment identifier of the equipment to be accessed and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed;
Broadcasting and transmitting a management frame comprising the service set identifier, so that the network distribution equipment to be connected with the network equipment to be connected determines that the network equipment to be connected with the network equipment to be connected is required according to the management frame, acquires the access key according to the equipment identifier and the random number which are analyzed from the service set identifier, and connects the network equipment to be connected with the access key;
Receiving network configuration information of a router sent by the distribution network equipment;
and connecting the router according to the network configuration information.
In a twelfth aspect, an embodiment of the present invention provides a network configuration apparatus, which is applied to a device to be networked, including:
The generation module is used for generating a random number, generating a service set identifier according to the equipment identifier of the equipment to be accessed to the network and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed to the network;
The sending module is used for broadcasting and sending a management frame comprising the service set identifier, so that the network distribution equipment to be connected with the network equipment to be connected determines that the network equipment to be connected with the network equipment to be connected is required according to the management frame, acquires the access key according to the equipment identifier and the random number which are analyzed from the service set identifier, and connects the network equipment to be connected with the access key;
the receiving module is used for receiving the network configuration information of the router sent by the distribution network equipment;
and the connection module is used for connecting the router according to the network configuration information.
In a thirteenth aspect, an embodiment of the present invention provides a device to be networked, including: a memory, a processor; wherein the memory has executable code stored thereon which, when executed by the processor, causes the processor to perform the network configuration method according to the eleventh aspect.
In the embodiment of the invention, when the network configuration is performed by adopting the AP mode (namely the hot spot mode) as the network equipment to be accessed, the network equipment to be accessed needs to work in the hot spot mode, namely the network equipment to be accessed is used as the wireless hot spot equipment, the network equipment to be accessed needs to be connected with the network equipment to be accessed first, and then the network configuration information of the router is sent to the network equipment to be accessed for connecting the router. In order to realize that the network distribution equipment is automatically connected to the equipment to be accessed, the equipment to be accessed firstly generates an SSID according to the equipment identification of the equipment to be accessed and a random number generated by the equipment to be accessed, and generates an access key according to the random number and a private key of the equipment to be accessed, so as to broadcast a management frame containing the SSID. When the network distribution equipment detects the management frame, firstly, determining whether the network equipment to be connected is the equipment to be connected according to the management frame, if so, generating an access key according to the equipment identification and the random number which are analyzed from the management frame, and automatically establishing connection with the network equipment to be connected by the access key. According to the scheme, the network distribution equipment can automatically find the equipment to be connected (namely, network configuration is needed), and further automatically acquire the access key for accessing the equipment to be connected, so that the automatic connection with the equipment to be connected is realized, and the efficiency of network configuration is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic workflow diagram of a device connection system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another workflow of a device connection system according to an embodiment of the present invention;
fig. 3 is a flow chart of a network configuration process according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a network configuration procedure according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device connection apparatus according to an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of an electronic device corresponding to the device connection apparatus provided in the embodiment shown in fig. 5;
fig. 7 is a schematic structural diagram of another device connection apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a wireless hotspot device corresponding to the device connection apparatus provided in the embodiment shown in fig. 7;
fig. 9 is a schematic structural diagram of a network configuration device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a network configuration device corresponding to the network configuration device provided in the embodiment shown in fig. 9;
Fig. 11 is a schematic structural diagram of another network configuration device according to an embodiment of the present invention;
Fig. 12 is a schematic structural diagram of a device to be networked corresponding to the network configuration apparatus provided in the embodiment shown in fig. 11.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
Before describing the device connection scheme provided by the embodiment of the present invention in detail, several concepts related to the present invention will be described.
The servers herein may be separate physical hosts or clusters of hosts located in the cloud.
The wireless hotspot device in the present disclosure may be a device that may be used as a wifi hotspot, for example, may be a speaker, a robot, or an internet of things device.
The target device herein refers to a device that is to establish a communication connection with the wireless hotspot device, for example, a mobile phone, a computer, a sound box, a robot, and the like.
The network-to-be-connected device in this context may be a terminal device such as a refrigerator, a loudspeaker, a robot, etc., which has not yet been connected to a certain wireless network to which access is desired, and is thus referred to as a network-to-be-connected device.
The network distribution device in the present disclosure may be a terminal device such as a mobile phone, a tablet computer, etc., where the network distribution device may have been connected to a certain wireless network through a network device such as a router, for example, a mobile phone of a user has been connected to a home wifi network through a wireless router installed in a home.
It should be noted that, the network configuration device may also be a terminal device that has been connected to a wireless network and does not have a man-machine interaction screen, such as a refrigerator or a sound box, where the network configuration device may locally store network configuration information of an accessed router, so as to perform network configuration on a device to be connected to the wireless network.
In addition, a distribution network application program can be run in the distribution network equipment, and the network configuration of the equipment to be accessed can be realized through the distribution network application program.
In brief summary, the distribution network device and the device to be connected to the network are two devices belonging to the same user, and the two devices are mainly different from each other: the network configuration of the network equipment to be accessed is that the network equipment to be accessed is accessed to the wireless network.
The device connection scheme and the network configuration scheme provided by the embodiment of the invention are explained below.
Fig. 1 is a schematic workflow diagram of a device connection system according to an embodiment of the present invention, where, as shown in fig. 1, the device connection system includes: wireless hot spot equipment and target equipment to be connected with the wireless hot spot equipment. The device connection process may include the steps of:
101. The wireless hot spot equipment generates a first random number, generates a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generates an access key according to the first random number and a private key of the wireless hot spot equipment.
If the wireless hotspot device starts the wifi hotspot function, the wireless hotspot device needs to broadcast its SSID to the outside so that the target device connected with the wireless hotspot device can find the wireless hotspot device. In addition, to ensure connection security, the wireless hotspot device may be configured with an access key. In this embodiment, a scheme for starting up a wireless hotspot device is provided, where the scheme specifically relates to generating an SSID and an access key of the wireless hotspot device.
Specifically, in the embodiment of the present invention, key parameters required for generating the SSID and the access key of the wireless hotspot device are: the device identifier, the private key of the wireless hotspot device and the random number generated by the wireless hotspot device (i.e. the first random number) are set as the above.
The device identification and the private key of the wireless hot spot device are burnt in the wireless hot spot device in advance, and the device identification and the private key of the wireless hot spot device are stored in a cloud server in advance.
In practical applications, when a user operates a wireless hotspot device to start a wifi hotspot function of the wireless hotspot device, the wireless hotspot device may be triggered to generate a first random number. The first random number may be a set-up value, such as hexadecimal, decimal, binary, etc.
In practical application, the implementation of the scheme provided by the embodiment of the invention is not limited by all the devices supporting the wifi hotspot function when the wifi hotspot function is started, and the scheme provided by the embodiment of the invention can be configured to be implemented only by specific wireless hotspot devices when the wifi hotspot function is started. At this time, the device identifiers and private keys of the specific wireless hotspot devices are stored in the cloud server, where the specific wireless hotspot devices are, for example, internet of things devices with certain brands, models and types. That is, a code script is written in advance in the specific wireless hotspot devices, and when a user opens a wifi hotspot function of the wireless hotspot device, the code script is run to execute the device connection scheme provided by the embodiment of the present invention.
Further, the wireless hotspot device generates an SSID based on the generated first random number and the device identification. Alternatively, the wireless hotspot device may simply concatenate the device identification and the first nonce to form the SSID. In practical applications, the device identifier and the first random number may each correspond to a set length, for example, the device identifier occupies 20 bytes in length, and the random number is 12 bytes in length. Of course, in practical application, in consideration of the readability of the user, a certain format conversion may be performed on the first random number, and the spliced result of the first random number after the format conversion and the device identifier is used as the SSID.
In addition, the wireless hotspot device generates an access key based on the generated first random number and the private key of the wireless hotspot device. Alternatively, the wireless hotspot device may calculate the first random number and the private key of the wireless hotspot device using any one of the encryption algorithms, such as MD5, SHA1, SHA224, SHA256, etc., to obtain the access key. It will be appreciated that the role of the wireless hotspot device to generate the access key is to: when the target device establishes a connection with the wireless hotspot device based on the discovery result of the SSID of the wireless hotspot device, the wireless hotspot device may determine whether to agree with the connection request of the target device based on whether the access key input by the target device coincides with the access key generated by itself.
After automatically generating the SSID and the access key according to the above procedure, the wireless hotspot device may construct a management frame containing the SSID and broadcast the management frame outwards.
In general, the communication protocols employed by the target device and the wireless hotspot device are both compliant with the 802.11 standard, where a number of management frames are defined, and thus the management frames may be selected from any of a variety of management frames defined by the 802.11 standard.
Common management frames include: beacon (beacon) frame, probe request (probe request) frame. Thus, the management frame to be generated by the network-entering device may be selected from any of the above.
Taking the example of a beacon frame (probe request frame is the same), a plurality of fields may be included in the beacon frame, one of which is a field for populating the SSID, so the wireless hotspot device may populate the generated SSID into the field to generate the beacon frame.
102. The wireless hotspot device broadcasts a management frame including the generated service set identification.
In short, it is the wireless hotspot device that broadcasts its SSID outwards, i.e. broadcasts its network name, and the management frame is just the bearer of the SSID. In practice, it may be set to broadcast once every 100 milliseconds, for example.
103. And the target equipment determines that the wireless hot-spot equipment is the wireless hot-spot equipment to be connected according to the received management frame, and acquires the access key according to the equipment identification and the first random number which are analyzed from the service set identification.
104. And the target equipment is connected with the wireless hot spot equipment according to the access key.
In practical applications, for a target device, at some point, it may receive not only a management frame sent by the wireless hotspot device, but also management frames sent by other devices, such as a beacon frame sent by a router, where all the management frames may include the SSID of the corresponding device. Then the target device needs to distinguish which management frame corresponds to the wireless hotspot device it wants to connect to, i.e. the target device needs to be able to determine from the received management frame sent by the wireless hotspot device that the wireless hotspot device is the device that needs to connect to.
Two alternative implementations are provided below to realize the identification of the target device to the wireless hotspot device to which the target device needs to connect, that is, the target device may determine whether the sending device corresponding to the received management frame is the wireless hotspot device to which the connection needs to be made according to the following two alternative implementations.
The first implementation mode: a particular identifier may be set in a management frame generated by the wireless hotspot device. Thus, if the target device parses the identifier from a received management frame, it is determined that the device that transmits the management frame is a wireless hotspot device that needs to be connected. For example, assuming that a user wants to connect to a smart box (as a wireless hotspot device) in a home with his mobile phone (as a target device), the mobile phone determines that connection to the router is not required and connection to the smart box is required, assuming that the mobile phone can search for SSID including ssid_b from a router adjacent to the home in addition to ssid_a from the smart box, but because management frames sent from the smart box include the above specific identifier, such as ABH, in addition to ssid_a.
The second implementation mode: the target device analyzes the SSID contained in the received management frame to analyze the device identifier contained in the SSID, and queries the server by using the device identifier, if the server includes the device identifier, it is indicated that the management frame is sent by a certain wireless hotspot device registered in the server in advance, and it can be determined that the management frame needs to be connected with the wireless hotspot device. Specifically, since the length of the device identifier and the first random number constituting the SSID of the wireless hotspot device may be specified in practical applications, the target device may parse the corresponding device identifier from the received SSID according to the length setting. Of course, it will be understood that, for example, if a certain management frame received by the target device is sent by a device that does not need to be connected, such as a router, then part of the field information that is truncated from the SSID of the management frame according to the above length setting case will not exist in the server.
When the target device determines that a received management frame is sent by a wireless hotspot device to be connected, an access key required for connecting the wireless hotspot device can be obtained according to the device identifier and the first random number of the wireless hotspot device, which are obtained by analyzing the management frame.
Alternatively, the target device may send a first key acquisition request to the server, where the first key acquisition request includes the device identifier and the first random number parsed from the SSID. After receiving the first key obtaining request, the server inquires a private key of the wireless hotspot device corresponding to the device identifier according to the device identifier, and generates an access key according to the first random number and the private key. The target device receives the access key fed back by the server, and further, the target device may send a connection request to the wireless hotspot device, where the connection request includes the access key. After receiving the connection request, the wireless hotspot device compares the access key contained in the connection request with the access key generated by the wireless hotspot device according to the private key and the first random number, and if the access key is consistent with the access key, communication connection is established with the target device. It will be appreciated that the encryption algorithm employed by the server to generate the access key described above corresponds to the encryption algorithm employed by the wireless hotspot device.
In summary, through the above scheme, the target device may automatically discover the wireless hotspot device to be connected, and further automatically obtain the access key for accessing the wireless hotspot device, so as to implement automatic connection with the wireless hotspot device, and in the connection process, the user does not need to manually set the SSID, the access key and the operation of inputting the access key of the wireless hotspot device.
It will be appreciated that the purpose of establishing a connection between the target device and the wireless hotspot device is to transfer data information with the wireless hotspot device. The data information transmitted may vary in different application scenarios. For example, in a scenario where the target device performs network configuration for the wireless hotspot device, the transmitted data information will be network configuration information of a certain router to which the wireless hotspot device is expected to access. For another example, in a scenario where the target device controls the operation of the wireless hotspot device, the transmitted data information would be some control instructions, such as a switch instruction, a parameter adjustment instruction, and so forth.
The following is a general description of an embodiment in connection with fig. 2, and provides a solution for securing the transmission of data information, regardless of the data information transmitted.
Fig. 2 is another schematic workflow diagram of a device connection system provided by an embodiment of the present invention, where, as shown in fig. 2, the device connection system may include a wireless hotspot device, a target device, and a server, and the working process may specifically include the following steps:
201. The wireless hot spot device generates a first random number, generates an SSID according to the device identification of the wireless hot spot device and the first random number, and generates an access key according to the first random number and the private key of the wireless hot spot device.
202. The wireless hotspot device broadcasts a management frame including the generated SSID.
203. And the target equipment determines that the wireless hot-spot equipment is the wireless hot-spot equipment which needs to be connected according to the received management frame.
204. The target device sends a first key acquisition request to the server, wherein the first key acquisition request comprises a device identifier and a first random number which are analyzed from the SSID.
205. And the server inquires and obtains a private key of the wireless hotspot device according to the device identifier, and generates an access key according to the first random number and the private key.
206. The server sends the access key to the target device.
207. And the target equipment is connected with the wireless hot spot equipment according to the access key.
208. The target device generates a second random number.
209. The target device sends a second key acquisition request to the server, wherein the second key acquisition request comprises the device identifier of the wireless hotspot device and a second random number.
210. The server generates an encryption key based on the second random number and a private key of the wireless hotspot device.
211. The server sends the encryption key to the target device.
212. And the target equipment encrypts the data information which needs to be transmitted to the wireless hot spot equipment according to the encryption key.
213. And the target equipment sends the encrypted data information and the second random number to the wireless hot spot equipment.
214. The wireless hotspot device generates a decryption key according to the second random number and the private key of the wireless hotspot device, and decrypts the encrypted data information according to the decryption key.
In this embodiment, the execution of steps 201-207 may be referred to the description of the other embodiments, and is not repeated here.
In this embodiment, in order to ensure the transmission security of the data information, the data information may be encrypted for transmission. Two key parameters for generating the encryption key are: the private key of the wireless hotspot device and the second random number generated by the target device. Similarly, two key parameters for generating a decryption key corresponding to the encryption key are: the private key of the wireless hotspot device and the second random number generated by the target device.
Wherein, optionally, the encryption key is generated by the server. The decryption key is generated by the wireless hotspot device.
Specifically, after the target device is connected to the wireless hotspot device, a second random number with a set length may be generated, and then, based on the device identifier parsed from the management frame sent by the wireless hotspot device, a second key acquisition request including the device identifier and the second random number is sent to the server. After receiving the second key acquisition request, the server queries the private key of the wireless hotspot device corresponding to the second key acquisition request based on the device identifier contained in the second key acquisition request, and further performs encryption calculation on the private key and the second random number by adopting a certain encryption algorithm to obtain an encryption key. In practical applications, the encryption algorithm used by the server to generate the encryption key may be different from the encryption algorithm used to generate the access key in the foregoing to enhance security.
After receiving the encryption key fed back by the server, the target device encrypts the data information to be sent to the wireless hotspot device, and further, the encrypted data information and the second random number of the plaintext can be sent to the wireless hotspot device through the communication connection established with the wireless hotspot device.
The wireless hotspot device generates a decryption key based on the received second random number and the locally stored private key so as to decrypt and obtain data information sent by the target device. The algorithm used for decryption key generation corresponds to the algorithm used for encryption keys.
In addition, in order to further improve the security, the target device may set the lifetime of the second random number when generating the second random number, so that the encryption key and the decryption key generated based on the second random number also have a certain lifetime. And when the life duration is longer, the encryption key and the decryption key are invalid, and if the subsequent target equipment also needs to transmit data information with the wireless hot spot equipment, a new second random number needs to be regenerated.
In summary, based on the scheme provided by the embodiment, not only can the automatic connection between the target device and the wireless hotspot device be realized, but also the security of data transmission between the target device and the wireless hotspot device can be ensured.
Taking a network distribution scene as an example, an actual application process of the device connection method provided in the above in the network distribution scene is illustrated. At this time, the wireless hotspot device in the foregoing is a device that needs to perform network configuration, which is called a device to be networked; the target device is a device configured for the wireless hotspot device, referred to as a distribution network device.
Fig. 3 is a flow chart of a network configuration process according to an embodiment of the present invention, and as shown in fig. 3, the network configuration process may include the following steps:
301. The device to be accessed to the network generates a random number, generates an SSID according to the device identification of the device to be accessed to the network and the random number, and generates an access key according to the random number and a private key of the device to be accessed to the network.
302. The network-ready device broadcasts a management frame including the SSID.
303. The network distribution equipment determines that the network equipment to be accessed, which sends the management frame, is equipment to be connected according to the received management frame, and acquires an access key according to the equipment identification and the random number which are analyzed from the SSID of the management frame.
304. The network distribution equipment is connected with the equipment to be network-connected by the access key.
305. And the network configuration information of the router is sent to the network equipment to be accessed by the network distribution equipment.
306. The equipment to be accessed to the network is connected with the router according to the network configuration information.
In this embodiment, a hotspot mode (also referred to as an AP mode or a softAP mode) is used to perform network configuration on the device to be network-accessed. In the hot spot mode, the device to be network-connected needs to start a wifi hot spot function, and broadcasts an SSID of the device to be network-connected to the device to be network-connected by the access key corresponding to the device to be network-connected, and then the device to be network-connected sends network configuration information of a router which hopes to be connected to the device to be network-connected based on communication connection between the device to be network-connected. The network configuration information includes information such as SSID, access PASSWORD (PASSWORD), basic service set identifier (Basic SERVICE SET IDENTIFIER, BSSID) and the like corresponding to the router.
The specific implementation of the above steps may be referred to the related descriptions in the other embodiments, which are not repeated herein. It will be appreciated that the process of obtaining the access key and the encryption key by the network device may be obtained by the request server, and the specific process refers to the relevant description in the foregoing embodiment.
To more intuitively understand the process of network configuration for a device to be network-connected using the hotspot mode, the description is provided with reference to fig. 4.
In fig. 4, it is assumed that the device to be networked is a speaker and the network device is a mobile phone. Assuming that the handset is currently connected to a certain router, the SSID corresponding to the router is expressed as: ssid_a, which is actually the network name of the wireless network corresponding to the router. Assume that the SSID generated by the sound box according to the random number generated by the sound box and the equipment identifier is expressed as: SSID_B, which is actually the network name of the wireless network corresponding to the hot spot where the sound box is opened.
The purpose of the network configuration of the speakers by the handset is to hope that the speakers will be able to access the router to which the handset is currently connected.
As can be seen from fig. 4, to achieve this, first, in an initial state, the handset is connected to the router, i.e. the handset accesses a wireless network with a network name ssid_a.
And then, when a user starts a wifi hotspot function of the sound box, the sound box creates a wireless network with the name SSID_B, and generates an access KEY KEY, so that the SSID_B is broadcasted outwards. The ssid_b includes a device identifier Dev and a random number Rand of the sound box. The access KEY is generated according to the private KEY of the sound box and the random number Rand.
After the SSID_B is detected by the mobile phone, the device identifier Dev and the random number Rand are analyzed from the SSID_B, a server is requested based on the device identifier Dev and the random number Rand to obtain an access KEY of the loudspeaker box, the loudspeaker box is further automatically connected to the loudspeaker box by the access KEY, the connection with the router is disconnected, and the mobile phone is switched to a wireless network with the access network name SSID_B. The device identifier Dev of the server inquires a private KEY of the loudspeaker box, and then generates an access KEY KEY according to the private KEY and the random number Rand.
Based on the connection with the speaker, the mobile phone further issues the network configuration information of the router connected before to the speaker, which is equivalent to the network configuration information required by the mobile phone to inform the speaker of the wireless network with the network name ssid_a, for example, including the network name ssid_a and the access key PASSWD of the router.
The sound box is connected to the wireless network SSID_A based on the received network configuration information, namely, is connected with the router. Thereafter, the handset switches back to wireless network ssid_a.
In summary, when the network configuration is performed on the to-be-network-connected device in the hot spot mode, the automatic connection between the to-be-network-connected device and the network-connected device can be realized through the scheme, manual intervention is not needed, and the efficiency of the network configuration is improved.
The network configuration apparatus, the device connection apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these network configuration means, device connection means, may be configured by the steps taught by the present solution using commercially available hardware components.
Fig. 5 is a schematic structural diagram of a device connection apparatus according to an embodiment of the present invention, as shown in fig. 5, where the device includes: the device comprises a receiving module 11, a determining module 12, an acquiring module 13 and a connecting module 14.
The receiving module 11 is configured to receive a management frame sent by a wireless hotspot device in a broadcast manner, where the management frame includes a service set identifier of the wireless hotspot device, the wireless hotspot device generates the service set identifier according to the device identifier of the wireless hotspot device and a first random number generated by the wireless hotspot device, and the wireless hotspot device generates an access key according to the first random number and a private key of the wireless hotspot device.
A determining module 12, configured to determine, according to the management frame, that the wireless hotspot device is a wireless hotspot device that needs to be connected.
An obtaining module 13, configured to obtain the access key according to the device identifier and the first random number that are parsed from the service set identifier.
A connection module 14, configured to connect to the wireless hotspot device according to the access key.
Optionally, the management frame is a beacon frame or a probe request frame.
Alternatively, the obtaining module 13 may specifically be configured to: sending a first key acquisition request to a server, wherein the first key acquisition request comprises the equipment identifier and the first random number which are analyzed from the service set identifier; and receiving the access key fed back by the server, wherein the server obtains the private key according to the equipment identification query, and generates the access key according to the first random number and the private key.
Optionally, the management frame further includes a set identifier, and the determining module 12 may specifically be configured to: and if the identifier is analyzed to be included in the management frame, determining that the wireless hot-spot device is the wireless hot-spot device which needs to be connected.
Alternatively, the determining module 12 may specifically be configured to: analyzing the equipment identifier from the management frame; and if the equipment identifier is queried from the server, determining that the wireless hot-spot equipment is the wireless hot-spot equipment which needs to be connected.
Optionally, the apparatus further comprises: the data transmission processing module is used for generating a second random number; sending a second key acquisition request to a server, wherein the second key acquisition request comprises the equipment identifier and the second random number; receiving an encryption key fed back by the server, wherein the server obtains the private key according to the equipment identification query, and generates the encryption key according to the second random number and the private key; encrypting the data information to be transmitted to the wireless hotspot device according to the encryption key; and sending the encrypted data information and the second random number to the wireless hot spot equipment.
Optionally, the wireless hotspot device is a device requiring network configuration.
The apparatus shown in fig. 5 may perform steps performed by the target device in the foregoing embodiments, and for those portions of this embodiment that are not described in detail, reference may be made to the description related to the foregoing embodiments, which are not described herein.
In one possible design, the structure of the device connection apparatus shown in fig. 5 may be implemented as an electronic device, for example, a terminal device such as a mobile phone, a notebook computer, or the like. As shown in fig. 6, the electronic device may include: a first processor 21, and a first memory 22. Wherein the first memory 22 stores executable code that, when executed by the first processor 21, causes at least the first processor 21 to implement the steps performed by the target device in the foregoing embodiments.
The electronic device may further include a first communication interface 23 configured to communicate with other devices or a communication network.
Additionally, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to perform the steps performed by the target device in the previous embodiments.
Fig. 7 is a schematic structural diagram of another device connection apparatus according to an embodiment of the present invention, as shown in fig. 7, where the device includes: a generating module 31 and a transmitting module 32.
A generation module 31 for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hot spot equipment;
and the sending module 32 is configured to broadcast and send a management frame including the service set identifier, so that after determining that the target device to be connected with the wireless hotspot device needs to be connected with the wireless hotspot device according to the management frame, the target device obtains the access key according to the device identifier and the first random number parsed from the service set identifier, and connects the wireless hotspot device with the access key.
Optionally, the management frame is a beacon frame or a probe request frame.
Optionally, the management frame further includes a set identifier, so that the target device determines that connection with the wireless hotspot device is required according to the identifier.
Optionally, the apparatus further comprises:
The receiving module is used for receiving the encrypted data information and the second random number sent by the target equipment;
the decryption module is used for generating a decryption key according to the second random number and the private key; decrypting the encrypted data information according to the decryption key.
Optionally, the wireless hotspot device is a device needing network configuration, and the target device is a device performing network configuration on the wireless hotspot device.
The apparatus shown in fig. 7 may perform steps performed by the wireless hotspot device in the foregoing embodiments, and for those portions of this embodiment that are not described in detail, reference may be made to the related descriptions of the foregoing embodiments, which are not described herein.
In one possible design, the structure of the device connection apparatus shown in fig. 7 may be implemented as an electronic device, where the electronic device is a device supporting a wifi hotspot function, and may be referred to as a wireless hotspot device, and the wireless hotspot device may be, for example, a device such as a home device, a wearable device, or the like. As shown in fig. 8, the wireless hotspot device may include: a second processor 41 and a second memory 42. Wherein executable code is stored in the second memory 42, which when executed by the second processor 41, causes at least the second processor 41 to implement the steps performed by the wireless hotspot device in the foregoing embodiment.
The wireless hotspot device may further include a second communication interface 43 in the structure for communicating with other devices or a communication network.
Additionally, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon that, when executed by a processor of a wireless hotspot device, causes the processor to perform the steps performed by the wireless hotspot device in the previous embodiments.
Fig. 9 is a schematic structural diagram of a network configuration device provided in an embodiment of the present invention, where the network configuration device is located in a distribution network device, and specifically, the network configuration device may be implemented as a combination of a functional module and related hardware in a distribution network application installed in the distribution network device. As shown in fig. 9, the apparatus includes: the device comprises a receiving module 51, a determining module 52, an obtaining module 53, a connecting module 54 and a sending module 55.
The receiving module 51 is configured to receive a management frame sent by a device to be logged in a broadcast manner, where the management frame includes a service set identifier of the device to be logged in, the device to be logged in generates the service set identifier according to the device identifier of the device to be logged in and a random number generated by the device to be logged in, and the device to be logged in generates an access key according to the random number and a private key of the device to be logged in.
A determining module 52, configured to determine, according to the management frame, that the device to be networked is a device that needs to be connected.
An obtaining module 53, configured to obtain the access key according to the device identifier and the random number that are parsed from the service set identifier.
And the connection module 54 is used for connecting the to-be-networked equipment according to the access key.
And the sending module 55 is configured to send the network configuration information of the router to the device to be networked, so that the device to be networked is connected with the router according to the network configuration information.
The apparatus shown in fig. 9 may perform the steps performed by the network distribution device in the foregoing embodiments, and for the portions not described in detail in this embodiment, reference may be made to the description related to the foregoing embodiments, which are not described herein again.
In one possible design, the structure of the network configuration apparatus shown in fig. 9 may be implemented as a terminal device, where the terminal device may be, for example, a network device with a network configuration application installed, where the network device is used to perform network configuration on a home device, a wearable device, and the network configuration device is a mobile phone, a tablet computer, a notebook computer, or the like. As shown in fig. 10, the network device may include: a third processor 61, and a third memory 62. Wherein executable code is stored in the third memory 62, and when the executable code is executed by the third processor 61, at least the third processor 61 is caused to implement the steps executed by the network distribution device in the foregoing embodiment.
The configuration of the network device may further include a third communication interface 63, which is used for the network device to communicate with other devices or a communication network.
In addition, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of a distribution network device, causes the processor to perform the steps performed by the distribution network device in the foregoing embodiments.
Fig. 11 is a schematic structural diagram of another network configuration device provided in an embodiment of the present invention, which is located in a device to be network-connected, as shown in fig. 11, and the device includes: a generating module 71, a transmitting module 72, a receiving module 73, and a connecting module 74.
The generating module 71 is configured to generate a random number, generate a service set identifier according to the device identifier of the device to be networked and the random number, and generate an access key according to the random number and a private key of the device to be networked.
And a sending module 72, configured to broadcast and send a management frame including the service set identifier, so that after the network device to be connected with the network device to be connected determines that the network device to be connected with the network device needs to be connected according to the management frame, acquire the access key according to the device identifier and the random number parsed from the service set identifier, and connect the network device to be connected with the access key.
And the receiving module 73 is configured to receive network configuration information of the router sent by the network distribution device.
A connection module 74, configured to connect the router according to the network configuration information.
The apparatus shown in fig. 11 may perform the steps performed by the network access device in the foregoing embodiments, and for the parts not described in detail in this embodiment, reference may be made to the description related to the foregoing embodiments, which are not repeated here.
In one possible design, the structure of the network configuration apparatus shown in fig. 11 may be implemented as a device to be networked, where the device to be networked may be, for example, a home device, a wearable device, or other devices that need to be configured by using other devices. As shown in fig. 12, the device to be networked may include: a fourth processor 81, and a fourth memory 82. Wherein executable code is stored in the fourth memory 82, and when the executable code is executed by the fourth processor 81, at least the fourth processor 81 is caused to implement the steps executed by the device to be networked in the foregoing embodiment.
The structure of the device to be networked may further include a fourth communication interface 83, which is used for the device to be networked to communicate with other devices or a communication network.
In addition, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of a network-entry device, causes the processor to perform the steps performed by the network-entry device in the foregoing embodiments.
The apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The device connection method provided by the embodiment of the present invention may be performed by one or more programs/software, where the programs/software may be provided by the network side, and the network distribution device and the device to be connected to the network may download the required corresponding programs/software to the local nonvolatile storage medium, and when the device connection method needs to be performed, the program/software is read by the CPU into the memory, and then the CPU executes the program/software to implement the device connection method provided in the foregoing embodiment, and the execution process may refer to the schematic diagrams in fig. 1 to 4.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (25)

1. A device connection method, comprising:
receiving a management frame sent by a wireless hot spot device in a broadcasting way, wherein the management frame comprises a service set identifier of the wireless hot spot device, the wireless hot spot device generates the service set identifier according to the device identifier of the wireless hot spot device and a first random number generated by the wireless hot spot device, and the wireless hot spot device generates an access key according to the first random number and a private key of the wireless hot spot device;
Determining that the wireless hot spot device is a wireless hot spot device to be connected according to the management frame;
Sending a first key acquisition request to a server, wherein the first key acquisition request comprises the equipment identifier and the first random number which are analyzed from the service set identifier;
Receiving the access key fed back by the server, wherein the server obtains the private key according to the equipment identifier query, and generates the access key according to the first random number and the private key;
and connecting the wireless hot spot equipment according to the access key.
2. The method of claim 1, wherein the management frame is a beacon frame or a probe request frame.
3. The method of claim 1, wherein the management frame further includes a set identifier;
The determining that the wireless hotspot device is the wireless hotspot device to be connected according to the management frame includes:
and if the identifier is analyzed to be included in the management frame, determining that the wireless hot-spot device is the wireless hot-spot device which needs to be connected.
4. The method of claim 1, wherein the determining from the management frame that the wireless hotspot device is a wireless hotspot device to connect to comprises:
Analyzing the equipment identifier from the management frame;
and if the equipment identifier is queried from the server, determining that the wireless hot-spot equipment is the wireless hot-spot equipment which needs to be connected.
5. The method according to claim 1, wherein the method further comprises:
Generating a second random number;
Sending a second key acquisition request to a server, wherein the second key acquisition request comprises the equipment identifier and the second random number;
receiving an encryption key fed back by the server, wherein the server obtains the private key according to the equipment identification query, and generates the encryption key according to the second random number and the private key;
encrypting the data information to be transmitted to the wireless hotspot device according to the encryption key;
And sending the encrypted data information and the second random number to the wireless hot spot equipment.
6. The method according to any of claims 1 to 5, wherein the wireless hotspot device is a device requiring network configuration.
7. A device connection method for use with a wireless hotspot device, the method comprising:
Generating a first random number;
generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hot spot equipment;
And broadcasting a management frame comprising the service set identifier, so that after the target device to be connected with the wireless hotspot device determines that the target device needs to be connected with the wireless hotspot device according to the management frame, sending a first key acquisition request to a server, wherein the first key acquisition request comprises the device identifier and the first random number which are analyzed from the service set identifier, receiving the access key fed back by the server, wherein the server inquires to obtain the private key according to the device identifier, generates the access key according to the first random number and the private key, and connects the wireless hotspot device with the access key.
8. The method of claim 7, wherein the management frame is a beacon frame or a probe request frame.
9. The method of claim 7, wherein the management frame further includes an identifier configured to cause the target device to determine that a connection with the wireless hotspot device is required based on the identifier.
10. The method of claim 7, wherein the method further comprises:
Receiving encrypted data information and a second random number sent by the target equipment;
Generating a decryption key according to the second random number and the private key;
decrypting the encrypted data information according to the decryption key.
11. The method according to any one of claims 7 to 10, wherein the wireless hotspot device is a device requiring network configuration, and the target device is a device configuring the wireless hotspot device.
12. A device connection apparatus, comprising:
The wireless hotspot device comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving a management frame broadcasted and sent by a wireless hotspot device, the management frame comprises a service set identifier of the wireless hotspot device, the wireless hotspot device generates the service set identifier according to the device identifier of the wireless hotspot device and a first random number generated by the wireless hotspot device, and the wireless hotspot device generates an access key according to the first random number and a private key of the wireless hotspot device;
The determining module is used for determining that the wireless hot-spot device is the wireless hot-spot device to be connected according to the management frame;
The acquisition module is used for sending a first key acquisition request to a server, wherein the first key acquisition request comprises the equipment identifier and the first random number which are analyzed from the service set identifier; receiving the access key fed back by the server, wherein the server obtains the private key according to the equipment identifier query, and generates the access key according to the first random number and the private key;
And the connection module is used for connecting the wireless hot spot equipment according to the access key.
13. The apparatus of claim 12, wherein the management frame further comprises a set identifier;
the determining module is specifically configured to: and if the identifier is analyzed to be included in the management frame, determining that the wireless hot-spot device is the wireless hot-spot device which needs to be connected.
14. The apparatus as recited in claim 12, further comprising:
the generation module is used for generating a second random number;
The sending module is further used for sending a second key acquisition request to the server, wherein the second key acquisition request comprises the equipment identifier and the second random number;
The receiving module is further configured to receive an encryption key fed back by the server, where the server queries the private key according to the device identifier, and generates the encryption key according to the second random number and the private key;
the encryption module is used for encrypting the data information which needs to be transmitted to the wireless hot spot equipment according to the encryption key;
the sending module is further configured to send the encrypted data information and the second random number to the wireless hotspot device.
15. An electronic device, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the device connection method of any of claims 1 to 6.
16. A device connection apparatus for use with a wireless hotspot device, the apparatus comprising:
The generation module is used for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hot spot equipment;
And the sending module is used for broadcasting and sending a management frame comprising the service set identifier, so that after the target equipment to be connected with the wireless hot spot equipment determines that the target equipment needs to be connected with the wireless hot spot equipment according to the management frame, a first key acquisition request is sent to a server, the first key acquisition request comprises the equipment identifier and the first random number which are analyzed from the service set identifier, and the access key fed back by the server is received, wherein the server inquires and obtains the private key according to the equipment identifier, generates the access key according to the first random number and the private key, and is connected with the wireless hot spot equipment by the access key.
17. The apparatus as recited in claim 16, further comprising:
The receiving module is used for receiving the encrypted data information and the second random number sent by the target equipment;
And the decryption module is used for generating a decryption key according to the second random number and the private key, and decrypting the encrypted data information according to the decryption key.
18. An electronic device, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the device connection method of any of claims 7 to 11.
19. A device connection system, comprising:
the system comprises wireless hot spot equipment and target equipment to be connected with the wireless hot spot equipment;
The wireless hot spot equipment is used for generating a first random number, generating a service set identifier according to the equipment identifier of the wireless hot spot equipment and the first random number, generating an access key according to the first random number and a private key of the wireless hot spot equipment, and broadcasting and sending a management frame comprising the service set identifier;
The target device is configured to determine, according to the management frame, that the wireless hotspot device is a wireless hotspot device to be connected, send a first key acquisition request to a server, where the first key acquisition request includes the device identifier and the first random number that are parsed from the service set identifier, receive the access key fed back by the server, and query the server according to the device identifier to obtain the private key, generate the access key according to the first random number and the private key, and connect the wireless hotspot device according to the access key.
20. A network configuration method, applied to a distribution network device, the method comprising:
receiving a management frame sent by broadcasting of equipment to be accessed to the network, wherein the management frame comprises a service set identifier of the equipment to be accessed to the network, the equipment to be accessed to the network generates the service set identifier according to the equipment identifier of the equipment to be accessed to the network and a random number generated by the equipment to be accessed to the network, and the equipment to be accessed to the network generates an access key according to the random number and a private key of the equipment to be accessed to the network;
determining that the equipment to be accessed to the network is equipment to be connected according to the management frame;
sending a key acquisition request to a server, wherein the key acquisition request comprises the equipment identifier and the random number which are analyzed from the service set identifier;
receiving the access key fed back by the server, wherein the server obtains the private key according to the equipment identification query, and generates the access key according to the random number and the private key;
connecting the equipment to be accessed to the network according to the access key;
And sending the network configuration information of the router to the equipment to be accessed to the network so that the equipment to be accessed to the network is connected with the router according to the network configuration information.
21. A network configuration apparatus, applied to a distribution network device, comprising:
The receiving module is used for receiving a management frame sent by the equipment to be accessed to the network in a broadcasting way, wherein the management frame comprises a service set identifier of the equipment to be accessed to the network, the equipment to be accessed to the network generates the service set identifier according to the equipment identifier of the equipment to be accessed to the network and a random number generated by the equipment to be accessed to the network, and the equipment to be accessed to the network generates an access key according to the random number and a private key of the equipment to be accessed to the network;
the determining module is used for determining that the equipment to be accessed to the network is equipment to be connected according to the management frame;
the acquisition module is used for sending a key acquisition request to a server, wherein the key acquisition request comprises the equipment identifier and the random number which are analyzed from the service set identifier; receiving the access key fed back by the server, wherein the server obtains the private key according to the equipment identification query, and generates the access key according to the random number and the private key;
the connection module is used for connecting the equipment to be accessed to the network according to the access key;
And the sending module is used for sending the network configuration information of the router to the equipment to be accessed to the network so that the equipment to be accessed to the network is connected with the router according to the network configuration information.
22. A distribution network device, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the network configuration method of claim 20.
23. A network configuration method, applied to a device to be networked, the method comprising:
generating a random number;
generating a service set identifier according to the equipment identifier of the equipment to be accessed and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed;
Broadcasting and sending a management frame comprising the service set identifier, so that after the network distribution equipment to be connected with the network equipment to be connected determines that the network equipment to be connected is required to be connected with the network equipment to be connected according to the management frame, sending a key acquisition request to a server, wherein the key acquisition request comprises the equipment identifier and the random number which are analyzed from the service set identifier, receiving the access key fed back by the server, wherein the server inquires to obtain the private key according to the equipment identifier, generates the access key according to the random number and the private key, and connects the network equipment to be connected with the access key;
Receiving network configuration information of a router sent by the distribution network equipment;
and connecting the router according to the network configuration information.
24. A network configuration device, which is applied to a device to be networked, comprising:
The generation module is used for generating a random number, generating a service set identifier according to the equipment identifier of the equipment to be accessed to the network and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed to the network;
The sending module is used for broadcasting and sending a management frame comprising the service set identifier, so that after the network distribution equipment to be connected with the network distribution equipment needs to be connected with the network distribution equipment according to the management frame, a key acquisition request is sent to a server, wherein the key acquisition request comprises the equipment identifier and the random number which are analyzed from the service set identifier, and the access key fed back by the server is received, wherein the server inquires according to the equipment identifier to obtain the private key, generates the access key according to the random number and the private key, and is connected with the network distribution equipment to be connected with the network distribution equipment;
the receiving module is used for receiving the network configuration information of the router sent by the distribution network equipment;
and the connection module is used for connecting the router according to the network configuration information.
25. A device to be networked, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the network configuration method of claim 23.
CN201911340681.5A 2019-12-23 2019-12-23 Network configuration method, device connection method, device, equipment and system Active CN113099445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911340681.5A CN113099445B (en) 2019-12-23 2019-12-23 Network configuration method, device connection method, device, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911340681.5A CN113099445B (en) 2019-12-23 2019-12-23 Network configuration method, device connection method, device, equipment and system

Publications (2)

Publication Number Publication Date
CN113099445A CN113099445A (en) 2021-07-09
CN113099445B true CN113099445B (en) 2024-05-07

Family

ID=76663089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911340681.5A Active CN113099445B (en) 2019-12-23 2019-12-23 Network configuration method, device connection method, device, equipment and system

Country Status (1)

Country Link
CN (1) CN113099445B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104993981A (en) * 2015-05-14 2015-10-21 小米科技有限责任公司 Method and apparatus for controlling access of device
CN105392133A (en) * 2015-11-26 2016-03-09 北京奇虎科技有限公司 Method and system for wireless function device to automatically access to wireless access point
CN106211205A (en) * 2015-04-30 2016-12-07 广东美的制冷设备有限公司 Collocation method and system, household electrical appliance, mobile terminal and server
CN107635268A (en) * 2016-07-19 2018-01-26 美的智慧家居科技有限公司 Realize the methods, devices and systems that internet of things equipment networks
CN110225492A (en) * 2019-05-29 2019-09-10 飞天诚信科技股份有限公司 A kind of implementation method and device for cloud speaker distribution

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150312240A1 (en) * 2014-04-29 2015-10-29 Altek Corporation Wireless automatic pairing method, method of establishing connection, and wireless access point device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106211205A (en) * 2015-04-30 2016-12-07 广东美的制冷设备有限公司 Collocation method and system, household electrical appliance, mobile terminal and server
CN104993981A (en) * 2015-05-14 2015-10-21 小米科技有限责任公司 Method and apparatus for controlling access of device
CN105392133A (en) * 2015-11-26 2016-03-09 北京奇虎科技有限公司 Method and system for wireless function device to automatically access to wireless access point
CN107635268A (en) * 2016-07-19 2018-01-26 美的智慧家居科技有限公司 Realize the methods, devices and systems that internet of things equipment networks
CN110225492A (en) * 2019-05-29 2019-09-10 飞天诚信科技股份有限公司 A kind of implementation method and device for cloud speaker distribution

Also Published As

Publication number Publication date
CN113099445A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US11395213B2 (en) Systems and methods for implementing multiple band service discovery
CN106878926B (en) Data transmission method based on low-power-consumption Bluetooth, slave master device and system
CN106535288B (en) Method for sending and acquiring wifi networking information and corresponding device
EP3484196B1 (en) Method and apparatus for registering wireless device in wireless communication system
CN110933614B (en) Communication processing method and device and electronic equipment
CN113099443B (en) Equipment authentication method, device, equipment and system
CN113099440A (en) Network configuration method, device, equipment and system
CN104967595A (en) Method and apparatus for registering devices on Internet of things platform
CN104967596A (en) Method and apparatus for realizing binding and communication between user terminal and Internet of things device
CN112566113B (en) Key generation and terminal network distribution method, device and equipment
CN109587823B (en) Method for accessing WiFi camera to Internet by intelligent code scanning
CN112020120A (en) Network configuration method, device, equipment and system
US20230379799A1 (en) Device network configuration method and first device
WO2018113113A1 (en) Double-system terminal wifi sharing method and device
US20130152220A1 (en) Method, Apparatus and System for Software Management
CN113301563A (en) Network configuration method, device, equipment and storage medium
US11323282B2 (en) Apparatus, system, method, and computer-readable recording media for onboarding of a wireless extender in a wireless network
WO2014015743A1 (en) Method for downloading application program, user equipment and application server
CN113099445B (en) Network configuration method, device connection method, device, equipment and system
WO2016161772A1 (en) Frequency range locking method, device and system
CN106656581A (en) Router configuration method and device
US20220217131A1 (en) Networking method for household appliance, household appliance, and terminal device
CN112422339A (en) Method for mutual configuration of Internet of things equipment
CN116095680A (en) Wireless network access method, device, equipment and storage medium
CN117319970A (en) Device connection method and device, storage medium and chip

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant