Node device control method, node device, Bluetooth Mesh system and storage medium

By detecting the number of undistributed devices remaining in the batch distribution network in the Bluetooth Mesh network, controlling the timing of information reporting by node devices, and combining control instructions, the problem of information reporting by node devices interfering with distribution network is solved, improving distribution network efficiency and success rate, and reducing control delay.

CN115665754BActive Publication Date: 2025-03-18ZHEJIANG MAOJING ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211175159.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-03-18
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

During the batch distribution process of Bluetooth Mesh network, periodic reporting of information by node equipment will interfere with the distribution process of undistributed devices, resulting in a decrease in distribution efficiency and success rate.

Method used

By detecting the number of remaining undistributed devices in batch distribution networks and determining the timing of the node equipment starting to report information based on this number, the interference to the distribution process of undistributed devices is reduced. At the same time, multiple control instructions are merged and carried in the control packet to reduce the control delay of the node equipment.

Benefits of technology

It improves the distribution efficiency and success rate of undistributed network equipment, reduces the control delay of node equipment, and improves the user's operating experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665754B_ABST
    Figure CN115665754B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a node device control method, a node device, a Bluetooth Mesh system and a storage medium, the method comprising: detecting the number of remaining unconfigured devices in batch network configuration; comparing the number of remaining unconfigured devices with a first quantity threshold, the first quantity threshold being determined according to the number of unconfigured devices scheduled for one batch network configuration; if the comparison result is that the number of remaining unconfigured devices is less than the first quantity threshold, start periodic reporting of information; if the comparison result is that the number of remaining unconfigured devices is greater than the first quantity threshold, determine the timing of starting periodic reporting of information according to the number of remaining unconfigured devices and the number of node devices that have completed network configuration. The embodiment of the present application can reduce the interference of the network configuration process of unconfigured devices, and improve the network configuration efficiency and success rate of unconfigured devices. Furthermore, the embodiment of the present application can merge multiple control instructions of multiple controls, and carry them in the control packet to reduce the control delay of the node device.
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 technology, and specifically to a node device control method, a node device, a Bluetooth Mesh system, and a storage medium. Background Art

[0002] The Bluetooth Mesh (wireless mesh) network is a mesh network that establishes inter-device communication based on BLE (Bluetooth Low Energy), and is widely used in smart home, smart office and other device intelligent interconnection scenarios. At present, Bluetooth Mesh devices that are not networked (referred to as unprovisioned devices) can be connected to the Bluetooth Mesh network through the network configuration process to become node devices in the Bluetooth Mesh network.

[0003] As the scale of Bluetooth Mesh networks expands, Bluetooth Mesh networks can support batch configuration of multiple unconfigured devices to connect unconfigured devices to the Bluetooth Mesh network in batches. In this context, how to provide a technical solution to improve the efficiency and success rate of configuration of unconfigured devices has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a node device control method, a node device, a Bluetooth Mesh system and a storage medium, which control the timing of the node device that has completed the network configuration to start reporting information, thereby reducing the interference caused by the periodic reporting of information by the node device to the network configuration process of the unconfigured device, thereby improving the network configuration efficiency and success rate of the unconfigured device. Furthermore, based on multiple control instructions for multiple controls of the node device, the embodiments of the present application can merge the multiple control instructions and carry them in the control packet, so that multiple independent controls of the node device are converted into one control, thereby reducing the control delay of the node device.

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

[0006] In a first aspect, an embodiment of the present application provides a node device control method, which is applied to a node device that has completed network configuration in a batch network configuration process, and the method includes:

[0007] At least detect the number of remaining unconfigured devices in batch configuration;

[0008] Comparing the remaining number of unconfigured devices with a first number threshold, where the first number threshold is determined according to the number of unconfigured devices scheduled in batch configuration;

[0009] If the comparison result is that the number of the remaining unconfigured devices is less than the first number threshold, start periodically reporting information;

[0010] If the comparison result is that the number of remaining unconfigured devices is greater than the first number threshold, the timing for starting periodic information reporting is determined at least based on the number of remaining unconfigured devices and the number of node devices that have completed network configuration.

[0011] Based on the first aspect, the node device control method provided in the embodiment of the present application may further include:

[0012] Acquire a control packet, the control packet carrying a merged control instruction, the merged control instruction being obtained by merging a plurality of control instructions, one control instruction being used to control one node device once;

[0013] Parsing the control instruction corresponding to the node device from the combined control instruction carried by the control packet;

[0014] Execute the control instructions corresponding to the node device.

[0015] In a second aspect, an embodiment of the present application provides a node device, comprising at least one memory and at least one processor, wherein the memory stores one or more computer executable instructions, and the processor calls the one or more computer executable instructions to execute the node device control method as described in the first aspect above, or a node device control method based on the first aspect above.

[0016] In a third aspect, an embodiment of the present application provides a Bluetooth Mesh system, comprising a control device and a node device as described in the second aspect above; the control device is used to determine multiple control instructions, one control instruction is used to control one node device once; merge the multiple control instructions into a merged control instruction; carry the merged control instruction in a control packet; and send the control packet in a Bluetooth Mesh network.

[0017] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the node device control method as described in the first aspect above is implemented, or the node device control method based on the first aspect above is implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed, implements the node device control method as described in the first aspect above, or a node device control method based on the first aspect above.

[0019] The node device control method provided in the embodiment of the present application can determine the first quantity threshold in advance according to the number of unconfigured devices scheduled in a batch network configuration, so as to measure whether the number of unconfigured devices remaining in the batch network configuration is large or small by the first quantity threshold. Based on this, for the node devices that have completed network configuration in the batch network configuration process, the node devices do not start to report information periodically after completing the network configuration, but at least detect the number of remaining unconfigured devices in the batch network configuration; thereby comparing the remaining number of unconfigured devices with the first quantity threshold. If the comparison result is that the number of remaining unconfigured devices is less than the first quantity threshold, it means that the number of unconfigured devices remaining in the batch network configuration is small, and the node device can start to report information periodically; thereby, when the number of remaining unconfigured devices is small, the interference caused by the information periodically reported by the node device to the network configuration process of the unconfigured devices is reduced, and the node device can report information in a timely manner. If the comparison result is that the number of remaining unconfigured devices is greater than the first number threshold, it means that the number of remaining unconfigured devices in the batch network configuration is relatively large. At this time, the node device can determine the timing for the node device to start periodically reporting information based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration; thereby, when it is determined that the overall progress of the batch network configuration is close to the end state based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration, and the number of remaining unconfigured devices is not excessive, the node device is decided to start periodically reporting information, so that when the batch network configuration is close to the end state, the information periodically reported by the node device has limited network configuration interference caused by the remaining unconfigured devices, and the node device can report information relatively promptly.

[0020] It can be seen that in the embodiment of the present application, the node device does not start to periodically report information after completing the network configuration, but controls the timing of the node device to start reporting status information based on the number of remaining unconfigured devices in the batch configuration, thereby reducing the interference caused by the periodic reporting of information by the node device to the network configuration process of the unconfigured devices, and can enable the node device to report information in a timely manner while improving the network configuration success rate of the unconfigured devices and reducing the network configuration time, thereby ensuring the user's operating experience of the node device.

[0021] Furthermore, the embodiments of the present application can combine multiple control instructions for multiple controls of node devices into a combined control instruction, and carry the combined control instruction in a control packet, and then the combined control instruction can be sent in the Bluetooth Mesh network so that the controlled node device can obtain the control packet; after the node device obtains the control packet, it can parse the control instruction corresponding to the node device from the combined control instruction carried by the control packet and execute it to achieve control of the node device. It can be seen that the embodiments of the present application can combine multiple control instructions for multiple controls into a combined control instruction, and carry it in a control packet, so that multiple control instructions can be sent through a control packet in the Bluetooth Mesh network, and then multiple independent controls of the node device are converted into one control, which improves the control speed of multiple controls of the node device, reduces the delay of multiple controls of the node device, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0023] Figure 1A This is an example diagram of a Bluetooth Mesh network.

[0024] Figure 1B An example diagram of sending an advertising packet for a Bluetooth Mesh device.

[0025] Figure 2 This is an example diagram of signal interference during batch network configuration.

[0026] Figure 3 A flowchart of a node device control method provided in an embodiment of the present application.

[0027] Figure 4 This is an example diagram for implementing batch network configuration.

[0028] Figure 5 Another flow chart of the node device control method provided in an embodiment of the present application.

[0029] Figure 6 This is an example diagram for multiple controls on multiple node devices.

[0030] Figure 7 Another flow chart of the node device control method provided in the embodiment of the present application.

[0031] Figure 8 Another flow chart of the node device control method provided in an embodiment of the present application.

[0032] Fig. 9 Yet another flow chart of the node device control method provided in an embodiment of the present application.

[0033] Fig.10 This is an example diagram of merging control instructions according to an embodiment of the present application.

[0034] Fig.11A A block diagram of a node device control device provided in an embodiment of the present application.

[0035] Fig. 11B Another block diagram of the node device control device provided in an embodiment of the present application.

[0036] Fig.12 A block diagram of a node device. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] Figure 1A An example diagram of a Bluetooth Mesh network is shown as follows: Figure 1A As shown, the Bluetooth Mesh network may include: multiple node devices 101 that have been configured. Figure 1A As shown, in addition to configuring and controlling the provisioned node devices, the Bluetooth Mesh gateway 102 and the terminal device 103 can also add the unprovisioned device 104 to the Bluetooth Mesh network through the Provisioning process (also called the provisioning process).

[0039] Among them, the node device 101 can be regarded as a Bluetooth Mesh device that has joined the Bluetooth Mesh network; the unconfigured device 104 can be regarded as a Bluetooth Mesh device that has not yet joined the Bluetooth Mesh network. When the unconfigured device joins the Bluetooth Mesh network through the configuration process, the unconfigured device can become a node device in the Bluetooth Mesh network. In the embodiment of the present application, the Bluetooth Mesh device can be, for example, an IoT (Internet of Things) device in a smart home system such as smart lamps, sockets, and home appliances.

[0040] The Bluetooth Mesh gateway 102 can be, for example, a smart speaker or a multi-mode gateway with Bluetooth communication capability and Internet connection capability. In addition to the configuration and control functions of the node device 101, the Bluetooth Mesh gateway 102 can also serve as a springboard for connecting the node device 101 to the Internet to achieve remote control of the node device. The terminal device 103 can be a user-side device such as a smart phone or tablet computer used by a user, which has the configuration and control functions of the node device 101, as well as the function of controlling the node device 101 through the Bluetooth Mesh gateway 102. In the process of adding the unprovisioned device 104 to the Bluetooth Mesh network, the Bluetooth Mesh gateway or terminal device that performs Provisioning can be called a Provisioner (starting configuration device).

[0041] In the Bluetooth Mesh standard, after the Bluetooth Mesh device is powered on, if the Bluetooth Mesh device has not established a GATT (Generic Attribute Profile) connection with the terminal device, the Bluetooth Mesh device will periodically send broadcast packets in the Bluetooth Mesh network. As an example, Figure 1B An example diagram showing a Bluetooth Mesh device sending a broadcast packet is shown in FIG. Figure 1B As shown in the figure, if the Bluetooth Mesh device is an unprovisioned device, it will periodically send unprovisioned advertising packets (such as PB-GATT advertising packets) after power-on so that the Provisioner can discover the unprovisioned device. If the Bluetooth Mesh device is a node device that has completed network provisioning, the node device will periodically send proxy advertising packets after power-on so that terminal devices such as smartphones can discover the node device and establish a GATT connection with the node device.

[0042] It should be noted that in a Bluetooth Mesh network, a Bluetooth Mesh gateway and Bluetooth Mesh devices (including networked node devices and unconfigured networked devices) can interact by directly sending broadcast packets. However, since terminal devices such as smartphones and tablets do not support the interaction method of directly sending broadcast packets, the terminal devices need to establish a proxy connection with the node devices in the Bluetooth Mesh network, so that the node devices acting as proxies forward the broadcast packets to other devices. For example, the Bluetooth Mesh protocol stack defines the advertising bearer layer (Advertising Bearer) and the GATT (Generic Attribute Profile) bearer layer. Since terminal devices such as smartphones and tablets do not support the advertising bearer layer, the terminal devices need to perform the bearer layer conversion (conversion from the advertising bearer layer to the GATT bearer layer) through the node devices acting as proxies, so that the terminal devices that do not support the advertising bearer layer can send and receive Bluetooth messages through the GATT connection.

