Intelligent power distribution network system, method, device, medium and product

CN122825192APending Publication Date: 2026-09-25北京笑嘻兮创意科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611013882.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

智能设备通常不具备显示屏和键盘等输入界面,用户无法直接输入WiFi账户密码,因此需要通过特定的配网方式将网络配置信息传递给设备

Benefits of technology

[0026]在第五方面,本公开实施例提供了一种计算机程序产品,包括计算机程序指令,计算机程序指令被处理器执行时实现上述智能配网方法中的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122825192A_ABST
    Figure CN122825192A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of intelligent device network configuration, and in particular, to an intelligent network configuration system, method, device, medium and product. The intelligent network configuration system comprises an Internet of Things device and a mobile terminal. The mobile terminal is configured to acquire first identification information of an Internet of Things device to be configured, receive a Bluetooth signal sent by at least one Internet of Things device, wherein the Bluetooth signal carries second identification information of the corresponding Internet of Things device, and establish a Bluetooth low energy connection with a target Internet of Things device, wherein the target Internet of Things device is an Internet of Things device whose first identification information and second identification information are successfully matched. The mobile terminal is further configured to write network configuration data to the target Internet of Things device after the Bluetooth low energy connection is established. The target Internet of Things device is configured to connect to a target network based on the network configuration data, and feed back a network configuration result to the mobile terminal after connecting to the target network. The present disclosure can reduce the number of user operation steps and interface jumps, and improve the network configuration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the technical field of intelligent distribution networks, and more specifically, to an intelligent distribution network system, method, device, medium, and product. Background Technology

[0002] With the rapid development of IoT technology, network configuration for smart devices has become a key bottleneck restricting user experience. Smart devices typically lack input interfaces such as displays and keyboards, preventing users from directly entering their Wi-Fi account passwords. Therefore, specific network configuration methods are required to transmit network configuration information to the devices.

[0003] In related technologies, users typically need to manually switch WiFi lists, first connect to the hotspot created by the device, enter the target WiFi information, and then switch back to the original network. Because the network configuration process requires switching between the system WiFi settings interface and the network configuration application interface multiple times, the operation process is not seamless, resulting in insufficient network configuration efficiency. Summary of the Invention

[0004] This disclosure is made in view of the above-mentioned problems. This disclosure provides an intelligent power distribution system, method, device, medium, and product.

[0005] In a first aspect, embodiments of this disclosure provide an intelligent power distribution network system, which includes Internet of Things (IoT) devices and mobile terminals, wherein; A mobile terminal is used to acquire first identification information of an IoT device to be configured on a network; and to receive a Bluetooth signal emitted by at least one IoT device; wherein the Bluetooth signal carries second identification information of the corresponding IoT device; and to establish a Bluetooth Low Energy connection with a target IoT device; wherein the target IoT device is an IoT device whose first identification information and second identification information are successfully matched.

[0006] The mobile terminal is also used to write distribution network data to the target IoT device after establishing a Bluetooth Low Energy connection.

[0007] The target IoT device is used to connect to the target network based on distribution network data; and after connecting to the target network, it feeds back the distribution network results to the mobile terminal.

[0008] In one embodiment of the first aspect, the mobile terminal obtains first identification information of the IoT device to be configured on the network, for the purpose of: Scan the QR code set on the IoT device to be distributed to read the first identification information from the QR code.

[0009] In one embodiment of the first aspect, the distribution network data is encapsulated in a type-length-value format, which includes a type field, a length field, and a value field. The type field includes a service set identifier, a password, an encryption method, and a channel.

[0010] In one embodiment of the first aspect, after establishing a Bluetooth Low Energy connection and before the mobile terminal writes distribution network data to the target IoT device, the target IoT device is further configured to: Send a connection parameter update request to the mobile terminal.

[0011] The mobile terminal is used to update the connection interval to the compatible time range corresponding to the mobile terminal's operating system in response to the connection parameter update request, so as to meet the operating system's compatibility requirements for Bluetooth Low Energy connection.

[0012] In one embodiment of the first aspect, the target IoT device is further configured to: If a mismatch is detected between the encryption protocol used by the target network and the encryption protocol supported by the target IoT device, an instruction message is sent to the mobile terminal.

[0013] A mobile terminal is used to send switching commands to target IoT devices based on indication information.

[0014] The target IoT device is used to switch the encryption method to a target encryption protocol that matches the target network according to the switching instruction before establishing a connection.

[0015] In one embodiment of the first aspect, the mobile terminal is equipped with an iOS operating system, and the mobile terminal is further used for: During network configuration, the background running permission of the Bluetooth central device on the iOS operating system is enabled to maintain the activity of the Bluetooth Low Energy connection and automatically initiate a reconnection after an abnormal disconnection of the Bluetooth Low Energy connection is detected.

[0016] In one embodiment of the first aspect, the network distribution result includes a network distribution status code, which includes a network scan status code, an authentication status code, a network address acquisition status code, a cloud connection status code, and a binding status code. The feedback frame of the network distribution status code also carries at least one of an error details field, a signal strength field, and a retry count field.

[0017] In one embodiment of the first aspect, the target IoT device is further configured to: After connecting to the target network, receive device activation commands and user binding information sent by the mobile terminal within the same Bluetooth Low Energy connection session.

[0018] Based on the device activation command and user binding information, the system registers with the cloud and sends the registration result back to the mobile terminal via Bluetooth Low Energy connection.

[0019] In a second aspect, embodiments of this disclosure provide a smart distribution network method applied to a smart distribution network system including IoT devices and mobile terminals, the method comprising: The mobile terminal obtains the first identification information of the IoT device to be configured on the network.

[0020] The mobile terminal receives a Bluetooth signal from at least one Internet of Things (IoT) device; wherein the Bluetooth signal carries a second identification information of the corresponding IoT device.

[0021] The mobile terminal compares the first identification information with each of the second identification information, identifies the IoT device corresponding to the second identification information that matches the first identification information as the target IoT device, and establishes a Bluetooth Low Energy connection with the target IoT device.

[0022] After establishing a Bluetooth Low Energy connection, the mobile terminal writes distribution network data to the target IoT device.

[0023] The target IoT device connects to the target network based on the distribution network data, and after connecting to the target network, it sends the distribution network results back to the mobile terminal.

[0024] In a third aspect, embodiments of this disclosure provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps in the above-described intelligent power distribution method are performed.

[0025] In a fourth aspect, embodiments of this disclosure provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps in the above-described smart distribution network method.

[0026] In a fifth aspect, embodiments of this disclosure provide a computer program product, including computer program instructions, which, when executed by a processor, implement the steps in the above-described intelligent power distribution method.

[0027] As will be described in detail below, an intelligent power distribution system, method, device, medium, and product according to embodiments of this disclosure are provided. In embodiments of this disclosure, the intelligent power distribution system includes an Internet of Things (IoT) device and a mobile terminal. The mobile terminal is configured to acquire first identification information of an IoT device to be distributed to; receive Bluetooth signals emitted by at least one IoT device; wherein the Bluetooth signals carry second identification information corresponding to the IoT device; and establish a Bluetooth Low Energy (BLE) connection with a target IoT device; wherein the target IoT device is an IoT device whose first and second identification information are successfully matched. The mobile terminal is further configured to write power distribution data to the target IoT device after establishing the BLE connection. The target IoT device is configured to connect to a target network based on the power distribution data; and, after connecting to the target network, provide feedback on the power distribution result to the mobile terminal. Through the above processing method, users can obtain the first identification information without manually selecting a device from a WiFi list, and automatically lock the target IoT device and establish a connection between the target IoT device and the mobile terminal by matching the first and second identification information, thus shortening the connection establishment time. Then, the network configuration data is written via Bluetooth Low Energy, eliminating the need for users to input data step by step. Based on this data, the system automatically connects to the target network, eliminating the need for users to switch between the system's WiFi settings interface and the network configuration application multiple times. This allows the entire network configuration process to be completed continuously within a single application interface, significantly reducing user operation steps and interface switching times, thereby improving network configuration efficiency.

