Method and device for network distribution of multiple intelligent devices and electronic device

By using cloud authentication and master device coordination methods in smart device distribution network, the problems of slow distribution network speed and insufficient security in the existing technology are solved, and a fast and secure multi-intelligent device distribution network is achieved.

CN119996346APending Publication Date: 2025-05-13HANGZHOU TUYA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510112770.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is slow in the multi-intelligent device distribution process and cannot guarantee the safety and legality of the equipment, making it difficult to meet the needs of fast and secure distribution networks.

Method used

By scanning the first broadcast packet and the second broadcast packet broadcast by the smart device, the authentication parameters and basic information are extracted, and sent to the cloud for authentication. According to the authentication results, the passed smart device is determined as the target device, and one of the smart devices is selected as the main device, and the distribution network information is sent to other target devices to complete the distribution network.

Benefits of technology

It improves the speed of multi-intelligent equipment distribution network, while ensuring the safety and legality of the equipment, meeting the needs of fast and secure distribution networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996346A_ABST
    Figure CN119996346A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for network distribution of multiple intelligent devices and an electronic device, and relates to the technical field of computer network communication. The method comprises the following steps: scanning a first broadcast packet and a second broadcast packet broadcasted by a plurality of intelligent devices; extracting an authentication parameter of the intelligent device in the second broadcast packet and basic information of the intelligent device in the first broadcast packet, sending the authentication parameter to a cloud to request authentication, and receiving an authentication result generated by the cloud; based on an authentication result generated by the cloud and the basic information of the intelligent device in the first broadcast packet, determining the intelligent device passing the authentication; wherein the intelligent device passing the authentication is defined as a target device; and taking one intelligent device in the target devices as a main device, and sending the network distribution information of the intelligent devices except the main device in the target devices to the main device. According to the method, the security legality of the intelligent equipment is ensured while the network distribution speed of the multiple intelligent equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer network communication technology, and in particular to a method, device and electronic equipment for network configuration of multiple intelligent devices. Background Art

[0002] In the development history of smart devices, the network configuration process has always been the focus of technical attention. The relevant technology is that the application transmits the network configuration information to the smart device through the wireless transmission protocol, and the smart device then activates the cloud connection based on the information. However, this network configuration method has inherent defects. Since the wireless transmission protocol adopts a one-to-one connection mode, when multiple smart devices need to be configured, the network configuration speed will be seriously affected. This is because in this connection mode, only one device's network configuration request can be processed at a time. When the number of devices increases, the network configuration operation will become very slow due to one-by-one processing. Secondly, in actual application scenarios, the network configuration time of smart devices is usually limited to a few minutes. Once this time range is exceeded, that is, this window period is missed, the smart device will not be able to complete the network configuration. This not only brings inconvenience to users, but may also lead to network configuration failure.

[0003] At the same time, under the current technological status, the research and application of network distribution technology for smart devices, although there are continuous new explorations, still face many challenges. On the one hand, the existing network distribution method is difficult to balance the relationship between network distribution speed and device security and legality; on the other hand, in the scenario of large-scale deployment of smart devices, traditional network distribution technology cannot guarantee fast and stable network distribution effects.

[0004] In summary, the performance of existing network distribution technology in multi-intelligent device network distribution cannot meet the market and user needs for fast and safe network distribution, and also limits the further development and application of smart devices in multiple fields such as smart home and smart office. Therefore, there is an urgent need for a network distribution solution that can overcome the above problems, improve the speed of multi-intelligent device network distribution, and ensure the safety and legality of the equipment. Summary of the invention

[0005] Based on this, it is necessary to address the above-mentioned problems. The method, device and electronic device for networking multiple smart devices provided in this application can improve the networking speed of multiple smart devices while ensuring the safety and legality of the smart devices.

[0006] In a first aspect, the present application provides a method for configuring a network for multiple smart devices, the method comprising:

[0007] Scanning a first broadcast packet and a second broadcast packet broadcast by a plurality of smart devices; wherein any smart device broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and a maximum length of the first broadcast packet is greater than a maximum length of the second broadcast packet;

[0008] Extracting the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, sending the authentication parameters to the cloud to request authentication, and receiving the authentication result generated by the cloud;

[0009] Based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet, determining the smart device that has passed the authentication; wherein the smart device that has passed the authentication is defined as the target device;

[0010] One of the smart devices in the target device is used as the main device, and the network configuration information of the smart devices in the target device except the main device is sent to the main device; wherein the main device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud.

[0011] In one of the embodiments, any smart device broadcasts a first broadcast packet and a second broadcast packet via a Bluetooth transmission protocol;

[0012] The first broadcast packet is a BLE broadcast packet, the second broadcast packet is a Beacon broadcast packet, and the length of the information of the smart device carried by the BLE broadcast packet is greater than the length of the information of the smart device carried by the Beacon broadcast packet.

[0013] In one embodiment, one of the smart devices in the target device is used as a master device, including:

[0014] If there is no target device with successful network configuration, the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, and the smart device can connect to the cloud based on the received network configuration information;

[0015] If a command indicating successful connection of the smart device is received from the cloud, the smart device is used as the master device;

[0016] Among them, if there is no target device with successful network configuration at present, the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, including: if there is no target device with successful network configuration at present, the terminal determines the currently saved target device, and sends the network configuration information to the first smart device in the saved target device through the Bluetooth transmission protocol.

[0017] In one embodiment, the authentication parameters include a unique identifier of the smart device, a random number, and a signature, wherein the smart device encrypts the unique identifier and a key of the smart device by using a first encryption algorithm, and determines the signature according to the encryption result.