[0043] In large-scale Bluetooth Mesh network scenarios, as the scale of devices that Bluetooth Mesh networks can support expands, Provisioner can support batch configuration of multiple unconfigured devices when configuring unconfigured devices. For example, after the terminal device scans and finds unconfigured devices, it can aggregate and display multiple unconfigured devices on the APP (application) page, so that after the user confirms to configure the multiple unconfigured devices, the Provisioner (terminal device or Bluetooth Mesh gateway) can perform the configuration process on the multiple unconfigured devices, so that the multiple unconfigured devices can be configured in batches. It should be noted that the APP referred to here can be an application installed by the terminal device for Bluetooth Mesh management, such as an APP that provides smart home, smart office and other device intelligent interconnection services.

[0044] During the batch configuration process, some unconfigured devices will complete the configuration first and become node devices in the Bluetooth Mesh network; the node devices that have completed the configuration need to periodically report information (such as status information) to the terminal device or the Bluetooth Mesh gateway, so that after the terminal device obtains the information reported by the node device (the terminal device can obtain the information reported by the node device through the proxy node, or through interaction with the Bluetooth Mesh gateway), the terminal device can update the node device information on the APP page (for example, update the node device information on the device display panel interface of the APP page), so that the user can perform user operations based on the APP page that updates the node device information.

[0045] However, during the batch configuration process, if the node devices that have completed the configuration report information periodically, it will cause a large transmission load to the terminal device or Bluetooth Mesh gateway (especially when there are a large number of Bluetooth Mesh devices in batch configuration), thereby interfering with the configuration process of the unconfigured devices that have not yet completed the configuration, resulting in a lower configuration success rate and longer configuration time for the unconfigured devices (longer configuration time means lower configuration efficiency).

[0046] It should be noted that during the network configuration process, the unconfigured device will interact with the terminal device or Bluetooth Mesh gateway through the Bluetooth broadcast channel for the broadcast packets used for network configuration; at the same time, the node device that has completed the network configuration also periodically reports information through the Bluetooth broadcast channel; and the Bluetooth broadcast channel used by the node device to periodically report information is the same as the Bluetooth broadcast channel used by the unconfigured device for the broadcast packets used for network configuration; this results in that when there are a large number of unconfigured devices in batch configuration, the information periodically reported by the node device will cause mutual interference to the broadcast packets used for network configuration by the unconfigured device at the air interface of the Bluetooth broadcast channel, causing the broadcast packets used for network configuration by the unconfigured device to be lost or the data CRC (Cyclic Redundancy Check) check error, etc., causing the unconfigured device to continuously retransmit the broadcast packets used for network configuration during the network configuration process, thereby affecting the network configuration success rate and network configuration efficiency of the unconfigured devices in the batch configuration process.

[0047] For ease of understanding, Figure 2 An example diagram of signal interference during batch network configuration is shown as follows: Figure 2As shown, assuming that there are n Bluetooth Mesh devices (Bluetooth Mesh devices 1 to n), in the batch configuration process, Bluetooth Mesh devices 1 to Bluetooth Mesh devices s have completed the configuration one after another (at this time, Bluetooth Mesh devices 1 to s become node devices in the Bluetooth Mesh network), and Bluetooth Mesh devices s+1 to Bluetooth Mesh devices n have not completed the configuration (at this time, Bluetooth Mesh devices s+1 to n are still unconfigured devices). Then, Bluetooth Mesh devices 1 to s can periodically report status information in the Bluetooth Mesh network through Bluetooth broadcast channels 37 / 38 / 39, and Bluetooth Mesh devices s+1 to n also interact with terminal devices or Bluetooth Mesh gateways through Bluetooth broadcast channels 37 / 38 / 39 during the configuration process for configuration broadcast packets. That is to say, the status information reported by Bluetooth Mesh devices 1 to s and the broadcast packets used for network configuration by Bluetooth Mesh devices s+1 to n are all transmitted through Bluetooth broadcast channels 37 / 38 / 39, which causes a large transmission load on the terminal device or Bluetooth Mesh gateway; and the status information reported by Bluetooth Mesh devices 1 to s will cause mutual interference to the broadcast packets used for network configuration by Bluetooth Mesh devices s+1 to n on the air interface of Bluetooth broadcast channels 37 / 38 / 39, resulting in a high probability of packet loss or data CRC check error in the broadcast packets used for network configuration by Bluetooth Mesh devices s+1 to Bluetooth Mesh devices n, causing Bluetooth Mesh devices s+1 to Bluetooth Mesh devices n to be very likely to need to retransmit the broadcast packets used for network configuration, thereby reducing the network configuration success rate and increasing the network configuration time of Bluetooth Mesh devices s+1 to Bluetooth Mesh devices n that have not yet completed network configuration (when network configuration fails or retries occur in unconfigured devices, the network configuration success rate will undoubtedly be significantly reduced and the network configuration time will be increased).

[0048] It should be noted that for BLE-Mesh communication technology, when Bluetooth Mesh devices use broadcast channels for communication, they use three broadcast channels numbered 37, 38, and 39 for communication.

[0049] Furthermore, the inventors conducted actual tests on the average single-device time for batch configuration of 200 Bluetooth Mesh devices and the average single-device time for batch configuration of 100 Bluetooth Mesh devices, and found that the average single-device time for batch configuration of 200 Bluetooth Mesh devices is much higher than the average single-device time for batch configuration of 100 Bluetooth Mesh devices; one of the reasons for this phenomenon is that when the number of Bluetooth Mesh devices configured in batches is large, a large number of configured node devices periodically report information, which will interfere with the configuration process of unconfigured devices that have not yet completed configuration.

[0050] It can be seen that in the batch network configuration process, the information periodically reported by the node devices that have completed the network configuration will interfere with the network configuration process of the unconfigured devices that have not yet completed the network configuration. Therefore, how to reasonably control the timing of the node devices to start reporting information to reduce the interference to the network configuration process of the unconfigured devices is of great significance for improving the network configuration success rate of the unconfigured devices and reducing the network configuration time.

[0051] One way to determine the timing for a node device to start reporting information is: after the Bluetooth Mesh device completes network configuration and becomes a node device, the node device determines a random delay time from a preset random delay range each time it reports information, so that when the time reaches the random delay time, the node device reports information; wherein, the node device reports information once in one information reporting cycle. In the process of periodically reporting information, the node device adds a random delay time each time it reports information, so that the time for different node devices to report information may be staggered, thereby reducing signal interference in the Bluetooth broadcast channel. It should be noted that the random delay range can be a preset time range, and the specific value can be determined according to the actual situation. For example, the random delay range can be a time range of 10 seconds to 20 seconds, so that the node device reports information with a random delay within a time range of 10 seconds to 20 seconds each time it reports information.

[0052] Although the above method can reduce the signal interference in the Bluetooth broadcast channel to a certain extent, after completing the network configuration, the node device only periodically reports information after adding a random delay time. Therefore, during the network configuration process of the unconfigured device, the Bluetooth broadcast channel will still contain information periodically reported by the node device. When the number of unconfigured devices is large, the interference caused to the network configuration process of the unconfigured devices is still relatively serious. In other words, during the batch configuration process of a large-scale Bluetooth Mesh network, if the number of unconfigured devices is large, there will be a large number of broadcast packets for network configuration sent by unconfigured devices in the Bluetooth broadcast channel. At this time, even if the node device adds a random delay time each time it reports information, the interference caused to the network configuration process of the unconfigured devices is still relatively serious.

[0053] Based on this, an embodiment of the present application provides an improved node device control scheme to control the timing for the node devices that have completed network configuration to start reporting information during the batch network configuration process, so that when the number of remaining unconfigured devices in the batch network configuration is small, the node devices that have completed network configuration are controlled to start reporting information so as not to affect the user's operating experience of the node devices; when the number of remaining unconfigured devices in the batch network configuration is large, the node devices are controlled to cancel reporting information, thereby reducing interference with the network configuration process of the remaining unconfigured devices.

[0054] It can be understood that, during the batch network configuration process, when a large number of remaining unconfigured devices are still being configured, it means that the batch network configuration process is not yet close to the end state. At this time, if the node devices that have completed the network configuration start to report information too early, it will form an interference source for the network configuration process of the large number of remaining unconfigured devices, resulting in a lower network configuration success rate and longer network configuration time for the unconfigured devices; and when the number of remaining unconfigured devices in batch network configuration is small, the embodiment of the present application controls the node devices to start reporting information, which can reduce the interference caused by the information reported by the node devices to the network configuration process of the relatively small number of unconfigured devices, thereby providing the possibility of improving the network configuration success rate of the unconfigured devices and reducing the network configuration time; at the same time, on the basis of the node devices starting to report information, it does not affect the user's operating experience of the node devices.

[0055] Based on the above ideas, the embodiment of the present application can determine the first quantity threshold according to the number of unconfigured devices scheduled in a batch network configuration, so as to measure whether the number of remaining unconfigured devices in the batch network configuration is large or small by the first quantity threshold; based on this, the node devices that have completed the network configuration in the batch network configuration process can at least detect the number of remaining unconfigured devices in the batch network configuration, and compare the detected number of remaining unconfigured devices with the first quantity threshold; and based on the comparison result, decide whether the node device starts to periodically report information.

[0056] As an optional implementation, Figure 3 The optional flow chart of the node device control method provided in the embodiment of the present application is exemplarily shown. The method flow can be applied to the node device, which can be any node device that has completed the network configuration in the batch network configuration process. Figure 3 The method flow may include the following steps.

[0057] In step S310, at least the number of remaining unconfigured devices in batch configuration is detected.

[0058] In some embodiments, the embodiments of the present application can perform batch configuration of multiple Bluetooth Mesh devices. During the batch configuration process, for the node devices that have completed the configuration, the node devices do not immediately enter the stage of periodic reporting of information, but first detect the number of remaining unconfigured devices in the batch configuration (that is, the number of unconfigured devices remaining in the batch configuration), and then decide the timing for the node device to start periodic reporting of information based on the detected number of remaining unconfigured devices.

[0059] As an optional implementation, the node device periodically reports information, which can be that the node device reports information separately in each information reporting cycle; or, in each information reporting cycle, reports information based on a random delay time. For example, for node devices that have completed network configuration during the batch network configuration process, the node device does not immediately report information based on a random delay time in each information reporting cycle, but first detects the number of remaining unconfigured devices in the batch network configuration, and then decides the timing for the node device to start the above-mentioned periodic information reporting based on the detected number of remaining unconfigured devices.

[0060] In some embodiments, when considering the interference caused by the information periodically reported by the node device to the unconfigured network devices, since the information reported by the node device involves the user operation experience, when deciding the timing for the node device to start periodically reporting information, it is also necessary to consider the impact of the configuration process of the unconfigured network devices on the information reported by the node device; based on this, when the node device detects the number of remaining unconfigured network devices in batch configuration, the product isolation can be performed through product information, thereby reducing the impact of the configuration process of unconfigured network devices belonging to different products from the node device on the information reported by the node device.

[0061] That is to say, there may be unprovisioned devices of different products in the Bluetooth Mesh network that are all being configured in batches (the number of unprovisioned devices for a product can be multiple). When deciding when a node device starts to periodically report information, the node device can decide when the node device starts to periodically report information based on the number of remaining unprovisioned devices with the same product information as the node device, without considering the number of unprovisioned devices with different product information from the node device, thereby reducing the impact of the configuration process of unprovisioned devices with different product information from the node device on the information reported by the node device.