[0028] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0029] The above and other objects, features, and advantages of this disclosure will become more apparent from a more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The accompanying drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0030] Figure 1 This is an architecture diagram of an intelligent power distribution network system according to an embodiment of the present disclosure.

[0031] Figure 2 This is a schematic diagram of a TLV data frame format according to an embodiment of the present disclosure.

[0032] Figure 3 This is a schematic diagram of a power distribution network state machine transition according to an embodiment of the present disclosure.

[0033] Figure 4 This is a schematic diagram of a mini-program network configuration interface according to an embodiment of the present disclosure.

[0034] Figure 5 This is a schematic diagram of a multi-device batch network configuration scenario according to an embodiment of this disclosure.

[0035] Figure 6 This is a flowchart of an intelligent power distribution method according to an embodiment of the present disclosure.

[0036] Figure 7 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure.

[0037] Figure 8 This is a schematic diagram of a computer program product according to an embodiment of the present disclosure. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0039] Research has revealed that with the rapid development of IoT technology, network configuration for smart devices (such as AI cheering sticks, smart lights, and wearable devices) has become a key bottleneck restricting user experience. Smart devices typically lack input interfaces such as displays and keyboards, preventing users from directly entering their Wi-Fi account passwords. Therefore, specific network configuration methods are required to transmit network configuration information to the devices.

[0040] In related technologies, users typically need to manually switch WiFi lists, first connect to the hotspot created by the device, enter the target WiFi information, and then switch back to the original network. Because the network configuration process requires switching between the system WiFi settings interface and the network configuration application interface multiple times, the operation process is not seamless, resulting in insufficient network configuration efficiency.

[0041] To facilitate understanding of this embodiment, a smart distribution network system disclosed in this disclosure will first be described in detail. This smart distribution network system includes Internet of Things (IoT) devices and mobile terminals. See [link to relevant documentation]. Figure 1 The diagram shown is an architecture diagram of an intelligent power distribution system provided in this embodiment. The IoT device is equipped with an ESP32 series Bluetooth Low Energy (BLE)-WiFi dual-mode chip, and the mobile terminal has a WeChat mini-program embedded within it. That is, Figure 1 The ESP32 motherboard in the text can be understood as an IoT device, and the mini-program can be understood as a mobile terminal.

[0042] The mini-program transmits data to the ESP32 motherboard via a BLE GATT encrypted pass-through channel. The ESP32 motherboard transmits data to the wireless router via WiFi. The ESP32 motherboard is used for device registration with the cloud server.

[0043] Specifically, the mini-program includes a QR code scanning module, a BLE communication module, a network configuration UI module, and a status management module. The ESP32 motherboard includes a BLE stack, a WiFi Manager, a Config Parser, and an ESP32. The wireless router can be a 2.4GHz router with 802.11 b / g / n standard.

[0044] In this system, the ESP32 device acts as a BLE GATT Server, broadcasting Bluetooth signals and waiting for network configuration data. The mini-program acts as a BLE GATT Client, scanning a QR code to obtain the device identifier, establishing a connection, and writing the network configuration data. The mini-program version is compatible with iOS 11+ or Android 7.0+, and the device is not limited to ESP32; it can also be other BLE+WiFi chips.

[0045] The application scenarios of the intelligent network configuration system disclosed herein can be applied to concerts / sports events (where audiences use multiple light sticks simultaneously, requiring batch network configuration), offline activities (quickly establishing network connections for multiple devices), and smart homes (simplifying the process of adding new devices to the network), etc., without further examples here.

[0046] Specifically, the mobile terminal is used to acquire first identification information of the IoT device to be networked; and to receive Bluetooth signals emitted by at least one IoT device; wherein the Bluetooth signal carries second identification information of the corresponding IoT device; and to establish a Bluetooth Low Energy connection with the target IoT device; wherein the target IoT device is an IoT device whose first identification information and second identification information are successfully matched.

[0047] The mobile terminal is also used to write distribution network data to the target IoT device after establishing a Bluetooth Low Energy connection.

[0048] The target IoT device is used to connect to the target network based on distribution network data; and after connecting to the target network, it feeds back the distribution network results to the mobile terminal.

[0049] In one optional implementation, the mobile terminal obtains the first identification information of the IoT device to be configured on the network, for the purpose of: Scan the QR code set on the IoT device to be distributed to read the first identification information from the QR code.

[0050] In this disclosure, a QR code is affixed to the outer surface or packaging of the IoT device to be connected to the network. The QR code encodes the first identification information of the IoT device. Users can scan the QR code with a mobile terminal to decode the first identification information.

[0051] Here, the first identification information is the unique identifier of the IoT device to be configured on the network. It can be in the form of device serial number, product unique identifier or device universal unique identification code, etc., and is used to distinguish and identify a specific device to be configured on the network among multiple IoT devices.

[0052] This disclosure uses the AI ​​light stick as an example of an IoT device. Each AI light stick is assigned a unique device identifier at the factory, which is printed as a QR code on the light stick itself or its packaging. After scanning the QR code with a mobile device, the user can obtain the device identifier of the light stick.

[0053] The mobile terminal is also used to receive Bluetooth signals from at least one IoT device. During the network configuration preparation phase, the IoT device to be configured initializes its Bluetooth module after powering on, enters Bluetooth broadcast mode, and continuously sends out Bluetooth Low Energy broadcast signals. The Bluetooth signal carries a second identification information corresponding to the IoT device.

[0054] Since there may be multiple IoT devices in Bluetooth broadcast mode around the mobile terminal, the mobile terminal can receive Bluetooth signals emitted by multiple IoT devices at the same time. Each Bluetooth signal contains the second identification information of its respective source device (i.e., IoT device).

[0055] Here, the second identification information can be the Bluetooth address, device name, service universal unique identifier (UUID) of the IoT device, or device identification information carried in the vendor-defined data segment of the broadcast packet, used to uniquely identify the IoT device that emits the Bluetooth signal.

[0056] After this, the mobile terminal compares the acquired first identification information with the second identification information carried in each received Bluetooth signal. The mobile terminal can extract the corresponding second identification information from each received Bluetooth signal and compare it with the first identification information one by one.

[0057] When the second identification information carried in the Bluetooth signal matches the first identification information, the mobile terminal determines that the IoT device corresponding to the Bluetooth signal is the target device that needs to be configured for network connection, and identifies the device as the target IoT device, that is, the IoT device whose first identification information and second identification information are successfully matched.

[0058] In the above embodiments, this disclosure ensures that the mobile terminal can accurately locate the target device to be configured from multiple devices through the matching mechanism, avoiding the tedious operation of manually filtering from the device list by the user, thereby improving the efficiency of network configuration.

[0059] After identifying the target IoT device, the mobile terminal establishes a Bluetooth Low Energy connection with the target IoT device.

[0060] Specifically, the mobile terminal obtains the Bluetooth connection parameters of the target IoT device based on the successfully matched second identification information, and initiates a Bluetooth connection request to the target IoT device. After the target IoT device hears the Bluetooth connection request, it establishes a Bluetooth Low Energy connection with the mobile terminal.

