Method, system and device for dynamically distributing friend nodes based on Bluetooth Mesh network

By obtaining the direct connection list of devices of Bluetooth Mesh network and analyzing device distances, and dynamically allocating friend nodes, the network problems caused by difficulty in confirming friend node locations and equipment changes in the existing technology are solved, and automated management and network stability are achieved.

CN120568431AActive Publication Date: 2025-08-29RAINBOW ANT (HANGZHOU) TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511081466.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-08-29
Estimated Expiration
2045-08-04

AI Technical Summary

Technical Problem

It is difficult to confirm the location of the friend nodes in the existing Bluetooth Mesh network. There is redundancy or insufficient equipment changes when the equipment increases and decreases, and environmental problems lead to node failures that affect network communication, which lacks real-time and efficientness.

Method used

By obtaining the list of direct connection devices of the Bluetooth Mesh network, analyzing the device distance and the longest distance of communication, dynamically allocating friend nodes, and updating node coverage in abnormal situations, the direct connection device acquisition module, device distance acquisition module, friend node allocation module and abnormal situation analysis module are used to realize the automated management of nodes.

Benefits of technology

It realizes the automatic allocation and update of friend nodes in Bluetooth Mesh network, ensures network coverage and equipment life, reduces manual overhead, and improves network stability and power utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120568431A_ABST
    Figure CN120568431A_ABST
Patent Text Reader

Abstract

The invention discloses a method, system and device for dynamically allocating friend nodes based on a Bluetooth Mesh network, and the method comprises the steps: obtaining networking equipment, a networking mode and a network distributor in the Bluetooth Mesh network, and obtaining a direct connection equipment list of any networking equipment through the networking equipment and the network distributor in the Bluetooth Mesh network; based on any networking device, the networking mode and the corresponding direct connection device list, obtaining the distance between adjacent devices and the longest distance of one-time communication of the device; friend nodes are distributed to networking equipment through the distance between adjacent equipment, the longest distance of single communication of the equipment and a networking mode; and when the networking equipment in the Bluetooth Mesh network is abnormal, analyzing the coverage condition of the friend node on the Bluetooth Mesh network to obtain a coverage analysis result, and updating the friend node based on the coverage analysis result. The equipment in the Bluetooth Mesh network is analyzed to realize node distribution and automatic adjustment, manpower is saved, and normal operation of the network is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Bluetooth Mesh networks, and in particular to a method, system and device for dynamically allocating friend nodes based on a Bluetooth Mesh network. Background Art

[0002] Bluetooth technology, a classic wireless communication technology, is widely used across various industries. To address Bluetooth's power consumption and connection limit, the Bluetooth SIG launched the Mesh protocol, based on the Bluetooth Low Energy protocol. In the Bluetooth Mesh protocol, low-power nodes are in a semi-dormant state to conserve power, while friend nodes are required to remain powered and online. Friend nodes relay and cache messages. Low-power nodes rely on friend nodes for their existence. When a low-power node needs to operate, it must specify a friend node to bind to. When a friend node receives a message sent to a bound low-power node, it caches it. The semi-dormant low-power node will periodically wake up and query its bound friend node for any messages sent to it. If so, it executes the message. If not, it goes back to sleep and awaits the next round of polling.

[0003] To ensure normal communication in a Bluetooth Mesh network, several friend nodes need to be set up in the network. Currently, friend node setting is mainly done manually, which has the following problems in actual operation: 1. It is difficult to confirm the specific location of the friend node in the Bluetooth Mesh network; 2. When the number of devices in the Bluetooth Mesh network increases or decreases, the friend nodes may become redundant or insufficient, requiring manual intervention and adjustment, which lacks real-time performance and increases actual manpower costs; 3. The need to set up friend nodes and low-power nodes is usually due to environmental problems such as power outages in the node environment, making it difficult to ensure the normal operation of the friend nodes. Existing methods cannot monitor the Bluetooth Mesh network. If the friend node has a fault such as low battery, the low-power node bound to the friend node will be separated from the Bluetooth Mesh network and unable to work properly, affecting the normal communication of the Bluetooth Mesh network. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the present invention provides a method, system and device for dynamically allocating friend nodes based on a Bluetooth Mesh network.

