CN115988625A - Synchronization method and device for wireless Mesh network and electronic equipment - Google Patents

Synchronization method and device for wireless Mesh network and electronic equipment Download PDF

Info

Publication number
CN115988625A
CN115988625A CN202211607110.5A CN202211607110A CN115988625A CN 115988625 A CN115988625 A CN 115988625A CN 202211607110 A CN202211607110 A CN 202211607110A CN 115988625 A CN115988625 A CN 115988625A
Authority
CN
China
Prior art keywords
execution time
mesh network
mesh
relative execution
control message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211607110.5A
Other languages
Chinese (zh)
Inventor
万国峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211607110.5A priority Critical patent/CN115988625A/en
Priority to PCT/CN2023/087818 priority patent/WO2024124756A1/en
Publication of CN115988625A publication Critical patent/CN115988625A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The application relates to the technical field of wireless Mesh networks, and discloses a synchronization method for a wireless Mesh network, wherein the Mesh network comprises a plurality of Mesh network nodes which are connected with each other, and the synchronization method comprises the following steps: obtaining a Mesh control message received by a Mesh network node; the broadcast data structure of the Mesh control message comprises a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure; determining an outer relative execution time in the timestamp; and correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time. In the broadcast data structure of the Mesh control message, because the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and can directly and timely obtain the external relative execution time in the timestamp to complete network synchronization, thereby improving the accuracy of the equipment synchronization operation of the Mesh network node. The application also discloses a synchronization device and electronic equipment for the wireless Mesh network.

Description