[0018] In one embodiment, sending authentication parameters to the cloud to request authentication, and receiving an authentication result generated by the cloud, includes:

[0019] If the scanning duration is greater than the duration threshold and / or the number of scanned second broadcast packets is greater than a preset number, the authentication parameters in the scanned second broadcast packets are sent to the cloud to request batch authentication; wherein, for any authentication parameter, the cloud can generate an authentication result based on the pre-stored smart device key and authentication parameters and through a second encryption algorithm, and send the authentication result to the terminal.

[0020] In one embodiment, determining the authenticated smart device based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet includes:

[0021] The basic information includes a unique identifier of the smart device, and the first broadcast packet and the second broadcast packet belonging to the same smart device are bound according to the unique identifier;

[0022] Send the authentication result generated by the cloud to the corresponding smart device, wherein any smart device can generate the authentication result through the second encryption algorithm based on the authentication parameters and its own pre-stored key, and determine whether the authentication result generated by itself is consistent with the authentication result generated by the cloud. If they are consistent, send the target instruction of authentication passing to the terminal;

[0023] Based on the received target instruction, an authenticated smart device is determined.

[0024] In one embodiment, the master device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud, including:

[0025] The main device responds to the network configuration instruction of the terminal and sends the network configuration information to the corresponding target device; wherein any target device receiving the network configuration information can connect to the cloud based on the network configuration information.

[0026] If the target device is connected to the cloud, the cloud sends a connection success instruction to the terminal, wherein the terminal can poll the target devices saved by itself based on the connection success instruction sent by the cloud to determine the remaining target devices to be networked, and send a network configuration instruction to the main device, so that the main device sends network configuration information to the corresponding target device to be networked in response to the network configuration instruction;

[0027] and / or,

[0028] If the target device is not connected to the cloud, the target device broadcasts a network configuration error instruction through a second broadcast packet, and the terminal parses the network configuration error instruction after scanning the second broadcast packet.

[0029] In a second aspect, the present application also provides a device for configuring a network for multiple smart devices, which is applied to a terminal and includes:

[0030] A scanning module, used to scan a first broadcast packet and a second broadcast packet broadcast by a plurality of smart devices; wherein any smart device broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet;

[0031] An extraction module, used to extract the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, send the authentication parameters to the cloud to request authentication, and receive the authentication result generated by the cloud;

[0032] A determination module, used to determine the smart device that has passed the authentication based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet; wherein the smart device that has passed the authentication is defined as the target device;

[0033] The network configuration module takes one of the smart devices in the target device as the main device and sends the network configuration information of the smart devices in the target device except the main device to the main device; wherein the main device can send the corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud.

[0034] In a third aspect, the present application further provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program, and when the computer program is executed by the processor, the method for networking multiple smart devices of the first aspect is implemented.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for networking multiple smart devices in the first aspect.

[0036] The above-mentioned method for configuring a network for multiple smart devices is applied to a terminal; wherein, any smart device broadcasts a first broadcast packet and a second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet; the terminal scans the first broadcast packet and the second broadcast packet broadcasted by multiple smart devices, extracts basic information from the first broadcast packet, extracts authentication parameters from the second broadcast packet and sends the authentication parameters to the cloud for authentication and then receives the authentication result, and the terminal further determines the authenticated smart device, i.e., the target device, based on the authentication result and the basic information, so that each target device to be configured is safe and allowed to be configured; secondly, the terminal sets one of the target devices as the main device and sends the configuration information of the remaining target devices to the main device, and the main device sends the corresponding configuration information to the remaining target devices to complete the configuration of each target device. In this method, the authentication parameters are sent through the second broadcast packet, and the terminal performs access authentication of the smart device through the cloud according to the authentication parameters. After successful authentication, batch network configuration is performed, and then the legitimacy of the smart device access is determined during the scanning of the smart device. When the network configuration starts, an authenticated smart device serves as the main device, and sends network configuration information to other authenticated smart devices for batch network configuration, thereby improving the network configuration speed of multiple smart devices while ensuring the security and legitimacy of the smart devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 An application scenario diagram of network configuration for multiple smart devices in one embodiment;

[0038] Figure 2 A flowchart of a method for configuring a network for multiple smart devices in one embodiment;

[0039] Figure 3 A flowchart of one embodiment of using one of the smart devices in the target device as a master device;

[0040] Figure 4 is a flow chart of a smart device that passes authentication in one embodiment;

[0041] Figure 5 A schematic diagram of binding a BLE broadcast packet and a Beacon broadcast packet belonging to the same smart device based on an authentication result in an embodiment;

[0042] Figure 6 A schematic diagram of selecting a master device and configuring other target devices based on the master device in an embodiment;

[0043] Figure 7 A schematic diagram of network configuration error handling when network configuration of a target device fails in one embodiment;

[0044] Figure 8 A diagram of a device for networking multiple smart devices in one embodiment;

[0045] Fig. 9 FIG. 1 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Unless otherwise defined, the technical terms or scientific terms involved in the present application should have the general meaning understood by people with general skills in the technical field to which the present application belongs. "One", "one", "a kind of", "the", "these" and similar words in the present application do not represent quantitative restrictions, and they can be singular or plural.

