Hotspot assisted networking methods, apparatuses, and computer-readable storage media
By generating a key string and decryption string when configuring IoT devices for the first time, and allowing user terminals to directly connect to the devices after verification, the problem of multiple network switching after IoT devices restart is solved, thus improving network connection efficiency.
Patent Information
- Application Number
- CN202211731810.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-12-30
AI Technical Summary
After a device restarts, it needs to switch network connections multiple times via the user terminal, making the operation process cumbersome and complicated.
When an IoT device is first configured to connect to the network, a key string and a decryption string are generated. After the user terminal obtains and verifies the decryption string, it sends network information and a connection key to the device via UDP service, enabling the device to connect directly after a restart.
It simplifies the process of connecting IoT devices to the network after a restart, improves network connection efficiency, and avoids multiple network switching.
Smart Images

Figure CN116170823B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a hotspot-assisted networking method, device and computer readable storage medium. BACKGROUND
[0002] With the development of the Internet of Things technology, the Internet of Things devices can exchange information and communicate through information transmission media, and the premise of communication between the Internet of Things devices is to configure the network of the Internet of Things devices.
[0003] The hotspot-assisted configuration method is one of the currently used configuration methods, but when the Internet of Things device is restarted and the hotspot-assisted configuration method is selected to re-network, the Internet of Things device still needs to re-network through the user terminal several times of network connection switching, which is complicated. SUMMARY
[0004] Therefore, it is necessary to provide a hotspot-assisted networking method, device, computer equipment, computer readable storage medium and computer program product capable of simplifying the operation process in view of the above technical problems.
[0005] In a first aspect, the present application provides a hotspot-assisted networking method, executed by a user terminal, comprising:
[0006] After entering the hotspot configuration mode, obtaining a connection key required for this time networking from an Internet of Things server;
[0007] Receiving a key string broadcasted by an Internet of Things device after restarting and entering the hotspot configuration mode; the key string is obtained by the Internet of Things device when performing the hotspot configuration for the first time;
[0008] Finding a decryption string corresponding to the key string, and feeding back the found decryption string to the Internet of Things device; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot configuration for the first time;
[0009] After the Internet of Things device verifies the received decryption string and the verification is passed, connecting the UDP service of the Internet of Things device;
[0010] Sending the network information of the target wireless network and the connection key to the Internet of Things device through the UDP service, so as to instruct the Internet of Things device to perform network connection according to the network information and the connection key.
[0011] In one of the embodiments, the method further comprises:
[0012] When the Internet of Things device performs the hotspot configuration for the first time, searching for a target hotspot broadcasted by the Internet of Things device;
[0013] displaying the target hotspot after searching for the target hotspot;
[0014] obtaining an initial password of the target hotspot, and connecting to the hotspot based on the initial password and the IoT device;
[0015] After the hotspot connection is successful, instructing the IoT device to generate a key string, and generating a decryption string corresponding to the key string locally.
[0016] In one embodiment, the user terminal is pre-configured with a database model, and the searching for the target hotspot broadcasted by the IoT device when the IoT device performs hotspot configuration and networking for the first time comprises:
[0017] After entering the hotspot configuration and networking mode, performing hotspot search to obtain a plurality of hotspots;
[0018] According to the pre-configured database model, identifying the information carried in each hotspot by an identification code;
[0019] If the target identification code is identified, the hotspot corresponding to the target identification code is taken as the target hotspot broadcasted by the IoT device.
[0020] In one embodiment, after the network information of the target wireless network and the connection key are sent to the IoT device through the UDP service, the method further comprises:
[0021] If the device information and the configuration and networking protocol version number replied by the IoT device are received within a preset time period, it is determined that the network connection is successful, otherwise the network information and the connection key are sent to the IoT device again;
[0022] If the number of repeated sending reaches a preset number, and the device information and the configuration and networking protocol version number replied by the IoT device are not received, it is determined that the network connection fails.
[0023] In one embodiment, the method further comprises:
[0024] If the device information and the configuration and networking protocol version number replied by the IoT device are received, the target wireless network is automatically connected;
[0025] The device information of the IoT device and the connection key are polled in the IoT server to confirm the networking result of the IoT device.
[0026] In a second aspect, the application further provides a hotspot-assisted networking device. The device comprises:
[0027] An obtaining module, configured to obtain a connection key required for this time networking from an IoT server after entering a hotspot configuration and networking mode.
[0028] The first receiving module is configured to receive a key string broadcasted by the IoT device after the IoT device is restarted and enters the hotspot network configuration mode; the key string is generated by the IoT device when the IoT device performs the hotspot network configuration for the first time;
[0029] The feedback module is configured to find a decryption string corresponding to the key string, and feed back the found decryption string to the IoT device; the decryption string is generated by the user terminal when the IoT device performs the hotspot network configuration for the first time;
[0030] The first connecting module is configured to connect a UDP service of the IoT device after the IoT device verifies the received decryption string and the verification is passed;
[0031] The sending module is configured to send network information of a target wireless network and the connection key to the IoT device through the UDP service, so as to instruct the IoT device to perform network connection according to the network information and the connection key.
[0032] In a third aspect, the present application further provides a user terminal. The user terminal comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0033] After entering the hotspot network configuration mode, obtaining a connection key required for network connection from an IoT server;
[0034] The first receiving module is configured to receive a key string broadcasted by the IoT device after the IoT device is restarted and enters the hotspot network configuration mode; the key string is generated by the IoT device when the IoT device performs the hotspot network configuration for the first time;
[0035] The feedback module is configured to find a decryption string corresponding to the key string, and feed back the found decryption string to the IoT device; the decryption string is generated by the user terminal when the IoT device performs the hotspot network configuration for the first time;
[0036] The first connecting module is configured to connect a UDP service of the IoT device after the IoT device verifies the received decryption string and the verification is passed;
[0037] The sending module is configured to send network information of a target wireless network and the connection key to the IoT device through the UDP service, so as to instruct the IoT device to perform network connection according to the network information and the connection key.
[0038] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0039] After entering the hotspot network configuration mode, a connection key required for the current network connection is obtained from the Internet of Things server;
[0040] A key string broadcasted by the Internet of Things device after restarting and entering the hotspot network configuration mode is received; the key string is generated by the Internet of Things device when the hotspot network configuration is performed for the first time;
[0041] A decryption string corresponding to the key string is searched, and the searched decryption string is fed back to the Internet of Things device; the decryption string is generated by a user terminal when the hotspot network configuration is performed for the first time by the Internet of Things device;
[0042] After the Internet of Things device verifies the received decryption string and the verification is passed, a UDP service of the Internet of Things device is connected;
[0043] Network information of a target wireless network and the connection key are sent to the Internet of Things device through the UDP service, so as to instruct the Internet of Things device to perform network connection according to the network information and the connection key.
[0044] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, which, when executed by a processor, implements the following steps:
[0045] After entering the hotspot network configuration mode, a connection key required for the current network connection is obtained from the Internet of Things server;
[0046] A key string broadcasted by the Internet of Things device after restarting and entering the hotspot network configuration mode is received; the key string is generated by the Internet of Things device when the hotspot network configuration is performed for the first time;
[0047] A decryption string corresponding to the key string is searched, and the searched decryption string is fed back to the Internet of Things device; the decryption string is generated by a user terminal when the hotspot network configuration is performed for the first time by the Internet of Things device;
[0048] After the Internet of Things device verifies the received decryption string and the verification is passed, a UDP service of the Internet of Things device is connected;
[0049] Network information of a target wireless network and the connection key are sent to the Internet of Things device through the UDP service, so as to instruct the Internet of Things device to perform network connection according to the network information and the connection key.
[0050] The hotspot-assisted networking method, device, user terminal, storage medium and computer program product, by obtaining the connection key required for the current networking from the Internet of Things server after entering the hotspot networking mode, receiving the key string broadcasted by the Internet of Things device after restarting and entering the hotspot networking mode, the key string being generated by the Internet of Things device when performing the hotspot networking for the first time, then searching for the decryption string corresponding to the key string and feeding back the decryption string found to the Internet of Things device, the decryption string being generated by the user terminal when the Internet of Things device performs the hotspot networking for the first time, after the Internet of Things device verifies the received decryption string and the verification is passed, connecting the UDP service of the Internet of Things device and sending the network information of the target wireless network and the connection key to the Internet of Things device through the UDP service to instruct the Internet of Things device to perform network connection according to the network information and the connection key. In this way, after the Internet of Things device performs the networking for the first time, in the case of restarting, the Internet of Things device can perform networking without several network connection switches, simplifying the operation process of the Internet of Things device when restarting and greatly improving the networking efficiency of the Internet of Things device.
[0051] In a sixth aspect, the present application provides a hotspot-assisted networking method, executed by an Internet of Things device, comprising:
[0052] Broadcasting a key string after restarting and entering the hotspot networking mode; the key string being generated by the Internet of Things device when performing the hotspot networking for the first time;
[0053] Receiving the decryption string sent by the user terminal and verifying the received decryption string based on the key string; the decryption string being generated by the user terminal when the Internet of Things device performs the hotspot networking for the first time;
[0054] After the decryption string is verified, establishing a UDP service connection with the user terminal and receiving the network information of the target wireless network and the connection key sent by the user terminal through the UDP service;
[0055] Performing network connection based on the network information and the connection key.
[0056] In one of the embodiments, the method further comprises:
[0057] When the Internet of Things device performs the hotspot networking for the first time, creating a target hotspot and adding a target identification code to the target hotspot, and broadcasting the target hotspot with the target identification code;
[0058] After the user terminal searches for the broadcasted target hotspot, receiving the initial password sent by the user terminal, and after the initial password verification is successful, performing hotspot connection with the user terminal;
[0059] After the hotspot connection is successful, a key string is generated, and the user terminal is instructed to generate a decryption string corresponding to the key string.
[0060] In a seventh aspect, the present application also provides a hotspot-assisted networking device. The device comprises:
[0061] A broadcast module is configured to broadcast a key string after restarting and entering a hotspot network configuration mode; the key string is generated by the IoT device when it performs hotspot network configuration for the first time;
[0062] A verification module is configured to receive a decryption string sent by a user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the IoT device performs hotspot network configuration for the first time;
[0063] A second receiving module is configured to, after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information and a connection key of a target wireless network sent by the user terminal through the UDP service;
[0064] A second connection module is configured to perform network connection based on the network information and the connection key.
[0065] In an eighth aspect, the present application also provides an IoT device. The IoT device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0066] A key string is broadcasted after restarting and entering a hotspot network configuration mode; the key string is generated by the IoT device when it performs hotspot network configuration for the first time;
[0067] A decryption string sent by a user terminal is received, and the received decryption string is verified based on the key string; the decryption string is generated by the user terminal when the IoT device performs hotspot network configuration for the first time;
[0068] After the decryption string is verified, a UDP service connection is established with the user terminal, and network information and a connection key of a target wireless network sent by the user terminal are received through the UDP service;
[0069] Network connection is performed based on the network information and the connection key.
[0070] In a ninth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0071] broadcast a key string after restarting and entering the hotspot network configuration mode; the key string is obtained by the Internet of Things device when the Internet of Things device performs the hotspot network configuration for the first time;
[0072] receive a decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time;
[0073] after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information and a connection key of a target wireless network sent by the user terminal through the UDP service;
[0074] perform network connection based on the network information and the connection key.
[0075] In a tenth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:
[0076] broadcast a key string after restarting and entering the hotspot network configuration mode; the key string is obtained by the Internet of Things device when the Internet of Things device performs the hotspot network configuration for the first time;
[0077] receive a decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time;
[0078] after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information and a connection key of a target wireless network sent by the user terminal through the UDP service;
[0079] perform network connection based on the network information and the connection key.
[0080] The hotspot-assisted network connection method, device, Internet of Things device, storage medium and computer program product described above broadcast a key string after restarting and entering the hotspot network configuration mode, the key string is obtained by the Internet of Things device when the Internet of Things device performs the hotspot network configuration for the first time, then receive a decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time, after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information and a connection key of a target wireless network sent by the user terminal through the UDP service, and then perform network connection based on the network information and the connection key. In this way, after the Internet of Things device performs network configuration for the first time, the Internet of Things device can perform network connection without several network connection switches in the case of restarting, which simplifies the operation process of the Internet of Things device when restarting and greatly improves the network connection efficiency of the Internet of Things device. Attached Figure Description
[0081] Figure 1 This is an application environment diagram of the hotspot-assisted networking method in one embodiment;
[0082] Figure 2 This is a flowchart illustrating a hotspot-assisted network connection method applied to a user terminal in one embodiment.
[0083] Figure 3 This is a flowchart illustrating a hotspot-assisted networking method applied to IoT devices in one embodiment;
[0084] Figure 4 This is a flowchart illustrating a hotspot-assisted networking method in another embodiment;
[0085] Figure 5 This is a structural block diagram of a hotspot-assisted networking device in one embodiment;
[0086] Figure 6 This is a structural block diagram of a hotspot-assisted networking device in another embodiment;
[0087] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0088] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0089] It should be noted that the terms "comprising," "including," "having," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusion. For example, a process, method, product, or apparatus that includes a series of steps or means is not necessarily limited to the steps that are clearly listed, but may also include other steps or means that are not clearly listed or that are inherent to such process, method, product, or apparatus. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items.
[0090] Furthermore, the terms "first," "second," etc., used in this application are for naming purposes to distinguish similar objects, but these objects themselves are not limited by these terms. It should be understood that these terms may be used interchangeably where appropriate without departing from the scope of this application. For example, a "first connecting module" may be described as a "second connecting module," and similarly, a "second connecting module" may be described as a "first connecting module."
[0091] The hotspot assisted networking method provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 The user terminal 102 communicates with the Internet of Things server 104 through a network. The data storage system can store data required to be processed by the Internet of Things server 104. The data storage system can be integrated on the Internet of Things server 104, or placed on a cloud or other network server. After the user terminal 102 enters the hotspot networking mode, the user terminal 102 obtains the connection key required for the current networking from the Internet of Things server 104, receives the key string broadcasted by the Internet of Things device 106 after the Internet of Things device 106 restarts and enters the hotspot networking mode, and then finds the decryption string corresponding to the key string, and feeds back the found decryption string to the Internet of Things device 106. The decryption string is generated by the user terminal 102 when the Internet of Things device 106 first performs hotspot networking. After the Internet of Things device 106 verifies the received decryption string and passes the verification, the user terminal 102 connects the UDP service of the Internet of Things device 106, and sends the network information of the target wireless network and the connection key to the Internet of Things device 106 through the UDP service, to instruct the Internet of Things device 106 to perform network connection according to the network information and the connection key. The user terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The Internet of Things server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0092] In one embodiment, as shown in Figure 2 A hotspot assisted networking method is provided. The method is applied to the user terminal in Figure 1 for example, and includes the following steps:
[0093] Step 202, after entering the hotspot networking mode, obtaining the connection key required for the current networking from the Internet of Things server.
[0094] Specifically, the user terminal is configured with an application program corresponding to the Internet of Things device. The user can make the user terminal enter the hotspot networking mode through the application program. Then, the user terminal sends a request to the Internet of Things server after entering the hotspot networking mode, and the Internet of Things server allocates a connection key required for the current networking to the user terminal. It should be noted that the Internet of Things server needs to allocate a connection key to the user terminal again each time the Internet of Things device connects to the Internet of Things server, and the user terminal sends the connection key required for the current networking to the Internet of Things device.
[0095] At step 204, the key string broadcasted by the IoT device after restarting and entering the hotspot network configuration mode is received; the key string is generated by the IoT device when the IoT device performs the hotspot network configuration for the first time.
[0096] It should be noted that when the IoT device performs the hotspot network configuration for the first time, the user terminal needs to be connected to the hotspot created by the IoT device, after the connection is successful, the IoT device generates a key string, and the user terminal generates a decryption string corresponding to the key string generated by the IoT device.
[0097] Specifically, after the IoT device performs the hotspot network configuration for the first time, in the case of restarting, after entering the hotspot network configuration mode, the IoT device broadcasts the key string generated when the IoT device performs the hotspot network configuration for the first time, and the user terminal receives the key string broadcasted by the IoT device after restarting and entering the hotspot network configuration mode.
[0098] At step 206, the decryption string corresponding to the key string is found, and the found decryption string is fed back to the IoT device; the decryption string is generated by the user terminal when the IoT device performs the hotspot network configuration for the first time.
[0099] Specifically, after the user terminal receives the key string broadcasted by the IoT device, the user terminal locally finds the decryption string corresponding to the received key string, and feeds back the found decryption string corresponding to the received key string to the IoT device. The decryption string found by the user terminal locally is generated by the user terminal when the IoT device performs the hotspot network configuration for the first time.
[0100] At step 208, after the IoT device verifies the received decryption string and the verification is passed, the UDP service of the IoT device is connected.
[0101] Specifically, after the user terminal feeds back the found decryption string to the IoT device, the IoT device receives the decryption string fed back by the user terminal, and verifies the received decryption string, if the verification is passed, the user terminal connects the UDP service of the IoT device as a UDP (User Datagram Protocol, User Datagram Protocol) client.
[0102] At step 210, the network information of the target wireless network and the connection key are sent to the IoT device through the UDP service, to instruct the IoT device to perform network connection according to the network information and the connection key.
[0103] The target wireless network is a wireless network available for the IoT device to connect. The network information of the target wireless network includes a service set identifier (Service Set Identifier, SSID) and a password of the target wireless network.
[0104] Specifically, after the user terminal connects the UDP service of the Internet of Things device, the user terminal sends the network information of the target wireless network and the connection key required for the current network connection to the Internet of Things device through the UDP service. After the Internet of Things device receives the network information of the target wireless network and the connection key required for the current network connection sent by the user terminal, the Internet of Things device performs wireless network connection with the target wireless network by using the received network information of the target wireless network, and then reports the connection key to the Internet of Things server through the wireless network, thereby completing the network connection.
[0105] The hotspot-assisted network connection method described above acquires the connection key required for the current network connection from the Internet of Things server after entering the hotspot network configuration mode, receives the key string broadcasted by the Internet of Things device after restarting and entering the hotspot network configuration mode, the key string is generated by the Internet of Things device when it performs the hotspot network configuration for the first time, then finds the decryption string corresponding to the key string, and feeds back the found decryption string to the Internet of Things device, the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time, after the Internet of Things device verifies the received decryption string and the verification is passed, the UDP service of the Internet of Things device is connected, and the network information of the target wireless network and the connection key are sent to the Internet of Things device through the UDP service to instruct the Internet of Things device to perform network connection according to the network information and the connection key. In this way, after the Internet of Things device performs the network configuration for the first time, it can perform network connection without several network connection switches in the case of restarting, which simplifies the operation process of the Internet of Things device when it restarts and performs network connection, and greatly improves the network connection efficiency of the Internet of Things device.
[0106] In one of the embodiments, the hotspot-assisted network connection method further includes: searching for a target hotspot broadcasted by the Internet of Things device when the Internet of Things device performs the hotspot network configuration for the first time; displaying the target hotspot after the target hotspot is searched; acquiring an initial password of the target hotspot, and performing hotspot connection with the Internet of Things device based on the initial password; after the hotspot connection is successful, instructing the Internet of Things device to generate a key string, and generating a decryption string corresponding to the key string locally.
[0107] The target hotspot is a hotspot created by the Internet of Things device when it performs the hotspot network configuration for the first time.
[0108] Specifically, when the Internet of Things device first performs hotspot configuration and networking, the user terminal and the Internet of Things device are both caused to enter a hotspot configuration and networking mode. After the Internet of Things device enters the hotspot configuration and networking mode, the Internet of Things device creates a target hotspot and broadcasts the target hotspot. After the user terminal enters the hotspot configuration and networking mode, the user terminal performs hotspot searching, and when the target hotspot broadcast by the Internet of Things device is found, the target hotspot is displayed. Then, the user inputs an initial password of the target hotspot through the user terminal, and the user terminal performs hotspot connection with the Internet of Things device based on the initial password input by the user. After the user terminal and the target hotspot of the Internet of Things device successfully connect, the Internet of Things device generates a key string, and the user terminal locally generates a decryption string corresponding to the key string.
[0109] It should be noted that the user can obtain the initial password of the target hotspot broadcast by the Internet of Things device from a product manual of the Internet of Things device, or can obtain the initial password of the target hotspot from the body of the Internet of Things device, and the embodiments of the present application do not limit this. Moreover, after the user terminal and the target hotspot of the Internet of Things device successfully connect, the user can change the name and the initial password of the target hotspot created by the Internet of Things device through the user terminal, and the key string and the decryption string generated based on the target hotspot after the name and the initial password are changed will also be changed synchronously.
[0110] In the embodiments, the user terminal searches for the target hotspot broadcast by the Internet of Things device when the Internet of Things device first performs hotspot configuration and networking, displays the target hotspot after the target hotspot is found, then obtains the initial password of the target hotspot, and performs hotspot connection with the Internet of Things device based on the initial password, instructs the Internet of Things device to generate a key string after the hotspot connection is successful, and locally generates a decryption string corresponding to the key string. In this way, after the Internet of Things device first performs configuration and networking, the user terminal can directly perform connection with the Internet of Things device by using the corresponding key string and decryption string in the case of restarting, without the need to switch the network multiple times, thereby simplifying the operation process of the Internet of Things device when performing networking after restarting.
[0111] In one of the embodiments, a database model is preconfigured in the user terminal, and when the Internet of Things device first performs hotspot configuration and networking, searching for the target hotspot broadcast by the Internet of Things device includes: after entering the hotspot configuration and networking mode, performing hotspot searching to obtain multiple hotspots; performing identification code identification on information carried in each hotspot according to the preconfigured database model; and if a target identification code is identified to exist, taking the hotspot corresponding to the target identification code as the target hotspot broadcast by the Internet of Things device.
[0112] The target identification code is an identification code consistent with the logic of the database model.
[0113] Specifically, a database model is pre-configured in the user terminal. When the Internet of Things device first performs hotspot network configuration, the Internet of Things device creates a target hotspot after entering a hotspot network configuration mode, adds a target identification code to the target hotspot, and then broadcasts the target hotspot with the added target identification code. After the user terminal enters the hotspot network configuration mode, the user terminal can obtain multiple hotspots through hotspot search. At this time, the user terminal identifies the information carried in each hotspot according to the pre-configured database model, and when the target identification code that is consistent with the logic of the database model is identified, it is determined that the hotspot carrying the target identification code is the target hotspot created and broadcasted by the Internet of Things device, and the target hotspot is displayed.
[0114] In the embodiment, a database model is pre-configured in the user terminal. After entering the hotspot network configuration mode, the user terminal obtains multiple hotspots through hotspot search, and then identifies the information carried in each hotspot according to the pre-configured database model. If the target identification code is identified, the hotspot corresponding to the target identification code is taken as the target hotspot broadcasted by the Internet of Things device. In this way, when the Internet of Things device first performs network configuration, the user terminal can filter out other hotspot networks according to the identification code, and then directly search for the target hotspot created by the Internet of Things device.
[0115] In one of the embodiments, after the network information of the target wireless network and the connection key are sent to the Internet of Things device through the UDP service, the hotspot-assisted network connection method further includes: if the device information and the network configuration protocol version number replied by the Internet of Things device are received within a preset time period, it is determined that the network connection is successful, otherwise the network information and the connection key are sent to the Internet of Things device again; if the number of repeated sending reaches a preset number and the device information and the network configuration protocol version number replied by the Internet of Things device are not received, it is determined that the network connection fails.
[0116] Specifically, after the user terminal sends the network information of the target wireless network and the connection key to the Internet of Things device through the UDP service, the user terminal waits for the device information and the network configuration protocol version number replied by the Internet of Things device. If the device information and the network configuration protocol version number replied by the Internet of Things device are received by the user terminal within a preset time, it is determined that the Internet of Things device successfully performs wireless network connection with the target wireless network, and the connection key is reported to the Internet of Things server through the wireless network, and the network connection with the Internet of Things server is successful. If the reply of the Internet of Things device is not received by the user terminal within the preset time, the network information of the target wireless network and the connection key are sent to the Internet of Things device again. When the user terminal repeatedly sends the network information of the target wireless network and the connection key to the Internet of Things device reaches a preset number, and the device information and the network configuration protocol version number replied by the Internet of Things device are not received, it is determined that the Internet of Things device fails to connect to the network.
[0117] In the embodiment, if the device information and the network configuration protocol version number replied by the IoT device are received within the preset time period, it is determined that the network connection is successful, otherwise, the network information and the connection key are sent to the IoT device again, and if the number of repeated sending reaches the preset number and the device information and the network configuration protocol version number replied by the IoT device are not received, it is determined that the network connection fails. In this way, the user terminal can send the network information and the connection key to the IoT device for multiple times within the preset condition, thereby improving the possibility of successful network connection of the IoT device.
[0118] In one of the embodiments, the hotspot-assisted network configuration method further includes: if the device information and the network configuration protocol version number replied by the IoT device are received, automatically connecting to the target wireless network; and polling in the IoT server according to the device information and the connection key of the IoT device to confirm the network connection result of the IoT device.
[0119] Specifically, after the user terminal receives the device information and the network configuration protocol version number replied by the IoT device, the user terminal automatically connects to the target wireless network, polls in the IoT server according to the device information and the connection key of the IoT device to confirm the network connection result of the IoT device, and prompts the network connection success and ends the network connection if the network connection is successful.
[0120] In the embodiment, if the device information and the network configuration protocol version number replied by the IoT device are received, the user terminal automatically connects to the target wireless network, and polls in the IoT server according to the device information and the connection key of the IoT device to confirm the network connection result of the IoT device. In this way, the user terminal can determine whether the IoT device is successfully connected to the network according to the network connection result of the IoT device obtained by polling.
[0121] In one of the embodiments, as shown in Figure 3 , the application also provides a Bluetooth-assisted network configuration method. The Bluetooth-assisted network configuration method is applied to the IoT device in Figure 1 , and includes the following steps.
[0122] Step 302: broadcasting a key string after restarting and entering the hotspot network configuration mode; the key string is generated when the IoT device performs the hotspot network configuration for the first time.
[0123] Specifically, after the IoT device performs the hotspot network configuration for the first time, the IoT device broadcasts the key string generated when the IoT device performs the hotspot network configuration for the first time in the case of restarting and entering the hotspot network configuration mode.
[0124] Step 304: receiving a decryption string sent by the user terminal, and verifying the received decryption string based on the key string; the decryption string is generated by the user terminal when the IoT device performs the hotspot network configuration for the first time.
[0125] Specifically, after entering the hotspot network configuration mode, the user terminal receives the key string broadcasted by the Internet of Things device after restarting and entering the hotspot network configuration mode, and locally searches for a decryption string corresponding to the received key string, and then feeds back the searched decryption string corresponding to the received key string to the Internet of Things device. After receiving the decryption string fed back by the user terminal, the Internet of Things device verifies the received decryption string.
[0126] Step 306, after the decryption string is verified, a UDP service connection is established with the user terminal, and the network information of the target wireless network and the connection key sent by the user terminal are received through the UDP service.
[0127] Specifically, after the decryption string is verified, the Internet of Things device establishes a UDP service connection with the user terminal as a UDP client. After the user terminal connects the UDP service of the Internet of Things device, the network information of the target wireless network and the connection key required for this network connection are sent to the Internet of Things device through the UDP service, and the network information of the target wireless network and the connection key required for this network connection sent by the user terminal are received by the Internet of Things device.
[0128] Step 308, network connection based on network information and connection key.
[0129] Specifically, after receiving the network information of the target wireless network and the connection key required for this network connection sent by the user terminal, the Internet of Things device performs wireless network connection with the target wireless network using the received network information of the target wireless network, and then reports the connection key to the Internet of Things server through the wireless network, thereby completing the network connection.
[0130] The above-mentioned hotspot-assisted network connection method broadcasts a key string after restarting and entering the hotspot network configuration mode, the key string is generated by the Internet of Things device when it performs hotspot network configuration for the first time, receives a decryption string sent by the user terminal, and verifies the received decryption string based on the key string. The decryption string is generated by the user terminal when the Internet of Things device performs hotspot network configuration for the first time. After the decryption string is verified, a UDP service connection is established with the user terminal, and the network information of the target wireless network and the connection key sent by the user terminal are received through the UDP service, and then network connection is performed based on the network information and the connection key. In this way, after the first network configuration, the Internet of Things device can perform network connection without several network connection switches in the case of restarting, simplifying the operation process of the Internet of Things device when restarting.
[0131] In one of the embodiments, the hotspot-assisted networking method further comprises: when the IoT device first performs hotspot configuration networking, creating a target hotspot, adding a target identification code to the target hotspot, and broadcasting the target hotspot with the target identification code; after the user terminal searches the broadcasted target hotspot, receiving an initial password sent by the user terminal, and connecting to the user terminal after the initial password is verified successfully; after the hotspot connection is successful, generating a key string, and instructing the user terminal to generate a decryption string corresponding to the key string.
[0132] Specifically, when the IoT device first performs hotspot configuration networking, the IoT device creates a target hotspot after entering a hotspot configuration networking mode, adds a target identification code to the target hotspot, and then broadcasts the target hotspot with the target identification code. After the user terminal enters a hotspot configuration networking mode, the user terminal searches for hotspots, and identifies the information carried in the searched hotspots according to a database model pre-configured in the user terminal, and then searches for the target hotspot with the target identification code. The user terminal displays the target hotspot and obtains an initial password corresponding to the target hotspot input by a user, and then the user terminal sends the initial password input by the user to the IoT device. After the IoT device receives the initial password sent by the user terminal, the IoT device verifies the initial password sent by the user terminal, and connects to the user terminal after the initial password is verified successfully. After the hotspot connection is successful, the IoT device generates a key string, and instructs the user terminal to generate a decryption string corresponding to the key string.
[0133] In this embodiment, the IoT device creates a target hotspot when first performing hotspot configuration networking, adds a target identification code to the target hotspot, and then broadcasts the target hotspot with the target identification code. After the user terminal searches the broadcasted target hotspot, the IoT device receives an initial password sent by the user terminal, connects to the user terminal after the initial password is verified successfully, and generates a key string after the hotspot connection is successful, and instructs the user terminal to generate a decryption string corresponding to the key string. In this way, when the IoT device first performs configuration networking, the user terminal can filter out other hotspot networks according to the identification code, and then can directly search for the target hotspot created by the IoT device. Moreover, after the IoT device first performs configuration networking, in the case of needing to restart, the user terminal can directly connect to the IoT device using the corresponding key string and decryption string, without the need to switch networks multiple times, thereby simplifying the operation process of the IoT device when performing networking after restarting.
[0134] Reference will be made to the following Figure 4 In one of the embodiments, the hotspot-assisted networking method further comprises: when the IoT device first performs hotspot configuration networking, creating a target hotspot, adding a target identification code to the target hotspot, and broadcasting the target hotspot with the target identification code; after the user terminal searches the broadcasted target hotspot, receiving an initial password sent by the user terminal, and connecting to the user terminal after the initial password is verified successfully; after the hotspot connection is successful, generating a key string, and instructing the user terminal to generate a decryption string corresponding to the key string.
[0135] When the Internet of Things device performs hotspot configuration for the first time, the user terminal enters the hotspot configuration mode, and in the state of connecting with the target wireless network, obtains the connection token of the current configuration from the Internet of Things server. The validity period of the connection token of the current configuration is 10 minutes, and the configuration will be invalid after being successfully configured. The Internet of Things device needs to obtain the connection token again when connecting with the Internet of Things server again.
[0136] The Internet of Things device to be configured enters the hotspot configuration mode, and the indicator light of the Internet of Things device slowly flashes to indicate that the Internet of Things device enters the hotspot configuration mode successfully. After the Internet of Things device enters the hotspot configuration mode, the UDP service is started and the target AP hotspot (Access Point) is created, and the target identification code is added to the target AP hotspot, and then the target AP hotspot with the target identification code is broadcasted. The user terminal can obtain multiple hotspots after entering the hotspot configuration mode and searching for hotspots, and at this time, the user terminal identifies the information carried in each hotspot according to the pre-configured database model, and when the target identification code corresponding to the logic of the database model is identified, it is determined that the hotspot carrying the target identification code is the target AP hotspot created and broadcasted by the Internet of Things device, and the target AP hotspot is displayed. Then the user inputs the initial password of the target AP hotspot through the user terminal, and then the user terminal connects with the Internet of Things device based on the initial password input by the user.
[0137] After the user terminal successfully connects with the target AP hotspot of the Internet of Things device, the user terminal connects with the UDP service of the Internet of Things device as a UDP client, and the Internet of Things device generates a key string, and the user terminal locally generates a decryption string corresponding to the key string. In addition, the user can also change the name and initial password of the target AP hotspot created by the Internet of Things device through the user terminal, and the key string and decryption string generated based on the target AP hotspot after the name and initial password are changed will also be changed synchronously.
[0138] Next, the user terminal acquires the network information of the target wireless network, and sends the network information of the target wireless network and the connection key of the current network configuration to the IoT device through the UDP service. After the sending is completed, the user terminal waits for the IoT device to reply with the device information and the network configuration protocol version number. The UDP service of the IoT device listens to the local port 1886 (the default IP is 192.168.4.1). If the user terminal does not receive the reply from the IoT device within a preset time (for example, 2 seconds), the user terminal sends the network information of the target wireless network and the connection key of the current network configuration again. If the number of repeated sending reaches a preset number (for example, 10 times), it is determined that the network configuration of the IoT device fails, and the network configuration of the IoT device is abnormal. If the user terminal receives the reply from the IoT device, it means that the IoT device receives the network information of the target wireless network and the connection key of the current network configuration. After receiving the network information of the target wireless network and the connection key of the current network configuration, the IoT device switches to the STA mode (Station, similar to a wireless terminal) and performs wireless network connection with the target wireless network through the network information of the target wireless network. Then, the IoT device reports the connection key of the current network configuration to the IoT server through MQTT (Message Queuing Telemetry Transport), and activates the device in the IoT server through the connection key of the current network configuration. The IoT device can also obtain the result of reporting the connection key by subscribing to the topic / {productModel} / {deviceId} / register / replay. The IoT server returns the activation result to the IoT device and records the device information of the IoT device. If the IoT device receives the activation success activation result returned by the IoT server, the indicator light of the IoT device is always on.
[0139] After the user terminal receives the reply from the IoT device, the user terminal automatically connects to the target wireless network, and polls the IoT server through the target wireless network according to the device information of the IoT device and the connection key of the current network configuration to confirm the activation result of the IoT device. If the activation is successful, the user terminal prompts the network configuration result and ends the first network configuration.
[0140] When the Internet of Things device is restarted, the user terminal and the Internet of Things device are both put into a hotspot network configuration mode. After the user terminal enters the hotspot network configuration mode, the user terminal sends a request to the Internet of Things server, and the Internet of Things server allocates a connection key required for the current network connection to the user terminal. After the Internet of Things device enters the hotspot network configuration mode, the Internet of Things device broadcasts a key string generated when the Internet of Things device performs the hotspot network configuration for the first time. After the user terminal receives the key string broadcast by the Internet of Things device, the user terminal locally searches for a decryption string corresponding to the received key string, and then feeds back the searched decryption string corresponding to the received key string to the Internet of Things device. After the Internet of Things device receives the decryption string fed back by the user terminal, the Internet of Things device verifies the received decryption string, and establishes a UDP service connection with the user terminal as a UDP client after the decryption string passes the verification.
[0141] After the user terminal connects the UDP service of the Internet of Things device, the user terminal sends network information of a target wireless network and a connection key required for the current network connection to the Internet of Things device through the UDP service, and waits for a reply of device information and a network configuration protocol version number from the Internet of Things device after the sending is completed. The UDP service of the Internet of Things device listens to a local port. If the user terminal does not receive the reply from the Internet of Things device within a preset time (for example, 2 seconds), the user terminal sends the network information of the target wireless network and the connection key required for the current network connection again. If the number of repeated sending reaches a preset number (for example, 10 times), it is determined that the Internet of Things device fails to connect to the network, and the Internet of Things device is abnormal. If the user terminal receives the reply from the Internet of Things device, it is indicated that the Internet of Things device receives the network information of the target wireless network and the connection key required for the current network connection. After the Internet of Things device receives the network information of the target wireless network and the connection key required for the current network connection, the Internet of Things device switches to a STA mode (Station, similar to a wireless terminal) and performs wireless network connection with the target wireless network through the network information of the target wireless network. Then, the Internet of Things device reports the connection key required for the current network connection to the Internet of Things server through MQTT, and performs network connection in the Internet of Things server through the connection key required for the current network connection. The Internet of Things device can also obtain the reporting result of the connection key by subscribing to a topic / {productModel} / {deviceId} / register / replay. The Internet of Things server returns the network connection result to the Internet of Things device. If the Internet of Things device receives the network connection success result returned by the Internet of Things server, an indicator light of the Internet of Things device is always on.
[0142] After the user terminal receives the reply from the Internet of Things device, the user terminal automatically connects to the target wireless network, and polls in the Internet of Things server according to the device information of the Internet of Things device and the connection key required for the current network connection through the target wireless network, to confirm the network connection result of the Internet of Things device. If the network connection is successful, the user terminal prompts the network connection result and ends the current network connection.
[0143] The hotspot-assisted networking method, the user terminal obtains the connection key required for the current networking from the Internet of Things server after entering the hotspot networking mode, the Internet of Things device broadcasts a key string after restarting and entering the hotspot networking mode, and the key string is generated by the Internet of Things device when performing the hotspot networking for the first time. After the user terminal receives the key string broadcast by the Internet of Things device, the user terminal finds a decryption string corresponding to the key string and feeds back the found decryption string to the Internet of Things device. The Internet of Things device receives the decryption string sent by the user terminal and verifies the received decryption string based on the key string. After verification, the user terminal connects the UDP service of the Internet of Things device and sends the network information of the target wireless network and the connection key to the Internet of Things device through the UDP service. The Internet of Things device receives the network information of the target wireless network and the connection key sent by the user terminal through the UDP service, and then performs network connection based on the network information and the connection key. In this way, after the first networking, the Internet of Things device can perform networking without several network connection switches in the case of restarting, and the operation process of the Internet of Things device for networking when restarting is simplified.
[0144] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0145] Based on the same inventive concept, in one embodiment, as shown in Figure 5 The embodiment of the present application also provides a hotspot-assisted networking device 500, which comprises an acquisition module 501, a first receiving module 502, a feedback module 503, a first connection module 504 and a sending module 505, wherein:
[0146] The acquisition module is used for acquiring a connection key required for the current networking from an Internet of Things server after entering a hotspot networking mode.
[0147] The first receiving module is used for receiving a key string broadcast by an Internet of Things device after restarting and entering a hotspot networking mode, and the key string is generated by the Internet of Things device when performing the hotspot networking for the first time.
[0148] The feedback module is configured to find a decryption string corresponding to the key string and feed back the found decryption string to the Internet of Things device; the decryption string is generated by the user terminal when the Internet of Things device performs hotspot network configuration for the first time.
[0149] The first connection module is configured to connect the UDP service of the Internet of Things device after the Internet of Things device verifies the received decryption string and the verification is passed.
[0150] The sending module is configured to send network information of a target wireless network and a connection key to the Internet of Things device through the UDP service, so as to instruct the Internet of Things device to perform network connection according to the network information and the connection key.
[0151] In one of the embodiments, the hotspot-assisted network connection device further includes a searching module configured to search for a target hotspot broadcasted by the Internet of Things device when the Internet of Things device performs hotspot network configuration for the first time; and display the target hotspot after the target hotspot is searched. The obtaining module is further configured to obtain an initial password of the target hotspot, and the first connection module is further configured to perform hotspot connection with the Internet of Things device based on the initial password; and instruct the Internet of Things device to generate a key string and generate a decryption string corresponding to the key string locally after the hotspot connection is successful.
[0152] In one of the embodiments, a database model is preconfigured in the user terminal, and the searching module is further configured to perform hotspot search to obtain a plurality of hotspots after entering the hotspot network configuration mode; identify an identification code carried in each hotspot according to the preconfigured database model; and if the target identification code is identified, the hotspot corresponding to the target identification code is taken as the target hotspot broadcasted by the Internet of Things device.
[0153] In one of the embodiments, the hotspot-assisted network connection device further includes a determining module configured to determine that the network connection is successful if the device information and the network configuration protocol version number replied by the Internet of Things device are received within a preset time period, otherwise, the network information and the connection key are sent to the Internet of Things device again; and determine that the network connection fails if the number of repeated sending reaches a preset number and the device information and the network configuration protocol version number replied by the Internet of Things device are not received.
[0154] In one of the embodiments, the determining module is further configured to automatically connect to the target wireless network if the device information and the network configuration protocol version number replied by the Internet of Things device are received; and poll in the Internet of Things server through the device information of the Internet of Things device and the connection key, to confirm the network connection result of the Internet of Things device.
[0155] Based on the same inventive concept, in one of the embodiments, as Figure 6As shown, the embodiment of the present application further provides a hotspot auxiliary networking device 600, comprising a broadcast module 601, a verification module 602, a second receiving module 603 and a second connection module 604, wherein:
[0156] The broadcast module is configured to broadcast a key string after being restarted and entering the hotspot network configuration mode; the key string is generated by the Internet of Things device when it performs the hotspot network configuration for the first time.
[0157] The verification module is configured to receive a decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time.
[0158] The second receiving module is configured to, after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information of a target wireless network and a connection key sent by the user terminal through the UDP service.
[0159] The second connection module is configured to perform network connection based on the network information and the connection key.
[0160] In one of the embodiments, the above-mentioned hotspot auxiliary networking device further comprises a creation module, which is configured to create a target hotspot when the Internet of Things device performs the hotspot network configuration for the first time, add a target identification code to the target hotspot, and broadcast the target hotspot with the added target identification code; the second receiving module is further configured to receive an initial password sent by the user terminal after the user terminal searches for the broadcasted target hotspot, and the second connection module is further configured to perform hotspot connection with the user terminal after the initial password is verified successfully; after the hotspot connection is successful, a key string is generated, and the user terminal is instructed to generate a decryption string corresponding to the key string.
[0161] The above-mentioned modules in the hotspot auxiliary networking device can be all or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform the operations corresponding to the above-mentioned modules.
[0162] In one embodiment, a computer device is provided, which can be a user terminal or an Internet of Things device, and an internal structure diagram thereof can be as shown in Figure 7The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement a hotspot-assisted networking method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0163] Those skilled in the art can understand that, Figure 7 The skilled in the art can understand that,
[0164] In one embodiment, a user terminal is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps: after entering a hotspot network configuration mode, obtaining a connection key required for this time networking from an Internet of Things server; receiving a key string broadcasted by an Internet of Things device after restarting and entering the hotspot network configuration mode; the key string is obtained by the Internet of Things device when performing the hotspot network configuration for the first time; finding a decryption string corresponding to the key string, and feeding back the found decryption string to the Internet of Things device; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time; after the Internet of Things device verifies the received decryption string and the verification is passed, connecting the UDP service of the Internet of Things device; sending the network information of a target wireless network and the connection key to the Internet of Things device through the UDP service, to instruct the Internet of Things device to perform network connection according to the network information and the connection key.
[0165] In one embodiment, the processor, when executing the computer program, further implements the following steps: searching for a target hotspot broadcasted by the IoT device when the IoT device first performs hotspot configuration; displaying the target hotspot after searching for the target hotspot; obtaining an initial password of the target hotspot, and performing hotspot connection with the IoT device based on the initial password; instructing the IoT device to generate a key string after the hotspot connection is successful, and generating a decryption string corresponding to the key string locally.
[0166] In one embodiment, the database model is pre-configured in the user terminal, and the processor, when executing the computer program, further implements the following steps: searching for a plurality of hotspots after entering the hotspot configuration mode; identifying the information carried in each hotspot according to the pre-configured database model; and if a target identification code is identified, taking the hotspot corresponding to the target identification code as the target hotspot broadcasted by the IoT device.
[0167] In one embodiment, the processor, when executing the computer program, further implements the following steps: if the device information and the configuration protocol version number replied by the IoT device are received within a preset time period, determining that the network connection is successful, otherwise, sending the network information and the connection key to the IoT device again; if the number of repeated sending reaches a preset number, and the device information and the configuration protocol version number replied by the IoT device are not received, determining that the network connection fails.
[0168] In one embodiment, the processor, when executing the computer program, further implements the following steps: if the device information and the configuration protocol version number replied by the IoT device are received, automatically connecting to the target wireless network; polling in the IoT server through the device information and the connection key of the IoT device to confirm the networking result of the IoT device.
[0169] In another embodiment, based on the same inventive concept, an IoT device is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor, when executing the computer program, implements the following steps: broadcasting a key string after restarting and entering a hotspot configuration mode; the key string is generated when the IoT device first performs hotspot configuration; receiving a decryption string sent by a user terminal, and verifying the received decryption string based on the key string; the decryption string is generated by the user terminal when the IoT device first performs hotspot configuration; after the decryption string passes the verification, establishing a UDP service connection with the user terminal, and receiving network information and a connection key of a target wireless network sent by the user terminal through the UDP service; and performing network connection based on the network information and the connection key.
[0170] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the Internet of Things device first performs hotspot configuration and networking, a target hotspot is created, a target identification code is added to the target hotspot, and the target hotspot with the target identification code is broadcasted; after the user terminal searches for the broadcasted target hotspot, an initial password sent by the user terminal is received, and the user terminal is connected to the hotspot after the initial password is verified successfully; after the hotspot connection is successful, a key string is generated, and the user terminal is instructed to generate a decryption string corresponding to the key string.
[0171] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0172] In one embodiment, a computer program product is provided, and the computer program product includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the country and region.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0175] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0176] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method of hotspot assisted networking, the method comprising: The method is executed by a user terminal, and comprises the following steps: After entering a hotspot network configuration mode, a connection key required for network connection is obtained from an Internet of Things server; A key string broadcasted by an Internet of Things device after restarting and entering a hotspot network configuration mode is received; the key string is generated by the Internet of Things device when the Internet of Things device performs hotspot network configuration for the first time; A decryption string corresponding to the key string is searched, and the searched decryption string is fed back to the Internet of Things device; the decryption string is generated by the user terminal when the Internet of Things device performs hotspot network configuration for the first time; After the Internet of Things device verifies the received decryption string and the verification is passed, a UDP service of the Internet of Things device is connected; Network information of a target wireless network and the connection key are sent to the Internet of Things device through the UDP service, so that the Internet of Things device performs network connection according to the network information and the connection key; The process of generating the key string and the decryption string when performing hotspot network configuration for the first time comprises the following steps: When the Internet of Things device performs hotspot network configuration for the first time, a target hotspot broadcasted by the Internet of Things device is searched; after the target hotspot is searched, the target hotspot is displayed; an initial password of the target hotspot is obtained from a product manual of the Internet of Things device or a body of the Internet of Things device, and hotspot connection is performed with the Internet of Things device based on the initial password; after the hotspot connection is successful, the Internet of Things device is instructed to generate a key string, and a decryption string corresponding to the key string is generated locally; the key string and the decryption string change with the modification of the name and the initial password of the target hotspot.
2. The method of claim 1, wherein, The user terminal is preconfigured with a database model, and the searching of the target hotspot broadcasted by the Internet of Things device when the Internet of Things device performs hotspot network configuration for the first time comprises the following steps: After entering the hotspot network configuration mode, a plurality of hotspots are searched; Information carried in each hotspot is identified according to a preconfigured database model; If a target identification code is identified, the hotspot corresponding to the target identification code is taken as the target hotspot broadcasted by the Internet of Things device.
3. The method of claim 1, wherein, After the network information of the target wireless network and the connection key are sent to the Internet of Things device through the UDP service, the method further comprises the following steps: If the device information and the network configuration protocol version number replied by the Internet of Things device are received within a preset time period, it is determined that the network connection is successful, otherwise, the network information and the connection key are sent to the Internet of Things device again; If the number of repeated sending reaches a preset number, and the device information and the network configuration protocol version number replied by the Internet of Things device are not received, it is determined that the network connection fails.
4. The method of claim 3, wherein, The method further comprises the following steps: If the device information and the network configuration protocol version number replied by the Internet of Things device are received, the target wireless network is connected automatically; The device information of the Internet of Things device and the connection key are used for polling in the Internet of Things server, so as to confirm the network connection result of the Internet of Things device.
5. A method of hotspot assisted networking, the method comprising: The method is executed by an Internet of Things device, and comprises the following steps: A key string is broadcasted after restarting and entering a hotspot network configuration mode; the key string is generated by the Internet of Things device when the Internet of Things device performs hotspot network configuration for the first time; receive the decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs hotspot configuration for the first time; after the decryption string is verified, establish a UDP service connection with the user terminal, and receive the network information and connection key of the target wireless network sent by the user terminal through the UDP service; perform network connection based on the network information and the connection key; wherein the process of generating the key string and the decryption string when performing hotspot configuration for the first time comprises: when performing hotspot configuration for the first time, create a target hotspot, add a target identification code to the target hotspot, and broadcast the target hotspot with the target identification code; after the user terminal searches for the broadcasted target hotspot, receive the initial password sent by the user terminal, the initial password is obtained by the user terminal from the product manual of the Internet of Things device or the body of the Internet of Things device; after the initial password is verified successfully, perform hotspot connection with the user terminal; after the hotspot connection is successful, generate a key string, and instruct the user terminal to generate a decryption string corresponding to the key string; the key string and the decryption string change with the modification of the name of the target hotspot and the initial password by the user terminal.
6. A hot spot assisted networking device, comprising: The apparatus comprises: an acquisition module, configured to acquire a connection key required for network connection from an Internet of Things server after entering a hotspot configuration mode; a first receiving module, configured to receive a key string broadcasted by an Internet of Things device after restarting and entering a hotspot configuration mode; the key string is generated by the Internet of Things device when performing hotspot configuration for the first time; a feedback module, configured to find a decryption string corresponding to the key string, and feed back the found decryption string to the Internet of Things device; the decryption string is generated by a user terminal when the Internet of Things device performs hotspot configuration for the first time; a first connection module, configured to connect a UDP service of the Internet of Things device after the Internet of Things device verifies the received decryption string and the verification is passed; a sending module, configured to send network information of a target wireless network and the connection key to the Internet of Things device through the UDP service, to instruct the Internet of Things device to perform network connection according to the network information and the connection key; wherein the process of generating the key string and the decryption string when performing hotspot configuration for the first time comprises: when the Internet of Things device performs hotspot configuration for the first time, search for a target hotspot broadcasted by the Internet of Things device; after searching for the target hotspot, display the target hotspot; obtain an initial password of the target hotspot from a product manual of the Internet of Things device or a body of the Internet of Things device, and perform hotspot connection with the Internet of Things device based on the initial password; after the hotspot connection is successful, instruct the Internet of Things device to generate a key string, and generate a decryption string corresponding to the key string locally; the key string and the decryption string change with the modification of the name of the target hotspot and the initial password.
7. A hot spot assisted networking device, comprising: The apparatus comprises: The broadcast module is configured to broadcast a key string after being restarted and entering the hotspot network configuration mode; the key string is generated by the Internet of Things device when the Internet of Things device performs the hotspot network configuration for the first time; The verification module is configured to receive a decryption string sent by the user terminal, and verify the received decryption string based on the key string; the decryption string is generated by the user terminal when the Internet of Things device performs the hotspot network configuration for the first time; The second receiving module is configured to, after the decryption string is verified, establish a UDP service connection with the user terminal, and receive network information of a target wireless network and a connection key sent by the user terminal through the UDP service; The second connection module is configured to perform network connection based on the network information and the connection key; The process of generating the key string and the decryption string when performing the hotspot network configuration for the first time includes: When performing the hotspot network configuration for the first time, a target hotspot is created, a target identification code is added to the target hotspot, and the target hotspot with the target identification code is broadcasted; after the user terminal searches for the broadcasted target hotspot, an initial password sent by the user terminal is received, the initial password is obtained by the user terminal from a product manual of the Internet of Things device or a body of the Internet of Things device; after the initial password is verified successfully, the hotspot connection with the user terminal is performed; after the hotspot connection is successful, the key string is generated, and the user terminal is instructed to generate the decryption string corresponding to the key string; the key string and the decryption string change with modification of a name of the target hotspot and the initial password by the user terminal.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
A method and device for performing a distribution network
CN109257795A