A Bluetooth Mesh network routing method based on automatic channel scheduling
By introducing automatic channel scheduling and routing methods into Bluetooth Mesh networks, the problem of waste of channel resources and insufficient scalability caused by purposeless flooding is solved, and more efficient channel resource utilization and network performance improvement is achieved.
Patent Information
- Application Number
- CN202011396744.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-12-04
AI Technical Summary
The existing Bluetooth Mesh network uses a purposeless managed flooding method, resulting in wasted channel resources, reduced communication reliability, increased end-to-end delay and insufficient scalability, especially in large-scale dense networks. .
Adopt the routing method based on automatic channel scheduling, through the automatic channel scheduling strategy between nodes, improve the communication method to purposeful routing, and use the routing table and neighbor table to carry out purposeful forwarding of data packets, reduce redundant packet transmission, and improve the Channel resource utilization.
It improves channel resource utilization, reduces packet collision probability and end-to-end delay, and significantly improves network scalability and performance.
Smart Images

Figure CN114599018B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a Bluetooth Mesh network routing method based on automatic channel scheduling. Background Art
[0002] With the increasing popularity of the Internet of Things (IoT), people have put forward higher requirements for lightweight and secure communication technologies. Although smart homes, smart offices and smart cities are booming, good interoperability between IoT devices remains a challenge. People need to interconnect hundreds of IoT devices to perform various tasks such as room lighting, sensing and temperature control, but since most of these devices are resource-constrained and usually powered by button batteries, wireless communication technologies such as Wi-Fi, which have high overhead and high power consumption, are not suitable for use in IoT scenarios.
[0003] In the past decade, Bluetooth, especially Bluetooth Low Energy (BLE), has become one of the most commonly used IoT solutions. BLE was designed to address the limitations of resource overhead and power consumption, but it was originally designed for star topology, with smartphones as the main central control entity, so this topology is not suitable for covering large-scale networks such as smart buildings. Many researchers and vendors have proposed academic or private solutions to such problems, overcoming these limitations through multi-hop networks based on Bluetooth mesh, but there has been no official standard for Bluetooth mesh. Until July 19, 2017, the Bluetooth Special Interest Group (SIG) proposed the official Bluetooth Mesh core specification, providing a generally accepted standard for Bluetooth Mesh networks.
[0004] The protocol proposed by the core specification of Bluetooth Mesh uses the same underlying protocol stack as BLE, so Bluetooth Mesh can be backward compatible with Bluetooth 4.0. According to the specification, the Bluetooth Mesh network can support 32767 nodes and can have a maximum of 127 hops. Except for the low-power nodes defined in the specification, all other nodes need to be powered continuously, that is, they continuously monitor the Bluetooth broadcast channel, and all monitored data packets need to be forwarded or passed to the upper layer for further processing, and do not have low power consumption characteristics. In Bluetooth Mesh, nodes communicate with each other using a managed flooding method. When a node in the network needs to send a data packet, no routing strategy is required. It only needs to broadcast the data packet on Bluetooth broadcast channels 37, 38, and 39 in sequence, and all other nodes within its radio range will receive this data packet. The node that monitors the data packet determines whether the destination address in the packet is its own address. If so, it passes it to the upper layer for processing. Otherwise, it needs to determine whether the TTL field is less than or equal to 1. If so, the data packet is directly discarded, otherwise the TTL field is reduced by one and the data packet is continued to be forwarded.
[0005] Since the Bluetooth Mesh defined in the core specification uses a managed flooding method for inter-node communication, when there are many nodes in the network that need to send data packets, all relay nodes in the network will participate in the forwarding of data packets, resulting in a large number of duplicate data packets in the network, which in turn increases the probability of data packet conflicts on Bluetooth broadcast channels 37, 38, and 39. In this case, Bluetooth broadcast channel resources are seriously wasted, the reliability of communication is reduced, and the retransmission caused by the conflict problem also virtually increases the end-to-end delay. In addition, when deployed in large-scale dense networks, the conflict problem of data packets will be aggravated, resulting in insufficient scalability. Summary of the invention
[0006] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provides a Bluetooth Mesh network routing method based on automatic channel scheduling.
[0007] The purpose of the present invention is to improve the shortcomings of the existing Bluetooth Mesh protocol. Based on the automatic channel scheduling strategy between nodes, the communication mode of Bluetooth Mesh is changed from purposeless managed flooding to purposeful routing. By using the method of the present invention, the channel resource utilization rate of Bluetooth Mesh can be improved, the end-to-end delay can be reduced, and the scalability of the network can be improved.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is: a Bluetooth Mesh network routing method based on automatic channel scheduling, the method comprising the following steps:
[0009] (1) Network topology establishment initialization process, including:
[0010] (1.1) All nodes in the network establish an empty neighbor table and an empty routing table;
[0011] (1.2) All nodes in the network periodically send broadcast packets with the destination address being the broadcast address, where the TTL field is set to the maximum value of 127;
[0012] (1.3) All nodes in the network determine whether the sending node is a neighbor node based on the TTL field of the received broadcast packet. If so, the MAC address and mesh address of the neighbor node are recorded in the neighbor table and routing table;
[0013] (1.4) For data packets sent from non-neighboring nodes, the number of hops experienced by the data packets is calculated using the TTL field in the packet, and the address of the previous hop node that forwarded the data packet when the number of hops experienced by the data packet sent from the same node is the shortest number of hops is recorded as the next hop node whose destination node address is the source node address of the currently received data packet, and the next hop node address and hop count information of the destination node address are updated in the routing table;
[0014] (1.5) Calculation of the monitoring channel of neighbor nodes in the network: The node performs a hash operation on the MAC address of the neighbor entry in the neighbor table, and obtains the corresponding monitoring channel of each neighbor by performing a modulo operation on the hash operation result, and records it in the neighbor table;
[0015] (1.6) Calculation of each listening channel of each node in the network: The node calculates the channel it needs to listen to based on its own MAC address through the same hash operation as in step (1.5). After the initialization phase is completed, it listens to the corresponding channel;
[0016] (2) The process of sending data packets includes:
[0017] (2.1) When a node has a data packet to send, it searches the routing table according to the mesh address of the destination node. If the mesh address of the destination node is in the routing table, it searches the neighbor table for the channel monitored by the node with this MAC address according to the MAC address field of the next hop in the routing table entry, and sends the data packet on this channel. Otherwise, it executes step (2.2).
[0018] (2.2) According to the monitoring channels of the neighbor nodes recorded in the neighbor table, the data packet is sent once on the channel monitored by each neighbor;
[0019] (3) Data packet receiving process, including:
[0020] (3.1) After receiving a data packet, a node in the network checks whether the destination address in the data packet is its own mesh address. If so, it passes the data packet to the upper layer of the protocol stack for processing. Otherwise, it executes step (3.2);
[0021] (3.2) Check whether the TTL value in the data packet is less than or equal to 1. If so, discard the data packet directly. Otherwise, execute the packet sending process in step (2).
[0022] Furthermore, the destination address in the routing table of the present invention is the Mesh address of the node defined according to the Bluetooth Mesh specification.
[0023] In the step (1.4), the previous hop node address that forwards the data packet is the MAC address of the previous hop node.
[0024] In the step (1.4), the hash operation is performed as a modulo operation, and the divisor is 40, which is the number of all channels used by BLE.
[0025] The beneficial effects of the present invention are as follows: by improving the managed flooding communication mode in the existing Bluetooth Mesh network, introducing a routing strategy, and making full use of Bluetooth channel resources, most of the redundant data packets in the network are eliminated, the probability of data packet conflicts in the network is reduced, and the channel resource utilization rate is improved; in particular, in the scenario of large-scale dense deployment of nodes, the network performance can be significantly improved, which is specifically reflected in: improving the packet receiving rate, reducing the end-to-end delay, and improving the scalability of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the examples of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] FIG. 1 is a diagram showing an overview of the process of implementing the present invention.
[0028] FIG. 2 is a detailed diagram of the workflow of the method of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described below in conjunction with the accompanying drawings. The specific steps of the present invention are as follows:
[0030] (1) Network topology establishment initialization process, including:
[0031] (1.1) All nodes in the network establish an empty neighbor table and an empty routing table. The neighbor table contains the following fields: neighbor node MAC address, neighbor node listening channel and pointer to the next table entry; the routing table contains the following fields: destination node mesh address, next hop node MAC address, number of hops required for data packets sent to the destination node and pointer to the next table entry;
[0032] (1.2) All nodes in the network periodically send broadcast packets with the destination address being the broadcast address (0xffff), where the TTL field is set to the maximum value of 127;
[0033] (1.3) All nodes in the network determine whether the sending node is a neighbor node based on the TTL field in the received broadcast packet. Specifically, when the initial TTL value minus the TTL value in the packet is 1, it is a neighbor node. Then the MAC address and mesh address information of the neighbor node are recorded in the neighbor table and routing table respectively.
[0034] (1.4) For data packets sent from non-neighboring nodes, the number of hops experienced by the data packets is calculated using the TTL field in the packet; specifically, the TTL value in the packet is subtracted from the initial TTL value, and then the MAC address of the previous hop node that forwarded the data packet when the number of hops experienced by the data packet is the shortest is recorded as the next hop node whose destination node address is the source node address of the currently received data packet, and the next hop node address and hop count information of the destination node address in the routing table are updated;
[0035] (1.5) Calculation of the monitoring channel of the neighbor nodes in the network: The node performs a 32-bit mixed function hash operation on the MAC address of the neighbor entry in the neighbor table, and obtains the corresponding monitoring channel of each neighbor by performing a modulo operation on the hash operation result with the divisor being the number of available BLE channels 40, and records it in the neighbor table;
[0036] (1.6) Calculation of each listening channel of each node in the network: The node calculates the channel it needs to listen to based on its own MAC address through the same hash operation as in step (1.5). After the initialization phase is completed, it listens to the corresponding channel;
[0037] (2) The process of sending data packets includes:
[0038] (2.1) When a node has a data packet to send, it searches the routing table according to the mesh address of the destination node. If the mesh address of the destination node is in the routing table, it searches the neighbor table for the channel monitored by the node with this MAC address according to the MAC address field of the next hop in the routing table entry, and sends the data packet on this channel. Otherwise, it executes step (2.2).
[0039] (2.2) According to the monitoring channels of the neighbor nodes recorded in the neighbor table, the data packet is sent once on the channel monitored by each neighbor;
[0040] (3) Data packet receiving process, including:
[0041] (3.1) After receiving a data packet, a node in the network checks whether the destination address in the data packet is its own mesh address. If so, it passes the data packet to the upper layer of the protocol stack for processing. Otherwise, it executes step (3.2);
[0042] (3.2) Check whether the TTL value in the data packet is less than or equal to 1. If so, discard the data packet directly. Otherwise, execute the packet sending process in step (2).
[0043] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A Bluetooth Mesh network routing method based on automatic channel scheduling, It is characterized by the following steps: (1) Network topology establishment initialization process, including: (1.1) All nodes in the network establish an empty neighbor table and an empty routing table. The neighbor table contains the following fields: neighbor node MAC address, neighbor node listening channel and pointer to the next table entry; the routing table contains the following fields: destination node mesh address, next hop node MAC address, number of hops required for data packets sent to the destination node, and pointer to the next table entry; (1.2) All nodes in the network periodically send broadcast packets with the destination address being the broadcast address (0xffff), where the TTL field is set to the maximum value of 127; (1.3) All nodes in the network determine whether the sending node is a neighbor node based on the TTL field in the received broadcast packet. Specifically, when the initial TTL value minus the TTL value in the packet is 1, it is a neighbor node. Then the MAC address and mesh address information of the neighbor node are recorded in the neighbor table and routing table respectively. (1.4) For data packets sent from non-neighboring nodes, the number of hops experienced by the data packets is calculated using the TTL field in the packet; specifically, the initial TTL value is subtracted from the TTL value in the packet, and then the MAC address of the previous hop node that forwarded the data packet when the number of hops experienced by the data packet is the shortest is recorded as the next hop node whose destination node address is the source node address of the currently received data packet, and the next hop node address and hop count information of the destination node address in the routing table are updated; (1.5) Calculation of neighbor node monitoring channels of nodes in the network: The node performs a 32-bit mixed function hash operation on the MAC address of the neighbor entry in the neighbor table, and obtains the corresponding monitoring channel of each neighbor by performing a modulo operation on the hash operation result with the divisor being the number of available BLE channels, 40, and records it in the neighbor table; (1.6) Calculation of the channels that each node in the network monitors: The node calculates the channel that it needs to monitor based on its own MAC address through the same hash operation as in step (1.5). After the initialization phase is completed, it monitors the corresponding channel; (2) The process of sending data packets includes: (2.1) When a node has a data packet to send, it searches the routing table according to the mesh address of the destination node. If the mesh address of the destination node is in the routing table, it searches the neighbor table for the channel monitored by the node with this MAC address according to the MAC address field of the next hop in the routing table entry, and sends the data packet on this channel. Otherwise, it executes step (2.2). (2.2) According to the monitoring channels of the neighbor nodes recorded in the neighbor table, the data packet is sent once on the channel monitored by each neighbor; (3) Data packet receiving process, including: (3.1) After receiving a data packet, a node in the network checks whether the destination address in the data packet is its own mesh address. If so, it passes the data packet to the upper layer of the protocol stack for processing. Otherwise, it executes step (3.2). (3.2) Check whether the TTL value in the data packet is less than or equal to 1. If so, discard the data packet directly. Otherwise, execute the packet sending process in step (2).