[0062] In one example, there may be multiple lamps and multiple sockets in a Bluetooth Mesh network that need to be batch-configured. The lamps and sockets have different product information. For the configured sockets, when deciding when the configured sockets start to periodically report information, it is necessary to consider that the configuration of the lamps should not affect the information reporting of the configured sockets. Based on this, for the configured sockets, the number of remaining unconfigured sockets with the same product information as the sockets in the Bluetooth Mesh network can be detected without considering the number of unconfigured lamps, so as to achieve the effect of product isolation when deciding when the configured sockets start to periodically report information. In one possible assumption, the number of lamps can be greater than the number of sockets, and accordingly, the configuration time of the lamps can be greater than the configuration time of the sockets.

[0063] Based on the above description, in an optional implementation, the product information based on the Bluetooth Mesh device can be carried in the unconfigured network broadcast packet. Therefore, in the batch network configuration process, for the node devices that have completed the network configuration, the node device can detect the number of unconfigured network broadcast packets with the same product information as the node device in the Bluetooth Mesh network; and then use the number of unconfigured network broadcast packets detected as the number of remaining unconfigured network devices in the batch network configuration. In other words, for the node devices that have completed the network configuration, the node device can regard the unconfigured network devices with the same product information as itself as the remaining unconfigured network devices in the batch network configuration process; because the unconfigured network devices will send unconfigured network broadcast packets and carry product information in the unconfigured network broadcast packets, the node device can determine the number of unconfigured network devices remaining in the batch network configuration (i.e., the number of remaining unconfigured network devices in the batch network configuration) by detecting the number of unconfigured network broadcast packets with the same product information as the node device in the Bluetooth Mesh network.

[0064] As an optional implementation, the node device can periodically detect the number of unconfigured broadcast packets with the same product information as the node device in the Bluetooth Mesh network with a unit time as a period, thereby determining the number of unconfigured broadcast packets with the same product information detected by the node device in each unit time as the number of remaining unconfigured devices corresponding to each unit time in the batch configuration process. For example, the node device can set a first count corresponding to the number of remaining unconfigured devices, and for each unit time, the node device adds 1 to the first count for each unconfigured broadcast packet with the same product information as the node device received in the unit time (the first count can be accumulated from an initial value such as 0); thereby determining the first count per unit time as the number of unconfigured broadcast packets with the same product information detected by the node device in the unit time.

[0065] In one example, taking the unit time as 1 second, the node device can periodically detect the number of unconfigured broadcast packets with the same product information as the node device in the Bluetooth Mesh network with a period of 1 second, thereby determining the number of unconfigured broadcast packets detected by the node device per second as the number of remaining unconfigured devices corresponding to the batch configuration process per second. For example, the node device can dynamically detect the number of PB (Provisioning Bearer)-GATT broadcast packets with the same product information as the node device in the Bluetooth Mesh network per second, thereby obtaining the number of remaining unconfigured devices corresponding to the batch configuration process per second.

[0066] As an example, the product information of a Bluetooth Mesh device can be a product identifier for identifying a Bluetooth Mesh device, such as a Product ID (product model), which can be a unique product identifier of a Bluetooth Mesh device. Taking Product ID as an example, a PB-GATT broadcast packet sent by an unconfigured device can carry a Device UUID (Universally Unique Identifier). By parsing the Device UUID in the PB-GATT broadcast packet, the Product ID of the unconfigured device can be obtained.

[0067] It should be noted that the unprovisioned device's unprovisioned broadcast packet may be in the form of an Unprovisioned Device Beacon (unprovisioned device broadcast beacon) broadcast packet in addition to the PB-GATT broadcast packet. Among them, the PB-GATT broadcast packet broadcast by the unprovisioned device can be used by terminal devices such as smartphones to discover the unprovisioned device; the Unprovisioned Device Beacon broadcast packet broadcast by the unprovisioned device can be used by the Bluetooth Mesh gateway to discover the unprovisioned device.

[0068] In a further optional implementation, since unconfigured broadcast packets do not support relay forwarding in the Bluetooth Mesh network and can only be received by neighboring devices, for node devices that have completed network configuration during the batch network configuration process, the node device can detect the number of unconfigured broadcast packets with the same product information as the node device sent by neighboring unconfigured devices, thereby detecting the number of unconfigured broadcast packets with the same product information as the node device in the Bluetooth Mesh network. For example, the node device can periodically detect the number of unconfigured broadcast packets with the same product information as the node device sent by neighboring unconfigured devices with a unit time period. The neighboring unconfigured devices of the node device can be regarded as unconfigured devices that are one hop away from the node device.

[0069] In step S311, the remaining number of unconfigured devices is compared with a first number threshold, where the first number threshold is determined according to the number of unconfigured devices scheduled for batch configuration.

[0070] The number of devices that can be scheduled at one time by Provisioner (Bluetooth Mesh gateway or terminal device) during batch network configuration is limited. When the number of unconfigured devices is large, Provisioner may need to schedule unconfigured devices for batch network configuration multiple times during batch network configuration. As an optional implementation, the number of unconfigured devices scheduled for batch network configuration can be determined based on the network configuration concurrency of Provisioner; when Provisioner performs batch network configuration on unconfigured devices, it can schedule unconfigured devices for batch network configuration based on the network configuration concurrency of Provisioner. If the number of unconfigured devices exceeds the network configuration concurrency of Provisioner, Provisioner needs to schedule unconfigured devices for batch network configuration multiple times.

[0071] The specific value of the Provisioner's network configuration concurrency can be determined according to the Provisioner's network configuration capability, and the embodiments of the present application do not set a limit. In an example, taking the Provisioner's network configuration concurrency as 10 as an example, when batch configuring unconfigured devices, the Provisioner schedules 10 unconfigured devices as a unit. When the number of unconfigured devices exceeds 10, the Provisioner needs to schedule the unconfigured devices for batch configuration multiple times; that is, when the Provisioner performs batch configuration on unconfigured devices, it schedules 10 unconfigured devices at a time for batch configuration. When the number of unconfigured devices exceeds 10, the Provisioner needs to schedule the unconfigured devices for batch configuration multiple times.

[0072] As an optional implementation, when the Provisioner is a terminal device, the embodiment of the present application can determine the network provisioning concurrency of the terminal device based on the number of GATT connections supported by the terminal device when the terminal device supports multiple GATT connections.

[0073] Optionally, when the terminal device performs batch configuration of unconfigured devices, the terminal device may, based on the number of GATT connections of the terminal device, schedule at least once a number of unconfigured devices corresponding to the number of GATT connections from multiple unconfigured devices until all the multiple unconfigured devices are scheduled; for each unconfigured device scheduled by the terminal device, the terminal device may establish GATT connections for the scheduled unconfigured devices, which number corresponds to the number of GATT connections, thereby configuring the unconfigured devices through the GATT connections established with the unconfigured devices, wherein one GATT connection is established for one unconfigured device; further, the terminal device may release the GATT connection with the unconfigured device after the unconfigured device completes configuration, so that the terminal device can re-establish a GATT connection with a new unconfigured device. In an optional implementation, the terminal device may terminate the GATT connection with an unprovisioned device after the network configuration of the unprovisioned device is completed, thereby re-establishing the GATT connection with the new unprovisioned device to perform the network configuration process for the new unprovisioned device; the terminal device may also terminate the GATT connection with the unprovisioned devices as a whole after all the unprovisioned devices corresponding to the number of GATT connections are completed, thereby rescheduling the number of unprovisioned devices corresponding to the number of GATT connections, and then establishing the GATT connection with the re-scheduled unprovisioned devices to perform the network configuration process for the re-scheduled unprovisioned devices.

[0074] For ease of understanding, Figure 4 The following is an example diagram showing the implementation of batch network configuration: Figure 4 As shown, it is assumed that there are unprovisioned devices 1 to 16 for batch configuration; taking the provisioner's configuration concurrency as 4 as an example (for example, the number of GATT connections supported by the terminal device is 4), the terminal device can schedule the unprovisioned devices in multiple times when performing batch configuration on the unprovisioned devices 1 to 16; taking the sequential scheduling of the unprovisioned devices 1 to 16 as an example, the terminal device can schedule the unprovisioned devices 1 to 4 for batch configuration when scheduling the unprovisioned devices for the first time (for example, the terminal device can schedule the unprovisioned devices 1 to 4 by communicating with the unprovisioned devices 1 to 4 Establish a GATT connection, and perform parallel network configuration for unprovisioned devices 1 to 4); after unprovisioned devices 1 to 4 complete network configuration, the terminal device can schedule unprovisioned devices 5 to 8 to perform parallel network configuration again (for example, after unprovisioned devices 1 to 4 complete network configuration, the terminal device can release the GATT connection with unprovisioned devices 1 to 4, then establish a GATT connection with unprovisioned devices 5 to 8, and perform parallel network configuration for unprovisioned devices 5 to 8); and so on, the terminal device can schedule unprovisioned devices 13 to 16 for the last time to perform parallel network configuration.

[0075] From the above introduction, it can be seen that when batch provisioning multiple unprovisioned devices, Provisioner may perform batch provisioning for multiple unprovisioned devices through one or multiple scheduling; that is, based on the number of unprovisioned devices that need batch provisioning in the Bluetooth Mesh network and the number of unprovisioned devices that Provisioner can schedule at one time, Provisioner can batch provision multiple unprovisioned devices through one scheduling when the number of unprovisioned devices that need batch provisioning is small; and when the number of unprovisioned devices that need batch provisioning is large, Provisioner needs to perform batch provisioning for multiple unprovisioned devices through multiple scheduling; therefore, the number of scheduling times of Provisioner in the batch provisioning process can measure whether the number of unprovisioned devices that need batch provisioning in the Bluetooth Mesh network is large or small.

[0076] Based on this, the embodiment of the present application can measure whether the number of remaining unconfigured devices in batch configuration is large or small based on the number of unconfigured devices scheduled in batch configuration. For example, if the number of remaining unconfigured devices in batch configuration is greater than the number of unconfigured devices scheduled in batch configuration, then the Provisioner needs to perform batch configuration on the remaining unconfigured devices through multiple scheduling, indicating that the number of remaining unconfigured devices is large; if the number of remaining unconfigured devices in batch configuration is less than the number of unconfigured devices scheduled in batch configuration, then the Provisioner can perform batch configuration on the remaining unconfigured devices through one scheduling, indicating that the number of remaining unconfigured devices is small.

[0077] Based on the idea of ​​using the number of unconfigured devices scheduled in batch network configuration at one time to measure whether the number of remaining unconfigured devices in batch network configuration is large or small, the embodiment of the present application can determine the first quantity threshold according to the number of unconfigured devices scheduled in batch network configuration at one time (for example, the concurrent network configuration of the Provisioner), and use the first quantity threshold to specifically measure whether the number of remaining unconfigured devices is large or small. Furthermore, the embodiment of the present application can compare the number of remaining unconfigured devices detected in step S310 with the first quantity threshold to obtain a result of whether the number of remaining unconfigured devices is large or small.

[0078] As an optional implementation, the first quantity threshold may be the number of unconfigured devices scheduled in batch network configuration, or less than the number of unconfigured devices scheduled in batch network configuration; for example, if the batch network configuration of the remaining unconfigured devices can be completed by one scheduling, the number of remaining unconfigured devices in batch network configuration is considered to be small. In other possible implementations, the first quantity threshold may also be greater than the number of unconfigured devices scheduled in batch network configuration, but less than the preset quantity limit; for example, the embodiment of the present application may define the number of remaining unconfigured devices in batch network configuration as the quantity limit corresponding to the case where the number is small, and the quantity limit may be greater than the number of unconfigured devices scheduled in batch network configuration. At this time, although the remaining unconfigured devices need to complete the batch network configuration through more than one scheduling, the number of remaining unconfigured devices is less than the quantity limit, and the number of remaining unconfigured devices in batch network configuration is also considered to be small. The above examples illustrate possible forms of the first quantity threshold. The embodiment of the present application may set the first quantity threshold to measure whether the number of remaining unconfigured devices in batch network configuration is large or small based on the actual situation of batch network configuration, and the embodiment of the present application is not limited to this.

[0079] In step S312, if the comparison result is that the number of remaining unconfigured network devices is less than the first number threshold, the node device starts to periodically report information.

