WO2024001190A1 - 消息发送方法、设备智能互联系统、相关设备及存储介质 - Google Patents

消息发送方法、设备智能互联系统、相关设备及存储介质 Download PDF

Info

Publication number
WO2024001190A1
WO2024001190A1 PCT/CN2023/074278 CN2023074278W WO2024001190A1 WO 2024001190 A1 WO2024001190 A1 WO 2024001190A1 CN 2023074278 W CN2023074278 W CN 2023074278W WO 2024001190 A1 WO2024001190 A1 WO 2024001190A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
node device
ttl
bluetooth mesh
broadcast
Prior art date
Application number
PCT/CN2023/074278
Other languages
English (en)
French (fr)
Inventor
杨斌
陈文兵
刘光勇
Original Assignee
浙江艾克斯精灵人工智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江艾克斯精灵人工智能科技有限公司 filed Critical 浙江艾克斯精灵人工智能科技有限公司
Publication of WO2024001190A1 publication Critical patent/WO2024001190A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of this application relate to the field of communication technology, and specifically relate to a message sending method, a device intelligent interconnection system, related devices and storage media.
  • the Bluetooth Mesh (wireless mesh) network is a mesh network that establishes communication between devices based on BLE (Bluetooth Low Energy). It is widely used in intelligent interconnection scenarios of devices such as smart homes and smart offices.
  • BLE Bluetooth Low Energy
  • messages can be relayed and forwarded between network-equipped node devices, thereby increasing the transmission distance of messages to adapt to large-scale Bluetooth Mesh networks with a large number of node devices.
  • the message transmission performance of the Bluetooth Mesh network needs to be improved.
  • embodiments of the present application provide a message sending method, device intelligent interconnection system, related devices and storage media to dynamically optimize the TTL (Time To Live, used to indicate the number of message forwarding hops) when a node device sends a message. survival time), thereby reducing unnecessary message transmission and improving the message transmission performance of the Bluetooth Mesh network while ensuring the success rate of message sending.
  • TTL Time To Live, used to indicate the number of message forwarding hops
  • embodiments of the present application provide a message sending method, which is applied to a node device.
  • the method includes: determining the destination device corresponding to the message to be sent by the node device; querying at least the destination device in the message hop count table maintained in advance by the node device.
  • the message hop count corresponding to the device and the node device; the message hop count table records at least the message hop count between the broadcast message of the destination device and the node device; determine the TTL of the message based on the message hop count; the TTL has a set value compared with the message hop count.
  • embodiments of the present application provide a message sending method, which is applied to broadcast devices.
  • the method includes: periodically broadcasting messages in the Bluetooth Mesh network in the order of decreasing TTL, so that the node device that receives the broadcast message, According to the TTL in the broadcast message, at least the number of message hops between the broadcast message and the node device is recorded in the message hop table; among them, the TTL of the next broadcast message is sequentially decreasing compared to the TTL of the previous broadcast message; the node is obtained A message sent by the device; when the message is sent from the node device, the TTL of the message is determined according to the message hop number corresponding to the destination device and the node device queried in the node device's message hop table, and the set redundancy; and the message Once forwarded in the Bluetooth Mesh network, the TTL of the message is decremented once. When the TTL of the message is less than the set first value, the message stops being forwarded in the Bluetooth Mesh network.
  • embodiments of the present application provide a device intelligent interconnection system, including a node device and a broadcasting device; the node device is used to perform the message sending method of the above-mentioned first aspect, and the broadcasting device is used to perform the message sending method of the above-mentioned second aspect.
  • Sending method; broadcast devices include Bluetooth Mesh gateways or proxy node devices of terminal devices.
  • embodiments of the present application provide a node device, including at least one memory and at least one processor.
  • the memory stores one or more computer-executable instructions
  • the processor calls the one or more computer-executable instructions to execute the following: The message sending method of the above first aspect.
  • embodiments of the present application provide a broadcasting device, including at least one memory and at least one processor.
  • the memory stores one or more computer-executable instructions
  • the processor calls the one or more computer-executable instructions to execute the following:
  • the broadcast device is a Bluetooth Mesh gateway or a proxy node device of the terminal device.
  • embodiments of the present application provide a storage medium.
  • the storage medium stores one or more computer-executable instructions.
  • the message sending method of the first aspect is implemented, or , such as the message sending method in the second aspect above.
  • embodiments of the present application provide a computer program.
  • the computer program When the computer program is executed, the message sending method of the first aspect is implemented, or the message sending method of the second aspect is implemented.
  • the node device can set and maintain the message hop table, and the message hop table records the broadcast message of the destination device of the node device, relative to the message hop number of the node device; since the node The destination device of the device may be a Bluetooth Mesh gateway or a terminal device (the terminal device sends a broadcast message from the proxy node device), and the number of Bluetooth Mesh gateways and proxy node devices in the Bluetooth Mesh network is generally less than the total number of node devices, so the node device maintenance The amount of data required for the message hop table is relatively low; at the same time, the implementation of the present application can determine the TTL of the message at the source node device that sends the message when the node device sends a message to a destination device such as a Bluetooth Mesh gateway or terminal device, and the message The TTL is determined based on the number of message hops between the broadcast message of the destination device and the node device, as well as the set redundancy.
  • the implementation of this application can reasonably set the TTL required for the necessary transmission of the message, thereby reducing the number of messages in the Bluetooth Mesh.
  • the network load transmitted in the network improves the message transmission performance of the Bluetooth Mesh network.
  • the embodiment of the present application can dynamically optimize the TTL used to indicate the message forwarding hop count based on the message hop count table of the node device when the node device sends a message to the destination device, thereby reducing the number of messages while ensuring the success rate of message sending. Eliminate unnecessary message transmission and improve the message transmission performance of Bluetooth Mesh network.
  • Figure 1 is an example diagram of a Bluetooth Mesh network.
  • Figure 2 is an example diagram of the hop count of a node device.
  • Figure 3A is a flow chart of a message sending method provided by an embodiment of the present application.
  • Figure 3B is another flow chart of the message sending method provided by the embodiment of the present application.
  • Figure 4A is a flow chart of a method for setting a gateway table according to an embodiment of the present application.
  • Figure 4B is an example diagram of periodic broadcast messages.
  • Figure 4C is an example diagram of TTL settings when the node device sends a message.
  • Figure 4D is a flow chart of a node device sending a message to the Bluetooth Mesh gateway.
  • Figure 5 is an example diagram of a node device and multiple Bluetooth Mesh gateways.
  • Figure 6A is an example diagram of a node device sending a message to a terminal device.
  • Figure 6B is an example diagram of the agent node device disconnecting the agent connection.
  • Figure 7 is a block diagram of a message sending device provided by an embodiment of the present application.
  • Figure 8 is a block diagram of the node device.
  • Figure 9 is another block diagram of a message sending device provided by an embodiment of the present application.
  • FIG. 1 schematically shows an example diagram of a Bluetooth Mesh network.
  • the Bluetooth Mesh network may include multiple node devices 101 that have been configured with a network.
  • the Bluetooth Mesh gateway 102 and the terminal device 103 serve as control devices and can perform management work such as configuring and controlling node devices that have been deployed in the network.
  • the node device 101 can be regarded as a Bluetooth Mesh device that has joined the Bluetooth Mesh network.
  • the Bluetooth Mesh device includes smart lamps, smart sockets, smart home appliances and other IoT (Internet of Things) devices.
  • the Bluetooth Mesh gateway 102 can be, for example, a smart speaker, a multi-mode gateway, etc. with Bluetooth communication capabilities and Internet connection capabilities.
  • the Bluetooth Mesh gateway 102 can also serve as a springboard for the node device 101 to connect to the Internet. , to achieve remote control of node devices.
  • the terminal device 103 can be a user-side device such as a smart phone or a tablet computer used by the user.
  • the terminal device can configure and control the node device in the Bluetooth Mesh network by loading an APP with a Bluetooth Mesh network management function.
  • Bluetooth Mesh gateways and node devices can interact by sending broadcast packets.
  • terminal devices such as smartphones and tablets do not support the interaction mode of sending broadcast packets, so the terminal devices need to communicate with the Bluetooth Mesh network.
  • the node device establishes a proxy connection, so that the node device acting as a proxy (referred to as the proxy node device) forwards the broadcast packet to other node devices in the Bluetooth Mesh network.
  • the number of proxy node devices of the terminal device can be one or more.
  • the Bluetooth Mesh protocol stack defines the advertising bearer layer (Advertising Bearer) and the GATT (Generic Attribute Profile, General Attribute Protocol) bearer layer. Since terminal devices such as smartphones and tablets do not support the broadcast bearer layer, The terminal device needs to perform bearer layer conversion (conversion from the broadcast bearer layer to the GATT bearer layer) through the proxy node device, so that the terminal device that does not support the broadcast bearer layer can send and receive messages through the GATT connection.
  • bearer layer conversion conversion from the broadcast bearer layer to the GATT bearer layer
  • the message transmission of Bluetooth Mesh network mainly focuses on the node device sending messages to the gateway and terminal device (for example, the node device synchronizes the status message to the gateway and terminal device); in turn, the gateway and terminal device send the message of the node device ( For example, status messages of node devices) are sent to the cloud.
  • the scenario where the node device sends messages to the gateway and terminal device can be as follows.
  • the user can send a unicast control message through the terminal device (mainly the APP with Bluetooth Mesh network management function loaded on the terminal device) or Bluetooth Mesh gateway; thus the node device obtains the single After broadcasting the control message, perform response control and reply status message to the terminal device or Bluetooth Mesh gateway;
  • the terminal device mainly the APP with Bluetooth Mesh network management function loaded on the terminal device
  • Bluetooth Mesh gateway Bluetooth Mesh gateway
  • the user can send a multicast control message through the terminal device or Bluetooth Mesh gateway; thus, the multiple node devices in the device group perform respective operations after obtaining the multicast control message.
  • the control and reply status messages to the terminal device or Bluetooth Mesh gateway respectively; at this time, each node device in the device group can reply to the status message respectively, and the number of status message replies corresponds to the number of node devices in the device group;
  • the user can control multiple node devices at one time, and the multiple node devices can reply to status messages respectively after responding to the control respectively;
  • each node device can send status messages after power-on to the terminal device or Bluetooth Mesh gateway respectively, so that the terminal device or Bluetooth Mesh gateway can synchronize the status of each node device to the cloud.
  • the above example illustrates a possible example scenario in which the node device sends a message to the terminal device or the Bluetooth Mesh gateway.
  • the node device may also send messages to the terminal device or the Bluetooth Mesh gateway in other scenarios.
  • the implementation of this application does not set a limit to this.
  • the message can be forwarded in the Bluetooth Mesh network through the node device as a relay so that the terminal device or the neighbors of the Bluetooth Mesh gateway can Node devices can send messages to terminal devices or Bluetooth Mesh gateways.
  • the neighbor node device of the terminal device or the Bluetooth Mesh gateway can be regarded as a node device that is 1 hop away from the terminal device or the Bluetooth Mesh gateway; that is, the neighbor node device of the terminal device or the Bluetooth Mesh gateway can transmit messages through 1 hop. The message is sent to the terminal device or Bluetooth Mesh gateway.
  • Figure 2 illustrates an example diagram of the hop count of the node device.
  • the node devices N1, N2 and N3 are 1 hop away from the Bluetooth Mesh gateway G (that is, the node devices N1 to N3 can send messages to the Bluetooth Mesh gateway through one message transmission), and belong to the neighbor node devices of the Bluetooth Mesh gateway G;
  • Node devices N4, N5, and N6 are 2 hops away from Bluetooth Mesh gateway G, and node devices N7, N8, and N9 are 3 hops away from Bluetooth Mesh gateway G.
  • node device N7 sending a message to Bluetooth Mesh gateway G as an example. Since node device N7 The message cannot be sent through 1 hop to the Bluetooth Mesh gateway G. Therefore, the message sent by the node device N7 needs to be relayed and forwarded in the Bluetooth Mesh network, so that the message is forwarded to the neighbor node device N1 of the Bluetooth Mesh gateway G. N2 or N3, the node device N1, N2 or N3 then sends the message to the Bluetooth Mesh gateway G.
  • the Bluetooth Mesh network is based on a flooding management mechanism to forward messages, thereby expanding the communication range.
  • the number of message forwarding times for a node device is mainly controlled based on the following mechanisms:
  • the message in the Bluetooth Mesh network can contain the TTL field for Indicates the number of forwarding hops of the message in the Bluetooth Mesh network; in one example, the value range of TTL can be from 0 to 127.
  • the TTL is decremented every time it is forwarded in the Bluetooth Mesh network. ; It should be noted that when the TTL of the message is less than or equal to 1, the message stops forwarding (that is, when the TTL of the message is 0 or 1, the message stops forwarding, and the processing effect of the message is the same), and the message When TTL is greater than 1, the message will be forwarded in the Bluetooth Mesh network.
  • a node device with message relay function can set up a message cache to record a certain number of forwarded messages; when the node device obtains a message, if the message hits the message cache, it means that the node device has The message has been forwarded, so that the node device no longer relays and forwards the message, and the message can be lost; and if the message misses in the message cache and the TTL of the message is greater than 1, it means that the node device has not relayed and forwarded the message.
  • message and currently needs to forward the message so that the node device can forward the message to a neighbor node device one hop away (for example, the node device forwards the message to other node devices, Bluetooth Mesh gateways, terminal devices, etc. one hop away), and will The TTL of the message is decremented by one.
  • the TTL size of the message will determine the message transmission performance of the Bluetooth Mesh network. That is to say, when the size of the message buffer of the node device and the number of relay node devices are determined, the TTL of the message affects the message transmission performance of the Bluetooth Mesh network.
  • the TTL of the message is selected too large, more messages may be forwarded, resulting in unnecessary message transmission, which will cause a waste of network load on the Bluetooth Mesh network and reduce the message transmission performance of the Bluetooth Mesh network; and if the message If the TTL is selected to be smaller, the forwarding of the message may not be enough to cover the range of the Bluetooth Mesh network, causing some node devices to not receive the message, resulting in the message being unable to be forwarded to the Bluetooth Mesh gateway and terminal device. It can be seen that how to properly set the TTL of the message is crucial to the message transmission performance of the Bluetooth Mesh network.
  • the Bluetooth Mesh standard allows the default TTL of node devices to be adjusted, it does not specify how to select a reasonable TTL value, thereby reducing unnecessary message transmission while ensuring the success rate of message sending.
  • the inventor of this application has considered using the following methods to set the TTL of the message.
  • each node device maintains a neighbor list for recording the addresses of neighbor devices that are one hop away from the node device; the neighbor devices that are one hop away from the node device may, for example, be connected to the node device.
  • Other node devices Bluetooth Mesh gateways, terminal devices, etc.
  • the node device when it sends a message or forwards a message, it checks whether the destination address of the message is recorded in the neighbor list; if not, it follows the default rules Set the TTL of the message and forward the message (for example, when sending a message, use the default TTL as the TTL of the message, and when forwarding the message, decrement the TTL of the message by 1 before forwarding the message); if it is, do not follow the method of decrementing the TTL. Instead of adjusting the TTL value, directly adjust the TTL of the message to 0 or 1, and then forward the message, so that other node devices that receive the message next time will no longer forward the message.
  • the above method can determine whether the destination address of the message belongs to the next hop address of the node device (for example, if the destination address of the message is recorded in the neighbor list of the node device, then the destination address of the message is the next hop address of the node device). Reduce the TTL of the message as much as possible, thereby reducing unnecessary message transmission to a certain extent; however, this method is not suitable for Bluetooth Mesh networks with a large number of node devices. When there are a large number of node devices in the Bluetooth Mesh network, The number of neighbor devices of each node device will increase accordingly, resulting in an increase in the amount of data in the neighbor list stored by the node device, resulting in a large memory overhead for the node device.
  • the TTL of the message is only transmitted to a destination address that matches the destination address. It will be modified and reduced only when the message is sent from the source node device, instead of setting a reasonable smaller value when the message is sent from the source node device; therefore, the message still has a heavier value before it reaches the node device adjacent to the destination address. network load.
  • each node device of the Bluetooth Mesh network can search and scan surrounding node devices to establish a connection with the surrounding node devices; thus, the node device can count the links with the surrounding node devices. information; furthermore, the node device can determine the link of the relay path of the message based on the destination address of the message and the link information of the node device; and calculate the TTL value of the message through the link of the relay path of the message.
  • This method calculates the TTL value corresponding to the link of the message relay path by counting the links of the message relay path, thereby setting the TTL value more reasonably and reducing unnecessary message transmission; however, node device statistics and maintenance links The cost of the road is higher and it is not flexible.
  • node devices may frequently leave and return to the Bluetooth Mesh network (for example, smart lamps leave the Bluetooth Mesh network when the power is turned off, and smart lamps When the power is turned on, it returns to the Bluetooth Mesh network), so the network topology of the Bluetooth Mesh network changes dynamically. Under the dynamically changing network topology, statistics and maintenance of link information of node devices will bring greater realization cost.
  • the Bluetooth Mesh network for example, smart lamps leave the Bluetooth Mesh network when the power is turned off, and smart lamps When the power is turned on, it returns to the Bluetooth Mesh network
  • the embodiment of the present application provides an improved message sending solution, so that the source node device that sends the message can adaptively and dynamically adjust the TTL of the message, so that each node device can reasonably set the message at a lower implementation cost. TTL, thereby reducing unnecessary message transmission in the Bluetooth Mesh network and improving the message transmission performance of the Bluetooth Mesh network while ensuring the success rate of message sending.
  • FIG. 3A exemplarily shows an optional flow chart of the message sending method provided by the embodiment of the present application.
  • the method flow can be implemented by a node device. Referring to FIG. 3A , the method flow can include the following steps.
  • step S310 the destination device corresponding to the message to be sent by the node device is determined.
  • the node device that executes the process shown in Figure 3A may be the source node device of the message, that is, the message starts to be sent from the source node device. Based on this, the node device can determine the destination device corresponding to the message to be sent.
  • the destination device of the message can be any one of the Bluetooth Mesh gateway and the terminal device, such as the Bluetooth Mesh gateway or the terminal device. In some embodiments, the node device may determine the destination address of the message, thereby indicating the destination device with the destination address of the message.
  • the destination address of the message may be the unicast address of the Bluetooth Mesh gateway; the unicast address of the Bluetooth Mesh gateway may be carried when the Bluetooth Mesh gateway delivers a control message to the node device. Therefore, when the node device responds to control and replies with a message to the Bluetooth Mesh gateway, it can use the unicast address when the Bluetooth Mesh gateway delivers the control message as the destination address. For another example, when the node device sends a message to the terminal device, the destination address of the message may be the address of the terminal device.
  • step S311 at least the message hop count corresponding to the destination device and the node device is queried in the pre-maintained message hop count table.
  • the message hop count table records at least the message hop count between the broadcast message of the destination device and the node device.
  • the node device in the Bluetooth Mesh network can set and maintain a message hop table, which can be used at least to record the message hop number between the broadcast message of the destination device and the node device.
  • a message hop table which can be used at least to record the message hop number between the broadcast message of the destination device and the node device.
  • the destination device is a Bluetooth Mesh gateway
  • the Bluetooth Mesh gateway can broadcast messages in the Bluetooth Mesh network
  • the number of message hops between the broadcast message of the Bluetooth Mesh gateway and the node device can be regarded as the Bluetooth Mesh gateway.
  • the message hop count between the Mesh gateway and the node device accordingly, when the destination device is a Bluetooth Mesh gateway, the message hop count table provided by the node in some embodiments can record the message hop count between the Bluetooth Mesh gateway and the node device. Message hop count.
  • the terminal device needs to pass The agent node device sends a broadcast message, that is, the broadcast message of the terminal device is sent by the agent node device of the terminal device. Therefore, the number of message hops between the broadcast message of the terminal device and the node device can be regarded as the link between the agent node device of the terminal device and the node device.
  • the message hop count between node devices correspondingly, when the destination device is a terminal device, the message hop count table of the node device can record the message hop count between the terminal device's agent node device and the node device.
  • the message hop count table may also record the source address corresponding to the broadcast message of the destination device.
  • the source address corresponding to the broadcast message can be the address of the Bluetooth Mesh gateway (such as the unicast address of the Bluetooth Mesh gateway). address); therefore, when the destination device is a Bluetooth Mesh gateway, the message hop count table of the node device can record the unicast address of the Bluetooth Mesh gateway and the message hop count between the Bluetooth Mesh gateway and the node device.
  • the destination device when the destination device is a terminal device, since the terminal device sends a broadcast message through the proxy node device, the source address of the broadcast message may be the unicast address of the proxy node device; thus, when the destination device is the terminal device In the case of a device, the message hop count table of the node device can record the unicast address of the proxy node device of the terminal device and the message hop count between the proxy node device and the node device.
  • the implementation of the present application can determine the source address of the broadcast message of the destination device, thereby determining whether there is a record corresponding to the source address in the message hop table of the node device, so that the corresponding source address exists in the message hop table of the node device.
  • the number of message hops corresponding to the destination device and the node device that is, the number of message hops between the broadcast message of the destination device and the node device.
  • the unicast address of the Bluetooth Mesh gateway and the number of message hops between the Bluetooth Mesh gateway and the node device are recorded in the message hop table.
  • the message hop count table referred to in the embodiment of this application may also be called a gateway table.
  • the broadcast message of the destination device can be periodically broadcast in the Bluetooth Mesh network in the order of decreasing TTL, and the TTL of the next broadcast message is sequentially decreasing compared to the TTL of the previous broadcast message; Therefore, if the node device is within the TTL range of multiple broadcast messages, the node device can receive multiple broadcast messages from the destination device, and then the node device can update the destination in the message hop table with the TTL of the next received broadcast message.
  • the number of message hops between the device's broadcast message and the node device ensures that the message hop number between the destination device's broadcast message and the node device is accurately set.
  • the following article uses the Bluetooth Mesh gateway broadcast message and the terminal device's agent node device broadcast message as examples to describe the recording and update of the message hop count in the message hop count table, which will not be expanded here.
  • step S312 according to the message hop number, a TTL with a set redundancy compared with the message hop number is determined.
  • step S313 the message is sent in the Bluetooth Mesh network according to the determined TTL; where the message is forwarded once in the Bluetooth Mesh network, the TTL of the message is decremented once, and when the TTL of the message is less than the set first value, Messages stopped being forwarded in the Bluetooth Mesh network.
  • the node device After the node device determines the message hop number corresponding to the destination device and the node device from the message hop number table, the node device can increase the set redundancy based on the message hop number, thereby determining the message hop number.
  • the degree of TTL makes the TTL of the message when it is sent have a certain degree of redundancy compared with the message hop number corresponding to the destination device and the node device, thereby assisting the message to be forwarded with certain redundancy in the Bluetooth Mesh network and improving the efficiency of the node device.
  • the TTL of the message is decremented once (for example, the TTL of the message is decremented by 1).
  • the TTL of the message is less than the set value
  • the message stops being forwarded in the Bluetooth Mesh network, so that the message can successfully reach the destination device under certain redundant forwarding.
  • the embodiment of this application introduces certain redundant forwarding when sending messages, which will not cause too many unnecessary transmissions of messages in the Bluetooth Mesh network, but can reduce unnecessary transmission while ensuring the success rate of message sending. Message transmission improves the message transmission performance of Bluetooth Mesh network.
  • the embodiment of the present application can set the first setting redundancy, so that the node device determines the distance between the Bluetooth Mesh gateway and the node device from the message hop table.
  • the TTL with the first set redundancy compared to the message hop count can be determined (for example, the TTL is the message hop count plus the first set redundancy), so that according to the TTL, Send messages in a Bluetooth Mesh network.
  • the node device can use the unicast address of the Bluetooth Mesh gateway as the destination address, and send the message in the Bluetooth Mesh network according to the determined TTL.
  • the embodiment of the present application when the node device sends a message to the terminal device, the embodiment of the present application can set a second set redundancy. Since the node device and the terminal device communicate through the proxy node device, the message determined by the node device When the number of hops is the number of message hops between the agent node device and the node device, the second set redundancy set by the embodiment of the present application should be greater than the first set redundancy (for example, the second set redundancy Add 1 to the first set redundancy to cover the one-hop distance between the agent node device and the terminal device).
  • the node device determines the message hop number between the agent node device and the node device from the message hop number table, it can determine the TTL with the second set redundancy compared with the message hop number (for example, the TTL is The message hop count plus the second set redundancy), thereby sending the message in the Bluetooth Mesh network according to the TTL. Further, the node device can use the address of the terminal device as the destination address, and send the message in the Bluetooth Mesh network according to the determined TTL.
  • the number of Bluetooth Mesh gateways and proxy node devices in a Bluetooth Mesh network is generally less than the total number of node devices.
  • the total number of Bluetooth Mesh gateway and proxy node devices may be less than 10; Therefore, in a large-scale Bluetooth Mesh network, although each node device needs to set up and maintain a message hop table, compared with the way each node device maintains a neighbor list, the embodiment of the present application can greatly reduce the number of node device maintenance messages. The storage resource consumption required by the hop table.
  • the embodiment of the present application can determine the TTL of the message at the source node device that sends the message when the node device sends a message to a destination device such as a Bluetooth Mesh gateway or terminal device, and the TTL of the message is based on the broadcast message of the destination device and the node device.
  • the number of message hops between messages and the set redundancy are determined. Therefore, the implementation method of this application can reasonably set the TTL required for the necessary transmission of messages, thereby reducing the network load of message transmission in the Bluetooth Mesh network and improving the performance of the Bluetooth Mesh network. Message delivery performance.
  • the solution provided by the embodiment of the present application does not require statistics and maintenance of links of node devices.
  • Any node device and Bluetooth Mesh gateway can leave and join the Bluetooth Mesh network at any time, and any node device can communicate with the agent node device at any time. Switch roles between ordinary node devices. Therefore, the implementation method of this application can flexibly adapt to the network topology adjustment of the Bluetooth Mesh network at a low implementation cost, thereby reasonably setting the TTL of the message and reducing the network cost of message transmission in the Bluetooth Mesh network. load to improve the message transmission performance of the Bluetooth Mesh network.
  • the node device can set and maintain a message hop table.
  • the message hop table can at least record the message hop number between the broadcast message of the destination device and the node device; thus the node device can When sending a message, the node device, as the source node device that sends the message, can determine the destination device of the message, and query at least the message hop number corresponding to the destination device and the node device from the message hop count table; furthermore, the node device can determine the message hop number based on the message hop count. number, determine the TTL with set redundancy compared with the message hop number; send the message in the Bluetooth Mesh network based on the determined TTL.
  • the message When a message is sent in the Bluetooth Mesh network, the message is forwarded once in the Bluetooth Mesh network, and the TTL of the message is decremented once. When the TTL of the message is less than the set first value, the message stops being forwarded in the Bluetooth Mesh network. So that the message reaches the destination device of the message after being forwarded corresponding times with the above TTL.
  • the node device can set and maintain the message hop table, and the message hop table records the broadcast message of the destination device of the node device, relative to the message hop number of the node device; since the node The destination device of the device may be a Bluetooth Mesh gateway or a terminal device (the terminal device sends a broadcast message from the proxy node device), and the number of Bluetooth Mesh gateways and proxy node devices in the Bluetooth Mesh network is generally less than the total number of node devices, so the node device maintenance The amount of data required for the message hop table is relatively low; at the same time, the implementation of the present application can determine the TTL of the message at the source node device that sends the message when the node device sends a message to a destination device such as a Bluetooth Mesh gateway or terminal device, and the message The TTL is determined based on the number of message hops between the broadcast message of the destination device and the node device, as well as the set redundancy.
  • the implementation of this application can reasonably set the TTL required for the necessary transmission of the message, thereby reducing the number of messages in the Bluetooth Mesh.
  • the network load transmitted in the network improves the message transmission performance of the Bluetooth Mesh network.
  • the embodiment of the present application can dynamically optimize the TTL used to indicate the message forwarding hop count based on the message hop count table of the node device when the node device sends a message to the destination device, thereby reducing the number of messages while ensuring the success rate of message sending. Eliminate unnecessary message transmission and improve the message transmission performance of Bluetooth Mesh network.
  • FIG. 3B schematically illustrates another possible method of sending a message provided by an embodiment of the present application. Select the flow chart. The method flow can be implemented by the broadcast device that sends the broadcast message. Referring to Figure 3B, the method flow can include the following steps.
  • step S320 messages are periodically broadcast in the Bluetooth Mesh network in the order of decreasing TTL, so that the node device that receives the broadcast message records at least the broadcast message and the node in the message hop table according to the TTL in the broadcast message.
  • the broadcast device that sends the broadcast message can determine the current TTL of the broadcast message, and the current TTL is sequentially decreasing compared to the TTL of the last broadcast message; thus, the broadcast device can send messages to nodes within the hop range of the current TTL.
  • the device broadcasts the message so that the node device within the hop count range of the current TTL updates at least the message hop count between the broadcast message and the node device in the message hop count table according to the received broadcast message; wherein the updated message hop count is based on The current TTL of the broadcast message is determined.
  • node devices within the hop count range of the current TTL can also record the source address of the broadcast message in the message hop count table (such as the unicast address of the Bluetooth Mesh gateway, or the unicast address of the proxy node device of the terminal device) .
  • step S321 obtain the message sent by the node device; when the message is sent from the node device, the message hop number corresponding to the destination device and the node device is queried in the message hop count table of the node device, and the redundancy is set Determine the TTL; and the message is forwarded once in the Bluetooth Mesh network, the TTL of the message is decremented once. When the TTL of the message When it is less than the set first value, the message stops being forwarded in the Bluetooth Mesh network.
  • the following takes the message transmission between the node device and the Bluetooth Mesh gateway and the message transmission between the node device and the terminal device as examples to introduce the solution provided by the implementation mode of this application.
  • the implementation of the node device sending messages to the Bluetooth Mesh gateway described below can be considered as an optional implementation method for the node device to send messages to the destination device; the implementation method of the node device sending messages to the terminal device described below can be considered as a node device.
  • the node device can transmit messages with the Bluetooth Mesh gateway.
  • each node device in the Bluetooth Mesh network can set a gateway table (the gateway table can be considered as an example of an implementation of the message hop count table.
  • the gateway table described below can also be replaced by the message hop count table. Table), used to record the unicast address of the Bluetooth Mesh gateway and the number of message hops between the node device and the Bluetooth Mesh gateway.
  • the number of message hops between the node device and the Bluetooth Mesh gateway can be regarded as the number of message hops between the node device and the Bluetooth Mesh gateway.
  • the Bluetooth Mesh gateway can periodically send messages to the Bluetooth Mesh gateway in the order of decreasing TTL (for example, in the order of decreasing TTL from high to low).
  • the node device in the network sends a message to notify the node device of the existence of the Bluetooth Mesh gateway; when the Bluetooth Mesh gateway periodically broadcasts messages in the order of decreasing TTL, the node device that can receive the message can broadcast the message according to the request each time.
  • Receive the TTL of the message and update the message hop count with the Bluetooth Mesh gateway to accurately set the message hop count between the node device and the Bluetooth Mesh gateway.
  • FIG. 4A exemplarily shows an optional method flow chart for setting a gateway table in an embodiment of the present application. As shown in FIG. 4A , the method flow may include the following steps.
  • step S410 the Bluetooth Mesh gateway determines the current TTL of the broadcast message, and the current TTL is sequentially decreased compared to the TTL of the last broadcast message of the Bluetooth Mesh gateway.
  • Each Bluetooth Mesh gateway can periodically broadcast messages in the Bluetooth Mesh network in the order of decreasing TTL.
  • the TTL of the next message broadcast by the Bluetooth Mesh gateway in the Bluetooth Mesh network can be smaller than the TTL of the last broadcast message; for example, the TTL of the next broadcast message of the Bluetooth Mesh gateway, Decrease the TTL of the last broadcast message by one. Therefore, when the Bluetooth Mesh gateway currently broadcasts a message in the Bluetooth Mesh network, the Bluetooth Mesh gateway can determine the current TTL of the broadcast message, and the current TTL is sequentially decreased compared to the TTL of the last broadcast message of the Bluetooth Mesh gateway.
  • step S411 the Bluetooth Mesh gateway broadcasts a message to node devices within the hop range of the current TTL; the broadcast message of the Bluetooth Mesh gateway includes the unicast address of the Bluetooth Mesh gateway and the current TTL.
  • the Bluetooth Mesh gateway is based on the current TTL.
  • the node device within the hop range of the current TTL with the Bluetooth Mesh gateway can receive the broadcast message of the Bluetooth Mesh gateway; while the distance from the Bluetooth Mesh gateway exceeds The current TTL node device cannot receive the broadcast message of the Bluetooth Mesh gateway. For example, if the current TTL of the broadcast message is 3, then the node device within 3 hops of the Bluetooth Mesh gateway can receive the broadcast message of the Bluetooth Mesh gateway; while the node device that is more than 3 hops away from the Bluetooth Mesh gateway cannot receive it. Broadcast message to Bluetooth Mesh gateway.
  • the broadcast message of the Bluetooth Mesh gateway may include at least the unicast address and current TTL of the Bluetooth Mesh gateway.
  • step S412 the node device within the hop count range of the current TTL records the unicast address of the Bluetooth Mesh gateway in the gateway table and updates the message with the Bluetooth Mesh gateway based on the received broadcast message of the Bluetooth Mesh gateway.
  • message hop count; the updated message hop count is determined based on the current TTL of the currently received broadcast message.
  • step S413 the Bluetooth Mesh gateway performs the next broadcast message and returns to step S410.
  • Each Bluetooth Mesh gateway in the Bluetooth Mesh network periodically broadcasts messages in the above manner, and the TTL of the broadcast messages decreases gradually. Then the node device in the Bluetooth Mesh network can record the unicast of each Bluetooth Mesh gateway in the gateway table. address, and the number of message hops from each Bluetooth Mesh gateway.
  • the node devices that can receive the broadcast message are constantly adjusted and changed each time. In other words, every time the Bluetooth Mesh gateway broadcasts a message, only node devices within the hop range of the TTL of the broadcast message can receive the broadcast message.
  • the TTL of the last broadcast message of the Bluetooth Mesh gateway is 3, then the node device within 3 hops of the Bluetooth Mesh gateway can receive the last broadcast message of the Bluetooth Mesh gateway; the TTL of the broadcast message based on the Bluetooth Mesh gateway needs to be The order decreases, so when the Bluetooth Mesh gateway broadcasts a message next time, the TTL of the next broadcast message is 2, so the node device within 2 hops of the Bluetooth Mesh gateway can receive the next broadcast message of the Bluetooth Mesh gateway, and Node devices that are more than 2 hops away from the Bluetooth Mesh gateway (including node devices that were able to receive broadcast messages last time and are 3 hops away from the Bluetooth Mesh gateway) cannot receive broadcast messages from the Bluetooth Mesh gateway.
  • the node device can adjust the content recorded in the gateway table according to each received broadcast message of the Bluetooth Mesh gateway; for example, the node device updates the content recorded in the gateway table according to the current TTL in the currently received broadcast message of the Bluetooth Mesh gateway.
  • the message hop count with the Bluetooth Mesh gateway has been recorded in the gateway table, thereby accurately setting the message hop count between the node device and the Bluetooth Mesh gateway.
  • the maximum TTL of the Bluetooth Mesh gateway's periodic broadcast messages may correspond to the farthest number of hops from the node device to the Bluetooth Mesh gateway; thus, the Bluetooth Mesh gateway may start from the maximum TTL and gradually decrease the TTL to achieve Periodically broadcast messages in the Bluetooth Mesh network.
  • FIG 4B illustrates an example diagram of periodic broadcast messages.
  • node devices N1, N2 and N3 are 1 hop away from the Bluetooth Mesh gateway G
  • node devices N4, N5 and N6 are 1 hop away from the Bluetooth Mesh gateway G.
  • the Bluetooth Mesh gateway G is 2 hops away, and the node devices N7, N8, and N9 are 3 hops away from the Bluetooth Mesh gateway G. Therefore, in this example, the farthest number of hops between the node device and the Bluetooth Mesh gateway G is 3 hops. Therefore, the Bluetooth Mesh gateway G can set the maximum TTL to 3, and gradually decrease the TTL to periodically broadcast messages in the Bluetooth Mesh network;
  • the Bluetooth Mesh gateway G broadcasts a message within 3 hops for the first time with a TTL of 3; thus, node devices N1 to N9 within 3 hops of the Bluetooth Mesh gateway G can all receive Bluetooth messages. Broadcast message of Mesh gateway G; based on the unicast address and TTL in the broadcast message, node devices N1 to N9 can record the unicast address of Bluetooth Mesh gateway G in their respective gateway tables, and the message hop count with the Bluetooth Mesh gateway is 3;
  • Bluetooth Mesh gateway G When Bluetooth Mesh gateway G broadcasts a message for the second time, it can decrement the TTL to 2, so that the TTL is 2 and broadcast the message within 2 hops; at this time, the node device N1 within 2 hops away from Bluetooth Mesh gateway G to N6, the message broadcast by Bluetooth Mesh gateway G can be received; while the node devices N7 to N9 that are 3 hops away from Bluetooth Mesh gateway G cannot receive the broadcast message of Bluetooth Mesh gateway G; based on the unicast address in the current broadcast message and TTL (TTL is 2 at this time), node devices N1 to N6 can query the records corresponding to the unicast address of Bluetooth Mesh gateway G in their respective gateway tables, thereby updating the message hop count with Bluetooth Mesh gateway G to 2 ;
  • Bluetooth Mesh gateway G When Bluetooth Mesh gateway G broadcasts a message for the third time, it can decrement the TTL to 1, so that the TTL is 1 and broadcast the message within 1 hop. At this time, the node device N1 within 1 hop away from Bluetooth Mesh gateway G to N3, available The message broadcast by Bluetooth Mesh gateway G is received; the node devices N4 to N6 that are 2 hops away from Bluetooth Mesh gateway G, and the node devices N7 to N9 that are 3 hops away from Bluetooth Mesh gateway G are unable to receive the Bluetooth Mesh gateway G.
  • node devices N1 to N3 can query the records corresponding to the unicast address of Bluetooth Mesh gateway G in their respective gateway tables, thus Update the message hop count with Bluetooth Mesh gateway G to 1.
  • the TTL in the next broadcast message received can overwrite the TTL in the last received broadcast message to achieve the update and update in the gateway table.
  • the message hop count of the Bluetooth Mesh gateway ensures that the node device can accurately set the message hop count with the Bluetooth Mesh gateway.
  • the above describes the possible ways for a node device to set the message hop count with the Bluetooth Mesh gateway through the gateway table.
  • the node device can query the gateway table, and query the message hop count between the node device and the Bluetooth Mesh gateway from the gateway table; and then determine the message hop count based on the message hop count.
  • the number is compared to the TTL with the first set redundancy; therefore, the node device can send a message in the Bluetooth Mesh network according to the TTL, so that the node device can send a message to the Bluetooth Mesh gateway.
  • the TTL of the message is set to have a first set redundancy with the message hop count of the Bluetooth Mesh gateway, so that the message hop count between the node device and the Bluetooth Mesh gateway can be On the basis of, by first setting the redundancy, it assists the message forwarding in the Bluetooth Mesh network, thereby improving the success rate and anti-interference ability of the messages sent by the node device to reach the Bluetooth Mesh gateway.
  • the first set redundancy can be a preset redundancy value, which can be determined according to the actual situation; in some implementations, the implementation of the present application can set the first set redundancy to 1 , for example, when the node device sends a message to the Bluetooth Mesh gateway, the TTL of the message is 1 larger than the hop number of the message between the node device and the Bluetooth Mesh gateway.
  • Figure 4C further illustrates an example diagram of TTL settings when the node device sends a message.
  • the message hop counts between node devices N1, N2, and N3 and Bluetooth Mesh gateway G are all 1 (node devices N1, N2, and N3 can determine the message hop counts with Bluetooth Mesh gateway G by querying the gateway table) , then when the node devices N1, N2 and N3 send messages to the Bluetooth Mesh gateway G, based on the first setting redundancy is set to 1, the node devices N1, N2 and N3 can set the TTL of the message to 2; thus the node device N1 , N2 and N3 respectively send messages with a TTL of 2 to further assist the message through the first set redundancy of 1 hop on the basis of the hop count of 1 message between the node devices N1, N2 and N3 and the Bluetooth Mesh gateway. Forwarding in the Bluetooth Mesh network improves the success rate and anti-interference ability of messages reaching Bluetooth Mesh gateway G.
  • the number of message hops between the node devices N4, N5 and N6 and the Bluetooth Mesh gateway G is all 2.
  • the redundancy is set to 1 based on the first setting.
  • the node devices N4, N5 and N6 can set the TTL of the message to 3; thus the node devices N4, N5 and N6 respectively send messages with a TTL of 3.
  • the message hop counts between node devices N7, N8 and N9 and Bluetooth Mesh gateway G are all 3.
  • node devices N7, N8 and N9 send messages to Bluetooth Mesh gateway G, based on the first setting redundancy is set to 1,
  • the node devices N7, N8 and N9 can set the TTL of the message to 4; thus the node devices N7, N8 and N9 respectively send messages with a TTL of 4.
  • the embodiment of the present application can set the TTL of the message sent by the node device to the Bluetooth Mesh gateway based on the first set redundancy. Further increase the setting value (for example, the setting value is 1), so that the message sent by the node device farthest from the Bluetooth Mesh gateway can be forwarded more times in the Bluetooth Mesh network, thereby improving the message reaching the Bluetooth Mesh
  • the success rate and anti-interference ability of the gateway for example, based on the example in Figure 4C, based on the message hop count of node devices N7, N8 and N9 and Bluetooth Mesh gateway G is 3 (the farthest message hop count in the example), this application
  • the setting value can be further increased to obtain the TTL of messages sent by node devices N7, N8 and N9; for example, the TTL of messages sent by node devices N7, N8 and N9 can be set is 5;
  • node device N1 and node device N2 can send messages to Bluetooth Mesh gateway G through one hop distance, and the first setting redundancy is set to 1, then when node device N1 uses a TTL of 2 to send a message, Bluetooth Mesh gateway G can receive messages from node device N1, and node device N2 can also receive messages from node device N1; when node device N2 receives the message from node device N1, it is found that the TTL of the message from node device N1 is 2, then The node device N2 can decrement the TTL of the message (for example, the node device N2 can decrement the TTL of the message of the node device N1 to 1), and then forward the message of the node device N1 again; at this time, the Bluetooth Mesh gateway G can receive the node device The message of the node device N1 forwarded by N2 can ensure that when the Bluetooth Mesh
  • the first setting redundancy is added to set the TTL of the message.
  • the redundancy of message forwarding in the Bluetooth Mesh network is increased, the Under the mechanism that the TTL of a message is decremented every time it is forwarded, by reasonably setting the value of the first set redundancy, it is possible to improve the message sending success rate and ensure that the forwarding of the message in the Bluetooth Mesh network will not introduce Excessive redundancy.
  • the node device can reply a message to the Bluetooth Mesh gateway after receiving the control message of the Bluetooth Mesh gateway and performing response control; in this case, Figure 4D exemplarily shows the control message provided by the embodiment of the present application.
  • Figure 4D exemplarily shows the control message provided by the embodiment of the present application.
  • the method process can be implemented by the node device, as shown in Figure 4D.
  • the method process can include the following steps.
  • step S420 the unicast address used by the control message delivered by the Bluetooth Mesh gateway is determined.
  • step S421 according to the unicast address, query whether there is a corresponding record of the Bluetooth Mesh gateway in the gateway table. If yes, execute step S422. If not, execute step S424.
  • step S422 the message hop count recorded in the gateway table and the Bluetooth Mesh gateway is determined, and the TTL of the message sent by the node device is determined based on the message hop count and the first set redundancy.
  • step S421 If the judgment result of step S421 is yes, it means that the unicast address of the Bluetooth Mesh gateway is hit in the gateway table, that is, the gateway table of the node device records the unicast address of the Bluetooth Mesh gateway and the number of message hops away from the Bluetooth Mesh gateway, thus The node device can determine the TTL of the message sent by the node device to the Bluetooth Mesh gateway based on the message hop count and the first set redundancy.
  • step S423 the unicast address is used as the destination address, and the message is sent in the Bluetooth Mesh network according to the determined TTL.
  • the node device determines whether to send the After sending the TTL of the message, the unicast address of the Bluetooth Mesh gateway can be used as the destination address of the message, so that the message can be sent in the Bluetooth Mesh network based on the determined TTL of the message.
  • step S424 determine the multicast address of the Bluetooth Mesh gateway in the Bluetooth Mesh network; and query the most recent message hop count of the Bluetooth Mesh gateway closest to the node device from the gateway table, and based on the most recent message hop count and the first setting Determine the redundancy and determine the TTL of messages sent by the node device.
  • step S421 If the judgment result of step S421 is no, it means that the unicast address of the Bluetooth Mesh gateway is not hit in the gateway table, that is, the gateway table of the node device does not record the unicast address of the Bluetooth Mesh gateway and the number of message hops away from the Bluetooth Mesh gateway. ; At this time, the node device can send a message to the Bluetooth Mesh gateway in the Bluetooth Mesh network through multicast mode, and set the message TTL based on the Bluetooth Mesh gateway closest to the node device; thus, the node device can determine the Bluetooth Mesh gateway.
  • the multicast address of the Bluetooth Mesh gateway in the network (such as the multicast address of all Bluetooth Mesh gateways in the Bluetooth Mesh network), and query the nearest message hop count of the nearest Bluetooth Mesh gateway from the gateway table, so as to calculate the number of hops based on the latest message hop count. and the first set redundancy to determine the TTL of the message sent by the node device.
  • step S425 the multicast address is used as the destination address, and the message is sent in the Bluetooth Mesh network according to the determined TTL.
  • the multicast address of the Bluetooth Mesh gateway is a special address.
  • all Bluetooth Mesh gateways in the Bluetooth Mesh network can receive and process messages by default.
  • the node device determines the TTL of the message based on the nearest message hop count to the nearest Bluetooth Mesh gateway, so that the message sent by the node device can at least reach the nearest Bluetooth Mesh gateway, or any Bluetooth Mesh within the TTL range of the message. Gateway, so that the Bluetooth Mesh gateway that receives the message uploads the message to the cloud.
  • the node device when the node device involves sending messages to multiple Bluetooth Mesh gateways, in the case where the node device records the unicast addresses and distance message hops of the multiple Bluetooth Mesh gateways through the gateway table, the node device The implementation method of each Bluetooth Mesh gateway sending messages can be similarly described above.
  • FIG. 5 exemplarily shows an example diagram of a node device and multiple Bluetooth Mesh gateways.
  • the Bluetooth Mesh gateways G1 and G2 can be respectively In the order of TTL decreasing from 3 to 1, messages are periodically broadcast in the Bluetooth Mesh network; since node devices N1 to N3 are within 1 hop range of Bluetooth Mesh gateway G1 and within 3 hop range of Bluetooth Mesh gateway G2, thus Node devices N1, N2 and N3 are based on messages periodically broadcast by Bluetooth Mesh gateways G1 and G2. They can record the unicast address of Bluetooth Mesh gateway G1 and the number of message hops per hop in the gateway table, and the unicast of Bluetooth Mesh gateway G2.
  • the node devices N4 to N6 are within the 2-hop range of the Bluetooth Mesh gateway G1 and within the 2-hop range of the Bluetooth Mesh gateway G2, the node devices N4, N5 and N6 are based on the Bluetooth Mesh gateway G1 and G2 periodically broadcast messages, the unicast address and the message hop count of 2 hops of Bluetooth Mesh gateway G1, the unicast address of Bluetooth Mesh gateway G2 and the message hop count of 2 hops can be recorded in the gateway table respectively; due to the node equipment N7 to N9 are within the 3-hop range of the Bluetooth Mesh gateway G1 and within the 1-hop range of the Bluetooth Mesh gateway G2.
  • the node devices N7, N8 and N9 can be broadcast at the gateway respectively based on the messages periodically broadcast by the Bluetooth Mesh gateways G1 and G2.
  • the table records the unicast address and message hop count of 3 hops of Bluetooth Mesh gateway G1, and the unicast address and message hop count of 1 hop of Bluetooth Mesh gateway G2.
  • the unicast address the message hop number with TTL of 1 hop combined with the first set redundancy (for example, the TTL of the message is 2); when the node device N1 sends a message to the Bluetooth Mesh gateway G2, the destination address of the message is Bluetooth Mesh
  • the TTL example is 2; when node devices N2 to N9 send messages to Bluetooth Mesh gateway G1 and Bluetooth Mesh gateway G2 respectively, the settings of the destination address and TTL can be done in the same way, and will not be repeated here. Expand.
  • the destination address of the message sent by the node device can be the multicast address of the Bluetooth Mesh gateway in the Bluetooth Mesh network.
  • the TTL of the message may be the message hop count of the Bluetooth Mesh gateway closest to the node device combined with the first set redundancy; for example, when the node device N1 sends a message to the Bluetooth Mesh gateway G1 and the Bluetooth Mesh gateway G2, the Bluetooth Mesh gateway G1 and the Bluetooth Mesh gateway G2
  • the unicast address of the Bluetooth Mesh gateway G2 is not matched in the gateway table of the node device N1, then the destination address of the message sent by the node device N1 is the multicast address of the Bluetooth Mesh gateway in the Bluetooth Mesh network, and the TTL of the message can be 2 (for example The message sent by the node device N1 needs to reach at least the Bluetooth Mesh gateway G1).
  • the node device can transmit messages with terminal devices such as smartphones.
  • the node device can communicate with the terminal device through the proxy node device.
  • messages sent by the node device can be relayed and forwarded in the Bluetooth Mesh network.
  • the agent node device reaches the agent node device, and then the agent node device sends the message to the terminal device.
  • the embodiment of the present application can periodically broadcast messages from each proxy node device of the terminal device to the node device in the Bluetooth Mesh network to notify the node device in the Bluetooth Mesh network of the existence of the proxy node device; and , when each agent node device periodically broadcasts a message, the TTL of the message decreases gradually; thus, the node device in the Bluetooth Mesh network can record the unicast address of each agent node device in the gateway table, as well as the distance between each agent node device. Message hop count.
  • the way in which the node device sets the record of the proxy node device in the gateway table can be implemented in the same way as the way in which the record of the Bluetooth Mesh gateway is set in the gateway table.
  • the agent node device is responsible for forwarding the messages sent by the node device in the Bluetooth Mesh network to terminal devices such as smartphones, and the terminal device can also synchronize the messages sent by the node device to the cloud, so the agent node device and the terminal device Functions that can be combined to form a Bluetooth Mesh gateway.
  • the proxy node device may determine the current TTL of the broadcast message, and the current TTL is sequentially decreasing compared to the TTL of the last broadcast message of the proxy node device. Therefore, the proxy node device can broadcast a message to the node device within the hop count range of the current TTL; the broadcast message of the proxy node device includes the unicast address of the proxy node device and the current TTL. Furthermore, the node device within the hop count range of the current TTL can record the unicast address of the proxy node device in the gateway table and update the message hop count with the proxy node device based on the received broadcast message; the updated message hop count is based on The current TTL of the currently received broadcast message is determined.
  • Each agent node device of the terminal device periodically broadcasts messages in the above manner, and the TTL of the broadcast message decreases gradually. Then the node device in the Bluetooth Mesh network can record the unicast address of each agent node device in the gateway table. and the number of message hops from each agent node device.
  • the proxy node device after establishing a proxy connection with the terminal device, can start to periodically send messages in the Bluetooth Mesh network in the order of decreasing TTL (for example, in the order of decreasing TTL from high to low). , and the message includes at least the unicast address of the proxy node device and the current TTL. Therefore, after receiving the message sent by the proxy node device, the node device in the Bluetooth Mesh network can record the unicast address of the node device in the gateway table, and record the unicast address of the node device in the gateway table according to the current TTL of the message broadcast by the proxy node device. Or update the number of message hops away from the agent node device.
  • the node device when the node device receives broadcast messages from the same agent node device multiple times, the next time The TTL of the received broadcast message can overwrite the TTL of the last received broadcast message to update the message hop count with the agent node device in the gateway table.
  • Figure 6A schematically shows an example diagram in which a node device sends a message to a terminal device.
  • the node devices N3, N6 and N9 It can be used as a proxy node device of the terminal device, and the node device N3 is defined as the proxy node device P1, the node device N6 is defined as the proxy node device P2, and the node device N9 is defined as the proxy node device P3; then the node devices N2, N5 and N8 are related to the agent
  • the distance between node devices P1, P2 and P3 is 1 hop, and the distance between node devices N1, N4 and N7 and the agent node devices P1, P2 and P3 is 2 hops.
  • the maximum TTL of the periodic broadcast message of the agent node device can correspond to the farthest number of hops from the node device to the agent node device; thus, the agent node device can start from the maximum TTL and gradually decrease the TTL to achieve Periodically broadcast messages in the Bluetooth Mesh network.
  • the proxy node devices P1, P2 and P3 can respectively start from the TTL of 2 and gradually decrease the TTL, thereby broadcasting messages in the Bluetooth Mesh network.
  • the proxy node devices P1, P2, and P3 can first broadcast messages in the Bluetooth Mesh network with a TTL of 2, so that the node devices N2, N5, and N8 within the 1-hop range, and the node devices N1, N5, and N8 within the 2-hop range.
  • Both N4 and N7 can receive the broadcast message of the agent node device; then the node devices N2, N5 and N8 can record the unicast addresses of the agent node devices P1, P2 and P3 in the gateway table respectively, as well as the hop count of 2 messages.
  • Devices N1, N4 and N7 can respectively record the unicast addresses of proxy node devices P1, P2 and P3 and the hop count of 2 messages in the gateway table.
  • agent node devices P1, P2 and P3 broadcast a message next time, they can set the TTL to 1, so that the node devices N2, N5 and N8 within 1 hop can receive the broadcast message of the agent node device, while the nodes 2 hops away Devices N1, N4, and N7 cannot receive broadcast messages from the agent node device; furthermore, node devices N2, N5, and N8 can respectively query the records of the agent node devices P1, P2, and P3 in the gateway table, thereby connecting them with the agent node device.
  • the message hop counts of P1, P2, and P3 are updated to 1.
  • the node device in the Bluetooth Mesh network when the node device in the Bluetooth Mesh network sends a message to the terminal device, the node device can determine the message hop number corresponding to the proxy node device of the terminal device from the gateway table, and thereby determine the hop number corresponding to the message based on the message hop number. The number is compared to the TTL with the second set redundancy; then the node device can send a message in the Bluetooth Mesh network according to the TTL, so that the message sent by the node device can reach the terminal device.
  • the second setting redundancy may be greater than the first setting redundancy described above (the first setting redundancy is the setting corresponding to the TTL of the message when the destination device is a Bluetooth Mesh gateway. Redundancy), for example, the second set redundancy is the first set redundancy plus 1.
  • node devices N2, N5 and N8 need to communicate with the terminal device through proxy node devices P1, P2 and P3; and node devices N2, N5 and N8 are located at 1 of the proxy node devices P1, P2 and P3.
  • the node devices N2, N5, and N8 can record in the gateway table that the number of message hops away from the agent node devices P1, P2, and P3 is 1; thus, the node devices N2, N5, and N8 when sending messages to the terminal device , the node devices N2, N5 and N8 can query the message hop count (for example, 1) away from the proxy node devices P1, P2 and P3 of the terminal device from the gateway table, and then add a second setting based on the message hop count. Redundancy, obtain the TTL when node devices N2, N5, and N8 send messages.
  • the message hop count for example, 1
  • the second set redundancy can be the first set redundancy plus 1, for example, the second set redundancy is 2, so that the node device N2 , N5 and N8 determine that the message hop count with agent node devices P1, P2 and P3 is 1, it can be determined that the TTL of messages sent by node devices N2, N5 and N8 is 3; thus node devices N2, N5 and N8 use TTL as 3 Send a message.
  • the embodiment of the present application further increases the second set redundancy on the basis of the message hop count between the node device and the proxy node device, and the second set redundancy is greater than the first set redundancy. , because there is still one hop transmission distance between the proxy node device and the terminal device, so the TTL of the node device when sending a message to the terminal device should be at least 1 larger than the TTL when sending a message to the Bluetooth Mesh gateway.
  • the node devices N1, N4 and N7 are 2 hops away from the agent node devices P1, P2 and P3. Then the node devices N1, N4 and N7 can be recorded in the gateway table as being the same as the agent node devices P1, P2 and P3. The number of message hops apart is 2; therefore, when the node devices N1, N4 and N7 send messages to the terminal device, the node devices N1, N4 and N7 can query the message hops away from the agent node devices P1, P2 and P3 from the gateway table.
  • node devices N2, N5, and N8 send messages.
  • TTL for example, 4
  • node devices N1, N4 and N7 send messages with a TTL of 4.
  • the embodiment of the present application can further adjust the TTL of the message sent by the node device to the terminal device based on the second set redundancy.
  • Increase the setting value for example, the setting value is 1), so that the message sent by the node device farthest from the proxy node device can be forwarded more times in the Bluetooth Mesh network, thereby improving the probability of the message reaching the terminal device.
  • the embodiment of the present application sets the redundancy in the second (For example, 2), the setting value (for example, 1) can be further increased to obtain the TTL of messages sent by node devices N1, N4, and N7 to the terminal device (such as the TTL of messages sent by node devices N1, N4, and N7 to the terminal device).
  • TTL is 5).
  • the node device when the node device sends a message to the terminal device, the node device may determine the unicast address of the proxy node device of the terminal device, and thereby query the record of the proxy node device from the gateway table based on the unicast address. If there is a record of the proxy node device corresponding to the unicast address in the gateway table (that is, the unicast address is hit in the gateway table), the node device can determine the number of message hops away from the proxy node device from the queried record.
  • the TTL of the message sent by the node device is determined based on the message hop count and the second set redundancy; then the node device uses the address of the terminal device as the destination address and sends the message in the Bluetooth Mesh network with the determined TTL.
  • the proxy node device of the terminal device may disconnect the proxy connection from the terminal device.
  • the proxy node device that disconnects the proxy connection may broadcast a proxy connection disconnection message in the Bluetooth Mesh network (for example, in the form Maximum TTL broadcast agent connection disconnection message); thus, the node device that receives the agent connection disconnection message can delete the record corresponding to the agent node device that disconnected the agent connection in the gateway table.
  • the proxy connection disconnection message broadcast by the proxy node device can carry the unicast address of the proxy node device, so that the node device that receives the proxy connection disconnection message can send the gateway to the gateway based on the unicast address carried in the proxy connection disconnection message.
  • the record corresponding to the thin address in the table is deleted.
  • FIG. 6B illustrates an example diagram of a proxy node device disconnecting the proxy connection.
  • the maximum TTL between the node device and the proxy node device in the Bluetooth Mesh network is 2, then after the node devices N3, N6 and N9 disconnect the agent connection, the node devices N3, N6 and N9 broadcast the agent connection disconnection message in the Bluetooth Mesh network with TTL as 2; thus the node devices N2, N5, N8, N1, N4 and N7 can delete node devices N3, N6 and N7 respectively in the gateway table.
  • the record of N9; at this time, the record of the Bluetooth Mesh gateway can exist in the gateway table of the node devices N1 to N9, so that any node device among the node devices N1 to N9 can send a message according to the unicast address of the Bluetooth Mesh gateway. and message hop count to determine the TTL when sending a message.
  • the node device can send messages to the Bluetooth Mesh gateway and the terminal device.
  • the agent of the Bluetooth Mesh gateway and the terminal device can periodically broadcast messages in the order of decreasing TTL, so that the node device records the unicast address and message hop count of the Bluetooth Mesh gateway, as well as the unicast address and message hop count of the proxy node device in the gateway table.
  • the node device when it sends a message to the Bluetooth Mesh gateway, it can determine, based on the message hop count of the Bluetooth Mesh gateway recorded in the gateway table and the first set redundancy, that the node device has the first message hop count compared to the Bluetooth Mesh gateway. Set the redundant TTL to achieve dynamic optimization of TTL when the node device sends messages to the Bluetooth Mesh gateway. It can ensure the success rate of the node device sending messages to the Bluetooth Mesh gateway under limited redundant message forwarding and reduce the Unnecessary transmission of messages improves the message transmission performance of Bluetooth Mesh network.
  • the node device may determine the TTL with the second set redundancy based on the message hop count of the proxy node device of the terminal device recorded in the gateway table and the second set redundancy. , thereby realizing dynamic optimization of TTL when the node device sends messages to the terminal device, and ensuring the success rate of the node device sending messages to the terminal device when the agent node device communicates with the node device and the terminal device, and the message is forwarded with limited redundancy. , and reduce unnecessary transmission of messages and improve the message transmission performance of Bluetooth Mesh network.
  • the implementation of the present application can dynamically optimize the TTL when the node device sends a message to the destination device (the destination device is such as a Bluetooth Mesh gateway or terminal device), while ensuring the success rate of message sending, reducing unnecessary message transmission and optimizing large-scale communication.
  • the destination device is such as a Bluetooth Mesh gateway or terminal device
  • the message sending device provided by the embodiment of the present application is introduced below.
  • the message sending device described below can be considered as the functional module required by the node device to implement the message sending method provided by the embodiment of the present application.
  • the content of the device described below can be compared with the above.
  • the content described in the article corresponds to each other.
  • Figure 7 exemplarily shows an optional block diagram of a message sending device provided by an embodiment of the present application.
  • the device can be applied to a node device.
  • the device can include:
  • the destination determination module 710 is used to determine the destination device corresponding to the message to be sent by the node device.
  • the query module 711 is configured to query at least the message hop count corresponding to the destination device and the node device in the pre-maintained message hop count table.
  • the message hop count table records at least the message hop count between the broadcast message of the destination device and the node device.
  • the TTL determination module 712 is configured to determine the time-to-live TTL with a set redundancy compared with the message hop number based on the message hop number.
  • the message sending module 713 is used to send messages in the Bluetooth Mesh network according to the determined TTL; wherein, when the message is forwarded once in the Bluetooth Mesh network, the TTL of the message is decremented once. When the TTL of the message is less than the set first value , messages stop being forwarded in the Bluetooth Mesh network.
  • the broadcast messages of the destination device are periodically broadcast in the Bluetooth Mesh network in the order of decreasing TTL, and the TTL of the next broadcast message is sequentially decreasing compared to the TTL of the previous broadcast message; the The device can also be used for:
  • the node device If the node device is within the TTL range of the multi-broadcast message, it receives the multi-broadcast message from the destination device; in the message hop table, update the relationship between the destination device's broadcast message and the node device with the TTL of the next received broadcast message. The number of message hops between
  • the destination device includes any one of a Bluetooth Mesh gateway and a terminal device, wherein the terminal device sends a broadcast message through a proxy node device.
  • the message hop count table records at least the message hop count between the Bluetooth Mesh gateway and the node device.
  • the message hop count table records at least the message hop count between the proxy node device and the node device of the terminal device.
  • the query module 711 is configured to query at least the message hop number corresponding to the destination device and the node device in the pre-maintained message hop count table, including: in the message hop count table At least query the number of message hops between the node device and the Bluetooth Mesh gateway.
  • the TTL determination module 712 is configured to determine a time-to-live TTL with a set redundancy compared with the message hop number based on the message hop count, including: based on the message hop count, determine with a first set redundancy compared with the message hop count. Degree TTL.
  • the query module 711 is configured to query at least the message hop number corresponding to the destination device and the node device in the message hop count table maintained in advance, including: at least querying the message hop count table in the message hop count table. Query the number of message hops between the node device and the proxy node device of the terminal device.
  • the TTL determination module 712 is configured to determine a time-to-live TTL with a set redundancy compared to the message hop count based on the message hop count, including: based on the message hop count, determine to have a second set redundancy compared to the message hop count.
  • the TTL of the degree; the second set redundancy is greater than the first set redundancy.
  • the first set redundancy is that the destination device is a Bluetooth Mesh gateway
  • the TTL of the message corresponds to the set redundancy.
  • the message hop count table also records the source address of the broadcast message of the destination device; when the destination device is a Bluetooth Mesh gateway, the source address of the broadcast message of the destination device is the unicast address of the Bluetooth Mesh gateway; when the destination device When it is a terminal device, the source address of the broadcast message of the destination device is the unicast address of the proxy node device of the terminal device.
  • the embodiment of the present application also provides a node device, which can realize the message sending method provided by the embodiment of the present application by setting the above-mentioned message sending device applied to the node device.
  • Figure 8 exemplarily shows an optional block diagram of a node device.
  • the node device may include at least one processor 81, at least one communication interface 82, at least one memory 83 and at least A communications bus 84.
  • the number of the processor 81 , the communication interface 82 , the memory 83 and the communication bus 84 is at least one, and the processor 81 , the communication interface 82 and the memory 83 complete communication with each other through the communication bus 84 .
  • the communication interface 82 may be an interface of a communication module used for network communication.
  • the processor 81 may be a CPU, GPU (Graphics Processing Unit, graphics processor), NPU (embedded neural network processor), FPGA (Field Programmable Gate Array, field programmable logic gate array), TPU (Zhang processing unit), AI chip, specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application, etc.
  • the memory 83 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the memory 83 stores one or more computer-executable instructions, and the processor 81 calls one or more computer-executable instructions to execute the message sending method executed by the node device in the embodiment of the present application.
  • the message sending device can be considered as a functional module that a broadcast device (such as a Bluetooth Mesh gateway or a proxy node device of a terminal device) needs to set up to implement the message sending method provided by the embodiment of this application.
  • a broadcast device such as a Bluetooth Mesh gateway or a proxy node device of a terminal device
  • the device content described below can be the same as that described above. The contents correspond to each other.
  • Figure 9 exemplarily shows another optional block diagram of the message sending device provided by the embodiment of the present application.
  • This device can be applied to broadcast equipment.
  • the device can include:
  • the message broadcast module 910 is configured to periodically broadcast messages in the Bluetooth Mesh network in the order of decreasing TTL, so that the node device that receives the broadcast message records at least the broadcast message in the message hop table according to the TTL in the broadcast message. The number of message hops between the node device and the node device; where the TTL of the next broadcast message decreases sequentially compared to the TTL of the previous broadcast message;
  • the message acquisition module 911 is used to obtain the message sent by the node device; wherein, when the message is sent from the node device, the message hop number corresponding to the destination device and the node device is queried in the message hop count table of the node device, and the redundancy is set.
  • the margin determines the TTL; and if the message is forwarded once in the Bluetooth Mesh network, the TTL of the message is decremented once. When the TTL of the message is less than the set first value, the message stops being forwarded in the Bluetooth Mesh network.
  • the message broadcast module 910 is used to periodically broadcast messages in the Bluetooth Mesh network in the order of decreasing TTL, so that the node device that receives the broadcast message will be in the message hop number according to the TTL in the broadcast message.
  • the table records at least the number of message hops between the broadcast message and the node device including:
  • the current TTL is sequentially decreasing compared to the TTL of the last broadcast message.
  • the embodiment of the present application also provides a broadcasting device, which can realize the message sending method provided by the embodiment of the present application by setting the above-mentioned message sending device applied to the node device.
  • the optional structure of the broadcasting device may be shown in conjunction with FIG. 8 and include at least one memory and at least one processor.
  • the memory stores one or more computer-executable instructions
  • the processor calls one or more computer-executable instructions. Instructions are provided to perform the message sending method performed by the broadcasting device in the embodiments of the present application.
  • the broadcast device can be a Bluetooth Mesh gateway or a proxy node device of the terminal device.
  • Embodiments of the present application also provide a device intelligent interconnection system.
  • the device intelligent interconnection system may include a node device and a broadcast device; the broadcast device may include a Bluetooth Mesh gateway or a proxy node device of a terminal device.
  • the node device in the device intelligent interconnection system can be used to execute the message sending method performed by the node device provided in the embodiment of the present application (for example, the node device in the device intelligent interconnection system is the one described in the embodiment of the present application).
  • the broadcast device in the device intelligent interconnection system can be used to execute the message sending method performed by the broadcast device provided in the embodiment of the present application (for example, the broadcast device in the device intelligent interconnection system is provided in the embodiment of the present application) broadcast equipment).
  • the device intelligent interconnection system provided by the embodiment of this application can be applied to device intelligent interconnection scenarios such as smart homes and smart offices.
  • the node device can be a home electronic device with Bluetooth communication function (such as smart lamps, smart TVs, water purifiers, etc.);
  • the Bluetooth Mesh gateway can be, for example, a smart speaker, Multi-mode gateways, etc.
  • the embodiment of the present application also provides a storage medium that stores one or more computer-executable instructions, When one or more computer-executable instructions are executed, a message sending method executed by a node device as provided by an embodiment of the present application is implemented, or a message sending method executed by a broadcast device as provided by an embodiment of the present application.
  • the embodiment of the present application also provides a computer program.
  • the computer program When the computer program is executed, the message sending method executed by the node device as provided by the embodiment of the present application is implemented, or the message sending performed by the broadcast device as provided by the embodiment of the present application. method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施方式提供一种消息发送方法、设备智能互联系统、相关设备及存储介质,其中方法包括:确定节点设备待发送的消息对应的目的设备;在节点设备预先维护的消息跳数表中,至少查询目的设备与节点设备对应的消息跳数;消息跳数表至少记录目的设备的广播消息与节点设备之间的消息跳数;根据消息跳数,确定消息的TTL;TTL与消息跳数相比具有设定冗余度;根据所确定的TTL,在蓝牙Mesh网络中发送消息。本申请实施例可在节点设备发出消息时,动态优化消息的TTL,在保障消息发送成功率的情况下,减少不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。