[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions: A method for dynamically allocating friend nodes based on a Bluetooth Mesh network, comprising the following steps: Obtain the networking devices, networking methods, and network adapters in the Bluetooth Mesh network. Obtain a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network. The network adapter is the controller of the networking device. Based on the networking mode and the list of directly connected devices corresponding to any networking device, the distance between adjacent devices and the maximum distance of a single communication between devices can be obtained; Friend node allocation is performed on networking devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode. This is done until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the friend nodes is met. When an abnormal situation occurs in the networking devices in the Bluetooth Mesh network, the coverage of the friend node on the Bluetooth Mesh network is analyzed to obtain the coverage analysis results, and the friend node is updated based on the coverage analysis results. Among them, abnormal situations include the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

[0006] As an implementable method, obtaining a list of directly connected devices of any group of network devices includes the following steps: The Bluetooth Mesh network's network adapter sends a network adapter command. After receiving the network adapter command, the networking device in the Bluetooth Mesh network sends a message with a forwarding count of 0 and a request for a reply. The networking devices in the Bluetooth Mesh network perform statistical analysis on the received reply messages to obtain the networking devices that can be connected in one communication, that is, the list of directly connected devices corresponding to the networking devices.

[0007] As an implementation method, obtaining the maximum single communication distance of the device includes the following steps: Obtain the wavelength of the RF signal, the gain of the networking device, the transmit power of the networking device, and the distance between adjacent devices to obtain the received signal strength of the networking device, which is expressed as follows:

[0008] The received signal strength of the reference distance is obtained based on the received signal strength of the networking device. Combined with the environmental attenuation factor, the maximum single communication distance of the device is obtained, which is expressed as follows:

[0009] in, Indicates the receiving signal strength of the networking device. 、 Indicates the transmission gain and receiving gain of the networking equipment. Indicates the wavelength of the RF signal, Indicates the distance between adjacent devices. Indicates the maximum distance of a single communication of the device. Indicates the received signal strength at the reference distance, Represents the environmental attenuation factor.

[0010] As an implementable method, the friend node allocation for the networking devices is performed until the friend nodes cover the Bluetooth Mesh network, and the friend node allocation is completed, including the following steps: The Bluetooth Mesh network's network adapter is used as the initial friend node. Based on the list of directly connected devices, networking mode, distance between adjacent devices, and the maximum single communication distance of devices, the initial friend node is analyzed to see if it covers the Bluetooth Mesh network. If the current initial friend node cannot cover the Bluetooth Mesh network, that is, the distance between the adjacent devices of the networking device and the initial friend node is greater than the maximum distance of a single communication between the devices, the networking devices that cannot be covered by the current initial friend node in the Bluetooth Mesh network will be added to the initial friend node based on the directly connected device list; If the added initial friend nodes can cover the Bluetooth Mesh network, analyze whether the initial friend nodes meet the maximum distance for a single device communication, that is, whether the distance between adjacent devices between the initial friend nodes is less than the maximum distance for a single device communication; If yes, the current initial friend node is a friend node of the Bluetooth Mesh network, and the node allocation is completed; If not, obtain the intersection of the initial friend nodes and add them to the initial friend nodes until the distance between adjacent devices between the initial friend nodes meets the condition of being less than the maximum distance of a single communication between the devices, and the friend node allocation is completed.

[0011] As an implementation method, it also includes that during the friend node selection process, if multiple groups of initial friend nodes appear that can cover the Bluetooth Mesh network and the initial friend nodes meet the maximum distance for single device communication, the initial friend node with the least number of nodes is selected as the friend node.

[0012] As an implementable method, when the abnormal situation is the addition or deletion of a networking device, updating the friend node includes the following steps: Based on the friend nodes after the network devices are added or deleted, determine whether the friend nodes can cover the changed Bluetooth Mesh network; If the changed friend node cannot cover the Bluetooth Mesh network, the networking device of the Bluetooth Mesh network exits the low-power mode and uses the current friend node as the initial friend node. Based on the initial friend node, the maximum single communication distance of the device and the networking mode of the Bluetooth Mesh network, the networking devices in the Bluetooth Mesh network are redistributed.

[0013] As an implementable method, when the abnormal situation is a friend node failure, updating the friend node includes the following steps: Preset an inspection cycle and analyze the working status of the friend node based on the inspection cycle. When a friend node fails, set the friend node as a disabled node and set the remaining friend nodes as initial friend nodes; Based on the initial friend nodes, the maximum single communication distance of the device, and the networking mode of the Bluetooth Mesh network, the networking devices in the Bluetooth Mesh network are redistributed to obtain friend nodes; Set the deactivated nodes and the remaining networking devices in the Bluetooth Mesh network to low-power nodes.

[0014] A system for dynamically allocating friend nodes based on a Bluetooth Mesh network, comprising a directly connected device acquisition module, a device distance acquisition module, a friend node allocation module, and an abnormality analysis module; The directly connected device acquisition module acquires the networking devices, networking methods, and network adapters in the Bluetooth Mesh network, and obtains a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network, wherein the network adapter is the controller of the networking device; The device distance acquisition module obtains the distance between adjacent devices and the maximum distance of a single communication between devices based on the networking mode and the list of directly connected devices corresponding to any networking device; The friend node allocation module allocates friend nodes to network devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode, until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the devices is met, completing the friend node allocation; The abnormal situation analysis module analyzes the coverage of the Bluetooth Mesh network by the friend node when an abnormal situation occurs in the networking device in the Bluetooth Mesh network, obtains the coverage analysis result, and updates the friend node based on the coverage analysis result. Among them, the abnormal situation includes the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

[0015] As an implementable method, the friend node allocation module is configured to: The Bluetooth Mesh network's network adapter is used as the initial friend node. Based on the list of directly connected devices, networking mode, distance between adjacent devices, and the maximum single communication distance of devices, the initial friend node is analyzed to see if it covers the Bluetooth Mesh network. If the current initial friend node cannot cover the Bluetooth Mesh network, that is, the distance between the adjacent devices of the networking device and the initial friend node is greater than the maximum distance of a single communication between the devices, the networking devices that cannot be covered by the current initial friend node in the Bluetooth Mesh network will be added to the initial friend node based on the directly connected device list; If the added initial friend nodes can cover the Bluetooth Mesh network, analyze whether the initial friend nodes meet the maximum distance for a single device communication, that is, whether the distance between adjacent devices between the initial friend nodes is less than the maximum distance for a single device communication; If yes, the current initial friend node is a friend node of the Bluetooth Mesh network, and the node allocation is completed; If not, obtain the intersection of the initial friend nodes and add them to the initial friend nodes until the distance between adjacent devices between the initial friend nodes meets the condition of being less than the maximum distance of a single communication between the devices, and the friend node allocation is completed; This also includes the process of selecting a friend node. If multiple groups of initial friend nodes appear that can cover the Bluetooth Mesh network and the initial friend nodes meet the maximum distance for a single device communication, the initial friend node with the least number of nodes is selected as the friend node.

[0016] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following method: Obtain the networking devices, networking methods, and network adapters in the Bluetooth Mesh network. Obtain a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network. The network adapter is the controller of the networking device. Based on the networking mode and the list of directly connected devices corresponding to any networking device, the distance between adjacent devices and the maximum distance of a single communication between devices can be obtained; Friend node allocation is performed on networking devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode. This is done until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the friend nodes is met. When an abnormal situation occurs in the networking devices in the Bluetooth Mesh network, the coverage of the friend node on the Bluetooth Mesh network is analyzed to obtain the coverage analysis results, and the friend node is updated based on the coverage analysis results. Among them, abnormal situations include the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

[0017] A device for dynamically allocating friend nodes based on a Bluetooth Mesh network, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the following method is implemented: Obtain the networking devices, networking methods, and network adapters in the Bluetooth Mesh network. Obtain a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network. The network adapter is the controller of the networking device. Based on the networking mode and the list of directly connected devices corresponding to any networking device, the distance between adjacent devices and the maximum distance of a single communication between devices can be obtained; Friend node allocation is performed on networking devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode. This is done until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the friend nodes is met. When an abnormal situation occurs in the networking devices in the Bluetooth Mesh network, the coverage of the friend node on the Bluetooth Mesh network is analyzed to obtain the coverage analysis results, and the friend node is updated based on the coverage analysis results. Among them, abnormal situations include the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

[0018] The present invention has significant technical effects due to the adoption of the above technical solutions: The present invention completes the friend node allocation of the Bluetooth Mesh network by obtaining the list of directly connected devices corresponding to the networking devices in the Bluetooth Mesh network, analyzing the list of directly connected devices, the networking mode and the maximum single communication distance of the devices. When an abnormal situation occurs in the Bluetooth Mesh network, the coverage of the friend nodes on the changed Bluetooth Mesh network is analyzed, and the friend nodes are dynamically updated based on the coverage situation to ensure that the friend nodes are sufficient to maintain the normal operation of the Bluetooth Mesh network, thereby improving the network life and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 It is a schematic flow diagram of the method of the present invention; Figure 2 It is an overall schematic diagram of the system of the present invention; Figure 3 This is a schematic diagram of the Bluetooth Mesh network of the present invention; Figure 4 This is a schematic diagram of the friend node allocation process of the present invention; Figure 5 This is a schematic diagram of the friend node coverage area of ​​the present invention; Figure 6 It is a schematic diagram of the friend node update process of the present invention. DETAILED DESCRIPTION

[0021] The present invention will be further described in detail below with reference to the examples. The following examples are intended to explain the present invention but the present invention is not limited to the following examples.

[0022] Example 1: A method for dynamically allocating friend nodes based on Bluetooth Mesh network, such as Figure 1 As shown, the following steps are included: S100: Obtain networking devices, networking methods, and network adapters in the Bluetooth Mesh network, and obtain a list of directly connected devices of any networking device through the networking devices and network adapters in the Bluetooth Mesh network, where the network adapter is a controller of the networking device; S200, based on the networking mode and the list of directly connected devices corresponding to any networking device, obtain the distance between adjacent devices and the maximum single communication distance of the devices; S300: Allocate friend nodes to the networked devices based on the distance between adjacent devices, the maximum single communication distance of the devices, and the networking mode, until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the devices is met, completing the friend node allocation; S400. When an abnormal situation occurs in a networking device in a Bluetooth Mesh network, the coverage of the friend node on the Bluetooth Mesh network is analyzed to obtain a coverage analysis result, and the friend node is updated based on the coverage analysis result. The abnormal situation includes the addition of a networking device, the deletion of a networking device, and a friend node failure.

[0023] This method analyzes the networking devices in a Bluetooth Mesh network to obtain a list of directly connected devices and the distances between adjacent devices for any networking device. Based on the distances between adjacent devices, the maximum single communication distance between devices, and the networking method, friend nodes are assigned to the networking devices until the friend nodes cover the Bluetooth Mesh network. This method achieves minimal friend node coverage of the Bluetooth Mesh network and dynamically updates the friend nodes in real time when an anomaly occurs in the Bluetooth Mesh network, ensuring the normal operation of the Bluetooth Mesh network.

[0024] During the Bluetooth Mesh network construction phase, add several networking devices and set all networking devices to run in non-low power mode. The diagram of completing the Bluetooth Mesh network networking device addition is as follows: Figure 3 As shown, the networking mode and network adapter of the Bluetooth Mesh network are obtained. In this embodiment, the networking mode includes the location of the networking devices and the distance between the networking devices. The network adapter is the controller of the networking devices. After confirming that the networking is completed, it can enter the friend node allocation mode by manual triggering or after detecting that no networking device has been added for a period of time.

[0025] After entering the friend node allocation mode, the network adapter sends a command to obtain the list of directly connected devices of any group of network devices, and allocates friend nodes based on the list of directly connected devices, the maximum single communication distance of the device and the Bluetooth Mesh network. In this embodiment, the direct connection device list is obtained by the following method: After the network device receives the network adapter command sent by the network adapter, any group of network devices sends And the message that requires a reply, Indicates the number of times the message is allowed to be forwarded. Indicates that the sent message is not allowed to be forwarded, and the networking devices that any networking device can communicate with in one communication can be obtained, thereby obtaining a list of directly connected devices; in this embodiment, the maximum distance of a single communication of a device is obtained through the following steps: Step 1: Obtain and analyze the wavelength of the RF signal, the gain of the networking device, the transmit power of the networking device, and the distance between adjacent devices to obtain the received signal strength of the networking device, as shown below:

[0026] Step 2: Obtain the received signal strength of the reference distance based on the received signal strength of the networking device, and combine it with the environmental attenuation factor to obtain the maximum single communication distance of the device, which is expressed as follows:

[0027] in, Indicates the receiving signal strength of the networking device. 、 Indicates the transmission gain and receiving gain of the networking equipment. Indicates the wavelength of the RF signal, Indicates the distance between adjacent devices. Indicates the maximum distance of a single communication of the device. Indicates the received signal strength at the reference distance, Represents the environmental attenuation factor.

[0028] In this embodiment, the Bluetooth Mesh network adapter is first used as the initial friend node, and the friend node is analyzed and assigned based on the initial friend node. The friend node assignment process is as follows: Figure 4 As shown, the following steps are included: Step 1: In this embodiment, the Bluetooth Mesh network is based on Figure 3 For example, select networking device A as the network distributor. Assuming the distance between adjacent devices is 1 and the maximum single communication distance of any networking device is 1, the list of directly connected devices of all networking devices is calculated as follows:

[0029] Step 2: When using network adapter A as the initial friend node, according to A's directly connected device list, the distance between the adjacent devices in the Bluetooth Mesh network and the initial friend node is greater than the maximum distance for a single communication. Therefore, it is determined that the current initial friend node cannot cover the Bluetooth Mesh network. It is necessary to add another networking device to the initial friend node, as shown below:

[0030] Step 3: Continue to analyze the coverage of the Bluetooth Mesh network based on the device distance between the initial friend node and the networking node and the maximum single communication distance. If coverage is not possible, continue to add a networking device to the initial friend node, as shown below:

[0031] Step 4: When the initial friend nodes can cover the Bluetooth Mesh network, the maximum distance for a single communication between the initial friend nodes is analyzed based on the networking method. That is, whether the device distance between the current initial friend nodes is less than the maximum distance for a single communication is determined as follows: : Does not meet the device's maximum single communication distance requirement, the distance between G and A, B is greater than 1 : Does not meet the device's maximum single communication distance requirement, the distance between H and A and B is greater than 1 : Does not meet the device's maximum single communication distance requirement, A, E, and G distances are all greater than 1 : Does not meet the device's maximum single communication distance requirement, A, E, and H distances are all greater than 1 : Does not meet the device's maximum single communication distance requirement, A and F, G distances are greater than 1 : Does not meet the device's maximum single communication distance requirement, A, F, and H distances are all greater than 1 Step 5: If the current initial friend nodes cannot meet the requirement of the maximum distance for a single device communication, obtain the intersection of the initial friend nodes and add them to the initial friend nodes, as shown below: : Calculate the intersection of {A} and {G}, which is C. After adding, it is

[0032] : Calculate the intersection of {A} and {H}, no; calculate the intersection of {B} and {H}, no : Calculate the intersection of {A} and {E}, B; calculate the intersection of {A} and {G}, C, after adding

[0033] : Calculate the intersection of {A} and {E}, B; calculate the intersection of {A} and {H}, none : Calculate the intersection of {A} and {F}, B; calculate the intersection of {A} and {G}, C, after adding

[0034] : Calculate the intersection of {A} and {F}, B; calculate the intersection of {A} and {H}, none Step 6: If the initial friend nodes currently obtained meet the requirements of covering the Bluetooth Mesh network and the initial friend nodes meet the maximum distance for a single device communication, the initial friend nodes with the least number of nodes will be added. As a friend node, complete the allocation of friend nodes, that is, satisfy the device distance between friend nodes is less than the maximum distance of a single communication, and each friend node covers the Bluetooth Mesh network. Figure 5 shown.

[0035] After the Bluetooth Mesh network is built and used, if there are additions or deletions of networking devices, the friend nodes need to be updated to meet the conditions for covering the Bluetooth Mesh network. The process of updating the friend nodes is as follows: Figure 6 As shown, the following steps are included: Step 1: Based on the networking mode, the list of directly connected devices, and the maximum single communication distance of the devices, analyze whether the friend node can cover the changed Bluetooth Mesh network. If it can, the friend node will not be updated; Step 2: If the friend node cannot cover the changed Bluetooth Mesh network, the current friend node is used as the initial friend node, and the friend node is updated using the friend node allocation method.

[0036] In this embodiment, a check cycle is preset, and the working status of the friend nodes in the Bluetooth Mesh network is detected based on the check cycle. If a friend node failure is found, such as a power alarm, the friend node is reported to the network adapter and set as a disabled node. At this time, the friend node cannot cover the Bluetooth Mesh network. It is necessary to update the friend node based on the networking mode, the maximum single communication distance of the device, and the list of directly connected devices, including the following steps: Step 1: During the node update process, the Bluetooth Mesh network is still Figure 3 For example, assume that friend node C fails. In this case, C is not set as a candidate friend node. The maximum distance for a device to communicate in a single communication is 2, and the distance between all adjacent networking nodes is 1. In this case, the list of directly connected devices of any networking node is as follows:

[0037] Step 2: From the list of directly connected devices, it can be seen that any node as a friend node cannot meet the conditions for covering the Bluetooth Mesh network. It is necessary to add networking devices to the initial friend node, as shown below:

[0038] Step 3: The requirements for Bluetooth Mesh network coverage are as follows: and Two groups, namely and The distance between the networked devices is less than the maximum distance of a single communication. Analyze the maximum distance of a single communication between the two groups of initial friend nodes. This condition is not met, that is The distance between the devices is greater than the maximum distance of a single communication, so set A friend node.

[0039] This method completes the allocation of friend nodes in the above manner, and during the operation of the Bluetooth Mesh network, when an abnormal situation occurs, the friend nodes are dynamically allocated and updated to ensure that the friend nodes are in normal working condition and improve the life of the entire network. At the same time, this method follows the principle of minimum friend nodes in the friend node selection process, so that the power consumption of the entire Bluetooth Mesh network will be minimized, which has good application prospects in working environments with difficult power supply. Example 2: A system for dynamically allocating friend nodes based on Bluetooth Mesh network, such as Figure 2 As shown, it includes a directly connected device acquisition module 100, a device distance acquisition module 200, a friend node allocation module 300 and an abnormal situation analysis module 400; The directly connected device acquisition module 100 acquires the networking devices, networking modes, and network adapters in the Bluetooth Mesh network, and obtains a list of directly connected devices of any networking device through the networking devices and network adapters in the Bluetooth Mesh network, wherein the network adapter is a controller of the networking device; The device distance acquisition module 200 obtains the distance between adjacent devices and the maximum distance of a single communication between devices based on the networking mode and the list of directly connected devices corresponding to any networking device; The friend node allocation module 300 allocates friend nodes to networked devices based on the distance between adjacent devices, the maximum single communication distance between devices, and the networking mode until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between devices is met, completing the friend node allocation. The abnormal situation analysis module 400 analyzes the coverage of the Bluetooth Mesh network by the friend node when an abnormal situation occurs in the networking device in the Bluetooth Mesh network, obtains the coverage analysis result, and updates the friend node based on the coverage analysis result. The abnormal situation includes the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

[0040] Various changes and modifications can be made without departing from the spirit and scope of the present invention, and all equivalent technical solutions also fall within the scope of the present invention.

[0041] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0042] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0043] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0044] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0045] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0046] It should be noted that: References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Therefore, appearances of the phrases "one embodiment" or "an embodiment" in various places throughout this specification do not necessarily refer to the same embodiment.