[0080] After the node device compares the number of remaining unconfigured devices detected in step S310 with the first number threshold, a comparison result can be obtained; the comparison result may be that the number of remaining unconfigured devices is less than the first number threshold, or it may be that the number of remaining unconfigured devices is greater than the first number threshold. Based on the first number threshold, it is possible to measure whether the number of remaining unconfigured devices in the batch configuration is large or small. Therefore, when the comparison result is that the number of remaining unconfigured devices is less than the first number threshold, the embodiment of the present application can determine that the number of remaining unconfigured devices in the batch configuration is small; at this time, the node device starts to report information periodically, and the network configuration interference for the small number of remaining unconfigured devices is low. Under the condition of ensuring the network configuration success rate of the unconfigured devices and reducing the network configuration time, the node device can report information in time, thereby reducing the impact of the user on the operation experience of the node device.

[0081] As an optional implementation, the node device may start to periodically report information, and the node device may start to periodically report status information. The status information of the node device may be the attribute status information of the node device, such as the current actual functional status of the node device. Taking smart lamps as an example, the status information of smart lamps may include attribute information such as switch information, brightness information, color temperature information, etc. After the terminal device obtains the status information reported by the node device, it may display the status information of the node device to the user on the APP page. In an optional implementation, the node device may report the status information by reporting a heartbeat; for example, the status packet periodically reported by the node device may be used as the heartbeat packet of the node device to save the consumption of the Bluetooth Mesh network load.

[0082] In some embodiments, the node device may start reporting status information based on a random delay time at each reporting information cycle, and the random delay time may be determined from a preset random delay range. For example, each time a reporting information cycle is reached, the node device may determine a random delay time from a preset random delay range, and when the random delay time arrives, the node device reports status information.

[0083] In step S313, if the comparison result is that the number of remaining unconfigured devices is greater than the first number threshold, the timing for the node device to start periodically reporting information is determined based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration.

[0084] Based on the comparison result of step S311, if the number of remaining unconfigured devices is greater than the first number threshold, it means that the number of remaining unconfigured devices in the batch configuration is relatively large, and the node device needs to further decide the timing of the node device to start periodic reporting of information based on the overall progress of the batch configuration. In some embodiments, when the number of remaining unconfigured devices in the batch configuration is relatively large, the embodiment of the present application can determine the overall progress of the batch configuration based on the number of remaining unconfigured devices in the Bluetooth Mesh network and the number of node devices that have completed the configuration, so that when the overall progress of the batch configuration is close to the end, it is determined that the node device starts to periodically report information, so that when the batch configuration is close to the end, the information periodically reported by the node device has limited interference with the remaining unconfigured devices, and the node device can report information relatively timely, reducing the impact of the user on the operation experience of the node device.

[0085] As an optional implementation, when the number of remaining unconfigured devices is greater than the first number threshold, the embodiment of the present application may determine that the number of node devices that have completed network configuration is much greater than the number of remaining unconfigured devices, and regard most of the batch network configuration process as having been completed. Although the number of remaining unconfigured devices is still relatively large at this time, under the large base number of devices in batch network configuration, the overall proportion of the number of remaining unconfigured devices in batch network configuration is already small, and the overall progress of batch network configuration is close to the end state. Optionally, the embodiment of the present application may set the number of node devices that have completed network configuration to be much greater than the preset multiple corresponding to the number of remaining unconfigured devices; so that when the preset multiple of the number of remaining unconfigured devices is still less than the number of node devices that have completed network configuration, it is regarded that the number of node devices that have completed network configuration is much greater than the number of remaining unconfigured devices.

[0086] Furthermore, when the overall progress of the batch network configuration is close to the end state, in order to avoid the node device starting to periodically report information when the number of remaining unconfigured devices is too large, resulting in the interference to the remaining unconfigured devices cannot be effectively reduced, the embodiment of the present application can set a second quantity threshold whose value is greater than the first quantity threshold, so as to further limit the number of remaining unconfigured devices when the overall progress of the batch network configuration is close to the end state, thereby avoiding the node device starting to periodically report information when the number of remaining unconfigured devices is too large.

[0087] Based on the above description, in some embodiments, the embodiments of the present application can detect whether the number of remaining unconfigured devices is less than a second number threshold when the number of remaining unconfigured devices is greater than a first number threshold, and whether a preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed network configuration; if the number of remaining unconfigured devices is less than the second number threshold, and the preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed network configuration, it can be determined that the overall progress of batch network configuration is close to the end state, and the number of remaining unconfigured devices is not excessive; at this time, the node device starts to report information periodically, and the network configuration interference caused by the remaining unconfigured devices is limited. While ensuring the network configuration success rate of the unconfigured devices and reducing the network configuration time, the node device can report information in a timely manner, thereby reducing the impact of the user on the operation experience of the node device.

[0088] In one example, when setting a second quantity threshold greater than the first quantity threshold, the second quantity threshold may be a preset multiple of the first quantity threshold; for example, if the provisioning concurrency of the Provisioner is used as the first quantity threshold, the second quantity threshold may be a preset multiple of the provisioning concurrency of the Provisioner. Assuming that the preset multiple is 2 times, and the provisioning concurrency of the Provisioner is 10, the first quantity threshold is 10, and the second quantity threshold is 20; thus, the embodiment of the present application can determine that the overall progress of the batch network configuration is close to the end state when the number of remaining unconfigured devices is less than 20, and 2 times the number of remaining unconfigured devices is still less than the number of node devices that have completed network configuration, and the number of remaining unconfigured devices does not exist in excess, at which time the node device begins to periodically report information. It should be noted that some specific values ​​listed in this paragraph are only used as an example. When selecting the specific values ​​of the first quantity threshold, the second quantity threshold, and the preset multiple, it is necessary to determine according to the actual situation of the Bluetooth Mesh network.

[0089] In some further embodiments, when detecting the number of remaining unconfigured devices in batch configuration, the node device may also detect the number of node devices that have completed configuration in the Bluetooth Mesh network; thus, when the number of remaining unconfigured devices is greater than the first number threshold, the detected number of remaining unconfigured devices and the number of node devices that have completed configuration are compared. Optionally, the number of node devices that have completed configuration detected by the node device may be the number of node devices that have completed configuration during the batch configuration process.

[0090] As an optional implementation, there may be multiple users whose unconfigured devices are being configured in batches in a Bluetooth Mesh network. For any user, when deciding when the user's configured node device starts to periodically report information, in order to reduce the impact of other users' configuration on the user's node device reporting information, the embodiment of the present application can isolate users through the network information of the node device when detecting the number of node devices that have completed configuration. Optionally, for node devices under the same user account, the node devices can be assigned the same network information after accessing the Bluetooth Mesh network; in one example, the network information is such as the Network ID.

[0091] As an optional implementation, the network information based on the node device can be carried in the proxy broadcast packet of the node device after the node device completes the network configuration. The node device can detect the number of proxy broadcast packets with the same network information as the node device in the Bluetooth Mesh network; and then use the number of detected proxy broadcast packets as the number of node devices that have completed the network configuration in the Bluetooth Mesh network. In other words, the node devices of the same user that have completed the network configuration can be configured with the same network information, so that for any node device that has completed the network configuration, the node device can regard the node device with the same network information as itself in the Bluetooth Mesh network as a node device that has completed the network configuration in the Bluetooth Mesh network; because the node device will send a proxy broadcast packet after completing the network configuration and carry the network information in the proxy broadcast packet, the node device can determine the number of node devices that have been configured in the Bluetooth Mesh network by detecting the number of proxy broadcast packets with the same network information as the node device in the Bluetooth Mesh network.

[0092] As an optional implementation, the node device can periodically detect the number of remaining unconfigured devices in the batch configuration with a unit time as a period, and also periodically detect the number of proxy broadcast packets with the same network information as the node device in the Bluetooth Mesh network, so as to determine the number of proxy broadcast packets with the same network information detected by the node device in each unit time as the number of node devices that have completed the configuration in the Bluetooth Mesh network corresponding to each unit time. For example, the node device can set a second count corresponding to the number of node devices that have completed the configuration, and for each unit time, the node device will add 1 to the second count for each proxy broadcast packet with the same network information as the node device received in the unit time (the second count can be accumulated from an initial value such as 0); thereby determining the second count per unit time as the number of proxy broadcast packets with the same network information detected by the node device in the unit time.

[0093] In an example, the unit time may be 1 second, for example, the node device may dynamically detect the number of proxy broadcast packets having the same network information as the node device in the Bluetooth Mesh network every second with a period of 1 second.

[0094] In a further optional implementation, since the proxy broadcast packet does not support relay forwarding in the Bluetooth Mesh network and can only be received by neighboring devices, for the node devices that have completed the network configuration in the batch network configuration process, the node device can detect the number of proxy broadcast packets sent by the neighboring node devices that have the same network information as the node device, thereby realizing the detection of the number of proxy broadcast packets with the same network information as the node device in the Bluetooth Mesh network. For example, the node device can periodically detect the number of proxy broadcast packets with the same network information as the node device sent by the neighboring node devices with a unit time period. The neighboring node devices of the node device can be regarded as other node devices that are one hop away from the node device. Taking the network information as Network ID (network number) as an example, after the node device obtains the proxy broadcast packet, it can parse out the Network ID corresponding to the node device that sent the proxy broadcast packet from the proxy broadcast packet.

[0095] The node device control method provided in the embodiment of the present application can determine the first quantity threshold in advance according to the number of unconfigured devices scheduled in a batch network configuration, so as to measure whether the number of unconfigured devices remaining in the batch network configuration is large or small by the first quantity threshold. Based on this, for the node devices that have completed network configuration in the batch network configuration process, the node devices do not start to report information periodically after completing the network configuration, but at least detect the number of remaining unconfigured devices in the batch network configuration; thereby comparing the remaining number of unconfigured devices with the first quantity threshold. If the comparison result is that the number of remaining unconfigured devices is less than the first quantity threshold, it means that the number of unconfigured devices remaining in the batch network configuration is small, and the node device can start to report information periodically; thereby, when the number of remaining unconfigured devices is small, the interference caused by the information periodically reported by the node device to the network configuration process of the unconfigured devices is reduced, and the node device can report information in a timely manner. If the comparison result is that the number of remaining unconfigured devices is greater than the first number threshold, it means that the number of remaining unconfigured devices in the batch network configuration is relatively large. At this time, the node device can determine the timing for the node device to start periodically reporting information based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration; thereby, when it is determined that the overall progress of the batch network configuration is close to the end state based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration, and the number of remaining unconfigured devices is not excessive, the node device is decided to start periodically reporting information, so that when the batch network configuration is close to the end state, the information periodically reported by the node device has limited network configuration interference caused by the remaining unconfigured devices, and the node device can report information relatively promptly.

[0096] It can be seen that in the embodiment of the present application, the node device does not start to periodically report information after completing the network configuration, but controls the timing of the node device to start reporting status information based on the number of remaining unconfigured devices in the batch configuration, thereby reducing the interference caused by the periodic reporting of information by the node device to the network configuration process of the unconfigured devices, and can enable the node device to report information in a timely manner while improving the network configuration success rate of the unconfigured devices and reducing the network configuration time, thereby ensuring the user's operating experience of the node device.

[0097] As an optional implementation, the embodiment of the present application may determine that a node starts to periodically report information when any of the following conditions is met:

[0098] Condition ①: the node device detects that the number of remaining unconfigured devices in batch configuration is less than the first quantity threshold; for example, the node device detects that the number of unconfigured broadcast packets with the same product information sent by neighboring unconfigured devices per unit time is less than the first quantity threshold; in one example, taking the unit time as 1 second and the first quantity threshold as 10, one form of condition ① may be that the number of unconfigured broadcast packets with the same product information sent by neighboring unconfigured devices detected by the node device per second is less than 10;

