A power distribution network method, terminal device, and storage medium

Through the multi-GATT connection characteristics of terminal devices, parallel batch distribution networks of multiple undistributed devices in Bluetooth Mesh network are realized, solving the distribution network efficiency and stability problems and improving distribution network efficiency and stability.

CN115499895BActive Publication Date: 2025-06-10ZHEJIANG MAOJING ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210977074.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-06-10
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

In Bluetooth Mesh network, how to improve the distribution efficiency and stability of multiple undistributed devices, especially when there are multiple undistributed devices.

Method used

Through the multi-GATT connection characteristics of the terminal device, multiple candidate unallocated devices of the same device type are scanned and determined. According to the concurrency of the terminal device distribution network, the target device is selected from the candidate devices, and a corresponding number of GATT connections are established to realize parallel batch distribution networks of multiple unallocated devices.

Benefits of technology

The distribution efficiency and stability of multiple undistributed devices are improved, and the parallel batch distribution network of multiple undistributed devices in the Bluetooth Mesh network is realized, reducing distribution time and improving communication stability between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115499895B_ABST
    Figure CN115499895B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a power distribution method, a terminal device, and a storage medium. The method includes: scanning for unconfigured devices around the terminal device; determining multiple candidate unconfigured devices of the same device type from the unconfigured devices; according to the power distribution concurrency of the terminal device, selecting, at least once, target unconfigured devices whose quantity corresponds to the power distribution concurrency from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected; wherein the power distribution concurrency corresponds to the number of GATT connections supported by the terminal device; establishing GATT connections whose quantity corresponds to the power distribution concurrency for the selected target unconfigured devices, and performing power distribution for the target unconfigured devices through the GATT connections established with the target unconfigured devices, wherein one GATT connection is established for one target unconfigured device. The embodiment of the present application can improve the power distribution efficiency and stability when performing power distribution for multiple unconfigured devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technologies, and particularly to a power distribution method, a terminal device, and a storage medium. Background Art

[0002] A Bluetooth Mesh (wireless mesh) network is a mesh network that establishes communication between devices based on BLE (Bluetooth Low Energy). It is widely used in scenarios such as intelligent interconnection of smart home and smart office devices. As control devices of the Bluetooth Mesh network, terminal devices such as smartphones and tablets allow users to add Bluetooth Mesh devices in an unconfigured state (hereinafter referred to as unconfigured devices) to the Bluetooth Mesh network; this process can be referred to as the configuration process.

[0003] With the wide application of Bluetooth Mesh networks, the networking scale of Bluetooth Mesh networks has also expanded rapidly. When there are multiple unconfigured devices in a Bluetooth Mesh network, how to improve the configuration efficiency and stability has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0004] In view of this, the embodiments of the present application provide a power distribution method, a terminal device, and a storage medium to improve the power distribution efficiency and stability when configuring multiple unconfigured devices.

[0005] To achieve the above object, the embodiments of the present application provide the following technical solutions.

[0006] In a first aspect, the embodiments of the present application provide a power distribution method applied to a terminal device, including:

[0007] Scanning for unconfigured devices around the terminal device;

[0008] Determining multiple candidate unconfigured devices of the same device type from the unconfigured devices;

[0009] According to the power distribution concurrency of the terminal device, selecting, at least once, target unconfigured devices whose quantity corresponds to the power distribution concurrency from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected; wherein, the power distribution concurrency corresponds to the number of GATT connections supported by the terminal device to be established;

[0010] Establishing GATT connections whose quantity corresponds to the power distribution concurrency for the selected target unconfigured devices, and performing power distribution for the target unconfigured devices through the GATT connections established with the target unconfigured devices, wherein one GATT connection is established for one target unconfigured device.

[0011] In a second aspect, an embodiment of the present application provides a terminal device, including at least one memory and at least one processor. The memory stores one or more computer-executable instructions, and the processor invokes the one or more computer-executable instructions to execute the network configuration method as described in the first aspect above.

[0012] In a third aspect, an embodiment of the present application provides a storage medium that stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the network configuration method as described in the first aspect above is implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer program. When the computer program is executed, the network configuration method as described in the first aspect above is implemented.

[0014] In the network configuration method provided by the embodiment of the present application, the terminal device can scan the surrounding unconfigured devices; determine multiple candidate unconfigured devices of the same device type from the unconfigured devices; thus, according to the network configuration concurrency of the terminal device, select from the multiple candidate unconfigured devices at least once a number of target unconfigured devices corresponding to the network configuration concurrency until all the multiple candidate unconfigured devices are selected, where the network configuration concurrency corresponds to the number of GATT connections supported by the terminal device to be established; for the selected target unconfigured devices, the terminal device can establish GATT connections corresponding to the network configuration concurrency for the selected target unconfigured devices, where one target unconfigured device corresponds to establishing one GATT connection. Furthermore, the terminal device can configure the target unconfigured devices through the GATT connections established with the target unconfigured devices.

[0015] It can be seen that in the case where the terminal device supports multiple GATT connections, the embodiment of the present application can establish multiple GATT connections with multiple unconfigured devices, and thus perform batch network configuration in parallel for multiple unconfigured devices through the multiple GATT connections established between the terminal device and the multiple unconfigured devices. Based on the stability of the GATT connection, in the case where the terminal device establishes multiple GATT connections with multiple unconfigured devices, the embodiment of the present application can improve the network configuration stability of the multiple unconfigured devices, and realize parallel batch network configuration of the multiple unconfigured devices, achieving the effect of improving network configuration efficiency and stability. Therefore, when there are multiple unconfigured devices in the Bluetooth Mesh network, the embodiment of the present application can perform stable and efficient batch network configuration for the multiple unconfigured devices that establish GATT connections with the terminal device through the multi-GATT connection characteristic of the terminal device, achieving the effect of improving network configuration efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0017] Figure 1 It is an example diagram of a Bluetooth Mesh network.

[0018] Figure 2 It is a flowchart of the network configuration method provided by the embodiment of the present application.

[0019] Figure 3 It is an example diagram of a device discovery page.

[0020] Figure 4 It is an example diagram of the network configuration implementation of the embodiment of the present application.

[0021] Figure 5 It is a flowchart of the method for network configuration of an unprovisioned target device in the embodiment of the present application.

[0022] Figure 6 It is a block diagram of the network configuration device provided by the embodiment of the present application.

[0023] Figure 7 It is a block diagram of a terminal device. Detailed implementation manners

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0025] Figure 1 An example diagram of a Bluetooth Mesh network is exemplarily shown. As Figure 1 shown, a Bluetooth Mesh network may include: multiple node devices 101 that have been networked; a node device can be considered as a Bluetooth Mesh device that has joined the Bluetooth Mesh network and is in a networked state. As the networking scale of the Bluetooth Mesh network expands, Figure 1 there are multiple unprovisioned devices 1 to N that need to be networked. An unprovisioned device can be considered as a Bluetooth Mesh device that has not joined the Bluetooth Mesh network. Among them, N is the number of unprovisioned devices, which can be determined according to the actual situation.