Synchronization method and device for wireless Mesh network and electronic equipment
Technical Field
The present application relates to the field of wireless Mesh networks, and in particular, to a synchronization method and apparatus for a wireless Mesh network, and an electronic device.
Background
The wireless Mesh network is a high-capacity and high-bandwidth distributed network, can be regarded as the integration of a Wireless Local Area Network (WLAN) and an Ad hoc mobile Ad hoc network, and exerts the advantages of the WLAN and the Ad hoc mobile Ad hoc network. In the large-capacity bluetooth Mesh network, because of the large coverage area, one group control command message needs to be relayed by a plurality of Mesh network nodes to reach the farthest node. No matter how the relay strategy of the Mesh network node is optimized, time is consumed in the processes of receiving, processing and relaying the message, and the time is multiplied after multiple relays, so that the devices in the Mesh network cannot receive the Mesh control message in the same time. If the coverage area of the Mesh network is large, the device response of the Mesh network node which is visible to the naked eye is inconsistent. For example, turning on all lamps, if the Mesh network has a large coverage area, it is evident that the lamps are lit in batches from near to far, rather than simultaneously being visible to the naked eye.
Currently, the synchronization scheme of bluetooth Mesh networks uses a delay time for synchronization. The hierarchy of the Mesh control message opens a customizable scope for developers, and the field of the delay time can be set in the customized structure of the broadcast data structure of the Mesh control message. In the process of relaying the Mesh control message, layer-by-layer encryption and confusion of the Mesh network relay node are carried out, and the Mesh network receiving node can obtain the delay time in the Mesh control message only by layer-by-layer decryption and modification, so that network synchronization is realized.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the relay process, because the Mesh control message is encrypted and confused layer by layer through the Mesh network relay node, the Mesh network receiving node can obtain the delay time in the Mesh control message only by decrypting and modifying layer by layer, and the network synchronization is realized. If the device of the Mesh network node cannot obtain the delay time in the Mesh control message in time, the device of the Mesh network node cannot accurately realize synchronous operation easily.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The disclosed embodiment provides a synchronization method and device for a wireless Mesh network and electronic equipment, and designs a broadcast data structure of a Mesh control message, so that the accuracy of synchronous operation of equipment of Mesh network nodes is improved.
In some embodiments, a synchronization method for a wireless Mesh network, the Mesh network comprising a plurality of Mesh network nodes connected to each other; the synchronization method comprises the following steps: obtaining a Mesh control message received by a Mesh network node; the broadcast data structure of the Mesh control message comprises a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure; determining an external relative execution time in the timestamp; and correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time.
In some embodiments, a synchronization apparatus for a wireless Mesh network includes a processor and a memory storing program instructions, the processor configured to, upon execution of the program instructions, perform the aforementioned synchronization method for a wireless Mesh network.
In some embodiments, an electronic device includes: an electronic device main body; and the synchronizer for the wireless Mesh network is mounted on the electronic equipment main body.
The synchronization method and device for the wireless Mesh network and the electronic device provided by the embodiment of the disclosure can achieve the following technical effects:
in the technical scheme, the broadcast data structure of the Mesh control message is improved and is divided into the Mesh protocol structure and the timestamp positioned behind the Mesh protocol structure, and the internal relative execution time stored by the Mesh network nodes is updated by using the external relative execution time (delay time) in the timestamp, so that the time synchronization of the Mesh network is realized. In the broadcast data structure of the Mesh control message, because the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and can directly and timely obtain the external relative execution time in the timestamp to complete network synchronization, thereby improving the accuracy of the equipment synchronization operation of the Mesh network node.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated in the accompanying drawings, which correspond to the accompanying drawings and not in a limiting sense, in which elements having the same reference numeral designations represent like elements, and in which:
fig. 1 is a schematic flow chart of a synchronization method for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another synchronization method for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart diagram of another synchronization method for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of another synchronization method for a wireless Mesh network provided by an embodiment of the present disclosure;
fig. 5 is a schematic flow chart diagram of another synchronization method for a wireless Mesh network provided by an embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating a synchronization method for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 7 is a schematic context diagram of another synchronization method for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a synchronization apparatus for a wireless Mesh network according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified. In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B. The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B. The term "correspond" may refer to an association or binding relationship, and a corresponds to B refers to an association or binding relationship between a and B.
The wireless Mesh network is also called a "multi-hop network", and is a dynamic network architecture that can be continuously expanded, and realizes transmission between wireless devices. A large number of Mesh network nodes (terminal equipment of the Mesh network nodes) in the Mesh network can be automatically connected into a Mesh structure in a wireless mode, and each Mesh network node in the network can only communicate with adjacent Mesh network nodes, so that the Mesh network is an intelligent network which is self-organized and self-managed, and a flexible network can be constructed without a backbone network.
In a large-capacity Bluetooth Mesh network, the problem of Mesh network node response consistency is solved, and the core idea is clock synchronization and delayed execution, namely, the transmitted Mesh control message is a delayed execution message, and the Mesh control message contains a specific numerical value of delay time.
Currently, the synchronization scheme of the bluetooth Mesh network uses absolute time for synchronization, and a master node periodically sends a synchronization signal to synchronize the whole Mesh network. The Mesh network uses absolute time for synchronization, and the synchronization signal increases the load of the Mesh network, and if the synchronization message and the control message collide with each other, the possibility of control failure is increased. In addition, after the device of the Mesh network node is powered off and powered on again, the Mesh network node needs to quickly resynchronize the network clock, so that the synchronous control of the Mesh network can be well realized.
In the embodiment of the disclosure, the Mesh network adopts relative time to synchronize the control message, the Mesh network control message does not calibrate absolute time, but includes relative time, and the moment of receiving the Mesh network control message is used as an anchor point. The Mesh network node starts to use crystal oscillator timing when receiving the Mesh network control message, executes action when the delay time (relative time) is reached, and continuously monitors the Mesh network control message in the air.
With reference to fig. 1, an embodiment of the present disclosure provides a synchronization method for a wireless Mesh network, where the Mesh network includes multiple Mesh network nodes connected to each other, and the synchronization method includes the following steps:
s101: and obtaining the external relative execution time in the Mesh control message received by the Mesh network node.
When the Mesh network node receives a Mesh control message sent by a mobile phone or other Mesh network nodes in a relay manner, extracting the relative execution time (also called delay time or execution time) in the Mesh control message. When the Mesh network node receives a Mesh control message sent by a mobile phone or other Mesh network nodes in a relay mode for the first time, extracting the relative execution time in the Mesh control message as internal relative execution time; and when the Mesh network node receives the Mesh control message sent by the mobile phone or the relay of other Mesh network nodes again, extracting the relative execution time in the Mesh control message as the external relative execution time.
Optionally, the broadcast data structure of the Mesh control message includes a Mesh protocol structure and a timestamp located after the Mesh protocol structure.
The Mesh protocol structure of the Mesh control message comprises a Model Layer (Model Layer), a base Model Layer (Foundation Model Layer), an Access Layer (Access Layer), an Upper Transport Layer (Upper Transport Layer), a Lower Transport Layer (Lower Transport Layer), a Network Layer (Network Layer), a Bearer Layer (Bearer Layer) and a Bluetooth Low Energy Core Specification Layer (Bluetooth Core Specification) which are electrically connected in sequence.
If the field of the relative execution time of the Mesh control message is set in a Mesh protocol structure (such as an access layer or a bearing layer), the Mesh control message is encrypted and confused layer by layer through a Mesh network relay node in a relay process, and a Mesh network receiving node needs to decrypt and modify layer by layer to obtain the delay time in the Mesh control message so as to realize network synchronization. Thus, the burden of the Mesh protocol is increased, the relay efficiency is weakened, and the architecture of the Mesh protocol is damaged.
The broadcast data structure of the Mesh control message is improved, and the Mesh control message is divided into a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure. In the broadcast data structure of the Mesh control message, because the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and can directly and timely obtain the external relative execution time in the timestamp to complete network synchronization, thereby improving the accuracy of the equipment synchronization operation of the Mesh network node.
Optionally, the obtaining the external relative execution time in the Mesh control message received by the Mesh network node includes: identifying a timestamp in a broadcast data structure of the Mesh control message; obtaining a relative execution time in the execution time bytes of the timestamp; the relative execution time in the execution time bytes of the time stamp is taken as the external relative execution time.
And updating the internal relative execution time stored by the Mesh network node by using the external relative execution time (delay time) in the timestamp, thereby realizing the time synchronization of the Mesh network. In the broadcast data structure of the Mesh control message, because the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and can directly and timely obtain the external relative execution time in the timestamp to complete network synchronization, thereby improving the accuracy of the equipment synchronization operation of the Mesh network node.
S102: and obtaining the internal relative execution time saved by the Mesh network node.
In practical application, the internal relative execution time is stored in an internal variable of the Mesh network node. The Mesh network node continuously updates the relative execution time according to an internal system clock, for example, a timer is started, the minimum period is interrupted, and when the interruption is triggered, the interruption period is subtracted from the relative execution time stored in the internal variable to obtain the updated relative execution time, and the updated relative execution time is updated to the internal variable of the Mesh network node.
S103: and correcting the internal relative execution time when the external relative execution time is smaller than the internal relative execution time.
In the synchronization process of the Mesh network, a master control node (an initiator of Mesh network synchronization) of the Mesh network sends a plurality of (for example, 8) repetitive control packets (Mesh control messages) to improve the control success rate of Mesh network synchronization. The repetitive control packets are sent serially, and a preset time length (for example, a value range of the preset time length is 20 to 30 ms) is spaced between every two adjacent repetitive control packets, and a time difference (for example, a difference of at most 210 ms) exists between the first repetitive control packet and the last repetitive control packet, which may bring an error to the control consistency of the device of the Mesh network node.
As shown in fig. 6 and 7 below, the mobile phone (the master control node of the Mesh network) continuously sends 8 repetitive control packets (Mesh control messages) at preset time intervals, where the external relative execution time of the 8 Mesh control messages is 200ms. The relay inside the Mesh network node takes 20ms.
The external relative execution time of the Mesh network node 1 receiving the first Mesh control message sent by the mobile phone is 200ms, the external relative execution time of the Mesh network node 2 receiving the first Mesh control message relayed by the Mesh network node 1 is 180ms, the external relative execution time of the Mesh network node 3 receiving the first Mesh control message relayed by the Mesh network node 2 is 160ms, the external relative execution time of the Mesh network node 4 receiving the first Mesh control message relayed by the Mesh network node 3 is 140ms, the external relative execution time of the Mesh network node 5 receiving the first Mesh control message relayed by the Mesh network node 4 is 120ms, and the external relative execution time of the Mesh network node 6 receiving the first Mesh control message relayed by the Mesh network node 5 is 100ms.
The external relative execution time of the fourth Mesh control message sent by the mobile phone received by the Mesh network node 7 is 200ms, the external relative execution time of the fourth Mesh control message relayed by the Mesh network node 7 received by the Mesh network node 6 is 180ms, and the external relative execution time of the first Mesh control message relayed by the Mesh network node 6 received by the Mesh network node 5 is 160ms.
For the Mesh network node 7, the external relative execution time for receiving the fourth Mesh control message is 200ms, but the Mesh control message is delayed by 60ms (taking the value of the preset duration as 20ms as an example). When the received external relative execution time 100ms is considered to be smaller than the stored internal relative execution time 160ms, the Mesh network node 6 corrects the stored internal relative execution time (100 ms).
Therefore, the Mesh network node needs to continuously detect the external relative execution time in the subsequent Mesh control message, and correct the internal relative execution time when the external relative execution time is smaller than the internal relative execution time. Therefore, the consistency of Mesh network synchronization is improved.
Optionally, the correcting the internal relative execution time includes: obtaining an actual time interval of the external relative execution time and the internal relative execution time; and correcting the internal relative execution time when the actual time interval is smaller than the time interval threshold value.
The time interval threshold may be in the range of [80ms,100ms ], e.g., 80ms, 85ms, 90ms, 95ms, 100ms. When the actual time interval between the external relative execution time and the internal relative execution time in the Mesh control message is greater than the time interval threshold, it is shown that the Mesh control message containing the external relative execution time is most likely to be an interference message caused by retransmission of the previous packet of Mesh control message. For example, before sending the Mesh control message of this time, for Mesh control messages which are retransmitted and not dissipated in other Mesh control messages sent earlier by the mobile phone, although the external relative time in the Mesh control message is far shorter than the internal relative time, it is obvious that the Mesh control message is an interference message. Therefore, whether the received Mesh control message is an interference message or not is determined by judging the actual time interval of the external relative execution time and the internal relative execution time and the size of the time interval threshold, the Mesh network node is prevented from correcting the stored internal relative execution time according to the interference message, and then when the internal relative execution time is up, the Mesh network node executes actions, and the accuracy and consistency of Mesh network synchronization are improved.
Optionally, the correcting the internal relative execution time includes calculating and obtaining the corrected internal relative execution time according to the following formula:
T 21 =T 1 -T 01 -T s1
wherein, T 21 For the corrected internal relative execution time, T 1 For external relative execution time, T 01 First internal processing time, T, for Mesh network node s1 Is the first random delay time.
For example, the obtained external relative execution time T 1 For 100ms, the first internal processing time T of the mesh network node 01 20ms, a first random delay time T s1 Is 2ms, the corrected second relative time is T 21 =T 1 -T 01 -T s1 =100-20-2=78。
And correcting the internal relative execution time stored by the Mesh network node by using the external relative execution time, the first internal processing time and the first random delay time, thereby improving the accuracy of the internal relative execution time. And the Mesh network node performs synchronous updating of the Mesh network by using the corrected internal relative execution time, so that the consistency of synchronous updating of the Mesh network is improved.
By adopting the synchronization method for the wireless Mesh network provided by the embodiment of the disclosure, after the external relative execution time in the Mesh control message received by the Mesh network node is obtained, the external relative execution time is compared with the internal relative execution time stored by the Mesh network node, and the internal relative execution time is corrected in time under the condition that the external relative execution time is smaller than the internal relative execution time. Therefore, the synchronous operation of the Mesh network nodes is realized in a relative time mode, the Mesh network nodes are timed by using the internal crystal oscillator, and the equipment of the Mesh network nodes does not need to quickly resynchronize the network clock after being powered off and powered on again, so that the accuracy of realizing the synchronous operation of the equipment of the Mesh network nodes in the Mesh network can be improved.
With reference to fig. 2, an embodiment of the present disclosure provides a synchronization method for a wireless Mesh network, where the Mesh network includes a plurality of Mesh network nodes connected to each other, and the synchronization method includes the following steps:
s201: and obtaining the external relative execution time in the Mesh control message received by the Mesh network node.
S202: and obtaining the internal relative execution time saved by the Mesh network node.
S203: and correcting the internal relative execution time when the external relative execution time is smaller than the internal relative execution time.
S204: and under the condition that the Mesh network node is a relay node, obtaining second random delay time.
Second random delay time T s2 Is in the range of 1-10ms, such as 2ms, 3ms, 7ms, 10ms.
S205: and after the second random delay time, forwarding the relay Mesh control message of the Mesh network node to other Mesh network nodes.
Optionally, the relative relay execution time in the modified relay Mesh control message is calculated according to the following formula:
T 31 =T 1 -T 02 -T s1
wherein, T 31 For corrected relative relay execution time, T 1 For external relative execution time, T 02 Second internal processing time, T, for Mesh network node s1 Is the first random delay time.
For example, the obtained external relative execution time T 1 For 100ms, a second internal processing time T of the mesh network node 02 30ms, a first random delay time T s1 Is 2ms, the corrected third relative time is T 31 =T 1 -T 02 -T s1 =100-30-2=68。
By adding the second random delay time, the collision between the relay Mesh control message and other control messages can be effectively avoided. And correcting the relative relay execution time in the Mesh network relay node by using the external relative execution time, the second internal processing time and the first random delay time, so as to improve the accuracy of the relative relay execution time.
And after the Mesh network relay node corrects the relative relay execution time in the relay Mesh control message of the Mesh network node, forwarding the modified relay Mesh control message to other Mesh network nodes.
In the embodiment of the disclosure, under the condition that the Mesh network node is a relay node, by adding the second random delay time, the packet collision between the relay Mesh control message and other control messages can be effectively avoided. Meanwhile, the relative relay execution time in the relay Mesh control message of the Mesh network node is corrected. The next Mesh network node performs synchronous update of the Mesh network by using the corrected relative relay execution time (namely, the external relative execution time in the Mesh control message received by the next Mesh network node), so that the accuracy and consistency of synchronous update of the Mesh network are improved.
With reference to fig. 3, an embodiment of the present disclosure provides a synchronization method for a wireless Mesh network, where the Mesh network includes a plurality of Mesh network nodes connected to each other, and the synchronization method includes the following steps:
s301: and obtaining the external relative execution time in the Mesh control message received by the Mesh network node.
S302: and obtaining the internal relative execution time saved by the Mesh network node.
S303: when the external relative execution time is smaller than the internal relative execution time, and an actual time interval between the external relative execution time and the internal relative execution time is smaller than a time interval threshold, the internal relative execution time is corrected.
S304: and in the case that the external relative execution time is less than the internal relative execution time, and the actual time interval of the external relative execution time and the internal relative execution time is greater than the time interval threshold value, discarding the received Mesh control message.
S305: and in the case that the external relative execution time is greater than the internal relative execution time, discarding the received Mesh control message.
And after analyzing and determining the external relative execution time in the Mesh control message, the Mesh network node compares the external relative execution time with the stored internal relative execution time. If the external relative execution time is less than the internal relative execution time, and the actual time interval between the external relative execution time and the internal relative execution time is less than the time interval threshold, correcting the internal relative execution time; if the external relative execution time is smaller than the internal relative execution time, and the actual time interval between the external relative execution time and the internal relative execution time is larger than the time interval threshold, indicating that the Mesh control message containing the external relative execution time is most likely to be an interference message caused by the retransmission of the previous Mesh control message, discarding the received Mesh control message; and if the external relative execution time is larger than the internal relative execution time, indicating that the Mesh control message containing the first relative execution message is interference information caused by retransmission, discarding the received Mesh control message. Therefore, the Mesh network node is prevented from correcting the stored internal relative execution time according to the interference information, and when the internal relative execution time is reached, the Mesh network node executes the action, so that the synchronization accuracy and consistency of the Mesh network are improved.
With reference to fig. 4, an embodiment of the present disclosure provides a synchronization method for a wireless Mesh network, where the Mesh network includes a plurality of Mesh network nodes connected to each other, and the synchronization method includes the following steps:
s401: obtaining a Mesh control message received by a Mesh network node; the broadcast data structure of the Mesh control message comprises a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure.
Optionally, the timestamp includes a length (length) byte of a first preset number of bytes, a Type (AD Type) byte of a second preset number of bytes, and an execution time (timestamp) byte of a third preset number of bytes.
In practical application, the format of the timestamp is 4 bytes, the first preset byte number is 1 byte, the second preset byte number is 1 byte, and the third preset byte number is 2 bytes. The format of the 4 byte timestamp may be: length (1 byte) + AD Type (1 byte) + timestamp (2 bytes).
The Bluetooth Mesh protocol is realized on the basis of Bluetooth Low Energy (BLE) broadcasting, and data of BLE broadcasting is formed by overlapping one or more AD structures (AD structs). The Mesh control message can be regarded as an independent AD Struct, because the hierarchical structure of the Mesh control message is more responsible, the payload reserved for the access layer has only 11 bytes at most, and when the number of words of the payload of the access layer is 11 bytes, BLE broadcast data reaches the maximum value (31 bytes), and the next AD Struct cannot be accommodated. Therefore, a 4-byte AD Struct is added to the broadcast data structure of the Mesh control message to represent the timestamp.
The Mesh control message of the custom model (vendor model) can only support 7 bytes at most, and only 4 byte parameter loads (parameter payloads) are left except for 3 bytes of custom operation codes (vendor opcode). After evaluation and analysis, the 4-byte parameter payload can also meet the action execution requirements of common Mesh network node devices (such as wall switches, lamps or sensors) after being compressed. Thus, a scheme of a broadcast data structure of the Mesh control message (Mesh protocol structure of 7-byte access layer + time stamp of 4-byte) is proven to be possible.
For example, controlling the color change of a lamp is the most complex lamp control message, and the message-dependent payload is the most, but a 4-byte parameter payload can also meet the user's requirement. The 4-byte parameter payload is as follows: transaction code Tid (1 byte) + luminance lighting (1 byte) + Hue (1 byte) + Saturation (1 byte). Here, the transaction code Tid, i.e., translation id, is used to indicate the uniqueness of the message at the application layer. The three parameters of the HLS for controlling the color originally need to be represented by 2 bytes, but the control granularity of 256 can meet the requirements of users, the user experience cannot be influenced, and therefore 1-byte representation can be used.
Therefore, in the embodiment of the disclosure, for the design of the timestamp format, on the premise of not influencing the original implementation function of the Mesh control message, because the timestamp is separately arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and the external relative execution time in the timestamp can be directly and timely obtained, so as to complete network synchronization, thereby improving the accuracy of the device synchronization operation of the Mesh network node.
S402: an outer relative execution time in the timestamp is determined.
Optionally, determining the external relative execution time in the timestamp comprises: identifying a timestamp in a broadcast data structure of the Mesh control message; obtaining a relative execution time in the execution time bytes of the timestamp; the relative execution time in the execution time byte of the time stamp is taken as the external relative execution time.
In practical application, firstly, determining the total byte number of a broadcast data structure of the Mesh control message and the byte number of a Mesh protocol structure, and calculating the byte number of a timestamp according to the total byte number of the broadcast data structure of the Mesh control message and the byte number of the Mesh protocol structure; verifying the byte number of the timestamp obtained by calculation and the byte number of the prestored timestamp; and under the condition that the byte number of the calculated timestamp is consistent with the byte number of the prestored timestamp, determining the timestamp in the broadcast data structure of the Mesh control message according to the byte number of the (calculated/prestored) timestamp. Then, the relative execution time (external relative execution time) is obtained in a third preset number of bytes of the relative execution time in the timestamp.
Because the time stamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to be decrypted and modified layer by layer, and the accuracy of the external relative execution time in the obtained time stamp is improved by verifying the byte number of the calculated time stamp and the byte number of the prestored time stamp, so that the accuracy of the equipment synchronous operation of the Mesh network node is improved.
S403: and correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time.
Optionally, the correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time includes: and correcting the internal relative execution time when the external relative execution time is smaller than the internal relative execution time.
After receiving the Mesh control message for the first time and storing the external relative execution time in the Mesh control message, the Mesh network node continuously detects the external relative execution time in the subsequent Mesh control message, and corrects the internal relative execution time under the condition that the external relative execution time is smaller than the internal relative execution time, so as to improve the accuracy and consistency of Mesh network synchronization.
By adopting the synchronization method for the wireless Mesh network provided by the embodiment of the disclosure, the broadcast data structure of the Mesh control message is improved, the broadcast data structure is split into the Mesh protocol structure and the timestamp positioned behind the Mesh protocol structure, and the internal relative execution time stored by the Mesh network nodes is updated by using the external relative execution time (delay time) in the timestamp, so as to realize the time synchronization of the Mesh network. In the broadcast data structure of the Mesh control message, as the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and can directly and timely obtain the external relative execution time in the timestamp so as to complete network synchronization, thereby improving the accuracy of the equipment synchronization operation of the Mesh network node; meanwhile, the synchronous operation of the Mesh network nodes is realized in a relative time mode, the Mesh network nodes are timed by using an internal crystal oscillator, and the equipment of the Mesh network nodes does not need to quickly resynchronize a network clock after being powered off and powered on again, so that the accuracy of realizing the synchronous operation of the equipment of the Mesh network nodes in the Mesh network can be further improved.
Referring to fig. 5, an embodiment of the present disclosure provides a synchronization method for a wireless Mesh network, where the synchronization method includes the following steps:
s501: obtaining a Mesh control message received by a Mesh network node; the broadcast data structure of the Mesh control message comprises a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure.
S502: an outer relative execution time in the timestamp is determined.
S503: and correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time.
S504: and under the condition that the Mesh network node is a relay node, correcting the relative relay execution time in the relay Mesh control message of the Mesh network node.
S505: and forwarding the modified relay Mesh control message to other Mesh network nodes.
And after the Mesh network relay node corrects the relative relay execution time in the relay Mesh control message of the Mesh network node, forwarding the modified relay Mesh control message to other Mesh network nodes.
In the embodiment of the disclosure, the relative relay execution time in the relay Mesh control message of the Mesh network node is corrected under the condition that the Mesh network node is the relay node. And the next Mesh network node performs synchronous updating of the Mesh network by using the corrected third phase pair execution time, so that the accuracy and consistency of synchronous updating of the Mesh network are improved.
In some embodiments, the synchronization method for a wireless Mesh network further comprises: and updating the internal relative execution time stored by the Mesh network node according to the system clock.
The Mesh network node continuously updates the relative execution time according to an internal system clock, for example, a timer is started, the minimum period is interrupted, and when the interruption is triggered, the relative execution time stored in the internal variable is subtracted by the interruption period to obtain the updated relative execution time, and the updated relative execution time is updated to the internal variable of the Mesh network node.
And updating the internal relative execution time stored by the Mesh network node according to a system clock, executing the action by the equipment of the Mesh network node when the internal relative execution time is up, so as to realize synchronous operation of the Mesh network, and further improving the accuracy of realizing the synchronous operation by the equipment of the Mesh network node in the Mesh network by improving the accuracy of the internal relative execution time.
The embodiment of the present disclosure shown in fig. 8 provides a synchronization apparatus for a wireless Mesh network, which includes a processor (processor) 80 and a memory (memory) 81, and may further include a Communication Interface (Communication Interface) 82 and a bus 83. The processor 80, the communication interface 82 and the memory 81 can communicate with each other through the bus 83. Communication interface 82 may be used for information transfer. The processor 80 may invoke logic instructions in the memory 81 to perform the synchronization method for the wireless Mesh network of the above-described embodiment.
In addition, the logic instructions in the memory 81 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 81 is a computer readable storage medium, and can be used for storing software programs, computer executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 80 executes functional applications and data processing by executing program instructions/modules stored in the memory 81, namely, implements the synchronization method for the wireless Mesh network in the above-described method embodiment.
The memory 81 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 81 may include a high-speed random access memory, and may also include a nonvolatile memory.
By adopting the synchronization device for the wireless Mesh network provided by the embodiment of the disclosure, the broadcast data structure of the Mesh control message is improved, the broadcast data structure is split into the Mesh protocol structure and the timestamp positioned behind the Mesh protocol structure, and the internal relative execution time stored by the Mesh network nodes is updated by using the external relative execution time (delay time) in the timestamp, so as to realize the time synchronization of the Mesh network. In the broadcast data structure of the Mesh control message, because the timestamp is independently arranged behind the Mesh protocol structure, the receiving node of the Mesh network does not need to decrypt and modify layer by layer, and the external relative execution time in the timestamp can be directly and timely obtained, so that the network synchronization is completed, and the accuracy of the device synchronization operation of the Mesh network node is improved; meanwhile, the synchronous operation of the Mesh network nodes is realized in a relative time mode, the Mesh network nodes are timed by using an internal crystal oscillator, and the equipment of the Mesh network nodes does not need to quickly resynchronize a network clock after being powered off and powered on again, so that the accuracy of realizing the synchronous operation of the equipment of the Mesh network nodes in the Mesh network can be further improved.
As shown in fig. 9, an embodiment of the present disclosure provides an electronic device (e.g., a computer, a server, etc.) 90, including: an electronic device body, and the synchronization device 91 for the wireless Mesh network described above. The synchronizer 91 for the wireless Mesh network is installed to the electronic device main body. The installation relationship stated herein is not limited to being placed inside the product, but also includes installation connection with other components of the product, including but not limited to physical connection, electrical connection, or signal transmission connection. It will be appreciated by those skilled in the art that the synchronization apparatus 91 for a wireless Mesh network may be adapted to a feasible electronic device body, thereby implementing other feasible embodiments.
The disclosed embodiments provide a computer program which, when executed by a computer, causes the computer to implement the above-described synchronization method for a wireless Mesh network.
The disclosed embodiments provide a computer program product comprising computer instructions stored on a computer-readable storage medium, which when executed by a computer, cause the computer to implement the above-described synchronization method for a wireless Mesh network.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above-described synchronization method for a wireless Mesh network.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes, and may also be a transient storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. The scope of the disclosed embodiments includes the full ambit of the claims, as well as all available equivalents of the claims. As used in this application, although the terms "first," "second," etc. may be used in this application to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, unless the meaning of the description changes, so long as all occurrences of the "first element" are renamed consistently and all occurrences of the "second element" are renamed consistently. The first and second elements are both elements, but may not be the same element. Furthermore, the words used in the specification are words of description for example only and are not limiting upon the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrases "comprising one of ...does not exclude the presence of additional like elements in a process, method, or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be only one type of logical functional division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A synchronization method for a wireless Mesh network, characterized in that the Mesh network comprises a plurality of Mesh network nodes connected to each other; the synchronization method comprises the following steps:
obtaining a Mesh control message received by a Mesh network node; the broadcast data structure of the Mesh control message comprises a Mesh protocol structure and a timestamp positioned behind the Mesh protocol structure;
determining an outer relative execution time in the timestamp;
and correcting the internal relative execution time stored by the Mesh network node according to the external relative execution time.
2. The synchronization method according to claim 1, wherein the time stamp includes a length byte of a first preset number of bytes, a type byte of a second preset number of bytes, and an execution time byte of a third preset number of bytes.
3. The synchronization method of claim 2, wherein the determining the outer relative execution time in the timestamp comprises:
identifying a timestamp in a broadcast data structure of the Mesh control message;
obtaining a relative execution time in an execution time byte of the timestamp;
taking a relative execution time in the execution time bytes of the timestamp as the external relative execution time.
4. The synchronization method according to claim 1, wherein the correcting the internal relative execution time saved by the Mesh network node according to the external relative execution time comprises:
and correcting the internal relative execution time when the external relative execution time is smaller than the internal relative execution time.
5. The synchronization method of claim 4, wherein said modifying the internal relative execution time comprises:
obtaining an actual time interval of the external relative execution time and the internal relative execution time;
and correcting the internal relative execution time when the actual time interval is smaller than the target time interval.
6. The synchronization method of claim 4, wherein said modifying the internal relative execution time comprises:
and calculating and obtaining the corrected internal relative execution time according to the following formula:
T 21 =T 1 -T 01 -T s1
wherein, T 21 For the corrected internal relative execution time, T 1 For external relative execution time, T 01 First internal processing time, T, for Mesh network node s1 Is the first random delay time.
7. The synchronization method of claim 1, further comprising:
under the condition that the Mesh network node is a relay node, obtaining a second random delay time;
and after the second random delay time, forwarding the relay Mesh control message of the Mesh network node to other Mesh network nodes.
8. The synchronization method according to any one of claims 1 to 7, further comprising:
and updating the internal relative execution time stored by the Mesh network node according to the system clock.
9. A synchronization apparatus for a wireless Mesh network, comprising a processor and a memory storing program instructions, characterized in that the processor is configured to perform the synchronization method for a wireless Mesh network according to any one of claims 1 to 8 when executing the program instructions.
10. An electronic device, comprising:
an electronic device main body; and the number of the first and second groups,
the synchronizer for a wireless Mesh network according to claim 9, being mounted to the electronic device body.
CN202211607110.5A 2022-12-14 2022-12-14 Synchronization method and device for wireless Mesh network and electronic equipment Pending CN115988625A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211607110.5A CN115988625A (en) 2022-12-14 2022-12-14 Synchronization method and device for wireless Mesh network and electronic equipment
PCT/CN2023/087818 WO2024124756A1 (en) 2022-12-14 2023-04-12 Synchronization method and apparatus for wireless mesh network, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211607110.5A CN115988625A (en) 2022-12-14 2022-12-14 Synchronization method and device for wireless Mesh network and electronic equipment