[0099] Condition ②: the node device detects that the remaining unconfigured devices in the batch configuration are less than the second quantity threshold, and the preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed the configuration; for example, the node device detects that the number of unconfigured broadcast packets with the same product information sent by neighboring unconfigured devices per unit time is less than the second quantity threshold, and the preset multiple of the number of unconfigured broadcast packets is less than the number of proxy broadcast packets with the same network information sent by neighboring node devices detected per unit time; in an example, taking the unit time as 1 second, the first quantity threshold as 10, the second quantity threshold as 20, and the preset multiple as 2, one form of condition ② can be that the number of unconfigured broadcast packets with the same product information detected by the node device per second is less than 20 (unconfigured broadcast packets are sent by neighboring unconfigured devices), and twice the number of unconfigured broadcast packets is less than the number of proxy broadcast packets with the same network information detected per second (proxy broadcast packets are sent by neighboring node devices).

[0100] As an optional implementation, the node device can detect the remaining unconfigured devices in the batch configuration and the number of node devices that have completed the configuration in each unit time; and make a judgment on condition ① in each unit time; if condition ① is met, it is determined that the node device starts to report information periodically; if condition ① is not met, the judgment of condition ② is continued in each unit time, and if condition ② is met, it is determined that the node device starts to report information periodically. That is to say, within a unit time (for example, 1 second), as long as condition ① or condition ② is met, the embodiment of the present application can determine that the node device starts to report information periodically.

[0101] In a further optional implementation, since the remaining unconfigured devices (such as the number of unconfigured broadcast packets) and the number of node devices (such as the number of proxy broadcast packets) detected by the node device within a unit time may fluctuate, in order to make the embodiment of the present application determine the timing of the node device to start periodic reporting of information more accurately, the embodiment of the present application may further restrict the timing of the node device to start periodic reporting of information. Optionally, the embodiment of the present application may determine that the node device starts periodic reporting of information only when the number of times that condition ① is continuously satisfied, or the number of times that condition ② is continuously satisfied reaches a preset number of times. For example, it is determined that the number of remaining unconfigured devices in batch configuration is less than the first number threshold for a preset number of consecutive times, then it is determined that the node device starts periodic reporting of information. For another example, it is determined that the number of remaining unconfigured devices in batch configuration is less than the second number threshold, and the preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed configuration for a preset number of consecutive times, then it is determined that the node device starts periodic reporting of information.

[0102] In an optional implementation, based on the node device making a judgment of condition ① and condition ② once within 1 unit time, the node device can detect that condition ① is met within a continuous preset unit time, and then determine that the node device starts to periodically report information; for example, if the node device detects that the remaining unconfigured devices of the batch configuration network are less than the first quantity threshold within a continuous preset unit time, then determine that the node device starts to periodically report information. Based on the judgment of condition ②, the node device can detect that condition ② is met within a continuous preset unit time, and then determine that the node device starts to periodically report information; for example, if the node device detects that the remaining unconfigured devices of the batch configuration network are less than the second quantity threshold within a continuous preset unit time, and the preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed configuration, then determine that the node device starts to periodically report information. The number of the above-mentioned preset unit time can correspond to the number of the preset times; the preset number of times (for example, the number of continuous preset unit time) can be determined according to the actual situation, for example, a value of 3 is selected.

[0103] As an optional implementation, Figure 5 Another optional flow chart of the node device control method provided in the embodiment of the present application is exemplarily shown. The method flow can be applied to any node device that has completed the network configuration during the batch network configuration process. Figure 5 The method flow may include the following steps.

[0104] In step S510, at each unit time, the number of unconfigured broadcast packets with the same product information sent by neighboring unconfigured devices and the number of proxy broadcast packets with the same network information sent by neighboring node devices are detected.

[0105] For example, the node device can periodically and dynamically detect the number of unconfigured broadcast packets and proxy broadcast packets in the Bluetooth Mesh network every second (unconfigured broadcast packets are sent by neighboring unconfigured devices, and proxy broadcast packets are sent by neighboring node devices); and based on the product information of the node device, filter out the unconfigured broadcast packets with the same product information; based on the network information of the node device, filter out the number of proxy broadcast packets with the same network information. In the embodiment of the present application, the number of unconfigured broadcast packets with the same product information detected in a unit time can be regarded as the number of remaining unconfigured devices corresponding to the batch configuration in the unit time; the number of proxy broadcast packets with the same network information detected in a unit time can be regarded as the number of node devices that have completed the configuration corresponding to the unit time.

[0106] In step S511, it is determined whether the number of unconfigured network broadcast packets detected in each unit time within a continuous preset number of unit time is less than a first quantity threshold. If so, step S512 is executed; if not, the process returns to step S511.

[0107] In step S512, the node device starts to periodically report information.

[0108] In step S513, it is determined whether the number of unconfigured network broadcast packets detected in each unit time is less than the second quantity threshold value within a continuous preset unit time, and whether the preset multiples of the number of unconfigured network broadcast packets detected in each unit time are less than the number of proxy broadcast packets detected in each unit time. If the judgment results are all yes, step S512 is executed. If any of the judgment results is no, the process returns to step S513.

[0109] For node devices that have completed network configuration, based on the number of unconfigured network broadcast packets with the same product information and the number of proxy broadcast packets with the same network information detected by the node device in each unit time; the node device can compare the number of unconfigured network broadcast packets detected in each unit time with the first quantity threshold in each unit time; if the node device determines that the number of unconfigured network broadcast packets detected in each unit time is less than the first quantity threshold (i.e., the node device determines that the number of consecutive conditions ① is satisfied reaches the preset number of times), the node device can start to periodically report information. As a parallel method, the node device can compare the number of unconfigured network broadcast packets detected in each unit time with the second quantity threshold and the number of proxy broadcast packets in each unit time; if the node device determines that the number of unconfigured network broadcast packets detected in each unit time is less than the second quantity threshold in each consecutive preset unit time, and the preset multiples of the number of unconfigured network broadcast packets detected in each unit time are less than the number of proxy broadcast packets (i.e., the node device determines that the number of consecutive conditions ② is satisfied reaches the preset number of times), the node device can start to periodically report information. In other possible implementations, the node device may first determine condition ① and then determine condition ② in a unit of time; or may determine condition ① and condition ② in parallel.

[0110] The embodiment of the present application is aimed at node devices that have completed network configuration during the batch network configuration process. The node devices can dynamically detect the number of unconfigured devices remaining in the batch network configuration, as well as the number of node devices that have completed network configuration, so as to determine the timing of the node devices to periodically report information through an algorithm, thereby reducing the interference caused by the node devices' periodic reporting of information to the network configuration process of unconfigured devices, and enabling the node devices to report information in a timely manner while improving the network configuration success rate of unconfigured devices and reducing the network configuration time, thereby ensuring the user's operating experience of the node devices. The solution provided in the embodiment of the present application can reduce the transmission load in the Bluetooth Mesh network when the number of devices in batch network configuration is expanded, thereby ensuring the network configuration success rate of unconfigured devices and reducing the network configuration time.

[0111] In some further embodiments, when a Bluetooth Mesh device is joined to a Bluetooth Mesh network through a network configuration process and becomes a node device, the node device can be controlled by a terminal device or a Bluetooth Mesh gateway; at this time, the terminal device or the Bluetooth Mesh gateway acts as a control device and can control the working status and other aspects of the node device based on the user's manual control instructions, voice control instructions, or pre-set automated control instructions.

[0112] When controlling a node device, there is often a need to perform multiple controls, such as multiple controls on a node device, or multiple controls on multiple node devices (a node device may be controlled at least once). The control device can control the node device multiple times through scene control; for example, the user can define a scene instruction, and multiple control instructions can be defined in the scene instruction. When the scene instruction is triggered, the control device (terminal device or Bluetooth Mesh gateway) can send each control instruction separately in the Bluetooth Mesh network based on each control instruction defined in the scene instruction to achieve multiple controls on the node device; wherein, one control instruction can be used to control a node device once.

[0113] Scene instructions can be triggered automatically (corresponding to user-defined automation scene instructions) or manually (corresponding to user-defined manual scene instructions). Automation scene instructions can be triggered by the user to define trigger conditions and multiple control instructions, so that when the current conditions meet the trigger conditions, the control device (terminal device or Bluetooth Mesh gateway) can send each control instruction in the Bluetooth Mesh network based on each control instruction defined in the automation scene instruction to achieve multiple controls on the node device.

[0114] The trigger conditions of the automation scene instructions can be user-defined environmental conditions (such as temperature, humidity, etc.), time conditions, working status conditions of node devices (such as controlling the working status of other node devices in a linked manner by changing the working status of the node device), etc.

[0115] In one example, taking multiple control of multiple node devices as an example, the user can define an automated scene instruction to open the curtains and turn on the lights at 7 o'clock in the morning; when the control device detects that the current time has reached 7 o'clock in the morning, it can send a control instruction to open the curtains to the node device of the electric curtains in the Bluetooth Mesh network, and send a control instruction to turn on the lights to the node device of the lamps, so as to achieve multiple control of the curtains and lamps. In another example, taking multiple control of a node device as an example, the user can define an automated scene instruction to turn on the lights and adjust the brightness of the lamps to 50% at 7 o'clock in the morning; when the control device detects that the current time has reached 7 o'clock in the morning, it can send a control instruction to turn on the lights to the node device of the lamps in the Bluetooth Mesh network, and a control instruction to adjust the brightness to 50%, so as to achieve multiple control of the lamps.

[0116] Manual scene instructions can be defined by the user as multiple control instructions, and the user can manually click the manual scene instruction icon (the manual scene instruction icon can be displayed on the APP page of the terminal device after the user defines the manual scene instruction), or execute the manual scene instruction by voice to trigger the manual scene instruction, so as to control the device (terminal device or Bluetooth Mesh gateway) based on each control instruction defined in the manual scene instruction, and send control instructions separately in the Bluetooth Mesh network to achieve multiple controls of the node devices.

[0117] It should be noted that the automated scene instructions can also be linked with the manual scene instructions. For example, the user can define the trigger conditions when defining the automated scene instructions, and the control instructions executed when the trigger conditions are met are the preset manual scene instructions.

[0118] It can be seen that under the scene control of the node device, multiple controls of the node device can be achieved through scene instructions (multiple controls of a single node device, or multiple controls of multiple node devices); however, when the control device currently controls the node device multiple times based on the scene instructions, each control of the node device is independent (for example, when multiple node devices are controlled multiple times, each node device is controlled independently); that is, the control device sends each control instruction separately in the Bluetooth Mesh network based on each control instruction defined in the scene instruction, which results in a longer delay in multiple controls of the node device and a poor user experience.

[0119] In one example, Figure 6 An example diagram showing multiple control of multiple node devices is shown as follows: Figure 6 As shown, the scene instruction defines the control instruction 611 of the node device 610, the control instruction 621 of the node device 620, and the control instruction 631 of the node device 630. When the scene instruction is triggered, the control device (terminal device or Bluetooth Mesh gateway) can send the control instruction 611 to the node device 610, the control instruction 621 to the node device 620, and the control instruction 631 to the node device 630 based on the definition of the scene instruction. This multiple control method of the node device is an independent method for each control, and the control instructions need to be sent separately in the Bluetooth Mesh network, which makes the multiple control of the node device more cumbersome and the delay of the multiple control of the node device longer, resulting in poor user experience.

[0120] Based on this, the embodiment of the present application further provides a control scheme for the node device to optimize the multiple control methods of the node device, merge multiple control instructions of multiple controls into one merged control instruction, and carry it in a control package, so as to send multiple control instructions of the node device through one control package in the Bluetooth Mesh network, and then transform the multiple independent controls of the node device into one control, so as to improve the control speed of multiple controls of the node device, reduce the delay of multiple controls of the node device, and improve the user experience.

[0121] As an optional implementation, Figure 7 Another optional flow chart of the node device control method provided in the embodiment of the present application is exemplarily shown. The method flow can be implemented by the control device (terminal device or Bluetooth Mesh gateway) and the node device interacting. Figure 7 The method flow may include the following steps.

[0122] In step S710, the control device determines a plurality of control instructions, where one control instruction is used to control one node device once.