[0047] In one embodiment, the application scenario of multiple smart devices networking is as follows: Figure 1 As shown, the application environment includes a terminal 101, multiple smart devices 102 and a cloud 103. Among them, the multiple smart devices 102 include smart device 1, smart device 2, smart device 3...smart device n. A method for configuring a network for multiple smart devices provided in this embodiment is applied to the terminal 101. The terminal 101 can scan the broadcasts sent by multiple smart devices 102 and extract the information in the broadcasts. The terminal 101 sends the authentication parameters in the broadcasts to the cloud 103. The cloud 103 obtains the authentication result by calculation and sends the authentication result to the terminal 101. The terminal 101 determines the authenticated smart device 102 as the target device based on the authentication result. Among them, the terminal 101 can be but is not limited to various personal computers, laptops, smart phones and tablet computers. The cloud 103 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0048] In one embodiment, Figure 2 As shown, a method for configuring a network for multiple smart devices is provided, the method comprising the following steps:

[0049] Step 201: Scanning first broadcast packets and second broadcast packets broadcast by multiple smart devices; wherein any smart device broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet;

[0050] The terminal can scan the first broadcast packet and the second broadcast packet broadcasted by multiple smart devices based on the same wireless communication transmission protocol; wherein, for any smart device, the first broadcast packet and the second broadcast packet can be broadcasted using the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet. It should be noted that there are many common wireless communication transmission protocols, such as Bluetooth communication protocol, Wi-Fi protocol, Zigbee protocol, etc.

[0051] Furthermore, the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet. The first broadcast packet contains basic information of the smart device, such as detailed specifications of the device, physical characteristics of the device, a list of basic functions of the device, and some operating parameters of the device. The basic information occupies most of the space in the first broadcast packet. The second broadcast packet can be used to carry authentication parameters, such as security verification parameters of the device, encryption key information of the device, authorization status identification of the device, etc. Since the basic information in the first broadcast packet already occupies a lot of space, the authentication parameters are placed separately in the second broadcast packet to facilitate special processing of the identity authentication and authority management of the device. Therefore, the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet.

[0052] Step 202: extract the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, send the authentication parameters to the cloud to request authentication, and receive the authentication result generated by the cloud;

[0053] The terminal processes the scanned second broadcast packet and the first broadcast packet. The authentication parameters of the smart device can be extracted from the second broadcast packet, wherein the authentication parameters can include at least one of the unique identifier, random number, timestamp, key, and signature. Similarly, the terminal can extract the basic information of the smart device from the first broadcast packet, and the basic information can cover the basic attributes of the device, including at least one of the unique identifier of the device, the type of the device, the hardware version number of the device, and the manufacturer information of the device.

[0054] Furthermore, the terminal extracts the authentication parameters in the second broadcast packet and sends them to the cloud. The cloud can verify and analyze the authentication parameters based on its own stored security algorithm and related data, and then generate an authentication result. Among them, the authentication result can be the cloud's judgment conclusion on the legitimacy of the smart device, which is based on the authentication parameters sent by the terminal and the key pre-stored in the cloud, and is obtained through an encryption algorithm.

[0055] Step 203: Determine the smart device that has passed the authentication based on the authentication result generated in the cloud and the basic information of the smart device in the first broadcast packet; wherein the smart device that has passed the authentication is defined as the target device;

[0056] Based on the authentication result generated by the cloud obtained in step 202 and the basic information of the smart device extracted from the first broadcast packet, the smart devices that have passed the authentication can be screened out. Among them, the authentication result generated by the cloud can reflect whether the smart device complies with the pre-set authentication rules. On the other hand, it can also be based on the authentication result generated by the cloud. Compare with the smart device itself to determine whether it complies with the authentication rules. Furthermore, the basic information of the first broadcast packet at least includes the device type, hardware version, etc. Based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet, the first broadcast packet information is compared with the authentication result. The device that passes the authentication and has the same information is confirmed as a safe and reliable device that has passed the authentication.

[0057] The terminal defines the authenticated smart device as the target device, which means that the authenticated smart device can perform further operations, such as network configuration and data interaction, while the unauthenticated devices will be excluded, ensuring that only the authenticated smart devices can perform the next operation.

[0058] Step 204: One of the smart devices in the target device is used as the main device, and the network configuration information of the smart devices in the target device other than the main device is sent to the main device; wherein the main device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud.

[0059] The terminal can select a smart device as the main device from the authenticated target devices. The main device can play a role similar to a hub. Furthermore, the network configuration information of other target devices except the main device is sent to the main device. It should be noted that the network configuration information may contain key data required for other target devices to connect to the network, such as network name, password, and related settings of network access points.

[0060] After receiving the network configuration information, the master device can send the network configuration information to other target devices according to specific communication protocols and processes. Other target devices use the received network configuration information to interact and authenticate with the cloud, complete the corresponding network configuration operations, and achieve successful network configuration between each target device and the cloud.

[0061] In this embodiment, the method for configuring a network of multiple smart devices is applied to a terminal, wherein any smart device broadcasts a first broadcast packet and a second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet; the terminal scans the first broadcast packet and the second broadcast packet broadcasted by multiple smart devices, extracts basic information from the first broadcast packet, extracts authentication parameters from the second broadcast packet, and sends the authentication parameters to the cloud for authentication and then receives the authentication result, and the terminal further determines the authenticated smart device, i.e., the target device, based on the authentication result and the basic information, so that each target device to be configured is safe and allowed to be configured; secondly, the terminal sets one of the target devices as the main device and sends the configuration information of the remaining target devices to the main device, and the main device sends the corresponding configuration information to the remaining target devices to complete the configuration of each target device. In this method, the authentication parameters are sent through the second broadcast packet, and the terminal performs access authentication of the smart device through the cloud according to the authentication parameters. After successful authentication, batch network configuration is performed, and then the legitimacy of the smart device access is determined during the scanning of the smart device. When the network configuration starts, an authenticated smart device serves as the main device, and sends network configuration information to other authenticated smart devices for batch network configuration, thereby improving the network configuration speed of multiple smart devices while ensuring the security and legitimacy of the smart devices.