Description

消息发送方法、设备智能互联系统、相关设备及存储介质
本申请要求于2022年07月01日提交中国专利局、申请号为202210765475.4、发明名称为“消息发送方法、设备智能互联系统、相关设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施方式涉及通信技术领域,具体涉及一种消息发送方法、设备智能互联系统、相关设备及存储介质。
背景技术
蓝牙Mesh(无线网格)网络是基于BLE(Bluetooth Low Energy,低能耗蓝牙)建立设备间通信的网状网络,其广泛用于智能家居、智慧办公等设备智能互联场景。在蓝牙Mesh网络中,消息可在已配网的节点(Node)设备之间进行中继转发,从而提升消息的传输距离,以适应具有大量节点设备的大规模蓝牙Mesh网络。然而,消息在节点设备之间转发的情况下,蓝牙Mesh网络的消息传输性能有待提升。
发明内容
有鉴于此,本申请实施方式提供一种消息发送方法、设备智能互联系统、相关设备及存储介质,以在节点设备发出消息时,动态优化用于指示消息转发跳数的TTL(Time To Live,生存时间),从而在保障消息发送成功率的情况下,减少不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。
为实现上述目的,本申请实施方式提供如下技术方案。
第一方面,本申请实施方式提供一种消息发送方法,应用于节点设备,方法包括:确定节点设备待发送的消息对应的目的设备;在节点设备预先维护的消息跳数表中,至少查询目的设备与节点设备对应的消息跳数;消息跳数表至少记录目的设备的广播消息与节点设备之间的消息跳数;根据消息跳数,确定消息的TTL;TTL与消息跳数相比具有设定冗余度;根据所确定的TTL,在蓝牙Mesh网络中发送消息;其中,消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
第二方面,本申请实施方式提供一种消息发送方法,应用于广播设备,方法包括:按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数;其中,下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;获取节点设备发送的消息;其中,消息在从节点设备发出时,消息的TTL根据节点设备的消息跳数表中查询的目的设备与节点设备对应的消息跳数,以及设定冗余度确定;并且消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
第三方面,本申请实施方式提供一种设备智能互联系统,包括节点设备和广播设备;节点设备用于执行如上述第一方面的消息发送方法,广播设备用于执行如上述第二方面的消息发送方法;广播设备包括蓝牙Mesh网关或者终端设备的代理节点设备。
第四方面,本申请实施方式提供一种节点设备,包括至少一个存储器和至少一个处理器,存储器存储一条或多条计算机可执行指令,处理器调用一条或多条计算机可执行指令,以执行如上述第一方面的消息发送方法。
第五方面,本申请实施方式提供一种广播设备,包括至少一个存储器和至少一个处理器,存储器存储一条或多条计算机可执行指令,处理器调用一条或多条计算机可执行指令,以执行如上述第二方面的消息发送方法;广播设备为蓝牙Mesh网关或者终端设备的代理节点设备。
第六方面,本申请实施方式提供一种存储介质,存储介质存储一条或多条计算机可执行指令,一条或多条计算机可执行指令被执行时,实现如上述第一方面的消息发送方法,或者,如上述第二方面的消息发送方法。
第七方面,本申请实施方式提供一种计算机程序,计算机程序被执行时,实现如上述第一方面的消息发送方法,或者,如上述第二方面的消息发送方法。
本申请实施方式提供的消息发送方法,可由节点设备设置和维护消息跳数表,并且该消息跳数表记录的是节点设备的目的设备的广播消息,相对于节点设备的消息跳数;由于节点设备的目的设备可能是蓝牙Mesh网关或者终端设备(终端设备由代理节点设备发出广播消息),而蓝牙Mesh网络中的蓝牙Mesh网关和代理节点设备的数量一般小于节点设备的总数,因此节点设备维护消息跳数表所需的数据量较低;同时,本申请实施方式可在节点设备发送消息给蓝牙Mesh网关、终端设备等目的设备时,在发出消息的源节点设备确定消息的TTL,并且消息的TTL是基于目的设备的广播消息与节点设备之间的消息跳数,以及设定冗余度进行确定,因此本申请实施方式能够合理设置消息必要传输所需的TTL,从而降低消息在蓝牙Mesh网络中传输的网络负载,提升蓝牙Mesh网络的消息传输性能。可见,本申请实施方式能够基于节点设备的消息跳数表,在节点设备向目的设备发送消息时,动态优化用于指示消息转发跳数的TTL,从而在保障消息发送成功率的情况下,减少不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。
上述概述仅仅是为了说明书的目的,并不意图以任何方式进行限制。除上述描述的示意性的方面、实施方式和特征之外,通过参考附图和以下的详细描述,本申请进一步的方面、实施方式和特征将会是容易明白的。
附图说明
在附图中,除非另外规定,否则贯穿多个附图相同的附图标记表示相同或相似的部件或元素。这些附图不一定是按照比例绘制的。应该理解,这些附图仅描绘了根据本申请公开的一些实施方式,而不应将其视为是对本申请范围的限制。
图1为蓝牙Mesh网络的示例图。
图2为节点设备的跳数示例图。
图3A为本申请实施方式提供的消息发送方法的流程图。
图3B为本申请实施方式提供的消息发送方法的另一流程图。
图4A为本申请实施方式设置网关表的方法流程图。
图4B为周期性广播消息的示例图。
图4C为节点设备发送消息时的TTL设置示例图。
图4D为节点设备向蓝牙Mesh网关发送消息的流程图。
图5为节点设备与多个蓝牙Mesh网关的示例图。
图6A为节点设备向终端设备发送消息的示例图。
图6B为代理节点设备断开代理连接的示例图。
图7为本申请实施方式提供的消息发送装置的框图。
图8为节点设备的框图。
图9为本申请实施方式提供的消息发送装置的另一框图。
具体实施方式
下面将结合本申请实施方式中的附图,对本申请实施方式中的技术方案进行清楚、完整地描述,显然,所描述的实施方式仅仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。
图1示例性的示出了蓝牙Mesh网络的示例图,如图1所示,蓝牙Mesh网络可以包括:已配网的多个节点设备101。在图1所示中,蓝牙Mesh网关102和终端设备103作为控制设备,可以对已配网的节点设备进行配置、控制等管理工作。
其中,节点设备101可以视为是已加入蓝牙Mesh网络的蓝牙Mesh设备,蓝牙Mesh设备例如智能灯具、智能插座、智能家电等IoT(Internet of Things,物联网)设备。蓝牙Mesh网关102可以例如具有蓝牙通信能力和互联网连接能力的智能音箱、多模网关等,蓝牙Mesh网关102除具有节点设备101的配置、控制功能外,还可作为节点设备101与互联网连接的跳板,实现节点设备的远程控制。终端设备103可以是用户使用的智能手机、平板电脑等用户侧设备,其具有节点设备101的配置、控制功能,以及通过蓝牙Mesh网关102控制节点设备101的功能等。在一个示例中,终端设备可通过装载具有蓝牙Mesh网络管理功能的APP,以实现对蓝牙Mesh网络中的节点设备进行配置、控制。
在蓝牙Mesh网络中,蓝牙Mesh网关与节点设备可以通过发送广播包的方式进行交互,而智能手机、平板电脑等终端设备由于不支持发送广播包的交互方式,因此终端设备需要与蓝牙Mesh网络中的节点设备建立代理(Proxy)连接,从而由作为代理的节点设备(简称代理节点设备),转发广播包给蓝牙Mesh网络中的其他节点设备。终端设备的代理节点设备的数量可以为一个或多个。
需要说明的是,蓝牙Mesh的协议栈中定义了广播承载层(Advertising Bearer)和GATT(Generic Attribute Profile,通用属性协议)承载层,由于智能手机、平板电脑等终端设备不支持广播承载层,因此终端设备需要通过代理节点设备来执行承载层转换(从广播承载层到GATT承载层的转换),使得不支持广播承载层的终端设备可通过GATT连接来收发消息。
在上述背景下,蓝牙Mesh网络的消息传输主要集中在节点设备发送消息到网关和终端设备(例如节点设备将状态消息同步到网关和终端设备);进而,网关和终端设备将节点设备的消息(例如节点设备的状态消息)发送到云端。
在一些示例中,节点设备发送消息到网关和终端设备的场景可以如下示例。
用户在控制单个节点设备时,用户可通过终端设备(主要是终端设备装载的具有蓝牙Mesh网络管理功能的APP)或者蓝牙Mesh网关,下发一条单播控制消息;从而节点设备在获取到该单播控制消息后进行响应控制,并向终端设备或者蓝牙Mesh网关回复状态消息;
用户在控制多个节点设备形成的设备组时,用户可通过终端设备或者蓝牙Mesh网关下发一条组播控制消息;从而设备组中的多个节点设备在获取到该组播控制消息后分别进行响应控制,并分别向终端设备或者蓝牙Mesh网关回复状态消息;此时,设备组中的各个节点设备可分别回复状态消息,状态消息的回复数量与设备组中的节点设备数量相应;
如果用户通过控制面板对节点设备进行本地操作,则用户可一次控制多个节点设备,多个节点设备在分别响应控制后,可分别回复状态消息;
如果多个节点设备重新上电,则每个节点设备可将上电后的状态消息分别发送给终端设备或者蓝牙Mesh网关,以便终端设备或者蓝牙Mesh网关将各个节点设备的状态同步到云端。
上述示例了节点设备向终端设备或者蓝牙Mesh网关发送消息的可能示例场景,当然节点设备还可能在其他场景下向终端设备或者蓝牙Mesh网关发送消息,对此本申请实施方式并不设限。基于蓝牙Mesh网络的大规模结构,节点设备在向终端设备或者蓝牙Mesh网关发送消息时,可以通过作为中继的节点设备将消息在蓝牙Mesh网络中进行转发,以便终端设备或者蓝牙Mesh网关的邻居节点设备,能够将消息发送到终端设备或者蓝牙Mesh网关。终端设备或者蓝牙Mesh网关的邻居节点设备可以视为是,与终端设备或者蓝牙Mesh网关相距1跳的节点设备;即终端设备或者蓝牙Mesh网关的邻居节点设备,可通过1跳的消息传输,将消息发送到终端设备或者蓝牙Mesh网关。
为便于理解,以节点设备向蓝牙Mesh网关发送消息为例,图2示例性的示出了节点设备的跳数示例图,如图2所示,以蓝牙Mesh网络具有节点设备N1至N9为例,其中,节点设备N1、N2和N3与蓝牙Mesh网关G相距1跳(即节点设备N1至N3可通过一次消息传输,将消息发送给蓝牙Mesh网关),属于蓝牙Mesh网关G的邻居节点设备;节点设备N4、N5和N6与蓝牙Mesh网关G相距2跳,节点设备N7、N8和N9与蓝牙Mesh网关G相距3跳;以节点设备N7向蓝牙Mesh网关G发送消息为例,由于节点设备N7无法通过1跳的消息发送,将消息发送给蓝牙Mesh网关G,因此节点设备N7发送的消息需要在蓝牙Mesh网络中进行中继转发,从而在消息转发到蓝牙Mesh网关G的邻居节点设备N1、N2或N3时,再由节点设备N1、N2或N3将消息发送给蓝牙Mesh网关G。
在上述背景下,蓝牙Mesh网络是基于管理泛洪的机制来实现转发消息,从而扩展通信范围。在基于管理泛洪的机制来实现转发消息的情况下,一个节点设备的消息转发次数主要基于以下机制进行控制:
TTL(Time To Live,生存时间),蓝牙Mesh网络中的消息可以包含TTL字段,用于 指示消息在蓝牙Mesh网络中的转发跳数;在一个示例中,TTL的取值范围可以为0至127,消息在从源节点设备发出后,每在蓝牙Mesh网络中转发一次,则TTL进行递减;需要说明的是,在消息的TTL小于或者等于1时,消息停止转发(也就是说,消息的TTL为0或者1时,消息均停止转发,消息的处理效果是一致的),而消息的TTL大于1时,消息将在蓝牙Mesh网络中进行转发。
消息Cache(缓存):具备消息中继功能的节点设备可以设置消息缓存,以记录一定数目的已转发消息;节点设备在获取到一条消息时,如果消息在消息缓存中命中,则说明节点设备已转发过该消息,从而节点设备不再中继转发该消息,可将该消息进行丢失;而如果消息在消息缓存中未命中,并且消息的TTL大于1,则说明节点设备未中继转发过该消息并且当前需要转发该消息,从而节点设备可将消息转发给相距一跳的邻居节点设备(例如节点设备将消息转发给相距一跳的其他节点设备、蓝牙Mesh网关、终端设备等),并且将消息的TTL递减1。
在蓝牙Mesh网络的消息转发机制下,如果节点设备的消息缓存的大小和作为中继的节点设备的数量能够确定,则消息的TTL大小将决定蓝牙Mesh网络的消息传输性能。也就是说,在节点设备的消息缓存的大小,以及中继的节点设备的数量被确定的情况下,消息的TTL影响蓝牙Mesh网络的消息传输性能。例如,如果消息的TTL选取的过大,则可能产生较多的消息转发,导致不必要的消息传输,从而致使蓝牙Mesh网络存在网络负荷浪费,使得蓝牙Mesh网络的消息传输性能降低;而如果消息的TTL选取的较小,则可能导致消息的转发不足以覆盖蓝牙Mesh网络的范围,造成部分节点设备接收不到消息,导致消息无法被转发到蓝牙Mesh网关和终端设备。可见,如何合理的设置消息的TTL,对于蓝牙Mesh网络的消息传输性能至关重要。
蓝牙Mesh标准虽然允许节点设备默认的TTL能够被调整,但是并没有规定如何选取合理的TTL值,从而在保障消息发送成功率的情况下,减少不必要的消息传输。在此情况下,本申请的发明人曾考虑使用以下几种方式设置消息的TTL。
在设置消息的TTL的一种实施方式中,每个节点设备维护邻居列表,用于记录与节点设备相距一跳的邻居设备的地址;与节点设备相距一跳的邻居设备可以例如,与节点设备相距一跳的作为邻居的其他节点设备、蓝牙Mesh网关、终端设备等;从而,节点设备在发送消息或者转发消息时,检查消息的目的地址是否记录在邻居列表内;如果不在,则按默认规则设置消息的TTL并转发消息(例如在发送消息时,以默认TTL作为消息的TTL,在转发消息时,将消息的TTL递减1后再转发消息);如果在,则不按照递减TTL的方式来调整TTL的值,而是将消息的TTL直接调整为0或者1,然后再转发消息,从而使得下一次接收消息的其他节点设备不再转发消息。
上述方式能够通过判断消息的目的地址是否属于节点设备的下一跳地址(例如,消息的目的地址记录在节点设备的邻居列表内,则消息的目的地址为节点设备的下一跳地址),来尽可能减小消息的TTL,从而一定程度的减少不必要的消息传输;但是,这种方式并不适用于节点设备数量较多的蓝牙Mesh网络,当蓝牙Mesh网络存在数量众多的节点设备时,每个节点设备的邻居设备的数量将相应增多,从而导致节点设备存储的邻居列表的数据量增大,使得节点设备存在较大的内存开销。另外,消息的TTL只有在传输到与目的地址相 邻的节点设备时,才会被修改减小,而不是在消息从源节点设备发出时就设置较为合理的较小值;因此消息在到达与目的地址相邻的节点设备之前,仍然存在较重的网络负载。
在设置消息的TTL的另一种实施方式中,蓝牙Mesh网络的每个节点设备,可搜索扫描周围节点设备,从而与周围节点设备建立连接;从而,节点设备可统计与周围节点设备的链路信息;进而,节点设备可根据消息的目的地址和节点设备的链路信息,确定消息的中继路径的链路;通过消息的中继路径的链路,计算消息的TTL值。这种方式通过统计消息中继路径的链路,计算出消息在中继路径的链路对应TTL值,从而较为合理的设置TTL值,减少不必要的消息传输;但是,节点设备统计与维护链路的成本较高,并不灵活。例如,在智能家居、全屋智慧照明、智慧办公等设备智能互联场景下,节点设备可能频繁的离开与回到蓝牙Mesh网络(比如,智能灯具在关闭电源时,离开蓝牙Mesh网络,而智能灯具在打开电源时,重新回到蓝牙Mesh网络),因此蓝牙Mesh网络的网络拓扑是动态变化的,而在动态变化的网络拓扑下,统计与维护节点设备的链路信息将带来较大的实现成本。
基于上述描述,本申请实施方式提供改进的消息发送方案,从而在发出消息的源节点设备,自适应动态的调整消息的TTL,使得每个节点设备能够以较低的实现成本,合理的设置消息的TTL,进而在保障消息发送成功率的情况下,减少蓝牙Mesh网络中不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。
在一些实施方式中,图3A示例性的示出了本申请实施方式提供的消息发送方法的可选流程图,该方法流程可由节点设备执行实现,参照图3A,该方法流程可以包括如下步骤。
在步骤S310中,确定节点设备待发送的消息对应的目的设备。
执行图3A所示流程的节点设备可以是消息的源节点设备,即消息从源节点设备开始发出。基于此,节点设备可确定待发送的消息对应的目的设备。消息的目的设备可以是蓝牙Mesh网关和终端设备之中的任一项,例如蓝牙Mesh网关或者终端设备。在一些实施方式中,节点设备可确定消息的目的地址,从而以消息的目的地址指示目的设备。例如,节点设备在向蓝牙Mesh网关发送消息时,消息的目的地址可以是蓝牙Mesh网关的单播地址;蓝牙Mesh网关的单播地址可以是在蓝牙Mesh网关向节点设备下发控制消息时携带,从而节点设备在响应控制并向蓝牙Mesh网关回复消息时,可将蓝牙Mesh网关下发控制消息时的单播地址,作为目的地址。又例如,节点设备在向终端设备发送消息时,消息的目的地址可以是终端设备的地址。
在步骤S311中,在预先维护的消息跳数表中至少查询目的设备与节点设备对应的消息跳数,消息跳数表至少记录目的设备的广播消息与节点设备之间的消息跳数。
在一些实施方式中,蓝牙Mesh网络中的节点设备可设置和维护消息跳数表,该消息跳数表可以至少用于记录目的设备的广播消息与节点设备之间的消息跳数。在一些实施方式中,如果目的设备为蓝牙Mesh网关,则由于蓝牙Mesh网关能够在蓝牙Mesh网络中广播消息,因此蓝牙Mesh网关的广播消息与节点设备之间的消息跳数,可以视为是蓝牙Mesh网关与节点设备之间的消息跳数;相应的,在目的设备为蓝牙Mesh网关的情况下,节点设在一些实施方式中备的消息跳数表可以记录蓝牙Mesh网关与节点设备之间的消息跳数。
在、一些实施方式中,如果目的设备为智能手机等终端设备,由于终端设备需要通过 代理节点设备发出广播消息,即终端设备的广播消息是由终端设备的代理节点设备发出,因此终端设备的广播消息与节点设备之间的消息跳数,可以视为是终端设备的代理节点设备与节点设备之间的消息跳数;相应的,在目的设备为终端设备的情况下,节点设备的消息跳数表可以记录终端设备的代理节点设备与节点设备之间的消息跳数。
在一些实施方式中,消息跳数表除记录目的设备的广播消息与节点设备之间的消息跳数外,还可记录目的设备的广播消息对应的源地址。在一些实施方式中,在目的设备为蓝牙Mesh网关时,由于蓝牙Mesh网关能够在蓝牙Mesh网络中广播消息,因此广播消息对应的源地址可以为蓝牙Mesh网关的地址(例如蓝牙Mesh网关的单播地址);从而,在目的设备为蓝牙Mesh网关的情况下,节点设备的消息跳数表可以记录蓝牙Mesh网关的单播地址,以及蓝牙Mesh网关与节点设备之间的消息跳数。
在一些实施方式中,在目的设备为终端设备的情况下,由于终端设备通过代理节点设备发出广播消息,因此广播消息的源地址可以为代理节点设备的单播地址;从而,在目的设备为终端设备的情况下,节点设备的消息跳数表可以记录终端设备的代理节点设备的单播地址,以及代理节点设备与节点设备之间的消息跳数。
在一些实施方式中,在消息跳数表记录目的设备的广播消息的源地址,以及目的设备的广播消息与节点设备之间的消息跳数的情况下,基于步骤S310所确定的消息的目的设备,本申请实施方式可确定目的设备的广播消息的源地址,从而判断节点设备的消息跳数表中是否存在该源地址对应的记录,以在节点设备的消息跳数表中存在该源地址对应的记录时,查询出目的设备与节点设备对应的消息跳数(即目的设备的广播消息与节点设备之间的消息跳数)。
需要说明的是,由于终端设备与代理节点设备的结合可形成类似蓝牙Mesh网关的功能,因此在消息跳数表记录蓝牙Mesh网关的单播地址、蓝牙Mesh网关与节点设备之间的消息跳数,以及代理节点设备的单播地址、代理节点设备与节点设备之间的消息跳数的情况下,本申请实施方式所指的消息跳数表也可称为网关表。
在一些实施方式中,目的设备的广播消息可按照TTL递减的顺序,周期性的在蓝牙Mesh网络中进行广播,并且下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;从而如果节点设备处于多次广播消息的TTL范围内,则节点设备可接收到目的设备的多次广播消息,进而节点设备可在消息跳数表中,以下一次接收的广播消息的TTL,更新目的设备的广播消息与节点设备之间的消息跳数,从而保障准确设置目的设备的广播消息与节点设备之间的消息跳数。后文以蓝牙Mesh网关广播消息,和终端设备的代理节点设备广播消息为例,对消息跳数表中的消息跳数的记录和更新进行了相应描述,此处不再展开。
在步骤S312中,根据消息跳数,确定与消息跳数相比具有设定冗余度的TTL。
在步骤S313中,根据所确定的TTL,在蓝牙Mesh网络中发送消息;其中,消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
节点设备在从消息跳数表中确定出目的设备与节点设备对应的消息跳数后,节点设备可在该消息跳数的基础上,增加设定冗余度,从而确定出与该消息跳数相比具有设定冗余 度的TTL,使得消息在发出时的TTL相比于目的设备与节点设备对应的消息跳数具有一定的冗余度,进而协助消息在蓝牙Mesh网络中进行一定冗余的转发,提高节点设备发出的消息到达目的设备的成功率和抗干扰能力。
节点设备以所确定的TTL在蓝牙Mesh网络中发送消息时,消息每在蓝牙Mesh网络中转发一次,则消息的TTL递减一次(例如消息的TTL递减1),当消息的TTL小于设定的第一值(第一值例如0或者1)时,则消息停止在蓝牙Mesh网络中转发,以使得消息在一定冗余的转发下,能够成功到达目的设备。本申请实施方式在发送消息时,引入一定的冗余转发,并不会导致消息在蓝牙Mesh网络中进行过多不必要的传输,而是能够在保障消息发送成功率的情况下,减少不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。
在一些实施方式中,当节点设备向蓝牙Mesh网关发送消息时,本申请实施方式可设置第一设定冗余度,从而节点设备在从消息跳数表中确定蓝牙Mesh网关与节点设备之间的消息跳数后,可确定与该消息跳数相比于具有第一设定冗余度的TTL(例如TTL为该消息跳数加上第一设定冗余度),从而根据该TTL,在蓝牙Mesh网络中发送消息。进一步的,节点设备可将蓝牙Mesh网关的单播地址作为目的地址,并根据所确定的TTL,在蓝牙Mesh网络中发送消息。
在一些实施方式中,当节点设备向终端设备发送消息时,本申请实施方式可设置第二设定冗余度,由于节点设备与终端设备通过代理节点设备进行通信,因此在节点设备确定的消息跳数为代理节点设备与节点设备之间的消息跳数的情况下,本申请实施方式设置的第二设定冗余度应大于第一设定冗余度(例如第二设定冗余度为第一设定冗余度加1,从而涵盖代理节点设备与终端设备之间的一跳距离)。进而节点设备在从消息跳数表中确定代理节点设备与节点设备之间的消息跳数后,可确定与该消息跳数相比于具有第二设定冗余度的TTL(例如TTL为该消息跳数加上第二设定冗余度),从而根据该TTL,在蓝牙Mesh网络中发送消息。进一步的,节点设备可将终端设备的地址作为目的地址,并根据所确定的TTL,在蓝牙Mesh网络中发送消息。
需要说明的是,蓝牙Mesh网络中的蓝牙Mesh网关和代理节点设备的数量一般小于节点设备总数,例如在200个节点设备的蓝牙Mesh网络中,蓝牙Mesh网关和代理节点设备的总数可能小于10;因此在大规模蓝牙Mesh网络中,每个节点设备虽然需要设置和维护消息跳数表,但是相比于每个节点设备维护邻居列表的方式,本申请实施方式能够极大的降低节点设备维护消息跳数表所需的存储资源消耗。另外,本申请实施方式可在节点设备发送消息给蓝牙Mesh网关、终端设备等目的设备时,在发出消息的源节点设备确定消息的TTL,并且消息的TTL是基于目的设备的广播消息与节点设备之间的消息跳数,以及设定冗余度进行确定,因此本申请实施方式能够合理设置消息必要传输所需的TTL,从而降低消息在蓝牙Mesh网络中传输的网络负载,提升蓝牙Mesh网络的消息传输性能。
进一步的,本申请实施方式提供的方案不需要统计与维护节点设备的链路,任一节点设备、蓝牙Mesh网关可以随时离开和加入蓝牙Mesh网络,并且任一节点设备可以随时在代理节点设备与普通节点设备之间切换角色,因此本申请实施方式能够以较低的实现成本,灵活的适应蓝牙Mesh网络的网络拓扑调整,从而合理的设置消息的TTL,降低消息在蓝牙Mesh网络中传输的网络负载,提升蓝牙Mesh网络的消息传输性能。
本申请实施方式提供的消息发送方法中,节点设备可设置和维护消息跳数表,该消息跳数表可以至少记录目的设备的广播消息与节点设备之间的消息跳数;从而节点设备在需要在发送消息时,节点设备作为发出消息的源节点设备,可确定消息的目的设备,并从消息跳数表中至少查询目的设备与节点设备对应的消息跳数;进而,节点设备可根据消息跳数,确定与消息跳数相比具有设定冗余度的TTL;根据所确定的TTL,在蓝牙Mesh网络中发送消息。当消息在蓝牙Mesh网络中进行发送时,消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,则消息停止在蓝牙Mesh网络中转发,以使得消息在经过上述TTL对应次的转发后,到达消息的目的设备。
本申请实施方式提供的消息发送方法,可由节点设备设置和维护消息跳数表,并且该消息跳数表记录的是节点设备的目的设备的广播消息,相对于节点设备的消息跳数;由于节点设备的目的设备可能是蓝牙Mesh网关或者终端设备(终端设备由代理节点设备发出广播消息),而蓝牙Mesh网络中的蓝牙Mesh网关和代理节点设备的数量一般小于节点设备的总数,因此节点设备维护消息跳数表所需的数据量较低;同时,本申请实施方式可在节点设备发送消息给蓝牙Mesh网关、终端设备等目的设备时,在发出消息的源节点设备确定消息的TTL,并且消息的TTL是基于目的设备的广播消息与节点设备之间的消息跳数,以及设定冗余度进行确定,因此本申请实施方式能够合理设置消息必要传输所需的TTL,从而降低消息在蓝牙Mesh网络中传输的网络负载,提升蓝牙Mesh网络的消息传输性能。可见,本申请实施方式能够基于节点设备的消息跳数表,在节点设备向目的设备发送消息时,动态优化用于指示消息转发跳数的TTL,从而在保障消息发送成功率的情况下,减少不必要的消息传输,提升蓝牙Mesh网络的消息传输性能。
在一些实施方式中,从发出广播消息的广播设备(例如蓝牙Mesh网关或者终端设备的代理节点设备)的角度,图3B示例性的示出了本申请实施方式提供的消息发送方法的另一可选流程图,该方法流程可由发出广播消息的广播设备执行实现,参照图3B,该方法流程可以包括如下步骤。
在步骤S320中,按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数;其中,下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减。
在一些实施方式中,发出广播消息的广播设备可确定广播消息的当前TTL,当前TTL相比于上一次的广播消息的TTL顺序递减;从而广播设备可向处于当前TTL的跳数范围内的节点设备广播消息,以使得当前TTL的跳数范围内的节点设备,根据接收的广播消息在消息跳数表中至少更新广播消息与节点设备之间的消息跳数;其中,更新的消息跳数根据广播消息的当前TTL确定。进一步的,当前TTL的跳数范围内的节点设备还可在消息跳数表中记录,广播消息的源地址(例如蓝牙Mesh网关的单播地址,或者终端设备的代理节点设备的单播地址)。
在步骤S321中,获取节点设备发送的消息;其中,消息在从节点设备发出时,根据节点设备的消息跳数表中查询的目的设备与节点设备对应的消息跳数,以及设定冗余度确定TTL;并且消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL 小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
下面分别以节点设备与蓝牙Mesh网关进行消息传输,节点设备与终端设备进行消息传输为例,对本申请实施方式提供的方案进行介绍。下文描述的节点设备向蓝牙Mesh网关发送消息的实现,可以认为是节点设备向目的设备发送消息的一种可选实施方式;下文描述的节点设备向终端设备发送消息的实施方式,可以认为是节点设备向目的设备发送消息的一种可选实施方式。
一方面,节点设备可与蓝牙Mesh网关进行消息传输。作为可选实施方式,蓝牙Mesh网络中的每个节点设备可设置网关表(网关表可以认为是消息跳数表的一种实施方式的示例,下文描述的网关表也可替换为是消息跳数表),用于记录蓝牙Mesh网关的单播地址,以及节点设备与蓝牙Mesh网关的消息跳数。节点设备与蓝牙Mesh网关的消息跳数可以视为是,节点设备与蓝牙Mesh网关相距的消息跳数。
在节点设备设置与蓝牙Mesh网关的消息跳数的一种可选实施方式中,蓝牙Mesh网关可按照TTL递减的顺序(例如TTL从高到低依序递减的顺序),周期性的向蓝牙Mesh网络中的节点设备发送消息,从而向节点设备通告蓝牙Mesh网关的存在;在蓝牙Mesh网关按照TTL递减的顺序,周期性的广播消息的情况下,能够接收到消息的节点设备可按照每次所接收消息的TTL,更新与蓝牙Mesh网关的消息跳数,从而准确设置节点设备与蓝牙Mesh网关的消息跳数。作为可选实施方式,图4A示例性的示出了本申请实施方式设置网关表的可选方法流程图,如图4A所示,该方法流程可以包括如下步骤。
在步骤S410中,蓝牙Mesh网关确定广播消息的当前TTL,当前TTL相比于蓝牙Mesh网关上一次的广播消息的TTL顺序递减。
蓝牙Mesh网络中存在一个或多个蓝牙Mesh网关,每个蓝牙Mesh网关可按照TTL递减的顺序,在蓝牙Mesh网络中周期性的广播消息。可选的,针对任一个蓝牙Mesh网关,蓝牙Mesh网关在蓝牙Mesh网络中下一次广播的消息的TTL,可小于上一次广播的消息的TTL;例如,蓝牙Mesh网关下一次的广播消息的TTL,为上一次的广播消息的TTL减一。从而,蓝牙Mesh网关当前在蓝牙Mesh网络中广播消息时,蓝牙Mesh网关可确定广播消息的当前TTL,并且当前TTL相比于蓝牙Mesh网关上一次的广播消息的TTL顺序递减。
在步骤S411中,蓝牙Mesh网关向处于当前TTL的跳数范围内的节点设备,广播消息;蓝牙Mesh网关的广播消息包括蓝牙Mesh网关的单播地址和当前TTL。
蓝牙Mesh网关基于当前TTL,在蓝牙Mesh网络中广播消息时,与蓝牙Mesh网关处于当前TTL的跳数范围内的节点设备,能够接收到蓝牙Mesh网关的广播消息;而与蓝牙Mesh网关的距离超出当前TTL的节点设备,无法接收到蓝牙Mesh网关的广播消息。例如,广播消息的当前TTL为3,则与蓝牙Mesh网关处于3跳范围内的节点设备,能够接收到蓝牙Mesh网关的广播消息;而与蓝牙Mesh网关的距离超出3跳的节点设备,无法接收到蓝牙Mesh网关的广播消息。蓝牙Mesh网关的广播消息可以至少包括蓝牙Mesh网关的单播地址和当前TTL。
在步骤S412中,处于当前TTL的跳数范围内的节点设备,基于接收的蓝牙Mesh网关的广播消息,在网关表中记录蓝牙Mesh网关的单播地址以及更新与蓝牙Mesh网关的消 息跳数;更新的消息跳数根据当前接收的广播消息的当前TTL确定。
在步骤S413中,蓝牙Mesh网关进行下一次的广播消息,返回步骤S410。
蓝牙Mesh网络中的各个蓝牙Mesh网关,均以上述方式周期性的广播消息,并且广播消息的TTL逐次递减,则蓝牙Mesh网络中的节点设备可在网关表中记录得到各个蓝牙Mesh网关的单播地址,以及与各个蓝牙Mesh网关相距的消息跳数。
需要说明的是,基于蓝牙Mesh网关周期性的广播消息,并且每次的广播消息的TTL顺序递减,则每次能够接收到广播消息的节点设备在不断的调整变化。也就是说,在蓝牙Mesh网关每次广播消息时,只有处于广播消息的TTL的跳数范围内的节点设备,才能够接收到广播的消息。例如,蓝牙Mesh网关上一次广播消息的TTL为3,则与蓝牙Mesh网关处于3跳范围内的节点设备,能够接收到蓝牙Mesh网关上一次的广播消息;基于蓝牙Mesh网关的广播消息的TTL需顺序递减,因此蓝牙Mesh网关在下一次广播消息时,下一次的广播消息的TTL为2,从而与蓝牙Mesh网关处于2跳范围内的节点设备,能够接收到蓝牙Mesh网关下一次的广播消息,而与蓝牙Mesh网关的距离超出2跳距离的节点设备(包含上一次能够接收到广播消息,且与蓝牙Mesh网关的距离为3跳的节点设备),无法接收到蓝牙Mesh网关的广播消息。在此情况下,节点设备可根据每次接收到的蓝牙Mesh网关的广播消息,调整网关表中记录的内容;例如,节点设备根据当前接收到的蓝牙Mesh网关的广播消息中的当前TTL,更新网关表中已记录的与蓝牙Mesh网关的消息跳数,从而准确设置节点设备与蓝牙Mesh网关的消息跳数。
在一些实施方式中,蓝牙Mesh网关周期性广播消息的最大TTL,可以与节点设备距蓝牙Mesh网关的最远跳数相应;从而蓝牙Mesh网关可从该最大TTL开始,逐次的递减TTL,以实现周期性的在蓝牙Mesh网络中广播消息。
为便于理解,图4B示例性的示出了周期性广播消息的示例图,如图4B所示,节点设备N1、N2和N3与蓝牙Mesh网关G相距1跳,节点设备N4、N5和N6与蓝牙Mesh网关G相距2跳,节点设备N7、N8和N9与蓝牙Mesh网关G相距3跳,从而在本示例中,节点设备距蓝牙Mesh网关G的最远跳数为3跳,进而蓝牙Mesh网关G可设置最大TTL为3,并且逐次的递减TTL,以周期性的在蓝牙Mesh网络中广播消息;
进一步结合图4B所示,蓝牙Mesh网关G第一次以TTL为3,在3跳范围内广播消息;从而与蓝牙Mesh网关G相距3跳范围内的节点设备N1至N9,均可接收到蓝牙Mesh网关G的广播消息;基于广播消息中的单播地址和TTL,节点设备N1至N9可在各自的网关表中记录蓝牙Mesh网关G的单播地址,以及与蓝牙Mesh网关的消息跳数为3;
蓝牙Mesh网关G在第二次广播消息时,可将TTL递减为2,从而以TTL为2,在2跳范围内广播消息;此时,与蓝牙Mesh网关G相距2跳范围内的节点设备N1至N6,可接收到蓝牙Mesh网关G广播的消息;而与蓝牙Mesh网关G相距3跳的节点设备N7至N9,无法接收到蓝牙Mesh网关G的广播消息;基于当前广播消息中的单播地址和TTL(此时TTL为2),节点设备N1至N6可在各自的网关表中查询与蓝牙Mesh网关G的单播地址相应的记录,从而将与蓝牙Mesh网关G的消息跳数更新为2;
蓝牙Mesh网关G在第三次广播消息时,可将TTL递减为1,从而以TTL为1,在1跳范围内广播消息;此时,与蓝牙Mesh网关G相距1跳范围内的节点设备N1至N3,可 接收到蓝牙Mesh网关G广播的消息;而与蓝牙Mesh网关G相距2跳的节点设备N4至N6,以及与蓝牙Mesh网关G相距3跳的节点设备N7至N9,均无法接收到蓝牙Mesh网关G的广播消息;基于当前广播消息中的单播地址和TTL(此时TTL为1),节点设备N1至N3可在各自的网关表中查询与蓝牙Mesh网关G的单播地址相应的记录,从而将与蓝牙Mesh网关G的消息跳数更新为1。
也就是说,在节点设备多次接收到同一蓝牙Mesh网关的广播消息时,下一次接收的广播消息中的TTL,可覆盖上一次接收的广播消息中的TTL,以实现在网关表中更新与蓝牙Mesh网关的消息跳数,保障节点设备能够准确设置与蓝牙Mesh网关的消息跳数。
上文描述了节点设备通过网关表,设置与蓝牙Mesh网关的消息跳数的可能方式。在此基础上,当节点设备需要向蓝牙Mesh网关发送消息时,节点设备可查询网关表,从网关表中查询节点设备与蓝牙Mesh网关的消息跳数;进而根据消息跳数,确定与消息跳数相比具有第一设定冗余度的TTL;从而节点设备可根据TTL,在蓝牙Mesh网络中发送消息,以实现节点设备向蓝牙Mesh网关发送消息。
本申请实施方式在节点设备向蓝牙Mesh网关发送消息时,将消息的TTL设置为与蓝牙Mesh网关的消息跳数具有第一设定冗余度,能够在节点设备与蓝牙Mesh网关的消息跳数的基础上,通过第一设定冗余度,来协助消息在蓝牙Mesh网络中进行转发,从而提高节点设备发送的消息到达蓝牙Mesh网关的成功率和抗干扰能力。作为可选实施方式,第一设定冗余度可以是预先设置的冗余数值,可根据实际情况而定;在一些实施方式中,本申请实施方式可设置第一设定冗余度为1,例如,节点设备在向蓝牙Mesh网关发送消息时,消息的TTL相比于节点设备与蓝牙Mesh网关的消息跳数大1。
为便于理解,图4C进一步示例了节点设备发送消息时的TTL设置示例图。如图4C所示,节点设备N1、N2和N3与蓝牙Mesh网关G的消息跳数均为1(节点设备N1、N2和N3可通过查询网关表,确定与蓝牙Mesh网关G的消息跳数),则在节点设备N1、N2和N3向蓝牙Mesh网关G发送消息时,基于第一设定冗余度设置为1,节点设备N1、N2和N3可设置消息的TTL为2;从而节点设备N1、N2和N3分别以TTL为2发送消息,以在节点设备N1、N2和N3与蓝牙Mesh网关的1条消息跳数的基础上,进一步通过1跳的第一设定冗余度,协助消息在蓝牙Mesh网络中进行转发,提升消息到达蓝牙Mesh网关G的成功率和抗干扰能力。
节点设备N4、N5和N6与蓝牙Mesh网关G的消息跳数均为2,则在节点设备N4、N5和N6向蓝牙Mesh网关G发送消息时,基于第一设定冗余度设置为1,节点设备N4、N5和N6可设置消息的TTL为3;从而节点设备N4、N5和N6分别以TTL为3发送消息。节点设备N7、N8和N9与蓝牙Mesh网关G的消息跳数均为3,则在节点设备N7、N8和N9向蓝牙Mesh网关G发送消息时,基于第一设定冗余度设置为1,节点设备N7、N8和N9可设置消息的TTL为4;从而节点设备N7、N8和N9分别以TTL为4发送消息。
在一些实施方式中,针对与蓝牙Mesh网关相距最远消息跳数的节点设备,本申请实施方式可将节点设备向蓝牙Mesh网关发送的消息的TTL,在第一设定冗余度的基础上进一步增加设定值(设定值例如1),以使得相距蓝牙Mesh网关最远的节点设备所发送的消息,能够在蓝牙Mesh网络中进行更多次的消息协助转发,从而提升消息到达蓝牙Mesh 网关的成功率和抗干扰能力;例如,在图4C示例基础上,基于节点设备N7、N8和N9与蓝牙Mesh网关G的消息跳数为3(示例中的最远消息跳数),本申请实施方式在第一设定冗余度的基础上,可进一步增加设定值,从而得到节点设备N7、N8和N9发送消息的TTL;比如,节点设备N7、N8和N9发送消息的TTL可以设置为5;需要说明的是,针对与蓝牙Mesh网关相距最远消息跳数的节点设备,进一步将消息的TTL增大设定值仅是一种可选实施方式,本申请实施方式也可保持与蓝牙Mesh网关相距最远消息跳数的节点设备,以第一设定冗余度设置消息的TTL。
为便于理解,本申请实施方式设置第一设定冗余度的初衷,下面通过一个示例进行说明。假设节点设备N1和节点设备N2均能够通过一跳的距离,将消息发送给蓝牙Mesh网关G,并且第一设定冗余度设为1,则节点设备N1使用TTL为2发送消息时,蓝牙Mesh网关G能够接收到节点设备N1的消息,节点设备N2也能够接收到节点设备N1的消息;当节点设备N2接收到节点设备N1的消息后,发现节点设备N1的消息的TTL为2,则节点设备N2可将消息的TTL递减后(例如节点设备N2可将节点设备N1的消息的TTL递减为1),再转发一次节点设备N1的消息;此时,蓝牙Mesh网关G能够接收到节点设备N2所转发的节点设备N1的消息,进而能够保障蓝牙Mesh网关G由于干扰等问题未接收到节点设备N1直接发送的消息时,接收到节点设备N2所转发的节点设备N1的消息,增加了蓝牙Mesh网关G接收到节点设备N1的消息的机会,从而提升节点设备发送的消息到达蓝牙Mesh网关的成功率。需要说明的是,在节点设备与蓝牙Mesh网关的消息跳数的基础上,增加第一设定冗余度来设置消息的TTL,虽然增加了消息在蓝牙Mesh网络中转发的冗余度,但是在消息的TTL每被转发一次则递减的机制下,通过合理设置第一设定冗余度的数值,能够在提升消息发送成功率的情况下,保障消息在蓝牙Mesh网络中的转发不会引入过度的冗余。
在一些实施方式中,节点设备可在接收到蓝牙Mesh网关的控制消息并进行响应控制后,向蓝牙Mesh网关回复消息;在此情况下,图4D示例性的示出了本申请实施方式提供的节点设备向蓝牙Mesh网关发送消息的示例流程图,该方法流程可由节点设备执行实现,如图4D所示,该方法流程可以包括如下步骤。
在步骤S420中,确定蓝牙Mesh网关下发的控制消息使用的单播地址。
在步骤S421中,根据该单播地址,在网关表中查询是否存在蓝牙Mesh网关相应的记录,若是,执行步骤S422,若否,执行步骤S424。
在步骤S422中,确定网关表中记录的与蓝牙Mesh网关相距的消息跳数,根据该消息跳数和第一设定冗余度,确定节点设备发送消息的TTL。
步骤S421的判断结果为是,则说明蓝牙Mesh网关的单播地址在网关表中命中,即节点设备的网关表记录有蓝牙Mesh网关的单播地址和与蓝牙Mesh网关相距的消息跳数,从而节点设备可根据该消息跳数和第一设定冗余度,确定节点设备向蓝牙Mesh网关发送消息的TTL。
在步骤S423中,将该单播地址作为目的地址,根据所确定的TTL,在蓝牙Mesh网络中发送消息。
蓝牙Mesh网关的单播地址在节点设备的网关表中命中的情况下,节点设备在确定发 送消息的TTL后,可将蓝牙Mesh网关的单播地址作为发送消息的目的地址,从而根据所确定的消息的TTL,在蓝牙Mesh网络中发送消息。
在步骤S424中,确定蓝牙Mesh网络中蓝牙Mesh网关的组播地址;以及,从网关表中查询与节点设备相距最近的蓝牙Mesh网关的最近消息跳数,根据该最近消息跳数和第一设定冗余度,确定节点设备发送消息的TTL。
步骤S421的判断结果为否,则说明蓝牙Mesh网关的单播地址在网关表中未命中,即节点设备的网关表未记录有蓝牙Mesh网关的单播地址和与蓝牙Mesh网关相距的消息跳数;此时,节点设备可通过组播方式向蓝牙Mesh网络中的蓝牙Mesh网关发送消息,并且以与节点设备最近的蓝牙Mesh网关为准,进行消息TTL的设置;从而,节点设备可确定蓝牙Mesh网络中蓝牙Mesh网关的组播地址(例如蓝牙Mesh网络中所有蓝牙Mesh网关的组播地址),并且从网关表中查询相距最近的蓝牙Mesh网关的最近消息跳数,从而根据该最近消息跳数和第一设定冗余度,确定节点设备发送消息的TTL。
在步骤S425中,将该组播地址作为目的地址,根据所确定的TTL,在蓝牙Mesh网络中发送消息。
需要说明的是,蓝牙Mesh网关的组播地址是一个特殊地址,在利用该组播地址发送消息时,蓝牙Mesh网络中的所有蓝牙Mesh网关可默认接收和处理消息。同时,节点设备以相距最近的蓝牙Mesh网关的最近消息跳数,确定消息的TTL,能够使得节点设备发送的消息至少能够到达相距最近的蓝牙Mesh网关,或者消息的TTL范围内的任一蓝牙Mesh网关,从而由接收到消息的蓝牙Mesh网关将消息上传到云端。
在一些实施方式中,当节点设备涉及到向多个蓝牙Mesh网关发送消息时,在节点设备通过网关表记录多个蓝牙Mesh网关的单播地址和相距的消息跳数的情况下,节点设备向各个蓝牙Mesh网关发送消息的实施方式方式可同理参照前文描述。
为便于理解,图5示例性的示出了节点设备与多个蓝牙Mesh网关的示例图,如图5所示,蓝牙Mesh网络中存在蓝牙Mesh网关G1和G2,蓝牙Mesh网关G1和G2可分别按照TTL由3递减至1的顺序,周期性的在蓝牙Mesh网络中广播消息;由于节点设备N1至N3处于蓝牙Mesh网关G1的1跳范围内,处于蓝牙Mesh网关G2的3跳范围内,从而节点设备N1、N2和N3基于蓝牙Mesh网关G1和G2周期性广播的消息,可分别在网关表中记录蓝牙Mesh网关G1的单播地址以及1跳的消息跳数,蓝牙Mesh网关G2的单播地址以及3跳的消息跳数;由于节点设备N4至N6处于蓝牙Mesh网关G1的2跳范围内,处于蓝牙Mesh网关G2的2跳范围内,从而节点设备N4、N5和N6基于蓝牙Mesh网关G1和G2周期性广播的消息,可分别在网关表中记录蓝牙Mesh网关G1的单播地址以及2跳的消息跳数,蓝牙Mesh网关G2的单播地址以及2跳的消息跳数;由于节点设备N7至N9处于蓝牙Mesh网关G1的3跳范围内,处于蓝牙Mesh网关G2的1跳范围内,从而节点设备N7、N8和N9基于蓝牙Mesh网关G1和G2周期性广播的消息,可分别在网关表中记录蓝牙Mesh网关G1的单播地址以及3跳的消息跳数,蓝牙Mesh网关G2的单播地址以及1跳的消息跳数。
以蓝牙Mesh网关G1和G2的单播地址均在节点设备N1至N9的网关表中命中为例,当节点设备N1向蓝牙Mesh网关G1发送消息时,消息的目的地址为蓝牙Mesh网关G1 的单播地址,TTL为1跳的消息跳数结合第一设定冗余度(例如消息的TTL为2);当节点设备N1向蓝牙Mesh网关G2发送消息时,消息的目的地址为蓝牙Mesh网关G2的单播地址,TTL示例为2;在节点设备N2至N9分别向蓝牙Mesh网关G1和蓝牙Mesh网关G2发送消息的情况下,目的地址和TTL的设置可同理进行,此处不再展开。
需要说明的是,如果蓝牙Mesh网关G1和G2的单播地址未在某一节点设备的网关表中命中,则节点设备发送消息的目的地址可以是蓝牙Mesh网络中蓝牙Mesh网关的组播地址,消息的TTL可以是节点设备相距最近的蓝牙Mesh网关的消息跳数结合第一设定冗余度;例如,节点设备N1向蓝牙Mesh网关G1和蓝牙Mesh网关G2发送消息时,蓝牙Mesh网关G1和蓝牙Mesh网关G2的单播地址未在节点设备N1的网关表中命中,则节点设备N1发送消息的目的地址为蓝牙Mesh网络中蓝牙Mesh网关的组播地址,消息的TTL可以示例为2(例如节点设备N1发送的消息需至少到达蓝牙Mesh网关G1)。
另一方面,节点设备可与智能手机等终端设备进行消息传输,此时节点设备可通过代理节点设备与终端设备进行通信,例如,节点设备发送的消息可在蓝牙Mesh网络中进行中继转发,从而到达代理节点设备,进而由代理节点设备将消息发送给终端设备。在此情况下,本申请实施方式可由终端设备的每个代理节点设备向蓝牙Mesh网络中的节点设备,周期性的广播消息,以向蓝牙Mesh网络中的节点设备通告代理节点设备的存在;并且,每个代理节点设备在周期性广播消息时,消息的TTL逐次递减;从而蓝牙Mesh网络中的节点设备可在网关表中,记录各个代理节点设备的单播地址,以及相距各个代理节点设备的消息跳数。作为可选实施方式,节点设备在网关表中设置代理节点设备的记录的方式,与在网关表中设置蓝牙Mesh网关的记录的方式可同理实现。需要说明的是,代理节点设备负责将蓝牙Mesh网络中节点设备发送的消息,转发给智能手机等终端设备,而终端设备也可将节点设备发送的消息同步到云端,因此代理节点设备与终端设备可结合构成蓝牙Mesh网关的功能。
在一些实施方式中,代理节点设备可确定广播消息的当前TTL,当前TTL相比于代理节点设备上一次的广播消息的TTL顺序递减。从而,代理节点设备可向处于当前TTL的跳数范围内的节点设备,广播消息;代理节点设备的广播消息包括代理节点设备的单播地址和当前TTL。进而,处于当前TTL的跳数范围内的节点设备,基于接收的广播消息,可在网关表中记录代理节点设备的单播地址以及更新与代理节点设备的消息跳数;更新的消息跳数根据当前接收的广播消息的当前TTL确定。
终端设备的各个代理节点设备,均以上述方式周期性的广播消息,并且广播消息的TTL逐次递减,则蓝牙Mesh网络中的节点设备可在网关表中记录得到各个代理节点设备的单播地址,以及与各个代理节点设备相距的消息跳数。
在一些实施方式中,代理节点设备可在与终端设备建立代理连接后,开始在蓝牙Mesh网络中,按照TTL递减的顺序(例如TTL从高到低依序递减的顺序),周期性的发送消息,并且消息至少包括代理节点设备的单播地址和当前TTL。从而,蓝牙Mesh网络中的节点设备在接收到代理节点设备发送的消息后,可在网关表中记录节点设备的单播地址,并且根据代理节点设备广播的消息的当前TTL,在网关表中记录或者更新与代理节点设备相距的消息跳数。也就是说,节点设备在多次接收到同一代理节点设备的广播消息时,下一次 接收的广播消息的TTL,可覆盖上一次接收的广播消息的TTL,以实现在网关表中更新与代理节点设备的消息跳数。
在一些实施方式中,图6A示例性的示出了节点设备向终端设备发送消息的示例图,如图6A所示,针对蓝牙Mesh网络中的节点设备N1至N9,节点设备N3、N6和N9可作为终端设备的代理节点设备,并且节点设备N3定义为代理节点设备P1,节点设备N6定义为代理节点设备P2,节点设备N9定义为代理节点设备P3;则节点设备N2、N5和N8与代理节点设备P1、P2和P3的距离为1跳,节点设备N1、N4和N7与代理节点设备P1、P2和P3的距离为2跳。作为可选实施方式,代理节点设备周期性广播消息的最大TTL,可以与节点设备距代理节点设备的最远跳数相应;从而代理节点设备可从该最大TTL开始,逐次的递减TTL,以实现周期性的在蓝牙Mesh网络中广播消息。基于此,代理节点设备P1、P2和P3可分别从TTL为2开始,逐次的递减TTL,从而在蓝牙Mesh网络中广播消息。
例如,代理节点设备P1、P2和P3可先从TTL为2开始,在蓝牙Mesh网络中广播消息,从而处于1跳范围内的节点设备N2、N5和N8,以及处于2跳范围内的N1、N4和N7均可接收到代理节点设备的广播消息;进而节点设备N2、N5和N8可分别在网关表中记录代理节点设备P1、P2和P3的单播地址以及2条的消息跳数,节点设备N1、N4和N7可分别在网关表中记录代理节点设备P1、P2和P3的单播地址以及2条的消息跳数。
代理节点设备P1、P2和P3在下一次广播消息时,可设置TTL为1,从而处于1跳范围内的节点设备N2、N5和N8可接收到代理节点设备的广播消息,而相距2跳的节点设备N1、N4和N7无法接收到代理节点设备的广播消息;进而,节点设备N2、N5和N8可分别在网关表中查询到代理节点设备P1、P2和P3的记录,从而将与代理节点设备P1、P2和P3的消息跳数更新为1。
进一步的,蓝牙Mesh网络中的节点设备在向终端设备发送消息时,节点设备可从网关表中确定终端设备的代理节点设备相应的消息跳数,从而根据该消息跳数,确定与该消息跳数相比具有第二设定冗余度的TTL;进而节点设备可根据该TTL,在蓝牙Mesh网络中发送消息,以使得节点设备发送的消息能到达终端设备。作为可选实施方式,第二设定冗余度可以大于上文描述的第一设定冗余度(第一设定冗余度为目的设备为蓝牙Mesh网关时,消息的TTL对应的设定冗余度),例如,第二设定冗余度为第一设定冗余度加1。
进一步结合图6A所示,节点设备N2、N5和N8需要通过代理节点设备P1、P2和P3,与终端设备进行通信;并且节点设备N2、N5和N8处于代理节点设备P1、P2和P3的1跳范围内,则节点设备N2、N5和N8可以在网关表中记录与代理节点设备P1、P2和P3相距的消息跳数为1;从而节点设备N2、N5和N8在向终端设备发送消息时,节点设备N2、N5和N8可从网关表中查询与终端设备的代理节点设备P1、P2和P3相距的消息跳数(例如1),进而在该消息跳数的基础上增加第二设定冗余度,得到节点设备N2、N5和N8发送消息时的TTL。例如,以第一设定冗余度为1为例,则第二设定冗余度可以为第一设定冗余度加1,比如第二设定冗余度为2,从而节点设备N2、N5和N8确定与代理节点设备P1、P2和P3的消息跳数为1时,可确定节点设备N2、N5和N8发送消息的TTL为3;从而节点设备N2、N5和N8以TTL为3发送消息。
需要说明的是,本申请实施方式在节点设备与代理节点设备的消息跳数的基础上,进一步增加第二设定冗余度,并且第二设定冗余度大于第一设定冗余度,是因为代理节点设备距离终端设备还存在一跳的传输距离,因此节点设备在向终端设备发送消息时的TTL,相比于向蓝牙Mesh网关发送消息时的TTL应至少大1。
进一步结合图6A所示,节点设备N1、N4和N7与代理节点设备P1、P2和P3相距2跳,则节点设备N1、N4和N7可以在网关表中记录与代理节点设备P1、P2和P3相距的消息跳数为2;从而节点设备N1、N4和N7在向终端设备发送消息时,节点设备N1、N4和N7可从网关表中查询与代理节点设备P1、P2和P3相距的消息跳数(例如2),进而在该消息跳数的基础上,增加第二设定冗余度(例如2),得到节点设备N2、N5和N8发送消息时的TTL(例如4)。在示例中,节点设备N1、N4和N7以TTL为4发送消息。
在一些实施方式中,针对与代理节点设备相距最远消息跳数的节点设备,本申请实施方式可将节点设备向终端设备发送的消息的TTL,在第二设定冗余度的基础上进一步增加设定值(设定值例如1),以使得相距代理节点设备最远的节点设备所发送的消息,能够在蓝牙Mesh网络中进行更多次的消息协助转发,从而提升消息到达终端设备的成功率和抗干扰能力;例如,基于节点设备N1、N4和N7与代理节点设备的消息跳数为2(示例中的最远消息跳数),本申请实施方式在第二设定冗余度(例如2)的基础上,可进一步增加设定值(例如1),从而得到节点设备N1、N4和N7向终端设备发送消息的TTL(例如节点设备N1、N4和N7向终端设备发送消息的TTL为5)。
在一些实施方式中,节点设备在向终端设备发送消息时,可确定终端设备的代理节点设备的单播地址,从而根据该单播地址从网关表中查询代理节点设备的记录。如果网关表中存在该单播地址对应的代理节点设备的记录(即该单播地址在网关表中命中),则节点设备可从查询到的记录中,确定代理节点设备相距的消息跳数,从而根据该消息跳数与第二设定冗余度,确定节点设备发送消息的TTL;进而节点设备,以终端设备的地址为目的地址,以所确定的TTL,在蓝牙Mesh网络中发送消息。
在一些实施方式中,终端设备的代理节点设备可能存在与终端设备断开代理连接的情况,此时,断开代理连接的代理节点设备可在蓝牙Mesh网络中广播代理连接断开消息(例如以最大TTL广播代理连接断开消息);从而接收到该代理连接断开消息的节点设备,可在网关表中将断开代理连接的代理节点设备对应的记录进行删除。例如,代理节点设备广播的代理连接断开消息可以携带代理节点设备的单播地址,从而接收到代理连接断开消息的节点设备,可根据代理连接断开消息中携带的单播地址,将网关表中该单薄地址相应的记录进行删除。
进一步的,如果终端设备的代理节点设备均断开了代理连接,则节点设备的网关表中可记录蓝牙Mesh网关的单播地址和相距的消息跳数,从而节点设备可根据蓝牙Mesh网关的单播地址和消息跳数,确定发送消息时的TTL。在一个实施方式对应的示例中,图6B示例性的示出了代理节点设备断开代理连接的示例图,如图6B所示,基于蓝牙Mesh网络中的节点设备与代理节点设备的最大TTL为2,则节点设备N3、N6和N9在断开代理连接后,节点设备N3、N6和N9以TTL为2,在蓝牙Mesh网络中广播代理连接断开消息;从而节点设备N2、N5、N8、N1、N4和N7可分别在网关表中,删除节点设备N3、N6和 N9的记录;此时,节点设备N1至N9的网关表中可存在蓝牙Mesh网关的记录,从而节点设备N1至N9中的任一节点设备在发送消息时,可根据蓝牙Mesh网关的单播地址和消息跳数,确定发送消息时的TTL。
本申请实施方式提供的消息传输方法中,节点设备可向蓝牙Mesh网关和终端设备发送消息,为合理设置节点设备向蓝牙Mesh网关和终端设备发送消息时的TTL,蓝牙Mesh网关和终端设备的代理节点设备可按照TTL递减的顺序,周期性的广播消息,从而使得节点设备在网关表中记录蓝牙Mesh网关的单播地址和消息跳数,以及代理节点设备的单播地址和消息跳数。进而,节点设备在向蓝牙Mesh网关发送消息时,可根据网关表中记录的蓝牙Mesh网关的消息跳数以及第一设定冗余度,确定相比于蓝牙Mesh网关的消息跳数具有第一设定冗余度的TTL,从而实现节点设备在向蓝牙Mesh网关发送消息时的TTL动态优化,能够在有限冗余的消息转发下,保障节点设备向蓝牙Mesh网关发送消息的成功率,并且降低消息的不必要传输,提升蓝牙Mesh网络的消息传输性能。
在节点设备在向终端设备发送消息时,节点设备可根据网关表中记录的终端设备的代理节点设备的消息跳数以及第二设定冗余度,确定具有第二设定冗余度的TTL,从而实现节点设备在向终端设备发送消息时的TTL动态优化,能够在代理节点设备沟通节点设备与终端设备,并且消息有限冗余转发的情况下,保障节点设备向终端设备发送消息的成功率,并且降低消息的不必要传输,提升蓝牙Mesh网络的消息传输性能。
可见,本申请实施方式可动态优化节点设备向目的设备发送消息时的TTL(目的设备例如蓝牙Mesh网关或者终端设备),在保障消息发送成功率的情况下,减少不必要的消息传输、优化大规模蓝牙Mesh网络的消息传输性能。
下面对本申请实施方式提供的消息发送装置进行介绍,下文描述的消息发送装置可以认为是节点设备为实现本申请实施方式提供的消息发送方法所需设置的功能模块,下文描述的装置内容可与上文描述的内容相互对应参照。
在一些实施方式中,图7示例性的示出了本申请实施方式提供的消息发送装置的可选框图,该装置可应用于节点设备,参照图7,该装置可以包括:
目的确定模块710,用于确定节点设备待发送的消息对应的目的设备。
查询模块711,用于在预先维护的消息跳数表中至少查询目的设备与节点设备对应的消息跳数,消息跳数表至少记录目的设备的广播消息与节点设备之间的消息跳数。
TTL确定模块712,用于根据消息跳数,确定与消息跳数相比具有设定冗余度的生存时间TTL。
消息发送模块713,用于根据所确定的TTL,在蓝牙Mesh网络中发送消息;其中,消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
在一些实施方式中,目的设备的广播消息按照TTL递减的顺序,周期性的在蓝牙Mesh网络中进行广播,并且下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;该装置还可用于:
如果节点设备处于多次广播消息的TTL范围内,则接收目的设备的多次广播消息;在消息跳数表中,以下一次接收的广播消息的TTL,更新目的设备的广播消息与节点设备之 间的消息跳数。
在一些实施方式中,目的设备包括蓝牙Mesh网关和终端设备之中的任一项,其中,终端设备通过代理节点设备发出广播消息。
在目的设备为蓝牙Mesh网关时,作为可选实施方式,消息跳数表至少记录蓝牙Mesh网关与节点设备之间的消息跳数。
在目的设备为终端设备时,作为可选实施方式,消息跳数表至少记录终端设备的代理节点设备与节点设备之间的消息跳数。
在一些实施方式中,在目的设备为蓝牙Mesh网关时,查询模块711,用于在预先维护的消息跳数表中至少查询目的设备与节点设备对应的消息跳数包括:在消息跳数表中至少查询节点设备与蓝牙Mesh网关之间的消息跳数。
TTL确定模块712,用于根据消息跳数,确定与消息跳数相比具有设定冗余度的生存时间TTL包括:根据消息跳数,确定与消息跳数相比具有第一设定冗余度的TTL。
在一些实施方式中,在目的设备为终端设备时,查询模块711,用于在预先维护的消息跳数表中至少查询目的设备与节点设备对应的消息跳数包括:在消息跳数表中至少查询节点设备与终端设备的代理节点设备之间的消息跳数。
TTL确定模块712,用于根据消息跳数,确定与消息跳数相比具有设定冗余度的生存时间TTL包括:根据消息跳数,确定与消息跳数相比具有第二设定冗余度的TTL;第二设定冗余度大于第一设定冗余度,第一设定冗余度为目的设备为蓝牙Mesh网关时,消息的TTL对应的设定冗余度。
在一些实施方式中,消息跳数表还记录目的设备的广播消息的源地址;在目的设备为蓝牙Mesh网关时,目的设备的广播消息的源地址为蓝牙Mesh网关的单播地址;在目的设备为终端设备时,目的设备的广播消息的源地址为,终端设备的代理节点设备的单播地址。
本申请实施方式还提供一种节点设备,该节点设备可通过设置上述的应用于节点设备的消息发送装置,以实现本申请实施方式提供的消息发送方法。在一些实施方式中,图8示例性的示出了节点设备的可选框图,如图8所示,该节点设备可以包括至少一个处理器81,至少一个通信接口82,至少一个存储器83和至少一个通信总线84。
在本申请实施方式中,处理器81、通信接口82、存储器83、通信总线84的数量为至少一个,且处理器81、通信接口82、存储器83通过通信总线84完成相互间的通信。
可选的,通信接口82可以为用于进行网络通信的通信模块的接口。
可选的,处理器81可能是CPU,GPU(Graphics Processing Unit,图形处理器),NPU(嵌入式神经网络处理器),FPGA(Field Programmable Gate Array,现场可编程逻辑门阵列),TPU(张量处理单元),AI芯片,特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施方式的一个或多个集成电路等。
存储器83可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
其中,存储器83存储一条或多条计算机可执行指令,处理器81调用一条或多条计算机可执行指令,以执行本申请实施方式由节点设备执行的消息发送方法。
下面从广播设备的角度,对本申请实施方式提供的消息发送装置进行介绍,下文描述 的消息发送装置可以认为是广播设备(例如蓝牙Mesh网关或者终端设备的代理节点设备)为实现本申请实施方式提供的消息发送方法所需设置的功能模块,下文描述的装置内容可与上文描述的内容相互对应参照。
在一些实施方式中,图9示例性的示出了本申请实施方式提供的消息发送装置的另一可选框图,该装置可应用于广播设备,参照图9,该装置可以包括:
消息广播模块910,用于按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数;其中,下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;
消息获取模块911,用于获取节点设备发送的消息;其中,消息在从节点设备发出时,根据节点设备的消息跳数表中查询的目的设备与节点设备对应的消息跳数,以及设定冗余度确定TTL;并且消息在蓝牙Mesh网络中转发一次,则消息的TTL递减一次,当消息的TTL小于设定的第一值时,消息停止在蓝牙Mesh网络中转发。
在一些实施方式中,消息广播模块910,用于按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数包括:
确定广播消息的当前TTL,当前TTL相比于上一次的广播消息的TTL顺序递减。
向处于当前TTL的跳数范围内的节点设备广播消息,以使得当前TTL的跳数范围内的节点设备,根据接收的广播消息在消息跳数表中至少更新广播消息与节点设备之间的消息跳数;其中,更新的消息跳数根据广播消息的当前TTL确定。
本申请实施方式还提供一种广播设备,该广播设备可通过设置上述的应用于节点设备的消息发送装置,以实现本申请实施方式提供的消息发送方法。在一些实施方式中,广播设备的可选结构可结合图8所示,包括至少一个存储器和至少一个处理器,存储器存储一条或多条计算机可执行指令,处理器调用一条或多条计算机可执行指令,以执行如本申请实施方式由广播设备执行的消息发送方法。可选的,广播设备可以为蓝牙Mesh网关或者终端设备的代理节点设备。
本申请实施方式还提供一种设备智能互联系统,该设备智能互联系统可以包括节点设备,以及广播设备;该广播设备可以包括蓝牙Mesh网关或者终端设备的代理节点设备。在本申请实施方式中,设备智能互联系统中的节点设备可以用于执行本申请实施方式提供的由节点设备执行的消息发送方法(例如,设备智能互联系统中的节点设备为本申请实施方式上述提供的节点设备);设备智能互联系统中的广播设备可以用于执行本申请实施方式提供的由广播设备执行的消息发送方法(例如,设备智能互联系统中的广播设备为本申请实施方式上述提供的广播设备)。
本申请实施方式提供的设备智能互联系统可以应用于智能家居、智慧办公等设备智能互联场景。例如,在智能家居场景下,节点设备可以是带有蓝牙通信功能的家庭电子设备(例如,智能灯具、智能电视、净水器等);在智能家居场景下,蓝牙Mesh网关可以例如智能音箱、多模网关等。
本申请实施方式还提供一种存储介质,存储介质存储一条或多条计算机可执行指令, 一条或多条计算机可执行指令被执行时,实现如本申请实施方式提供的由节点设备执行的消息发送方法,或者,如本申请实施方式提供的由广播设备执行的消息发送方法。
本申请实施方式还提供一种计算机程序,计算机程序被执行时,实现如本申请实施方式提供的由节点设备执行的消息发送方法,或者,如本申请实施方式提供的由广播设备执行的消息发送方法。
上文描述了本申请实施方式提供的多个实施方式方案,各实施方式方案介绍的各可选方式可在不冲突的情况下相互结合、交叉引用,从而延伸出多种可能的实施方式方案,这些均可认为是本申请实施方式披露、公开的实施方式方案。
虽然本申请实施方式披露如上,但本申请并非限定于此。任何本领域技术人员,在不脱离本申请的精神和范围内,均可作各种更动与修改,因此本申请的保护范围应当以权利要求所限定的范围为准。