[0123] In some embodiments, the control device may determine multiple control instructions defined in the scene instruction when the scene instruction (automated scene instruction or manual scene instruction) is triggered. In other embodiments, the user may also input multiple control instructions to the control device through voice or manual operation, so that the control device determines multiple control instructions. As an optional implementation, one control instruction can realize one control of a node device, so that multiple control instructions can realize multiple controls of the node device. The multiple control instructions may be multiple control instructions for a single node device (i.e., multiple controls on a single node device), or multiple control instructions for multiple node devices (one node device may correspond to at least one control instruction).

[0124] In step S711, the control device merges the multiple control instructions into a merged control instruction.

[0125] In step S712, the control device carries the merged control instruction in a control packet.

[0126] In step S713, the control device sends the control packet in the Bluetooth Mesh network.

[0127] After determining multiple control instructions, the control device can merge multiple control instructions into one control instruction instead of sending each control instruction separately (for ease of explanation, the merged control instruction can be called a merged control instruction). Then, the control device can carry the merged control instruction in a control packet, and send the control packet carrying the merged control instruction in the Bluetooth Mesh network, so that multiple control instructions of the node device can be transmitted in the Bluetooth Mesh network using one control packet after being merged, and then multiple independent controls of multiple control instructions can be converted into one control implemented by one control packet, which provides the possibility of reducing the delay of multiple controls of the node device and improving the control speed of multiple controls of the node device.

[0128] In some embodiments, the control packet carrying the merged control instruction may be a unicast packet, a broadcast packet, or a multicast packet. In other words, multiple controls of multiple control instructions may be converted into one unicast packet, one broadcast packet, or one multicast packet in the embodiments of the present application, thereby reducing the delay of multiple controls of the node device and improving the control speed of multiple controls of the node device.

[0129] As an optional implementation, the control instruction may include a control address and a message content. The control address may indicate the network type and network address corresponding to the controlled node device. The message content may include the device identification, controlled attribute and attribute value of the controlled node device. In one example, to control propertyX (attribute X) of node device A (deviceA), and the attribute value of propertyX after being controlled is value1 (value 1), then when the control address of node device A is the network address Adress1 of network type T1, the control instruction may be: sent to the network address Adress1 of network type T1, and the message content is {"device":"deviceA","propertyX":"value1"}.

[0130] In some embodiments, the embodiments of the present application may merge multiple control instructions sent to the same network type, and organize the message content of each control instruction to obtain a merged control instruction. Optionally, the multiple control instructions sent to the same network type may be multiple control instructions for continuously controlling multiple attributes of the same node device (since the multiple control instructions are for the same node device, the multiple control instructions are sent to the same network type), or multiple control instructions for continuously controlling multiple node devices of the same network type without delay.

[0131] In an optional implementation, multiple control instructions for continuous control of multiple attributes of the same node device can be carried by unicast packets after obtaining the merged control instructions; multiple control instructions for continuous non-delay control of multiple node devices of the same network type can be carried by broadcast packets or multicast packets after obtaining the merged control instructions. That is to say, in scene control, multiple control commands for different node devices of the same network type can be assembled into broadcast packets or multicast packets; multiple control commands for the same node device of the same network type can be assembled into unicast packets.

[0132] In an optional implementation, when there are multiple controlled node devices corresponding to multiple control instructions, the embodiment of the present application can establish a device group for the controlled node devices corresponding to the multiple control instructions, and before sending the multicast packet carrying the merged control instruction, send the device group information to the controlled node device, and then send the multicast packet carrying the merged control instruction to the device group, so that the controlled node device can obtain the merged control instruction in the form of multicast. When there are multiple controlled node devices corresponding to multiple control instructions, if the merged control instruction is carried by a broadcast packet, there is no need to perform the above-mentioned process of establishing a device group and sending the device group information to the controlled node device. It should be noted that multicast is a technology that a single sender sends information to multiple receivers through a single information transmission, which can save network communication traffic, system interaction and latency.

[0133] In step S714, the node device parses the combined control instruction carried by the control packet to obtain the control instruction corresponding to the node device.

[0134] In step S715, the node device executes the control instruction corresponding to the node device.

[0135] After the control packet carrying the merged control instruction is sent in the Bluetooth Mesh network, the node device can obtain the control packet. The control packet can carry the merged control instruction, which can be obtained by merging multiple control instructions, and one control instruction is used to control one node device once. Therefore, after the node device obtains the control packet, it can parse the control instruction corresponding to the node device from the merged control instruction carried by the control packet, and then the node device can execute the corresponding control instruction to realize the control of the node device.

[0136] In some embodiments, based on the merged control instruction, multiple control instructions sent to the same network type are merged and the message content of each control instruction is organized. The node device can determine the message content corresponding to the device identifier of the node device from the message content organized by the merged control instruction to achieve control of the node device.

[0137] As an optional implementation, the message content may include the device identification, controlled attributes and attribute values ​​of the controlled node device; thereby, the node device can determine the controlled attributes and attribute values ​​corresponding to the device identification of the node device from the message content organized by the merged control instructions, and set the attributes of the node device through the controlled attributes and attribute values ​​corresponding to the device identification of the node device, thereby realizing the control of the node device.

[0138] The node device control method provided in the embodiment of the present application can merge multiple control instructions for multiple controls of the node device into a merged control instruction, and carry the merged control instruction in the control packet, and then the merged control instruction can be sent in the Bluetooth Mesh network so that the controlled node device can obtain the control packet; after the node device obtains the control packet, it can parse the control instruction corresponding to the node device from the merged control instruction carried by the control packet and execute it to achieve control of the node device. It can be seen that the embodiment of the present application can merge multiple control instructions for multiple controls into one merged control instruction, and carry it in one control packet, so that multiple control instructions can be sent through one control packet in the Bluetooth Mesh network, and then multiple independent controls of the node device are converted into one control, which improves the control speed of multiple controls of the node device, reduces the delay of multiple controls of the node device, and improves the user experience.

[0139] As an optional implementation, the embodiment of the present application can merge multiple control instructions for continuously controlling multiple attributes of the same node device to achieve control of the node device. Figure 8 Another optional flowchart of the node device control method provided in the embodiment of the present application is shown exemplarily, referring to Figure 8 The method flow may include the following steps.

[0140] In step S810, the control device determines a plurality of control instructions, where the plurality of control instructions are used to continuously control a plurality of attributes of a same node device.

[0141] In step S811, the control device merges the device identifiers of the controlled node devices in the message contents of the multiple control instructions based on the same control addresses of the multiple control instructions, and arranges the controlled attributes and attribute values ​​in the message contents of the respective control instructions to obtain a merged control instruction.

[0142] If multiple control instructions are for continuous control of multiple attributes of the same node device, the multiple control instructions can be merged into one merged control instruction. For example, when a scene instruction is triggered, if the multiple control instructions defined by the scene instruction are for the user to continuously control multiple attributes of the same node device, the multiple control instructions defined by the scene instruction can be merged into one merged control instruction so that they can be carried in one unicast packet instead of sending each control instruction separately; in one example, if the user continuously sets control instructions for multiple attributes such as the switch, brightness, and color temperature of a lamp in the scene instruction, then when the scene instruction is triggered, the control instructions for multiple attributes such as the switch, brightness, and color temperature of the lamp in the scene instruction can be merged into one merged control instruction and sent in one unicast packet.

[0143] Optionally, the control instruction may include a control address and a message content, the control address may indicate the network type and network address corresponding to the controlled node device, and the message content may include the device identification, controlled attributes and attribute values ​​of the controlled node device; when multiple control instructions are to continuously control multiple attributes of the same node device, the multiple control instructions may have the same control address, so that based on the same control address of the multiple control instructions, the embodiment of the present application may merge the device identification of the controlled node device in the message content of the multiple control instructions, and arrange the controlled attributes and attribute values ​​in the message content of each control instruction (for example, arrange the controlled attributes and attribute values ​​of each control instruction in sequence according to the order of the multiple control instructions), thereby obtaining a merged control instruction.

[0144] In an example, taking the continuous control of propertyX, propertyY and propertyZ of node device A, and the attribute value of propertyX is value1, the attribute value of propertyY is value2, and the attribute value of propertyZ is value3 as an example, assuming that the control address of node device A indicates that the network type corresponding to node device A is T1, and the network address is Adress1, then the multiple control instructions for continuous control of propertyX, propertyY and propertyZ of node device A can be exemplified as follows:

[0145] Control command: sent to the network address Adress1 of network type T1, the message content is {"device":"deviceA", "propertyX":"value1"};

[0146] Control command: sent to the network address Adress1 of network type T1, the message content is {"device":"deviceA", "propertyY":"value2"};

[0147] Control command: sent to the network address Adress1 of network type T1, the message content is {"device":"deviceA", "propertyZ":"value3"};

[0148] In the embodiment of the present application, based on the same control address (network address Adress1 of network type T1), the device identifiers ("device":"deviceA") in the message contents of each control instruction may be merged, and the controlled attributes and attribute values ​​in the message contents of each control instruction may be arranged, thereby obtaining a merged control instruction. The control address of the merged control instruction may be the network address Adress1 sent to the network type T1, and the message content may be:

[0149] {"device":"deviceA","propertyX":"value1","propertyY":"value2","propertyZ":"value3"}.

[0150] In step S812, the control device carries the merge control instruction in a unicast packet.

[0151] In step S813, the control device sends the unicast packet in the Bluetooth Mesh network.

[0152] In step S814, the node device parses the message content corresponding to the device identification of the node device from the combined control instruction carried by the unicast packet to obtain the controlled attributes and attribute values ​​corresponding to each control instruction in the message content.

[0153] In step S815, the node device executes the controlled attributes and attribute values ​​corresponding to each control instruction.

[0154] After a unicast packet is sent in a Bluetooth Mesh network, the node device receiving the unicast packet can determine whether there is message content corresponding to the device identifier of the node device in the unicast packet based on the node device identifier; if so, it means that the unicast packet is controlling the node device, so that the node device can parse the message content corresponding to the device identifier of the node device from the merged control instructions carried by the unicast packet, and arrange the controlled attributes and attribute values ​​corresponding to each control instruction based on the message content. Therefore, the node device can determine the controlled attributes and attribute values ​​corresponding to each control instruction for continuously controlling multiple attributes of the node device, so that the node device can execute the controlled attributes and attribute values ​​corresponding to each control instruction to continuously control multiple attributes of the node device.

[0155] In one example, taking the above-mentioned merge control instruction as an example, after deviceA receives the unicast packet carrying the merge control instruction, it can determine the message content corresponding to the device identifier of deviceA from the merge control instruction based on the device identifier of deviceA:

[0156] {"device":"deviceA","propertyX":"value1","propertyY":"value2","propertyZ":"value3"};

[0157] Therefore, deviceA can determine the controlled properties and property values ​​corresponding to each control instruction (i.e., "propertyX":"value1", "propertyY":"value2", "propertyZ":"value3") based on the message content, so that deviceA can set propertyX to value1, propertyY to value2, and propertyZ to value3 to achieve continuous control of propertyX, propertyY, and propertyZ of deviceA.

[0158] As an optional implementation, the embodiment of the present application can merge multiple control instructions for continuous non-delay control of multiple node devices of the same network type to achieve control of the node devices. Fig. 9 Another optional flowchart of the node device control method provided in the embodiment of the present application is shown exemplarily. Fig. 9 The method flow may include the following steps.

[0159] In step S910, the control device determines a plurality of control instructions, where the plurality of control instructions are used to perform continuous delay-free control on a plurality of node devices of the same network type.

[0160] As an optional implementation, if multiple control instructions are to continuously control multiple node devices of the same network type without delay, the multiple control instructions can be merged into one merged control instruction. It should be noted that the delay-free control of multiple control instructions means that there is no delay relationship between the multiple control instructions when they are executed; that is, there is no control instruction among the multiple control instructions that needs to wait for other control instructions to be executed before delaying execution; for example, multiple control commands can be executed in parallel.

