An adaptive periodic dynamic update method, a Bluetooth device, and an electronic device

By using an adaptive periodic dynamic update method, the message interaction cycle of low-power nodes is dynamically adjusted, which solves the problems of power consumption and cache loss in MESH networks and achieves low-power and efficient message transmission.

CN115696291BActive Publication Date: 2026-03-13GOODIX TECH (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In a MESH network, improper message interaction cycle settings for low-power nodes can lead to increased power consumption or loss of cached messages.

Method used

An adaptive periodic dynamic update method is adopted to dynamically adjust the message interaction period between low-power nodes and friend nodes through Bluetooth devices and electronic devices. The adaptive period value Tpoll is set according to the message queue capacity and the size of the cached messages to ensure the effectiveness of message interaction and low power consumption.

Benefits of technology

It effectively prevents the loss of cached messages, saves power consumption of low-power nodes to the greatest extent, and improves message transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696291B_ABST
    Figure CN115696291B_ABST
Patent Text Reader

Abstract

This application provides an adaptive periodic dynamic update method that enables nodes to receive complete messages while saving power consumption in a MESH network. The method is applied to a second node in a MESH network, which further includes at least a first node and a third node. The method includes: establishing a friendship relationship between the second node and the first node; the second node caching cached messages sent by the third node; the second node interacting with the first node within an adaptive period, wherein the second node sends the cached messages to the first node during the message interaction; the second node setting a value Tpoll for the adaptive period; and the second node sending a friend update message to the first node, the friend update message including the value Tpoll of the adaptive period, which is used by the first node to dynamically update the adaptive period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and more specifically, to an adaptive periodic dynamic update method, a Bluetooth device, and an electronic device. Background Technology

[0002] In a mesh network, according to the Sig Mesh Spec standard, low-power nodes (LPNs) need to periodically interact with friend nodes to retrieve cached messages and prevent the friendship from breaking down. However, defining the length of this period becomes a crucial issue. If the defined period is too short, it will increase the LPN's power consumption; if the defined period is too long, cached messages from friend nodes may be lost. Summary of the Invention

[0003] This application provides an adaptive periodic dynamic update method, a Bluetooth device, and an electronic device that can dynamically adjust the period of LPN message interaction, which can prevent the loss of cached messages by friend nodes and save LPN power consumption to the greatest extent.

[0004] Firstly, an adaptive periodic dynamic update method is provided, applied to a second node in a MESH network, the MESH network further including at least a first node and a third node. The method includes: establishing a friendship relationship between the second node and the first node; the second node caching cached messages sent by the third node; the second node interacting with the first node within an adaptive period, wherein the second node sends the cached messages to the first node during the message interaction; the second node setting a value Tpoll for the adaptive period; and the second node sending a friend update message to the first node, the friend update message including the value Tpoll of the adaptive period, the value Tpoll being used by the first node to dynamically update the adaptive period.

[0005] In one possible implementation, the adaptive period includes a first time period during which the second node interacts with the first node via messages. During the message interaction, the second node sending the cached message to the first node includes: within the first time period, the second node receives at least one request message from the first node and sends the cached message to the first node at least once.

[0006] In one possible implementation, the adaptive period further includes a second time, wherein the second node includes a message queue, and during the second time, the message queue in the second node caches the cached messages sent by the third node.

[0007] In one possible implementation, when the message size that the message queue can hold is smaller than the size of the cached message, the second node has an overflow message.

[0008] In one possible implementation, the second node sets the value of the adaptive period Tpoll to satisfy the following formula: Tpoll = Q / (P+K)*Tpre, where Q represents the message size that the message queue in the second node can hold, P represents the size of the cached messages in the message queue in the current adaptive period, K represents the size of the overflow messages in the current adaptive period, and Tpre represents the value of the previous adaptive period.

[0009] In one possible implementation, the second node sending the friend update message to the first node includes: after receiving all the request messages sent by the first node within the current adaptive period, the second node sends the friend update message to the first node; wherein, the friend update message includes the value Tpoll of the adaptive period and the field MD, and the field MD is a message all-sent flag.

[0010] Secondly, an adaptive periodic dynamic update method is provided, applied to a first node in a MESH network, wherein the MESH network further includes at least a second node. The method includes: the first node establishing a friendship relationship with the second node; the first node interacting with the second node via messages within an adaptive period, wherein the first node sends a request message to the second node and receives a cache message sent by the second node; the first node receiving a friend update message sent by the second node, wherein the friend update message includes a value Tpoll of the adaptive period; and the first node dynamically updating the adaptive period based on the value Tpoll.

[0011] In one possible implementation, the adaptive period includes a first time period during which the first node interacts with the second node via message exchange. During the message exchange, the first node sends a request message to the second node and receives a cache message sent by the second node, including: during the first time period, the first node is in a wake-up state, and the first node sends the request message to the second node at least once and receives the cache message at least once.

[0012] In one possible implementation, the first node receiving the friend update message sent by the second node includes: after the first node has sent all the request messages within the current adaptive period to the second node, the first node receives the friend update message sent by the second node.

[0013] In one possible implementation, the adaptive period further includes a second time during which the first node is in a sleep state, and the first node dynamically updates the adaptive period according to the value Tpoll of the adaptive period, including: the first node dynamically updates the second time in the current adaptive period according to the value Tpoll of the adaptive period.

[0014] Thirdly, a Bluetooth device is provided, characterized in that the Bluetooth device is applied to a second node in a MESH network, the MESH network further including at least a first node and a third node, the Bluetooth device comprising: a processing unit for establishing a friendship relationship with the first node; a storage unit for caching cached messages sent by the third node; and a transceiver unit for interacting with the first node via messages within an adaptive period, wherein the transceiver unit sends the cached messages to the first node during the message interaction; the processing unit is further configured to set a value Tpoll for the adaptive period; and the transceiver unit is further configured to send a friend update message to the first node, the friend update message including the value Tpoll of the adaptive period, the value Tpoll of the adaptive period being used by the first node to dynamically update the adaptive period.

[0015] In one possible implementation, the storage unit includes a message queue, and when the size of the message that the message queue can hold is smaller than the size of the cached message, the message queue has an overflow message.

[0016] In one possible implementation, the processing unit sets the value of the adaptive period Tpoll to satisfy the following formula: Tpoll = Q / (P+K)*Tpre, where Q represents the message size that the message queue can hold, P represents the size of the cached messages in the message queue in the current adaptive period, K represents the size of the overflow messages in the current adaptive period, and Tpre represents the value of the previous adaptive period.

[0017] In one possible implementation, the transceiver unit is further configured to send a friend update message to the first node, including: after receiving all request messages within the current adaptive period, the transceiver unit sends the friend update message to the first node; wherein, the friend update message includes the value Tpoll of the adaptive period and a field MD, and the field MD is a message all-sent flag.

[0018] Fourthly, a Bluetooth device is provided, which is applied to a first node in a MESH network, the MESH network further including at least a second node. The Bluetooth device includes: a processing unit for establishing a friendship relationship with the second node; a transceiver unit for interacting with the second node via messages within an adaptive period, wherein in the message interaction, the transceiver unit sends a request message to the second node and receives a cached message sent by the second node; the transceiver unit is also used to receive a friend update message sent by the second node, the friend update message including a value Tpoll of the adaptive period; the processing unit is also used to dynamically update the adaptive period based on the value Tpoll of the adaptive period.

[0019] In one possible implementation, the adaptive period includes a first time period, during which the transceiver unit interacts with the second node via messages. During the message interaction, the transceiver unit sends a request message to the second node and receives a cached message sent by the second node, including: during the first time period, the first node is in a wake-up state, and the transceiver unit sends the request message to the second node at least once and receives the cached message at least once.

[0020] In one possible implementation, the transceiver unit is further configured to receive the friend update message sent by the second node, including: after the transceiver unit has sent all the request messages within the current adaptive period to the second node, the transceiver unit receives the friend update message sent by the second node.

[0021] In one possible implementation, the adaptive period further includes a second time during which the first node is in a sleep state, and the processing unit is further configured to dynamically update the adaptive period according to the value Tpoll of the adaptive period, including: the processing unit dynamically updates the second time according to the value Tpoll of the adaptive period.

[0022] Fifthly, an electronic device is provided, the electronic device comprising at least a processor and a memory, the memory for storing a computer program, and the processor for calling and running the computer program stored in the memory to perform the methods described in the first and second aspects above.

[0023] Based on the above technical solution, the second node in the MESH network can set an adaptive period value Tpoll according to the size of the messages its message queue can hold and the size of the cached messages sent by the third node. Through the adaptive period value Tpoll, the first node in the MESH network can dynamically update the message interaction period between the first and second nodes. Specifically, the first node can dynamically update the time it spends in a sleep state (i.e., a low-power state). When the cached messages sent by the third node to the first node are large, the corresponding adaptive period value Tpoll decreases, the message interaction period shortens, and the time the first node spends in a low-power state decreases; conversely, when the cached messages sent by the third node to the first node are small, the corresponding adaptive period value Tpoll increases, the message interaction period lengthens, and the time the first node spends in a low-power state lengthens. Therefore, this method not only prevents the second node from losing cached messages but also maximizes the power saving of the first node. Attached Figure Description

[0024] Figure 1 A typical MESH network structure is shown.

[0025] Figure 2 This is a flowchart of an adaptive periodic dynamic update method applied to a second node according to an embodiment of this application.

[0026] Figure 3 This is a flowchart of an adaptive periodic dynamic update method applied to the first node according to an embodiment of this application.

[0027] Figure 4 The periodic changes of the first node are shown.

[0028] Figure 5 The interaction process between the first node and the second node within an adaptive cycle of an embodiment of this application is illustrated.

[0029] Figure 6 The procedure for setting the numerical value of Tpoll for the adaptive period is shown.

[0030] Figure 7 A schematic frame of a Bluetooth device according to an embodiment of this application. Figure 1 .

[0031] Figure 8 A schematic frame of a Bluetooth device according to an embodiment of this application. Figure 2 .

[0032] Figure 9 This is a schematic block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0033] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0034] Figure 1 A typical mesh network structure is illustrated. A mesh network can be considered a wireless communication system based on a network topology. This mesh network includes multiple nodes, each capable of message transmission. In practical applications, these nodes can be distributed in manufacturing plants, office buildings, shopping malls, business parks, homes, and other environments. The mesh network can include any number of nodes. Within the mesh network, some nodes can establish friendly relationships. A node that has established a friendly relationship receives and buffers message packets sent to another node by other nodes in the mesh network. When another node sends a request, it forwards the buffered message packet to that other node.