[0062] In one embodiment, any smart device broadcasts a first broadcast packet and a second broadcast packet via a Bluetooth transmission protocol;

[0063] The first broadcast packet is a BLE broadcast packet, the second broadcast packet is a Beacon broadcast packet, and the length of the information of the smart device carried by the BLE broadcast packet is greater than the length of the information of the smart device carried by the Beacon broadcast packet.

[0064] Any smart device can send broadcast information through the Bluetooth transmission protocol. The broadcast information includes two types of broadcast packets, a first broadcast packet and a second broadcast packet.

[0065] Among them, the first broadcast packet is a BLE broadcast packet, which contains the basic information of the smart device. The basic information of the smart device includes information on multiple aspects of the smart device, such as the detailed type of the device; the hardware version and software version information of the device; and the various functions supported by the device. The second broadcast packet is a Beacon broadcast packet, which can carry authentication parameters. The authentication parameters can include at least one parameter information of the device's unique identifier, key information, and signature to ensure the legitimacy of the device and the reliability of the information source.

[0066] Furthermore, the length of smart device information carried by BLE broadcast packets is relatively long. Since BLE broadcast packets contain a lot of basic information, such as device model, function, hardware specifications, etc., the basic information takes up a lot of space to meet the needs of basic information display and subsequent multiple operations of the device. Beacon broadcast packets mainly focus on authentication parameters, such as device security verification information, encryption keys, etc., and their functions are relatively simple, and they only need to transmit key authentication data, so the length of the information they carry is relatively short.

[0067] In this embodiment, since the smart device broadcasts BLE broadcast packets and Beacon broadcast packets simultaneously through the Bluetooth transmission protocol, and the length of information carried by the BLE broadcast packet is longer than that of the Beacon broadcast packet, different effects will be produced in the device management and network configuration process. While ensuring security, it can bring higher efficiency and convenience to the information transmission, network configuration and management of the device.

[0068] In one embodiment, Figure 3 As shown, one of the smart devices in the target device is used as the main device, including the following steps:

[0069] Step 301: If there is no target device with successful network configuration, network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, and the smart device can connect to the cloud based on the received network configuration information;

[0070] Specifically, the terminal can determine whether there is a target device that has been successfully networked. If a target device that has been successfully networked is found, the target device that has been successfully networked is selected as the main device. A device that has been successfully networked means that it has stable network access capabilities and communication conditions, and can better assume the key responsibilities of the main device.

[0071] If no target device is found to have completed the network configuration operation, the network configuration information can be sent to a smart device in the target device through the Bluetooth transmission protocol. The Bluetooth transmission protocol is a reliable communication method that can ensure stable transmission of network configuration information.

[0072] Furthermore, the network configuration information may include key data required for the smart device to connect to the cloud, such as the network SSID, network password, network authentication method, etc. After receiving the network configuration information, the target device may perform corresponding operations based on the network configuration information, such as adjusting its own network configuration, so as to establish a connection with the cloud and achieve communication with the cloud.

[0073] Step 302: If a command indicating that the smart device is successfully connected is received from the cloud, the smart device is used as the master device;

[0074] When a smart device in the target device receives and processes the network configuration information sent via the Bluetooth transmission protocol, the target device can try to connect to the cloud. After receiving the connection request from the smart device, the cloud will process it and send a successful connection instruction to the terminal if the connection is successful.

[0075] If the terminal receives the command sent by the cloud that the smart device is successfully connected, it means that the smart device has successfully connected to the cloud, completed the network configuration operation, and has the corresponding network communication capability. Therefore, the smart device can be defined as the master device.

[0076] Among them, if there is no target device with successful network configuration at present, the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, including: if there is no target device with successful network configuration at present, the terminal determines the currently saved target device, and sends the network configuration information to the first smart device in the saved target device through the Bluetooth transmission protocol.

[0077] When performing network configuration operation, check whether there is a target device that has been successfully configured. If it is found that no target device has been successfully configured, the terminal will determine the currently saved target device list. The target device list contains all smart devices that have passed authentication. The terminal sends the network configuration information to the first smart device in the saved target device list through the Bluetooth transmission protocol. Among them, the target device list can be sorted by the time of passing authentication.

[0078] Furthermore, the network configuration information sent by the terminal to the first smart device in the target device may include key network configuration information, such as the name, password, encryption method, etc. of the wireless network, so that the smart device can try to connect to the network based on this information.

[0079] In this embodiment, when no device has completed the network configuration, the network configuration process for the smart device is started, laying the foundation for subsequent operations, so that the network configuration process can be gradually promoted, avoiding the inability to operate normally or function to be realized due to the failure of the device to successfully configure the network. Selecting the first smart device in the list for network configuration operation provides a starting point for the subsequent network configuration process. Subsequently, other smart devices can be configured according to the network configuration result of the smart device, so as to realize the orderly network configuration of multiple smart devices.

[0080] In one embodiment, the authentication parameters include a unique identifier of the smart device, a random number, and a signature, wherein the smart device encrypts the unique identifier and a key of the smart device by using a first encryption algorithm, and determines the signature according to the encryption result.

[0081] The authentication parameters can include key elements of smart devices. Among them, the unique identifier can be information used to accurately identify the smart device, such as a person's ID number, which can distinguish the device from other devices in an environment with many devices; the random number can increase the uncertainty and security of the authentication process and prevent the information from being easily cracked or forged; and the signature can be a mechanism for verifying the identity of the smart device and the integrity of the information.