[0161] If there are control instructions among multiple control instructions that need to wait for other control instructions to be executed before delaying execution, then the multiple control instructions cannot be regarded as control instructions for non-delay control, even if the multiple control instructions are for continuous control of multiple node devices of the same network type, but they cannot be merged; for example, if after the execution of one of the multiple control instructions, it is necessary to delay for a period of time before executing another control instruction, then the multiple control instructions are deemed to have a delay relationship during execution, even if the multiple control instructions are for continuous control of multiple node devices of the same network type, but this control cannot be regarded as continuous non-delay control, and therefore cannot be merged. In an example, suppose there are control instructions a and b for continuous control of multiple node devices of the same network type. If after the execution of control instruction a, it is necessary to delay for a period of time before executing control instruction b, then control instructions a and b cannot be merged.

[0162] In step S911, the control device establishes a device group for the multiple node devices.

[0163] In step S912, the control device sends the information of the device group to the multiple node devices.

[0164] As an optional implementation, for multiple control instructions for continuous, delay-free control of multiple node devices of the same network type, an embodiment of the present application can establish a device group for multiple node devices corresponding to the multiple control instructions, and send the device group information to the multiple node devices, so that the embodiment of the present application can send a control packet carrying the merged control instructions by sending a multicast packet to the device group in the Bluetooth Mesh network.

[0165] In step S913, the control device sets the multicast address of the device group as the control address, and arranges the message contents in the multiple control instructions to obtain a merged control instruction.

[0166] In step S914, the control device sends a multicast packet carrying the merge control instruction to the device group.

[0167] When multiple control instructions are to perform continuous, delay-free control on multiple node devices of the same network type, the embodiment of the present application can set the multicast address of the device group formed by the multiple node devices as the control address of the control instruction, and arrange the message contents in the multiple control instructions to obtain a merged control instruction; then, the merged control instruction can be carried in a multicast packet, and by sending a multicast packet to the device group, multiple node devices in the device group can obtain the merged control instruction.

[0168] In an example, it is taken that propertyX is controlled on deviceA of network type T1 and network address Adress1, propertyY is controlled on deviceB of network type T2 and network address Adress2, and propertyZ is controlled on deviceC of network type T1 and network address Adress3. Since deviceA and deviceC belong to the same network type T1, and deviceB, deviceA and deviceC belong to different network types, multiple control instructions for deviceA and deviceC can be merged to obtain a merged control instruction. For example, the control instructions for the above deviceA, deviceB and deviceC can be as follows:

[0169] Control instruction M1: sent to the network address Adress1 of network type T1, the message content is {"device":"deviceA", "propertyX":"value1"};

[0170] Control instruction M2: sent to the network address Adress2 of network type T2, the message content is {"device":"deviceB", "propertyY":"value2"};

[0171] Control instruction M3: sent to the network address Adress3 of network type T1, the message content is {"device":"deviceC", "propertyZ":"value3"};

[0172] Since the above control instructions M1 and M3 belong to controlling multiple node devices (deviceA and deviceC) of the same network type, when the control instructions M1 and M3 are continuous and delay-free control, the control instructions M1 and M3 can be merged, while the control instruction M2 is sent to the network type T2, which is not the same network type as the network type T1 of the control instructions M1 and M3, so the control instruction M2 cannot be merged with the control instructions M1 and M3;

[0173] In the embodiment of the present application, a device group may be established for deviceA and deviceC in advance, and the information of the device group may be sent to deviceA and deviceC in advance; thus, when merging control instructions M1 and M3, the embodiment of the present application may use the multicast address of the device group of deviceA and deviceC as the control address of the merged control instruction; at the same time, when processing the message content of control instructions M1 and M3, the embodiment of the present application may arrange the message content of control instructions M1 and M3 (for example, arrange in sequence) to obtain a merged control instruction; in an example, assuming that the multicast address sent to the above device group of network type T1 is BroadCast Address1, the merged control instruction of control instructions M1 and M3 may be: sent to the multicast address BroadCast Address1 of network type T1, and the message content is:

[0174] [{"device":"deviceA","propertyX":"value1"},{"device":"deviceC","propertyZ":"value3"}].

[0175] In step S915, the node device parses the message content corresponding to the device identification of the node device from the merge control instruction carried by the multicast packet to obtain the controlled attribute and attribute value corresponding to the node device.

[0176] In step S916, the node device performs device control according to the corresponding controlled attribute and attribute value.

[0177] After the multicast packet is sent to the device group, the node device in the device group can obtain the multicast packet and parse out the message content corresponding to the node device from the merged control instruction carried by the multicast packet through the device identifier of the node device; since the message contents in multiple control instructions are arranged in the merged control instruction, after the node device parses out the message content corresponding to the device identifier of the node device from the merged control instruction, the node device can obtain the controlled attributes and attribute values ​​corresponding to the node device, so that the node device can perform device control based on the corresponding controlled attributes and attribute values, so as to realize continuous and delay-free control of multiple node devices in the device group.

[0178] In one example, taking the above-mentioned merge control instruction as an example, after deviceA receives the multicast packet carrying the merge control instruction, it can determine the message content corresponding to the device identification of deviceA from the merge control instruction based on the device identification of deviceA: {"device":"deviceA", "propertyX":"value1"}; thus, deviceA can set propertyX to value1. After deviceC receives the multicast packet carrying the merge control instruction, it can determine the message content corresponding to the device identification of deviceC from the merge control instruction based on the device identification of deviceC: {"device":"deviceC", "propertyZ":"value3"}; thus, deviceC can set propertyZ to value3.

[0179] In the embodiment of the present application, when multiple control instructions are for continuous and delay-free control of multiple node devices of the same network type, control devices such as terminal devices and Bluetooth Mesh gateways can automatically group multiple node devices and send merged control instructions in a multicast manner, so that multiple node devices can realize the execution of corresponding control instructions through the multicast packet of the device group, improve the control speed of multiple control of multiple node devices, and reduce the delay of multiple control of multiple node devices. For example, for multiple control instructions for continuous and delay-free control of the same attribute X of WIFI device A, WIFI device B, and WIFI device C, the three devices of WIFI device A, WIFI device B, and WIFI device C can be grouped, and the information of the device group can be sent to WIFI device A, WIFI device B, and WIFI device C in advance (if the broadcast method is used to carry the merged control instruction, there is no need to build a group and send the information of the device group in advance), and then send the merged control instruction for controlling the attribute X of the device group of WIFI device A, WIFI device B, and WIFI device C through the multicast method of the local area network.

[0180] As an optional implementation, in the context of scene instructions, when a user controls multiple attributes of multiple node devices of the same type, an embodiment of the present application can automatically merge multiple control instructions into a merged control instruction in the background of the control device, and then send the merged control instruction by multicast or broadcast; after the node device receives the merged control instruction sent by multicast or broadcast, it can parse the message content of the control instruction corresponding to the node device from the merged control instruction, thereby realizing the control of the node device.

[0181] In some further embodiments, if the scene control involves node devices of heterogeneous networks, the number of multicast addresses of the device group is limited due to the limited resources of the node devices of the heterogeneous networks. In this case, the embodiment of the present application can dynamically retain the device group with a large number of devices in the scene control according to the weight, delete the device group with a small number of devices, and regroup the device group with a large number of devices, thereby improving the utilization rate of the multicast address of the device group. Optionally, the embodiment of the present application can set a device quantity threshold. If the number of node devices in the device group in the heterogeneous network is greater than the device quantity threshold, the device group is retained and the node devices in the device group are regrouped; if the number of node devices in the device group is less than the device quantity threshold, the device group is deleted to free up multicast address resources that can be allocated.

[0182] Based on the idea that multiple control instructions of the same network type can be merged in the embodiment of the present application, the merging conditions for merging multiple control instructions in the embodiment of the present application can be exemplified as follows:

[0183] Condition 1: multiple control instructions of the same network type;

[0184] Condition 2: multiple control instructions for the same node device of the same network type;

[0185] Condition 3: multiple control instructions for different node devices of the same network type.

[0186] For ease of understanding, Fig.10 The example diagram of merging control instructions in the embodiment of the present application is exemplarily shown, which can be used for reference. Fig.10 As shown, control instructions 1, 2 and 3 belong to multiple control instructions of the same node device of the same network type, and meet conditions 1 and 2, and can be merged; control instructions 1, 2 and 3, as well as control instructions 4 and 5 belong to multiple control instructions of different node devices of the same network type, and meet conditions 1 and 3, and can be merged; control instructions 6, 7 and 8 belong to multiple control instructions of the same node device of the same network type, and meet conditions 1 and 2, and can be merged.

[0187] In a further optional implementation, if multiple control instructions simultaneously meet the merging conditions (for example, multiple merging conditions in conditions 1, 2, and 3 are met at the same time, etc.), then when organizing the message contents of multiple control instructions, the embodiment of the present application may merge the same repeated contents in the message contents of the multiple control instructions, and arrange the different contents. For example, the message content may include the device identification, controlled attributes, and attribute values ​​of the controlled node device. For the message contents of multiple control instructions, if the device identifications of the multiple control instructions are the same, the device identifications may be merged, if the controlled attributes are the same, the controlled attributes may be merged, and if the attribute values ​​are the same, the attribute values ​​may be merged; and for the different contents in the message contents of multiple control instructions, the embodiment of the present application may arrange other different contents on the basis of merging the same repeated contents of the message contents of the multiple control instructions.

[0188] The embodiments of the present application can transform multiple independent controls of a node device into one control, thereby improving the control speed of multiple controls of the node device, reducing the delay of multiple controls of the node device, and improving the user experience.

[0189] The node device control device provided in the embodiment of the present application is introduced below. The device content described below can be regarded as the functional module required for the node device to implement the node device control method provided in the embodiment of the present application. The device content described below can be referenced to the above description.

[0190] As an optional implementation, Fig.11A An optional block diagram of a node device control device provided in an embodiment of the present application is shown. The device can be applied to a node device. Fig.11A , the device may include:

[0191] The remaining number detection module 111 is used to detect at least the number of remaining unconfigured devices in batch configuration;

[0192] A comparison module 112, configured to compare the remaining number of unconfigured devices with a first number threshold, where the first number threshold is determined according to the number of unconfigured devices scheduled in batch configuration;

[0193] A reporting start module 113, configured to start periodically reporting information if the comparison result shows that the number of remaining unconfigured devices is less than the first number threshold;

[0194] The timing determination module 114 is used to determine the timing to start periodic information reporting based on at least the number of remaining unconfigured devices and the number of node devices that have completed network configuration if the comparison result shows that the number of remaining unconfigured devices is greater than the first number threshold.

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

[0196] Check the number of node devices that have completed network configuration.

[0197] In some embodiments, the timing determination module 114 is configured to determine the timing of starting periodic information reporting based on at least the number of remaining unconfigured devices and the number of node devices that have completed network configuration, including:

[0198] Determine whether the number of remaining unconfigured devices is less than a second number threshold, and whether a preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed network configuration; the second number threshold is greater than the first number threshold;

[0199] If the number of remaining unconfigured network devices is less than a second number threshold, and a preset multiple of the number of remaining unconfigured network devices is less than the number of node devices for which network configuration has been completed, periodic information reporting begins.

[0200] In some embodiments, the number of unprovisioned devices scheduled in one batch configuration is determined based on the concurrent configuration of the Provisioner, the first number threshold is the concurrent configuration, and the second number threshold is a preset multiple of the first number threshold.

[0201] In some embodiments, the remaining number detection module 111 is used to detect at least the number of remaining unconfigured devices in batch configuration, including:

[0202] At each unit time, the number of unconfigured broadcast packets with the same product information as the node device sent by neighboring unconfigured devices is detected, and the number of unconfigured broadcast packets detected at each unit time is used as the remaining number of unconfigured devices in the batch configuration detected at each unit time.

[0203] In some embodiments, the device is used to detect the number of node devices that have completed network configuration, including:

[0204] At each unit time, the number of proxy broadcast packets with the same network information as the node device sent by the neighboring node device is detected, and the number of proxy broadcast packets detected at each unit time is used as the number of node devices that have completed network configuration detected at each unit time.

[0205] In some embodiments, the reporting start module 113 is configured to start periodically reporting information if the comparison result shows that the number of remaining unconfigured devices is less than the first number threshold, including:

