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

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

Info

Publication number
CN113099445A
CN113099445A CN201911340681.5A CN201911340681A CN113099445A CN 113099445 A CN113099445 A CN 113099445A CN 201911340681 A CN201911340681 A CN 201911340681A CN 113099445 A CN113099445 A CN 113099445A
Authority
CN
China
Prior art keywords
wireless hotspot
equipment
random number
identifier
management frame
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.)
Pending
Application number
CN201911340681.5A
Other languages
Chinese (zh)
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/CN113099445A/en
Publication of CN113099445A publication Critical patent/CN113099445A/en
Pending legal-status Critical Current

Links

Images

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

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 broadcast and sent by the wireless hotspot equipment, wherein the management frame comprises an SSID of the wireless hotspot equipment, the wireless hotspot equipment generates the SSID according to an equipment identifier of the wireless hotspot equipment and a first random number generated by the wireless hotspot equipment, and the wireless hotspot equipment generates an access key according to the first random number and a private key of the wireless hotspot equipment; determining that the wireless hotspot device is the wireless hotspot device needing to be connected according to the management frame; and acquiring an access key according to the equipment identifier and the first random number analyzed from the SSID, and connecting the wireless hotspot equipment according to the access key. By the scheme, the device to be connected with the wireless hotspot device can automatically discover the wireless hotspot device needing to be connected, and further automatically acquire the access key accessed to the wireless hotspot device, so that automatic connection with the wireless hotspot device is realized.

Description