[0035] In this embodiment, the MESH network includes at least three nodes: a first node, a second node, and a third node. The first and second nodes establish a friendly relationship, and the third node is any node in the MESH network other than the first and second nodes. For example, Figure 1 Including nodes A through K, taking node A as the first node and node B as the second node as an example, nodes A and B establish a friendship relationship. Node B can store messages sent to node A by a third node in the MESH network. The third node is at least one of the other nodes. Node B will only send the stored message to node A when node A sends a request to it. Node A operates in the MESH network, alternating between sleep and wake-up states. In the sleep state, node A is in a low-power mode. Here, node A can be called a low-power node, and node B can be called a friend node. In the MESH network, node B can also establish friendship relationships with multiple low-power nodes, for example, in... Figure 1 In the process, nodes A and C, as low-power nodes, establish friendly relationships with node B respectively.

[0036] Figure 2This is a flowchart illustrating an adaptive periodic dynamic update method applied to a second node according to an embodiment of this application. This method 200 can be applied to a second node in a MESH network, meaning the method is executed by the second node. The MESH network also includes a first node and a third node, where the third node is any node in the MESH network other than the first and second nodes. Regarding message transmission between the first and second nodes, one node is a Low-Power Node (LPN), and the other is a Friend node. This embodiment uses the example of the first node being a Low-Power Node and the second node being a Friend node for description. The related operations of other Low-Power Nodes and Friend nodes in the MESH network can be the same as those of the first and second nodes in this application. Figure 2 As shown, the method 200 may include some or all of the following steps.