[0061] In Bluetooth Low Energy (BLE) connections, IoT devices act as Generic Attribute Profile (GATT) servers, while mobile terminals act as GATT clients. Both parties then exchange data via the GATT protocol.

[0062] Furthermore, after establishing a Bluetooth Low Energy connection with the target IoT device and before officially writing the distribution network data, the mobile terminal also performs a device capability negotiation step.

[0063] Specifically, the mobile terminal sends a capability query request to the target IoT device via Bluetooth Low Energy. After receiving the capability query request, the target IoT device encapsulates its supported capability information into capability response data and returns it to the mobile terminal via Bluetooth Low Energy.

[0064] The capability information includes the maximum transmission unit size supported by the target IoT device, the maximum data length of a single packet, whether encrypted transmission is supported, whether network connections that support hidden service set identifiers are supported, firmware version number, and chip type, etc.

[0065] After receiving and parsing the capability response data, the mobile terminal dynamically selects the optimal network configuration strategy based on the capability information of the target IoT device.

[0066] If the maximum transmission unit supported by the target IoT device is less than the preset threshold, the mobile terminal will enable the packet transmission mode, dividing the distribution network data into multiple small packets and sending them sequentially.

[0067] If the target IoT device supports encrypted transmission, the mobile terminal will enable encrypted transmission mode to encrypt the distribution network data before writing it.

[0068] If the target IoT device supports batch network configuration mode, the mobile terminal enables parallel network configuration mode and sends network configuration data to multiple IoT devices simultaneously.

[0069] If the target IoT device supports network connectivity that hides the service set identifier, the mobile terminal carries an explicit value of the service set identifier in the network configuration data.

[0070] The protocol format for capability negotiation includes the capability query request frame format and the device capability response frame format. The capability query request frame format is shown in Table 1, and the device capability response frame format is shown in Table 2.

[0071] In this embodiment of the disclosure, the smart distribution network system also supports OTA (Over-The-Air) firmware upgrades for IoT devices via Bluetooth Low Energy (BLE) connection. The mobile terminal is further configured to send firmware upgrade commands and firmware data to the target IoT device via a predetermined OTA control feature value while maintaining the BLE connection; the target IoT device is configured to receive the firmware upgrade commands and firmware data via the OTA control feature value, perform the firmware upgrade operation, and feed back the upgrade progress and results to the mobile terminal via BLE connection.

[0072] Specifically, the mobile terminal first sends a firmware version query command (0x01) to the IoT device via the OTA_Control feature value (0xFE99), and the IoT device returns the current firmware version number. Then, the mobile terminal compares the returned firmware version with the latest firmware version in the cloud. If the firmware version in the cloud is higher than the current version, the user is prompted to upgrade.

[0073] After the user confirms the upgrade, the mobile terminal obtains firmware data from the cloud. The mobile terminal can send a start upgrade command (0x03) through the OTA_Control feature value. After receiving the command, the IoT device prepares storage space and returns a ready state (0x00).

[0074] Based on this, the mobile terminal segments the firmware data into multiple data packets and sends a firmware data transmission command to the IoT device packet by packet using the OTA_Control feature. After receiving any data packet, the IoT device returns a transmission confirmation message to ensure the complete transmission of the firmware data. After the firmware data transmission is complete, the mobile terminal sends a firmware verification command to the IoT device using the OTA_Control feature to verify the integrity of the firmware data.

[0075] After successful verification, the mobile terminal sends an activation firmware command to the IoT device via the OTA_Control feature value. Upon receiving the activation firmware command, the IoT device writes the new firmware to its boot partition, performs a reboot, and switches to the new firmware version for startup. After successful boot, the IoT device re-establishes the Bluetooth Low Energy connection and returns a successful upgrade status to the mobile terminal.

[0076] Table 1

[0077] Table 2

[0078] After establishing a Bluetooth Low Energy connection, the mobile terminal writes distribution network data to the target IoT device.

[0079] Here, the network configuration data at least includes the connection parameters of the target network, which is the wireless network to which the IoT device needs to connect. This network configuration data includes the network name and password of the target network, and may also include information such as encryption method, channel, and network address; however, no further examples are provided in this disclosure.

[0080] After the Bluetooth Low Energy connection is established, the mobile terminal encapsulates the network distribution data into data packets and sends the network distribution data to the target IoT device through the write operation of the general attribute configuration file, so that the target IoT device can receive and store the network distribution data.

[0081] In this embodiment of the disclosure, the data transmission between the target IoT device and the mobile terminal in the distribution network adopts an application-layer reliable transmission protocol. It does not rely on the write callback confirmation at the bottom layer of the BLE protocol stack, but instead independently builds the confirmation and retransmission mechanism at the application layer.

[0082] Specifically, after receiving the network distribution data sent by the mobile terminal, the target IoT device performs cyclic redundancy check at the application layer to verify the integrity of the data; after the check passes, it returns a transport layer confirmation message to the mobile terminal to confirm that the data packet has been completely received.

[0083] After receiving, parsing, and executing the distribution network data, the target IoT device returns a business layer confirmation message (ACK) to the mobile terminal. The business layer confirmation message carries the business execution status of the distribution network.

[0084] Meanwhile, after sending the network configuration data, the mobile terminal starts a timeout timer. If no confirmation information is received from the target IoT device within the preset timeout period, the data is retransmitted using an exponential backoff method. The format of the ACK type is shown in Table 4-A, and the binary format of the ACK frame is shown in Table 4-B.

[0085] Table 4-A

[0086] Table 4-B

[0087] After receiving the distribution network data, the target IoT device connects to the target network according to the connection parameters contained in the distribution network data. These connection parameters include the target network's network name, password, and encryption method.

[0088] Specifically, after receiving the network configuration data, the target IoT device switches its current operating mode from Bluetooth broadcast mode to wireless workstation mode. Then, the target IoT device parses the network configuration data, extracts information such as the target network name, password, and encryption method, scans and discovers the target network, and finally uses the extracted password and encryption method to authenticate and associate, completing the connection with the target network.

[0089] After the target IoT device completes its connection with the target network, it sends the network configuration results to the mobile terminal in the form of a notification through the established Bluetooth Low Energy connection.

[0090] The network configuration result includes indications of successful or failed network configuration. When network configuration fails, the result may also include information about the reason for the failure, such as incorrect password, network not found, or connection timeout.

[0091] After receiving the network configuration result, the mobile terminal displays the result to the user through the user interface, informing the user whether the network configuration was successful.

[0092] In this embodiment of the disclosure, the first identification information of the IoT device to be configured is obtained by the mobile terminal, and the first identification information is matched with the second identification information carried in each Bluetooth signal. This enables the target device to be accurately located from multiple Bluetooth broadcasting devices and a Bluetooth Low Energy connection to be established, avoiding the manual operation of the user to select the device.

[0093] Furthermore, the mobile terminal writes network configuration data to the target device in a single step via Bluetooth Low Energy connection. The device automatically connects to the target network based on this data, and the entire network configuration process is completed automatically between the mobile terminal and the device. Users only need to obtain the device identification information in the initial stage; subsequent steps require no manual intervention, significantly simplifying the network configuration operation process. Finally, the device automatically reports the results after connecting to the network, allowing users to promptly obtain information about the network configuration status.