Network configuration method, equipment connection method, device, equipment and system
Technical Field
The invention relates to the technical field of internet/internet of things, in particular to a network configuration method, a device connection method, a device, equipment and a system.
Background
Many terminal devices have an Access Point (AP) function, which simply converts network signals received by the terminal device, such as GPRS, 3G, or 4G, into wifi signals to be transmitted. 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 a wifi hotspot is started, other terminal devices can be accessed to the wireless hotspot device.
At present, a common way to open wifi hotspots is: the method comprises the steps that a user sets a Service Set Identifier (SSID) and an access key of the wireless hotspot device, when a certain terminal device wants to establish connection with the wireless hotspot device, the SSID existing around the terminal device is manually searched to find the SSID of the wireless hotspot device, and then the access key of the wireless hotspot device is manually input to establish connection with the wireless hotspot device. The implementation mode needs manual operation of a user, and the operation is complex and inconvenient.
Disclosure of Invention
The embodiment of the invention provides a device connection method, a device, equipment and a system, which are used for realizing automatic connection of wireless hotspot devices.
In a first aspect, an embodiment of the present invention provides an apparatus connection method, including:
receiving a management frame sent by a wireless hotspot device in a broadcast manner, wherein 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;
determining that the wireless hotspot device is a wireless hotspot device needing to be connected according to the management frame;
acquiring the access key according to the equipment identifier and the first random number analyzed from the service set identifier;
and connecting the wireless hotspot equipment according to the access key.
In a second aspect, an embodiment of the present invention provides an apparatus connecting device, including:
the wireless hotspot device comprises a receiving module and a sending module, wherein the receiving module is used for receiving a management frame sent by a wireless hotspot device in a broadcast manner, 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 hotspot device is the wireless hotspot device needing to be connected according to the management frame;
an obtaining module, configured to obtain the access key according to the device identifier and the first random number that are analyzed from the service set identifier;
and the connection module is used for connecting the wireless hotspot equipment according to the access key.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores executable codes, and when the executable codes are executed by the processor, the processor is caused to execute the device connection method in the first aspect.
An embodiment of the present invention provides 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, which is applied to a wireless hotspot device, and the method includes:
generating a first random number;
generating a service set identifier according to the equipment identifier of the wireless hotspot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hotspot equipment;
and broadcasting and sending a management frame comprising the service set identifier so that a 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, then obtains the access key according to the device identifier analyzed from the service set identifier and the first random number, and connects the wireless hotspot device with the access key.
In a fifth aspect, an embodiment of the present invention provides an apparatus connecting device, located in a wireless hotspot device, including:
a generating module for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hotspot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hotspot equipment;
and the sending module is used for broadcasting and sending a management frame comprising the service set identifier so that a target device to be connected with the wireless hotspot device can obtain the access key according to the device identifier and the first random number analyzed from the service set identifier after determining that the target device needs to be connected with the wireless hotspot device according to the management frame, and the access key is used for connecting the wireless hotspot device.
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 thereon, and when the executable code is executed by the processor, the processor is caused to execute the device connection method in the fourth aspect.
An embodiment of the present invention provides 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 execute the device connection method in the fourth aspect.
In a seventh aspect, an embodiment of the present invention provides an apparatus connection system, including:
the system comprises wireless hotspot equipment and target equipment to be connected with the wireless hotspot equipment;
the wireless hotspot device is used for generating a first random number, generating a service set identifier according to the device identifier of the wireless hotspot device and the first random number, generating an access key according to the first random number and a private key of the wireless hotspot device, and broadcasting and transmitting 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, which are analyzed from the service set identifier, and connect the wireless hotspot device according to the access key.
In the embodiment of the present invention, a device supporting a wifi hotspot function is referred to as a wireless hotspot device, and a device to be connected to the wireless hotspot device is referred to as 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 identification of the wireless hotspot device and a first random number generated by the wireless hotspot device, 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 senses the management frame, whether the wireless hotspot device is the wireless hotspot device which needs to be connected is determined according to the management frame, if yes, an access key is generated according to the device identifier and the first random number which are analyzed from the management frame, and the access key is used for automatically establishing connection with the wireless hotspot device. By the scheme, the target device can automatically discover the wireless hotspot device needing to be connected, and further automatically acquire the access key accessed to the wireless hotspot device, so that automatic connection with the wireless hotspot device is realized.
In an eighth aspect, an embodiment of the present invention provides a network distribution method, which is applied to a network distribution device, and the method includes:
receiving a management frame sent by a device to be networked in a broadcast manner, wherein the management frame comprises a service set identifier of the device to be networked, the device to be networked generates the service set identifier according to the device identifier of the device to be networked and a random number generated by the device to be networked, and the device to be networked generates an access key according to the random number and a private key of the device to be networked;
determining that the equipment to be accessed to the network is the equipment needing to be connected according to the management frame;
acquiring the access key according to the equipment identifier and the random number 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 distribution network device, and includes:
the device to be networked generates the service set identifier according to the device identifier of the device to be networked and a random number generated by the device to be networked, and the device to be networked generates an access key according to the random number and a private key of the device to be networked;
the determining module is used for determining that the equipment to be accessed to the network is the equipment needing to be connected according to the management frame;
an obtaining module, configured to obtain the access key according to the device identifier and the random number that 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 ensure 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 distribution device, including: 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 the eighth aspect.
In an eleventh aspect, an embodiment of the present invention provides a network configuration method, which is applied to a device to be networked, and 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 sending a management frame including the service set identifier so that the distribution network equipment to be connected with the equipment to be accessed determines that the equipment to be accessed needs to be connected with the equipment to be accessed according to the management frame, then acquiring the access key according to the equipment identifier and the random number analyzed from the service set identifier and connecting the equipment to be accessed 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, and includes:
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 and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed;
a sending module, configured to broadcast a management frame including the service set identifier, so that a distribution network device to be connected to the device to be networked determines, according to the management frame, that the distribution network device needs to be connected to the device to be networked, and then obtains the access key according to the device identifier and the random number analyzed from the service set identifier, and connects the device to be networked 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 stored thereon executable code which, when executed by the processor, causes the processor to perform the network configuration method of the eleventh aspect.
In the embodiment of the present invention, when the AP mode (that is, the hotspot mode) is used to perform network configuration on the device to be networked, the device to be networked needs to operate in the hotspot mode, that is, the device to be networked at this time serves as a wireless hotspot device, and the network distribution device needs to establish connection with the device to be networked first, and then sends the network configuration information of the router to the device to be networked for the device to be networked to access the router. In order to realize that the distribution network equipment is automatically connected to the equipment to be accessed, the equipment to be accessed generates an SSID according to the equipment identification of the equipment to be accessed and the random number generated by the equipment to be accessed, generates an access key according to the random number and the private key of the equipment to be accessed, and further broadcasts a management frame containing the SSID. When the distribution network equipment listens the management frame, whether the equipment to be accessed to the network is the equipment needing connection is determined according to the management frame, if yes, an access key is generated according to the equipment identification and the random number analyzed from the management frame, and the access key is used for automatically establishing connection with the equipment to be accessed to the network. By the scheme, the network distribution equipment can automatically discover the equipment to be accessed to be connected (namely, the network configuration is required), and further automatically acquire the access key accessed to the equipment to be accessed, so that the automatic connection with the equipment to be accessed is realized, and the network configuration efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
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 view of another work flow of the device connection system according to the embodiment of the present invention;
fig. 3 is a schematic 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 process provided in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus connecting device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device corresponding to the device connecting apparatus provided in the embodiment shown in fig. 5;
FIG. 7 is a schematic structural diagram of another apparatus connecting device 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 apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a distribution network device corresponding to the network configuration apparatus 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
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 the examples of the present invention 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, and "a plurality" typically 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 phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Before specifically describing the device connection scheme provided by the embodiments of the present invention, several concepts involved herein will be described.
The servers herein may be independent physical hosts or clusters of hosts located in the cloud.
The wireless hotspot device in this context is a device that can be a wifi hotspot, such as an internet of things device such as a sound box and a robot.
The target device in this document refers to a device to establish a communication connection with the wireless hotspot device, and may be, for example, a mobile phone, a computer, a sound box, a robot, or the like.
A device to be networked in this context may be a terminal device, such as a refrigerator, a loudspeaker, a robot, etc., which is not yet connected to some wireless network to which it is desired to access, and is therefore referred to as a device to be networked.
The distribution network device can be a mobile phone, a tablet computer and other terminal devices, and the distribution network device can already access a certain wireless network through a router and other network devices, for example, a mobile phone of a user already accesses a wifi network of a home through a wireless router installed in the home.
It should be noted that the distribution network device may also be a terminal device that does not have a human-computer interaction screen, such as a refrigerator or a sound box that has already accessed a wireless network, and at this time, the distribution network device may locally store network configuration information of a router that is accessed by the distribution network device, so as to perform network configuration on a device to be networked that does not access the network.
In addition, a distribution network application program can run in the distribution network equipment, and network configuration of the equipment to be networked is realized through the distribution network application program.
In brief summary, a network distribution device and a device to be networked belong to the same user, and the two devices mainly differ from each other: the network distribution equipment has access to a certain wireless network, the equipment to be networked has not access to the wireless network, and the purpose of network configuration of the equipment to be networked is to enable the equipment to be networked to access to the wireless network.
The following describes an apparatus connection scheme and a network configuration scheme provided in the embodiments of the present invention.
Fig. 1 is a schematic work flow diagram of an apparatus connection system according to an embodiment of the present invention, and as shown in fig. 1, the apparatus connection system includes: the system comprises a wireless hotspot device and a target device to be connected with the wireless hotspot device. The device connection process may include the steps of:
101. the wireless hotspot device generates a first random number, generates a service set identifier according to the device identifier of the wireless hotspot device and the first random number, and generates an access key according to the first random number and a private key of the wireless hotspot device.
If the wireless hotspot device starts the wifi hotspot function, the SSID of the wireless hotspot device needs to be broadcasted to the outside, so that a target device which needs to be connected with the wireless hotspot device can discover the wireless hotspot device. Additionally, to ensure connection security, the wireless hotspot device may be configured with an access key. In this embodiment, a scheme for turning on 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, the key parameters required for generating the SSID and the access key of the wireless hotspot device are: the device identification and the private key of the wireless hotspot device and the random number (namely the first random number) generated by the wireless hotspot device.
The device identification and the private key of the wireless hotspot device are burnt in the wireless hotspot device in advance, and are stored in a cloud server in advance.
In practical application, when a user operates the wireless hotspot device to start the 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 numeric value of a set number, such as hexadecimal, decimal, binary, or the like.
In practical application, it is not limited that all devices supporting the wifi hotspot function are executed according to the scheme provided by the embodiment of the present invention when the wifi hotspot function is started, and the scheme provided by the embodiment of the present invention may be executed only when certain wireless hotspot devices are started. At this time, the device identifications and the private keys of the specific wireless hotspot devices, such as certain brands, models, and kinds of internet of things devices, are stored in the cloud server. That is to say, code scripts are written in the specific wireless hotspot devices in advance, and when a user starts the wifi hotspot function of the wireless hotspot device, the code scripts are run to execute the device connection scheme provided by the embodiment of the invention.
In turn, 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 random number 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. Certainly, in practical application, in consideration of readability of a user, certain format conversion may also be performed on the first random number, and a splicing result of the first random number after format conversion and the device identifier is used as an SSID.
In addition, the wireless hotspot device generates an access key based on the generated first random number and a private key of the wireless hotspot device. Optionally, the wireless hotspot device may compute the first random number and a private key of the wireless hotspot device using any one of encryption algorithms, such as MD5, SHA1, SHA224, SHA256, etc., to obtain the access key. It can be appreciated that the role of the wireless hotspot device in generating 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 approve the connection request of the target device based on whether the access key input by the target device is consistent with the access key generated by the wireless hotspot device.
After the SSID and the access key are automatically generated according to the above process, the wireless hotspot device may construct a management frame including the SSID, and broadcast and transmit the management frame to the outside.
Generally, the communication protocols adopted by the target device and the wireless hotspot device are in accordance with the 802.11 standard, and in the 802.11 standard, many management frames are defined, so the management frames can be selected from any one of the management frames defined by the 802.11 standard.
Common management frames include: beacon (beacon) frame, probe request (probe request) frame. Therefore, the management frame generated by the device to be networked may be selected from any of the above.
Taking a beacon frame as an example (probe request frame and the like), a plurality of fields may be included in the beacon frame, wherein one field is a field for populating an SSID, and therefore, the wireless hotspot device may populate the generated SSID into the field to generate the beacon frame.
102. And the wireless hotspot device broadcasts and transmits a management frame comprising the generated service set identification.
In short, it is the wireless hotspot device that broadcasts its SSID outwards, that is, broadcasts its network name, and the management frame is only the bearer of the SSID. In practical applications, it may be set to broadcast every 100 milliseconds, for example.
103. And the target equipment determines that the wireless hotspot equipment is the wireless hotspot equipment needing to be connected according to the received management frame, and acquires the access key according to the equipment identifier and the first random number which are analyzed from the service set identifier.
104. And the target equipment is connected with the wireless hotspot equipment according to the access key.
In practical applications, for a target device, at a certain time, it may receive not only the 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 the management frames may all include the SSID of the corresponding device. At this time, the target device needs to distinguish which management frame corresponds to the wireless hotspot device to which the target device wants to connect, that is, the target device needs to be able to determine that the wireless hotspot device is a device that needs to be connected according to the received management frame sent by the wireless hotspot device.
Two optional implementation manners are provided below to implement the identification of the target device for the wireless hotspot device that needs to be connected, that is, the target device may determine whether the sending device corresponding to the received management frame is the wireless hotspot device that needs to be connected according to the following two optional implementation manners.
The first implementation mode comprises the following steps: a specific identifier may be set in a management frame generated by the wireless hotspot device. Therefore, if the target device analyzes the identifier from a certain received management frame, the target device determines that the device sending the management frame is the wireless hotspot device needing to be connected. For example, assuming that a user wants to connect to a smart speaker (as a wireless hotspot device) in a home with his/her handset (as a target device), assuming that the handset can search for an SSID including, in addition to an SSID _ a sent by the smart speaker, an SSID _ B sent by a router next to the home, however, since a management frame sent by the smart speaker includes, in addition to the SSID _ a, the specific identifier, such as an ABH, and the management frame sent by the router does not include the identifier, the handset determines that connection with the router is not needed and connection with the smart speaker is needed.
The second implementation mode comprises the following steps: the target device analyzes the SSID contained in the received management frame to analyze the device identifier contained in the SSID, and further 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 lengths of the device identifier and the first random number that constitute the SSID of the wireless hotspot device can be specified in practical applications, the target device can parse the corresponding device identifier from the received SSID according to the length setting. Of course, it is understood that, for example, if a certain management frame received by the target device is sent by a device such as a router that does not need to be connected, part of the field information extracted from the SSID of the management frame according to the above-mentioned length setting condition will not exist in the server.
When the target device determines that a received management frame is sent by the wireless hotspot device needing to be connected, the access key required by the connection of the wireless hotspot device can be obtained according to the device identifier of the wireless hotspot device and the first random number, which are obtained by analyzing the management frame.
Optionally, the target device may send a first key obtaining request to the server, where the first key obtaining request includes a device identifier and a first random number that are parsed from the SSID. After receiving the first key acquisition request, the server queries 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. And after receiving the connection request, the wireless hotspot device compares the access key contained in the connection request with an 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 private key and the first random number, the wireless hotspot device establishes communication connection with the target device. It is understood that the encryption algorithm used by the server to generate the access key corresponds to the encryption algorithm used by the wireless hotspot device.
In summary, according to the above scheme, the target device may automatically discover the wireless hotspot device that needs to be connected, and further automatically acquire the access key accessed to the wireless hotspot device, so as to implement automatic connection with the wireless hotspot device.
It is to be appreciated that the purpose of the target device establishing a connection with the wireless hotspot device is to communicate data information with the wireless hotspot device. In different application scenarios, the transmitted data information may be different. 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 that the wireless hotspot device is expected to access. For another example, in a scenario where the target device controls the wireless hotspot device to operate, the transmitted data information will be some control commands, such as a switch command, a parameter adjustment command, and the like.
In the following, a solution is provided for ensuring the security of data information transmission, regardless of the type of data information to be transmitted, as outlined in connection with the embodiment shown in fig. 2.
Fig. 2 is another schematic workflow diagram of the device connection system according to the embodiment of the present invention, 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 hotspot device generates a first random number, an SSID is generated according to the device identification of the wireless hotspot device and the first random number, and an access key is generated according to the first random number and a private key of the wireless hotspot device.
202. And the wireless hotspot device broadcasts and transmits a management frame comprising the generated SSID.
203. And the target device determines that the wireless hotspot device is the wireless hotspot device needing 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. The server obtains a private key of the wireless hotspot device according to the device identification, 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 hotspot equipment according to the access key.
208. The target device generates a second random number.
209. And the target equipment sends a second key acquisition request to the server, wherein the second key acquisition request comprises the equipment identification of the wireless hotspot equipment and a second random number.
210. And the server generates an encryption key according to the second random number and the 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 hotspot equipment according to the encryption key.
213. And the target equipment sends the encrypted data information and the second random number to the wireless hotspot equipment.
214. And the wireless hotspot equipment generates a decryption key according to the second random number and the private key of the wireless hotspot equipment, and decrypts the encrypted data information according to the decryption key.
In this embodiment, the execution process of steps 201-207 may refer to the description in the foregoing other embodiments, which is not described herein again.
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: a private key of the wireless hotspot device and a second random number generated by the target device. Similarly, two key parameters for generating the decryption key corresponding to the encryption key are also: a private key of the wireless hotspot device and a 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 further, a second key acquisition request including the device identifier and the second random number may be sent to the server based on the device identifier analyzed from the management frame sent by the wireless hotspot device. After receiving the second key acquisition request, the server queries a 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 then 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, so as 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.
And the wireless hotspot device generates a decryption key based on the received second random number and a locally stored private key so as to decrypt and obtain the data information sent by the target device. The algorithm used for decryption key generation corresponds to the algorithm used for encryption key generation.
In addition, to further improve the security, the target device may set a 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. If the life time exceeds the life time, the encryption key and the decryption key are invalid, and at the moment, if the subsequent target equipment still needs to transmit data information with the wireless hotspot equipment, a new second random number needs to be generated again.
In summary, based on the scheme provided in this 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.
The following takes a distribution network scenario as an example, and an actual application process of the device connection method provided above in the distribution network scenario is exemplarily described. At this time, the foregoing wireless hotspot device is a device that needs to perform network configuration, and is called a device to be networked; the target device is a device for network configuration of the wireless hotspot device, and is called a distribution network device.
Fig. 3 is a schematic 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, an SSID is generated according to the device identification of the device to be accessed to the network and the random number, and an access key is generated according to the random number and the private key of the device to be accessed to the network.
302. And the equipment to be accessed to the network broadcasts and sends a management frame comprising the SSID.
303. The distribution network equipment determines that the equipment to be accessed to the network, which sends the management frame, is the equipment needing to be connected according to the received management frame, and acquires an access key according to the equipment identifier 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 networked through the access key.
305. And the distribution network equipment sends the network configuration information of the router to the equipment to be networked.
306. And the equipment to be networked 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 a device to be networked. In the hotspot mode, the device to be networked needs to start a wifi hotspot function, and externally broadcasts an SSID of the device to enable the distribution network device to discover the device to be networked, and then is connected to the device to be networked through an access key corresponding to the device to be networked, and then the distribution network device sends network configuration information of a router which is expected to be connected to the device to be networked based on communication connection between the distribution network device and the device to be networked. The network configuration information includes an SSID, an access PASSWORD (PASSWORD), a Basic Service Set Identifier (BSSID), and the like corresponding to the router.
For the specific implementation process of the above steps, reference may be made to the related descriptions in the foregoing other embodiments, which are not described herein again. It is understood that the process of the distribution network device obtaining the access key and the encryption key may be obtained by the request server, and the specific process refers to the relevant description in the foregoing embodiments.
To more intuitively understand the process of performing network configuration on the device to be networked by using the hotspot mode, the description is given with reference to fig. 4.
In fig. 4, it is assumed that the device to be networked is a sound box and the network distribution device is a mobile phone. Assuming that the mobile phone is currently connected to a router, the SSID corresponding to the router is represented as: SSID _ a, which is the network name of the wireless network corresponding to the router. Suppose that the SSID generated by the speaker based on the self-generated random number and the device identifier is expressed as: and SSID _ B, namely the network name of the wireless network corresponding to the hot spot where the sound box is started.
The purpose of network configuration of the speaker by the mobile phone is to expect that the speaker can be connected to the router to which the mobile phone is currently connected.
As can be seen from fig. 4, to achieve this, initially, the handset is connected to the router, i.e. the handset accesses the wireless network with the network name SSID _ a.
And then, when the user starts the wifi hotspot function of the sound box, the sound box creates a wireless network with the name of SSID _ B, generates an access KEY KEY and further broadcasts the SSID _ B to the outside. Wherein, SSID _ B includes device identification Dev and random number Rand of the loudspeaker box. The access KEY is generated from the private KEY of the loudspeaker and the random number Rand.
After the mobile phone senses the SSID _ B, the device identification Dev and the random number Rand are analyzed from the SSID _ B, the server is requested to obtain an access KEY KEY of the sound box based on the device identification Dev and the random number Rand, the access KEY KEY is automatically connected to the sound box, the connection with the router is disconnected, and the mobile phone is switched to a wireless network with an access network name of SSID _ B. The device identification Dev of the server queries the private KEY of the sound box, and then generates an access KEY according to the private KEY and the random number Rand.
Based on the connection with the sound box, the mobile phone further issues the network configuration information of the router connected so far to the sound box, which is equivalent to that the mobile phone informs the sound box of the network configuration information required by the wireless network with the access network name SSID _ a, such as the network name SSID _ a and the access key paswd of the router.
The sound box is accessed to the wireless network SSID _ A based on the received network configuration information, namely is connected with the router. And then, the mobile phone switches back to the wireless network SSID _ A.
In conclusion, when the network configuration is performed on the device to be networked in the hotspot mode, the automatic connection between the network distribution device and the device to be networked can be realized through the scheme, manual intervention is not required, and the efficiency of network configuration is improved.
The network configuration apparatus, the device connection apparatus, and the like according to one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that the network configuration means and the device connection means can be configured by using commercially available hardware components through the steps taught by the present solution.
Fig. 5 is a schematic structural diagram of an apparatus connecting device according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: the device comprises a receiving module 11, a determining module 12, an obtaining 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 analyzed from the service set identifier.
And the connection module 14 is configured to connect the wireless hotspot device according to the access key.
Optionally, the management frame is a beacon frame or a probe request frame.
Optionally, the obtaining module 13 may be specifically 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 queries the private key according to the equipment identifier, 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 be specifically configured to: and if the management frame is analyzed to contain the identifier, determining that the wireless hotspot device is the wireless hotspot device needing to be connected.
Optionally, the determining module 12 may be specifically configured to: analyzing the equipment identification from the management frame; and if the equipment identification is inquired from the server, determining that the wireless hotspot equipment is the wireless hotspot equipment needing 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 queries the private key according to the equipment identifier and generates the encryption key according to the second random number and the private key; encrypting data information required to be transmitted to the wireless hotspot equipment according to the encryption key; and sending the encrypted data information and the second random number to the wireless hotspot equipment.
Optionally, the wireless hotspot device is a device that needs to perform network configuration.
The apparatus shown in fig. 5 may perform the steps performed by the target device in the foregoing embodiments, and details of the parts not described in detail in this embodiment may refer to the related descriptions in the foregoing embodiments, which are not described herein again.
In one possible design, the structure of the device connecting apparatus shown in fig. 5 may be implemented as an electronic device, such as a terminal device, such as a mobile phone, a notebook computer, and the like. As shown in fig. 6, the electronic device may include: a first processor 21, a first memory 22. Wherein the first memory 22 has stored thereon executable code, which when executed by the first processor 21, causes at least the first processor 21 to carry out the steps performed by the target device in the previous embodiments.
The electronic device may further include a first communication interface 23 configured to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the steps performed by the target device in the foregoing embodiments.
Fig. 7 is a schematic structural diagram of another device connection apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes: a generating module 31 and a sending module 32.
A generating module 31 for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hotspot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hotspot equipment;
a sending module 32, configured to broadcast a management frame including the service set identifier, so that a target device to be connected to the wireless hotspot device determines, according to the management frame, that the target device needs to be connected to the wireless hotspot device, and then obtains the access key according to the device identifier and the first random number analyzed 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, according to the identifier, that connection with the wireless hotspot device is required.
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; and decrypting the encrypted data information according to the decryption key.
Optionally, the wireless hotspot device is a device that needs to perform network configuration, and the target device is a device that performs network configuration on the wireless hotspot device.
The apparatus shown in fig. 7 may perform the steps performed by the wireless hotspot device in the foregoing embodiments, and details of the parts not described in detail in this embodiment may refer to the related description of the foregoing embodiments, which are not described herein again.
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 wifi hotspot function, and may be referred to as a wireless hotspot device, and the wireless hotspot device may be, for example, a household device, a wearable device, or the like. As shown in fig. 8, the wireless hotspot device may comprise: a second processor 41, a second memory 42. Wherein the second memory 42 has stored thereon executable code that, 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 preceding embodiments.
The structure of the wireless hotspot device may further include a second communication interface 43, which is used for communicating 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, which, 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 foregoing embodiments.
Fig. 9 is a schematic structural diagram of a network configuration apparatus according to an embodiment of the present invention, where the network configuration apparatus is located in a distribution network device, and specifically, the network configuration apparatus 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: 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 networked in a broadcast manner, where the management frame includes a service set identifier of the device to be networked, the device to be networked generates the service set identifier according to the device identifier of the device to be networked and a random number generated by the device to be networked, and the device to be networked generates an access key according to the random number and a private key of the device to be networked.
And the determining module 52 is 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 analyzed from the service set identifier.
And a connection module 54, configured to connect the device to be networked according to the access key.
A sending module 55, configured to send network configuration information of a router to the device to be networked, so that the device to be networked connects to the router according to the network configuration information.
The apparatus shown in fig. 9 may perform the steps performed by the distribution network device in the foregoing embodiments, and details of the parts not described in detail in this embodiment may refer to the relevant descriptions of 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, for example, a distribution network device installed with a distribution network application program and used for performing network configuration on a home device, a wearable device and a device waiting for network access, where the distribution network device is, for example, a mobile phone, a tablet computer, a notebook computer, and the like. As shown in fig. 10, the distribution network device may include: a third processor 61, a third memory 62. Wherein the third memory 62 stores executable code, and when the executable code is executed by the third processor 61, the third processor 61 at least realizes the steps executed by the network distribution equipment in the foregoing embodiments.
The structure of the distribution network device may further include a third communication interface 63, which is used for the distribution network device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where an executable code is stored on the non-transitory machine-readable storage medium, and when executed by a processor of a distribution network device, the executable code 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 apparatus according to an embodiment of the present invention, which is located in a device to be networked, and as shown in fig. 11, the apparatus includes: a generating module 71, a sending 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.
A sending module 72, configured to broadcast a management frame including the service set identifier, so that the distribution network device to be connected to the device to be networked determines, according to the management frame, that the distribution network device needs to be connected to the device to be networked, and then obtains the access key according to the device identifier and the random number analyzed from the service set identifier, and connects the device to be networked with the access key.
The receiving module 73 is configured to receive the network configuration information of the router sent by the distribution network 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 device to be networked in the foregoing embodiments, and details of the embodiment may refer to relevant descriptions of the foregoing embodiments, which are not described herein again.
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 means of other devices. As shown in fig. 12, the device to be networked may include: a fourth processor 81, and a fourth memory 82. The fourth memory 82 stores executable codes, and when the executable codes are executed by the fourth processor 81, at least the fourth processor 81 is enabled 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, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where an executable code is stored on the non-transitory machine-readable storage medium, and when executed by a processor of a device to be networked, the executable code causes the processor to perform the steps performed by the device to be networked in the foregoing embodiments.
The above-described apparatus embodiments 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 the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The device connection method provided in the embodiment of the present invention may be executed by one or more programs/software, where the programs/software may be provided by a network side, and the distribution network device and the device to be networked mentioned in the foregoing embodiments may download corresponding programs/software to a local nonvolatile storage medium, and when the device connection method needs to be executed, the programs/software are read into a memory by a CPU, and then the CPU executes the programs/software to implement the device connection method provided in the foregoing embodiments, and an execution process may refer to the schematic diagrams in fig. 1 to 4.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (27)

