Network and node synchronization method

By introducing a method for synchronizing nodes to update their local time in Bluetooth Low Energy mesh networks, the problem of lack of time synchronization is solved, resulting in reduced device power consumption and message collision rate, and support for the coexistence of multiple wireless networks.

CN116249192BActive Publication Date: 2026-03-20REALTEK SEMICON CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

The lack of a network-wide time synchronization mechanism in Bluetooth Low Energy mesh networks leads to increased device power consumption and a higher probability of message collisions.

Method used

A first synchronization node is introduced to receive synchronization messages, determine whether to update the local time based on the synchronization messages, and forward the synchronization messages after updating, so as to achieve time synchronization in the network.

Benefits of technology

By synchronizing time, the probability of message collisions is reduced, device power consumption is lowered, and time-slot multiplexing of channels with other wireless communication technologies is supported, enabling the coexistence of multiple wireless network communication technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116249192B_ABST
    Figure CN116249192B_ABST
Patent Text Reader

Abstract

The present application relates to a network and a node synchronization method, the node synchronization method comprising: receiving a synchronization message by a first synchronization node in the network; determining whether to update a first local time of the first synchronization node according to the synchronization message by the first synchronization node; updating the first local time according to a synchronization time of the synchronization message by the first synchronization node when it is determined to update the first local time; and updating the synchronization time in the received synchronization message with the current first local time by the first synchronization node, and forwarding the updated synchronization message.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to time synchronization between nodes in a network, and in particular to a network and node synchronization method. BACKGROUND

[0002] Bluetooth Low Energy Mesh (BLE Mesh) networks are becoming more and more popular because of their advantages such as wide coverage, high interconnection and low power consumption. More and more smart devices are joining the BLE Mesh network.

[0003] It is known that there is no mechanism for full network time synchronization in the conventional BLE Mesh network. Since each smart device in the BLE Mesh network can send a message at any time, other smart devices must also be in an active state at all times to ensure that they can receive messages that may arrive at any time. Therefore, as the number of smart devices in the BLE Mesh network increases, the probability of message collision increases, and the power consumption of the smart devices also increases. SUMMARY

[0004] The present disclosure provides a node synchronization method. In one embodiment, the node synchronization method comprises receiving, by a first synchronization node in a network, a synchronization message; determining, by the first synchronization node, whether to update a first local time of the first synchronization node based on the synchronization message; updating, by the first synchronization node, the first local time based on a synchronization time of the synchronization message when it is determined to update the first local time; and updating, by the first synchronization node, the synchronization time of the received synchronization message with the current first local time and forwarding the updated synchronization message.

[0005] The present disclosure provides a network. In one embodiment, the network comprises a first synchronization node. The first synchronization node has a first local time. The first synchronization node is configured to receive a synchronization message and determine whether to update the first local time when the synchronization message is received. The synchronization message comprises a synchronization time. When it is determined to update the first local time, the first synchronization node updates the first local time based on the synchronization time, and the first synchronization node updates the synchronization time of the received synchronization message with the current first local time and forwards the updated synchronization message.

[0006] In summary, the network and node synchronization method of the embodiments can determine whether to update the first local time according to the synchronization message, and update the synchronization time of the received synchronization message with the current first local time and forward the updated synchronization message after updating the first local time according to the synchronization time of the synchronization message. In this way, the synchronization nodes in the entire network can achieve time synchronization. After achieving time synchronization, each synchronization node in the network can control the timing of message sending to reduce the probability of message collision. In addition, more synchronization nodes can enter a low-power mode when there is no message transmission to reduce power consumption. Furthermore, time slots can be multiplexed with other wireless communication technologies, so that different wireless network communication technologies can coexist.

[0007] The detailed features and advantages of the present application are described in detail in the embodiments below, which are sufficient for any ordinary skilled person in the art to understand the technical content of the present application and implement it. According to the content disclosed in the specification, the scope of claims and the drawings, any ordinary skilled person in the art can easily understand the related purposes and advantages of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0008] Figure 1 A schematic diagram of an embodiment of a network.

[0009] Figure 2 A flowchart of an embodiment of a node synchronization method.