Claims (12)

  1. 一种消息发送方法,其中,应用于节点设备,所述方法包括:
    确定所述节点设备待发送的消息对应的目的设备;
    在所述节点设备预先维护的消息跳数表中,至少查询所述目的设备与所述节点设备对应的消息跳数;所述消息跳数表至少记录所述目的设备的广播消息与所述节点设备之间的消息跳数;
    根据所述消息跳数,确定消息的生存时间TTL;所述TTL与所述消息跳数相比具有设定冗余度;
    根据所确定的TTL,在蓝牙Mesh网络中发送所述消息;其中,所述消息在蓝牙Mesh网络中转发一次,则所述消息的TTL递减一次,当所述消息的TTL小于设定的第一值时,所述消息停止在蓝牙Mesh网络中转发。
  2. 根据权利要求1所述的方法,其中,所述目的设备的广播消息按照TTL递减的顺序,周期性的在蓝牙Mesh网络中进行广播,并且下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;所述方法还包括:
    如果所述节点设备处于多次广播消息的TTL范围内,则接收所述目的设备的多次广播消息;在所述消息跳数表中,以下一次接收的广播消息的TTL,更新所述目的设备的广播消息与所述节点设备之间的消息跳数。
  3. 根据权利要求1所述的方法,其中,所述目的设备包括蓝牙Mesh网关和终端设备之中的任一项,其中,所述终端设备通过代理节点设备发出广播消息;
    在所述目的设备为蓝牙Mesh网关时,所述消息跳数表至少记录所述目的设备的广播消息与所述节点设备之间的消息跳数包括:所述消息跳数表至少记录所述蓝牙Mesh网关与所述节点设备之间的消息跳数;
    在所述目的设备为终端设备时,所述消息跳数表至少记录所述目的设备的广播消息与所述节点设备之间的消息跳数包括:所述消息跳数表至少记录所述终端设备的代理节点设备与所述节点设备之间的消息跳数。
  4. 根据权利要求3所述的方法,其中,在所述目的设备为蓝牙Mesh网关时,所述在所述节点设备预先维护的消息跳数表中,至少查询所述目的设备与所述节点设备对应的消息跳数包括:
    在所述消息跳数表中至少查询所述节点设备与所述蓝牙Mesh网关之间的消息跳数;
    所述根据所述消息跳数,确定消息的生存时间TTL包括:
    根据所述消息跳数,确定消息的TTL,所确定的TTL相比所述消息跳数具有第一设定冗余度。
  5. 根据权利要求3所述的方法,其中,在所述目的设备为终端设备时,所述在所述节点设备预先维护的消息跳数表中,至少查询所述目的设备与所述节点设备对应的消息跳数包括:
    在所述消息跳数表中至少查询所述节点设备与所述终端设备的代理节点设备之间的消息跳数;
    所述根据所述消息跳数,确定消息的生存时间TTL包括:
    根据所述消息跳数,确定TTL,所确定的TLL相比所述消息跳数具有第二设定冗余度;所述第二设定冗余度大于第一设定冗余度,所述第一设定冗余度为所述目的设备为蓝牙Mesh网关时,消息的TTL对应的设定冗余度。
  6. 根据权利要求1-5任一项所述的方法,其中,所述消息跳数表还记录所述目的设备的广播消息的源地址;在所述目的设备为蓝牙Mesh网关时,所述目的设备的广播消息的源地址为蓝牙Mesh网关的单播地址;在所述目的设备为终端设备时,所述目的设备的广播消息的源地址为,终端设备的代理节点设备的单播地址。
  7. 一种消息发送方法,其中,应用于广播设备,所述方法包括:
    按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数;其中,下一次的广播消息的TTL相比于上一次的广播消息的TTL顺序递减;
    获取节点设备发送的消息;其中,所述消息在从所述节点设备发出时,所述消息的TTL根据所述节点设备的消息跳数表中查询的目的设备与所述节点设备对应的消息跳数,以及设定冗余度确定;并且所述消息在蓝牙Mesh网络中转发一次,则所述消息的TTL递减一次,当所述消息的TTL小于设定的第一值时,所述消息停止在蓝牙Mesh网络中转发。
  8. 根据权利要求7所述的方法,其中,所述按照TTL递减的顺序,周期性的在蓝牙Mesh网络中广播消息,以使得接收到广播消息的节点设备,根据广播消息中的TTL在消息跳数表中至少记录广播消息与节点设备之间的消息跳数包括:
    确定广播消息的当前TTL,所述当前TTL相比于上一次的广播消息的TTL顺序递减;
    向处于当前TTL的跳数范围内的节点设备广播消息,以使得当前TTL的跳数范围内的节点设备,根据接收的广播消息在消息跳数表中至少更新广播消息与节点设备之间的消息跳数;其中,更新的消息跳数根据广播消息的当前TTL确定。
  9. 一种设备智能互联系统,其中,包括节点设备和广播设备;所述节点设备用于执行如权利要求1-6任一项所述的消息发送方法,所述广播设备用于执行如权利要求7-8任一项所述的消息发送方法;所述广播设备包括蓝牙Mesh网关或者终端设备的代理节点设备。
  10. 一种节点设备,其中,包括至少一个存储器和至少一个处理器,所述存储器存储一条或多条计算机可执行指令,所述处理器调用所述一条或多条计算机可执行指令,以执行如权利要求1-6任一项所述的消息发送方法。
  11. 一种广播设备,其中,包括至少一个存储器和至少一个处理器,所述存储器存储一条或多条计算机可执行指令,所述处理器调用所述一条或多条计算机可执行指令,以执行如权利要求7-8任一项所述的消息发送方法;所述广播设备为蓝牙Mesh网关或者终端设备的代理节点设备。
  12. 一种存储介质,其中,所述存储介质存储一条或多条计算机可执行指令,所述一条或多条计算机可执行指令被执行时,实现如权利要求1-6任一项所述的消息发送方法,或者,如权利要求7-8任一项的消息发送方法。