[0047] Furthermore, it should be noted that the specific embodiments described in this specification may vary in the shapes and names of their components. Any equivalent or simple variations based on the structure, features, and principles described in the patented concept of this invention are included within the scope of protection of this patent. Persons skilled in the art may make various modifications, additions, or substitutions to the described specific embodiments, and these modifications, as long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, shall fall within the scope of protection of this invention.

Claims

1. A method for dynamically allocating friend nodes based on a Bluetooth Mesh network, characterized in that: The following steps are involved: Obtain the networking devices, networking methods, and network adapters in the Bluetooth Mesh network. Obtain a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network. The network adapter is the controller of the networking device. Based on the networking mode and the list of directly connected devices corresponding to any networking device, the distance between adjacent devices and the maximum distance of a single communication between devices can be obtained; Friend node allocation is performed on networking devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode. This is done until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the friend nodes is met. When an abnormal situation occurs in the networking devices in the Bluetooth Mesh network, the coverage of the friend node on the Bluetooth Mesh network is analyzed to obtain the coverage analysis results, and the friend node is updated based on the coverage analysis results. Among them, abnormal situations include the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

2. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 1, characterized in that: Obtaining a list of directly connected devices of any group of network devices comprises the following steps: The Bluetooth Mesh network's network adapter sends a network adapter command. After receiving the network adapter command, the networking device in the Bluetooth Mesh network sends a message with a forwarding count of 0 and a request for a reply. The networking devices in the Bluetooth Mesh network perform statistical analysis on the received reply messages to obtain the networking devices that can be connected in one communication, that is, the list of directly connected devices corresponding to the networking devices.

3. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 1, characterized in that: The method of obtaining the maximum single communication distance of the device includes the following steps: Obtain the wavelength of the RF signal, the gain of the networking device, the transmit power of the networking device, and the distance between adjacent devices to obtain the received signal strength of the networking device, which is expressed as follows: The received signal strength of the reference distance is obtained based on the received signal strength of the networking device. Combined with the environmental attenuation factor, the maximum single communication distance of the device is obtained, which is expressed as follows: in, Indicates the receiving signal strength of the networking device. 、 Indicates the transmission gain and receiving gain of the networking equipment. Indicates the wavelength of the RF signal, Indicates the distance between adjacent devices. Indicates the maximum distance of a single communication of the device. Indicates the received signal strength at the reference distance, Represents the environmental attenuation factor.

4. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 1, wherein: The friend node allocation is performed on the networking devices until the friend nodes cover the Bluetooth Mesh network, and the friend node allocation is completed, including the following steps: The Bluetooth Mesh network's network adapter is used as the initial friend node. Based on the list of directly connected devices, networking mode, distance between adjacent devices, and the maximum single communication distance of devices, the initial friend node is analyzed to see if it covers the Bluetooth Mesh network. If the current initial friend node cannot cover the Bluetooth Mesh network, that is, the distance between the adjacent devices of the networking device and the initial friend node is greater than the maximum distance of a single communication between the devices, the networking devices that cannot be covered by the current initial friend node in the Bluetooth Mesh network will be added to the initial friend node based on the directly connected device list; If the added initial friend nodes can cover the Bluetooth Mesh network, analyze whether the initial friend nodes meet the maximum distance for a single device communication, that is, whether the distance between adjacent devices between the initial friend nodes is less than the maximum distance for a single device communication; If yes, the current initial friend node is a friend node of the Bluetooth Mesh network, and the node allocation is completed; If not, obtain the intersection of the initial friend nodes and add them to the initial friend nodes until the distance between adjacent devices between the initial friend nodes meets the condition of being less than the maximum distance of a single communication between the devices, and the friend node allocation is completed.

5. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 4, characterized in that: It also includes the process of selecting a friend node. If there are multiple groups of initial friend nodes that can cover the Bluetooth Mesh network and the initial friend nodes meet the maximum distance for a single device communication, the initial friend node with the least number of nodes is selected as the friend node.

6. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 1, characterized in that: When the abnormal situation is the addition or deletion of a networking device, the friend node is updated, including the following steps: Based on the friend nodes after the network devices are added or deleted, determine whether the friend nodes can cover the changed Bluetooth Mesh network; If the changed friend node cannot cover the Bluetooth Mesh network, the networking device of the Bluetooth Mesh network exits the low-power mode and uses the current friend node as the initial friend node. Based on the initial friend node, the maximum single communication distance of the device and the networking mode of the Bluetooth Mesh network, the networking devices in the Bluetooth Mesh network are redistributed.

7. The method for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 1, characterized in that: When the abnormal situation is a friend node failure, the friend node is updated, including the following steps: Preset an inspection cycle and analyze the working status of the friend node based on the inspection cycle. When a friend node fails, set the friend node as a disabled node and set the remaining friend nodes as initial friend nodes; Based on the initial friend nodes, the maximum single communication distance of the device, and the networking mode of the Bluetooth Mesh network, the networking devices in the Bluetooth Mesh network are redistributed to obtain friend nodes; Set the deactivated nodes and the remaining networking devices in the Bluetooth Mesh network to low-power nodes.