[0037] In step 210, a friendship relationship is established between the second node and the first node;

[0038] In step 220, the second node caches the cached messages sent by the third node;

[0039] In step 230, the second node interacts with the first node via messages during the adaptive cycle. During the message interaction, the second node sends cached messages to the first node.

[0040] In step 240, the second node sets the value of the adaptive period Tpoll;

[0041] In step 250, the second node sends a friend update message to the first node. The friend update message includes the value Tpoll of the adaptive period. The value Tpoll of the adaptive period is used by the first node to dynamically update the adaptive period.

[0042] The second node includes a message queue, which is used to cache at least one cached message sent by a third node in the MESH network to the first node. In step 220, the third node sends the cached message to the second node for caching, thereby transmitting it to the first node. When the size of the cached message sent by the third node to the first node in the MESH network exceeds the size of the message queue, an overflow message occurs on the second node, which is the cached message discarded by the message queue.

[0043] In step 230, the adaptive period includes a first time interval, which is the time from when the second node starts receiving the first request message from the first node to when the second node sends a friend update message to the first node. This first time interval is the time when the first node is in a wake-up state. During this first time interval, the second node receives at least one request message from the first node and sends at least one cached message to the first node. Specifically, the second node sends a cached message to the first node every time it receives a request message from the first node, until the second node has sent all the cached messages within the current adaptive period. After the second node has finished sending all the cached messages, since the first node is unaware of this, the first node still sends a request message to the second node, which is the last request message. The initial wake-up time of the first node is determined by the size of the cached messages in the message queue of the second node within the current adaptive cycle. If the cached messages in the message queue of the second node are larger, that is, if there are more cached messages in the message queue, the first node takes longer to receive cached messages, and the first wake-up time of the first node is longer. If the cached messages in the message queue of the second node are smaller, that is, if there are fewer cached messages in the message queue, the first node takes shorter to receive cached messages, and the first wake-up time of the first node is shorter.

[0044] In step 240, the second node sets the value Tpoll of the adaptive period to satisfy the following formula:

[0045] Tpoll = Q / (P+K)*Tpre,

[0046] Where Q represents the size of the message queue in the second node that can hold messages.

[0047] P represents the size of the cached messages in the message queue during the current adaptive cycle.

[0048] K represents the size of the overflow message within the current adaptive cycle.

[0049] Tpre represents the value of the previous adaptive cycle.

[0050] After receiving the last request message from the first node, the second node calculates the adaptive period value Tpoll, since it has already sent all cached messages within the current adaptive period. The adaptive period also includes a second time, which includes the time the first node is in a sleep state. During this second time, the message queue in the second node caches cached messages sent by the third node. The adaptive period value Tpoll is used by the first node to adjust the second time; that is, the first node adjusts its sleep time within the current adaptive period based on the adaptive period value Tpoll. It should be understood that the adaptive period includes both the first and second times. From the formula for calculating the adaptive period value Tpoll in step 240, it can be deduced that if the size of the cached messages sent by the third node within the current adaptive period is smaller, the calculated adaptive period value Tpoll is larger, and the corresponding current adaptive period is longer; conversely, if the size of the cached messages sent by the third node within the current adaptive period is larger, the calculated adaptive period value Tpoll is smaller, and the corresponding current adaptive period is shorter.