[0026] As an important entry point for network provisioning, the terminal device 102 allows users to execute the network provisioning process, thereby adding multiple unprovisioned devices 1 to N to the Bluetooth Mesh network. In one example, the terminal device can be a user device on the user side such as a smartphone or a tablet. The terminal device can install an APP (application) to achieve device control and configuration of the Bluetooth Mesh network. The APP can be an application program for Bluetooth Mesh management, such as an APP that provides intelligent interconnection services for smart home and smart office devices.

[0027] It can be understood that after the unprovisioned device joins the Bluetooth Mesh network, the unprovisioned device can become a node in the Bluetooth Mesh network. In addition, the network provisioning process executed by the terminal device can also be called Provisioning.

[0028] One way for the terminal device to execute network provisioning is to add unprovisioned devices to the Bluetooth Mesh network sequentially through the serial network provisioning method. This method requires a long network provisioning time when there are multiple unprovisioned devices in the Bluetooth Mesh network, resulting in low network provisioning efficiency. For example, if the terminal device uses the serial network provisioning method to Figure 1 add the multiple unprovisioned devices 1 to N shown sequentially and serially to the Bluetooth Mesh network, the terminal device needs to consume N times the time of a single network provisioning to achieve the network provisioning of N unprovisioned devices, resulting in an overly long overall network provisioning time for the N unprovisioned devices and affecting the network provisioning efficiency.

[0029] The terminal device can also forward the network provisioning configuration information to multiple unprovisioned devices through a proxy node to improve the network provisioning efficiency. However, a single proxy node set by the terminal device will result in poor network provisioning stability. Specifically, since the terminal device does not support the direct broadcast packet interaction method, the terminal device needs to establish a GATT (Generic Attribute Profile) connection with a node device in the Bluetooth Mesh network and use the node device that establishes the GATT connection as a proxy node. Thus, the terminal device can send and receive messages of the Bluetooth Mesh network through the proxy node. In this case, the terminal device can forward the network provisioning configuration information to multiple unprovisioned devices through the established GATT connection proxy node, thereby achieving batch network provisioning of multiple unprovisioned devices. However, if the terminal device sets a single proxy node to forward the network provisioning configuration information of multiple unprovisioned devices, it will cause an excessive load on the proxy node and a high performance requirement for the proxy node. At the same time, when there is a large amount of network provisioning configuration information that needs to be sent by the proxy node, it is very easy for the load of the proxy node to exceed the performance of the proxy node, resulting in an unstable network provisioning situation.

[0030] Based on the above description, the embodiments of the present application provide an improved power distribution network solution to improve the power distribution efficiency and stability when performing parallel power distribution for multiple unpowered devices. When the terminal device supports multiple GATT connections, the embodiments of the present application can establish multiple GATT connections with multiple unpowered devices (one GATT connection is established for each unpowered device), so as to perform batch power distribution for multiple unpowered devices in parallel through the multiple GATT connections established between the terminal device and the multiple unpowered devices, achieving the effect of improving the power distribution efficiency and stability.

[0031] It should be noted that the embodiments of the present application do not convey the power distribution configuration information sent by the terminal device to the unpowered device through a proxy node. Instead, due to the multi-GATT connection characteristic of the terminal device, the terminal device directly establishes multiple GATT connections with multiple unpowered devices, and then performs power distribution for multiple unpowered devices in parallel through the multiple GATT connections established between the terminal device and the multiple unpowered devices, achieving the effect that multiple unpowered devices can perform parallel batch power distribution.

[0032] Based on the above idea, Figure 2 An optional flowchart of the power distribution method provided by the embodiments of the present application is exemplarily shown. This method flow can be implemented by the terminal device and the unpowered device. Referring to Figure 2 , this method flow may include the following steps.

[0033] In step S210, the unpowered device sends an unpowered broadcast packet.

[0034] After being powered on, the unpowered device can periodically send an unpowered broadcast packet in a broadcast manner for the terminal device to discover the unpowered device. In some embodiments, the device information of the unpowered device may be carried in the unpowered broadcast packet. As an optional implementation, the device information of the unpowered device may indicate information such as the device type and device identifier of the unpowered device.

[0035] In one example, after being powered on, the unpowered device can periodically send a PB (Provisioning Bearer)-GATT broadcast packet for the terminal device to discover the unpowered device. Optionally, the PB-GATT broadcast packet sent by the unpowered device may carry device information such as the PK (Product Key) and UUID (Universally Unique Identifier) of the unpowered device; where the PK may be a product key indicating the device type of the unpowered device. For example, unpowered devices with the same PK may have the same device firmware model, the same version number, and the same power distribution method; the UUID is a device universal identifier that uniquely identifies the unpowered device.

[0036] In step S211, the terminal device determines multiple candidate unconfigured devices of the same device type from the unconfigured devices according to the unconfigured broadcast packets sent by the unconfigured devices.

[0037] Based on the unconfigured broadcast packets sent by the unconfigured devices, the terminal device can scan the surrounding unconfigured devices. Thus, the terminal device can determine the device type of the unconfigured devices according to the unconfigured broadcast packets sent by the surrounding unconfigured devices, and then determine multiple unconfigured devices of the same device type from the unconfigured devices around the terminal device. For ease of description, in the embodiments of the present application, the unconfigured devices of the same device type are referred to as candidate unconfigured devices, and the number of candidate unconfigured devices can be multiple.

[0038] It should be noted that in the embodiments of the present application, the terminal device establishes GATT connections with multiple unconfigured devices to achieve batch configuration of the multiple unconfigured devices. To enable the multiple unconfigured devices to perform batch configuration smoothly, the multiple unconfigured devices should have the same configuration method; therefore, in the embodiments of the present application, multiple candidate unconfigured devices of the same device type around the terminal device can be determined; among them, if the device types of the unconfigured devices are the same, it can be considered that the unconfigured devices have the same device firmware model, the same version number, and the same configuration method; that is to say, if the device types of the unconfigured devices are the same, the unconfigured devices support batch configuration through the same configuration method.

[0039] In some embodiments, the terminal device can parse the PK information of the unconfigured devices from the unconfigured broadcast packets sent by the unconfigured devices, and determine multiple candidate unconfigured devices with the same PK information; among them, if the PK information of the unconfigured devices is the same, the device types of the unconfigured devices are the same, and the unconfigured devices of the same device type support configuration through the same configuration method.

[0040] In some further embodiments, the terminal device can aggregate and display multiple candidate unconfigured devices of the same device type (such as multiple candidate unconfigured devices with the same PK information) on the device discovery page, so that the user can understand the unconfigured devices around the terminal device that can perform batch configuration. In one example, the terminal device can display the device discovery page, and the terminal device can enable BLE (Bluetooth Low Energy) scanning to discover the unconfigured devices around that send unconfigured broadcast packets; further, the terminal device can determine multiple candidate unconfigured devices with the same PK information from the unconfigured devices that send unconfigured broadcast packets, and aggregate and display the multiple candidate unconfigured devices with the same PK information on the device discovery page, so that the user can understand the unconfigured devices that the terminal device can perform batch configuration through the display content on the device discovery page (that is, multiple candidate unconfigured devices with the same PK information around the terminal device can perform batch configuration).