[0094] In the above implementation, users can obtain the first identification information without manually selecting devices from the WiFi list. By matching the first and second identification information, the target IoT device is automatically locked, and a connection is established between the target IoT device and the mobile terminal, shortening the connection establishment time. Then, the network configuration data is written via Bluetooth Low Energy, eliminating the need for users to input data step by step. Based on this network configuration data, the system automatically connects to the target network. This eliminates the need for users to switch between the system WiFi settings interface and the network configuration application multiple times, allowing the entire network configuration process to be completed continuously within a single application interface. This significantly reduces user operation steps and interface switching times, thereby improving network configuration efficiency.

[0095] In one optional implementation, the distribution network data is encapsulated in a type-length-value format, which includes a type field, a length field, and a value field. The type field includes a service set identifier, password, encryption method, and channel.

[0096] In this embodiment of the disclosure, the distribution network data is encapsulated using a custom Type-Length-Value (TLV) binary format to reduce the data packet size and improve Bluetooth Low Energy transmission efficiency.

[0097] Among them, the Type field (Type): occupies 1 byte and is used to identify the data type carried by the current data unit; the Length field (Length): occupies 1 byte and is used to identify the data length of the Value field; the Value field (Value): the length is specified by the Length field and is used to carry the actual data content.

[0098] Therefore, the distribution network data is composed of multiple TLV data units concatenated sequentially, with each data unit independently encoding a distribution network parameter item.

[0099] like Figure 2 The diagram illustrates a TLV data frame format provided in an embodiment of this disclosure. The predefined values ​​for the type field include 0x01 representing the Service Set Identifier (SSID), 0x02 representing the password, 0x03 representing the encryption method, and 0x04 representing the channel. When a mobile terminal writes distribution network data to an IoT device, it sequentially constructs the aforementioned TLV data units, assembles them into a complete data frame, and sends it to the IoT device.

[0100] In this embodiment of the disclosure, after receiving the distribution network data frame via Bluetooth Low Energy connection, the IoT device parses each data unit sequentially according to the TLV format to extract connection parameters such as service set identifier, password, encryption method and channel for subsequent target network connection.

[0101] This disclosure employs compact TLV binary encoding, reducing redundant field names and character overhead. In BLE scenarios, this significantly reduces the number of packets, improves transmission efficiency, and lowers device-side parsing costs. The TLV fields are shown in Table 3.

[0102] Table 3

[0103] In an optional implementation, after establishing a Bluetooth Low Energy connection and before the mobile terminal writes distribution network data to the target IoT device, the target IoT device is further configured to: Send a connection parameter update request to the mobile terminal.

[0104] The mobile terminal is used to update the connection interval to the compatible time range corresponding to the mobile terminal's operating system in response to the connection parameter update request, so as to meet the operating system's compatibility requirements for Bluetooth Low Energy connection.

[0105] In the Bluetooth Low Energy protocol, the connection interval refers to the time interval between two data communications between the master and slave devices. A shorter connection interval results in higher real-time performance and reliability of data transmission, but also increases the power consumption requirements of the device. An excessively long connection interval may lead to increased data transmission latency and decreased connection stability.

[0106] Different operating systems have different compatibility requirements for Bluetooth Low Energy (BLE) connection intervals. For example, iOS has extremely strict compliance requirements for BLE connection parameters, requiring the connection interval to be between 20 and 40 milliseconds. If the connection interval is less than 20 milliseconds or greater than 40 milliseconds, the iOS system may refuse to establish a connection or actively disconnect after the connection is established.

[0107] Taking the iOS operating system as an example, mobile terminals will update the connection interval to the range of 20 to 40 milliseconds to meet the compatibility requirements of the iOS system for Bluetooth Low Energy connections.

[0108] Therefore, after an IoT device establishes a Bluetooth Low Energy connection with a mobile terminal, if the current connection parameters on the device do not meet the compatibility requirements of the mobile terminal's operating system, the connection parameters need to be updated to ensure stable connection and reliable data transmission.

[0109] In the above embodiments, IoT devices actively adapt to the BLE connection parameter requirements of different operating systems, eliminating the need for manual configuration by users. This enables cross-platform connectivity and allows for the updating of connection intervals to within the operating system's compatibility range, ensuring the reliability of data transmission during network configuration.

[0110] In an optional implementation, the target IoT device is further used to: If a mismatch is detected between the encryption protocol used by the target network and the encryption protocol supported by the target IoT device, an instruction message is sent to the mobile terminal.

[0111] A mobile terminal is used to send switching commands to target IoT devices based on indication information.

[0112] The target IoT device is used to switch the encryption method to a target encryption protocol that matches the target network according to the switching instruction before establishing a connection.

[0113] In this embodiment of the disclosure, after receiving the distribution network data, the target IoT device extracts the network name and encryption method information of the target network from the distribution network data.

[0114] Before attempting to connect to the target network, the target IoT device first parses the actual encryption protocol type used by the target network, and then compares the encrypted protocol of the target network obtained by parsing with the list of encryption protocols supported by its own WiFi protocol stack.

[0115] If the encryption protocol of the target network exists in its list of supported encryption protocols, it is considered a match, and the target IoT device connects directly according to the encryption method in the configuration data; if the encryption protocol of the target network does not exist in its list of supported encryption protocols, it is considered a mismatch.

[0116] For example, if the target network uses WPA3 encryption, but the target IoT device's WiFi module only supports WPA2 or earlier versions, the target IoT device will determine that the encryption protocols are incompatible. WPA (Wi-Fi Protected Access) is an encryption protocol used to protect the security of wireless networks.

[0117] When the target IoT device detects an encryption protocol mismatch, it sends an indication message to the mobile terminal through the established Bluetooth Low Energy connection. This indication message is used to inform the mobile terminal that an encryption protocol mismatch exists. The indication message includes information such as the encryption protocol type actually used by the target network, the list of encryption protocols supported by the target IoT device itself, and the error type of the encryption protocol mismatch.

[0118] When the target network uses WPA3 but the IoT device only supports WPA2, the switching command generated by the mobile terminal instructs the IoT device to switch the encryption method to WPA2 and connect to the target network using WPA2 encryption.

[0119] When the target network uses WPA2 and the IoT device supports both WPA2 and WPA3, the mobile terminal generates a switching command to instruct the IoT device to connect in WPA2 mode.

[0120] After receiving the switching command from the mobile terminal, the target IoT device updates its local connection configuration parameters according to the target encryption protocol specified in the switching command, switching the encryption method to the target encryption protocol. After completing the encryption method switch, the target IoT device initiates a connection request to the target network using the switched target encryption protocol to complete the authentication and association process.

[0121] In the above embodiments, the intelligent distribution network system of this disclosure can support both new devices accessing old networks and old devices accessing new networks, thereby improving the universality and compatibility of the distribution network solution and automatically resolving connection failures caused by mismatched encryption protocols, thus improving the success rate of intelligent distribution networks.

[0122] In one optional implementation, the mobile terminal is equipped with the iOS operating system, and the mobile terminal is also used for: During network configuration, the background running permission of the Bluetooth central device on the iOS operating system is enabled to maintain the activity of the Bluetooth Low Energy connection and automatically initiate a reconnection after an abnormal disconnection of the Bluetooth Low Energy connection is detected.

[0123] Furthermore, existing BLE configuration solutions are primarily designed for the Android platform and do not fully consider the specific limitations of the iOS system. The iOS BLE / WiFi restriction list includes WiFi hotspot restrictions, BLE connection parameter restrictions, background scanning restrictions, and user authorization requirements.

[0124] Among the limitations, WiFi hotspots cannot be created directly by the app; additional EnterpriseEntitlements authentication is required.