[0010] Figure 3 A flowchart of an embodiment of a second synchronization node sending a synchronization message.

[0011] Figure 4 A flowchart of an embodiment of step S12.

[0012] Figure 5 A flowchart of an embodiment of a node synchronization method.

[0013] Figure 6 A schematic diagram of an example of sending a synchronization message in a network.

[0014] Figure 7 A schematic diagram of an example of competing for a starting synchronization node in a network. DETAILED DESCRIPTION

[0015] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the following detailed description is made with reference to the accompanying drawings.

[0016] Figure 1 A schematic diagram of an embodiment of a network 100. Please refer to Figure 1, the network 100 can include at least one synchronization node (hereinafter referred to as a first synchronization node). Hereinafter, four first synchronization nodes 111-114 are taken as an example for illustration, but the number of the first synchronization nodes is not limited thereto. In addition, the network 100 can include a synchronization node (hereinafter referred to as a second synchronization node 120) as a starting synchronization node. The starting synchronization node refers to a synchronization node that actively generates and sends a synchronization message M1 in the network 100.

[0017] In some embodiments, each of the first synchronization nodes 111-114 can be a normal node or a friend node, and if it is a friend node, it corresponds to a low-power node. For example, the first synchronization nodes 111, 112, and 114 can be normal nodes, the first synchronization node 113 can be a friend node, and the first synchronization node 113 can correspond to a low-power node 130.

[0018] In some embodiments, the network 100 can be a Bluetooth Low Energy Mesh (BLE Mesh) network constructed by the first synchronization nodes 111-114, the second synchronization node 120, and the low-power node 130 through Bluetooth transmission technology. In other words, the first synchronization nodes 111-114, the second synchronization node 120, and the low-power node 130 can be electronic devices each having a Bluetooth module.

[0019] In some embodiments, the second synchronization node 120 is a Provisioner in the network 100. Each of the first synchronization nodes 111-114 and the low-power node 130 needs to be provisioned by the second synchronization node 120 when it first joins the network 100. In the provisioning, each of the first synchronization nodes 111-114 and the low-power node 130 can be assigned an Internet Protocol Address (IP Address) and a key for establishing a secure transmission channel. In some embodiments, the IP Address assigned to each of the first synchronization nodes 111-114 and the low-power node 130 can be a unicast address. In addition, the range of the unicast address of each of the first synchronization nodes 111-114 and the low-power node 130 can be 0x0001-0x7FFF. For example, the unicast address of the first synchronization node 111 can be 0x0005, the unicast address of the first synchronization node 112 can be 0x0004, the unicast address of the first synchronization node 113 can be 0x0001, the unicast address of the first synchronization node 114 can be 0x0003, and the unicast address of the low-power node 130 can be 0x0002.

[0020] In some embodiments, each of the first synchronization nodes 111-114 can have a first local time CK11-CK14, and the second synchronization node 120 can have a second local time CK2. In some implementations, each of the first synchronization nodes 111-114 can generate the first local time CK11-CK14 by an internal oscillator, but the present case is not limited thereto. Likewise, the second synchronization node 120 can also obtain its second local time CK2 by an internal oscillator.

[0021] In some embodiments, each of the first synchronization nodes 111-114 can store a first local weight W11-W14 and a first local sequence number N11-N14. Also, the second synchronization node 120 can store a second local weight W2 and a second local sequence number N2. In some implementations, each of the first synchronization nodes 111-114 and the second synchronization node 120 can store by, but not limited to, a random access memory (RAM), a cache, or the like.

[0022] In some embodiments, in the initial state, the first local sequence numbers N11-N14 and the second local sequence number N2 can all be initial values, such as zero. In addition, the second local weight W2 of the second synchronization node 120 can be greater than the first local weights W11-W14 of each of the first synchronization nodes 111-114. In some implementations, the first local weights W11-W14 of each of the first synchronization nodes 111-114 can be its unicast address, and the second local weight W2 of the second synchronization node 120 is 0xFFFF.