[0041] In one example, Figure 3 An exemplary diagram of the device discovery page is shown in combination with Figure 3 As shown, assuming that there are unconfigured devices 1 to N around the terminal device, the unconfigured devices 1 to N can respectively send unconfigured broadcast packets such as PB-GATT periodically, so that the terminal device can discover the unconfigured devices 1 to N; the terminal device scans the unconfigured broadcast packets sent by the unconfigured devices 1 to N respectively, and can determine multiple candidate unconfigured devices 1 to M (M is less than N) with the same PK information from the unconfigured devices 1 to N according to the PK information carried in the broadcast packets sent by the unconfigured devices 1 to N; thus, the terminal device can determine that the multiple candidate unconfigured devices 1 to M can be batch-configured through the same configuration method, and aggregate and display the multiple candidate unconfigured devices 1 to M on the device discovery page.

[0042] In step S212, the terminal device selects target unconfigured devices corresponding to the configuration concurrency from multiple candidate unconfigured devices; wherein, the configuration concurrency corresponds to the number of GATT connections that the terminal device supports to establish.

[0043] After the terminal device determines multiple candidate unconfigured devices of the same device type around it, it can establish GATT connections with the multiple candidate unconfigured devices of the same device type to batch-configure the multiple candidate unconfigured devices. Based on the number of GATT connections that the terminal device supports to establish (the number of GATT connections that the terminal device supports to establish can be regarded as the configuration concurrency of the terminal device's one-time batch configuration), which may be less than the number of candidate unconfigured devices, so the terminal device may not be able to complete the batch configuration of the multiple candidate unconfigured devices through one-time batch configuration; based on this, the terminal device can schedule the candidate unconfigured devices multiple times according to the configuration concurrency, so as to complete the batch configuration of the multiple candidate unconfigured devices through multiple batch configurations.

[0044] In some embodiments, based on the configuration concurrency of the terminal device's one-time batch configuration, the terminal device can select target unconfigured devices corresponding to the configuration concurrency from multiple candidate unconfigured devices, so as to configure the target unconfigured devices corresponding to the configuration concurrency in one-time batch configuration.

[0045] As an optional implementation, the terminal device may manage multiple candidate unconfigured devices in a queue. For example, the terminal device may maintain an unconfigured queue and record the multiple candidate unconfigured devices in the unconfigured queue. Thus, the terminal device may, according to the concurrent network configuration volume, schedule, during each batch network configuration, a target number of unconfigured devices corresponding to the concurrent network configuration volume from the unconfigured queue for network configuration. At the same time, the unconfigured devices that have completed network configuration are deleted from the unconfigured queue. Furthermore, the terminal device may schedule, in the unconfigured queue, a target number of unconfigured devices corresponding to the concurrent network configuration volume multiple times for network configuration until the record in the unconfigured queue becomes empty.

[0046] In addition, it should be noted that the network configuration speeds of each unconfigured device may not be the same. Therefore, in the embodiments of the present application, after an unconfigured device completes network configuration, the next unconfigured device may be immediately scheduled for network configuration. For example, in the embodiments of the present application, after scheduling a target number of unconfigured devices corresponding to the concurrent network configuration volume from the unconfigured queue for network configuration, if any of the scheduled unconfigured devices completes network configuration, the unconfigured device that has completed network configuration may be deleted from the unconfigured queue, and an unconfigured device may continue to be scheduled from the unconfigured queue for network configuration to keep the number of unconfigured devices in concurrent network configuration corresponding to the concurrent network configuration volume. In one example, assuming that the concurrent network configuration volume is 4, 4 unconfigured devices may be scheduled simultaneously for network configuration for the first time. After any of the unconfigured devices completes network configuration, the terminal device may disconnect the GATT connection with the unconfigured device that has completed network configuration and schedule the next unconfigured device for network configuration, so as to keep the number of unconfigured devices in concurrent network configuration of the terminal device at 4.

[0047] As an example, if the terminal device displays multiple candidate unconfigured devices through a device discovery page, the terminal device may enter a batch network configuration process for the multiple candidate unconfigured devices based on the user's network configuration operation on the device discovery page. Thus, the terminal device may select, according to the concurrent network configuration volume, a target number of unconfigured devices corresponding to the concurrent network configuration volume from the multiple candidate unconfigured devices. For example, in combination with Figure 3 As shown in the example, if the user clicks the network configuration button on the device discovery page, the terminal device may detect the user's network configuration operation on the device discovery page and thus execute step S212.

[0048] As an optional implementation, when the terminal device selects a target number of unconfigured devices corresponding to the concurrent network configuration volume from the multiple candidate unconfigured devices, it may randomly select a target number of unconfigured devices corresponding to the concurrent network configuration volume. In one example, if the terminal device records multiple candidate unconfigured devices through an unconfigured queue, the terminal device may randomly select a target number of unconfigured devices corresponding to the concurrent network configuration volume from the unconfigured queue.

[0049] As another optional implementation, when the terminal device selects target unconfigured devices corresponding to the network configuration concurrency from multiple candidate unconfigured devices, it may select the target unconfigured devices corresponding to the network configuration concurrency in order according to the distance of the candidate unconfigured devices relative to the terminal device, either from near to far or from far to near. In one example, if the terminal device records multiple candidate unconfigured devices through an unconfigured queue, the unconfigured queue may record multiple candidate unconfigured devices in order according to the distance of the candidate unconfigured devices relative to the terminal device, either from near to far or from far to near; thus, the terminal device may sequentially select target unconfigured devices corresponding to the network configuration concurrency from the unconfigured queue.

[0050] In step S213, the terminal device establishes GATT connections corresponding to the network configuration concurrency with the selected target unconfigured devices.

[0051] In step S214, the terminal device configures the network for the target unconfigured devices through the GATT connections established with the target unconfigured devices.

[0052] After the terminal device selects target unconfigured devices corresponding to the network configuration concurrency from multiple candidate unconfigured devices, the terminal device may establish GATT connections with the selected target unconfigured devices respectively, and one GATT connection is established for each target unconfigured device, so that the terminal device can establish GATT connections corresponding to the network configuration concurrency, and then the terminal device can communicate with the selected target unconfigured devices through the corresponding GATT connections. That is to say, for one target unconfigured device, the terminal device can establish one GATT connection, so that for the target unconfigured devices corresponding to the network configuration concurrency, the terminal device can establish GATT connections corresponding to the network configuration concurrency.

[0053] Furthermore, for the target unconfigured devices that establish GATT connections with the terminal device, the terminal device can configure the network for the target unconfigured devices through the corresponding GATT connections, so as to configure the network for the target unconfigured devices corresponding to the network configuration concurrency in one batch network configuration.

[0054] As an optional implementation, for the selected target unconfigured devices corresponding to the network configuration concurrency, the terminal device may sequentially establish GATT connections with the selected target unconfigured devices (for example, after the terminal device establishes a GATT connection with the previous target unconfigured device, it then establishes a GATT connection with the next target unconfigured device); in other possible implementations, the terminal device may also establish GATT connections with the selected target unconfigured devices simultaneously.

[0055] As an optional implementation, when the terminal device performs network configuration for the target unconfigured device, it can interact with the cloud server to obtain network configuration information. Thus, the terminal device can, through the established GATT connection, configure the network configuration information to the target unconfigured device, so that the target unconfigured device can access the Bluetooth Mesh network. Furthermore, the cloud server can bind the target unconfigured device that has accessed the Bluetooth Mesh network to the user to complete the network configuration of the target unconfigured device. During the above network configuration process, the interaction between the terminal device and the target unconfigured device can be achieved through the established GATT connection.

[0056] It should be noted that, in the optional implementation, the cloud server referred to in the embodiments of the present application can be a cloud service platform that provides Bluetooth Mesh management services, such as a cloud computing platform or an IoT (Internet of Things) cloud platform that provides intelligent interconnection services for devices such as smart homes and smart offices. The terminal device can interact with the cloud server by installing an APP for Bluetooth Mesh management.

[0057] In step S215, the terminal device determines whether all of the multiple candidate unconfigured devices have been selected as the target unconfigured device. If so, step S216 is executed; if not, step S217 is executed.

[0058] In step S216, the terminal device determines that batch network configuration for the multiple candidate unconfigured devices is completed.

[0059] In step S217, the terminal device disconnects the GATT connection with the target unconfigured device that has completed network configuration and returns to step S212.

[0060] After the terminal device completes network configuration for the target unconfigured devices corresponding to the network configuration concurrency through one-time batch network configuration, it can determine whether all of the multiple candidate unconfigured devices determined in step S211 have been selected as the target unconfigured device.

[0061] In some further embodiments, if the terminal device maintains an unconfigured queue and records the multiple candidate unconfigured devices in the unconfigured queue, then when a candidate unconfigured device is selected as the target unconfigured device, the terminal device can delete the selected candidate unconfigured device from the unconfigured queue, so that the unconfigured queue maintains records of the candidate unconfigured devices in the unconfigured state. Furthermore, the terminal device can determine whether all of the multiple candidate unconfigured devices have been selected as the target unconfigured device by determining whether the record in the unconfigured queue is empty.

[0062] If the judgment result in step S215 is yes, it indicates that all of the multiple candidate unconfigured devices are selected as target unconfigured devices and are configured through steps S213 and S214. Therefore, the multiple candidate unconfigured devices have completed the configuration. In some further embodiments, when the terminal device determines that the multiple candidate unconfigured devices have completed batch configuration, it may display a configuration success page to prompt the user that the multiple candidate unconfigured devices have completed the configuration.

[0063] If the judgment result in step S215 is no, the terminal device can confirm that there are still candidate unconfigured devices that have not been configured. Thus, the terminal device can disconnect the GATT connection with the target unconfigured devices that have completed the configuration, so that when performing the next batch configuration, the terminal device can establish a new GATT connection. Then, the terminal device returns to step S212, and according to the configuration concurrency, selects target unconfigured devices with a quantity corresponding to the configuration concurrency from the unselected candidate unconfigured devices. Then, through steps S213 and S214, the terminal device can establish a GATT connection with the selected target unconfigured devices and perform the configuration. In the above manner, the terminal device can schedule target unconfigured devices with a quantity corresponding to the configuration concurrency multiple times, so as to complete the configuration for the multiple candidate unconfigured devices through multiple batch configurations.

[0064] In a further optional implementation, if when the terminal device selects the target unconfigured devices for the last time, the number of remaining unselected candidate unconfigured devices is less than the configuration concurrency, the embodiments of the present application can select all of the remaining candidate unconfigured devices as target unconfigured devices, so as to implement that all of the multiple candidate unconfigured devices are selected as target unconfigured devices.

[0065] It can be seen that after determining the multiple candidate unconfigured devices, the terminal device can select target unconfigured devices with a quantity corresponding to the configuration concurrency from the multiple candidate unconfigured devices at least once until all of the multiple candidate unconfigured devices are selected. For the selected target unconfigured devices with a quantity corresponding to the configuration concurrency, the terminal device can establish GATT connections with a quantity corresponding to the configuration concurrency for the selected target unconfigured devices, and one GATT connection is established for one target unconfigured device. Thus, the terminal device can perform the configuration for the target unconfigured devices through the established GATT connections with the target unconfigured devices, and complete the batch configuration of the multiple candidate unconfigured devices.

[0066] It should be noted that if the network configuration concurrency is greater than or equal to the number of multiple candidate unconfigured devices, the terminal device can select all multiple candidate unconfigured devices as target unconfigured devices at one time; thus, the terminal device can complete the batch network configuration of multiple candidate unconfigured devices through one batch network configuration. If the network configuration concurrency is less than the number of multiple candidate unconfigured devices, the terminal device needs to select target unconfigured devices corresponding to the network configuration concurrency from multiple candidate unconfigured devices multiple times until all multiple candidate unconfigured devices are selected, so that the terminal device needs to complete the batch network configuration of multiple candidate unconfigured devices through multiple batch network configurations.

[0067] To facilitate the description of the network configuration scheme provided by the embodiments of the present application, as an example, Figure 4 An exemplary network configuration implementation example diagram of the embodiments of the present application is shown, as Figure 4 shown, there are 20 unconfigured devices 1 to 20 around the terminal device. Among them, unconfigured devices 1 to 16 have the same PK information, so unconfigured devices 1 to 16 become candidate network configuration devices, and the terminal device can perform batch network configuration on unconfigured devices 1 to 16; at this time, the terminal device can aggregate and display unconfigured devices 1 to 16 on the device discovery page.

[0068] If the user clicks the network configuration button on the device discovery page, the terminal device can detect the user's network configuration operation and thus enter the batch network configuration process of unconfigured devices 1 to 16; assuming that the number of GATT connections that the terminal device supports to establish is 4 (that is, the network configuration concurrency of the terminal device for one batch network configuration is 4), taking the example of sequentially selecting unconfigured devices 1 to 16 for batch network configuration, when the terminal device selects target unconfigured devices for the first time, it can select unconfigured devices 1 to 4 as target unconfigured devices; thus, the terminal device can establish 4 GATT connections with unconfigured devices 1 to 4, and through the GATT connections established by unconfigured devices 1 to 4, perform parallel network configuration for unconfigured devices 1 to 4.

[0069] After unconfigured devices 1 to 4 complete the network configuration, the terminal device can release the GATT connections with unconfigured devices 1 to 4; similarly, when the terminal device selects target unconfigured devices for the second time, it can select unconfigured devices 5 to 8 as target unconfigured devices; thus, the terminal device can establish 4 GATT connections with unconfigured devices 5 to 8, and through the GATT connections established by unconfigured devices 5 to 8, perform parallel network configuration for unconfigured devices 5 to 8.

[0070] By analogy, when the terminal device selects the target unconfigured device for the last time, it can select unconfigured devices 13 to 16 as the target unconfigured devices; thus, the terminal device can establish 4 GATT connections with unconfigured devices 13 to 16, and through the GATT connections established by unconfigured devices 13 to 16, perform parallel network configuration for unconfigured devices 13 to 16. It can be seen that in this example, the terminal device can complete the batch network configuration for unconfigured devices 1 to 16 with the same PK information through multiple batch network configurations.

[0071] In the network configuration method provided by the embodiments of the present application, the terminal device can scan the surrounding unconfigured devices; determine multiple candidate unconfigured devices of the same device type from the unconfigured devices; thus, according to the network configuration concurrency of the terminal device, select at least once the target unconfigured devices whose quantity corresponds to the network configuration concurrency from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected, where the network configuration concurrency corresponds to the number of GATT connections supported by the terminal device; for the selected target unconfigured devices, the terminal device can establish GATT connections whose quantity corresponds to the network configuration concurrency for the selected target unconfigured devices, where one target unconfigured device corresponds to establishing one GATT connection, and further the terminal device can perform network configuration for the target unconfigured devices through the GATT connections established with the target unconfigured devices.

[0072] It can be seen that in the embodiments of the present application, when the terminal device supports multiple GATT connections, multiple GATT connections can be established with multiple unconfigured devices, so that through the multiple GATT connections established between the terminal device and the multiple unconfigured devices, batch network configuration can be performed in parallel for the multiple unconfigured devices. Based on the stability of the GATT connection, in the embodiments of the present application, when multiple GATT connections are established between the terminal device and multiple unconfigured devices, the network configuration stability of the multiple unconfigured devices can be improved, and parallel batch network configuration of the multiple unconfigured devices can be achieved, so as to achieve the effect of improving the network configuration efficiency and stability. Therefore, when there are multiple unconfigured devices in the Bluetooth Mesh network, in the embodiments of the present application, through the multi-GATT connection characteristic of the terminal device, stable and efficient batch network configuration can be performed for multiple unconfigured devices that establish GATT connections with the terminal device, so as to achieve the effect of improving the network configuration efficiency and stability.

[0073] As an optional implementation, when the terminal device performs network configuration for the target unconfigured device through the GATT connection, it can interact with the cloud server to configure network configuration information (such as Net Key, etc.), so as to configure the network configuration information to the target unconfigured device to implement network configuration for the target unconfigured device. As an optional implementation, Figure 5An exemplary flowchart of the method for network configuration of the target unconfigured device in the embodiments of the present application is shown. This method process can be implemented by a terminal device, a cloud server, and a target unconfigured device, such as Figure 5 shown. The method process may include the following steps.

[0074] In step S510, the terminal device establishes a GATT connection with the target unconfigured device.

[0075] In some embodiments, the terminal device may install an APP for Bluetooth Mesh management, and the terminal device may set a network configuration SDK (Software Development Kit) and a Mesh SDK; the APP of the terminal device can display multiple candidate unconfigured devices with the same PK information scanned around through the device discovery page; thus, the APP of the terminal device can, in response to the user's network configuration operation on the device discovery page, transmit an instruction to start concurrent addition of candidate unconfigured devices (Start Concurrent Add Device) to the network configuration SDK, so as to batch add multiple candidate unconfigured devices to the Bluetooth Mesh network; furthermore, the network configuration SDK can transmit a start network configuration instruction to the Mesh SDK.

[0076] The Mesh SDK can perform batch network configuration control on the candidate unconfigured devices based on the network configuration concurrency of the embodiments of the present application. Optionally, after obtaining the start network configuration instruction transmitted by the network configuration SDK, the Mesh SDK can select the target unconfigured device from multiple candidate unconfigured devices based on the network configuration concurrency; based on the currently selected target unconfigured device, the Mesh SDK can request the network configuration information of the target unconfigured device from the cloud server; for example, the Mesh SDK can send a request carrying device information such as the MAC address and PK information of the target unconfigured device to the cloud server, so that the cloud server can feedback the network configuration information of the target unconfigured device.

[0077] After the Mesh SDK obtains the network configuration information of the target unconfigured device, the Mesh SDK can establish a GATT connection with the target unconfigured device to achieve the establishment of a GATT connection between the terminal device and the target unconfigured device; furthermore, the terminal device can use the Mesh SDK in the subsequent process to configure the network configuration information for the target unconfigured device.

[0078] In step S511, the terminal device sends an instruction to invite network configuration to the target unconfigured device.

[0079] Optionally, the terminal device can send an invitation network configuration PDU (Protocol Data Unit) to the target unconfigured device through the Mesh SDK.

[0080] In step S512, the target unconfigured device sends the network configuration support capability to the terminal device.

[0081] When the target unconfigured device obtains the instruction to invite network configuration, it can feedback the network configuration support capability (Supported Capabilities) to the terminal device (such as the Mesh SDK of the terminal device) to indicate to the terminal device that the target unconfigured device supports network configuration.

[0082] In step S513, the terminal device sends the instruction to start network configuration to the target unconfigured device.

[0083] Optionally, the terminal device can send the instruction of Start PDU to the target unconfigured device through the Mesh SDK to indicate the target unconfigured device to start network configuration.

[0084] In step S514, the terminal device and the target unconfigured device interact with the Public Key (public key).

[0085] In step S515, the terminal device generates a random number (Random) and a confirmation key (Confirm Key).

[0086] In step S516, the terminal device requests the service confirmation information (ServerConfirmation) from the cloud server.

[0087] In some embodiments, the terminal device can send a request carrying the confirmation key (Confirm Key) to the cloud server to request the service confirmation information (Server Confirmation) from the cloud server. Optionally, the cloud server can process the confirmation key (Confirm Key) to obtain the service confirmation information (ServerConfirmation).

[0088] In step S517, the cloud server feeds back the service confirmation information (ServerConfirmation) to the terminal device.

[0089] In step S518, the terminal device requests the device confirmation information (DeviceConfirmation) from the target unconfigured device.

[0090] In step S519, the target unconfigured device sends the device confirmation information (DeviceConfirmation) to the terminal device.

[0091] In step S520, the terminal device requests the device random number (Device Random) from the target unconfigured device.

[0092] Optionally, the terminal device may send a PDU carrying a random number (Random) to the target unconfigured device to request the device random number (Device Random) of the target unconfigured device; furthermore, the target unconfigured device may generate a device random number (Device Random) according to the random number (Random) and feedback it to the terminal device.

[0093] In step S521, the target unconfigured device feeds back the device random number (Device Random) to the terminal device.

[0094] In step S522, the terminal device generates a random number key (Random Key).

[0095] In step S523, the terminal device sends the authentication information (AuthConfirmation) of the target unconfigured device to the cloud server.

[0096] Optionally, the authentication information can be used to verify the legitimacy of the target unconfigured device, and the authentication information can be generated according to information such as the device random number (Device Random), the device confirmation information (Device Confirmation), and the random number key (Random Key).

[0097] In step S524, the cloud server feeds back the authentication result.

[0098] The cloud server can reversely generate the authentication information, so as to compare the generated authentication information with the authentication information sent by the terminal device for consistency. If the two are consistent, it is confirmed that the authentication of the target unconfigured device passes; otherwise, it is confirmed that the authentication of the target unconfigured device fails.

[0099] In step S525, the terminal device generates a device configuration key (Device Key).

[0100] After the authentication of the target unconfigured device passes, the terminal device may generate a device configuration key (Device Key), and the device configuration key is the key for encrypting and decrypting the configuration commands of the Bluetooth Mesh device.

[0101] In step S526, the terminal device configures the network configuration information to the target unconfigured device.

[0102] It can be seen that in the embodiments of the present application, the terminal device can request the network configuration information for network configuration of the target unconfigured device from the cloud server, and after establishing a GATT connection with the target unconfigured device, generate authentication information for authenticating the target unconfigured device; thus, the terminal device can send an authentication request carrying the authentication information to the cloud server to request the cloud server to authenticate the target unconfigured device; furthermore, after the terminal device obtains the result that the authentication of the target unconfigured device by the cloud server is passed, it can, through the GATT connection established with the target unconfigured device, configure the network configuration information for network configuration of the target unconfigured device to the target unconfigured device.

[0103] In other possible implementations, in order to accelerate the network configuration process, the unconfigured device also generates the authentication information for authentication by itself and carries it in the unconfigured broadcast packet; thus, the terminal device can parse the authentication information of the target unconfigured device from the unconfigured broadcast packet of the target unconfigured device before establishing a GATT connection with the target unconfigured device; furthermore, the terminal device can send an authentication request carrying the authentication information to the cloud server to request the cloud server to authenticate the target unconfigured device; furthermore, after the terminal device obtains the result that the authentication of the target unconfigured device by the cloud server is passed, it can establish a GATT connection with the target unconfigured device; furthermore, the terminal device can, through the GATT connection established with the target unconfigured device, configure the network configuration information for network configuration of the target unconfigured device to the target unconfigured device.

[0104] In one example, the unconfigured device can carry the authentication information in the SCAN (scan)_RSP (reply) packet. For example, after the terminal device obtains the PB-GATT broadcast packet sent by the unconfigured device, it can send a SCAN_REQ (request) packet to the unconfigured device; thus, after the unconfigured device obtains the SCAN_REQ packet, it can generate a SCAN_RSP packet carrying the authentication information to implement carrying the authentication information in the unconfigured broadcast packet; furthermore, the unconfigured device can send the SCAN_RSP packet carrying the authentication information to the terminal device so that the terminal device can parse the authentication information of the unconfigured device from the unconfigured broadcast packet of the unconfigured device, thereby performing the legality verification of the unconfigured device in advance based on the authentication information of the unconfigured device when the terminal device discovers the unconfigured device.

[0105] Optionally, the network configuration information can be used for the target unconfigured device to access the Bluetooth Mesh network. For example, the network configuration information can carry a Net Key (network key) for the target unconfigured device to access the Bluetooth Mesh network; the Net Key is the network key of the Bluetooth Mesh network and is the key for distinguishing different networks in the Bluetooth Mesh network.

[0106] In step S527, the terminal device saves the network configuration result.

[0107] In step S528, the terminal device uploads the device configuration key (Device Key) to the cloud server.

[0108] In step S529, the terminal device configures the APP Key (application key) for the target unconfigured device.

[0109] In step S530, the target unconfigured device feeds back the APP Key Status to the terminal device.

[0110] After the terminal device configures network configuration information such as Net Key for the target unconfigured device, it can further discover the unconfigured device from the perspective of the APP service, configure the APP Key for the target unconfigured device, so that the target unconfigured device can feed back the APP Key status to the terminal device after configuring the APP Key. The APP Key is an application key and is the key to distinguish different applications in the same Bluetooth Mesh network.

[0111] Furthermore, if the target unconfigured device acts as an agent node of the terminal device after network configuration, the target unconfigured device needs to maintain a GATT connection with the terminal device; if the target unconfigured device does not act as an agent node of the terminal device after network configuration, the target unconfigured device can disconnect the GATT connection with the terminal device. At this time, the communication between the terminal device and the target unconfigured device can be realized through other node devices acting as agent nodes.

[0112] Optionally, the above steps performed by the terminal device can be implemented by the Mesh SDK of the terminal device.

[0113] Optionally, after the Mesh SDK of the terminal device completes the configuration of the Net Key and APP Key for the target unconfigured device, the target unconfigured device can be regarded as having been connected to the Bluetooth Mesh network; furthermore, the Mesh SDK of the terminal device can request the cloud server to bind the configured target unconfigured device with the user, so that the cloud server can feed back the binding result to the terminal device, enabling the user to control the configured Bluetooth Mesh device.

[0114] It should be further noted that when the terminal device selects the target unconfigured devices corresponding to the network configuration concurrency from the candidate unconfigured devices, since the selected target unconfigured devices need to perform network configuration currently, while the unselected candidate unconfigured devices are not performing network configuration currently, the embodiments of the present application can control the broadcast frequency of the target unconfigured devices to be higher than that of the unselected candidate unconfigured devices, so that the terminal device can achieve fast interaction with the target unconfigured devices through the higher broadcast frequency of the target unconfigured devices, improving the network configuration efficiency; at the same time, controlling the broadcast frequency of the target unconfigured devices to be higher than that of the unselected candidate unconfigured devices can stagger the broadcast packet sending time of the target unconfigured devices from that of the unselected candidate unconfigured devices, thereby reducing the signal interference in the Bluetooth Mesh network when the terminal device configures the network for the target unconfigured devices.

[0115] In an example, assuming that there are 20 candidate unconfigured devices, when the terminal device selects 4 candidate unconfigured devices as target unconfigured devices for network configuration for the first time, the terminal device can increase the broadcast frequency of the 4 target unconfigured devices currently performing network configuration, thereby enhancing the broadcast activity of the 4 target unconfigured devices; at the same time, the terminal device can reduce the broadcast frequency of the remaining 16 candidate unconfigured devices that have not performed network configuration, thereby suppressing the broadcast activity of the remaining 16 candidate unconfigured devices, and further enhancing the success rate of the GATT connection between the terminal device and the target unconfigured devices currently performing network configuration.

[0116] As an optional implementation, for the currently selected target unconfigured devices, the terminal device can send a command to increase the broadcast frequency of the broadcast packets to the target unconfigured devices, thereby increasing the broadcast frequency of the target unconfigured devices (for example, the terminal device can send a command to reduce the broadcast packet sending interval time to the target unconfigured devices, thereby increasing the broadcast frequency of the target unconfigured devices); for the unselected candidate unconfigured devices, the terminal device can send a command to reduce the broadcast frequency of the broadcast packets to the unselected candidate unconfigured devices (for example, the terminal device can send a command to increase the broadcast packet sending interval time to the unselected candidate unconfigured devices, thereby reducing the broadcast frequency of the unselected candidate unconfigured devices);

[0117] Furthermore, since the unconfigured devices have their own default broadcast frequencies (such as the default broadcast packet sending interval time), after the target unconfigured devices or the unselected candidate unconfigured devices adjust their broadcast frequencies, if the timing time reaches the set time (such as 1 minute), the target unconfigured devices or the unselected candidate unconfigured devices can restore the default broadcast frequencies.

[0118] In one example, for the currently selected target unconfigured device, the terminal device may send a command to the target unconfigured device to adjust the broadcast packet sending interval to a first time, so that the target unconfigured device sends broadcast packets at intervals of the first time; for the unselected candidate unconfigured devices, the terminal device may send a command to the unselected candidate unconfigured devices to adjust the broadcast packet sending interval to a second time, so that the unselected candidate unconfigured devices send broadcast packets at intervals of the second time; wherein, the first time is less than the default broadcast packet sending interval of the unconfigured device, and the second time is greater than the default broadcast packet sending interval of the unconfigured device. Thus, through such settings, the broadcast frequency of the currently selected target unconfigured device can be higher than that of the unselected candidate unconfigured devices.

[0119] Further, after the target unconfigured device or the unselected candidate unconfigured device adjusts the broadcast packet sending interval, if the timing time reaches the set time, the target unconfigured device or the unselected candidate unconfigured device may restore the default broadcast packet sending interval (that is, the broadcast packet sending interval of the target unconfigured device or the unselected candidate unconfigured device can be restored to the default broadcast packet sending interval).

[0120] The embodiments of the present application utilize the multi-GATT connection feature of the terminal device to be able to perform batch configuration for multiple unconfigured devices that establish multiple GATT connections with the terminal device, thereby realizing the batch configuration of multiple unconfigured devices at low cost and stably, and improving the configuration efficiency and stability.

[0121] Next, the configuration device provided by the embodiments of the present application will be introduced. The configuration device described below can be considered as a functional module that the terminal device needs to set to implement the configuration method provided by the embodiments of the present application. The content of the device described below can be correspondingly referred to the content of the method described above.

[0122] As an optional implementation, Figure 6 Exemplarily, an optional block diagram of the configuration device provided by the embodiments of the present application is shown. The device can be applied to a terminal device. Referring to Figure 6 , the device may include:

[0123] A scanning module 610, configured to scan for unconfigured devices around the terminal device;

[0124] A candidate determination module 611, configured to determine multiple candidate unconfigured devices of the same device type from the unconfigured devices;

[0125] A selection module 612, configured to select, according to the network configuration concurrency of the terminal device, target un-networked devices with a quantity corresponding to the network configuration concurrency from the multiple candidate un-networked devices at least once until all the multiple candidate un-networked devices are selected; wherein, the network configuration concurrency corresponds to the number of GATT connections supported by the terminal device to be established.

[0126] A network configuration execution module 613, configured to establish GATT connections with a quantity corresponding to the network configuration concurrency for the selected target un-networked devices, and perform network configuration for the target un-networked devices through the established GATT connections with the target un-networked devices, wherein one GATT connection is established for one target un-networked device.

[0127] In some embodiments, the selection module 612, configured to select, according to the network configuration concurrency of the terminal device, target un-networked devices with a quantity corresponding to the network configuration concurrency from the multiple candidate un-networked devices at least once until all the multiple candidate un-networked devices are selected, includes:

[0128] Select, according to the network configuration concurrency of the terminal device, target un-networked devices with a quantity corresponding to the network configuration concurrency from the multiple candidate un-networked devices.

[0129] After the selected target un-networked devices complete network configuration, determine whether all the multiple candidate un-networked devices are selected as target un-networked devices.

[0130] If the determination result is negative, disconnect the GATT connection with the target un-networked device that has completed network configuration, and return to the step of selecting, according to the network configuration concurrency of the terminal device, target un-networked devices with a quantity corresponding to the network configuration concurrency from the multiple candidate un-networked devices until all the multiple candidate un-networked devices are selected as target un-networked devices.

[0131] In some embodiments, the apparatus can also be used for:

[0132] Maintain an un-networked queue, and record the multiple candidate un-networked devices in the un-networked queue.

[0133] When a candidate un-networked device is selected as a target un-networked device, delete the candidate un-networked device from the un-networked queue.

[0134] Correspondingly, the selection module 612, configured to determine whether all the multiple candidate un-networked devices are selected as target un-networked devices, includes:

[0135] Determine whether the record of the un-networked queue is empty.

[0136] In some embodiments, the selection module 612 is configured to select, according to the network configuration concurrency of the terminal device, target un-networked devices corresponding to the network configuration concurrency from the multiple candidate un-networked devices, including:

[0137] Randomly select target un-networked devices corresponding to the network configuration concurrency from the un-networked queue;

[0138] Alternatively, sequentially select target un-networked devices corresponding to the network configuration concurrency from the un-networked queue, where the un-networked queue records multiple candidate un-networked devices in the order of the distance from the candidate un-networked devices to the terminal device, from near to far or from far to near.

[0139] In some embodiments, the network configuration execution module 613 is configured to perform network configuration for the target un-networked devices through the GATT connection established with the target un-networked devices, including:

[0140] Request the network configuration information for the target un-networked devices for network configuration from the cloud server; and, after establishing a GATT connection with the target un-networked devices, generate authentication information for authenticating the target un-networked devices and send an authentication request carrying the authentication information to the cloud server;

[0141] After obtaining the result that the authentication of the target un-networked devices by the cloud server is passed, configure the network configuration information for the target un-networked devices for network configuration to the target un-networked devices through the GATT connection established with the target un-networked devices.

[0142] In further some embodiments, the device can also be used for:

[0143] Before performing the step of establishing GATT connections corresponding to the network configuration concurrency for the selected target un-networked devices, parse the authentication information of the target un-networked devices from the un-networked broadcast packets of the target un-networked devices for the selected target un-networked devices; send an authentication request carrying the authentication information of the target un-networked devices to the cloud server; after obtaining the result that the authentication of the target un-networked devices by the cloud server is passed, cause the network configuration execution module to perform the step of establishing GATT connections corresponding to the network configuration concurrency for the selected target un-networked devices.

[0144] In some embodiments, the network configuration execution module 613 is configured to perform network configuration for the target un-networked devices through the GATT connection established with the target un-networked devices, including:

[0145] Configure the network configuration information for the target un-networked devices for network configuration to the target un-networked devices through the GATT connection established with the target un-networked devices.

[0146] In some further embodiments, the device can also be used for:

[0147] For the selected target unconfigured device, sending a command to increase the broadcast frequency of the broadcast packet to the target unconfigured device;

[0148] For the unselected candidate unconfigured devices, sending a command to decrease the broadcast frequency of the broadcast packet to the unselected candidate unconfigured devices;

[0149] Wherein, after the target unconfigured device or the unselected candidate unconfigured device adjusts the broadcast frequency, if the timing time reaches the set time, the target unconfigured device or the unselected candidate unconfigured device restores the default broadcast frequency.

[0150] In some embodiments, the device for sending a command to increase the broadcast frequency of the broadcast packet to the selected target unconfigured device includes:

[0151] For the selected target unconfigured device, a command to adjust the broadcast packet sending interval time to a first time can be sent to the target unconfigured device;

[0152] The device for sending a command to decrease the broadcast frequency of the broadcast packet to the unselected candidate unconfigured device includes:

[0153] For the unselected candidate unconfigured device, sending a command to adjust the broadcast packet sending interval time to a second time to the unselected candidate unconfigured device;

[0154] Wherein, the first time is less than the default broadcast packet sending interval time of the unconfigured device, and the second time is greater than the default broadcast packet sending interval time of the unconfigured device.

[0155] In some further embodiments, after the target unconfigured device or the unselected candidate unconfigured device adjusts the broadcast packet sending interval time, if the timing time reaches the set time, the target unconfigured device or the unselected candidate unconfigured device restores the default broadcast packet sending interval time.

[0156] In some embodiments, the candidate determination module 611 for determining multiple candidate unconfigured devices of the same device type from the unconfigured devices includes:

[0157] Parsing the PK information of the unconfigured device from the unconfigured broadcast packet sent by the unconfigured device;

[0158] Determining multiple candidate unconfigured devices with the same PK information; wherein, if the PK information of the unconfigured devices is the same, the device types of the unconfigured devices are the same, and the unconfigured devices of the same device type support network configuration in the same network configuration manner.

[0159] The terminal device provided in the embodiment of the present application can implement the network configuration method provided in the embodiment of the present application by setting the above-mentioned network configuration device. As an optional implementation, Figure 7 An optional block diagram of the terminal device is exemplarily shown, such as Figure 7 shown, the terminal device may include: at least one processor 71, at least one communication interface 72, at least one memory 73, and at least one communication bus 74.

[0160] In the embodiment of the present application, the number of the processor 71, the communication interface 72, the memory 73, and the communication bus 74 is at least one, and the processor 71, the communication interface 72, and the memory 73 complete mutual communication through the communication bus 74.

[0161] Optionally, the communication interface 72 may be an interface of a communication module for network communication.

[0162] Optionally, the processor 71 may be a CPU, a GPU (Graphics Processing Unit), an NPU (embedded neural network processor), an FPGA (Field Programmable Gate Array), a TPU (tensor processing unit), an AI chip, an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiment of the present application, etc.

[0163] The memory 73 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0164] Among them, the memory 73 stores one or more computer-executable instructions, and the processor 71 calls the one or more computer-executable instructions to execute the network configuration method provided in the embodiment of the present application.