[0125] BLE connection parameter limitations: iOS requires the BLE connection interval (connInterval) to be within the range of 20-40ms, otherwise it will lead to unstable connection or even disconnection.

[0126] Background scanning limitation: The BLE scanning function is limited when the app is in the background, and continuous discovery cannot be achieved.

[0127] User authorization requirements: The app requires manual authorization from the user when switching WiFi networks.

[0128] It is known that under the iOS system, the App cannot automatically create SoftAP hotspots, BLE connection parameters have a strict 20-40ms limit, and the App needs to manually confirm the switching of WiFi. As a result, the existing solution faces problems such as low degree of automation in network configuration, unstable connection, and poor WPA3 compatibility under the iOS platform.

[0129] In response, the mobile terminal requests background running permissions from the iOS operating system at the start of the network configuration process. After obtaining system authorization, the mobile terminal enters the background running permissions of the Bluetooth central device.

[0130] In this mode, even if the mobile terminal's network configuration application is switched to the background, the system still allows the application to maintain the Bluetooth Low Energy connection and continue to interact with the target IoT device.

[0131] Enabling background operation permissions for the Bluetooth central device ensures that during the network configuration process, regardless of whether the user keeps the network configuration application in the foreground, the Bluetooth Low Energy connection between the mobile terminal and the target IoT device will not be forcibly suspended by the system due to the application entering the background.

[0132] When the mobile terminal detects an abnormal disconnection of the Bluetooth Low Energy connection, it automatically initiates a reconnection process without requiring manual operation from the user.

[0133] In addition, after detecting a disconnection, the mobile terminal can attempt to reconnect at preset time intervals (e.g., 1 second) until the reconnection is successful or the preset maximum number of reconnection attempts is reached.

[0134] The above implementation significantly reduces the network configuration failure rate caused by connection interruption through a dual protection mechanism of background keep-alive and automatic reconnection. Furthermore, users do not need to keep the application in the foreground during the network configuration process; they can freely use other functions of their phone. The network configuration process is completed automatically in the background, and a notification is received upon completion, thereby optimizing the user experience.

[0135] In one optional implementation, the network distribution result includes a network distribution status code, which includes a network scan status code, an authentication status code, a network address acquisition status code, a cloud connection status code, and a binding status code. The feedback frame of the network distribution status code also carries at least one of an error details field, a signal strength field, and a retry count field.

[0136] In this embodiment of the disclosure, the target IoT device divides the entire power distribution process into multiple consecutive power distribution stages, and feeds back the corresponding power distribution status code to the mobile terminal at each stage. Through the power distribution status code, the mobile terminal and the user can understand the current stage of the power distribution and the execution results of each stage in real time.

[0137] Specifically, after receiving the network configuration data, the target IoT device first scans the surrounding WiFi networks to confirm whether the target network is within signal coverage and can be detected. During this stage, the target IoT device sends back a network scan status code to indicate whether the scan was successfully completed.

[0138] After scanning for the target network, the target IoT device initiates an authentication request to the target network using the password and encryption method from the network configuration data. At this stage, the target IoT device returns an authentication status code to indicate whether the authentication was successful. If authentication fails, the status code can further distinguish whether the failure was due to an incorrect password or a mismatched encryption method.

[0139] After authentication, the target IoT device requests a network address from the target network. At this stage, the target IoT device returns a network address acquisition status code to indicate whether the network address was successfully acquired.

[0140] After obtaining a network address, the target IoT device attempts to establish a connection with the cloud server and register the device based on the pre-configured cloud server address. During this stage, the target IoT device sends back a cloud connection status code to indicate whether the cloud connection was successful.

[0141] After completing cloud registration, the target IoT device performs a binding operation with the user account. During this stage, the target IoT device sends a binding status code to indicate whether the binding was successful.

[0142] In addition to the aforementioned status code fields, the feedback frame of the distribution network status code in this disclosure also includes extended diagnostic fields, such as error details, signal strength, and retry count.

[0143] The error details field carries supplementary information about the current status. The signal strength field indicates the target network signal strength detected by the target IoT device. The retry count field records the number of retries performed during the current network configuration phase. The status code field is shown in Table 5.

[0144] Table 5

[0145] In the above implementation, users can understand the specific stage of the current distribution network in real time based on the distribution network results, accurately locate the specific stage and cause of the failure, and improve the success rate of users solving distribution network problems on their own.

[0146] In an optional implementation, the target IoT device is further used to: After connecting to the target network, receive device activation commands and user binding information sent by the mobile terminal within the same Bluetooth Low Energy connection session.

[0147] Based on the device activation command and user binding information, the system registers with the cloud and sends the registration result back to the mobile terminal via Bluetooth Low Energy connection.

[0148] In this embodiment of the disclosure, after the target IoT device successfully connects to WiFi, it maintains a communication link with the mobile terminal based on a common attribute profile. By maintaining the same session, the mobile terminal can continue to send subsequent instructions and data to the target IoT device without having to rescan and reconnect to it after network configuration is completed.

[0149] Among them, a session of the same Bluetooth Low Energy connection refers to the complete communication cycle from the establishment of a Bluetooth Low Energy connection between the mobile terminal and the target IoT device to the completion of network configuration, activation, binding and the active release of the connection.

[0150] After the target IoT device successfully connects to the target network, the mobile terminal sends a device activation command to the target IoT device through the maintained Bluetooth Low Energy connection.

[0151] The device activation instruction is used to instruct the target IoT device to perform an activation operation. The device activation instruction contains the information required for the target IoT device to register in the cloud system, such as device identifier, device model, device firmware version, etc.

[0152] After receiving the device activation command, the target IoT device sends an activation request to the cloud server via the target network, creates a device record in the cloud, and completes device registration. Upon successful activation, the target IoT device obtains a cloud device identifier.

[0153] During or after device activation, the mobile terminal sends user binding information to the target IoT device via the same Bluetooth Low Energy connection.

[0154] The user binding information is used to associate the target IoT device with the current user's account. The user binding information may include information such as user token, user authorization code or user account identifier, which is used to prove the identity of the user currently logged in on the mobile terminal to the cloud server.

[0155] After receiving the user's binding information, the target IoT device sends the user binding information along with the device activation information to the cloud server. After verifying the validity of the user binding information, the cloud server associates the target IoT device with the corresponding user's account, completing the binding between the device and the user.

[0156] After the target IoT device completes device activation and user binding, it sends the registration result back to the mobile terminal via Bluetooth Low Energy connection.

[0157] The registration result includes information indicating whether activation and binding were successful. If activation or binding fails, the registration result also includes information about the reason for the failure, such as cloud server unreachable, user token expired, or device identifier duplicated.

[0158] In this embodiment, the steps of reopening the application after network configuration, manually refreshing the device list, and manually performing binding are eliminated, significantly shortening the total time from network configuration to device usability. Furthermore, the device completes activation and binding immediately within the same session after establishing a WiFi connection, improving real-time device responsiveness. The integrated session flow is shown in Table 6.

[0159] Table 6

[0160] In this embodiment of the disclosure, when the mobile terminal initiates network configuration, it generates a cloud authentication token and writes it into the extended field of the WiFi configuration frame. Then, after the device connects to the network, it uses the cloud authentication token to directly call the cloud integrated interface to avoid repeated authentication. The cloud authentication token is valid for 30 minutes, and network configuration needs to be re-initiated after the timeout.

[0161] Because BLE connections may be interrupted (e.g., when a mini-program switches to the background or Bluetooth jitter occurs), this disclosure introduces the concept of a network configuration session. After a disconnection, the device's current progress can be queried via session_id, and it supports resuming transmission from the last acknowledgment packet, avoiding the need for users to start network configuration from scratch due to mini-program switching to the background or Bluetooth jitter. The fields of the session are shown in Table 7.