1. A device connection method, comprising:
receiving a management frame sent by a wireless hotspot device in a broadcast manner, wherein 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;
determining that the wireless hotspot device is a wireless hotspot device needing to be connected according to the management frame;
acquiring the access key according to the equipment identifier and the first random number analyzed from the service set identifier;
and connecting the wireless hotspot equipment according to the access key.
2. The method of claim 1, wherein obtaining the access key according to the device identifier and the first random number parsed from the service set identifier comprises:
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 queries the private key according to the equipment identifier, and generates the access key according to the first random number and the private key.
3. The method of claim 1, wherein the management frame is a beacon frame or a probe request frame.
4. The method of claim 1, wherein the management frame further comprises a set identifier;
the determining that the wireless hotspot device is the wireless hotspot device needing to be connected according to the management frame includes:
and if the management frame is analyzed to contain the identifier, determining that the wireless hotspot device is the wireless hotspot device needing to be connected.
5. The method of claim 1, wherein the determining that the wireless hotspot device is a wireless hotspot device needing to be connected according to the management frame comprises:
analyzing the equipment identification from the management frame;
and if the equipment identification is inquired from the server, determining that the wireless hotspot equipment is the wireless hotspot equipment needing to be connected.
6. The method of claim 1, further comprising:
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 queries the private key according to the equipment identifier and generates the encryption key according to the second random number and the private key;
encrypting data information required to be transmitted to the wireless hotspot equipment according to the encryption key;
and sending the encrypted data information and the second random number to the wireless hotspot equipment.
7. The method of any of claims 1-6, wherein the wireless hotspot device is a device requiring network configuration.
8. A device connection method is applied to a wireless hotspot device, and comprises the following steps:
generating a first random number;
generating a service set identifier according to the equipment identifier of the wireless hotspot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hotspot equipment;
and broadcasting and sending a management frame comprising the service set identifier so that a 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, then obtains the access key according to the device identifier analyzed from the service set identifier and the first random number, and connects the wireless hotspot device with the access key.
9. The method of claim 8, wherein the management frame is a beacon frame or a probe request frame.
10. The method of claim 8, wherein the management frame further comprises a set identifier, so that the target device determines that a connection with the wireless hotspot device is required according to the identifier.
11. The method of claim 8, further comprising:
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;
and decrypting the encrypted data information according to the decryption key.
12. The method of any one of claims 8 to 11, wherein the wireless hotspot device is a device requiring network configuration, and the target device is a device performing network configuration on the wireless hotspot device.
13. An apparatus connecting device, comprising:
the wireless hotspot device comprises a receiving module and a sending module, wherein the receiving module is used for receiving a management frame sent by a wireless hotspot device in a broadcast manner, 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 hotspot device is the wireless hotspot device needing to be connected according to the management frame;
an obtaining module, configured to obtain the access key according to the device identifier and the first random number that are analyzed from the service set identifier;
and the connection module is used for connecting the wireless hotspot equipment according to the access key.
14. The apparatus of claim 13, further comprising:
a sending module, configured to send a first key obtaining request to a server, where the first key obtaining request includes the device identifier and the first random number that are parsed from the service set identifier;
the receiving module is further configured to: and receiving the access key fed back by the server, wherein the server queries the private key according to the equipment identifier, and generates the access key according to the first random number and the private key.
15. The apparatus of claim 13, wherein the management frame further comprises a set identifier;
the determining module is specifically configured to: and if the management frame is analyzed to contain the identifier, determining that the wireless hotspot device is the wireless hotspot device needing to be connected.
16. The apparatus of claim 14, further comprising:
a generating module for generating a second random number;
the sending module is further configured to send a second key obtaining request to a server, where the second key obtaining request includes the device 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 obtains the private key according to the device identifier query, 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 hotspot 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.
17. 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 one of claims 1 to 7.
18. A device connection apparatus, applied to a wireless hotspot device, the apparatus comprising:
a generating module for generating a first random number; generating a service set identifier according to the equipment identifier of the wireless hotspot equipment and the first random number, and generating an access key according to the first random number and a private key of the wireless hotspot equipment;
and the sending module is used for broadcasting and sending a management frame comprising the service set identifier so that a target device to be connected with the wireless hotspot device can obtain the access key according to the device identifier and the first random number analyzed from the service set identifier after determining that the target device needs to be connected with the wireless hotspot device according to the management frame, and the access key is used for connecting the wireless hotspot device.
19. The apparatus of claim 18, 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.
20. 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 one of claims 8 to 12.
21. A device connection system, comprising:
the system comprises wireless hotspot equipment and target equipment to be connected with the wireless hotspot equipment;
the wireless hotspot device is used for generating a first random number, generating a service set identifier according to the device identifier of the wireless hotspot device and the first random number, generating an access key according to the first random number and a private key of the wireless hotspot device, and broadcasting and transmitting 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, which are analyzed from the service set identifier, and connect the wireless hotspot device according to the access key.
22. A network configuration method is applied to a network distribution device, and comprises the following steps:
receiving a management frame sent by a device to be networked in a broadcast manner, wherein the management frame comprises a service set identifier of the device to be networked, the device to be networked generates the service set identifier according to the device identifier of the device to be networked and a random number generated by the device to be networked, and the device to be networked generates an access key according to the random number and a private key of the device to be networked;
determining that the equipment to be accessed to the network is the equipment needing to be connected according to the management frame;
acquiring the access key according to the equipment identifier and the random number 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.
23. A network configuration device is applied to a distribution network device and comprises the following components:
the device to be networked generates the service set identifier according to the device identifier of the device to be networked and a random number generated by the device to be networked, and the device to be networked generates an access key according to the random number and a private key of the device to be networked;
the determining module is used for determining that the equipment to be accessed to the network is the equipment needing to be connected according to the management frame;
an obtaining module, configured to obtain the access key according to the device identifier and the random number that 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 ensure that the equipment to be accessed to the network is connected with the router according to the network configuration information.
24. A network distribution 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 22.
25. A network configuration method is applied to a device to be networked, and comprises the following steps:
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 including the service set identifier so that the distribution network equipment to be connected with the equipment to be accessed determines that the equipment to be accessed needs to be connected with the equipment to be accessed according to the management frame, then acquiring the access key according to the equipment identifier and the random number analyzed from the service set identifier and connecting the equipment to be accessed 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.
26. A network configuration device is applied to a device to be networked, and comprises:
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 and the random number, and generating an access key according to the random number and a private key of the equipment to be accessed;
a sending module, configured to broadcast a management frame including the service set identifier, so that a distribution network device to be connected to the device to be networked determines, according to the management frame, that the distribution network device needs to be connected to the device to be networked, and then obtains the access key according to the device identifier and the random number analyzed from the service set identifier, and connects the device to be networked 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.
27. An apparatus 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 25.
CN201911340681.5A 2019-12-23 2019-12-23 Network configuration method, equipment connection method, device, equipment and system Pending CN113099445A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

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