[0023] Figure 2 A flowchart of an embodiment of the node synchronization method is shown. Please refer to Figure 1 and Figure 2 In an embodiment of the node synchronization method, the first synchronization node 111 of the network 100 can first determine whether a synchronization message M1 is received (step S11). After determining that the synchronization message M1 is received, the first synchronization node 111 can determine whether to update its first local time CK11 according to the synchronization message M1 (step S12). The synchronization message M1 includes a synchronization weight WS, a synchronization sequence number NS, and a synchronization time CKS.

[0024] When determining not to update the first local time CK11, the first synchronization node 111 can discard the synchronization message Ml (step S13). When determining to update the first local time CK11, the first synchronization node 111 can update the first local time CK11 according to the synchronization time CKS of the synchronization message Ml (step S16). For example, the first synchronization node 111 can directly replace the value of the first local time CK11 with the value of the synchronization time CKS. However, the present application is not limited to this. The first synchronization node 111 can also update the value of the first local time CK11 by adding the estimated consumption time of the transmission and reception information to the value of the synchronization time CKS.

[0025] In step S16, the first synchronization node 111 can further update the first local weight W11 and the first local sequence number N11 according to the synchronization weight WS and the synchronization sequence number NS of the synchronization message Ml, respectively. For example, the first synchronization node 111 can directly replace the first local weight W11 with the synchronization weight WS and replace the first local sequence number N11 with the synchronization sequence number NS.

[0026] After updating the first local time CK11, the first synchronization node 111 can update the synchronization time CKS of the received synchronization message Ml with its current first local time CK11 and forward the updated synchronization message Ml (step S17) to other first synchronization nodes within its forwarding range. For example, the first synchronization node 111 forwards the updated synchronization message Ml to the first synchronization nodes 112 and 113. In one embodiment of step S17, the first synchronization node 111 replaces the value of the synchronization time CKS in the synchronization message Ml with the value of its current first local time CK11.

[0027] In this way, the first synchronization nodes 111-114 in the network 100 can achieve time synchronization with each other after performing the node synchronization method of any embodiment of the present application.

[0028] Figure 3 A flowchart of one embodiment of the method of sending a synchronization message by a second synchronization node is shown in FIG. 2. Referring to FIG. 2, in step S21, the second synchronization node 120 can determine whether a synchronization condition is met. In one embodiment, the second synchronization node 120 can periodically generate and broadcast a synchronization message Ml. In this embodiment, the synchronization condition can be that a predetermined synchronization period is reached or a non-synchronized node joins the network 100. In other words, the second synchronization node 120 can periodically generate and broadcast a synchronization message Ml. In this embodiment, the predetermined synchronization period can be 20 minutes, but the present application is not limited to this. Figures 1 to 3 In some embodiments, the synchronization message Ml can be broadcast by the second synchronization node 120 when a synchronization condition is met. In one embodiment, the second synchronization node 120 can first determine whether a synchronization condition is met (step S21). When determining that the synchronization condition is met, the second synchronization node 120 can generate and broadcast a synchronization message Ml (step S22). In some embodiments, the synchronization condition can be that a predetermined synchronization period is reached or a non-synchronized node joins the network 100. In other words, the second synchronization node 120 can periodically generate and broadcast a synchronization message Ml. In this embodiment, the predetermined synchronization period can be 20 minutes, but the present application is not limited to this.

[0029] In some embodiments, the synchronization message Ml can include a synchronization weight WS, a synchronization sequence number NS, and a synchronization time CKS. When generating the synchronization message Ml in step S22, the second synchronization node 120 can fill in the synchronization weight WS of the synchronization message Ml with its second local weight W2, fill in the synchronization sequence number NS of the synchronization message Ml with its current second local sequence number N2, and fill in the synchronization time CKS of the synchronization message Ml with its current second local time CK2. In other words, in the synchronization message Ml broadcasted by the second synchronization node 120, the synchronization time CKS is the second local time CK2 of the second synchronization node 120 when generating this synchronization message Ml. In this way, each of the first synchronization nodes 111-114 in the network 100 can perform the node synchronization method of any of the embodiments to maintain time synchronization with the second synchronization node 120, and thus achieve network-wide time synchronization.