[0162] Table 7

[0163] In this embodiment, the cached WiFi configuration data (wifi_config_cached) employs a multi-layered encryption protection mechanism to ensure the security of the network configuration data during local storage and transmission on the device. Overall, the target IoT device uses the AES-128-CBC encryption algorithm to encrypt and store the network configuration data. The encryption key is the device-unique key of the target IoT device, which is generated from the hardware identification information of the target IoT device through a key derivation function. The mobile terminal stores the network configuration data through the iOS Keychain.

[0164] Specifically, the target IoT device uses Flash encryption (e.g., AES-XTS-256) to fully encrypt and protect the storage area. The Flash encryption key is generated by the hardware security module and stored in the secure storage area when the device leaves the factory. It is automatically loaded every time the device starts up, and the data in the storage layer is encrypted and decrypted in real time. The wifi_config_cached field is automatically encrypted by the Flash encryption module when written to Flash storage and automatically decrypted when read. The upper-layer application does not need to be aware of the encryption and decryption process.

[0165] Building upon Flash encryption, the wifi_config_cached field is further protected by independent encryption using the AES-128-CBC encryption algorithm at the application layer. The encryption key generated by AES-128-CBC is the unique key for the target IoT device, which is calculated from the hardware identification information using a key derivation function to obtain a 128-bit root key.

[0166] When the mobile terminal is running the iOS operating system, it stores network configuration-related data through the iOS Keychain service. iOS Keychain is a system-level secure storage service that provides hardware-level encryption protection. Data stored in the Keychain is automatically encrypted using AES-256-GCM by the iOS system and can only be decrypted and read by authorized applications.

[0167] In this embodiment of the disclosure, the mobile terminal initiates network configuration, generates a session_id, and writes it to the device. If the BLE connection is lost during the network configuration process (for example, the mini program switches to the background), the mini program reconnects to the device and queries the progress through the Query Session command. The Write format is: [0xF0][session_id(16B)]. Response format: [step_index][last_ack][session_expire].

[0168] If step_index < 6, it means that the network configuration process for this session has not been fully completed. Then, it further checks whether the session has expired. If the session has not expired, the mini-program continues to send from step_index + 1; if the session has expired, it is reset and starts from the beginning.

[0169] The value of step_index ranges from 0 to 5, where 0 = step 1, 1 = step 2, 2 = step 3, 3 = step 4, 4 = step 5, and 5 = step 6. When step_index = 5, it means that all 6 steps have been completed. Correspondingly, if step_index = 1 means step 1, then the value of step_index ranges from 1 to 6. The above step_index < 7 indicates that the network configuration process for this session has not yet been fully completed.

[0170] In addition, this disclosure also provides code for initializing the ESP32 network configuration service, as shown below.

[0171] / / BLE network configuration service initialization void ble_prov_init(void) { / / Define the UUID for network configuration services esp_uuid_t service_uuid = { .uuid = { .len = ESP_UUID_TYPE_16, .uuid.uuid16 = 0xFE95 } }; / / Add WiFi configuration features esp_gatt_char_prop_t wifi_config_prop = ESP_GATT_CHAR_PROP_BIT_WRITE; add_characteristic(PROV_CHAR_WIFI_CONFIG, wifi_config_prop, &wifi_config_callback); / / Add configuration status feature value esp_gatt_char_prop_t status_prop = ESP_GATT_CHAR_PROP_BIT_NOTIFY; add_characteristic(PROV_CHAR_STATUS, status_prop,&status_callback); } / / WiFi configuration data processing callback static void wifi_config_callback(uint8_t data, uint16_t len) { / / Parse TLV format data uint8_t ssid

[32] = {0}; uint8_t password

[64] = {0}; uint8_t security = 0; parse_tlv_data(data, len, ssid, password,&security); / / Try connecting to WiFi (supports WPA3 downgrade) wifi_connect_with_fallback(ssid, password, security); } / / iOS connection parameter optimization static void update_iOS_connection_params(esp_gatt_conn_params_t params) { params->min_int = 20; / / Minimum connection interval: 20ms params->max_int = 40; / / Maximum connection interval 40ms params->latency = 0; / / Slave latency 0 params->timeout = 500; / / Timeout duration 500ms esp_ble_gap_update_conn_params(params); } The code for the core logic of BLE network configuration in the mobile terminal mini-program is shown below.

[0172] / / Core process of BLE network configuration in WeChat Mini Program async function startProvisioning(deviceUuid, ssid, password) { / / Start BLE scan const device = await bleScanAndMatch(deviceUuid); if (!device) { throw new Error('Device not found'); } / / Establish GATT connection const gattServer = await device.connect(); const service = await gattServer.getService(PROV_SERVICE_UUID); const wifiConfigChar = await service.getCharacteristic(WIFI_CONFIG_UUID); / / Construct TLV format data const tlvData = buildTLVData(ssid, password); / / Write WiFi configuration await wifiConfigChar.writeValue(tlvData); / / Monitor network configuration status const statusChar = await service.getCharacteristic(STATUS_UUID); statusChar.onCharacteristicValueChange((value) =>{ const status = parseStatus(value); if (status === 'SUCCESS') { onProvisioningSuccess(); } }); } / / TLV data construction function buildTLVData(ssid, password) { const tlvBuffer = new ArrayBuffer(256); const view = new DataView(tlvBuffer); let offset = 0; / / Type 0x01: SSID view.setUint8(offset++, 0x0E); view.setUint8(offset++, 0x01); for (let i = 0; i<ssid.length; i++) { view.setUint8(offset++, ssid.charCodeAt(i)); } / / Type 0x02: Password view.setUint8(offset++, password.length + 1); view.setUint8(offset++, 0x02); for (let i = 0; i<password.length; i++) { view.setUint8(offset++, password.charCodeAt(i)); } / / Type 0x03: Security (WPA2) view.setUint8(offset++, 0x01); view.setUint8(offset++, 0x03); view.setUint8(offset++, 0x02); return tlvBuffer.slice(0, offset); } like Figure 3 The diagram shown is a schematic representation of a power distribution network state machine transition according to an embodiment of this disclosure. Figure 3 These include IDLE (initial standby state), CONNECTING (Bluetooth connection in progress), CONNECTED (Bluetooth connected, network configuration in progress), SUCCESS (network configuration successful final state), and FAILED (network configuration failed abnormal state).

[0173] IDLE (Initial Standby State): The default state when the device is powered on, with no Bluetooth connection and no network configuration; it continuously broadcasts the BLE device identifier, waiting for the mini-program to scan the code. Triggering redirection: The mini-program scans for and matches the device and initiates a GATT connection request → enters CONNECTING.

[0174] CONNECTING: The mini-program establishes a BLE GATT handshake with the ESP32, simultaneously performing iOS adaptation optimizations: forcibly setting the Bluetooth connection interval to 20-40ms, negotiating device capabilities, and creating a network configuration session. Branch transitions: Handshake and parameter negotiation complete → enter CONNECTED; Bluetooth timeout, user cancellation, device unresponsive → directly enter FAILED.

[0175] CONNECTED (Bluetooth connected, network configuration in progress) indicates a stable Bluetooth link and is the core phase of network configuration. This includes: the mini-program sending TLV binary WiFi parameters; device packet reassembly, CRC verification, and ACK response transmission; device switching WiFi STA mode scanning and connecting to the router (automatic WPA3 downgrade to WPA2); DHCP IP acquisition, cloud device activation, and integrated user binding. During this phase, real-time diagnostic status codes will be continuously pushed via BLE Notify. Branch transitions: No issues with WiFi connection or cloud binding → SUCCESS; Password error, encryption incompatibility, DHCP failure, cloud registration timeout, or retransmission exhaustion → FAILED.

