Multi-device networking method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202611384562.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本发明实施例提供了一种多设备联网方法、装置、设备及存储介质,旨在解决现有的多设备联网方法存在配网效率低、配网可靠性不足的问题
[0016]This invention provides a method, apparatus, device, and storage medium for multi-device networking. The method includes: generating a unique encrypted configuration package for each smart device based on detected network configuration trigger information; classifying each smart device into online and offline devices based on its online status; generating a P2P coordination command based on the encrypted configuration packages of all offline devices; sending the unique encrypted configuration package and the P2P coordination command to each online device, so that the online device performs a network configuration update based on the received encrypted configuration package; and forwarding the P2P coordination command to each offline device through a Bluetooth encrypted channel, so that each offline device performs a network configuration update based on the received P2P coordination command. This invention has the following advantages: 1. Online devices forward P2P coordination commands to offline devices through a Bluetooth encrypted channel, ensuring that offline devices can perform network configuration updates in a timely manner, improving the coverage and efficiency of network configuration updates; 2. Generating a unique encrypted configuration package for each smart device reduces the risk of data leakage and improves network configuration reliability.
Smart Images

Figure CN122934414A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless Internet of Things (IoT) technology, and in particular to a method, apparatus, device, and storage medium for networking multiple devices. Background Technology
[0002] In residential and commercial air conditioning systems used with multiple devices, each device typically requires individual network configuration, including entering the Wi-Fi name, password, and confirming the network setup. For users, this process is repetitive and tedious, especially when there are many devices, consuming significant time and effort. In commercial settings, dozens or even hundreds of devices may need to be configured at once. Manually configuring each device individually is not only inefficient but also prone to errors such as incorrect passwords, missing devices, and network instability, leading to network connectivity issues or subsequent maintenance difficulties. Furthermore, the complex network configuration process increases installation personnel training costs and after-sales support, impacting overall delivery efficiency and user experience.
[0003] Existing technologies use a first smart device as the sole entry point, which connects to the internet and reports new routing information to trigger updates for all subsequent devices. However, this method has the following problems: high risk of single point of failure, as the process is interrupted if the first smart device fails to configure; excessive reliance on real-time cloud connectivity, preventing offline devices from receiving timely updates; and the risk of transmission security due to the cloud directly distributing new routing information to devices.
[0004] Therefore, existing multi-device networking methods suffer from low distribution network efficiency and insufficient distribution network reliability. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for networking multiple devices, aiming to solve the problems of low network distribution efficiency and insufficient network distribution reliability in existing multi-device networking methods.
[0006] In a first aspect, embodiments of the present invention provide a method for networking multiple devices, the method comprising: Generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information; Based on the online status of each smart device, the smart devices are divided into online devices and offline devices; Generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices; The system sends its own encrypted configuration package and P2P coordination command to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package. The system then forwards the P2P coordination command to each of the offline devices through a Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination command.
[0007] In one embodiment, generating a unique encrypted configuration package for each smart device based on the detected network configuration trigger information includes: Obtain target network configuration information based on detected network configuration trigger information; Based on the target network configuration information, a unique encrypted configuration package is generated for each smart device.
[0008] In one embodiment, after obtaining the target network configuration information based on the detected network configuration triggering information, the method further includes: The validity of the target distribution network information is verified, and the verification result is obtained; If the verification result is successful, proceed with the step of generating a unique encrypted configuration package for each smart device based on the target network configuration information; If the verification result is unsuccessful, the target distribution network information is marked as invalid and the current distribution network process is terminated.
[0009] In one embodiment, the online device performs a network configuration update based on the received encrypted configuration packet, including: The encrypted configuration packet is decrypted using the pre-stored device private key to obtain plaintext data; Obtain the target distribution network information based on the plaintext data; Perform network configuration updates based on the target network information.
[0010] In one embodiment, after sending the encrypted configuration package and the P2P coordination instruction to each of the online devices, the method further includes: The online device obtains the broadcast identifier, the list of devices to be updated, the temporary credential, and the encrypted configuration package of each offline device according to the P2P coordination instruction. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. The online device receives the response signal returned by the offline device based on the broadcast packet; The online device obtains the unique device identifier of the offline device based on the response signal; The online device determines whether the device's unique identifier is included in the list of devices to be updated; If the unique identifier of the device is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credential to obtain the authentication result; If the authentication result is successful, the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encrypted channel.
[0011] In one embodiment, after classifying the smart devices into online and offline devices based on their online status, the method further includes: The encrypted configuration packages of each offline device are stored in their respective offline message queues; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs network configuration updates.
[0012] In one embodiment, before classifying each smart device into online and offline devices based on its online status, the method further includes: It periodically sends heartbeat signals to various smart devices; Within a preset waiting time, the online status of the smart device that returns a heartbeat packet based on the heartbeat signal is marked as online; Within a preset waiting time, smart devices that do not return a heartbeat packet will be marked as offline.
[0013] Secondly, embodiments of the present invention also provide a multi-device networking device, the device comprising: The first generation unit is used to generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information. The segmentation unit is used to classify smart devices into online devices and offline devices based on their online status. The second generation unit is used to generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices; The distribution unit is used to send the encrypted configuration package and the P2P coordination command to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package, and forward the P2P coordination command to each of the offline devices through the Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination command.
[0014] Thirdly, embodiments of the present invention also provide an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect above.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the method described in the first aspect.
[0016] This invention provides a method, apparatus, device, and storage medium for multi-device networking. The method includes: generating a unique encrypted configuration package for each smart device based on detected network configuration trigger information; classifying each smart device into online and offline devices based on its online status; generating a P2P coordination command based on the encrypted configuration packages of all offline devices; sending the unique encrypted configuration package and the P2P coordination command to each online device, so that the online device performs a network configuration update based on the received encrypted configuration package; and forwarding the P2P coordination command to each offline device through a Bluetooth encrypted channel, so that each offline device performs a network configuration update based on the received P2P coordination command. This invention has the following advantages: 1. Online devices forward P2P coordination commands to offline devices through a Bluetooth encrypted channel, ensuring that offline devices can perform network configuration updates in a timely manner, improving the coverage and efficiency of network configuration updates; 2. Generating a unique encrypted configuration package for each smart device reduces the risk of data leakage and improves network configuration reliability. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the multi-device networking method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a sub-process of the multi-device networking method provided in an embodiment of the present invention; Figure 3 A schematic block diagram of a multi-device networking device provided in an embodiment of the present invention; Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] Please see Figure 1 , Figure 1 This is a flowchart illustrating a multi-device networking method provided in an embodiment of the present invention. The present invention provides a multi-device networking method, apparatus, device, and storage medium. The method is applied to a cloud server, which communicates with at least one smart device via a Wi-Fi channel. Two smart devices establish a P2P connection via Bluetooth Low Energy. The present invention will be described in detail below through specific embodiments.
[0024] Figure 1 This is a flowchart illustrating a multi-device networking method provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110-S140.
[0025] S110. Generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information.
[0026] In this embodiment, a multi-source network configuration process triggering method is adopted. The first triggering execution method is as follows: when the user updates the Wi-Fi password or changes the router on the user terminal, the user terminal automatically generates network configuration triggering information containing the old and new SSIDs / Wi-Fi passwords, timestamps, and user identifiers and sends it to the cloud server; where SSID (Service SetIdentifier) is the wireless network name; The second trigger execution method is as follows: After a smart device connects to the new Wi-Fi via WPS (Wi-Fi Protected Setup) / network configuration, it automatically generates network configuration trigger information containing its unique device identifier, the new Wi-Fi's BSSID, SSID, and the router's security encryption type, and sends it to the cloud server. Among them, BSSID (Basic Service Set Identifier) is the MAC address of a single wireless radio frequency interface of the router. The smart device establishes a Wi-Fi connection with the cloud server through the router. The smart device can be a device that can connect to the Internet, such as an air conditioner, television, washing machine, or electric fan.
[0027] The cloud server extracts the target network configuration information from the received network configuration trigger information, including the SSID of the new Wi-Fi, the security encryption type of the router, and temporary credentials for P2P local authentication between smart devices; then, it generates a unique encrypted configuration package for each smart device based on the target network configuration information.
[0028] In one embodiment, step S110 includes: obtaining target network configuration information based on the detected network configuration trigger information; and generating a unique encrypted configuration package for each smart device based on the target network configuration information.
[0029] In this embodiment, a multi-source network configuration process triggering method is adopted. The first triggering execution method is as follows: when the user updates the Wi-Fi password or changes the router on the user terminal, the user terminal automatically generates network configuration triggering information containing the old and new SSIDs / Wi-Fi passwords, timestamps, and user identifiers and sends it to the cloud server; where SSID (Service SetIdentifier) is the wireless network name; The second trigger execution method is as follows: After a smart device connects to the new Wi-Fi via WPS (Wi-Fi Protected Setup) / network configuration, it automatically generates network configuration trigger information containing its unique device identifier, the new Wi-Fi's BSSID, SSID, and the router's security encryption type, and sends it to the cloud server; among which, BSSID (Basic Service Set Identifier) is the MAC address of a single wireless radio frequency interface of the router, and the smart device establishes a Wi-Fi connection with the cloud server through the router.
[0030] The cloud server extracts the target network configuration information from the received network configuration trigger information, including the SSID of the new Wi-Fi, the security encryption type of the router, and temporary credentials for P2P local authentication between smart devices; then, it generates a unique encrypted configuration package for each smart device based on the target network configuration information.
[0031] In one embodiment, after obtaining the target network configuration information based on the detected network configuration trigger information, the method further includes: verifying the validity of the target network configuration information to obtain a verification result; if the verification result is successful, performing the step of generating a unique encrypted configuration package for each smart device based on the target network configuration information; if the verification result is unsuccessful, marking the target network configuration information as an invalid message and terminating the current network configuration process.
[0032] In this embodiment, for the first trigger execution method, the target network information validity verification operation is specifically as follows: based on the user identifier, it is determined whether there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server. If there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server, the verification result is determined to be passed (i.e. the target network information is valid); otherwise, the verification result is determined to be failed. For the second trigger execution method, the target network configuration information validity verification operation is specifically as follows: Within a preset judgment time, it is determined whether a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server. If a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server, the verification result is determined to be passed (i.e., the target network configuration information is valid); otherwise, the verification result is determined to be failed. If the verification result is failed, the target network configuration information is marked as an invalid message, and the current network configuration process is terminated. This invention avoids single points of failure and enhances the execution reliability of network configuration updates by verifying the validity of the target network configuration information.
[0033] S120. Based on the online status of each smart device, classify each smart device into online devices and offline devices.
[0034] In this embodiment, the online status of each smart device is determined by querying the client identifier of each smart device through the MQTT message broker, thereby classifying each smart device into online devices and offline devices.
[0035] In one embodiment, after step S120, the method further includes: storing the encrypted configuration package of each offline device into its respective offline message queue; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs a network configuration update.
[0036] In this embodiment, the encrypted configuration package of each offline device is stored in its corresponding offline message queue; after the smart device comes online, it will automatically send a pull request to the cloud server to pull the encrypted configuration package from its dedicated offline message queue and perform network configuration update.
[0037] This invention ensures that offline devices can promptly obtain and apply new network configurations after reconnection by storing the encrypted configuration packets of each offline device in their respective offline message queues, thereby reducing the need for manual intervention by users.
[0038] In one embodiment, before step S120, the method further includes: periodically sending heartbeat signals to each smart device; marking the online status of smart devices that return heartbeat packets based on the heartbeat signals as online within a preset waiting time; and marking the online status of smart devices that do not return heartbeat packets as offline within a preset waiting time.
[0039] In this embodiment, heartbeat signals are periodically sent to each smart device based on long-connection protocols such as MQTT (Message Queuing Telemetry Transport) or WebSocket. Within a preset waiting time, the online status of smart devices that return heartbeat packets based on the heartbeat signals is marked as online. Within a preset waiting time, the online status of smart devices that do not return heartbeat packets is marked as offline. Based on the above heartbeat detection mechanism, the online status of each smart device is periodically obtained.
[0040] S130. Generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices.
[0041] In this embodiment, the P2P coordination instruction includes encrypted configuration packages for all the offline devices, and each encrypted configuration package is associated with a unique device identifier.
[0042] S140. Send the dedicated encrypted configuration package and P2P coordination command to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package, and forward the P2P coordination command to each of the offline devices through the Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination command.
[0043] In this embodiment, after the smart device successfully establishes a Wi-Fi connection with the cloud server, it reports a "configuration successful" signal and the currently connected BSSID to the cloud server; if the connection fails, it sends a "configuration update failed" signal and the specific error code to the cloud server after reconnecting to the network. The cloud server updates the network configuration status of the corresponding smart devices in the database based on the received signals, and updates the network connection status chart of all devices in the house on the user terminal based on the network configuration status of each smart device.
[0044] In one embodiment, the online device performs a network configuration update based on the received encrypted configuration packet, including: decrypting the encrypted configuration packet according to a pre-stored device private key to obtain plaintext data; obtaining target network configuration information based on the plaintext data; and performing a network configuration update based on the target network configuration information.
[0045] In this embodiment, during the production line programming of the smart device's security chip, a unique key pair is generated using a secure random number generator. This pair includes a device public key and a device private key. The device private key is stored within the smart device's security chip and remains within the hardware itself. The device public key, along with the device's unique identifier, is uploaded to a cloud server. The cloud server encrypts the device public key and the target network configuration information using a preset encryption algorithm (such as RSA or ECC) to obtain a unique encrypted configuration package for the corresponding smart device. This invention uses an encrypted configuration package instead of directly distributing network configuration information, reducing the risk of data leakage and improving network reliability.
[0046] After receiving the encrypted configuration packet, the online device decrypts the encrypted configuration packet based on the preset encryption algorithm and the pre-stored device private key to obtain plaintext data; obtains the target network configuration information based on the plaintext data; performs network configuration updates based on the target network configuration information, and re-establishes a Wi-Fi connection with the cloud server.
[0047] In one embodiment, such as Figure 2 As shown, after step S140, steps S141-S147 are also included: S141, the online device obtains the broadcast identifier, the list of devices to be updated, the temporary credential, and the encrypted configuration package of each offline device according to the P2P coordination instruction; S142. The online device broadcasts a broadcast packet carrying the broadcast identifier to the outside world via Bluetooth Low Energy; S143, the online device receives the response signal returned by the offline device based on the broadcast packet; S144. The online device obtains the unique device identifier of the offline device based on the response signal; S145. The online device determines whether the device's unique identifier is included in the list of devices to be updated. S146. If the unique identifier of the device is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credential to obtain the authentication result. S147. If the authentication result is successful, the online device forwards the corresponding encrypted configuration package to the offline device through the Bluetooth encrypted channel.
[0048] In this embodiment, the online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. After receiving the broadcast packet during the scanning period, the offline device identifies the broadcast packet as coming from a legitimate device within the same network group based on the broadcast identifier. The offline device generates a response signal containing its own unique device identifier based on the broadcast packet and sends it to the online device. The online device receives the response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication (such as challenge-response authentication) with the offline device based on the temporary credentials and obtains an authentication result. If the authentication result is successful, the online device and the offline device negotiate to generate a symmetric encryption key that belongs only to this Bluetooth session. A Bluetooth encryption channel is established based on the symmetric encryption key, and the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encryption channel.
[0049] In summary, the present invention has the following beneficial effects: 1. Online devices forward P2P coordination instructions to each offline device through a Bluetooth encrypted channel, ensuring that offline devices can perform network configuration updates in a timely manner, thereby improving the coverage and efficiency of network configuration updates; 2. A dedicated encrypted configuration package is generated for each smart device, reducing the risk of data leakage and improving the reliability of the network configuration.
[0050] Figure 3 This is a schematic block diagram of a multi-device networking device provided in an embodiment of the present invention. Figure 3 As shown, corresponding to the above multi-device networking methods, the present invention also provides a multi-device networking apparatus. The apparatus is configured on a cloud server, and the cloud server communicates with at least one smart device via a Wi-Fi channel. Two smart devices establish a P2P connection via Bluetooth Low Energy. For details, please refer to... Figure 3 The multi-device networking device 700 includes: The first generation unit 701 is used to generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information. The segmentation unit 702 is used to segment each smart device into online devices and offline devices according to the online status of each smart device; The second generation unit 703 is used to generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices; The network distribution unit 704 is used to send the encrypted configuration package and the P2P coordination instruction to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package, and forward the P2P coordination instruction to each of the offline devices through the Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination instruction.
[0051] In some embodiments, when the first generation unit 701 performs the step of obtaining target network distribution information based on detected network configuration triggering information, it is specifically used for: The target network configuration information is obtained based on the detected network configuration trigger information; a unique encrypted configuration package is generated for each smart device based on the target network configuration information.
[0052] In this embodiment, a multi-source network configuration process triggering method is adopted. The first triggering execution method is as follows: when the user updates the Wi-Fi password or changes the router on the user terminal, the user terminal automatically generates network configuration triggering information containing the old and new SSIDs / Wi-Fi passwords, timestamps, and user identifiers and sends it to the cloud server; where SSID (Service SetIdentifier) is the wireless network name; The second trigger execution method is as follows: After a smart device connects to the new Wi-Fi via WPS (Wi-Fi Protected Setup) / network configuration, it automatically generates network configuration trigger information containing its unique device identifier, the new Wi-Fi's BSSID, SSID, and the router's security encryption type, and sends it to the cloud server; among which, BSSID (Basic Service Set Identifier) is the MAC address of a single wireless radio frequency interface of the router, and the smart device establishes a Wi-Fi connection with the cloud server through the router.
[0053] The cloud server extracts the target network configuration information from the received network configuration trigger information, including the SSID of the new Wi-Fi, the security encryption type of the router, and temporary credentials for P2P local authentication between smart devices; then, it generates a unique encrypted configuration package for each smart device based on the target network configuration information.
[0054] In some embodiments, after performing the step of obtaining target network configuration information based on detected network configuration triggering information, the first generation unit 701 is further configured to: The validity of the target network distribution information is verified to obtain a verification result. If the verification result is successful, the step of generating a unique encrypted configuration package for each smart device based on the target network distribution information is executed. If the verification result is unsuccessful, the target network distribution information is marked as an invalid message, and the current network distribution process is terminated.
[0055] In this embodiment, for the first trigger execution method, the target network information validity verification operation is specifically as follows: based on the user identifier, it is determined whether there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server. If there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server, the verification result is determined to be passed (i.e. the target network information is valid); otherwise, the verification result is determined to be failed. For the second trigger execution method, the target network configuration information validity verification operation is specifically as follows: Within a preset judgment time, it is determined whether a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server. If a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server, the verification result is determined to be passed (i.e., the target network configuration information is valid); otherwise, the verification result is determined to be failed. If the verification result is failed, the target network configuration information is marked as an invalid message, and the current network configuration process is terminated. This invention avoids single points of failure and enhances the execution reliability of network configuration updates by verifying the validity of the target network configuration information.
[0056] In some embodiments, when the network distribution unit 704 executes the network configuration update step based on the received encrypted configuration packet by the online device, it is specifically used for: The encrypted configuration packet is decrypted using the pre-stored device private key to obtain plaintext data; target network configuration information is obtained based on the plaintext data; and network configuration updates are performed based on the target network configuration information.
[0057] In this embodiment, during the production line programming of the smart device's security chip, a unique key pair is generated using a secure random number generator. This pair includes a device public key and a device private key. The device private key is stored within the smart device's security chip and remains within the hardware itself. The device public key, along with the device's unique identifier, is uploaded to a cloud server. The cloud server encrypts the device public key and the target network configuration information using a preset encryption algorithm (such as RSA or ECC) to obtain a unique encrypted configuration package for the corresponding smart device. This invention uses an encrypted configuration package instead of directly distributing network configuration information, reducing the risk of data leakage and improving network reliability.
[0058] After receiving the encrypted configuration packet, the online device decrypts the encrypted configuration packet based on the preset encryption algorithm and the pre-stored device private key to obtain plaintext data; obtains the target network configuration information based on the plaintext data; performs network configuration updates based on the target network configuration information, and re-establishes a Wi-Fi connection with the cloud server.
[0059] In some embodiments, after performing the steps of issuing the encrypted configuration package and the P2P coordination instruction to each of the online devices, the distribution unit 704 is further configured to: The online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. The online device receives a response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credentials to obtain an authentication result. If the authentication result is successful, the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encrypted channel.
[0060] In this embodiment, the online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. After receiving the broadcast packet during the scanning period, the offline device identifies the broadcast packet as coming from a legitimate device within the same network group based on the broadcast identifier. The offline device generates a response signal containing its own unique device identifier based on the broadcast packet and sends it to the online device. The online device receives the response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication (such as challenge-response authentication) with the offline device based on the temporary credentials and obtains an authentication result. If the authentication result is successful, the online device and the offline device negotiate to generate a symmetric encryption key that belongs only to this Bluetooth session. A Bluetooth encryption channel is established based on the symmetric encryption key, and the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encryption channel.
[0061] In some embodiments, after performing the step of dividing each smart device into online devices and offline devices according to the online status of each smart device, the partitioning unit 702 is further configured to: The encrypted configuration packages of each offline device are stored in their respective offline message queues; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs network configuration updates.
[0062] In this embodiment, the encrypted configuration package of each offline device is stored in its corresponding offline message queue; after the smart device comes online, it will automatically send a pull request to the cloud server to pull the encrypted configuration package from its dedicated offline message queue and perform network configuration update.
[0063] This invention ensures that offline devices can promptly obtain and apply new network configurations after reconnection by storing the encrypted configuration packets of each offline device in their respective offline message queues, thereby reducing the need for manual intervention by users.
[0064] In some embodiments, before performing the step of dividing each smart device into online and offline devices based on the online status of each smart device, the partitioning unit 702 is further configured to: A heartbeat signal is periodically sent to each smart device; within a preset waiting time, the online status of smart devices that return a heartbeat packet based on the heartbeat signal is marked as online; within a preset waiting time, the online status of smart devices that do not return a heartbeat packet is marked as offline.
[0065] In this embodiment, heartbeat signals are periodically sent to each smart device based on long-connection protocols such as MQTT (Message Queuing Telemetry Transport) or WebSocket. Within a preset waiting time, the online status of smart devices that return heartbeat packets based on the heartbeat signals is marked as online. Within a preset waiting time, the online status of smart devices that do not return heartbeat packets is marked as offline. Based on the above heartbeat detection mechanism, the online status of each smart device is periodically obtained.
[0066] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned multi-device networking device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0067] The aforementioned multi-device networking device can be implemented as a computer program, which can, for example... Figure 4 It runs on the electronic device shown.
[0068] Please see Figure 4 , Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. The electronic device 800 can be a terminal or a server. The terminal can be an electronic device with communication functions. The server can be a standalone server or a server cluster composed of multiple servers.
[0069] See Figure 4 The electronic device 800 includes a processor 802, a memory, and a network interface 805 connected via a system bus 801. The memory may include a non-volatile storage medium 803 and internal memory 804.
[0070] The non-volatile storage medium 803 may store an operating system 8031 and a computer program 8032. The computer program 8032 includes program instructions that, when executed, cause the processor 802 to perform a multi-device networking method.
[0071] The processor 802 provides computing and control capabilities to support the operation of the entire electronic device 800.
[0072] The internal memory 804 provides an environment for the execution of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can execute a multi-device networking method.
[0073] This network interface 805 is used for network communication with other devices. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device 800 to which the present invention is applied. The specific electronic device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0074] The processor 802 is used to run a computer program 8032 stored in the memory to perform the following steps: A unique encrypted configuration package is generated for each smart device based on the detected network configuration trigger information; each smart device is divided into online and offline devices based on its online status; a P2P coordination command is generated based on the encrypted configuration packages of all offline devices; the unique encrypted configuration package and the P2P coordination command are sent to each online device so that the online device performs a network configuration update based on the received encrypted configuration package; the P2P coordination command is forwarded to each offline device through a Bluetooth encrypted channel so that each offline device performs a network configuration update based on the received P2P coordination command.
[0075] In some embodiments, when implementing the step of obtaining target network configuration information based on detected network configuration triggering information, the processor 802 specifically implements the following steps: The target network configuration information is obtained based on the detected network configuration trigger information; a unique encrypted configuration package is generated for each smart device based on the target network configuration information.
[0076] In this embodiment, a multi-source network configuration process triggering method is adopted. The first triggering execution method is as follows: when the user updates the Wi-Fi password or changes the router on the user terminal, the user terminal automatically generates network configuration triggering information containing the old and new SSIDs / Wi-Fi passwords, timestamps, and user identifiers and sends it to the cloud server; where SSID (Service SetIdentifier) is the wireless network name; The second trigger execution method is as follows: After a smart device connects to the new Wi-Fi via WPS (Wi-Fi Protected Setup) / network configuration, it automatically generates network configuration trigger information containing its unique device identifier, the new Wi-Fi's BSSID, SSID, and the router's security encryption type, and sends it to the cloud server; among which, BSSID (Basic Service Set Identifier) is the MAC address of a single wireless radio frequency interface of the router, and the smart device establishes a Wi-Fi connection with the cloud server through the router.
[0077] The cloud server extracts the target network configuration information from the received network configuration trigger information, including the SSID of the new Wi-Fi, the security encryption type of the router, and temporary credentials for P2P local authentication between smart devices; then, it generates a unique encrypted configuration package for each smart device based on the target network configuration information.
[0078] In some embodiments, after implementing the step of obtaining target network configuration information based on detected network configuration triggering information, the processor 802 further implements the following steps: The validity of the target network distribution information is verified to obtain a verification result. If the verification result is successful, the step of generating a unique encrypted configuration package for each smart device based on the target network distribution information is executed. If the verification result is unsuccessful, the target network distribution information is marked as an invalid message, and the current network distribution process is terminated.
[0079] In this embodiment, for the first trigger execution method, the target network information validity verification operation is specifically as follows: based on the user identifier, it is determined whether there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server. If there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server, the verification result is determined to be passed (i.e. the target network information is valid); otherwise, the verification result is determined to be failed. For the second trigger execution method, the target network configuration information validity verification operation is specifically as follows: Within a preset judgment time, it is determined whether a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server. If a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server, the verification result is determined to be passed (i.e., the target network configuration information is valid); otherwise, the verification result is determined to be failed. If the verification result is failed, the target network configuration information is marked as an invalid message, and the current network configuration process is terminated. This invention avoids single points of failure and enhances the execution reliability of network configuration updates by verifying the validity of the target network configuration information.
[0080] In some embodiments, when the processor 802 implements the network configuration update step based on the received encrypted configuration packet, the following steps are specifically implemented: The encrypted configuration packet is decrypted using the pre-stored device private key to obtain plaintext data; target network configuration information is obtained based on the plaintext data; and network configuration updates are performed based on the target network configuration information.
[0081] In this embodiment, during the production line programming of the smart device's security chip, a unique key pair is generated using a secure random number generator. This pair includes a device public key and a device private key. The device private key is stored within the smart device's security chip and remains within the hardware itself. The device public key, along with the device's unique identifier, is uploaded to a cloud server. The cloud server encrypts the device public key and the target network configuration information using a preset encryption algorithm (such as RSA or ECC) to obtain a unique encrypted configuration package for the corresponding smart device. This invention uses an encrypted configuration package instead of directly distributing network configuration information, reducing the risk of data leakage and improving network reliability.
[0082] After receiving the encrypted configuration packet, the online device decrypts the encrypted configuration packet based on the preset encryption algorithm and the pre-stored device private key to obtain plaintext data; obtains the target network configuration information based on the plaintext data; performs network configuration updates based on the target network configuration information, and re-establishes a Wi-Fi connection with the cloud server.
[0083] In some embodiments, after the processor 802 implements the steps of issuing the encrypted configuration package and the P2P coordination instruction to each of the online devices, it further implements the following steps: The online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. The online device receives a response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credentials to obtain an authentication result. If the authentication result is successful, the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encrypted channel.
[0084] In this embodiment, the online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. After receiving the broadcast packet during the scanning period, the offline device identifies the broadcast packet as coming from a legitimate device within the same network group based on the broadcast identifier. The offline device generates a response signal containing its own unique device identifier based on the broadcast packet and sends it to the online device. The online device receives the response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication (such as challenge-response authentication) with the offline device based on the temporary credentials and obtains an authentication result. If the authentication result is successful, the online device and the offline device negotiate to generate a symmetric encryption key that belongs only to this Bluetooth session. A Bluetooth encryption channel is established based on the symmetric encryption key, and the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encryption channel.
[0085] In some embodiments, after implementing the step of classifying each smart device into online and offline devices based on the online status of each smart device, the processor 802 further implements the following steps: The encrypted configuration packages of each offline device are stored in their respective offline message queues; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs network configuration updates.
[0086] In this embodiment, the encrypted configuration package of each offline device is stored in its corresponding offline message queue; after the smart device comes online, it will automatically send a pull request to the cloud server to pull the encrypted configuration package from its dedicated offline message queue and perform network configuration update.
[0087] This invention ensures that offline devices can promptly obtain and apply new network configurations after reconnection by storing the encrypted configuration packets of each offline device in their respective offline message queues, thereby reducing the need for manual intervention by users.
[0088] In some embodiments, before implementing the step of classifying each smart device into online and offline devices based on the online status of each smart device, the processor 802 also implements the following steps: A heartbeat signal is periodically sent to each smart device; within a preset waiting time, the online status of smart devices that return a heartbeat packet based on the heartbeat signal is marked as online; within a preset waiting time, the online status of smart devices that do not return a heartbeat packet is marked as offline.
[0089] In this embodiment, heartbeat signals are periodically sent to each smart device based on long-connection protocols such as MQTT (Message Queuing Telemetry Transport) or WebSocket. Within a preset waiting time, the online status of smart devices that return heartbeat packets based on the heartbeat signals is marked as online. Within a preset waiting time, the online status of smart devices that do not return heartbeat packets is marked as offline. Based on the above heartbeat detection mechanism, the online status of each smart device is periodically obtained.
[0090] It should be understood that, in this embodiment of the invention, the processor 802 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0091] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0092] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps: A unique encrypted configuration package is generated for each smart device based on the detected network configuration trigger information; each smart device is divided into online and offline devices based on its online status; a P2P coordination command is generated based on the encrypted configuration packages of all offline devices; the unique encrypted configuration package and the P2P coordination command are sent to each online device so that the online device performs a network configuration update based on the received encrypted configuration package; the P2P coordination command is forwarded to each offline device through a Bluetooth encrypted channel so that each offline device performs a network configuration update based on the received P2P coordination command.
[0093] In one embodiment, when the processor executes the program instructions to implement the step of obtaining target network configuration information based on detected network configuration triggering information, it specifically implements the following steps: The target network configuration information is obtained based on the detected network configuration trigger information; a unique encrypted configuration package is generated for each smart device based on the target network configuration information.
[0094] In this embodiment, a multi-source network configuration process triggering method is adopted. The first triggering execution method is as follows: when the user updates the Wi-Fi password or changes the router on the user terminal, the user terminal automatically generates network configuration triggering information containing the old and new SSIDs / Wi-Fi passwords, timestamps, and user identifiers and sends it to the cloud server; where SSID (Service SetIdentifier) is the wireless network name; The second trigger execution method is as follows: After a smart device connects to the new Wi-Fi via WPS (Wi-Fi Protected Setup) / network configuration, it automatically generates network configuration trigger information containing its unique device identifier, the new Wi-Fi's BSSID, SSID, and the router's security encryption type, and sends it to the cloud server; among which, BSSID (Basic Service Set Identifier) is the MAC address of a single wireless radio frequency interface of the router, and the smart device establishes a Wi-Fi connection with the cloud server through the router.
[0095] The cloud server extracts the target network configuration information from the received network configuration trigger information, including the SSID of the new Wi-Fi, the security encryption type of the router, and temporary credentials for P2P local authentication between smart devices; then, it generates a unique encrypted configuration package for each smart device based on the target network configuration information.
[0096] In one embodiment, after executing the program instructions to obtain target network configuration information based on detected network configuration triggering information, the processor further implements the following steps: The validity of the target network distribution information is verified to obtain a verification result. If the verification result is successful, the step of generating a unique encrypted configuration package for each smart device based on the target network distribution information is executed. If the verification result is unsuccessful, the target network distribution information is marked as an invalid message, and the current network distribution process is terminated.
[0097] In this embodiment, for the first trigger execution method, the target network information validity verification operation is specifically as follows: based on the user identifier, it is determined whether there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server. If there are any smart devices under the user that have reported a matching new SSID and successfully connected to the cloud server, the verification result is determined to be passed (i.e. the target network information is valid); otherwise, the verification result is determined to be failed. For the second trigger execution method, the target network configuration information validity verification operation is specifically as follows: Within a preset judgment time, it is determined whether a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server. If a second smart device in the same location has reported the same BSSID, the same router security encryption type, and successfully connected to the cloud server, the verification result is determined to be passed (i.e., the target network configuration information is valid); otherwise, the verification result is determined to be failed. If the verification result is failed, the target network configuration information is marked as an invalid message, and the current network configuration process is terminated. This invention avoids single points of failure and enhances the execution reliability of network configuration updates by verifying the validity of the target network configuration information.
[0098] In one embodiment, when the processor executes the program instructions to enable the online device to perform a network configuration update step based on the received encrypted configuration packet, the processor specifically implements the following steps: The encrypted configuration packet is decrypted using the pre-stored device private key to obtain plaintext data; target network configuration information is obtained based on the plaintext data; and network configuration updates are performed based on the target network configuration information.
[0099] In this embodiment, during the production line programming of the smart device's security chip, a unique key pair is generated using a secure random number generator. This pair includes a device public key and a device private key. The device private key is stored within the smart device's security chip and remains within the hardware itself. The device public key, along with the device's unique identifier, is uploaded to a cloud server. The cloud server encrypts the device public key and the target network configuration information using a preset encryption algorithm (such as RSA or ECC) to obtain a unique encrypted configuration package for the corresponding smart device. This invention uses an encrypted configuration package instead of directly distributing network configuration information, reducing the risk of data leakage and improving network reliability.
[0100] After receiving the encrypted configuration packet, the online device decrypts the encrypted configuration packet based on the preset encryption algorithm and the pre-stored device private key to obtain plaintext data; obtains the target network configuration information based on the plaintext data; performs network configuration updates based on the target network configuration information, and re-establishes a Wi-Fi connection with the cloud server.
[0101] In one embodiment, after executing the program instructions to send the encrypted configuration package and the P2P coordination instructions to each of the online devices, the processor further performs the following steps: The online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. The online device receives a response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credentials to obtain an authentication result. If the authentication result is successful, the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encrypted channel.
[0102] In this embodiment, the online device obtains a broadcast identifier, a list of devices to be updated, temporary credentials, and encrypted configuration packets for each offline device according to the P2P coordination command. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. After receiving the broadcast packet during the scanning period, the offline device identifies the broadcast packet as coming from a legitimate device within the same network group based on the broadcast identifier. The offline device generates a response signal containing its own unique device identifier based on the broadcast packet and sends it to the online device. The online device receives the response signal returned by the offline device based on the broadcast packet. The online device obtains the unique device identifier of the offline device based on the response signal. The online device determines whether the unique device identifier is included in the list of devices to be updated. If the unique device identifier is included in the list of devices to be updated, the online device performs two-way authentication (such as challenge-response authentication) with the offline device based on the temporary credentials and obtains an authentication result. If the authentication result is successful, the online device and the offline device negotiate to generate a symmetric encryption key that belongs only to this Bluetooth session. A Bluetooth encryption channel is established based on the symmetric encryption key, and the online device forwards the corresponding encrypted configuration packet to the offline device through the Bluetooth encryption channel.
[0103] In one embodiment, after executing the program instructions to classify each smart device into online and offline devices based on the online status of each smart device, the processor further implements the following steps: The encrypted configuration packages of each offline device are stored in their respective offline message queues; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs network configuration updates.
[0104] In this embodiment, the encrypted configuration package of each offline device is stored in its corresponding offline message queue; after the smart device comes online, it will automatically send a pull request to the cloud server to pull the encrypted configuration package from its dedicated offline message queue and perform network configuration update.
[0105] This invention ensures that offline devices can promptly obtain and apply new network configurations after reconnection by storing the encrypted configuration packets of each offline device in their respective offline message queues, thereby reducing the need for manual intervention by users.
[0106] In one embodiment, before executing the program instructions to classify each smart device into online and offline devices based on the online status of each smart device, the processor further implements the following steps: A heartbeat signal is periodically sent to each smart device; within a preset waiting time, the online status of smart devices that return a heartbeat packet based on the heartbeat signal is marked as online; within a preset waiting time, the online status of smart devices that do not return a heartbeat packet is marked as offline.
[0107] In this embodiment, heartbeat signals are periodically sent to each smart device based on long-connection protocols such as MQTT (Message Queuing Telemetry Transport) or WebSocket. Within a preset waiting time, the online status of smart devices that return heartbeat packets based on the heartbeat signals is marked as online. Within a preset waiting time, the online status of smart devices that do not return heartbeat packets is marked as offline. Based on the above heartbeat detection mechanism, the online status of each smart device is periodically obtained.
[0108] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0109] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0110] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0111] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0112] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0113] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for networking multiple devices, characterized in that, The method includes: Generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information; Based on the online status of each smart device, the smart devices are divided into online devices and offline devices; Generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices; The system sends its own encrypted configuration package and P2P coordination command to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package. The system then forwards the P2P coordination command to each of the offline devices through a Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination command.
2. The multi-device networking method according to claim 1, characterized in that, The step of generating a unique encrypted configuration package for each smart device based on the detected network configuration trigger information includes: Obtain target network configuration information based on detected network configuration trigger information; Based on the target network configuration information, a unique encrypted configuration package is generated for each smart device.
3. The multi-device networking method according to claim 2, characterized in that, After obtaining the target network configuration information based on the detected network configuration trigger information, the process further includes: The validity of the target distribution network information is verified, and the verification result is obtained; If the verification result is successful, proceed with the step of generating a unique encrypted configuration package for each smart device based on the target network configuration information; If the verification result is unsuccessful, the target distribution network information is marked as invalid and the current distribution network process is terminated.
4. The multi-device networking method according to claim 1, characterized in that, The online device performs a network configuration update based on the received encrypted configuration packet, including: The encrypted configuration packet is decrypted using the pre-stored device private key to obtain plaintext data; Obtain the target distribution network information based on the plaintext data; Perform network configuration updates based on the target network information.
5. The multi-device networking method according to claim 1, characterized in that, After issuing the encrypted configuration package and the P2P coordination instruction to each of the online devices, the method further includes: The online device obtains the broadcast identifier, the list of devices to be updated, the temporary credential, and the encrypted configuration package of each offline device according to the P2P coordination instruction. The online device broadcasts a broadcast packet carrying the broadcast identifier via Bluetooth Low Energy. The online device receives the response signal returned by the offline device based on the broadcast packet; The online device obtains the unique device identifier of the offline device based on the response signal; The online device determines whether the device's unique identifier is included in the list of devices to be updated; If the unique identifier of the device is included in the list of devices to be updated, the online device performs two-way authentication with the offline device based on the temporary credential to obtain the authentication result; If the authentication result is successful, the online device forwards the corresponding encrypted configuration package to the offline device via the Bluetooth encrypted channel.
6. The multi-device networking method according to claim 1, characterized in that, After classifying smart devices into online and offline devices based on their online status, the process further includes: The encrypted configuration packages of each offline device are stored in their respective offline message queues; after the smart device comes online, it retrieves the encrypted configuration package from its dedicated offline message queue and performs network configuration updates.
7. The multi-device networking method according to claim 1, characterized in that, Before classifying smart devices into online and offline devices based on their online status, the process also includes: It periodically sends heartbeat signals to various smart devices; Within a preset waiting time, the online status of the smart device that returns a heartbeat packet based on the heartbeat signal is marked as online; Within a preset waiting time, smart devices that do not return a heartbeat packet will be marked as offline.
8. A multi-device networking device, characterized in that, The device includes: The first generation unit is used to generate a unique encrypted configuration package for each smart device based on the detected network configuration trigger information. The segmentation unit is used to classify smart devices into online devices and offline devices based on their online status. The second generation unit is used to generate P2P coordination instructions based on the encrypted configuration packages of all the offline devices; The distribution unit is used to send the encrypted configuration package and the P2P coordination command to each of the online devices, so that the online devices can perform network configuration updates based on the received encrypted configuration package, and forward the P2P coordination command to each of the offline devices through the Bluetooth encrypted channel, so that each of the offline devices can perform network configuration updates based on the received P2P coordination command.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the multi-device networking method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the multi-device networking method as described in any one of claims 1-7.