8. A system for dynamically allocating friend nodes based on a Bluetooth Mesh network, characterized in that: It includes direct-connected device acquisition module, device distance acquisition module, friend node allocation module and abnormal situation analysis module; The directly connected device acquisition module acquires the networking devices, networking methods, and network adapters in the Bluetooth Mesh network, and obtains a list of directly connected devices for any networking device through the networking devices and network adapters in the Bluetooth Mesh network, wherein the network adapter is the controller of the networking device; The device distance acquisition module obtains the distance between adjacent devices and the maximum distance of a single communication between devices based on the networking mode and the list of directly connected devices corresponding to any networking device; The friend node allocation module allocates friend nodes to network devices based on the distance between adjacent devices, the maximum single communication distance of devices, and the networking mode, until the friend nodes cover the Bluetooth Mesh network and the maximum single communication distance between the devices is met, completing the friend node allocation; The abnormal situation analysis module analyzes the coverage of the Bluetooth Mesh network by the friend node when an abnormal situation occurs in the networking device in the Bluetooth Mesh network, obtains the coverage analysis result, and updates the friend node based on the coverage analysis result. Among them, the abnormal situation includes the addition of networking devices, the deletion of networking devices and the failure of friend nodes.

9. The system for dynamically allocating friend nodes based on a Bluetooth Mesh network according to claim 8, characterized in that: The friend node allocation module is configured to: The Bluetooth Mesh network's network adapter is used as the initial friend node. Based on the list of directly connected devices, networking mode, distance between adjacent devices, and the maximum single communication distance of devices, the initial friend node is analyzed to see if it covers the Bluetooth Mesh network. If the current initial friend node cannot cover the Bluetooth Mesh network, that is, the distance between the adjacent devices of the networking device and the initial friend node is greater than the maximum distance of a single communication between the devices, the networking devices that cannot be covered by the current initial friend node in the Bluetooth Mesh network will be added to the initial friend node based on the directly connected device list; If the added initial friend nodes can cover the Bluetooth Mesh network, analyze whether the initial friend nodes meet the maximum distance for a single device communication, that is, whether the distance between adjacent devices between the initial friend nodes is less than the maximum distance for a single device communication; If yes, the current initial friend node is a friend node of the Bluetooth Mesh network, and the node allocation is completed; If not, obtain the intersection of the initial friend nodes and add them to the initial friend nodes until the distance between adjacent devices between the initial friend nodes meets the condition of being less than the maximum distance of a single communication between the devices, and the friend node allocation is completed; This also includes the process of selecting a friend node. If multiple groups of initial friend nodes appear that can cover the Bluetooth Mesh network and the initial friend nodes meet the maximum distance for a single device communication, the initial friend node with the least number of nodes is selected as the friend node.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A device for dynamically allocating friend nodes based on a Bluetooth Mesh network, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Relay, mesh network-based communication method, device and system

    CN109068339A

  • Automatic configuration method of Bluetooth mesh friendship function

    CN112004184A

  • Bluetooth Mesh network remote meter reading system based on relay node

    CN114040372A

  • Large-scale industrial fault diagnosis system and method based on Bluetooth MESH

    CN120264258A

  • Method and system for dynamically forming service aware bluetooth low energy (BLE) mesh network

    US20170156102A1