[0030] In some implementations, the synchronization message Ml can be an advertising packet (Advertising Data) with a custom part. In this case, the synchronization weight WS can occupy 2 bytes, the synchronization sequence number NS can occupy 2 bytes, and the synchronization time CKS can occupy 4 bytes. In addition, the time to live (TTL) of the synchronization message Ml can always be 1.

[0031] In some embodiments, after generating the synchronization message Ml, the second synchronization node 120 can increment its second local sequence number N2 by one (step S23). In other words, the second local sequence number N2 will increase with the number of times the second synchronization node 120 generates the synchronization message Ml.

[0032] Figure 4 A flowchart of an embodiment of step S12. Please refer to Figures 1 to 4In one embodiment of step S12, the first synchronization node 111 can determine whether to update the first local time CK11 according to the synchronization weight WS of the synchronization message Ml and the first local weight W11 thereof. In some embodiments, the first synchronization node 111 can compare the synchronization weight WS with the first local weight W11 (step S121). When the synchronization weight WS is greater than the first local weight W11, the first synchronization node 111 determines to update the first local time CK11 (step S122), and the first synchronization node 111 can subsequently perform the aforementioned steps S16 and S17. For example, assuming that the first synchronization node 111 currently stores the first local weight W11 as 0x0005, and the synchronization weight WS of the received synchronization message Ml is 0xFFFF, the first synchronization node 111 determines to update. When the synchronization weight WS is less than the first local weight W11, the first synchronization node 111 determines not to update the first local time CK11 (step S123), and subsequently performs step S13 to discard the synchronization message Ml. For example, assuming that the first synchronization node 111 currently stores the first local weight W11 as 0x0005, and the synchronization weight WS of the received synchronization message Ml is 0x0001, the first synchronization node 111 determines not to update. The synchronization message Ml can be broadcasted by the first synchronization node with unicast address 0x0001, for example, by the first synchronization node 113 when it is campaigning for the starting node (details of the campaign for the starting node are described later).

[0033] In one embodiment of step S12, when the result of step S121 is that the synchronization weight WS is equal to the first local weight W11, the first synchronization node 111 can compare the synchronization sequence number NS of the synchronization message Ml with the first local sequence number N11 (step S124). When the synchronization sequence number NS is greater than the first local sequence number N11, the first synchronization node 111 determines to update the first local time CK11 (step S125), and the first synchronization node 111 can subsequently perform the aforementioned steps S16 and S17. For example, assuming that the first synchronization node 111 has updated the first local weight W11 to 0xFFFF and the first local sequence number N11 to 0 according to the previous synchronization message Ml. And assuming that the first synchronization node 111 currently receives the synchronization message Ml with the synchronization weight WS of 0xFFFF and the synchronization sequence number NS of 1 (indicating that this is the second broadcast of the synchronization message Ml by the second synchronization node 120), the first synchronization node 111 further compares the synchronization sequence number NS with the first local sequence number N11 because the synchronization weight WS is equal to the first local weight W11, and the first synchronization node 111 determines to update the first local time CK11 because the synchronization sequence number NS is greater than the first local sequence number N11 (the greater synchronization sequence number NS indicates that the synchronization message Ml is new).

[0034] When the synchronization sequence number NS is less than or equal to the first local sequence number N11, the first synchronization node 111 determines not to update the first local time CK11 (step S126), and the first synchronization node 111 can continue to perform step S13 to discard the synchronization message Ml. In this case, the smaller synchronization sequence number NS indicates that the synchronization message Ml is old, and the equal synchronization sequence number NS and the first local sequence number N11 indicates that the first synchronization node 111 has been updated.

[0035] Figure 5 A flowchart of an embodiment of the node synchronization method is shown in FIG. 1. Please refer to FIG. 1. Figures 1 to 5 In an embodiment of the node synchronization method, after determining that the synchronization message Ml is not received in step S11, the first synchronization node 111 can further determine whether the time of not receiving the synchronization message Ml has exceeded a predetermined period (step S18). In some embodiments, the predetermined period can be N agreed synchronization periods. Wherein, N is greater than or equal to 1. For example, an agreed synchronization period can be 20 minutes, and the predetermined period can be 3 agreed synchronization periods, i.e. 60 minutes.