Publications (1)

Publication Number Publication Date
CN115988625A true CN115988625A (en) 2023-04-18

Family

ID=85967327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211607110.5A Pending CN115988625A (en) 2022-12-14 2022-12-14 Synchronization method and device for wireless Mesh network and electronic equipment

Country Status (2)

Country Link
CN (1) CN115988625A (en)
WO (1) WO2024124756A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024124756A1 (en) * 2022-12-14 2024-06-20 海尔优家智能科技(北京)有限公司 Synchronization method and apparatus for wireless mesh network, and electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130066442A (en) * 2011-12-12 2013-06-20 한국전자통신연구원 Method for synchronizing ring network
CN105792346A (en) * 2016-03-04 2016-07-20 海能达通信股份有限公司 Synchronization method, node device and wireless MESH network system
CN110290580B (en) * 2019-06-05 2021-08-20 深圳市英特瑞半导体科技有限公司 Method and system for transmitting time based on 1588 protocol
CN111511013B (en) * 2020-03-27 2022-02-01 桃芯科技(苏州)有限公司 Method, electronic device, and computer storage medium for synchronizing control signals
CN115348659B (en) * 2022-10-14 2023-01-03 中科物栖(北京)科技有限责任公司 Clock synchronization method and device of wireless Mesh network
CN115988625A (en) * 2022-12-14 2023-04-18 海尔优家智能科技(北京)有限公司 Synchronization method and device for wireless Mesh network and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024124756A1 (en) * 2022-12-14 2024-06-20 海尔优家智能科技(北京)有限公司 Synchronization method and apparatus for wireless mesh network, and electronic device