[0082] Specifically, the smart device uses the first encryption algorithm to perform an encryption operation on its own unique identifier and a key. The key is important information pre-stored by the smart device or obtained through other secure methods. By using the unique identifier and the key as input, encryption is performed using the first encryption algorithm to obtain an encryption result. The signature is determined based on the encryption result, and the signature can be a part of the encryption result or information obtained after further processing of the encryption result.

[0083] In this embodiment, the method of determining the signature based on the encryption result provides a reliable and verifiable mechanism for the authentication process. Only by having the same unique identifier and key and using the same first encryption algorithm can the same signature be obtained, thereby ensuring that the legitimacy of the device can be verified during the authentication process, preventing unauthorized devices from impersonating legitimate devices to operate, and ensuring security and reliability.

[0084] In one embodiment, sending authentication parameters to the cloud to request authentication, and receiving authentication results generated by the cloud, includes:

[0085] If the scanning duration is greater than the duration threshold and / or the number of scanned second broadcast packets is greater than a preset number, the authentication parameters in the scanned second broadcast packets are sent to the cloud to request batch authentication; wherein, for any authentication parameter, the cloud can generate an authentication result based on the pre-stored smart device key and authentication parameters and through a second encryption algorithm, and send the authentication result to the terminal.

[0086] The terminal monitors the scanning duration and the number of scanned second broadcast packets. When the scanning duration exceeds the duration threshold, or the number of scanned second broadcast packets exceeds the preset number, the authentication parameters in the scanned second broadcast packets will be sent to the cloud in batches. Among them, the operation of sending authentication parameters in batches can improve the efficiency of authentication, avoid separate processing of each authentication parameter, and save time and resources. Exemplarily, 5 second broadcast packets can be used as the preset number, and 1s can be used as the duration threshold. When the scanning duration is greater than 1s and / or the number of scanned second broadcast packets is greater than 5, the scanned second broadcast packets will be sent to the cloud in batches to request a batch authentication operation.

[0087] For any authentication parameter sent, the cloud can use the key of the smart device pre-stored in itself and the received authentication parameter to perform authentication operation through the second encryption algorithm, thereby generating an authentication result. Among them, the second encryption algorithm can be a designed security algorithm that can ensure the accuracy and security of the authentication process. The cloud combines its own stored key and the received authentication parameter, and uses the authentication result obtained by the second encryption algorithm to accurately determine whether the device is legal, whether its access is allowed, and other information. Furthermore, the cloud sends the generated authentication result to the terminal, so that the terminal can perform subsequent operations based on the authentication result.

[0088] In one embodiment, Figure 4 As shown, based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet, determining the smart device that has passed the authentication includes the following steps:

[0089] Step 401: The basic information includes a unique identifier of the smart device, and a first broadcast packet and a second broadcast packet belonging to the same smart device are bound according to the unique identifier;

[0090] The basic information in the first broadcast packet also contains the unique identifier of the smart device, which is a key element that can be used to accurately distinguish different smart devices, similar to the unique ID number of each person. Based on the unique identifier, the first broadcast packet and the second broadcast packet with the same unique identifier are bound, that is, the first broadcast packet and the second broadcast packet with the same unique identifier belong to the same smart device.

[0091] Step 402: Send the authentication result generated by the cloud to the corresponding smart device, where any smart device can generate an authentication result through a second encryption algorithm based on the authentication parameters and its own pre-stored key, and determine whether the authentication result generated by itself is consistent with the authentication result generated by the cloud. If they are consistent, the target instruction of authentication passing is sent to the terminal.

[0092] The authentication result generated in the cloud is sent to the corresponding smart device. Each smart device has a certain degree of autonomy and verification capability. Each smart device can use the second encryption algorithm to generate an authentication result based on its own pre-stored key and authentication parameters. It should be noted that the second encryption algorithm is the key to ensure the accuracy and security of authentication. The process of the smart device using the algorithm to generate the authentication result is a self-verification process, which is calculated according to the predetermined encryption algorithm by using the pre-stored key and authentication parameters.

[0093] The smart device compares the authentication result generated by itself with the authentication result received from the cloud to see if the two are consistent. If the two are consistent, it means that the smart device has passed the authentication and can send the target command of the authentication to the terminal.

[0094] Step 403: Based on the received target instruction, determine the smart device that has passed the authentication.

[0095] When the smart device completes the authentication operation, it will send a target instruction of authentication passing to the terminal. The terminal receives the target instruction and determines which smart devices have passed the authentication.

[0096] Furthermore, the terminal can identify and process the received target instructions, which are sent by the smart device after confirming that the authentication result generated by itself is consistent with the authentication result generated by the cloud, indicating that the smart device has successfully passed the authentication. By analyzing the target instructions, the terminal can determine which smart devices have passed the authentication, and thus mark the authenticated smart devices as target devices.

[0097] In this embodiment, this method ensures that only authenticated smart devices are allowed to participate in subsequent operations, such as network configuration, data interaction, function execution, etc., thereby ensuring security and reliability and preventing unauthorized or authentication-failed devices from mixing in and affecting normal operation.

[0098] In one embodiment, Figure 5 As shown in the figure, the specific steps to bind the BLE broadcast packet and Beacon broadcast packet belonging to the same smart device based on the authentication result are as follows:

[0099] Step 501: The smart device is powered on, enters the network configuration state, and sends BLE broadcast packets and Beacon broadcast packets;