[0036] When the first synchronization node 111 determines that the time of not receiving the synchronization message Ml has exceeded a predetermined period, the first synchronization node 111 determines that the current starting synchronization node (e.g. the second synchronization node 120) has failed and needs to start to compete for the starting synchronization node (step S19). At this time, the first synchronization node 111 starts to periodically generate the synchronization message Ml, and periodically broadcasts the synchronization message Ml.

[0037] In an embodiment of step S19, when determining to start to compete for the starting synchronization node, the first synchronization node 111 can first initialize its first local weight W11, and initialize its first local sequence number N11. Then, the first synchronization node 111 generates the synchronization message Ml according to the current first local time CK11, the initialized first local weight W11 (e.g. its unicast address) and the initialized first local sequence number N11 (e.g. 0), and broadcasts the synchronization message Ml. Wherein, the synchronization time CKS in the synchronization message Ml is the current first local time CK11, the synchronization weight WS in the synchronization message Ml is the initialized first local weight W11, and the synchronization sequence number NS in the synchronization message Ml is the initialized first local sequence number N11.

[0038] In one embodiment of the node synchronization method, when the first synchronization node 111 determines in step S12 that the first local time CK11 is to be updated, the first synchronization node 111 can first determine whether it is in the race for the primary synchronization node (step S14). When the first synchronization node 111 is actively and periodically generating and broadcasting the synchronization message Ml, it is in the race for the primary synchronization node. In this case, the first synchronization node 111 determines that it has lost the race and stops actively and periodically generating and broadcasting the synchronization message Ml (step S15). The first synchronization node 111 then proceeds to step S16 to update its first local time CK11, first local weight W11, and first local sequence number N11 based on the received synchronization message Ml. When the first synchronization node 111 is not actively and periodically generating and broadcasting the synchronization message Ml, it is not in the race for the primary synchronization node. In this case, the first synchronization node 111 can directly proceed to step S16 to update its first local time CK11, first local weight W11, and first local sequence number N11 based on the received synchronization message Ml.

[0039] In some embodiments, when the second synchronization node 120 resumes normal operation after failure, it can actively send out the synchronization message Ml to regain the status of the primary synchronization node in the network 100. For example, when the second synchronization node 120 fails and the first synchronization node 111 becomes the new primary synchronization node and periodically generates and sends out the synchronization message MA based on its first local time CK11, first local weight W11, and first local sequence number N11 (as shown in FIG. 2), the second synchronization node 120 can actively generate and send out the synchronization message Ml based on its second local time CK2, second local weight W2, and second local sequence number N2 when it resumes normal operation, so that the first synchronization node 111 stops sending out the synchronization message MA when it receives the synchronization message Ml. In this way, the second synchronization node 120 can regain the status of the primary synchronization node in the network 100 and continue to periodically generate and send out the synchronization message Ml. Figure 7

[0040] ​In some embodiments, after the low-power node 130 exits the low-power mode, the first synchronization node 113 as the friend node can generate a synchronization message Ml according to the current first local time CK13 and forward the synchronization message Ml to the low-power node 130, so that the low-power node 130 can update its local time according to the synchronization message Ml. For example, the low-power node 130 can enter an active mode after exiting the low-power mode and send a query signal to the first synchronization node 113. Upon receiving the query signal from the low-power node 130, the first synchronization node 113 can generate and send the synchronization message Ml to the low-power node 130 according to the current first local time CK13, the first local weight W13 and the first local sequence number N13, so that the low-power node 130 updates its local time according to the synchronization time CKS of the synchronization message Ml.

[0041] Figure 6 Fig. 1 shows an exemplary schematic diagram of the network 100. It is noted that, for simplicity, some of the synchronization messages are not shown in the diagram. Please refer to Fig. 2 for a detailed description of the network 100. Figures 1 to 6 In an exemplary embodiment of the network 100, the second synchronization node 120 can broadcast a synchronization message MS to the first synchronization nodes 111, 112 within its broadcast range. Upon receiving the synchronization message MS, the first synchronization nodes 111, 112 can determine whether to update their first local times CK11, CK12 according to the synchronization weight WS of the synchronization message MS and their first local weights W11, W12, respectively. For example, the synchronization weight WS of the synchronization message MS can be the second local weight W2 of the second synchronization node 120, e.g., 0xFFFF, the first local weight W11 can be 0x0005, and the first local weight W12 can be 0x0004. In addition, the synchronization sequence number NS and the first local sequence numbers N11, N12 can be 1, for example.

[0042] Since the synchronization weight WS of the synchronization message MS is greater than the first local weights W11, W12, the first synchronization nodes 111, 112 update the first local times CK11, CK12 according to the synchronization time CKS of the synchronization message MS, update the first local weights W11, W12 according to the synchronization weight WS of the synchronization message MS (i.e., the first local weights W11, W12 stored in the first synchronization nodes 111, 112 both become 0xFFFF), and update the first local sequence numbers N11, N12 according to the synchronization sequence number NS of the synchronization message MS, respectively. After the update, the first synchronization nodes 111, 112 replace the value of the synchronization time CKS of the synchronization message MS with the value of the current first local time CK11, CK12 of the first synchronization nodes 111, 112, respectively, to generate the synchronization messages MA, MB, respectively, and forward the synchronization messages MA, MB, respectively. The first synchronization node 111 forwards the synchronization message MA to the second synchronization node 120 and the first synchronization nodes 112, 113 within its forwarding range, and the first synchronization node 112 forwards the synchronization message MB to the second synchronization node 120 and the first synchronization nodes 111, 113 within its forwarding range. At this time, the second synchronization node 120 discards any received synchronization message. In addition, the first synchronization node 112 discards the synchronization message MA (because the synchronization weight WS of the synchronization message MA is equal to the current first local weight W12, and the synchronization sequence number NS of the synchronization message MA is equal to the current first local sequence number N12), and the first synchronization node 111 discards the synchronization message MB (because the synchronization weight WS of the synchronization message MB is equal to the current first local weight W11, and the synchronization sequence number NS of the synchronization message MB is equal to the current first local sequence number N11).

[0043] The first local weight W13 of the first synchronization node 113 can be, for example, 0x00, and the first synchronization node 113 can update its first local time CK13 according to one of the synchronization message MA and the synchronization message MB, and discard the other. At this time, assuming that the first synchronization node 113 receives the synchronization message MA first, the first synchronization node 113 can update its first local time CK13, first local weight W13 (which becomes 0xFFFF after the update), and first local sequence number N13 (which becomes 1 after the update) according to the synchronization message MA because the synchronization weight WS of the synchronization message MA is greater than the first local weight W13. After the update, the first synchronization node 113 replaces the value of the synchronization time CKS of the synchronization message MA with the value of the current first local time CK13 of the first synchronization node 113 to generate the synchronization message MC, and forwards the synchronization message MC. After forwarding according to this principle level by level, all the synchronization nodes in the network 100 can achieve time synchronization.

[0044] Although the low-power node 130 does not receive the synchronization message MC forwarded by the first synchronization node 113 in time, after the low-power node 130 exits the low-power mode, the first synchronization node 113 will generate and forward the synchronization message MC to the low-power node 130 according to the current first local time CK13, so that the low-power node 130 can also keep time synchronization with other synchronization nodes.

[0045] Figure 7 An example schematic diagram of the network in which the first synchronization nodes 111-114 compete for the start synchronization node. Note that, for the sake of simplicity, some of the synchronization messages are not shown in the process of the competition for the start synchronization node. Please refer to Figures 1 to 7 In the example of the competition for the start synchronization node, each of the first synchronization nodes 111-114 can determine that the current start synchronization node (i.e., the second synchronization node 120) has failed when no synchronization message is received for more than a predetermined period, and then start the competition for the start synchronization node. First, each of the first synchronization nodes 111-114 initializes the first local weight W11-W14 and the first local sequence number N11-N14 thereof. For example, the initialized first local weights W11-W14 can be 0x0005, 0x0004, 0x0001, and 0x0003 in sequence, and the initialized first local sequence numbers N11-N14 can all be 0. Then, each of the first synchronization nodes 111-114 periodically generates and sends the synchronization message MA-MD according to the current first local time CK11-CK14, the initialized first local weight W11-W14, and the initialized first local sequence number N11-N14 thereof.