[0051] In step 250, the second node sending the friend update message to the first node includes: after receiving all request messages sent by the first node within the current adaptive cycle, the second node sends a friend update message to the first node. The second node sends the calculated adaptive cycle value Tpoll to the first node through the friend update message. The adaptive cycle value Tpoll is used by the first node to dynamically update the adaptive cycle. The first node dynamically adjusts the second time before entering sleep based on the adaptive cycle value Tpoll. When the adaptive cycle value Tpoll is smaller, the current adaptive cycle is shorter, and further, the first node spends less time in sleep within the current adaptive cycle; when the adaptive cycle value Tpoll is larger, the current adaptive cycle is longer, and further, the first node spends more time in sleep within the current adaptive cycle.

[0052] Specifically, the second node extends the friend update message format to include both the MD field and the adaptive periodic value Tpoll. In this embodiment, according to the Bluetooth MESH specification, the friend update message format is shown in Table 1, and the friend update message format supports format extension.

[0053] Table 1

[0054] Fields Size (bytes) Remark Flags 1 Includes IV Update flag and key refresh flag IV Index 4 The known current IV Index value of the Friend node MD 1 Determine if the message queue is empty

[0055] In this embodiment, the message format after expanding the friend update message by 2 bytes is shown in Table 2:

[0056] Table 2

[0057] Fields Size (bytes) Remark Flags 1 Includes IV Update flag and key refresh flag IV Index 4 The known current IV Index value of the Friend node MD 1 Determine if the message queue is empty Poll Period 2 Determine the adaptive cycle of the low-power node

[0058] In this friend's update message, the MD field is a flag indicating that all messages have been sent. It is used to determine whether the current message queue is empty. If MD = 1, it means that the current message queue is not empty; if MD = 0, it means that the current message queue is empty.

[0059] In the embodiments of this application, Figure 2 The method shown can be applied to a second node in a mesh network, which is a friend node. The mesh network also includes a first node and a third node, where the first node is a low-power node, and the third node is any node in the mesh network other than the first and second nodes. The low-power node and the friend node establish a friendship relationship. Figure 2 The method described allows a friend node to set an adaptive period value, Tpoll, based on the size of its message queue and the size of cached messages sent by other nodes in the MESH network. This adaptive period value, Tpoll, is then sent to low-power nodes in the MESH network via a friend update message. This enables low-power nodes to dynamically update the message interaction period with friend nodes. This method not only prevents cached messages from being lost by friend nodes and reduces the risk of message overflow, but also minimizes the power consumption of low-power nodes.

[0060] Figure 3 This is a flowchart illustrating an adaptive periodic dynamic update method applied to a first node according to an embodiment of this application. This method 300 can be applied to a first node in a MESH network, i.e., the first node executes the method. The MESH network also includes a second node, which is used to establish a friendship relationship with the first node. Optionally, the MESH network may also include a third node, which is any node in the MESH network other than the first and second nodes. The third node is used to send cached messages to the first node; specifically, the third node transmits the cached messages to the first node through the second node. Regarding message transmission between the first and second nodes, one node is a low-power node (LPN), and the other node is a friend node. This embodiment of the application describes the first node as a low-power node and the second node as a friend node as an example. The related operations of other low-power nodes and friend nodes in the MESH network can be the same as the related operations of the first and second nodes in this application. Figure 3 As shown, the method 300 may include some or all of the following steps.

[0061] In step 310, the first node establishes a friendship relationship with the second node.

[0062] In step 320, the first node interacts with the second node via messages within the adaptive cycle. During the message interaction, the first node sends a request message to the second node and receives a cached message sent by the second node.

[0063] In step 330, the first node receives a friend update message sent by the second node. The friend update message includes the value Tpoll of the adaptive period.

[0064] In step 340, the first node dynamically updates the adaptive period based on the value Tpoll of the adaptive period.

[0065] In step 320, the adaptive period includes a first time, which includes the time from when the first node starts sending the first request message to the second node to when the first node receives the friend update message sent by the second node. During the first time, the first node is in a wake-up state, sends the request message to the second node at least once, and receives the cached message at least once. The cached message is a message sent by the third node to the first node. It should be understood that the first time the first node is in a wake-up state is determined by the size of the cached message in the message queue of the second node in the current adaptive period. If the cached message in the message queue of the second node is larger, that is, if there are more cached messages in the message queue, the first node takes longer to receive cached messages, and the first time the first node is in a wake-up state is longer. Conversely, if the cached message in the message queue of the second node is smaller, that is, if there are fewer cached messages in the message queue, the first node takes shorter to receive cached messages, and the first time the first node is in a wake-up state is shorter.