[0176] SUCCESS (Final state of successful network configuration): The entire process is complete, the device is connected to the network and bound to the user; BLE pushes a success code of 0xFF. Two exit logics: The user does not need Bluetooth and can actively disconnect BLE, while the device remains online and working normally via WiFi; Device restart / the mini-program re-initiates the network configuration command → reverts to IDLE.

[0177] FAILED (Network Configuration Failure Abnormal State): This state is entered when any step fails. The device will report a precise fault diagnosis code via BLE (incorrect password, encryption not supported, WiFi not found, cloud connection lost, etc.), and the corresponding user prompt will be displayed in the mini-program. Timeout logic: After a 30-second delay following a failure, the current network configuration session cache will be automatically cleared, and the device will automatically switch back to IDLE, allowing users to rescan the code and retry.

[0178] like Figure 4 The diagram shown is a schematic of a mini-program network configuration interface provided in an embodiment of this disclosure. Figure 4 First, scan the QR code to bind the device. Then, connect via Bluetooth to configure the network by scanning the QR code on the device. Finally, display the configuration success interface to indicate that the device is ready and can be used (e.g., AI cheering stick).

[0179] like Figure 5 The diagram shown is a schematic representation of a multi-device batch network configuration scenario provided in an embodiment of this disclosure. Figure 5 It includes a mobile terminal and six IoT devices (No. 001-No. 006), as well as Batch Provision and Provision Stats.

[0180] This involves staff continuously scanning and entering the unique UUIDs of multiple devices to enter batch network configuration mode; then, the mini-program concurrently establishes multiple BLE GATT connections, with each device operating independently. Figure 3 The system includes a state machine (IDLE→CONNECTING→CONNECTED→SUCCESS / FAILED); and a unified set of TLV format WiFi parameters, automatically adapting to iOS Bluetooth connection intervals and WPA3 encryption downgrades. As a result, all devices can independently complete WiFi connection, DHCP, and cloud binding, and the failure of a single device will not block the network configuration of other devices. The faulty device can be retried individually.

[0181] The network configuration statistics panel is a module that complements the mini-program interface. It summarizes the network configuration status data of all batch devices in real time, including statistical information: total number of devices, number of devices processed, number of devices successfully configured, number of devices that failed; a list of failed devices and corresponding diagnostic fault codes (incorrect password, unable to find WiFi, encryption incompatibility, etc.); the current progress of each device (Bluetooth connection in progress / WiFi authentication in progress / cloud binding in progress); and operational data such as total batch network configuration time, number of retransmissions, and average network configuration duration.

[0182] In this embodiment of the disclosure, when the mobile terminal detects that the number of IoT devices to be configured on the network reaches or exceeds a preset threshold (e.g., 3 devices), the batch configuration mode is automatically enabled.

[0183] In batch network configuration mode, the mobile terminal supports a maximum of 8 concurrent Bluetooth Low Energy connections for IoT devices (which can also be expanded to 16). Devices exceeding the limit will automatically enter the waiting queue and will be connected in the order they entered and exited.

[0184] To avoid signal conflicts caused by multiple IoT devices broadcasting simultaneously, each device adds a random delay of 0~10ms to the standard broadcast interval (e.g., 100ms) and uses Bluetooth adaptive frequency hopping technology to dynamically select an idle channel. In this way, even if multiple devices start broadcasting at the same time, the transmission time can be staggered by random delay, reducing the probability of broadcast collisions.

[0185] During network configuration, each IoT device pushes its configuration status code to the mobile terminal in real time. The mobile terminal maintains a global configuration status table and updates the configuration progress of each device in real time. If the mobile terminal does not receive a status update from a device within 5 seconds, it actively reads the current status of that device via BLE to ensure the accuracy of the statistics panel data. The configuration statistics panel displays the configuration progress of each device in a list or card format (e.g., network scanning / authentication in progress / address acquisition / cloud registration / completed), time taken, and reasons for failure, allowing users to monitor the overall progress of batch configuration in real time.

[0186] Based on the same inventive concept, this disclosure also provides an intelligent distribution network method corresponding to the intelligent distribution network system. Since the principle of the method in this disclosure is similar to that of the intelligent distribution network system described above, the implementation of the method can refer to the implementation of the system, and the repeated parts will not be described again.

[0187] like Figure 6 The diagram shows a flowchart of a smart distribution network method provided in an embodiment of this disclosure. The method, applied to a smart distribution network system including IoT devices and mobile terminals, includes steps S601 to S605, wherein: Step S601: The mobile terminal obtains the first identification information of the IoT device to be configured on the network.

[0188] Step S602: The mobile terminal receives a Bluetooth signal from at least one IoT device; wherein the Bluetooth signal carries the second identification information of the corresponding IoT device.

[0189] Step S603: The mobile terminal compares the first identification information with each of the second identification information, identifies the IoT device corresponding to the second identification information that matches the first identification information as the target IoT device, and establishes a Bluetooth Low Energy connection with the target IoT device.

[0190] Step S604: After establishing a Bluetooth Low Energy connection, the mobile terminal writes the distribution network data to the target IoT device.

[0191] Step S605: The target IoT device connects to the target network based on the distribution network data, and after connecting to the target network, it sends the distribution network result back to the mobile terminal.

[0192] As can be seen from the above description, the technical solution disclosed herein has the following advantages: Cross-platform consistency: The same BLE protocol is compatible with iOS and Android mini-programs.

[0193] Improved user experience: The QR code network configuration process has been shortened from 3-5 steps to 2 steps.

[0194] Distribution network reliability: ACK confirmation mechanism + iOS-specific optimization.

[0195] Multi-device support: Supports batch network configuration, suitable for concert scenarios.

[0196] In one possible implementation, the method further includes: Scan the QR code set on the IoT device to be distributed to read the first identification information from the QR code.

[0197] In one possible implementation, the method further includes: Distribution network data is encapsulated in a type-length-value format, which includes a type field, a length field, and a value field. The type field includes the service set identifier, password, encryption method, and channel.

[0198] In one possible implementation, the method further includes: Send a connection parameter update request to the mobile terminal.

[0199] The mobile terminal is used to update the connection interval to the compatible time range corresponding to the mobile terminal's operating system in response to the connection parameter update request, so as to meet the operating system's compatibility requirements for Bluetooth Low Energy connection.

[0200] In one possible implementation, the method further includes: If a mismatch is detected between the encryption protocol used by the target network and the encryption protocol supported by the target IoT device, an instruction message is sent to the mobile terminal.

[0201] A mobile terminal is used to send switching commands to target IoT devices based on indication information.

[0202] The target IoT device is used to switch the encryption method to a target encryption protocol that matches the target network according to the switching instruction before establishing a connection.

[0203] In one possible implementation, the method further includes: During network configuration, the background running permission of the Bluetooth central device on the iOS operating system is enabled to maintain the activity of the Bluetooth Low Energy connection and automatically initiate a reconnection after an abnormal disconnection of the Bluetooth Low Energy connection is detected.

[0204] In one possible implementation, the method further includes: The network distribution result includes network distribution status codes, which include network scan status codes, authentication status codes, network address acquisition status codes, cloud connection status codes, and binding status codes. The feedback frame of the network distribution status code also carries at least one of the following fields: error details field, signal strength field, and retry count field.