[0165] The embodiment of the present application further provides a storage medium, which can store one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the network configuration method provided in the embodiment of the present application is implemented.

[0166] The embodiment of the present application further provides a computer program. When the computer program is executed, the network configuration method provided in the embodiment of the present application is implemented.

[0167] The above text describes multiple embodiment solutions provided by the embodiments of the present application. Each optional manner introduced in each embodiment solution can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment solutions, all of which can be considered as the embodiment solutions disclosed and made public by the embodiments of the present application.

[0168] Although the embodiments of the present application are disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be subject to the scope defined by the claims.

Claims

1. A power distribution method, wherein, applied to a terminal device, the terminal device supports multiple GATT connections, including: scanning for unconfigured devices around the terminal device; determining multiple candidate unconfigured devices of the same device type from the unconfigured devices; selecting at least once target unconfigured devices corresponding to the power distribution concurrency of the terminal device from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected; wherein, the power distribution concurrency corresponds to the number of GATT connections that the terminal device supports to establish; establishing GATT connections corresponding to the power distribution concurrency for the selected target unconfigured devices, and performing power distribution for the target unconfigured devices through the GATT connections established with the target unconfigured devices, wherein one target unconfigured device corresponds to establishing one GATT connection; sending a command to increase the broadcast frequency of the broadcast packet to the selected target unconfigured devices; sending a command to decrease the broadcast frequency of the broadcast packet to the unselected candidate unconfigured devices; wherein, after the target unconfigured device or the unselected candidate unconfigured device adjusts the broadcast frequency, if the timing time reaches the set time, the target unconfigured device or the unselected candidate unconfigured device restores the default broadcast frequency.