[0100] Step 502: The terminal performs scanning;

[0101] Step 503: The terminal obtains BLE broadcast packets and Beacon broadcast packets broadcast by multiple smart devices;

[0102] Step 504: The terminal parses and saves the information of the BLE broadcast packet;

[0103] Step 505: The terminal parses the information of the Beacon broadcast packet;

[0104] Step 506: Applying to the terminal, if the smart device is not activated, sending an activation instruction to the smart device;

[0105] Step 507: The smart device receives the activation instruction, starts flashing and activates;

[0106] Step 508: If the scanning time of the terminal is greater than the time threshold and / or the number of scanned second broadcast packets is greater than a preset number, the authentication parameters in the scanned second broadcast packets are sent to the cloud to request batch authentication;

[0107] Step 509: The cloud sends the authentication result to the terminal;

[0108] Step 510: The terminal binds the information of the BLE broadcast packet based on the authentication result.

[0109] In one embodiment, the master device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud, including:

[0110] If the target device is connected to the cloud, the cloud sends a connection success instruction to the terminal, wherein the terminal can poll the target devices saved by itself based on the connection success instruction sent by the cloud to determine the remaining target devices to be networked, and send a network configuration instruction to the main device, so that the main device sends network configuration information to the corresponding target device to be networked in response to the network configuration instruction;

[0111] and / or,

[0112] If the target device is not connected to the cloud, the target device broadcasts a network configuration error instruction through a second broadcast packet, and the terminal parses the network configuration error instruction after scanning the second broadcast packet.

[0113] Specifically, the master device has the ability to send network configuration information to each target device. The network configuration information may include important information required for the target device to connect to the cloud, such as the network name, password, encryption method, etc. By sending the network configuration information to other target devices, each target device is helped to establish a connection with the cloud.

[0114] When one of the target devices is successfully connected to the cloud, the cloud will respond accordingly, that is, send a connection success command to the terminal. After the terminal receives this command, it polls the target device list saved by itself. It should be noted that the target device list can contain multiple target devices that need to be networked. Through the polling operation, the terminal can determine which devices have completed the network configuration and which devices are still in the state of waiting for network configuration. Furthermore, if the remaining target devices to be networked are determined, the terminal will continue to send network configuration instructions to the main device. After the main device receives the network configuration instruction, it will send network configuration information to the corresponding target device to be networked according to the instruction, and promote the subsequent network configuration work to continue. That is, a closed-loop process is formed to ensure that each target device can receive the network configuration information and try to establish a connection with the cloud.

[0115] In addition, when a target device attempts to connect to the cloud but fails, the target device can broadcast a network configuration error instruction through a second broadcast packet. The second broadcast packet at this time can be a medium for information transmission, and the network configuration error instruction can contain relevant information about the network configuration failure, which can be caused by password errors, poor router signals, router full load, network protocol problems, etc.

[0116] The terminal continues to scan, and if it scans the second broadcast packet, it can parse the network configuration error instruction in it. Through analysis, the terminal can determine which target device has a network configuration error and the cause of the error, thereby providing a basis for subsequent resolution of the network configuration problem, and can notify the user to make corresponding adjustments, or try to use other network configuration methods to ensure the smooth progress of network configuration work.

[0117] For example, suppose that multiple devices in a smart home are being configured for the network, such as smart lights, smart sockets, and smart cameras. The main device can be a smart gateway that is already connected to the network, which is responsible for sending the network configuration information to target devices such as smart lights, smart sockets, and smart cameras. When the smart light is successfully connected to the cloud, the cloud sends a connection success command to the user's mobile terminal. The mobile terminal polls the stored device list and finds that the smart socket and smart camera have not been configured for the network, so it sends a network configuration command to the smart gateway. After receiving the command, the smart gateway continues to send network configuration information for the smart socket and smart camera. If the smart socket fails when trying to configure the network, the smart socket can broadcast a network configuration error command through a second broadcast packet. After the user's mobile terminal scans the broadcast packet, it parses the error information. The user can check whether it is a network setting problem or a problem with the smart socket itself based on the error information, and then solve the network configuration failure.

[0118] In this embodiment, the design of this network distribution process takes into account the subsequent operations when the network distribution is successful to ensure that other devices can also be networked in an orderly manner, and also takes into account the information feedback and processing when the network distribution fails, thereby improving the reliability and operability of the entire network distribution process and ensuring the normal operation of the network distribution process.

[0119] In one embodiment, Figure 6 As shown in the figure, the steps to select the master device and configure the network for other target devices based on the master device are as follows:

[0120] Step 601: The terminal sends network configuration information to one of the target devices via the Bluetooth transmission protocol;

[0121] Step 602: The target device receives the network configuration information and sends a successful reception message to the sending terminal;

[0122] Step 603: The target device connects to the cloud based on the network configuration information;

[0123] Step 604: The target device successfully connects to the cloud;

[0124] Step 605: With the target device as the master device, the terminal sends a network configuration instruction to the master device;

[0125] Step 606: The master device sends network configuration information to the target device 1;

[0126] Step 607: The master device sends network configuration information to the target device 2;

[0127] Step 608: Target device 1 connects to the cloud based on the network configuration information;

[0128] Step 609: Target device 2 connects to the cloud based on the network configuration information;

[0129] Step 610: Target device 1 successfully connects to the cloud;

[0130] Step 611: Target device 2 successfully connects to the cloud;

[0131] Step 612: The terminal activates each target device in the target device list in turn by polling;

[0132] Step 613: The terminal displays the target device for which the network configuration is successful.