[0066] In step 330, after the first node sends all request messages within the current adaptive period, it receives a friend update message from the second node. This friend update message includes the adaptive period value Tpoll, which is used by the first node to dynamically update the adaptive period. After the first node sends the last request message, the second node begins setting the adaptive period value Tpoll. Specifically, for each request message sent by the first node to the second node, the first node receives a corresponding cached message from the second node. This continues until the second node has sent all cached messages within the current adaptive period. The first node is unaware of this and continues sending request messages to the second node, this time the last request message. After receiving this last request message, the second node, having already sent all cached messages in the message queue within the current adaptive period, sets the adaptive period value Tpoll and sends this value to the first node via a friend update message.

[0067] In step 340, the adaptive period value also includes a second time. During this second time, the first node is in a sleep state, i.e., a low-power state. The first node dynamically updates the second time based on the adaptive period value Tpoll, which is the time when the first node will enter the sleep state after ending its wake-up state in the current adaptive period. It should be understood that the adaptive period includes the first time when the first node is in the wake-up state and the second time when the first node is in the sleep state. The first time is determined by the size of the cached messages in the current message queue. The larger the cached messages in the message queue, the longer the wake-up time; the smaller the cached messages in the message queue, the shorter the wake-up time. After the first node receives all the cached messages in the current message queue, the second node calculates the adaptive period value Tpoll. Therefore, the calculated adaptive period value Tpoll at this time includes the experienced first time and the upcoming second time. The more cached messages the second node stores within the current adaptive cycle, the longer the first node's initial wake-up time, and the smaller the calculated adaptive cycle value Tpoll. Since the initial wake-up time is longer and Tpoll is smaller, the second wake-up time for the first node within the current adaptive cycle is shorter, meaning the first node spends less time in a sleep state. Conversely, the fewer cached messages the second node stores within the current adaptive cycle, the shorter the initial wake-up time for the first node, and the larger the calculated adaptive cycle value Tpoll. Again, the second wake-up time for the first node within the current adaptive cycle is longer, meaning the first node spends more time in a sleep state. Therefore, within the current adaptive cycle, after receiving an update message from a friend, the first node dynamically adjusts its upcoming second wake-up time (i.e., the time it will enter a sleep state) based on the adaptive cycle value Tpoll.

[0068] Specifically, Figure 4 This illustrates the periodic changes of the first node. Once the first node and the second node establish a friendship relationship, the initial cycle begins, as shown below. Figure 4 As shown, in the initial cycle, the first node is in a sleep state. During this initial cycle, the second node caches the cached messages sent to the first node by the third node. The first cycle begins after this sleep state ends. Figure 4As shown, for example, the first cycle includes a first time and a second time. The second time in the first cycle is the time during which the first node is in a sleep state within the first cycle, that is, the interval between the end time of the wake-up state within the first cycle and the start time of the wake-up state within the second cycle. It should be understood that in the embodiments of this application, the adaptive cycle is continuously updated and changed according to the value Tpoll of the adaptive cycle. That is to say, the cycle value of each adaptive cycle is not fixed, and both the first time and the second time within the adaptive cycle are constantly changing, that is, the time during which the first node is in a wake-up state and the time during which it is in a sleep state are constantly changing.

[0069] In the embodiments of this application, Figure 3 The method shown can be applied to a first node in a mesh network, which is a low-power node. The mesh network also includes a second and a third node, where the first node is a friend node, and the third node is any node in the mesh network other than the first and second nodes. A friendship relationship is established between the low-power node and the friend node. Figure 3 The method shown allows a low-power node to determine the adaptive period value Tpoll based on friend update messages sent by friend nodes. Furthermore, based on this adaptive period value Tpoll, the low-power node can dynamically update the message interaction period with friend nodes. This method not only ensures that the low-power node receives complete cached messages but also helps reduce its power consumption.

[0070] Figure 5 This illustration shows the interaction process between the first node and the second node within an adaptive cycle according to an embodiment of this application. In this embodiment, the MESH network includes at least three nodes: a first node, a second node, and a third node, wherein the third node is any node in the MESH network other than the first and second nodes. Figure 5 As shown, the method 400 may include some or all of the following steps.

[0071] In step 410, the first node and the second node establish a friendship relationship.

[0072] This can only be achieved after the first node and the second node have established a friendship relationship. Figure 5 Steps 420 to 490 in the method shown.

[0073] In step 420, the message queue in the second node caches the cached message at least once.

[0074] The cached message is the message sent from the third node to the first node.

[0075] In step 430, the first node enters the wake-up state.

[0076] In step 440, the first node sends a request message to the second node.

[0077] In step 450, after receiving the request message, the second node sends a cache message to the first node.

[0078] It should be understood that within the current adaptive cycle, steps 440 and 450 can be repeated multiple times. That is, the first node can continue to send a request message to the second node at least once. In response to each request message from the first node, the second node will continue to send cached messages to the first node until the second node finishes sending the last cached message. At this point, the second node has finished sending all its cached messages, but the first node is unaware of this.

[0079] In step 460, the first node sends a request message to the second node.

[0080] This request message is the last request message sent by the first node to the second node.

[0081] In step 470, the second node sets the value Tpoll for the adaptive period.

[0082] In step 480, the second node sends a friend update message to the first node.