[0046] After receiving the synchronization message MA, the first synchronization nodes 112, 113 can determine to update (i.e., the first local time CK12, CK13, the first local weight W12, W13, and the first local sequence number N12, N13) and stop periodically sending the synchronization message MB, MC actively because the synchronization weight WS of the synchronization message MA is greater than the first local weight W12, W13 thereof, and determine that the competition fails. After the update of itself is completed, the first synchronization nodes 112, 113 can update the synchronization time CKS of the received synchronization message MA according to the current first local time CK12, CK13 thereof to generate the synchronization message MA1, respectively, and forward the synchronization message MA1.

[0047] The first synchronization node 111 can receive the synchronization messages MB, MC, MA1, but the first synchronization node 111 will discard the synchronization messages MB, MC, MA1 (because the synchronization weights WS of the synchronization messages MB, MC are both less than the first local weight W11, and the synchronization weight WS and the synchronization sequence number NS of the synchronization message MA1 are both equal to the first local weight W11 and the first local sequence number N11, respectively). The first synchronization node 112 can receive the synchronization message MC and the synchronization message MA1 forwarded by the first synchronization node 113, but the first synchronization node 112 will discard the synchronization messages MC, MA1 (because the synchronization weight WS of the synchronization message MC is less than the current first local weight W12, and the synchronization weight WS and the synchronization sequence number NS of the synchronization message MA1 are both equal to the current first local weight W12 and the current first local sequence number N12, respectively). The first synchronization node 113 can receive the synchronization messages MB, MD and the synchronization message MA1 forwarded by the first synchronization node 112, but the first synchronization node 113 will discard the synchronization messages MB, MD, MA1 (because the synchronization weights WS of the synchronization messages MB, MD are both less than the current first local weight W13, and the synchronization weight WS and the synchronization sequence number NS of the synchronization message MA1 are both equal to the current first local weight W13 and the current first local sequence number N13, respectively). The first synchronization node 114 can receive the synchronization message MC, but the first synchronization node 114 will discard the synchronization message MC (because the synchronization weight WS of the synchronization message MC is less than the current first local weight W14). In addition, the first synchronization node 114 can receive the synchronization message MA1 forwarded by the first synchronization node 113, and the first synchronization node 114 can determine to update (i.e., the first local time CK14, the first local weight W14 and the first local sequence number N14) and stop periodically sending the synchronization message MD actively because it determines that it has failed in the election of the new starting synchronization node, because the synchronization weight WS of the synchronization message MA1 is greater than the first local weight W14 of the first synchronization node 114. After the update of the first synchronization node 114 is completed, the first synchronization node 114 can update the synchronization time CKS of the received synchronization message MA1 according to the current first local time CK14 of the first synchronization node 114, and forward the synchronization message MA1. In this way, the first synchronization node 111 will become the new starting synchronization node and continue to periodically send the synchronization message MA in the current election of the starting synchronization node.

[0048] In summary, the network and node synchronization method of the present embodiment can determine whether to update the first local time according to the synchronization message, and update the synchronization time of the received synchronization message with the current first local time and forward the updated synchronization message after updating the first local time according to the synchronization time of the synchronization message. In this way, the synchronization nodes in the entire network can achieve time synchronization. After achieving time synchronization, each synchronization node in the network can control the timing of message sending to reduce the probability of message collision. Furthermore, more synchronization nodes can enter a low-power mode when there is no message transmission to reduce their power consumption. In addition, time slots can be multiplexed with other wireless communication technologies, so that different wireless network communication technologies can coexist.

[0049] Although the technical content of the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application, and any minor changes and modifications made by those skilled in the art without departing from the spirit of the present application shall be covered within the scope of the present application, therefore the scope of protection of the present application shall be subject to the scope defined by the appended claims.

[0050] [Symbol Description]

[0051] 100: network

[0052] 111-114: first synchronization node

[0053] 120: second synchronization node

[0054] 130: low-power node

[0055] CK11-CK14: first local time

[0056] CK2: second local time

[0057] CKS: synchronization time

[0058] MI: synchronization message

[0059] MA: synchronization message

[0060] MA1: synchronization message