[0133] In one embodiment, Figure 7 As shown in the figure, if the target device fails to configure the network, how to handle the network configuration error, the steps are as follows:

[0134] Step 701: The terminal sends a network configuration instruction to the master device;

[0135] Step 702: The terminal performs Beacon broadcast packet scanning;

[0136] Step 703: The master device sends network configuration information to the target device;

[0137] Step 704: The target device connects to the router;

[0138] Step 705: The target device fails to configure the network due to the router;

[0139] Step 706: The target device router is successfully connected

[0140] Step 707: The target device is activated with the cloud;

[0141] Step 708: Target device cloud activation fails;

[0142] Step 709: The target device broadcasts a network configuration error instruction via a Beacon broadcast packet;

[0143] Step 710: The terminal scans and obtains the Beacon broadcast packet;

[0144] Step 711: The terminal parses the network configuration error instruction in the Beacon broadcast packet;

[0145] Step 712: The terminal performs network configuration error processing.

[0146] Based on the same inventive concept, the embodiment of the present application also provides a device for multiple smart devices to be networked. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the device for multiple smart devices to be networked provided below can refer to the limitations of the method for multiple smart devices to be networked above, and will not be repeated here.

[0147] In one embodiment, Figure 8 As shown, the embodiment of the present application also provides a device for configuring a network of multiple smart devices, the device comprising:

[0148] The scanning module 801 is used to scan the first broadcast packet and the second broadcast packet broadcast by multiple smart devices; wherein any smart device broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet;

[0149] An extraction module 802 is used to extract the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, send the authentication parameters to the cloud to request authentication, and receive the authentication result generated by the cloud;

[0150] A determination module 803 is used to determine the smart device that has passed the authentication based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet; wherein the smart device that has passed the authentication is defined as the target device;

[0151] The network configuration module 804 takes one of the smart devices in the target device as the main device and sends the network configuration information of the smart devices in the target device except the main device to the main device; wherein the main device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud.

[0152] In one embodiment, any smart device in the scanning module 801 broadcasts a first broadcast packet and a second broadcast packet through the Bluetooth transmission protocol; wherein the first broadcast packet is a BLE broadcast packet, and the second broadcast packet is a Beacon broadcast packet, and the information length of the smart device carried by the BLE broadcast packet is greater than the information length of the smart device carried by the Beacon broadcast packet.

[0153] In one embodiment, the network configuration module 804 uses one of the smart devices in the target device as the main device, and is specifically used for: if there is currently no target device with successful network configuration, then the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, and the smart device can connect to the cloud based on the received network configuration information; if an instruction is received from the cloud that the smart device is successfully connected, the smart device is used as the main device; wherein, if there is currently no target device with successful network configuration, then the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, including: if there is currently no target device with successful network configuration, the terminal determines the currently saved target device, and sends the network configuration information to the first smart device in the saved target devices through the Bluetooth transmission protocol.

[0154] In one embodiment, the authentication parameters extracted by the module 802 include a unique identifier of the smart device, a random number, and a signature, wherein the smart device encrypts the unique identifier and a key of the smart device by using a first encryption algorithm, and determines the signature according to the encryption result.

[0155] In one embodiment, the extraction module 802 sends the authentication parameters to the cloud to request authentication, and receives the authentication results generated by the cloud, specifically for: if the scanning duration is greater than the duration threshold and / or the number of scanned second broadcast packets is greater than a preset number, the authentication parameters in the scanned second broadcast packet are sent to the cloud to request batch authentication; wherein, for any authentication parameter, the cloud can generate an authentication result based on the pre-stored smart device key and authentication parameters and through a second encryption algorithm, and send the authentication result to the terminal.

[0156] In one embodiment, the determination module 803 determines the smart device that has passed the authentication based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet, and is specifically used for: the basic information includes the unique identifier of the smart device, and the first broadcast packet and the second broadcast packet belonging to the same smart device are bound according to the unique identifier; the authentication result generated by the cloud is sent to the corresponding smart device, wherein any smart device can generate an authentication result through a second encryption algorithm based on the authentication parameters and its own pre-stored key, and determine whether the authentication result generated by itself is consistent with the authentication result generated by the cloud. If they are consistent, a target instruction indicating that the authentication is passed is sent to the terminal; based on the received target instruction, the smart device that has passed the authentication is determined.

[0157] In one embodiment, the network configuration module 804 main device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud, specifically for: the main device sends the network configuration information to the corresponding target device in response to the network configuration instruction of the terminal; wherein any target device receiving the network configuration information can connect to the cloud based on the network configuration information, if the target device is connected to the cloud, the cloud sends a connection success instruction to the terminal, wherein the terminal can poll the target devices saved by itself based on the connection success instruction sent by the cloud to determine the remaining target devices to be configured, and send the network configuration instruction to the main device, so that the main device sends the network configuration information to the corresponding target device to be configured in response to the network configuration instruction; and / or, if the target device is not connected to the cloud, the target device broadcasts a network configuration error instruction through a second broadcast packet, and the terminal parses the network configuration error instruction after scanning the second broadcast packet.

[0158] Based on the same concept, the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program, and a method for networking multiple smart devices when the processor executes the computer program.

[0159] In one embodiment, an electronic device is provided, including a memory and a processor. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner. When the computer program is executed by the processor, a method for networking multiple smart devices is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be an external keyboard, a touchpad or a mouse, etc.

[0160] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] Based on the same concept, the present application also provides a computer-readable storage medium having a computer program stored thereon, and a method for networking multiple smart devices when the computer program is executed by a processor.