[0083] In response to the last request message sent by the first node, the second node no longer sends cached messages, but instead sends a friend update message. Before sending the friend update message, the second node needs to set the adaptive period value Tpoll. The friend update message includes the adaptive period value Tpoll and the field MD. The adaptive period value Tpoll is used by the first node to dynamically update the adaptive period.

[0084] In step 490, the first node receives a friend update message, dynamically updates its sleep time according to the adaptive period value Tpoll, and enters a sleep state. This sleep time is the time the first node spends in a sleep state, i.e., a low-power state. Figure 4 The second time in the adaptive cycle.

[0085] In this embodiment, the first node and the second node establish a friendship relationship. Within an adaptive cycle, the message queue in the second node caches at least one cached message sent by the third node to the first node. During the current adaptive cycle, the first node enters a wake-up state. While in the wake-up state, the first node sends a request message to the second node. Upon receiving the request message, the second node sends the cached message from its message queue to the first node. It should be understood that while the first node is in the wake-up state during the current adaptive cycle, it can send one or more request messages to the second node and correspondingly obtain one or more cached messages from the second node. After the second node has sent all the cached messages in its message queue, the message queue is empty. The first node then sends another request message to the second node. The second node sets the adaptive cycle value Tpoll and places it in the friend update message. After all request messages within a cycle have been sent, the second node sends the friend update message to the first node, informing it that all cached messages have been sent within the current adaptive cycle and informing it of the adaptive cycle value Tpoll. After receiving an update message from a friend, the first node dynamically updates the time it will enter the sleep state based on the adaptive cycle value Tpoll, and then enters the sleep state.

[0086] Specifically, Figure 6 The procedure for setting the numerical value of Tpoll for the adaptive period is shown. Figure 6 The method shown is Figure 2 Step 240 or Figure 5 The specific implementation process of step 470. This step specifically includes steps 471 and 472.

[0087] In step 471, the second node calculates the adaptive cycle value Tpoll as Tpoll = Q / (P+K)*Tpre, where Q is the message size that the message queue in the second node can hold, P is the size of the cached messages in the message queue in the current adaptive cycle, K is the size of the overflow messages in the current adaptive cycle, and Tpre is the value of the previous adaptive cycle.

[0088] Specifically, if the size P of the cached message in the message queue during the current adaptive cycle is less than the size Q that the message queue in the second node can hold, then there is no message overflow, that is, the size K of the overflow message is zero. If the size P of the cached message in the message queue is equal to the size Q that the message queue in the second node can hold, then there may be a message overflow. Furthermore, if the size of the cached message sent by the third node to the first node is exactly equal to the size Q that the message queue can hold, then the size K of the overflow message is zero. If the size of the cached message sent by the third node to the first node is greater than the size Q that the message queue can hold, then the size K of the overflow message is greater than zero.

[0089] The second node dynamically updates the adaptive cycle value Tpoll within each adaptive cycle according to the formula in step 471. The current adaptive cycle value Tpoll depends on the size of the cached message sent by the third node. According to this formula, if the cached message sent by the third node in the current adaptive cycle is large, the adaptive cycle value Tpoll decreases, resulting in a shorter second sleep time for the first node in the current adaptive cycle; that is, the first node enters the wake-up state of the next cycle after a shorter sleep time. Conversely, if the cached message sent by the third node in the current adaptive cycle is small, the adaptive cycle value Tpoll increases, resulting in a longer second sleep time for the first node in the current adaptive cycle; that is, the first node enters the wake-up state of the next cycle after a longer sleep time. It should be noted that for the first cycle, i.e., the first adaptive cycle, the previous cycle is... Figure 4 The initial period shown can be configured to be 1s or 2s, etc. In this embodiment, the initial period value is not limited.

[0090] In step 472, the second node extends the friend update message format to include the adaptive periodic value Tpoll. In this embodiment, according to the Bluetooth MESH specification, the friend update message format is shown in Table 3, and the friend update message format supports format extension.

[0091] Table 3

[0092] Fields Size (bytes) Remark Flags 1 Includes IV Update flag and key refresh flag IV Index 4 The known current IV Index value of the Friend node MD 1 Determine if the message queue is empty

[0093] In this embodiment, the message format after expanding the friend's update message by 2 bytes is shown in Table 4:

[0094] Table 4

[0095] Fields Size (bytes) Remark Flags 1 Includes IV Update flag and key refresh flag IV Index 4 The known current IV Index value of the Friend node MD 1 Determine if the message queue is empty Poll Period 2 Determine the adaptive cycle of the low-power node

[0096] In this friend's update message, the MD field is a flag indicating that all messages have been sent. It is used to determine whether the current message queue is empty. If MD = 1, it means that the current message queue is not empty; if MD = 0, it means that the current message queue is empty.

[0097] In this embodiment of the application, by Figure 6 The method shown sets the adaptive period value Tpoll, thereby dynamically adjusting the time the first node is in sleep mode within a period. This approach simultaneously considers the low-power characteristics of the first node and ensures that the first node receives complete messages promptly based on updates to cached messages in the message queue, reducing the risk of message overflow. Figure 6 In step 472, the second node extends the friend update message format to include the adaptive period value Tpoll, thereby informing the first node of the adaptive period value Tpoll when sending a friend update message. This reduces additional message transmission and improves the message transmission efficiency between the first and second nodes.