[0206] If the number of unconfigured network broadcast packets detected in each unit time is less than the first quantity threshold within a continuous preset number of unit time, periodic information reporting begins.

[0207] In some embodiments, the timing determination module 114 is configured to start periodically reporting information if the number of remaining unconfigured devices is less than a second number threshold, and a preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed network configuration, including:

[0208] If within a continuous preset number of unit times, the number of unconfigured network broadcast packets detected per unit time is less than the second number threshold, and the preset multiples of the number of unconfigured network broadcast packets detected per unit time are less than the number of proxy broadcast packets detected per unit time, then periodic reporting of information begins.

[0209] In some embodiments, the device starts periodically reporting information including:

[0210] Every time a cycle of reporting information is reached, a random delay time is determined from a preset random delay range, and when the random delay time is reached, the status information is reported.

[0211] on the other hand, Fig. 11B Another optional block diagram of the node device control device provided in the embodiment of the present application is shown. The device can be applied to the node device. Fig. 11B , the device may include:

[0212] A control packet acquisition module 115, used to acquire a control packet, wherein the control packet carries a merged control instruction, wherein the merged control instruction is obtained by merging multiple control instructions, and one control instruction is used to control one node device once;

[0213] The parsing module 116 is used to parse the control instruction corresponding to the node device from the combined control instruction carried by the control packet;

[0214] The instruction execution module 117 is used to execute the control instructions corresponding to the node device.

[0215] In some embodiments, the control instruction includes a control address and a message content, the control address indicates a network type and a network address corresponding to the controlled node device, and the message content includes a device identifier, a controlled attribute, and an attribute value of the controlled node device; the merged control instruction is obtained by merging multiple control instructions sent to the same network type and organizing the message content of each control instruction;

[0216] The parsing module 116 is used to parse the control instructions corresponding to the node device from the merged control instructions carried by the control packet, including:

[0217] Determine the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction to obtain the controlled attribute and attribute value corresponding to the node device;

[0218] The instruction execution module 117 is used to execute the control instructions corresponding to the node device, including:

[0219] The properties of the node device are set through the controlled properties and property values ​​corresponding to the node device.

[0220] As an optional implementation, the multiple control instructions are used to continuously control multiple attributes of the same node device; the merged control instruction is based on the same control address of the multiple control instructions, and the device identifiers of the controlled node devices in the message contents of the multiple control instructions are merged, and the controlled attributes and attribute values ​​in the message contents of each control instruction are arranged to obtain;

[0221] The control packet acquisition module 115 is used to acquire the control packet including:

[0222] Obtaining a unicast packet carrying a merge control instruction;

[0223] The parsing module 116 is used to determine the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction, so as to obtain the controlled attribute and attribute value corresponding to the node device, including:

[0224] The message content corresponding to the device identification of the node device is parsed from the combined control instruction carried by the unicast packet to obtain the controlled attribute and attribute value corresponding to each control instruction in the message content.

[0225] As an optional implementation, the multiple control instructions are used to continuously control multiple node devices of the same network type without delay; the merged control instruction uses the multicast address of the device group corresponding to the multiple node devices as the control address, and is obtained by arranging the message contents in the multiple control instructions;

[0226] The device can also be used to: obtain information of device groups corresponding to the multiple node devices;

[0227] The control packet acquisition module 115 is used to acquire the control packet including: acquiring a multicast packet or a broadcast packet carrying a merge control instruction;

[0228] The parsing module 116 is used to determine the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction, so as to obtain the controlled attribute and attribute value corresponding to the node device, including:

[0229] The message content corresponding to the device identification of the node device is parsed from the combined control instruction carried by the multicast packet or the broadcast packet to obtain the controlled attribute and attribute value corresponding to the node device.

[0230] In some embodiments, the plurality of control instructions are scenario instructions, and the scenario instructions are triggered based on automation conditions or based on user operations.

[0231] The embodiment of the present application also provides a node device, which can implement the node device control method provided in the embodiment of the present application through the node device control device provided above. As an optional implementation, Fig.12 An optional block diagram of the node device is shown, such as Fig.12 As shown, the node device may include: at least one processor 121 , at least one communication interface 122 , at least one memory 123 and at least one communication bus 124 .

[0232] In the embodiment of the present application, the number of the processor 121 , the communication interface 122 , the memory 123 , and the communication bus 124 is at least one, and the processor 121 , the communication interface 122 , and the memory 123 communicate with each other through the communication bus 124 .

[0233] Optionally, the communication interface 122 may be an interface of a communication module for performing network communication.

[0234] Optionally, the processor 121 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 embodiments of the present application.

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

[0236] The memory 123 stores one or more computer executable instructions, and the processor 121 calls the one or more computer executable instructions to execute the node device control method provided in the embodiment of the present application.

[0237] An embodiment of the present application also provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the node device control method provided in the embodiment of the present application is implemented.

[0238] The embodiment of the present application also provides a computer program, which, when executed, implements the node device control method provided in the embodiment of the present application.

[0239] The embodiment of the present application also provides a Bluetooth Mesh system, including a control device (such as a Bluetooth Mesh gateway or terminal device), and a node device. The node device may be the node device provided in the embodiment of the present application. The control device may merge multiple control instructions and carry them in a control packet for transmission. For example, the control device may be used to:

[0240] Determine a plurality of control instructions, one control instruction being used to control a node device once; merge the plurality of control instructions into a merged control instruction; carry the merged control instruction in a control packet; and send the control packet in a Bluetooth Mesh network.

[0241] The specific related functions of the control device can be referred to the description of the corresponding part in the previous text, which will not be repeated here.

[0242] The above describes multiple implementation schemes provided by the embodiments of the present application. The various optional methods introduced in each implementation scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible implementation schemes, which can all be considered as implementation schemes disclosed and open in the embodiments of the present application.

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

Claims

1. A node device control method, wherein: Applied to a node device, the method comprises: At least detect the number of remaining unconfigured devices in batch configuration; Comparing the remaining number of unconfigured devices with a first number threshold, where the first number threshold is determined according to the number of unconfigured devices scheduled in batch configuration; If the comparison result is that the number of the remaining unconfigured devices is less than the first number threshold, start periodically reporting information; If the comparison result is that the number of remaining unconfigured devices is greater than the first number threshold, determining the timing of starting periodic information reporting based at least on the number of remaining unconfigured devices and the number of node devices that have completed network configuration; Detect the number of node devices that have completed network configuration; The determining of the timing of starting to periodically report information at least according to the number of remaining unconfigured devices and the number of node devices that have completed network configuration includes: Determine whether the number of remaining unconfigured devices is less than a second number threshold, and whether a preset multiple of the number of remaining unconfigured devices is less than the number of node devices that have completed network configuration; the second number threshold is greater than the first number threshold; If the number of remaining unconfigured network devices is less than a second number threshold, and a preset multiple of the number of remaining unconfigured network devices is less than the number of node devices for which network configuration has been completed, periodic information reporting begins.

2. The method according to claim 1, wherein: The number of unprovisioned devices scheduled in one batch configuration is determined based on the concurrent configuration of the Provisioner, the first number threshold is the concurrent configuration, and the second number threshold is a preset multiple of the first number threshold.

3. The method according to any one of claims 1 to 2, wherein: The step of at least detecting the number of remaining unconfigured devices in batch configuration includes: At each unit time, the number of unconfigured broadcast packets with the same product information as the node device sent by neighboring unconfigured devices is detected, and the number of unconfigured broadcast packets detected at each unit time is used as the remaining number of unconfigured devices in the batch configuration detected at each unit time.

4. The method according to any one of claims 1 to 2, wherein: The detection of the number of node devices that have completed network configuration includes: At each unit time, the number of proxy broadcast packets with the same network information as the node device sent by the neighboring node device is detected, and the number of proxy broadcast packets detected at each unit time is used as the number of node devices that have completed network configuration detected at each unit time.

5. The method according to any one of claims 1 to 2, wherein: If the comparison result is that the number of remaining unconfigured network devices is less than the first number threshold, starting to periodically report information includes: If the number of unconfigured network broadcast packets detected in each unit time is less than the first number threshold within a continuous preset unit time, start periodically reporting information; If the number of remaining unconfigured network devices is less than a second number threshold, and a preset multiple of the number of remaining unconfigured network devices is less than the number of node devices that have completed network configuration, then starting to periodically report information includes: If within a continuous preset number of unit times, the number of unconfigured network broadcast packets detected per unit time is less than the second number threshold, and the preset multiples of the number of unconfigured network broadcast packets detected per unit time are less than the number of proxy broadcast packets detected per unit time, then periodic reporting of information begins.

6. The method according to any one of claims 1 to 2, wherein: The start of periodic reporting information includes: Every time a cycle of reporting information is reached, a random delay time is determined from a preset random delay range, and when the random delay time is reached, the status information is reported.

7. The method according to claim 1, wherein: Also includes: Acquire a control packet, the control packet carrying a merged control instruction, the merged control instruction being obtained by merging a plurality of control instructions, one control instruction being used to control one node device once; Parsing the control instruction corresponding to the node device from the combined control instruction carried by the control packet; Execute the control instructions corresponding to the node device.

8. The method according to claim 7, wherein: The control instruction includes a control address and message content, wherein the control address indicates the network type and network address corresponding to the controlled node device, and the message content includes the device identification, controlled attribute and attribute value of the controlled node device; The merged control instruction is obtained by merging multiple control instructions sent to the same network type and organizing the message content of each control instruction; The step of parsing the control instruction corresponding to the node device from the combined control instruction carried by the control packet includes: Determine the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction to obtain the controlled attribute and attribute value corresponding to the node device; The executing of the control instruction corresponding to the node device includes: The properties of the node device are set through the controlled properties and property values ​​corresponding to the node device.

9. The method according to claim 8, wherein: The multiple control instructions are used to continuously control multiple attributes of the same node device; the merged control instruction is obtained based on the same control address of the multiple control instructions, and by merging the device identifiers of the controlled node devices in the message contents of the multiple control instructions, and by arranging the controlled attributes and attribute values ​​in the message contents of the respective control instructions; The acquisition control package includes: Obtaining a unicast packet carrying a merge control instruction; The step of determining the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction to obtain the controlled attribute and attribute value corresponding to the node device includes: The message content corresponding to the device identification of the node device is parsed from the combined control instruction carried by the unicast packet to obtain the controlled attribute and attribute value corresponding to each control instruction in the message content.

10. The method according to claim 8, wherein: The multiple control instructions are used to continuously control multiple node devices of the same network type without delay; the merged control instruction uses the multicast address of the device group corresponding to the multiple node devices as the control address, and is obtained by arranging the message contents in the multiple control instructions; The method further comprises: Acquire information of device groups corresponding to the multiple node devices; The acquisition control package includes: Obtaining a multicast packet or a broadcast packet carrying a merge control instruction; The step of determining the message content corresponding to the device identification of the node device from the message content organized by the merged control instruction to obtain the controlled attribute and attribute value corresponding to the node device includes: The message content corresponding to the device identification of the node device is parsed from the combined control instruction carried by the multicast packet or the broadcast packet to obtain the controlled attribute and attribute value corresponding to the node device.

11. The method according to any one of claims 7 to 10, wherein: The multiple control instructions are scene instructions, and the scene instructions are triggered based on automation conditions or based on user operations.

12. A node 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 node device control method as described in any one of claims 1-11.

13. A Bluetooth Mesh system, wherein: The method comprises a control device and a node device as claimed in claim 12; the control device is used to determine a plurality of control instructions, one control instruction is used to control a node device once; merge the plurality of control instructions into a merged control instruction; and carry the merged control instruction in a control packet; In the Bluetooth Mesh network, the control packet is sent.

14. 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 node device control method as described in any one of claims 1-11 is implemented.

Citation Information

Patent Citations

  • State control method and device of intelligent equipment, electronic equipment and storage medium

    CN113254077A

  • Equipment network distribution method and device, storage medium, processor and electronic equipment

    CN113810917A