[0162] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiment of the method for networking multiple smart devices as described above.

[0163] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for configuring a network for multiple smart devices, characterized in that: The method is applied to a terminal, and the method includes: Scanning a first broadcast packet and a second broadcast packet broadcast by a plurality of smart devices; wherein any of the smart devices broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and the maximum length of the first broadcast packet is greater than the maximum length of the second broadcast packet; Extracting the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, sending the authentication parameters to the cloud to request authentication, and receiving the authentication result generated by the cloud; Based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet, determining the smart device that has passed the authentication; wherein the smart device that has passed the authentication is defined as the target device; One of the smart devices in the target device is used as the main device, and the network configuration information of the smart devices in the target device except the main device is sent to the main device; wherein the main device can send corresponding network configuration information to each of the target devices to complete the network configuration between each of the target devices and the cloud.

2. The method for configuring a network for multiple smart devices according to claim 1, characterized in that: Any of the smart devices broadcasts the first broadcast packet and the second broadcast packet through the Bluetooth transmission protocol; The first broadcast packet is a BLE broadcast packet, the second broadcast packet is a Beacon broadcast packet, and the information length of the smart device carried by the BLE broadcast packet is greater than the information length of the smart device carried by the Beacon broadcast packet.

3. The method for configuring a network for multiple smart devices according to claim 1, characterized in that: Using one of the target devices as a master device includes: If there is no target device with successful network configuration, the network configuration information is sent to a smart device in the target device through the Bluetooth transmission protocol, and the smart device can connect to the cloud based on the received network configuration information; If an instruction indicating that the smart device is successfully connected is received from the cloud, the smart device is used as the master device; Among them, if there is no target device with successful network configuration at present, the network configuration information is sent to a smart device among the target devices through the Bluetooth transmission protocol, including: if there is no target device with successful network configuration at present, the terminal determines the currently saved target device, and sends the network configuration information to the first smart device among the saved target devices through the Bluetooth transmission protocol.

4. The method for configuring a network for multiple smart devices according to any one of claims 1 to 3, characterized in that: The authentication parameters include a unique identifier of the smart device, a random number, and a signature, wherein the smart device encrypts the unique identifier and a key of the smart device by using a first encryption algorithm, and determines the signature according to the encryption result.

5. The method for configuring a network for multiple smart devices according to any one of claims 1 to 3, characterized in that: Sending the authentication parameters to the cloud to request authentication, and receiving the authentication result generated by the cloud, including: If the scanning duration is greater than the duration threshold and / or the number of scanned second broadcast packets is greater than a preset number, the authentication parameters in the scanned second broadcast packets are sent to the cloud to request batch authentication; wherein, for any authentication parameter, the cloud can generate an authentication result based on the pre-stored smart device key and the authentication parameter and through a second encryption algorithm, and send the authentication result to the terminal.

6. The method for configuring a network for multiple smart devices according to claim 5, characterized in that: Determining an authenticated smart device based on the authentication result generated by the cloud and basic information of the smart device in the first broadcast packet includes: The basic information includes a unique identifier of the smart device, and the first broadcast packet and the second broadcast packet belonging to the same smart device are bound according to the unique identifier; Sending the authentication result generated by the cloud to the corresponding smart device, wherein any of the smart devices can generate an authentication result through the second encryption algorithm based on the authentication parameters and its own pre-stored key, and determine whether the authentication result generated by itself is consistent with the authentication result generated by the cloud, and if they are consistent, send a target instruction of authentication passing to the terminal; Based on the received target instruction, an authenticated smart device is determined.

7. The method for configuring a network of multiple smart devices according to any one of claims 1 to 3, characterized in that: The master device can send corresponding network configuration information to each target device to complete the network configuration between each target device and the cloud, including: The main device responds to the network configuration instruction of the terminal and sends the network configuration information to the corresponding target device; wherein any target device receiving the network configuration information can connect to the cloud based on the network configuration information, If the target device is connected to the cloud, the cloud sends a connection success instruction to the terminal, wherein the terminal can poll the target devices saved by itself based on the connection success instruction sent by the cloud to determine the remaining target devices to be networked, and send a network configuration instruction to the master device, so that the master device sends network configuration information to the corresponding target device to be networked in response to the network configuration instruction; and / or, If the target device is not connected to the cloud, the target device broadcasts a network configuration error instruction through the second broadcast packet, and the terminal parses the network configuration error instruction after scanning the second broadcast packet.

8. A device for networking multiple smart devices, characterized in that: The device is applied to a terminal, and the device includes: A scanning module, configured to scan a first broadcast packet and a second broadcast packet broadcast by a plurality of smart devices; wherein any of the smart devices broadcasts the first broadcast packet and the second broadcast packet through the same wireless communication transmission protocol, and a maximum length of the first broadcast packet is greater than a maximum length of the second broadcast packet; an extraction module, configured to extract the authentication parameters of the smart device in the second broadcast packet and the basic information of the smart device in the first broadcast packet, send the authentication parameters to the cloud to request authentication, and receive the authentication result generated by the cloud; A determination module, configured to determine an authenticated smart device based on the authentication result generated by the cloud and the basic information of the smart device in the first broadcast packet; wherein the authenticated smart device is defined as a target device; The network configuration module takes one of the smart devices in the target device as the main device, and sends the network configuration information of the smart devices in the target device except the main device to the main device; wherein the main device can send corresponding network configuration information to each of the target devices to complete the network configuration between each of the target devices and the cloud.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for networking multiple smart devices as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for networking multiple smart devices according to any one of claims 1 to 7 are implemented.