[0098] Figure 7 This is a schematic block diagram of a Bluetooth device 600 according to an embodiment of this application. Figure 7 As shown, the Bluetooth device 600 is used as a second node in a MESH network, which also includes at least a first node and a third node. The Bluetooth device 600 includes:

[0099] Processing unit 630 is used to establish a friendship relationship with the first node.

[0100] Storage unit 610 is used to cache cached messages sent by the third node.

[0101] The transceiver unit 620 is used to interact with the first node via messages during the adaptive cycle. During the message interaction, the transceiver unit receives the cached messages sent to the first node.

[0102] The processing unit 630 is also used to set the value Tpoll of the adaptive period.

[0103] The transceiver unit 620 is also used to send a friend update message to the first node. The friend update message includes the value Tpoll of the adaptive period. The value Tpoll of the adaptive period is used by the first node to dynamically update the adaptive period.

[0104] Specifically, the adaptive period includes a first time period, during which the transceiver unit 620 is specifically used to: receive at least one request message sent by the first node and send at least one cached message to the first node during the first time period.

[0105] Specifically, the adaptive period also includes a second time, during which the storage unit 610 includes a message queue, and during this second time, the message queue in the storage unit 610 caches cached messages sent by the third node to the first node.

[0106] Specifically, if the message queue in storage unit 610 can hold a message size smaller than the size of the cached message, the storage unit 610 will have an overflow message, meaning that the earlier cached message will be discarded by the storage unit 610, and the cached message received by the first node will be incomplete.

[0107] Specifically, the processing unit 630 is used to: calculate the value Tpoll of the adaptive cycle as Tpoll = Q / (P+K)*Tpre, where Q is the message size that the message queue in the storage unit 610 can hold, P is the size of the cached messages in the message queue in the storage unit 610 in the current adaptive cycle, K is the size of the overflow messages in the storage unit 610 in the current adaptive cycle, and Tpre is the value of the previous adaptive cycle.

[0108] Specifically, the transceiver unit 620 is also used to: after receiving all request messages sent by the first node within the current adaptive cycle, send a friend update message to the first node. This friend update message includes the adaptive cycle value Tpoll and a field MD. The MD field is a message all-sent flag, used to inform the first node that all cached messages in the current message queue have been sent.

[0109] It should be understood that the Bluetooth device 600 can perform the corresponding operations performed by the second node in the MESH network in the above method embodiments, which will not be described in detail here for the sake of brevity.

[0110] In this embodiment, the Bluetooth device 600 can perform the corresponding operations executed by the second node in the MESH network in the above method embodiment, thereby enabling the first node to dynamically update the message interaction period with the second node. This Bluetooth device 600 not only prevents the second node from losing cached messages and reduces the risk of message overflow, but also minimizes the power consumption of the first node, reducing unnecessary power waste.

[0111] Figure 8 This is a schematic block diagram of a Bluetooth device 700 according to an embodiment of this application. Figure 8 As shown, the BLE device 700 is used as a first node in a mesh network, which also includes at least a second node. The Bluetooth device 700 includes:

[0112] Processing unit 720 is used to establish a friendship relationship with the second node.

[0113] The transceiver unit 710 is used to interact with the second node via messages during the adaptive cycle. During the message interaction, the transceiver unit sends request messages to the second node and receives cached messages sent by the second node.

[0114] The transceiver unit 710 is also used to receive friend update messages sent by the second node, the friend update messages including the adaptive period value Tpoll.

[0115] Processing unit 720 is also used to dynamically update the adaptive period based on the value of the adaptive period Tpoll.

[0116] Specifically, the adaptive period includes a first time period during which the first node is in a wake-up state, the transceiver unit 710 sends the request message to the second node at least once, and receives a cache message at least once.

[0117] Specifically, the transceiver unit 710 is used to receive friend update messages sent by the second node after sending all request messages within the current adaptive cycle to the second node.

[0118] Specifically, the adaptive cycle also includes a second time period during which the first node is in a sleep state, and the processing unit 720 dynamically updates the second time period according to the value Tpoll of the adaptive cycle.

[0119] It should be understood that the Bluetooth device 700 can perform the corresponding operations performed by the first node in the MESH network in the above method embodiments, which will not be described in detail here for the sake of brevity.

[0120] In this embodiment, the Bluetooth device 700 can perform the corresponding operations executed by the first node in the MESH network in the above method embodiment, enabling the first node to dynamically update the message interaction cycle with the second node. This Bluetooth device 800 not only allows the first node to promptly obtain cached messages from the second node and receive complete cached messages, but also helps the first node reduce power consumption and minimize unnecessary power waste.

[0121] This application also provides an electronic device 800, such as... Figure 9 As shown, the electronic device 800 includes at least a processor 810 and a memory 820. The memory 820 is used to store computer programs, and the processor 810 is used to call and run the computer programs stored in the memory 820 to execute the corresponding processes implemented by the first node or the second node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0122] The electronic device 800 may further include an input / output interface 830, which may include separate output and input interfaces, or it may be an integrated interface that integrates input and output. The output interface is used to output data, and the input interface is used to acquire input data.