Family

ID=76663089

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113099445A (en)

Citations (6)

* 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
US20150312240A1 (en) * 2014-04-29 2015-10-29 Altek Corporation Wireless automatic pairing method, method of establishing connection, and wireless access point 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

Patent Citations (6)

* 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
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

Similar Documents

Publication Publication Date Title
US11395213B2 (en) Systems and methods for implementing multiple band service discovery
EP3484196B1 (en) Method and apparatus for registering wireless device in wireless communication system
CN113099440A (en) Network configuration method, device, equipment and system
US7818022B2 (en) Communication apparatus and electric power control method
EP2757738B1 (en) Communication control system, communication system, communication method, and carrier means storing comunication control program
CN108781473B (en) Method and equipment for sharing files among different terminals
CN104967595A (en) Method and apparatus for registering devices on Internet of things platform
CN110933614A (en) Communication processing method and device and electronic equipment
CN111787517A (en) Method and device for binding activation of intelligent equipment
US9155117B2 (en) Directly transferring data between devices
US9750067B2 (en) Communication method, information processing apparatus, and non-transitory computer-readable recording medium
CN112566113B (en) Key generation and terminal network distribution method, device and equipment
CN112020120A (en) Network configuration method, device, equipment and system
CN113301563A (en) Network configuration method, device, equipment and storage medium
EP3979071B1 (en) Method, user equipment, and application server for downloading application
CN114697879B (en) Bluetooth pairing method, electronic device, chip and storage medium
CN113099445A (en) Network configuration method, equipment connection method, device, equipment and system
WO2023231883A1 (en) Method for repairing wlan information, main configurator, and internet of things device and system
CN115550415B (en) Device connection method and electronic device
CN113727336B (en) Operation method of IOT equipment and intelligent gateway, terminal equipment and storage medium
EP4024929A1 (en) Networking method for household appliance, household appliance, and terminal device
Sakai et al. Virtual personal area network system for integrating pans with different standards and locations
CN115190275A (en) Network video recorder, video monitoring system and video monitoring method
CN116095680A (en) Wireless network access method, device, equipment and storage medium
CN112866995A (en) Connection method, connection device, electronic equipment and storage medium

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