[0205] In one possible implementation, the method further includes: After connecting to the target network, receive device activation commands and user binding information sent by the mobile terminal within the same Bluetooth Low Energy connection session.

[0206] Based on the device activation command and user binding information, the system registers with the cloud and sends the registration result back to the mobile terminal via Bluetooth Low Energy connection.

[0207] Corresponding to Figure 6 In the intelligent power distribution method, this disclosure also provides an electronic device 70, such as... Figure 7 The diagram shown is a structural schematic of an electronic device 70 provided in an embodiment of this disclosure, including: The system includes a processor 71, a memory 72, and a bus 73. The memory 72 stores execution instructions and includes main memory 721 and external memory 722. The main memory 721, also called internal memory, temporarily stores the computational data in the processor 71, as well as data exchanged with external memory such as a hard disk. The processor 71 exchanges data with the external memory 722 through the main memory 721. When the electronic device 70 is running, the processor 71 communicates with the memory 72 via the bus 73, causing the processor 71 to execute the following instructions: The mobile terminal obtains the first identification information of the IoT device to be configured on the network.

[0208] The mobile terminal receives a Bluetooth signal from at least one Internet of Things (IoT) device; wherein the Bluetooth signal carries a second identification information of the corresponding IoT device.

[0209] The mobile terminal compares the first identification information with each of the second identification information, identifies the IoT device corresponding to the second identification information that matches the first identification information as the target IoT device, and establishes a Bluetooth Low Energy connection with the target IoT device.

[0210] After establishing a Bluetooth Low Energy connection, the mobile terminal writes distribution network data to the target IoT device.

[0211] The target IoT device connects to the target network based on the distribution network data, and after connecting to the target network, it sends the distribution network results back to the mobile terminal.

[0212] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the smart distribution network method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0213] This disclosure also provides a computer program product 80, such as... Figure 8 The diagram shown is a schematic diagram of the structure of a computer program product 80 provided in an embodiment of this disclosure. The computer program product 80 carries computer program instructions 81. The program included in the computer program instructions 81 can be used to execute the steps of the smart distribution network method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0214] The above description, with reference to the accompanying drawings, outlines an intelligent power distribution system, method, device, medium, and product according to embodiments of the present disclosure. In these embodiments, the intelligent power distribution system includes an Internet of Things (IoT) device and a mobile terminal. The mobile terminal is configured to acquire first identification information of an IoT device to be distributed to the network; receive Bluetooth signals emitted by at least one IoT device; wherein the Bluetooth signals carry second identification information corresponding to the IoT device; and establish a Bluetooth Low Energy (BLE) connection with the target IoT device; wherein the target IoT device is an IoT device whose first and second identification information are successfully matched. The mobile terminal is also configured to write power distribution data to the target IoT device after establishing the BLE connection. The target IoT device is configured to connect to a target network based on the power distribution data; and, after connecting to the target network, provide feedback on the power distribution result to the mobile terminal. Through this processing method, users can obtain the first identification information without manually selecting a device from a WiFi list, and automatically lock the target IoT device and establish a connection between the target IoT device and the mobile terminal by matching the first and second identification information, thus shortening the connection establishment time. Then, the network configuration data is written via Bluetooth Low Energy, eliminating the need for users to input data step by step. Based on this data, the system automatically connects to the target network, eliminating the need for users to switch between the system's WiFi settings interface and the network configuration application multiple times. This allows the entire network configuration process to be completed continuously within a single application interface, significantly reducing user operation steps and interface switching times, thereby improving network configuration efficiency.

[0215] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0216] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0217] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0218] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0219] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0220] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0221] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. An intelligent power distribution network system, characterized in that, The intelligent power distribution network system includes IoT devices and mobile terminals, wherein... The mobile terminal is configured to acquire first identification information of an IoT device to be configured on the network; receive a Bluetooth signal emitted by at least one IoT device; wherein the Bluetooth signal carries second identification information of the corresponding IoT device; and establish a Bluetooth Low Energy connection with a target IoT device; wherein the target IoT device is an IoT device whose first identification information and second identification information are successfully matched. The mobile terminal is also used to write distribution network data to the target IoT device after establishing the Bluetooth Low Energy connection; The target IoT device is used to connect to the target network based on the distribution network data; and after connecting to the target network, to feed back the distribution network results to the mobile terminal.

2. The system according to claim 1, characterized in that, The mobile terminal obtains the first identification information of the IoT device to be configured on the network, for the purpose of: Scan the QR code set on the IoT device to be configured to read the first identification information from the QR code.

3. The system according to claim 1, characterized in that, The distribution network data is encapsulated in a type-length-value format, which includes a type field, a length field, and a value field. The type field includes a service set identifier, password, encryption method, and channel.

4. The system according to claim 1, characterized in that, After establishing a Bluetooth Low Energy connection, and before the mobile terminal writes distribution network data to the target IoT device, the target IoT device is further configured to: Send a connection parameter update request to the mobile terminal; The mobile terminal is configured to respond to the connection parameter update request by updating the connection interval to the compatible time range corresponding to the operating system of the mobile terminal, so as to meet the compatibility requirements of the operating system for the Bluetooth Low Energy connection.

5. The system according to claim 1, characterized in that, The target IoT device is also used for: If the encryption protocol used by the target network and the encryption protocol supported by the target IoT device are found to be mismatched, an indication message is sent to the mobile terminal. The mobile terminal is used to send a switching command to the target IoT device based on the indication information; The target IoT device is configured to switch the encryption method to a target encryption protocol that matches the target network according to the switching instruction before performing the connection.

6. The system according to any one of claims 1 to 5, characterized in that, The mobile terminal is equipped with the iOS operating system, and the mobile terminal is also used for: During the network configuration process, the background running permission of the Bluetooth central device of the iOS operating system is enabled to maintain the activity of the Bluetooth Low Energy connection, and automatic reconnection is initiated after the Bluetooth Low Energy connection is detected to be abnormally disconnected.

7. The system according to claim 1, characterized in that, The network distribution result includes a network distribution status code, which includes a network scan status code, an authentication status code, a network address acquisition status code, a cloud connection status code, and a binding status code. The feedback frame of the network distribution status code also carries at least one of the following fields: error details field, signal strength field, and retry count field.

8. The system according to claim 1, characterized in that, The target IoT device is also used for: After connecting to the target network, the device activation command and user binding information sent by the mobile terminal are received in the same Bluetooth Low Energy connection session. Based on the device activation command and the user binding information, the device registers with the cloud and sends the registration result back to the mobile terminal via the Bluetooth Low Energy connection.

9. A smart distribution network method, characterized in that, The method, applied to a smart distribution network system including IoT devices and mobile terminals, includes: The mobile terminal acquires the first identification information of the IoT device to be configured on the network; The mobile terminal receives a Bluetooth signal from at least one Internet of Things (IoT) device; wherein the Bluetooth signal carries second identification information corresponding to the IoT device; The mobile terminal compares the first identification information with each of the second identification information, identifies the IoT device corresponding to the second identification information that matches the first identification information as the target IoT device, and establishes a Bluetooth Low Energy connection with the target IoT device. After establishing the Bluetooth Low Energy connection, the mobile terminal writes the distribution network data to the target IoT device. The target IoT device connects to the target network based on the distribution network data, and after connecting to the target network, feeds back the distribution network result to the mobile terminal.

10. A computer program product, characterized in that, It includes computer program instructions, which, when executed by a processor, implement the smart distribution network method as described in claim 9.