PCT/CN2023/074278 2022-07-01 2023-02-02 消息发送方法、设备智能互联系统、相关设备及存储介质 WO2024001190A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210765475.4 2022-07-01
CN202210765475.4A CN115297526A (zh) 2022-07-01 2022-07-01 消息发送方法、设备智能互联系统、相关设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024001190A1 true WO2024001190A1 (zh) 2024-01-04

Family

ID=83822511

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074278 WO2024001190A1 (zh) 2022-07-01 2023-02-02 消息发送方法、设备智能互联系统、相关设备及存储介质

Country Status (2)

Country Link
CN (1) CN115297526A (zh)
WO (1) WO2024001190A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297192B (zh) * 2022-06-17 2024-03-12 浙江大华技术股份有限公司 Mesh网络数据传输方法、Mesh网络节点及存储介质
CN115297526A (zh) * 2022-07-01 2022-11-04 浙江猫精人工智能科技有限公司 消息发送方法、设备智能互联系统、相关设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072699A1 (en) * 2013-04-12 2016-03-10 Selex Es S.P.A. Smf-type communication method for a manet network, network node and mobile network which implement this communication method
CN107171883A (zh) * 2016-03-08 2017-09-15 华为技术有限公司 检测转发表的方法、装置和设备
US20180343200A1 (en) * 2017-05-26 2018-11-29 Qualcomm Incorporated Congestion control and message analysis in a wireless mesh network
CN111542029A (zh) * 2020-04-18 2020-08-14 深圳市中科蓝讯科技股份有限公司 蓝牙Mesh的节点绑定方法、TTL值优化方法及其系统、计算机可读存储介质
US20200344667A1 (en) * 2018-02-07 2020-10-29 Telefonaktiebolaget Lm Ericsson (Publ) A method for updating a number of hops that is to be used for communication between a publisher mesh node and a subscriber mesh node in a wireless mesh network
CN115297526A (zh) * 2022-07-01 2022-11-04 浙江猫精人工智能科技有限公司 消息发送方法、设备智能互联系统、相关设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072699A1 (en) * 2013-04-12 2016-03-10 Selex Es S.P.A. Smf-type communication method for a manet network, network node and mobile network which implement this communication method
CN107171883A (zh) * 2016-03-08 2017-09-15 华为技术有限公司 检测转发表的方法、装置和设备
US20180343200A1 (en) * 2017-05-26 2018-11-29 Qualcomm Incorporated Congestion control and message analysis in a wireless mesh network
US20200344667A1 (en) * 2018-02-07 2020-10-29 Telefonaktiebolaget Lm Ericsson (Publ) A method for updating a number of hops that is to be used for communication between a publisher mesh node and a subscriber mesh node in a wireless mesh network
CN111542029A (zh) * 2020-04-18 2020-08-14 深圳市中科蓝讯科技股份有限公司 蓝牙Mesh的节点绑定方法、TTL值优化方法及其系统、计算机可读存储介质
CN115297526A (zh) * 2022-07-01 2022-11-04 浙江猫精人工智能科技有限公司 消息发送方法、设备智能互联系统、相关设备及存储介质