[0061] MB: synchronization message

[0062] MC: synchronization message

[0063] MD: synchronization message

[0064] MS: synchronization message

[0065] N11-N14: first local sequence number

[0066] N2: second local sequence number

[0067] NS: number of synchronization

[0068] W11-W14: first local weight

[0069] W2: second local weight

[0070] WS: synchronization weight

[0071] S11-S19: steps

[0072] S121-S126: steps

[0073] S21-S23: steps.

Claims

1. A node synchronization method, comprising: A synchronization message is received by a first synchronization node in a network; The first synchronization node determines whether to update its first local time based on the synchronization message; When it is determined that the first local time needs to be updated, the first synchronization node updates the first local time according to the synchronization time of the synchronization message; When it is determined that the first local time needs to be updated, the first synchronization node updates the first local weight and the first local sequence number of the first synchronization node according to the synchronization weight and the synchronization sequence number of the synchronization message, respectively. as well as The first synchronization node updates the synchronization time of the received synchronization message with the current first local time and forwards the updated synchronization message.

2. The node synchronization method as described in claim 1, further comprising: The synchronization message is broadcast by a second synchronization node in the network when a synchronization condition is met.

3. The node synchronization method as described in claim 2, wherein the synchronization condition is that a predetermined synchronization period is reached or an unsynchronized node joins the network.

4. The node synchronization method as described in claim 2, wherein the synchronization time of the synchronization message is a second local time when the second synchronization node generates the synchronization message, the synchronization weight of the synchronization message is a second local weight of the second synchronization node, the synchronization sequence number of the synchronization message is a second local sequence number when the second synchronization node generates the synchronization message, wherein the second local weight is greater than the first local weight of the first synchronization node, wherein the second local sequence number increases with the number of times the second synchronization node generates the synchronization message, and wherein the step of the first synchronization node determining whether to update the first local time based on the synchronization message is performed by the first synchronization node determining whether to update the first local time based on the synchronization weight of the synchronization message and the first local weight.

5. The node synchronization method as described in claim 1, wherein the step of the first synchronization node determining whether to update its first local time based on the synchronization message includes: The first synchronization node compares the synchronization weight of the synchronization message with the first local weight of the first synchronization node. When the synchronization weight is greater than the first local weight, the first synchronization node determines that the first local time should be updated; as well as When the synchronization weight is less than the first local weight, the first synchronization node determines not to update the first local time.

6. The node synchronization method as described in claim 5, wherein the step of the first synchronization node determining whether to update its first local time based on the synchronization message further comprises: When the synchronization weight is equal to the first local weight, the first synchronization node compares the synchronization sequence number of the synchronization message with the first local sequence number of the first synchronization node. When the synchronization sequence number is greater than the first local sequence number, the first synchronization node determines that the first local time needs to be updated; as well as When the synchronization sequence number is less than or equal to the first local sequence number, the first synchronization node determines not to update the first local time.

7. The node synchronization method as described in claim 1, wherein when the first synchronizing node is a friend node, the node synchronization method further comprises: After the first synchronization node exits a low-power mode at a corresponding low-power node, it generates and forwards the synchronization message to the low-power node based on the current first local time.

8. The node synchronization method as described in claim 1, further comprising: When the first synchronization node fails to receive the synchronization message for a predetermined period, the first synchronization node periodically generates the synchronization message; and The synchronization message is broadcast periodically by the first synchronization node.

9. A network for node synchronization, comprising: A first synchronization node has a first local time. The first synchronization node is used to receive a synchronization message and, upon receiving the synchronization message, determines whether to update the first local time. The synchronization message includes a synchronization time. When it is determined that the first local time should be updated, the first synchronization node updates the first local time according to the synchronization time. When it is determined that the first local time should be updated, the first synchronization node updates a first local weight and a first local sequence number according to a synchronization weight and a synchronization sequence number of the synchronization message, respectively. The first synchronization node updates the synchronization time of the received synchronization message with the current first local time and forwards the updated synchronization message.

Citation Information

Patent Citations

  • Time synchronization method and apparatus based on Bluetooth communication

    CN105515750A

  • Bluetooth networking system with time synchronization function

    CN111542038A