2. The method according to claim 1, wherein, the step of selecting at least once target unconfigured devices corresponding to the power distribution concurrency of the terminal device from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected includes: selecting target unconfigured devices corresponding to the power distribution concurrency of the terminal device from the multiple candidate unconfigured devices; after the selected target unconfigured devices complete power distribution, determining whether all the multiple candidate unconfigured devices are selected as target unconfigured devices; if the determination result is no, disconnecting the GATT connection with the target unconfigured device that has completed power distribution, and returning to the step of selecting target unconfigured devices corresponding to the power distribution concurrency of the terminal device from the multiple candidate unconfigured devices until all the multiple candidate unconfigured devices are selected as target unconfigured devices.

3. The method according to claim 2, wherein, further includes: maintaining an unconfigured queue and recording the multiple candidate unconfigured devices in the unconfigured queue; when a candidate unconfigured device is selected as a target unconfigured device, deleting the candidate unconfigured device from the unconfigured queue; the step of determining whether all the multiple candidate unconfigured devices are selected as target unconfigured devices includes: determining whether the record of the unconfigured queue is empty.

4. The method according to claim 3, wherein, the step of selecting target unconfigured devices corresponding to the power distribution concurrency of the terminal device from the multiple candidate unconfigured devices includes: randomly selecting target unconfigured devices corresponding to the power distribution concurrency from the unconfigured queue; Alternatively, select target unconfigured devices corresponding to the network configuration concurrency from the unconfigured queue in sequence. The unconfigured queue records multiple candidate unconfigured devices in sequence according to the distance of the candidate unconfigured devices from the terminal device, in the order of from near to far or from far to near.