[0123] In this embodiment, the electronic device 800 can function as a Bluetooth device 600 in a MESH network and execute the relevant operations and processes performed by the second node, or it can function as a Bluetooth device 700 in a MESH network and execute the relevant operations and processes performed by the first node. This electronic device 800 can prevent the second node from losing cached messages, reducing the risk of message overflow, and can also maximize the power consumption of the first node, reducing unnecessary power waste.

[0124] The aforementioned processor may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by software instructions. The aforementioned processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0125] The aforementioned memory can be volatile memory or non-volatile memory, or may include both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).

[0126] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the Bluetooth device in this application embodiment, and the computer program causes the computer to execute the corresponding processes implemented by the first node or the second node in the various methods of this application embodiment; for brevity, further details are omitted.

[0127] This application also provides a computer program product, including computer program instructions. This computer program product can be applied to the Bluetooth device in this application embodiment, and the computer program instructions cause the computer to execute the corresponding processes implemented by the first node or the second node in the various methods of this application embodiment; for simplicity, further details are omitted here.

[0128] The terms "system" and "network" used in the embodiments of this invention are often used interchangeably herein.

[0129] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0130] The specific examples in the embodiments of this application are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the embodiments of this application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and all such improvements or modifications fall within the protection scope of this application.

[0131] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of adaptive periodic dynamic updating, the method comprising: The method is applied to a second node in a MESH network, the MESH network further comprising at least a first node and a third node, the method comprising: establishing a friendship relationship between the second node and the first node; caching, by the second node, a cache message sent by the third node; interacting, by the second node, with the first node in an adaptive period, wherein the second node sends the cache message to the first node in the message interaction; the adaptive period further comprising a second time, the second node comprising a message queue, the message queue in the second node caching the cache message sent by the third node in the second time, the second node having an overflow message when a message size that the message queue can accommodate is less than a size of the cache message; the second node setting a value Tpoll of the adaptive period, the value Tpoll of the adaptive period set by the second node satisfying the following formula: Tpoll=Q / (P+K)*Tpre, wherein Q represents the message size that the message queue in the second node can accommodate, P represents the size of the cache message in the message queue in the current adaptive period, K represents the size of the overflow message in the current adaptive period, Tpre represents a value of a previous adaptive period; and sending, by the second node, a friend update message to the first node, the friend update message comprising the value Tpoll of the adaptive period, the value Tpoll of the adaptive period being used by the first node to dynamically update the adaptive period.

2. The method of claim 1, wherein, the adaptive period comprising a first time, the second node interacting with the first node in an adaptive period, wherein the second node sends the cache message to the first node in the message interaction comprising: in the first time, the second node receiving at least one request message sent by the first node and sending at least one cache message to the first node.

3. The method of claim 2, wherein, the second node sending the friend update message to the first node comprising: after the second node receives all the request messages sent by the first node in the current adaptive period, the second node sends the friend update message to the first node; wherein the friend update message comprises the value Tpoll of the adaptive period and a field MD, the field MD being a message all-sent flag.

4. A Bluetooth device, characterized in that The Bluetooth device is applied to a second node in a MESH network, the MESH network further comprising at least a first node and a third node, the Bluetooth device comprising: a processing unit configured to establish a friendship relationship with the first node; a storage unit configured to cache a cache message sent by the third node, the storage unit comprising a message queue, the message queue having an overflow message when a message size that the message queue can accommodate is less than a size of the cache message; a transceiving unit, configured to perform message interaction with the first node in the adaptive period, and in the message interaction, the transceiving unit sends the buffered message to the first node; the processing unit is further configured to set a value Tpoll of the adaptive period, and the processing unit sets the value Tpoll of the adaptive period to satisfy the following formula: Tpoll = Q / (P+K)*Tpre, wherein Q represents a size of messages that the message queue can accommodate, P represents a size of the buffered message in the message queue in the current adaptive period, K represents a size of the overflow message in the current adaptive period, Tpre represents a value of a previous adaptive period; and the transceiving unit is further configured to send a friend update message to the first node, and the friend update message comprises the value Tpoll of the adaptive period, and the value Tpoll of the adaptive period is used for the first node to dynamically update the adaptive period.

5. The Bluetooth apparatus of claim 4, wherein, the transceiving unit is further configured to send a friend update message to the first node, and the friend update message comprises: the transceiving unit sends the friend update message to the first node after receiving all the request messages in the current adaptive period; wherein the friend update message comprises the value Tpoll of the adaptive period and a field MD, and the field MD is a message all-sending flag bit.

6. An electronic device, comprising: The electronic device at least comprises a processor and a memory, the memory is configured to store a computer program, and the processor is configured to call and run the computer program stored in the memory to execute the method in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Bluetooth-based data communication method, storage medium and electronic equipment

    CN110213758A

  • Bluetooth Mesh low-power-consumption node dynamic awakening method

    CN111328058A