Also Published As

Publication number Publication date
CN115297526A (zh) 2022-11-04

Similar Documents

Publication Publication Date Title
WO2024001190A1 (zh) 消息发送方法、设备智能互联系统、相关设备及存储介质
TWI641249B (zh) 用於網格網路的資料轉發方法及節點設備
CN111328058B (zh) 一种蓝牙Mesh低功耗节点动态唤醒方法
Tran et al. Congestion adaptive routing in mobile ad hoc networks
US10250503B2 (en) Routing method and wireless node for wireless mesh network
CN102377666B (zh) 具有平均速率和突发速率控制的基于泛洪的路由协议
US20080095059A1 (en) System and method for providing an adaptive value of TTL (Time to Live) for broadcast/multicast messages in a mesh network using a hybrid wireless mesh protocol
KR100617715B1 (ko) 모바일 애드 혹 네트워크에서 fatim 전송 방법 및이를 위한 매체 액세스 제어 프로토콜 계층 모듈
US11290942B2 (en) System and method for independent dominating set (IDS) based routing in mobile AD hoc networks (MANET)
CN108123873B (zh) 数据转发路径选择方法及装置、存储介质、服务端
US7782799B2 (en) Join message load control system and method in network using PIM-SSM
WO2023045143A1 (zh) 一种基于时间脉冲源的混合路由协议的实现方法
CN101232458A (zh) 一种基于maodv协议的多路径扩展方法
CN112004216B (zh) 一种用于蓝牙Mesh中继节点转发处理的方法
WO2010111837A1 (zh) 广播方法及通信设备
JP6493945B2 (ja) 高密度大規模ネットワーク向けのGreen Power(プロキシテーブルのスケーリング)
TW202110266A (zh) 在網狀網路中之裝置之間共享之定向轉遞資訊
US20220295240A1 (en) System and method for implementing relay nodes in a wireless network
CN115915098B (zh) 一种5g与tsn跨域ptp中bmca实现方法
WO2024036891A1 (zh) 消息发送参数的设置方法、电子设备及存储介质
Glaropoulos et al. Enhanced IEEE 802.11 power saving for multi-hop toy-to-toy communication
CN109787903B (zh) 集中式网络中无碰撞的组播数据反馈方法
CN102595552B (zh) 基于自适应动态机制的无线分组网按需路由维护方法
CN213562601U (zh) 一种基于专用mesh网络传感器的积木机器人系统模块
CN114097278B (zh) 网状网中的各设备之间的定向转发信息共享

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23829383

Country of ref document: EP

Kind code of ref document: A1