5. The method according to claim 1, wherein, performing network configuration for the target unconfigured device through the GATT connection established with the target unconfigured device includes: requesting network configuration information for network configuration of the target unconfigured device from the cloud server; and, after establishing a GATT connection with the target unconfigured device, generating authentication information for authenticating the target unconfigured device and sending an authentication request carrying the authentication information to the cloud server; after obtaining the result that the authentication of the target unconfigured device by the cloud server is passed, configuring the network configuration information for network configuration of the target unconfigured device to the target unconfigured device through the GATT connection established with the target unconfigured device.

6. The method according to claim 1, wherein, before establishing GATT connections corresponding to the network configuration concurrency for the selected target unconfigured devices, the method further includes: parsing the authentication information of the target unconfigured device from the unconfigured broadcast packet of the selected target unconfigured device; sending an authentication request carrying the authentication information of the target unconfigured device to the cloud server; after obtaining the result that the authentication of the target unconfigured device by the cloud server is passed, performing the step of establishing GATT connections corresponding to the network configuration concurrency for the selected target unconfigured devices.

7. The method according to claim 1, wherein, determining multiple candidate unconfigured devices of the same device type from the unconfigured devices includes: parsing the product key PK information of the unconfigured device from the unconfigured broadcast packet sent by the unconfigured device; determining multiple candidate unconfigured devices with the same PK information; wherein, if the PK information of the unconfigured devices is the same, the device types of the unconfigured devices are the same, and the unconfigured devices of the same device type support network configuration in the same network configuration manner.

8. A terminal device, wherein, it includes at least one memory and at least one processor, the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the network configuration method according to any one of claims 1-7.

9. A storage medium, wherein, the storage medium stores one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, the network configuration method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Equipment network distribution method and system and computer readable storage medium

    CN113132973A

  • Method and device for batch configuration of home devices

    CN114285683A

  • Network and account number distribution method based on GATT, control terminal and display equipment

    CN114567870A