Also Published As

Publication number Publication date
WO2024124756A1 (en) 2024-06-20

Similar Documents

Publication Publication Date Title
EP3318048B1 (en) Bluetooth low energy addresses generation
CA2548340A1 (en) System and method for controlling the flooding of information in a network environment
EP2195977B1 (en) A method and apparatus for secure handover in a communication network
CN104221449A (en) Method and device to synchronize bluetooth and LTE/WIMAX transmissions for achieving coexistence
EP2925047B1 (en) Method for transmitting and receiving data
CN101511042B (en) Data synchronization method and device
CN115988625A (en) Synchronization method and device for wireless Mesh network and electronic equipment
CN103155686A (en) Apparatus and method for communication
CN108293236A (en) Method, corresponding user equipment and the network node of time unifying timer for redefining cordless communication network
CN104718793A (en) Power preference indicator timer
JP2004274321A (en) Communication method and communication terminal device
CN106160910A (en) Signal synchronization source device and communication method and system thereof
KR20080006253A (en) Bluetooth master with improved transmitting efficiency and data transmitting method using the same
CN109314630B (en) Link processing method, device and storage medium
TWI469675B (en) Rapid deployment devices in wireless self-organizing network and methods for same
CN103200109A (en) Method and device for OSPF neighboring node management
CN106416328B (en) Method, node and device for controlling sending of beacon frame
US20200367135A1 (en) Low Power Communications System
JP2009231885A (en) System and method for synchronization between phs base stations
CN102065508A (en) Wireless bridge forwarding equipment and method
KR20060113834A (en) Periodic synchronus method for start of super-frame in residential ethernet
CN102904662B (en) Cross-domain clock synchronization method and system based on PTP (Precision Time Protocol)
WO2024124755A1 (en) Synchronization method and apparatus for wireless mesh network, and electronic device
CN101626341B (en) Method and device for synchronizing information under link-state protocol
US8918130B2 (en) Method for transmitting a communication signal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination