Clock synchronization method, device and system

By utilizing signal quality and prioritization conditions in a wireless mesh network system, devices in different clock domains are synchronized to a unified clock domain, solving the channel interference problem caused by different clock domains in multi-device self-organizing network systems and improving the user's communication experience.

CN115967461BActive Publication Date: 2026-04-17HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2021-10-12
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In a multi-device self-organizing network system, channel interference can occur between devices in different clock domains due to differences in startup or entry times, affecting the user's communication experience.

Method used

By utilizing signal quality and prioritization conditions in a wireless mesh network system, devices in different clock domains can be synchronized to a unified clock domain and subject to unified scheduling, thereby achieving clock domain merging and synchronization.

Benefits of technology

It reduces mutual interference between devices, optimizes the scheduling of channel resources, and improves the user's communication experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115967461B_ABST
    Figure CN115967461B_ABST
Patent Text Reader

Abstract

This application relates to the field of communication technology, specifically to a clock synchronization method, device, and system. The method includes: a first device receiving first information sent by a second device, the first information including second clock domain identification information; when the signal quality between the first device and the second device meets the first condition, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device; the first device receiving a first synchronization indication from the second device, the first synchronization indication including the second clock domain identification information and the first time the second device sent the first synchronization indication; and the first device synchronizing its clock to the second clock according to the second clock domain identification information and the first time. This method can merge devices in different clock domains into the same clock domain for unified scheduling, improving the user's communication experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a clock synchronization method, device, and system. Background Technology

[0002] With the development of smart terminals, multiple electronic devices are often present in the same location (such as the same home or the same office area). These multiple electronic devices can establish one-to-many, many-to-one, and many-to-many connections to form a self-organizing network system of multiple devices within the location, thereby facilitating collaborative work among these multiple electronic devices.

[0003] Because different devices in a multi-device ad hoc network system may have different startup times or different times when they enter the environment, the system may have multiple clock domains. Devices in different clock domains follow different clocks and are scheduled by different master devices, which may lead to channel interference between devices in different clock domains, affecting the user's communication experience. Summary of the Invention

[0004] This application provides a clock synchronization method, device, and system that can merge devices in different clock domains into the same clock domain for unified scheduling, thereby improving the user's communication experience.

[0005] In a first aspect, embodiments of this application provide a clock synchronization method applied to a wireless mesh network system, the wireless mesh network system including a first device, a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; the method includes: the first device receiving first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; when the signal quality between the first device and the second master device meets the first condition, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device; the first device receiving a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, the first synchronization indication including the second clock domain identification information and the first time at which the second device sent the first synchronization indication; the first device synchronizing its clock to the second clock according to the second clock domain identification information and the first time. The second master device and the second device can be the same device or two independent devices.

[0006] In other words, in this embodiment of the application, when the first device senses the clock of the second master device and the signal quality between the first device and the second master device meets the relevant conditions, the first device can synchronize its clock to the clock of the second master device. Thus, the first device can accept the scheduling of the second master device, thereby improving the user's communication experience.

[0007] In one possible implementation, the first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

[0008] In other words, in this implementation, when the signal quality between the first device and the second master device is good, the first device can synchronize its clock with the clock of the second master device in order to accept the scheduling of the second master device.

[0009] In one possible implementation, when the signal quality between the first device and the second master device meets the first condition, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device. This includes: when the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than that of the first master device, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device.

[0010] In other words, in this implementation, when the signal quality between the first device and the second master device is good and the sorting priority of the second master device is higher than that of the first master device, the first device can synchronize its clock to the clock of the second master device in order to accept the scheduling of the second master device.

[0011] In one possible implementation, the wireless mesh network system further includes a third device, wherein the third device and the first device are located in a first island, and the third device is the island owner of the first island; the method further includes: the first device sending a first domain merging request to the third device, the first domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the third device updating the clock domain identification information of the third device to the second clock domain identification information according to the information of the second master device; the first device sending a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and a second time at which the first device sent the second synchronization indication; the third device synchronizing its clock to the second clock according to the second clock domain identification and the second time.

[0012] In other words, in this implementation, after the first device synchronizes its clock to the second clock, it can assist the island owner of the island where the first device is located in synchronizing its clock to the second clock, so that the island owner can accept the scheduling of the second master device and improve the user's communication experience.

[0013] In one possible implementation, the first island further includes at least one fourth device, and the method further includes: the third device sending a third synchronization indication to the at least one fourth device, the third synchronization indication including a third time at which the third device sends the third synchronization indication; and the at least one fourth device synchronizing its clock to a second clock according to the third time.

[0014] In other words, in this implementation, the island master of the first island can instruct the devices on the island to synchronize their clocks with the second island clock, so that the devices on the island can be scheduled by the second master device, thereby improving the user's communication experience.

[0015] In one possible implementation, the method further includes: a third device sending a second domain merging request to a first master device, the second domain merging request including information of the second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the first master device updating its clock domain identification information to the second clock domain identification information according to the information of the second master device; the third device sending a fourth synchronization indication to the first master device, the fourth synchronization indication including the second clock domain identification information and a fourth time at which the third device sends the fourth synchronization indication; and the first master device synchronizing its clock to the second clock according to the second clock domain identification information and the fourth time.

[0016] In other words, in this implementation, the third device can assist the first master device in synchronizing its clock with the second master device, so that the first master device can accept the scheduling of the second master device and improve the user's communication experience.

[0017] In one possible implementation, the wireless mesh network system further includes at least one fifth device, the clock of which is synchronized with a first clock, and the at least one fifth device does not belong to the first island; the method further includes: a first master device sending a fifth synchronization indication to the at least one fifth device, the fifth synchronization indication including a fifth time at which the first master device sends the fifth synchronization indication; and the at least one fifth device synchronizing its clock to a second clock according to the fifth time.

[0018] In other words, in this implementation, the first master device can instruct its slave devices, which have not yet synchronized their clocks, to synchronize their clocks to the second clock so that the slave devices can be scheduled by the second master device, thereby improving the user's communication experience.

[0019] In one possible implementation, at least one fifth device includes a sixth device and a seventh device; wherein the sixth device and the seventh device have a Wi-Fi link, the sixth device is outside the signal coverage range of the second master device, and the seventh device is within the signal coverage range of the second master device; synchronizing the clock of at least one fifth device to a second clock according to a fifth time includes: the seventh device synchronizing its clock to the second clock according to the fifth time; the sixth device sending a sixth synchronization request to the seventh device; the sixth device receiving a sixth synchronization indication sent by the seventh device, the sixth synchronization indication including the sixth time at which the sixth device sent the sixth synchronization indication; and the sixth device synchronizing its clock to the second clock according to the sixth time.

[0020] In other words, in this implementation, the sixth device, which is outside the signal coverage of the second master device, can synchronize its clock with the second clock through a seventh device that has a Wi-Fi link with the sixth device, so that the sixth device can be scheduled by the second master device and improve the user's communication experience.

[0021] In one possible implementation, the wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located in a second island, and the first device is the island owner of the second island; the method further includes: the first device sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the first device sends the seventh synchronization indication, and the at least one eighth device synchronizing its clock to a second clock according to the seventh time.

[0022] In other words, in this implementation, after the island owner synchronizes its clock to the second clock, the island owner can instruct other devices on the island to synchronize their clocks to the second clock so that other devices on the island can be scheduled by the second device, thus improving the user's communication experience.

[0023] In one possible implementation, the method further includes: a first device sending a third domain merging request to a first master device, the third domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or identification information of a second clock domain; the first master device updating its clock domain identification information to the second clock domain identification information based on the information of the second master device; the first device sending an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the first device sent the eighth synchronization indication; and the first master device synchronizing its clock to the second clock based on the second clock domain identification information and the eighth time.

[0024] In other words, in this implementation, the first device can assist the first master device in synchronizing the clock with the second master device, so that the first master device can accept the scheduling of the second master device and improve the user's communication experience.

[0025] In one possible implementation, the wireless mesh network system further includes at least one ninth device that is not part of the second island; the method further includes: a first master device sending a ninth synchronization indication to the at least one ninth device, the ninth synchronization indication including a ninth time at which the first master device sends the ninth synchronization indication; and the at least one ninth device synchronizing its clock to a second clock according to the ninth time.

[0026] In other words, in this implementation, the first master device can instruct its slave devices, which have not yet synchronized their clocks, to synchronize their clocks to the second clock so that the slave devices can be scheduled by the second master device, thereby improving the user's communication experience.

[0027] In one possible implementation, the first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; the method further includes: the first device sending a tenth synchronization indication to at least one tenth device, the tenth synchronization indication including the tenth time at which the first device sends the tenth synchronization indication; and at least one tenth device synchronizing its clock to a second clock according to the tenth time.

[0028] In other words, in this implementation, the first device can instruct other devices that have not yet synchronized their clocks to synchronize their clocks to the second clock, so that the other devices can be scheduled by the second master device, thereby improving the user's communication experience.

[0029] In one possible implementation, the first information is a data frame or a management frame; the second clock domain identification information is located in the frame header of the data frame or the management frame; and / or, the second clock domain identification information is determined by preset identification information and the identification information of the second master device.

[0030] In other words, the first device senses the second clock by receiving data frames or management frames sent by the second device; and the second clock domain identification information is determined by the preset identification information and the identification information of the second master device, which can be used to distinguish the clock of wireless mesh network communication technology and the clock of traditional Wi-Fi technology, so that the first device can start the process of synchronizing the clock to the second clock.

[0031] Secondly, embodiments of this application provide a clock synchronization method applicable to a first device in a wireless mesh network system, the wireless mesh network system further including a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; the method includes: the first device receiving first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to a second clock; when the signal quality between the first device and the second master device meets a first condition, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device; the first device receiving a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, the first synchronization indication including the second clock domain identification information and a first time when the second device sends the first synchronization indication; the first device synchronizing its clock to the second clock according to the second clock domain identification information and the first time. The second master device and the second device can be the same device or two independent devices.

[0032] In one possible implementation, the first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

[0033] In one possible implementation, when the signal quality between the first device and the second master device meets the first condition, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device. This includes: when the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than that of the first master device, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device.

[0034] In one possible implementation, the wireless mesh network system further includes a third device, wherein the third device and the first device are located in a first island, and the third device is the island master of the first island; the method further includes: the first device sending a first domain merging request to the third device, the first domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the information of the second master device being used by the third device to update the clock domain identification information of the third device to the second clock domain identification information; the first device sending a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and a second time at which the first device sends the second synchronization indication; the second clock domain identification information and the second time being used by the third device to synchronize the clock of the third device to the second clock.

[0035] In one possible implementation, the wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located in a second island, and the first device is the island owner of the second island; the method further includes: the first device sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the first device sends the seventh synchronization indication, the seventh time being used for the at least one eighth device to synchronize the clock of the at least one eighth device to a second clock.

[0036] In one possible implementation, the method further includes: a first device sending a third domain merging request to a first master device, the third domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or identification information of a second clock domain; the information of the second master device being used by the first master device to update the clock domain identification information of the first master device to the identification information of the second clock domain; the first device sending an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the first device sends the eighth synchronization indication; the second clock domain identification information and the eighth time being used by the first master device to synchronize the clock of the first master device to the second clock.

[0037] In one possible implementation, the first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; the method further includes: the first device sending a tenth synchronization indication to at least one tenth device, the tenth synchronization indication including the tenth time at which the first device sends the tenth synchronization indication; the tenth time is used for at least one tenth device to synchronize the clock of at least one tenth device to a second clock.

[0038] Thirdly, embodiments of this application provide a clock synchronization method applied to a wireless mesh network system, the wireless mesh network system including a first device, a second device, and a master device, wherein the clock of the second device is synchronized with the clock of the master device, and the second device and the first device have a Wi-Fi link; the method includes: when the first device is outside the signal coverage range of the master device, the first device sends a synchronization request to the second device; the second device sends a synchronization indication to the first device, the synchronization indication including the time when the second device sends the synchronization indication; the first device synchronizes its clock to the clock of the master device according to the time when the second device sends the synchronization indication.

[0039] In other words, when the first device is outside the signal coverage area of ​​the main device, the first device can synchronize its clock with the main device's clock through a second device with which it has a Wi-Fi link, thereby enabling the first device to be scheduled by the main device and provide users with a better communication experience.

[0040] In one possible implementation, the second device sending a synchronization instruction to the first device includes: the second device sending a synchronization instruction to the first device according to a preset period.

[0041] In other words, in this implementation, the second device continuously sends synchronization instructions to the first device according to a preset period, so that the first device can maintain clock synchronization with the master device.

[0042] Fourthly, embodiments of this application provide a wireless mesh network system, including a first device, a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; the first device is used to receive first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; when the signal quality between the first device and the second master device meets a first condition, the first device is further used to update the clock domain identification information of the first device to the second clock domain identification information and send a first synchronization request to the second device; the first device is further used to receive a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, the first synchronization indication including the second clock domain identification information and the first time at which the second device sent the first synchronization indication; the first device is further used to synchronize the clock of the first device to the second clock according to the second clock domain identification information and the first time. The second master device and the second device can be the same device or two independent devices.

[0043] In one possible implementation, the first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

[0044] In one possible implementation, when the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than that of the first master device, the first device updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device.

[0045] In one possible implementation, the wireless mesh network system further includes a third device, wherein the third device and the first device are located in a first island, and the third device is the island master of the first island; the first device is further configured to send a first domain merging request to the third device, the first domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the third device is configured to update the clock domain identification information of the third device to the second clock domain identification information according to the information of the second master device; the first device is further configured to send a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and a second time at which the first device sends the second synchronization indication; the third device is further configured to synchronize the clock of the third device to the second clock according to the second clock domain identification and the second time.

[0046] In one possible implementation, the first island further includes at least one fourth device; the third device is also configured to send a third synchronization indication to the at least one fourth device, the third synchronization indication including a third time at which the third device sends the third synchronization indication; the at least one fourth device is configured to synchronize the clock of the at least one fourth device to a second clock according to the third time.

[0047] In one possible implementation, the third device is further configured to send a second domain merging request to the first master device, the second domain merging request including information of the second master device, the information of the second master device including identification information of the second master device or identification information of the second clock domain; the first master device is configured to update the clock domain identification information of the first master device to the second clock domain identification information according to the information of the second master device; the third device is further configured to send a fourth synchronization indication to the first master device, the fourth synchronization indication including the second clock domain identification information and a fourth time at which the third device sends the fourth synchronization indication; the first master device is configured to synchronize the clock of the first master device to the second clock according to the second clock domain identification information and the fourth time.

[0048] In one possible implementation, the wireless mesh network system further includes at least one fifth device, the clock of which is synchronized with a first clock, and the at least one fifth device does not belong to a first island; the first master device is further configured to send a fifth synchronization indication to the at least one fifth device, the fifth synchronization indication including a fifth time at which the first master device sends the fifth synchronization indication; the at least one fifth device is configured to synchronize the clock of the at least one fifth device to a second clock according to the fifth time.

[0049] In one possible implementation, at least one fifth device includes a sixth device and a seventh device; wherein the sixth device and the seventh device have a Wi-Fi link, the sixth device is outside the signal coverage of the second master device, and the seventh device is within the signal coverage of the second master device; the seventh device synchronizes its clock to the second clock according to a fifth time; the sixth device is used to send a sixth synchronization request to the seventh device; the sixth device is used to receive a sixth synchronization indication sent by the seventh device, the sixth synchronization indication including the sixth time at which the sixth device sent the sixth synchronization indication; the sixth device is used to synchronize its clock to the second clock according to the sixth time.

[0050] In one possible implementation, the wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located in a second island, and the first device is the island master of the second island; the first device is also used to send a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the first device sends the seventh synchronization indication, and the at least one eighth device is used to synchronize the clock of the at least one eighth device to a second clock according to the seventh time.

[0051] In one possible implementation, the first device is further configured to send a third domain merging request to the first master device, the third domain merging request including information of the second master device, the information of the second master device including identification information of the second master device or identification information of the second clock domain; the first master device is configured to update the clock domain identification information of the first master device to the identification information of the second clock domain according to the information of the second master device; the first device is further configured to send an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the first device sends the eighth synchronization indication; the first master device is further configured to synchronize the clock of the first master device to the second clock according to the second clock domain identification information and the eighth time.

[0052] In one possible implementation, the wireless mesh network system further includes at least one ninth device, which is not part of the second island; the first master device is also configured to send a ninth synchronization indication to the at least one ninth device, the ninth synchronization indication including a ninth time at which the first master device sends the ninth synchronization indication; the at least one ninth device is configured to synchronize its clock to a second clock according to the ninth time.

[0053] In one possible implementation, the first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; the first device is also used to send a tenth synchronization indication to at least one tenth device, the tenth synchronization indication including the tenth time at which the first device sends the tenth synchronization indication; at least one tenth device is used to synchronize the clock of at least one tenth device to a second clock according to the tenth time.

[0054] In one possible implementation, the first information is a data frame or a management frame; the second clock domain identification information is located in the frame header of the data frame or the management frame; and / or, the second clock domain identification information is determined by preset identification information and the identification information of the second master device.

[0055] Fifthly, embodiments of this application provide a communication device. The wireless mesh network system in which the communication device resides further includes a second device, a first master device, and a second master device. The clock of the communication device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device. The communication device includes a processor and a memory. The processor executes instructions stored in the memory, causing the communication device to perform the following: receiving first information sent by the second device, the first information including second clock domain identification information corresponding to a second clock; updating the clock domain identification information of the communication device to the second clock domain identification information and sending a first synchronization request to the second device when the signal quality between the communication device and the second master device meets a first condition; receiving a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, the first synchronization indication including the second clock domain identification information and a first time when the second device sent the first synchronization indication; and synchronizing the clock of the communication device to the second clock according to the second clock domain identification information and the first time. The second master device and the second device can be the same device or two independent devices.

[0056] In one possible implementation, the first condition includes: the signal quality between the communication device and the second master device is greater than the signal quality between the communication device and the first master device, and / or, the signal quality between the communication device and the second master device is greater than a preset quality threshold.

[0057] In one possible implementation, when the signal quality between the communication device and the second master device meets the first condition, and the sorting priority of the second master device is greater than that of the first master device, the processor executes the instructions stored in the memory, causing the communication device to further perform: updating the clock domain identification information of the communication device to the second clock domain identification information, and sending a first synchronization request to the second device.

[0058] In one possible implementation, the wireless mesh network system further includes a third device, wherein the third device and the communication device are located on a first island, and the third device is the island master of the first island; the processor is configured to execute instructions stored in memory, causing the communication device to further perform: sending a first domain merging request to the third device, the first domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the information of the second master device being used by the third device to update the clock domain identification information of the third device to the second clock domain identification information; sending a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and a second time at which the communication device sends the second synchronization indication; the second clock domain identification information and the second time being used by the third device to synchronize the clock of the third device to the second clock.

[0059] In one possible implementation, the wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the communication device are also located in a second island, and the communication device is the island master of the second island; the processor is configured to execute instructions stored in memory, causing the communication device to further perform: sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the communication device sends the seventh synchronization indication, the seventh time being used for the at least one eighth device to synchronize the clock of the at least one eighth device to a second clock.

[0060] In one possible implementation, the processor executes instructions stored in memory, causing the communication device to further perform: sending a third domain merging request to a first master device, the third domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the information of the second master device being used by the first master device to update the clock domain identification information of the first master device to the second clock domain identification information; sending an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the communication device sends the eighth synchronization indication; the second clock domain identification information and the eighth time being used by the first master device to synchronize the clock of the first master device to the second clock.

[0061] In one possible implementation, the communication device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; the processor is used to execute instructions stored in memory, causing the communication device to also perform: sending a tenth synchronization indication to at least one tenth device, the tenth synchronization indication including the tenth time at which the communication device sends the tenth synchronization indication; the tenth time is used for at least one tenth device to synchronize the clock of at least one tenth device to a second clock.

[0062] In a sixth aspect, embodiments of this application provide a wireless mesh network system, which includes a first device, a second device, and a master device. The clock of the second device is synchronized with the clock of the master device, and a Wi-Fi link exists between the second device and the first device. When the first device is outside the signal coverage area of ​​the master device, the first device sends a synchronization request to the second device. The second device sends a synchronization indication to the first device, the synchronization indication including the time at which the second device sends the synchronization indication. The first device is also used to synchronize its clock to the clock of the master device according to the time at which the second device sends the synchronization indication.

[0063] In one possible implementation, the second device is used to send a synchronization instruction to the first device at a preset period.

[0064] In a seventh aspect, embodiments of this application provide a computer-readable storage medium including computer program instructions, which, when executed by a computing device, enable the computing device to perform the method provided in any one of the first, second, or third aspects.

[0065] Eighthly, embodiments of this application provide a computer program product containing instructions, characterized in that, when the instructions are executed by a computing device, the computing device performs the method provided by any one of the first, second, or third aspects.

[0066] The clock synchronization method, device, and system provided in this application can merge devices in different clock domains into the same clock domain, enabling these devices to receive unified scheduling, thereby optimizing the scheduling of channel resources, reducing mutual interference between devices, and improving the user's communication experience. Attached Figure Description

[0067] Figure 1 A schematic diagram illustrating one scenario in which the clock synchronization method provided in the embodiments of this application can be applied;

[0068] Figure 2 This is a schematic diagram of the structure of a device provided in an embodiment of this application;

[0069] Figure 3 A schematic diagram of the structure of a clock domain provided in an embodiment of this application;

[0070] Figure 4A A schematic diagram of the structure of a clock domain provided in an embodiment of this application;

[0071] Figure 4B A schematic diagram of the structure of a clock domain provided in an embodiment of this application;

[0072] Figure 5A This is a schematic diagram of the structure of a Wi-Fi MAC frame provided in an embodiment of this application;

[0073] Figure 5B This is a schematic diagram of the structure of a beacon frame provided in an embodiment of this application;

[0074] Figure 6 A flowchart illustrating a clock synchronization method provided in an embodiment of this application;

[0075] Figure 7A A schematic diagram of the structure of a clock domain provided in an embodiment of this application;

[0076] Figure 7B A schematic diagram of the structure of a clock domain provided in an embodiment of this application;

[0077] Figure 8 A flowchart illustrating a clock synchronization method provided in an embodiment of this application;

[0078] Figure 9 A flowchart illustrating a clock synchronization method provided in an embodiment of this application;

[0079] Figure 10A This is a schematic diagram of the structure of a sync request action frame provided in an embodiment of this application;

[0080] Figure 10B This is a schematic diagram illustrating the structure of the domain merge request frame and the domain mergeresponse frame provided in the embodiments of this application;

[0081] Figure 10C This is a schematic diagram of the structure of a PNF frame provided in an embodiment of this application;

[0082] Figure 11 A flowchart illustrating a clock synchronization method provided in an embodiment of this application;

[0083] Figure 12 A flowchart illustrating a clock synchronization method provided in an embodiment of this application;

[0084] Figure 13 This is a schematic block diagram of a communication device provided in an embodiment of this application. Detailed Implementation

[0085] The technical solutions in the embodiments of the present invention will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments in this specification, and not all of them.

[0086] In the description of this specification, terms such as "one embodiment" or "some embodiments" mean that one or more embodiments of this specification include a particular feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0087] In this specification, unless otherwise stated, " / " signifies "or," for example, A / B can mean A or B. "And / or" in this document merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, in the description of embodiments in this specification, "multiple" refers to two or more.

[0088] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0089] See Figure 1 With the development and popularization of terminal devices, multiple devices such as device A1, device A2, device A3, device A4, device A5, device A6, and device A7 may be located simultaneously in location 100. Location 100 can refer to a place with limited space, such as a home or a conference room, for user activities.

[0090] In the following description, unless otherwise specified, devices A1, A2, A3, A4, A5, A6, and A7 may be referred to simply as devices.

[0091] In some embodiments, the device may be a mobile phone, tablet computer, wearable device, smart TV, Huawei Smart Screen, smart speaker, smartwatch, etc. Exemplary embodiments of the device involved in this application include, but are not limited to, devices equipped with… Electronic devices running a system (Harmony OS) or other operating systems. Different devices among the multiple devices in location 100 can be of the same type or different types. This application embodiment does not specifically limit the type of each device in location 100.

[0092] See Figure 2 In some embodiments, the device may include a processor, memory, and a Wi-Fi interface. The device can broadcast management frames such as beacon frames and period notification frames (PNF) frames via the Wi-Fi interface. The device can also establish Wi-Fi links with other devices to exchange data frames. Data frames are frames that carry service data and are used to implement related services. For example, in screen mirroring, the service data can be video stream data. In document transfer, the service data can be information about the document. Unlike data frames, management frames are frames that do not carry service data but are used to implement inter-device management or control. For a more detailed description of data frames and management frames, please refer to existing descriptions; they will not be repeated here.

[0093] Continue reading Figure 2 The device's memory can store multiple applications, such as application 201 and application 202. The device's processor can call one or more applications stored in the memory to send service data to other devices via the Wi-Fi interface, or process service data received from other devices via the Wi-Fi interface.

[0094] The devices involved in this application embodiment can support wireless fidelity (Wi-Fi) mesh network communication technology, enabling point-to-point interconnection. Wi-Fi mesh network communication technology allows electronic devices within the same location to bypass network infrastructure (such as access points (APs) or cellular networks) and achieve one-to-one, one-to-many, or many-to-many Wi-Fi connections between devices in the same mesh network. For example, this location can be a home, a conference room, or other space-constrained environment. In one example, the Wi-Fi mesh network communication technology can specifically be a wireless-fidelity neighborhood-aware network (Wi-FiNAN).

[0095] Taking device A1 as an example. In wireless mesh network communication technology, when device A1 powers on or enables wireless mesh network communication, it can send PNF frames on a preset social channel and listen for PNF frames or beacon frames sent by other devices on the same channel for mutual discovery. If device A1 detects a master device's beacon frame within a preset time period after power-on or enabling wireless mesh network communication, device A1 can become a slave of the master device and receive scheduling from the master device. If device A1 does not detect a master device's beacon frame within the preset time period after power-on or enabling wireless mesh network communication, but instead detects PNF frames or beacon frames sent by other devices, device A1 can initiate a master device election process to elect a master device. Specifically, device A1 can elect a master device based on the ranking priority (RP) value announced in the PNF frame or beacon frame. After the master device is elected, device A1 can synchronize its own clock with the master device's clock, act as a slave device of the master device, and accept the master device's scheduling.

[0096] The master device divides its time into several time slots (each time slot can be 16ms long) according to its own clock. N time slots constitute a scheduling cycle. N is a positive integer greater than 2. The first M time slots of each scheduling cycle must be switched to a preset interaction channel. In these M time slots, the master device sends beacon frames, and the slave device sends PNF frames. Here, M is a positive integer less than N and greater than 0. These M time slots can be called synchronization time slots.

[0097] As described above, the clocks of all slave devices of a master device are synchronized to the master device. That is, the clocks of the master device and its slave devices are synchronized. In the embodiments of this application, a master device and its slave devices can form a clock domain. The clocks of devices located in the same clock domain are synchronized.

[0098] When two devices within the same clock domain need to collaboratively process services (such as screen mirroring, document transfer, etc.), a Wi-Fi link can be established. Taking devices A1 and A2 with Wi-Fi NAN functionality as an example, devices A1 and A2 can sequentially exchange information such as NAN data path request (NDP Request), NAN data path response (NDP Response), NAN data path confirm (NDPConfirm), and NAN data path key install (NDP Key Install), thereby establishing a Wi-Fi link between devices A2 and A1. Data frames carrying service data can be transmitted through the Wi-Fi link.

[0099] See Figure 3 Two or more devices connected by a Wi-Fi link can form an island. Different devices on the same island can transmit service data via the Wi-Fi link to complete related services (such as screen mirroring, document transfer, etc.). For example, such as Figure 1 As shown, island D1 is formed between devices A1, A2, and A3 in clock domain A. Island D2 is formed between devices A4 and A5 in clock domain A. Island D3 is formed between devices A6 and A7 in clock domain A. Here, the Wi-Fi link between two devices can refer to a single-hop Wi-Fi link, meaning the two devices are directly connected via a Wi-Fi link. Alternatively, it can refer to a multi-hop Wi-Fi link, in other words, one of the two devices has a Wi-Fi link with another device, and that other device has a Wi-Fi link with the other device among the two devices, where the other device is a device other than the two original devices.

[0100] The master device can detect the signal quality from each device in the island to itself. In one example, signal quality can be specifically defined as received signal strength indication (RSSI). In another example, signal quality can be specifically defined as signal to interference plus noise ratio (SINR). The master device can designate the device with the best signal quality from the island to itself as the island master. That is, in an island, the signal quality from the island master to the master is better than the signal quality from any other device in the island to the master. In island D1, device A1 can be designated as the island master. In island D2, device A4 can be designated as the island master. In island D3, device A6 can be designated as the island master.

[0101] Additionally, it should be noted that in this embodiment, it is not required that every device in the same clock domain must be within the signal coverage range of the master device in that clock domain. Specifically, one or more devices in an island may be within the signal coverage range of the master device, while other devices in the island may be outside the signal coverage range of the master device. Devices outside the signal coverage range of the master device in an island can synchronize their clocks with the master device's clock through devices within the master device's signal coverage range in the same island. For example, a device outside the master device's signal coverage range in an island can synchronize its clock with the master device's clock through a device that has a Wi-Fi link with it (as mentioned above, different devices within the same island have a Wi-Fi link) and is within the master device's signal coverage range. More specifically, a device outside the master device's signal coverage range in an island can synchronize its clock with the master device's clock through the island leader (as mentioned above, the island leader is determined by the master device based on the signal quality to the master device, and the island leader of an island in the clock domain is within the master device's signal coverage range).

[0102] The master device can perform channel resource scheduling for devices within its clock domain, meaning the master device can schedule channel resources for its slave devices to ensure that different islands operate on different channels and that signals from different islands do not interfere with each other.

[0103] Due to differences in device startup, activation of wireless mesh network communication functions, or different times when devices enter the location, two or more clock domains may exist in the same location. For example, such as... Figure 4A As shown, a clock domain A and a clock domain B exist within the location. Clock domain B can be composed of devices B1, B2, B3, B4, and B5. For example, as shown... Figure 4BAs shown, in location 100, there exists a clock domain A consisting of devices A1, A2, A3, A4, A5, A6, and A7. Devices B1 and B2, originally located in clock domain B outside location 100, can be moved to location 100 and placed near devices in clock domain A. This results in different clock domains existing in location 100, with devices in different clock domains being relatively close together, potentially leading to mutual interference.

[0104] As mentioned above, devices in different clock domains are scheduled by different master devices, which may lead to scheduling inconsistencies. This can cause interference between the operating channels of devices in different clock domains, affecting the user's communication experience. For example, if two devices that are close to each other are located in different clock domains, and if these two devices have the same or adjacent operating channels, then these two devices may interfere with each other.

[0105] This application provides a clock synchronization method that can merge different clock domains in the same location (e.g., location 100), allowing devices that may interfere with each other in the same location to be incorporated into the same clock domain (e.g., ...). Figure 4B Devices B1 and B2 are incorporated into clock domain A; for example, ... Figure 4A The devices in clock domain A are merged into clock domain B and scheduled by the same master device, thereby maximizing the utilization of air interface resources and avoiding mutual interference between nearby devices due to inconsistent scheduling. Specifically, clock domain merging can refer to synchronizing the clocks of some or all devices in one clock domain to the clock of the master device in another clock domain. For ease of description, the clock domain to which these devices belonged before clock synchronization can be called the source clock domain, and the clock domain to which they belong after synchronization can be called the target clock domain.

[0106] Next, taking clock domain A and clock domain B in location 100 as examples, the clock synchronization method provided in this application embodiment will be illustrated. Clock domain A can be set as the source clock domain, and clock domain B as the target clock domain.

[0107] It is understandable that devices in clock domain A need to be aware of the existence of clock domain B in order to synchronize with clock domain B. Therefore, the clock domain awareness scheme will be introduced first.

[0108] In some embodiments, as described above, during the first M time slots (i.e., synchronization time slots) out of N time slots in each scheduling cycle, devices in clock domain B transmit management frames on the interaction channel. The management frame carries clock domain identification information, which indicates the clock domain to which the device sending the management frame belongs. Specifically, if the device is a master device, the transmitted management frame is a Beacon frame. If the device is a slave device, the transmitted management frame is a PNF frame. As described above, the interaction channel is preset, so the interaction channels for clock domain A and clock domain B are the same preset channel. Devices in clock domain A can listen for management frames transmitted by devices in clock domain B on the interaction channel. When a device in clock domain A (e.g., device A1) listens for a management frame transmitted by a device in clock domain B (device B1), it can parse the clock domain identification information in the management frame, thereby determining that the device transmitting the management frame, i.e., device B1, belongs to clock domain B, and thus becoming aware of the existence of clock domain B. Similarly, devices in clock domain A can also transmit management frames on the interaction channel. Devices in clock domain B can also listen to management frames sent by devices in clock domain B on the interaction channel, thus becoming aware of the existence of clock domain A.

[0109] Typically, for a scheduling cycle, the majority of its time limit is for business operations, with a smaller proportion being synchronization time slots. Therefore, it's possible for synchronization time slots in different clock domains to not overlap. In some embodiments, for situations where synchronization time slots in different clock domains don't overlap, a device in clock domain B can send a data frame carrying clock domain identification information. This information indicates the clock domain to which the device sending the management frame belongs. When the operating channel of a device in clock domain B (e.g., device B1) and the operating channel of a device in clock domain A (e.g., device A1) are the same channel, device A1 can listen to the data frame sent by device B1 and parse the clock domain identification information carried in the frame header. This allows it to determine that the device sending the data frame, i.e., device B1, belongs to clock domain B, and thus be able to detect the existence of clock domain B. In this embodiment, by carrying clock domain identification information in the data frame, the synchronization time slots in clock domain A and clock domain B can be mutually detected even when they don't overlap.

[0110] According to relevant protocols of wireless mesh network communication technology, such as the Institute of Electrical and Electronics Engineers (IEEE) 802.11 series of protocols, Wi-Fi management frames and data frames both belong to the Media Access Control (MAC) frame category and have the same format of MAC header. Figure 5A A schematic diagram of the structure of a Wi-Fi MAC frame is shown. Figure 5A As shown, the MAC header in a Wi-Fi MAC frame may include fields such as Address2 (Addr2) and Address3 (Addr3). One or more of these fields can be used to carry clock domain identification information. In other words, clock domain identification information can be filled into optional fields of the MAC header. In one example, the clock domain identification information can be filled into Addr3.

[0111] It is understood that the clock domain used to indicate the clock domain to which the device sending the management frame belongs, and that the clock domain is the clock domain of wireless mesh network communication technology, must meet the following two conditions.

[0112] 1. Clock domain identification information can distinguish between wireless mesh network communication technology and traditional Wi-Fi technology. Traditional Wi-Fi technology refers to a technology where a terminal device acts as a station (STA) to connect to an access point (AP), which then connects to the network and communicates with other terminal devices. For details, please refer to existing technology descriptions; they will not be elaborated upon here.

[0113] 2. Clock domain identification information can distinguish different clock domains in wireless mesh network communication technology. For example, the clock domain identification information of clock domain B is different from that of clock domain A, and each is used to represent the corresponding clock domain.

[0114] Based on the above two conditions, clock domain identification information can be set. In some embodiments, preset information can be used to replace part of the information in the master device identification information, and the master device identification information after the aforementioned replacement process can be used as the clock domain identification information of the clock domain to which the master device belongs. As mentioned above, a clock domain consists of a master device and slave devices of that master device. Therefore, for a clock domain, the master device is unique, and the master devices of different clock domains are different. Therefore, the master device identification information can be used to identify the clock domain to distinguish different clock domains. In addition, in order to distinguish between wireless mesh network communication technology and traditional Wi-Fi technology, preset information is used to replace part of the information in the master device identification information. This preset information is not present in the device identification information of traditional Wi-Fi technology, and can thus be used to distinguish between wireless mesh network communication technology and traditional Wi-Fi technology.

[0115] In one example, the master device identification information can be the MAC address of the master device, and part of the information in the master device identification information can be the first three bytes. Taking the master device's MAC address as 56:30:ac:48:a7:56, and the information used to replace the first three bytes of the master device's MAC address as 00:E0:FC, the clock domain identification information can be 00:E0:FC:48:a7:56. Among them, 00:E0:FC is used to distinguish between wireless mesh network communication technology and traditional Wi-Fi technology, and 48:a7:56 is used to distinguish between different clock domains.

[0116] Therefore, the clock domain identification information configured above can distinguish between the clock domain of wireless mesh network communication technology and the clock domain of traditional Wi-Fi technology, as well as the different clock domains of wireless mesh network communication technology.

[0117] In some embodiments, when two devices need to collaboratively process services (such as screen mirroring, document transfer, etc.), they can establish a Wi-Fi link. Before establishing a Wi-Fi link, the two devices need to synchronize to the same clock domain. Specifically, when two devices need to establish a Wi-Fi link, they can send each other clock domain identification information, for example, they can send each other data frames or management frames carrying clock domain identification information. Thus, the two devices can perceive the clock domain of the other. In one example, specifically taking the establishment of a Wi-Fi link between device A1 and device B1 as described above, device A1 perceives clock domain B by receiving data frames or management frames carrying clock domain identification information sent by device B1. Similarly, device B1 can perceive clock domain A by receiving data frames or management frames carrying clock domain identification information sent by device A1.

[0118] The example above introduced a clock domain awareness scheme. Next, an example will illustrate a scheme where a device in clock domain A decides whether to join another clock domain when it detects its presence.

[0119] In some embodiments, when a device in clock domain A, such as device A1, senses clock domain B, it can determine whether device A1 is within the signal coverage range of the master device in clock domain B. For example, when a management frame or data frame sent by the master device in clock domain B can be received by device A1, it can be determined that device A1 is within the signal coverage range of the master device in clock domain B. When device A1 is within the signal coverage range of clock domain B, device A1 can join clock domain B. The scheme for joining clock domain B will be described below and will not be repeated here.

[0120] Device A1 can be configured to detect clock domain B by listening to management frames or data frames sent by device B1 in clock domain B. Next, we will introduce schemes for determining whether device A1 is within the signal coverage range of the master device in clock domain B under different circumstances.

[0121] In scenario a1, device B1 can be designated as the master device in clock domain B. When device A1 detects a management frame or data frame sent by device B1, it can determine that device A1 is within the signal coverage range of the master device in clock domain B. In other words, in scenario a1, device A1, upon detecting clock domain B, determines that it is within the signal coverage range of the master device in clock domain B. Furthermore, for Wi-Fi frames (including management and data frames), their headers carry the MAC address of the device sending the Wi-Fi frame, and a Basic Service Set Identifier (BSSID) generated based on the master device's address. When device A1 detects a Wi-Fi frame, it can generate a BSSID based on the MAC address of the device sending the Wi-Fi frame carried in the frame header. If the generated BSSID is the same as the BSSID carried in the frame header of the Wi-Fi frame, it can be determined that the device sending the Wi-Fi frame is the master device. If the generated BSSID is different from the BSSID carried in the frame header of the Wi-Fi frame, it can be determined that the device sending the Wi-Fi frame is not the master device. Therefore, device A1 can determine whether device B1 is the master device of clock domain B based on the MAC address and BSSID carried in the frame header of the management frame or data frame sent by device B1.

[0122] In scenario a2, device B1 can be configured not to be the master device of clock domain B. When device A1 detects a management frame or data frame sent by device B1, it can determine the address of the master device of clock domain B based on information carried in the management frame or data frame, such as the BSSID. Based on the address of the master device of clock domain B, device A1 can send a frame request message to the master device of clock domain B. In one example, the frame request message can specifically be a sync request action frame. If the master device of clock domain B receives the frame request message, it can respond by sending a preset frame to device A1. In one example, the preset frame can specifically be a beacon frame. If device A1 receives the preset frame, it can be determined that device A1 is within the signal coverage range of the master device of clock domain B. If device A1 does not receive the preset frame, it can be determined that device A1 is not within the signal coverage range of the master device of clock domain B.

[0123] In some embodiments, after determining that device A1 is within the signal coverage range of the master device in clock domain B, device A1 also needs to determine whether the master device in clock domain B meets preset conditions C1 and C2. If the master device in clock domain B meets conditions C1 and C2, device A1 can join clock domain B. The scheme for joining clock domain B will be described below and will not be repeated here.

[0124] Next, we will describe the conditions for determining whether the master device of clock domain B meets condition C1, depending on the specific circumstances. For ease of description, in the following text, the master device of clock domain B can be referred to as master device B0, and the master device of clock domain A can be referred to as master device A0.

[0125] In case b1, device A1 can be defined as not being the master device in clock domain A, i.e., not master device A0. Condition C1 can include condition C11. Meeting condition C11 specifically means that the signal quality B01 from master device B0 to device A1 is greater than the signal quality A01 from master device A0 to device A1, and the difference between signal quality B01 and signal quality A01 is greater than or equal to a preset difference. In one example, the signal quality can be characterized by RSSI. The preset difference can be 20dB. For example, condition C1 can also include condition C12. Meeting condition C1 specifically means that the signal quality B01 from master device B0 to device A1 is greater than or equal to a preset value. In one example, the signal quality can be characterized by RSSI. The preset value can be -72dB.

[0126] In case b2, device A1 can be designated as the master device A0. Condition C1 can include condition C12. For details on master device B satisfying condition C12, please refer to the above description of case b1, which will not be repeated here.

[0127] When master device B0 meets condition C1, it can be further determined whether master device B0 meets condition C2. For example, master device B0 meeting condition C2 specifically means that master device B0's ranking priority (RP) is greater than that of master device A0. The management frames sent by the master and slave devices in the clock domain can carry a master election attribute field, which may include the master device's ranking priority. As mentioned above, device A1 is within the signal coverage range of master device B0; therefore, device A1 can listen to the management frames sent by master device B0 and obtain master device B0's ranking priority.

[0128] In one example, using beacon frames, we will specifically introduce the sorting priority of the master device. Figure 5B The structure of a beacon frame is shown. For example... Figure 5B As shown, the beacon frame has a master device election attribute field. Figure 5B The document also illustrates the structure of the master device selection attribute field in the beacon frame, including the `ranking priority` field, which specifies the ranking priority of the device sending the beacon frame. The `ranking priority` field can contain three subfields, used to specify the device level, protocol version, and number of links (link cnt). See further... Figure 5B The master device election attribute field also includes a master ranking priority field, which is used to specify the ranking priority of the master device. Specifically, when the device sending the beacon frame is the master device, the content of the master ranking priority field is the same as the ranking priority field. When the device sending the beacon frame is a slave device, the content of the master ranking priority field is the content parsed from the ranking priority field of the beacon frame sent by the slave device from the master device.

[0129] Using the above method, device A1 can determine whether to join clock domain B. After deciding to join clock domain B, device A1 can initiate the clock domain merging process.

[0130] Furthermore, when a Wi-Fi link needs to be established between devices A1 and B1, and device A1 is aware of clock domain B, devices A1 and B1 can determine whether device A1 joins clock domain B or device B1 joins clock domain A by comparing the sorting priority of master device A0 (the master device in clock domain A) and master device B0 (the master device in clock domain B). Specifically, if the sorting priority of master device A0 is lower than that of master device B0, device A1 decides to join clock domain B, and the clock domain merging process is initiated. If the sorting priority of master device A0 is higher than that of master device B0, device B1 decides to join clock domain A, and the clock domain merging process is initiated.

[0131] The specific methods by which device B1 obtains the sorting priority of master device A0, and device A1 obtains the sorting priority of master device B0, are as follows: Device A1 can be designated as the service initiator or link establishment initiator. Device A1 can send an association request frame to device B1. The association request frame carries a master device election attribute field. After receiving the association request frame sent by device A1, device B1 can obtain the sorting priority of master device A0 from the master device election attribute field carried in the association request frame. Device B1 can also respond to the association request frame sent by device A1 by sending an association response frame to device A1. The association response frame carries a master device election attribute field. After receiving the association response frame sent by device B1, device A1 can obtain the sorting priority of master device B0 from the master device election attribute field carried in the association response frame.

[0132] In this embodiment, the association request frame is obtained by adding a master device election attribute field to the frame body of the association request frame defined in standard 802.11. Similarly, the association response frame in this embodiment is obtained by adding a master device election attribute field to the frame body of the association response frame defined in standard 802.11.

[0133] The reason why devices A1 and B1 can determine which clock domain to join by comparing the sorting priority of master device A0 and master device B0 is as follows.

[0134] After devices A1 and B1 establish a Wi-Fi link, the island containing device A1 and the island containing device B1 are merged into a single island. It can be understood that the merged island contains devices within the signal coverage area of ​​both the main device A0 and the main device B0. Therefore, assuming device A1 is confirmed to join clock domain B, even if device A1 is outside the signal coverage area of ​​the main device B0, device A1 can synchronize with the clock of the main device B0 through other devices on the island. Similarly, assuming device B1 is confirmed to join clock domain A, even if device B1 is outside the signal coverage area of ​​the main device A0, device B1 can synchronize with the clock of the main device A0 through other devices on the island. Therefore, device A1 no longer needs to determine whether it is within the signal coverage area of ​​the main device B0 or ​​whether the main device B0 meets condition C1; device B1 no longer needs to determine whether it is within the signal coverage area of ​​the main device A0 or whether the main device A0 meets condition C1. The scheme for synchronizing a device located outside the main device's signal coverage area with the main device's clock will be described in detail below, and will not be repeated here.

[0135] Next, taking device A1 as an example when it determines to join clock domain B and starts the clock domain merging process, the clock domain merging process will be introduced in different cases.

[0136] In some embodiments, see Figure 3 or Figure 4A Device A1 can be set as a device in island D1, but it is neither the island master nor the master device in clock domain A. In this case, the clock domain merging process can be divided into five stages. Stage P1a: Device A1 joins clock domain B. Stage P2a: The island master of island D1 joins clock domain B. Stage P3a: The island master of island D1 assists other devices in island D1, excluding device A1, to join clock domain B. Stage P4a: Master device A0 joins clock domain B. Stage P5a: Master device A0 assists other devices in clock domain A, excluding island D1, to join clock domain B.

[0137] Next, combined Figure 6 Taking device A2 as the island master of island D1, device A3 as another device in island D1, and device A4 as a device in clock domain A other than island D1 as an example, the above five stages will be illustrated. Among them, the master device A0 can be... Figure 3 or Figure 4A Any of the devices A5, A6, and A7 shown.

[0138] See Figure 6 Device A1 can execute step 601a to update the clock domain identifier information to the clock domain identifier information of clock domain B. As described above, the management frame or data frame sent by device B1 carries the clock domain identifier information of clock domain B. When device A1 listens to the management frame or data frame sent by device B1, it can extract the clock domain identifier information of clock domain B and save or record the clock domain identifier information of clock domain B as the clock domain identifier information of the clock domain where device A1 is located.

[0139] Device A1 can perform step 602a, sending a synchronization request A11 to device B1. For example, the synchronization request A11 can specifically be a sync request action frame. The sync request action frame will be described in detail below and will not be repeated here.

[0140] After receiving the synchronization request A11, device B1 can execute step 603a, sending a synchronization indication A12 to device B1. Synchronization indication A12 carries the transmission time of synchronization indication A12, and the field for filling in the clock domain identification information in synchronization indication A12 contains the clock domain identification information of clock domain B. In one example, synchronization indication A12 is specifically a beacon frame. The Addr3 field of the beacon frame contains the clock domain identification information of clock domain B. The transmission time of synchronization indication A12 can specifically be the transmission time of the beacon frame. The transmission time of the beacon frame can be represented by the timing synchronization function (TSF). Return to... Figure 5B The beacon frame includes a timestamp field. The MAC function entity of device B1 can fill the TSF into the timestamp field of the beacon frame.

[0141] After receiving synchronization indication A12, device A1 can execute step 604a to perform clock synchronization. Specifically, device A1 finds that the clock domain identifier information carried by synchronization indication A12 is the same as the clock domain identifier information stored by device A1 itself, and can perform clock synchronization according to the transmission time of synchronization indication A12. For example, the transmission time of synchronization indication A12 is specifically the TSF at the time of transmission of synchronization indication A12, and device A1 can update its own TSF according to the TSF at the time of transmission of synchronization indication A12. This allows the clock to be synchronized to clock domain B, enabling device A1 to join clock domain B.

[0142] After device A1 is added to clock domain B, it can assist device A2, the island owner of the island where device A1 resides, in adding to clock domain B. See details in [link to relevant documentation]. Figure 6 Device A1 can execute step 601b, sending a domain merge request A21 to device A2. In one example, the domain merge request A21 can specifically be a domain merge request frame. The domain merge request frame will be described in detail below and will not be repeated here. The domain merge request A21 can carry information about the master device B0 of clock domain B. The information of master device B0 can include the master device's identification information (e.g., MAC address) or the clock domain identification information of clock domain B.

[0143] Device A2 can execute step 602b to update the clock domain identifier information to the clock domain identifier information of clock domain B. Specifically, when the domain merge request A21 carries the identifier information of master device B0, device A2 can generate the clock domain identifier information of clock domain B based on the identifier information of master device B0, and then update the clock domain identifier information to the clock domain identifier information of clock domain B. The rules for generating the clock domain identifier information can be referred to the above description and will not be repeated here. When the domain merge request A21 carries the clock domain identifier information of clock domain B, device A2 can update the clock domain identifier information to the clock domain identifier information of clock domain B.

[0144] In some embodiments, reference may be made to Figure 7A Within location 100, there may also exist a clock domain C composed of devices C1, C2, etc. Device A3 may listen to management frames or data frames sent by devices C1 or C2, thereby detecting clock domain C. Furthermore, if device A3 is within the signal coverage range of the master device of clock domain C and the master device of clock domain C meets conditions C1 and C2, device A3 may initiate a clock domain merging process. Therefore, device A2 receives the domain merging request A21 at the same time as receiving the domain merging request sent by device A3. In this case, before executing step 602, device A2 can determine whether to update the clock domain identification information to the clock domain identification information of clock domain B, or to update the clock domain identification information to the clock domain identification information of clock domain C. That is, it decides whether to join clock domain B or clock domain C. The specific process can be as follows.

[0145] As described above, the domain merge request A21 can carry information about the master device B0 of clock domain B. The information about master device B0 can include one or more of the following: signal quality from master device B0 to device A1, number of connections to master device B0, and master device B0 sorting priority. Similarly, the domain merge request sent by device A3 can also include information about the master device C0 of clock domain C. The information about master device C0 can also include one or more of the following: signal quality from master device C0 to device A3, number of connections to master device C, and master device C sorting priority. Device A2 can compare the information of master device B0 with the information of the master device in clock domain C, and then decide whether to update the clock domain identification information to the clock domain identification information of clock domain B or to the clock domain identification information of clock domain C. In one example, when the signal quality from master device B0 to device A1 is greater than the signal quality from master device C0 to device A3, device A2 updates the clock domain identification information to the clock domain identification information of clock domain B. In one example, when the sorting priority of master device B0 is greater than that of master device C0, device A2 will update its clock domain identifier information to that of clock domain B. And so on, not all examples will be listed here.

[0146] Device A2 can be configured to execute step 602b, which updates the clock domain identifier information to the clock domain identifier information of clock domain B. Device A2 can then execute step 603b, sending a domain merge response A22 to device A1. For example, the domain merge response A22 can specifically be a domain merge response frame. The domain merge response frame will be described in detail below and will not be repeated here. For example, the domain merge response A22 can carry a clock domain merge acceptance indication, indicating that device A2 accepts joining clock domain B. Device A1 can respond to the domain merge response A22 and execute step 604b, sending a synchronization indication A23 to device A2. The synchronization indication A23 carries the sending time of the synchronization indication A23, and the field in the synchronization indication A23 used to fill in the clock domain identifier information contains the clock domain identifier information of clock domain B. In one example, the synchronization indication A23 is specifically a beacon frame. The Addr3 field of the beacon frame contains the clock domain identifier information of clock domain B. The specific time for sending the synchronization indicator A23 can be the TSF when the beacon frame is sent.

[0147] After receiving synchronization indication A23, device A2 can execute step 605b to perform clock synchronization. Specifically, device A2 finds that the clock domain identifier information carried by synchronization indication A23 is the same as the clock domain identifier information stored by device A2 itself, and can perform clock synchronization according to the transmission time of synchronization indication A23. For example, the transmission time of synchronization indication A23 is specifically the TSF at the time of transmission of synchronization indication A23, and device A2 can update its own TSF according to the TSF at the time of transmission of synchronization indication A23. This allows the clock to be synchronized to clock domain B, enabling device A2 to join clock domain B.

[0148] For example, device A2 can send a domain merge response to device A3, which may carry a clock domain merge rejection indication, indicating that device A2 refuses to join clock domain C. Upon receiving this domain merge response, device A3 can terminate the clock domain merge process initiated by device A3. In some embodiments, while terminating the clock domain merge process initiated by device A3, device A3 can modify the clock domain identification information back to the clock domain identification information of clock domain A.

[0149] Furthermore, after device A1 sends synchronization instruction A23 to device A2, device A1 can exit the clock domain merging process. In other words, after device A1 sends synchronization instruction A23 to device A2, device A1 has merged into clock domain B and has also completed its task of assisting device A2 in entering clock domain B; subsequent processes no longer require device A1. At this point, device A1 has completed the clock domain merging process, and therefore, device A1 can exit the clock domain merging process.

[0150] In some embodiments, when a device is in a clock domain merging process, it no longer detects other clock domains or responds to requests to join other clock domains. That is, the device cannot execute clock domain merging processes in parallel. At any given time, a device executes the merging process for only one clock domain.

[0151] Continue reading Figure 6 After device A2 joins clock domain B, it can instruct device A3 to join clock domain B as well. Specifically, as follows... Figure 6 As shown, device A2 can execute step 601c to send a synchronization instruction A31 to device A3.

[0152] In some embodiments, it is understood that devices within the same island operate on the same channel. Therefore, to improve clock domain merging efficiency, device A2 can broadcast a synchronization indication A31 on the operating channel. Thus, all devices within the island, including device A3, can listen to the synchronization indication A31. For example, device A2 can broadcast the synchronization indication A31 on the operating channel for N consecutive time slots. N is a positive integer greater than or equal to 1. In one example, N is specifically 3.

[0153] In some embodiments, the synchronization indicator A31 may carry clock domain identification information of clock domain A. For example, the synchronization indicator A31 may be a beacon frame, whose Addr3 field is filled with the clock domain identification information of clock domain A.

[0154] Synchronization indication A31 may include the transmission time of synchronization indication A31. For example, synchronization indication A31 is specifically a beacon frame, and the transmission time of synchronization indication A31 may be the TSF at the time of beacon frame transmission.

[0155] Synchronization instruction 31 may carry information about master device B0. For example, the information about master device B0 carried by synchronization instruction 31 may include the MAC address of master device B0. For example, synchronization instruction 31 may be a beacon frame, and the MAC address of master device B0 may be filled in the Master mac addr3 subfield of the master device election attribute field in the beacon frame.

[0156] After receiving the synchronization indication A31, device A3 can execute step 602c to perform clock synchronization. Specifically, device A3 finds that the clock domain identifier information carried by the synchronization indication A31 is the same as the clock domain identifier information stored by device A3 itself, and can perform clock synchronization according to the transmission time of the synchronization indication A31. For example, the transmission time of the synchronization indication A31 is specifically the TSF at the time of transmission of the synchronization indication A31, and device A3 can update its own TSF according to the TSF at the time of transmission of the synchronization indication A31. Furthermore, device A3 can update its master device according to the master device B0 information carried by the synchronization indication. For example, the MAC address of master device B0 can be updated to the MAC address of device A3's master device.

[0157] Furthermore, device A3 can update its clock domain identifier information to that of clock domain B based on the information from master device B0 carried in the synchronization instruction. Specifically, it can generate the clock domain identifier information for clock domain B based on the information from master device B0. For example, it can generate the clock domain identifier information for clock domain B based on the MAC address of master device B0. Then, it updates the clock domain identifier information to that of clock domain B. This allows the clock to be synchronized to clock domain B, enabling device A3 to join clock domain B.

[0158] In some embodiments, after step 602b and before step 601c, since device A3 has not yet entered the clock domain merging process initiated by device A1, device A3 may detect the existence of other clock domains. For example, device A3 detects the existence of clock domain C and may send a domain merge request to device A2. Since device A2 is currently in the clock domain merging process initiated by device A1, device A2 responds to the domain merge request sent by device A3. This domain merge request may carry a clock domain merge rejection indication, indicating that device A2 refuses to join clock domain C. When device A3 receives this domain merge response, it may terminate the clock domain merging process initiated by device A3. In some embodiments, while terminating the clock domain merging process initiated by device A3, device A3 may modify the clock domain identification information back to the clock domain identification information of clock domain A.

[0159] When there are other devices such as devices A1 and A3 in the island where device A2 is the island master, the process of adding the other devices to clock domain B can be referred to the process of adding device A3 to clock domain B, and will not be described in detail here.

[0160] In some embodiments, continue reading Figure 6 Device A2 can assist master device A0 in joining clock domain B. Specifically, as follows... Figure 6As shown, device A2 can perform step 601d, sending a domain merge request A01 to master device A0. For example, device A2 can switch to the working channel of master device A0 and send the domain merge request A01 to master device A0 through the working channel. For example, device A2 can send the domain merge request A01 to master device A0 through an interaction channel.

[0161] In one example, the domain merge request A01 can specifically be a domain merge request frame. Domain merge request frames will be described in detail below and will not be repeated here. Domain merge request A21 can carry information about the master device B0 of clock domain B. The information about master device B0 can include the master device's identification information (e.g., MAC address) or the clock domain identification information of clock domain B.

[0162] Master device A0 can execute step 602d to update the clock domain identifier information to the clock domain identifier information of clock domain B. Specifically, when domain merge request A01 carries the identifier information of master device B0, master device A0 can generate the clock domain identifier information of clock domain B based on the identifier information of master device B0, and then update the clock domain identifier information to the clock domain identifier information of clock domain B. When a domain device requests the clock domain identifier information of clock domain B carried by A01, master device A0 can update the clock domain identifier information to the clock domain identifier information of clock domain B.

[0163] In some embodiments, it is understood that the slave device needs to be within the signal coverage range of the master device in order to receive management frames sent by the master device. Before executing step 602d, master device A0 can determine whether master device A0 is within the signal coverage range of master device B0. As described above, the domain merging request A21 can carry information about master device B0. The information about master device B0 can include the MAC address or BSSID of master device B0. Master device A0 can send frame request information to master device B0 based on the MAC address or BSSID of device B0. In one example, the frame request information can specifically be a sync request action frame. If master device B0 receives the frame request information, it can respond to the frame request information by sending a preset frame to master device A0. In one example, the preset frame can specifically be a beacon frame. If master device A0 receives the preset frame, it can be determined that master device A0 is within the signal coverage range of master device B0. If master device A0 does not receive the preset frame, it can be determined that master device A0 is not within the signal coverage range of master device B0.

[0164] In an illustrative example, in Figure 4AIn the scenario shown, the dashed line corresponding to the clock domain represents the signal coverage area of ​​the master device in the clock domain. Devices A5, A6, and A7 in clock domain A are within the signal coverage area of ​​master device B0. Since master device A0 is one of devices A5, A6, and A7, master device A0 is also within the signal coverage area of ​​master device B0.

[0165] In an illustrative example, in Figure 7B In the scenario shown, the dashed line corresponding to the clock domain is used to represent the signal coverage range of the master device in the clock domain. Devices A5, A6, and A7 in clock domain A are not within the signal coverage range of master device B0. Therefore, master device A0 is not within the signal coverage range of master device B0.

[0166] When master device A0 determines that it is within the signal coverage area of ​​master device B0, master device A0 can execute step 602d. Then, master device A0 can execute step 603d, sending a domain merge response A02 to device A2. For example, the domain merge response A02 can specifically be a domain merge response frame.

[0167] Device A2 can respond to domain merging response A02, execute step 604b, and send synchronization indication A03 to master device A0. Synchronization indication A03 carries the transmission time of synchronization indication A03, and the field for filling in clock domain identification information in synchronization indication A03 contains the clock domain identification information of clock domain B. In one example, synchronization indication A03 is specifically a beacon frame. The Addr3 field of the beacon frame contains the clock domain identification information of clock domain B. The transmission time of synchronization indication A03 can specifically be the TSF at the time of beacon frame transmission.

[0168] In some embodiments, after performing step 604b, device A2 may exit the clock domain merging process.

[0169] After receiving synchronization indication A03, master device A0 can execute step 605d to perform clock synchronization. Specifically, master device A0 finds that the clock domain identifier information carried by synchronization indication A03 is the same as the clock domain identifier information stored by master device A0 itself, and can perform clock synchronization according to the transmission time of synchronization indication A03. For example, the transmission time of synchronization indication A03 is specifically the TSF at the time of transmission of synchronization indication A03. Master device A0 can update its own TSF according to the TSF at the time of transmission of synchronization indication A03. Thus, the clock can be synchronized to clock domain B, allowing master device A0 to join clock domain B.

[0170] After master device A0 joins clock domain B, it can instruct its slave devices to join clock domain B. (Continue reading...) Figure 6 Taking device A4 as an example, this example illustrates the process of a slave device of master device A0 joining the clock domain B.

[0171] like Figure 6 As shown, the master device A0 can execute step 601e to send a synchronization instruction A41 to device A4.

[0172] In some embodiments, master device A0 may broadcast a synchronization indication A41 on the interaction channel. Thus, slave devices of master device A0, including device A4, can listen to the synchronization indication A41. For example, master device A0 may broadcast the synchronization indication A41 on the interaction channel for N consecutive time slots. N is a positive integer greater than or equal to 1. In one example, N is specifically 3. After master device A0 has broadcast the synchronization indication A41 on the interaction channel for N consecutive time slots, master device A0 may exit the clock domain merging process.

[0173] In some embodiments, the synchronization indicator A41 may carry clock domain identification information of clock domain A. For example, the synchronization indicator A41 may be a beacon frame, whose Addr3 field is filled with clock domain identification information of clock domain B.

[0174] Synchronization indication A41 may include the transmission time of synchronization indication A41. For example, synchronization indication A41 is specifically a beacon frame, and the transmission time of synchronization indication A41 may be the TSF at the time of beacon frame transmission.

[0175] Synchronization instruction 41 may carry information about the master device B0. For example, the information about the master device B0 carried by synchronization instruction 41 may include the MAC address of the master device B0. For example, synchronization instruction 41 may be a beacon frame, and the MAC address of the master device B0 may be filled in the Master mac addr3 subfield of the master device election attribute field in the beacon frame.

[0176] After receiving synchronization indication A41, device A4 can execute step 602e to perform clock synchronization. For details, please refer to the description of step 602c above; it will not be repeated here. Additionally, devices such as device A4 that are within the signal coverage area of ​​the master device A0 can receive synchronization indication A41 and then perform clock synchronization. As mentioned above, in this embodiment, it is not required that every device in the same clock domain must be within the signal coverage area of ​​the master device in that clock domain. Therefore, clock domain A may contain devices located outside the signal coverage area of ​​the master device A0. Devices located outside the signal coverage area of ​​the master device A0 cannot receive synchronization indication A41 and cannot perform clock synchronization based on it. Devices located outside the signal coverage area of ​​the master device A0 can perform clock synchronization using the same method as devices experiencing single-point desynchronization. A single-point desynchronization device refers to a device that has experienced a single-point desynchronization. The method for synchronizing single-point desynchronization and its corresponding clock synchronization mechanism will be described below and will not be repeated here.

[0177] Additionally, the scheme for adding other slave devices (excluding devices A1, A2, A3, and A4) to clock domain B from master device A0 can be implemented by referring to the scheme for adding device A4 to clock domain B. It will not be elaborated further here.

[0178] Thus, the merging of clock domain A into clock domain B was completed, even though device A1 is neither the island master nor the master device of clock domain A. Devices originally in clock domain A, after merging into clock domain B, act as slave devices of master device B0, accepting scheduling from master device B0. This optimizes channel resource scheduling, maximizes channel resource utilization, reduces mutual interference between devices, and improves the user's communication experience.

[0179] The example above illustrates a merging scheme from clock domain A to clock domain B when device A1 is neither the island master nor the master device of clock domain A. Next, we will combine... Figure 8 This section introduces a merging scheme from clock domain A to clock domain B when device A1 is the island master and not the master device of the clock domain.

[0180] In some embodiments, see Figure 3 or Figure 4A Device A1 can be designated as the island master of island D1, but it is not the master device of clock domain A. In this case, the clock domain merging process can be divided into four stages. Stage P1b: Device A1 joins clock domain B. Stage P2b: Other devices in the auxiliary island of device A1 join clock domain B. Stage P3b: Master device A0 joins clock domain B. Stage P4b: Master device A0 assists other devices in clock domain A (excluding island D1) to join clock domain B.

[0181] Next, combined Figure 8 Taking device A1 as the island master of island D1, devices A2 and A3 as non-island master devices in island D1, and device A4 as a device in clock domain A other than island D1 as an example, the above four stages are illustrated below. Among them, the master device A0 can be... Figure 3 or Figure 4A Any of the devices A5, A6, and A7 shown.

[0182] like Figure 8 As shown, in stage P1b, device A1 can execute step 801a, updating the clock domain identifier information to the clock domain identifier information of clock domain B. For details, please refer to the above text. Figure 6 The description of step 601a is omitted here. Device A1 can also execute step 802a to send a synchronization request A11 to device B1. For details, please refer to the above description. Figure 6 The description of step 602a is omitted here. Device B1 can execute step 803a to send synchronization instruction A12 to device A1. For details, please refer to the above description. Figure 6 The description of step 603a is omitted here. Device A1 can execute step 804a to perform clock synchronization. Please refer to the above description for details. Figure 6 The details of step 604a will not be repeated here.

[0183] In stage P2b, device A1 can perform step 801b, sending a synchronization indication A31 to devices A2 and A3. For example, device A1 can broadcast the synchronization indication A31 on the operating channel, thereby receiving the synchronization indication A31 from devices A2 and A3. See the above description for details. Figure 6 The details of step 601c will not be repeated here.

[0184] Device A2 can execute step 802b-1 to synchronize the clock. Device A3 can execute step 802b-2 to differentiate the clock. For details, please refer to the above text. Figure 6 The details of step 602c will not be repeated here.

[0185] Continue reading Figure 8 In stage P4b, device A1 can execute step 801c, sending a domain merge request A01 to master device A0. For details, please refer to the above text. Figure 6 The description of step 601d in the previous section will not be repeated here. Master device A0 can execute step 802c to update the clock domain identifier information to the clock domain identifier information of clock domain B. For details, please refer to the above description. Figure 6 The description of step 602d in the previous section will not be repeated here. Master device A0 can execute step 803c, sending a domain merge response A02 to device A1. For details, please refer to the above description. Figure 6 The description of step 603d in the previous section will not be repeated here. Device A1 can execute step 804c to send synchronization indication A03 to master device A0. For details, please refer to the above description. Figure 6 The description of step 604d in the previous section will not be repeated here. The master device A0 can execute step 805c to perform clock synchronization. For details, please refer to the above section... Figure 6 The details of step 605d will not be repeated here.

[0186] Continue reading Figure 8 In stage P5b, master device A0 can execute step 801d, sending synchronization instruction A41 to device A4. For details, please refer to the above text. Figure 6 The description of step 601e in the previous section will not be repeated here. Device A4 can execute step 802d to perform clock synchronization. Please refer to the above section for details. Figure 6 The description of step 602e in the previous section will not be repeated here.

[0187] Additionally, the scheme for adding other slave devices (excluding devices A1, A2, A3, and A4) to clock domain B from master device A0 can be implemented by referring to the scheme for adding device A4 to clock domain B. It will not be elaborated further here.

[0188] Thus, with device A1 being the island master but not the master device of clock domain A, the merging of clock domain A into clock domain B is completed. Devices originally in clock domain A, after merging into clock domain B, become slave devices of master device B0, accepting scheduling from master device B0. This optimizes channel resource scheduling, maximizes channel resource utilization, reduces mutual interference between devices, and improves the user's communication experience.

[0189] The example above illustrates a merging scheme from clock domain A to clock domain B when device A1 is the island master but not the master device of clock domain A. Next, we will combine... Figure 8 This paper introduces a merging scheme from clock domain A to clock domain B when device A1 is the master device of clock domain A.

[0190] In some embodiments, see Figure 3 or Figure 4A Device A1 can be designated as the master device of clock domain A. In this case, the clock domain merging process can be divided into two stages. Stage P1c: Device A1 joins clock domain B. Stage P2c: Device A1 instructs its slave devices to join clock domain B.

[0191] Next, combined Figure 9 Taking device A1 as the master device of clock domain A, and device A2, device A3, and device A4 as slave devices, the above two stages will be illustrated with examples.

[0192] like Figure 9 As shown, in stage Plc, device A1 can execute step 901a, updating the clock domain identifier information to the clock domain identifier information of clock domain B. For details, please refer to the above text. Figure 6 The description of step 601a is omitted here. Device A1 can also execute step 902a to send a synchronization request A11 to device B1. For details, please refer to the above description. Figure 6 The description of step 602a is omitted here. Device B1 can execute step 903a to send synchronization instruction A12 to device A1. For details, please refer to the above description. Figure 6 The description of step 603a is omitted here. Device A1 can execute step 904a to perform clock synchronization. Please refer to the above description for details. Figure 6 The details of step 604a will not be repeated here.

[0193] In stage P2c, device A1 can execute step 901b, sending a synchronization indication A41 to slave devices including devices A2, A3, and A4. For example, device A1 can broadcast the synchronization indication A41 on the interaction channel, thereby allowing its slave devices to receive the synchronization indication A41. See the above description for details. Figure 6 The description of step 601e in the previous section will not be repeated here.

[0194] Devices A2, A3, and A4 can respectively execute steps 902b-1, 902b-2, and 902-3 to synchronize their clocks. Please refer to the above text for details. Figure 6 The description of step 602e in the previous section will not be repeated here.

[0195] Additionally, the scheme for adding other slave devices (excluding devices A1, A2, A3, and A4) to clock domain B from master device A0 can be implemented by referring to the scheme for adding device A2 to clock domain B. It will not be elaborated further here.

[0196] Thus, with device A1 being the master device in clock domain A, the merging of clock domain A into clock domain B is completed. Devices originally in clock domain A, after merging into clock domain B, become slave devices of master device B0, accepting scheduling from master device B0. This optimizes channel resource scheduling, maximizes channel resource utilization, reduces mutual interference between devices, and improves the user's communication experience.

[0197] This application also provides a clock synchronization method to address the problem of how to synchronize the clock of a slave device with the master device's clock when the slave device is out of sync with the master device. Here, being out of sync with the master device can mean that the slave device cannot receive beacon frames sent by the master device.

[0198] As mentioned above, the master device in clock domain A, i.e., master device A0, instructs its slave devices to join clock domain B. One or more slave devices of master device A0 may be outside the signal coverage area of ​​master device B0, thus failing to receive beacon frames sent by the master device, resulting in desynchronization. Additionally, in cases where the master device is powered off / shut down / moved away from location 100, the slave device is moved away from location 100, or the master device is changed to a device located further away from the slave device, the slave device may also fail to receive beacon frames sent by the master device, resulting in desynchronization.

[0199] In some embodiments, desynchronization caused by a problem with the master device can be referred to as domain desynchronization. For example, desynchronization caused by the master device losing power / shutting down / moving away from location 100 is domain desynchronization. In some embodiments, as described above, during the synchronization time slot of each scheduling cycle, the master device sends beacon frames on the interaction channel, and the slave device sends PNF frames on the interaction channel. When the slave device S1 fails to receive the beacon frames sent by the master device in the synchronization time slot for M consecutive times (e.g., out_of_sync_cnt consecutive times), but can receive PNF frames sent by other slave devices, it can be determined that domain desynchronization has occurred. In the case of domain desynchronization, the slave device can initiate a master device election to elect a new master device and synchronize its clock to the new master device's clock. The master device election process can be referred to in the prior art, and will not be repeated here.

[0200] In some embodiments, the loss of synchronization caused by a problem with slave device S1 can be referred to as a single point of synchronization failure of slave device S1. For example, if the distance between slave device S1 and master device is far, causing slave device S1 to lose synchronization, this is called a single point of synchronization failure of slave device S1. In the case of single point synchronization failure of slave device S1, other slave devices do not experience synchronization failure. The following method can be used to determine whether a single point of synchronization failure of slave device S1 has occurred.

[0201] In scheme a, if slave device S1 fails to receive a beacon frame sent by the master device in the synchronization time slot for M consecutive times (e.g., out_of_sync_cnt consecutive times), and also fails to receive a PNF frame sent by other slave devices, it can be determined that slave device S1 has experienced a single point of desynchronization. A specific application scenario is that slave device S1 is far from the master device and also far from other slave devices, resulting in slave device S1 not receiving beacon frames sent by the master device, nor receiving PNF frames sent by other slave devices.

[0202] In scheme b, if slave device S1 determines that a domain desynchronization has occurred and performs a master election accordingly, and if slave device S1 receives a PNF frame instead of a beacon frame from the new "master" during the synchronization slot of the scheduling cycle, it can be determined that a single point of desynchronization has occurred for slave device S1. A specific application scenario is that slave device S1 is far from the master device, but still maintains a relatively close distance to one or more other slave devices (which can receive beacon frames sent by the master device during the synchronization slot). Therefore, even if slave device S1 does not receive beacon frames from the master device, it can receive PNF frames sent by these one or more slave devices, leading to a misjudgment of a domain desynchronization. In the case of a misjudgment of a domain desynchronization, the new "master" elected by slave device S1 through the master election is one of these one or more slave devices. Therefore, the new "master" is only perceived as the master by slave device S1, not the actual master. In other words, the new "master" is actually still a slave device. Therefore, the new "master" sends PNF frames instead of beacon frames during the synchronization slot.

[0203] In some embodiments, when a single point of desynchronization occurs in slave device S1, slave device S1 can send a synchronization request to a device with a Wi-Fi link to it. For example, the synchronization request can specifically be a `syncrequest action` frame. Device S2 can be configured to have a Wi-Fi link with slave device S1, and slave device S1 can send a synchronization request to device S2. Device S2 can respond to the synchronization request by sending a synchronization indication to slave device S1. For example, the synchronization indication can be a beacon frame. Slave device S1 can perform clock synchronization based on the synchronization indication, thereby synchronizing its clock with the master device's clock. See the above description for details. Figure 6 The details of steps 602a-604a will not be repeated here.

[0204] In an illustrative example, device S2 can send synchronization instructions to slave device S1 at preset intervals. In one example, device S2 sends synchronization instructions to slave device S1 at fixed time slots within each cycle. Exemplarily, device S2 and slave device S1 can exchange information via a Wi-Fi link between them.

[0205] In an illustrative example, device S2 can be the island owner of the island where slave device S1 resides. Exemplarily, device S2 and slave device S1 can interact via a Wi-Fi link between them.

[0206] If device S1 sends a synchronization request to device S2 but does not receive a synchronization indication from device S2, device S1 can continue to send synchronization requests to other devices with a Wi-Fi link to request synchronization indications. ......

[0207] If none of the devices with Wi-Fi links to slave device S1 send a synchronization indication to slave device S1, it indicates a potential problem with slave device S1's Wi-Fi link. In this case, regardless of whether it is in a synchronization time slot, slave device S1 can switch from the working channel to the interactive channel to listen for beacon frames again on the interactive channel in order to rejoin the clock domain.

[0208] In some embodiments, when a single point of desynchronization occurs in slave device S1, slave device S1 can send a synchronization request to the island master of the island where slave device S1 resides. For example, the synchronization request may specifically be a sync request action. The island master can respond to the synchronization request by sending a synchronization indication to slave device S1. Slave device S1 can then perform clock synchronization according to the synchronization indication, thereby synchronizing its clock with the master device's clock. For details, please refer to the above description... Figure 6 The descriptions of steps 602a-604a are omitted here. For example, the synchronization indicator can be a beacon frame.

[0209] In one illustrative example, the island master can send synchronization instructions to the slave device S1 at preset intervals. In one example, the synchronization instructions are sent to the slave device S1 at fixed time slots within each cycle. In another example, the island master can send the synchronization instructions to the slave device S1 on the working channel.

[0210] If slave device S1 does not receive an island synchronization instruction from the island master after sending a synchronization request, slave device S1 can send a synchronization request to other devices with a Wi-Fi link to slave device S1. For example, the synchronization request can be a sync request action frame. Device S3 can be configured to have a Wi-Fi link with slave device S1, and slave device S1 can send a synchronization request to device S3. Device S3 can respond to the synchronization request by sending a synchronization instruction to slave device S1. For example, the synchronization instruction can be a beacon frame. Slave device S1 can then synchronize its clock according to the synchronization instruction, thereby synchronizing its clock with the master device's clock. See the above for details. Figure 6 The details of steps 602a-604a will not be repeated here.

[0211] In an illustrative example, device S3 can send synchronization instructions to slave device S1 at preset intervals. In one example, the synchronization instructions are sent to slave device S1 at fixed time slots within each cycle. Exemplarily, device S3 and slave device S1 can exchange information via a Wi-Fi link between them.

[0212] If device S1 sends a synchronization request to device S3 but does not receive a synchronization indication from device S2, device S1 can continue to send synchronization requests to other devices with Wi-Fi links to request synchronization indications.

[0213] If none of the devices with Wi-Fi links to slave device S1 send a synchronization indication to slave device S1, it indicates a potential problem with slave device S1's Wi-Fi link. In this case, regardless of whether it is in a synchronization time slot, slave device S1 can switch from the working channel to the interactive channel to listen for beacon frames again on the interactive channel in order to rejoin the clock domain.

[0214] In some embodiments, the island master can be configured to send synchronization instructions (e.g., beacon frames) to other devices on the island at a preset period so that other devices can keep their clocks synchronized with the master device according to the synchronization instructions.

[0215] In some embodiments, two devices with Wi-Fi links can be configured to send synchronization instructions to each other at a preset period to help each other maintain clock synchronization with the master device.

[0216] The example above illustrates a solution for resynchronizing the clock to the master device clock after the device becomes out of sync.

[0217] Next, examples will be provided to illustrate the frames involved in the embodiments of this application.

[0218] The sync request action frame can have Figure 10A The frame structure shown is as follows. Fields such as MAC header, Code, OUI, and OUI Type can be filled in according to the filling rules for Action frames defined in the 802.11 Vendor standard. Other fields are described below.

[0219] 1) Subtype field: This field is used to indicate whether it is a request frame or a response frame; where 0 is entered in the Subtype field, it means that it is a request frame; and 1 is entered in the Subtype field, it means that it is a response frame.

[0220] 2) Master election attribute field: The meanings of its subfields are as follows:

[0221] 2.1) Sync State field: If 0 is entered in this field, it indicates that the frame sending device is in a non-sync state; if 1 is entered in this field, it indicates that the frame sending device is a slave device; if 2 is entered in this field, it indicates that the frame sending device is a master device.

[0222] 2.2) Device Cnt field: This field is used to fill in the number of nodes in the clock domain of the sending device of the frame.

[0223] 2.3) Loss Cnt: This field indicates the number of master device beacon frames lost by the sending device in the frame containing this field, where each beacon frame refers to a beacon frame sent by the master device on a synchronization time slot. When multiple master device beacon frames are lost, these multiple beacon frames are consecutively sent by the master device. Setting this field to K indicates that the sending device lost beacon frames sent by the master device on K consecutive synchronization time slots. Here, K is a positive integer greater than or equal to 1. As mentioned above, the sending device in the frame containing this field may experience single-point desynchronization, and then synchronize with the master device through other devices with a Wi-Fi link to the sending device. In this case, the content of this field indicates the number of master device beacon frames lost by the sending device. For a slave device, losing a master device beacon frame means that the slave device did not receive any beacon frames sent by the master device.

[0224] 2.4) Period: The content of this field indicates the number of cycles in which beacons are sent.

[0225] 2.5) Sync slot: The content of this field indicates the slot in which the beacon frame is sent.

[0226] 2.6) Ranking Priority field: This field is used to fill in the RP value information of the sending device of the frame; the Ranking Priority field contains three subfields, namely the Device Level field, the Protocol Version field, and the Link Cnt field.

[0227] 2.7) Master Ranking Priority field: This field is used to fill in the Master's RP value; if the frame is sent by the master device, the content in this field is the same as the content in the Ranking Priority field; if the frame is sent by the slave device, the content in this field is the content parsed from the Ranking Priority field of the Beacon frame sent by the master device.

[0228] 2.8) Master Mac Addr field: This field is used to fill in the MAC address of the master device. Other devices can generate the corresponding clock domain identification information through the MAC address of the master device.

[0229] The example above introduced the sync request action frame. Next, we will introduce the domain merge request frame and the domain merge response frame.

[0230] Domain merge request frames and domain merge response frames can have the following characteristics: Figure 10B The frame structure shown.

[0231] like Figure 10B As shown, the frame structure of the domain merge request frame and the domain merge response frame is similar to that of the sync request action frame. The differences are as follows.

[0232] 1) The content filled in the Action Type field is different to indicate that the domain merge request frame and the syncrequest action frame are different types of frames, or to indicate that the domain merge response frame and the sync request action frame are different types of frames.

[0233] 2) Compared to the sync request action frame, the domain merge request frame and domain merger response frame have an additional status field. For the domain merge response frame, the content of the status field indicates whether clock domain merging is accepted. For example, when the status field is filled with 1, it means that the sending device of the domain merge response frame rejects clock domain merging; when the status field is filled with 0, it means that the sending device of the domain merger response frame accepts clock domain merging.

[0234] In addition, the sync request action frame has a wider range of applications and can be used in clock synchronization schemes for various scenarios or situations. The domain merge request frame and domain merge response frame have a narrower range of applications and are generally used in clock synchronization schemes under clock domain merging scenarios.

[0235] Next, we will introduce PNF frames as an example.

[0236] PNF frames are a type of proprietary broadcast action frame, derived from the standard 802.11 vendor action frame through extensions. The structure of a PNF frame is as follows: Figure 10C As shown. The MAC header, Code, OUT, OUT Type, FCS, and other fields can be filled in according to the definition of the standard 802.11 Vendor frame. Action Type should be filled in as 0. For details on the master device selection attribute fields, please refer to the above text. Figure 10A The description of the illustrated embodiments will not be repeated here.

[0237] Next, based on the clock synchronization scheme described above, this application proposes a clock synchronization method. It is understood that this clock synchronization method, which will be described below, is another expression of the clock synchronization scheme described above; the two are combined. Some or all of the content of this method can be found in the above description of the clock synchronization scheme.

[0238] See Figure 11 This method can be applied to wireless mesh network systems, which include a first device, a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device. Figure 11 As shown, the method includes the following steps.

[0239] Step 1101: The first device receives first information sent by the second device. The first information includes second clock domain identification information, which corresponds to a second clock.

[0240] For example, the first information can be a data frame or management frame sent by the second device, and the second clock domain identification information can be located in the frame header of the data frame or management frame. For example, the second clock domain identification information is determined by preset identification information and the identification information of the second master device.

[0241] When the signal quality between the first device and the second master device meets the first condition, the first device can execute step 1102, updating its clock domain identifier information to the second clock domain identifier information, and execute step 1103, sending a first synchronization request to the second device. The specific execution process of step 1102 can be found in the above description. Figure 6 The implementation of step 601a is described above. The specific execution process of step 1103 can be found in the previous text. Figure 6 The implementation of step 602a is described below.

[0242] For example, the first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

[0243] For example, when the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than the sorting priority of the first master device, the first device can execute steps 1102 and 1103.

[0244] Step 1104: The first device receives a first synchronization indication from the second device. The first synchronization indication is sent by the second device in response to the first synchronization request, and includes second clock domain identification information and the first moment when the second device sends the first synchronization indication. For details, please refer to the above text. Figure 6 The implementation of step 603a is described below.

[0245] Step 1105: The first device synchronizes its clock to the second clock based on the second clock domain identifier information and the first time. For details, please refer to the above text. Figure 6 The implementation of step 604a is described below.

[0246] In some embodiments, the second master device and the second device can be the same device. In other embodiments, the second master device and the second device can be two independent devices.

[0247] In some embodiments, the wireless mesh network system further includes a third device, wherein the third device and the first device are located in a first island, and the third device is the island owner of the first island; the method further includes: the first device sending a first domain merging request to the third device, the first domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the third device updating the clock domain identification information of the third device to the second clock domain identification information according to the information of the second master device; the first device sending a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and a second time at which the first device sent the second synchronization indication; the third device synchronizing its clock to the second clock according to the second clock domain identification and the second time. For details, please refer to the above description. Figure 6 The implementation of steps 601b-605b is described below.

[0248] In some embodiments, the first island further includes at least one fourth device, and the method further includes: the third device sending a third synchronization indication to the at least one fourth device, the third synchronization indication including a third time at which the third device sends the third synchronization indication; and the at least one fourth device synchronizing its clock to a second clock according to the third time. For details, please refer to the above description. Figure 6 The implementation of steps 601c and 602c is described below.

[0249] In some embodiments, the method further includes: a third device sending a second domain merging request to a first master device, the second domain merging request including information of the second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the first master device updating its clock domain identification information to the second clock domain identification information according to the information of the second master device; the third device sending a fourth synchronization indication to the first master device, the fourth synchronization indication including the second clock domain identification information and a fourth time at which the third device sends the fourth synchronization indication; and the first master device synchronizing its clock to the second clock according to the second clock domain identification information and the fourth time. For details, please refer to the above description. Figure 6 The implementation of steps 601d-605d is described below.

[0250] In some embodiments, the wireless mesh network system further includes at least one fifth device, the clock of the at least one fifth device being synchronized with a first clock, and the at least one fifth device not belonging to a first island; the method further includes: a first master device sending a fifth synchronization indication to the at least one fifth device, the fifth synchronization indication including a fifth time at which the first master device sends the fifth synchronization indication; the at least one fifth device synchronizing its clock to a second clock according to the fifth time.

[0251] For details, please refer to the above text. Figure 6The implementation of steps 601e and 602e is described below.

[0252] In some embodiments, at least one fifth device includes a sixth device and a seventh device; wherein the sixth device and the seventh device have a Wi-Fi link, the sixth device is outside the signal coverage range of the second master device, and the seventh device is within the signal coverage range of the second master device; synchronizing the clock of at least one fifth device to a second clock according to a fifth time includes: the seventh device synchronizing its clock to the second clock according to the fifth time; the sixth device sending a sixth synchronization request to the seventh device; the sixth device receiving a sixth synchronization indication sent by the seventh device, the sixth synchronization indication including the sixth time at which the sixth device sent the sixth synchronization indication; and the sixth device synchronizing its clock to the second clock according to the sixth time. For details, please refer to the above description of the clock synchronization scheme for devices with single-point desynchronization.

[0253] In some embodiments, the wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located in a second island, and the first device is the island owner of the second island; the method further includes: the first device sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the first device sends the seventh synchronization indication, and the at least one eighth device synchronizing its clock to a second clock according to the seventh time. For details, please refer to the above description. Figure 8 The implementation of steps 801b, 802b-1, and 802b-2 is described below.

[0254] In some embodiments, the method further includes: a first device sending a third domain merging request to a first master device, the third domain merging request including information of a second master device, the information of the second master device including identification information of the second master device or second clock domain identification information; the first master device updating its clock domain identification information to the second clock domain identification information according to the information of the second master device; the first device sending an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the first device sent the eighth synchronization indication; the first master device synchronizing its clock to the second clock according to the second clock domain identification information and the eighth time. For details, please refer to the above description. Figure 8 The implementation of steps 801c-805c is described below.

[0255] In some embodiments, the wireless mesh network system further includes at least one ninth device, which is not part of the second island; the method further includes: a first master device sending a ninth synchronization indication to the at least one ninth device, the ninth synchronization indication including a ninth time at which the first master device sends the ninth synchronization indication; the at least one ninth device synchronizing its clock to a second clock according to the ninth time. For details, please refer to the above description. Figure 8 The implementation of steps 801d and 802d is described below.

[0256] In some embodiments, the first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; the method further includes: the first device sending a tenth synchronization indication to at least one tenth device, the tenth synchronization indication including a tenth time at which the first device sends the tenth synchronization indication; and at least one tenth device synchronizing its clock to a second clock according to the tenth time. For details, please refer to the above description. Figure 9 The implementation of steps 901b, 902d-1, 902d-2, and 902d-3 is described below.

[0257] The clock synchronization method provided in this application can merge devices in different clock domains into the same clock domain, enabling these devices to receive unified scheduling, thereby optimizing the scheduling of channel resources, reducing mutual interference between devices, and improving the user's communication experience.

[0258] See Figure 12 This application also provides a clock synchronization method applicable to a wireless mesh network system. The wireless mesh network system may include a first device, a second device, and a master device, wherein the clock of the second device is synchronized with the clock of the master device, and a Wi-Fi link exists between the second device and the first device. Figure 12 As shown, the method includes the following steps.

[0259] When the first device is outside the signal coverage area of ​​the master device, the first device can execute step 1201 to send a synchronization request to the second device.

[0260] The second device can respond to the synchronization request and execute step 1202 to send a synchronization indication to the first device. The synchronization indication includes the time when the second device sends the synchronization indication.

[0261] When the first device receives the synchronization instruction, it can perform step 1203 to synchronize the clock of the first device to the clock of the master device according to the time when the second device sends the synchronization instruction.

[0262] In some embodiments, sending a synchronization instruction from the second device to the first device includes: the second device sending a synchronization instruction to the first device at a preset period.

[0263] Figure 12 For details on the clock synchronization method shown, please refer to the introduction of the clock synchronization scheme for devices with single-point desynchronization above.

[0264] In the clock synchronization method provided in this application embodiment, when the first device is outside the signal coverage range of the master device, the first device can synchronize its clock with the clock of the master device through a second device with which it has a Wi-Fi link, thereby enabling the first device to accept the scheduling of the master device and provide users with a better communication experience.

[0265] This application provides a wireless mesh network system, including a first device, a second device, a first master device, and a second master device. The clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device. The first device receives first information sent by the second device, the first information including second clock domain identification information corresponding to the second clock. When the signal quality between the first device and the second master device meets a first condition, the first device further updates its clock domain identification information to the second clock domain identification information and sends a first synchronization request to the second device. The first device also receives a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, and the first synchronization indication including the second clock domain identification information and the first time the second device sent the first synchronization indication. The first device further synchronizes its clock to the second clock based on the second clock domain identification information and the first time. The second master device and the second device can be the same device or two independent devices.

[0266] The functions of each device in this wireless mesh network system can be referred to in the above description. Figure 11 The method implementation shown is illustrated in the example, and will not be described in detail here.

[0267] This application also provides a wireless mesh network system, which includes a first device, a second device, and a master device. The clock of the second device is synchronized with the clock of the master device, and a Wi-Fi link exists between the second device and the first device. When the first device is outside the signal coverage area of ​​the master device, the first device sends a synchronization request to the second device. The second device sends a synchronization indication to the first device, the synchronization indication including the time at which the second device sends the synchronization indication. The first device is also used to synchronize its clock to the clock of the master device according to the time at which the second device sends the synchronization indication.

[0268] The functions of each device in this wireless mesh network system can be implemented by referring to the clock synchronization scheme for devices with single-point desynchronization described above, and will not be repeated here.

[0269] See Figure 13 This application also provides a communication device 1300, which includes a processor 1310 and a memory 1320. The memory 1320 stores computer instructions. The processor 1310 executes the computer instructions stored in the memory 1320, enabling the communication device 1300 to perform the aforementioned operations. Figure 6 or Figure 8 or Figure 9 The operation of device A1 in the illustrated embodiment, or the execution of the above... Figure 11 The operation of the first device in the illustrated embodiment. For example, communication device 1300 can perform:

[0270] Receive first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock;

[0271] When the signal quality between the communication device and the second master device meets the first condition, the clock domain identification information of the communication device is updated to the second clock domain identification information, and a first synchronization request is sent to the second device.

[0272] Receive a first synchronization indication from the second device. The first synchronization indication is sent by the second device in response to the first synchronization request. The first synchronization indication includes second clock domain identification information and the first time when the second device sends the first synchronization indication.

[0273] Based on the second clock domain identifier information and the first time point, the clock of the communication device is synchronized to the second clock. The second master device and the second device can be the same device or two independent devices.

[0274] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.

[0275] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.

[0276] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0277] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.

Claims

1. A clock synchronization method, characterized in that, The method is applied to a wireless mesh network system, the wireless mesh network system including a first device, a second device, a first master device, and a second master device; wherein, the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; the method includes: The first device receives first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; When the signal quality between the first device and the second master device meets the first condition, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device. The first device receives a first synchronization indication from the second device. The first synchronization indication is sent by the second device in response to the first synchronization request. The first synchronization indication includes the second clock domain identification information and the first time when the second device sends the first synchronization indication. The first device synchronizes its clock to the second clock based on the second clock domain identifier information and the first time.

2. The method according to claim 1, characterized in that, The first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

3. The method according to claim 1 or 2, characterized in that, When the signal quality between the first device and the second master device meets the first condition, the first device updates its clock domain identifier information to the second clock domain identifier information and sends a first synchronization request to the second device, including: When the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than the sorting priority of the first master device, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device.

4. The method according to claim 1 or 2, characterized in that, The wireless mesh network system further includes a third device, wherein the third device and the first device are located on the first island, and the third device is the island owner of the first island; The method further includes: The first device sends a first domain merge request to the third device. The first domain merge request includes information about the second master device. The information about the second master device includes the identification information of the second master device or the identification information of the second clock domain. The third device updates its clock domain identifier information to the second clock domain identifier information based on the information from the second master device. The first device sends a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and the second time at which the first device sends the second synchronization indication; The third device synchronizes its clock to the second clock based on the second clock domain identifier and the second time.

5. The method according to claim 4, characterized in that, The first island also includes at least one fourth device, and the method further includes: The third device sends a third synchronization indication to the at least one fourth device, the third synchronization indication including a third time at which the third device sends the third synchronization indication; The at least one fourth device synchronizes its clock to the second clock according to the third time.

6. The method according to claim 4, characterized in that, The method further includes: The third device sends a second domain merging request to the first master device. The second domain merging request includes information about the second master device, which includes the identification information of the second master device or the identification information of the second clock domain. The first master device updates its clock domain identifier information to the second clock domain identifier information based on the information from the second master device. The third device sends a fourth synchronization indication to the first master device. The fourth synchronization indication includes the second clock domain identification information and the fourth time at which the third device sends the fourth synchronization indication. The first master device synchronizes its clock to the second clock based on the second clock domain identifier information and the fourth time.

7. The method according to claim 6, characterized in that, The wireless mesh network system further includes at least one fifth device, the clock of which is synchronized with the first clock, and the at least one fifth device does not belong to the first island; The method further includes: The first master device sends a fifth synchronization indication to the at least one fifth device, the fifth synchronization indication including the fifth moment at which the first master device sends the fifth synchronization indication; The at least one fifth device synchronizes its clock to the second clock according to the fifth time.

8. The method according to claim 7, characterized in that, The at least one fifth device includes a sixth device and a seventh device; wherein, the sixth device and the seventh device have a Wi-Fi link, the sixth device is outside the signal coverage range of the second main device, and the seventh device is within the signal coverage range of the second main device; The synchronization of the clock of the at least one fifth device to the second clock according to the fifth time includes: The seventh device synchronizes its clock to the second clock according to the fifth time. The sixth device sends a sixth synchronization request to the seventh device; The sixth device receives a sixth synchronization indication sent by the seventh device, the sixth synchronization indication including the sixth time at which the sixth device sent the sixth synchronization indication; The sixth device synchronizes its clock to the second clock according to the sixth time.

9. The method according to claim 1 or 2, characterized in that, The wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located on a second island, and the first device is the island owner of the second island; The method further includes: The first device sends a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including the seventh time at which the first device sends the seventh synchronization indication. The at least one eighth device synchronizes its clock to the second clock according to the seventh time.

10. The method according to claim 9, characterized in that, The method further includes: The first device sends a third domain merge request to the first master device. The third domain merge request includes information about the second master device, which includes the identification information of the second master device or the identification information of the second clock domain. The first master device updates its clock domain identifier information to the second clock domain identifier information based on the information from the second master device. The first device sends an eighth synchronization indication to the first master device. The eighth synchronization indication includes the second clock domain identification information and the eighth time at which the first device sends the eighth synchronization indication. The first master device synchronizes its clock to the second clock based on the second clock domain identifier information and the eighth time.

11. The method according to claim 10, characterized in that, The wireless mesh network system also includes at least one ninth device, which is not part of the second island; The method further includes: The first master device sends a ninth synchronization indication to the at least one ninth device, the ninth synchronization indication including the ninth moment when the first master device sends the ninth synchronization indication; The at least one ninth device synchronizes its clock to the second clock according to the ninth time.

12. The method according to claim 1 or 2, characterized in that, The first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; The method further includes: The first device sends a tenth synchronization indication to the at least one tenth device, the tenth synchronization indication including the tenth moment when the first device sends the tenth synchronization indication; The at least tenth device synchronizes its clock to the second clock according to the tenth time.

13. The method according to claim 1 or 2, characterized in that, The first information is a data frame or a management frame; the second clock field identification information is located in the frame header of the data frame or management frame; And / or, The second clock domain identification information is determined by preset identification information and the identification information of the second master device.

14. A clock synchronization method, characterized in that, A first device applied in a wireless mesh network system, the wireless mesh network system further comprising a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; the method includes: The first device receives first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; When the signal quality between the first device and the second master device meets the first condition, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device. The first device receives a first synchronization indication from the second device. The first synchronization indication is sent by the second device in response to the first synchronization request. The first synchronization indication includes the second clock domain identification information and the first time when the second device sends the first synchronization indication. The first device synchronizes its clock to the second clock based on the second clock domain identifier information and the first time.

15. The method according to claim 14, characterized in that, The first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

16. The method according to claim 14 or 15, characterized in that, When the signal quality between the first device and the second master device meets the first condition, the first device updates its clock domain identifier information to the second clock domain identifier information and sends a first synchronization request to the second device, including: When the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than the sorting priority of the first master device, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device.

17. The method according to any one of claims 14-15, characterized in that, The wireless mesh network system further includes a third device, wherein the third device and the first device are located on the first island, and the third device is the island owner of the first island; The method further includes: The first device sends a first domain merge request to the third device. The first domain merge request includes information about the second master device. The information about the second master device includes the identification information of the second master device or the identification information of the second clock domain. The information about the second master device is used by the third device to update the clock domain identification information of the third device to the identification information of the second clock domain. The first device sends a second synchronization instruction to the third device. The second synchronization instruction includes the second clock domain identification information and the second time when the first device sends the second synchronization instruction. The second clock domain identification information and the second time are used by the third device to synchronize the clock of the third device to the second clock.

18. The method according to any one of claims 14-15, characterized in that, The wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located on a second island, and the first device is the island owner of the second island; The method further includes: the first device sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the first device sends the seventh synchronization indication, the seventh time being used by the at least one eighth device to synchronize the clock of the at least one eighth device to the second clock.

19. The method according to claim 18, characterized in that, The method further includes: The first device sends a third domain merge request to the first master device. The third domain merge request includes information about the second master device, which includes either the identification information of the second master device or the identification information of the second clock domain. The information of the second master device is used by the first master device to update the clock domain identification information of the first master device to the identification information of the second clock domain. The first device sends an eighth synchronization indication to the first master device. The eighth synchronization indication includes the second clock domain identification information and the eighth time at which the first device sends the eighth synchronization indication. The second clock domain identification information and the eighth time are used by the first master device to synchronize the clock of the first master device to the second clock.

20. The method according to any one of claims 14-15, characterized in that, The first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; The method further includes: The first device sends a tenth synchronization indication to the at least one tenth device, the tenth synchronization indication including the tenth time at which the first device sends the tenth synchronization indication; the tenth time is used for the at least one tenth device to synchronize the clock of the at least one tenth device to the second clock.

21. A wireless mesh network system, characterized in that, It includes a first device, a second device, a first master device, and a second master device; wherein the clock of the first device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device. The first device is used to receive first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; When the signal quality between the first device and the second master device meets the first condition, the first device is further configured to update the clock domain identification information of the first device to the second clock domain identification information and send a first synchronization request to the second device. The first device is further configured to receive a first synchronization indication from the second device, the first synchronization indication being sent by the second device in response to the first synchronization request, the first synchronization indication including the second clock domain identification information and the first time at which the second device sends the first synchronization indication; The first device is further configured to synchronize the clock of the first device to the second clock based on the second clock domain identification information and the first time.

22. The system according to claim 21, characterized in that, The first condition includes: the signal quality between the first device and the second master device is greater than the signal quality between the first device and the first master device, and / or, the signal quality between the first device and the second master device is greater than a preset quality threshold.

23. The system according to claim 21 or 22, characterized in that, When the signal quality between the first device and the second master device meets the first condition, and the sorting priority of the second master device is greater than the sorting priority of the first master device, the first device updates the clock domain identification information of the first device to the second clock domain identification information and sends a first synchronization request to the second device.

24. The system according to claim 21 or 22, characterized in that, The wireless mesh network system further includes a third device, wherein the third device and the first device are located on the first island, and the third device is the island owner of the first island; The first device is further configured to send a first domain merging request to the third device, the first domain merging request including information of the second master device, the information of the second master device including the identification information of the second master device or the identification information of the second clock domain; The third device is used to update the clock domain identifier information of the third device to the second clock domain identifier information based on the information of the second master device; The first device is further configured to send a second synchronization indication to the third device, the second synchronization indication including the second clock domain identification information and the second time at which the first device sends the second synchronization indication; The third device is further configured to synchronize its clock to the second clock based on the second clock domain identifier and the second time.

25. The system according to claim 24, characterized in that, The first island also includes at least one fourth device; The third device is further configured to send a third synchronization indication to the at least one fourth device, the third synchronization indication including a third time at which the third device sends the third synchronization indication; The at least one fourth device is used to synchronize the clock of the at least one fourth device to the second clock according to the third time.

26. The system according to claim 24, characterized in that, The third device is also used to send a second domain merging request to the first master device. The second domain merging request includes information about the second master device, and the information about the second master device includes the identification information of the second master device or the identification information of the second clock domain. The first master device is used to update the clock domain identifier information of the first master device to the second clock domain identifier information based on the information of the second master device; The third device is also used to send a fourth synchronization indication to the first master device. The fourth synchronization indication includes the second clock domain identification information and the fourth time at which the third device sends the fourth synchronization indication. The first master device is used to synchronize its clock to the second clock according to the second clock domain identification information and the fourth time.

27. The system according to claim 26, characterized in that, The wireless mesh network system further includes at least one fifth device, the clock of which is synchronized with the first clock, and the at least one fifth device does not belong to the first island; The first master device is further configured to send a fifth synchronization indication to the at least one fifth device, the fifth synchronization indication including the fifth time at which the first master device sends the fifth synchronization indication; The at least one fifth device is used to synchronize the clock of the at least one fifth device to the second clock according to the fifth time.

28. The system according to claim 27, characterized in that, The at least one fifth device includes a sixth device and a seventh device; wherein, the sixth device and the seventh device have a Wi-Fi link, the sixth device is outside the signal coverage range of the second main device, and the seventh device is within the signal coverage range of the second main device; The seventh device is used to synchronize its clock to the second clock according to the fifth time point; The sixth device is used to send a sixth synchronization request to the seventh device; The sixth device is used to receive a sixth synchronization indication sent by the seventh device, the sixth synchronization indication including the sixth time at which the sixth device sends the sixth synchronization indication; The sixth device is used to synchronize its clock to the second clock according to the sixth time.

29. The system according to claim 21 or 22, characterized in that, The wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the first device are located on a second island, and the first device is the island owner of the second island; The first device is further configured to send a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including the seventh time at which the first device sends the seventh synchronization indication. The at least one eighth device is used to synchronize the clock of the at least one eighth device to the second clock according to the seventh time.

30. The system according to claim 29, characterized in that, The first device is further configured to send a third domain merging request to the first master device, the third domain merging request including information of the second master device, the information of the second master device including the identification information of the second master device or the identification information of the second clock domain; The first master device is used to update the clock domain identifier information of the first master device to the second clock domain identifier information based on the information of the second master device; The first device is further configured to send an eighth synchronization indication to the first master device, the eighth synchronization indication including the second clock domain identification information and the eighth time at which the first device sends the eighth synchronization indication; The first master device is further configured to synchronize the clock of the first master device to the second clock according to the second clock domain identification information and the eighth time.

31. The system according to claim 30, characterized in that, The wireless mesh network system also includes at least one ninth device, which is not part of the second island; The first master device is further configured to send a ninth synchronization indication to the at least one ninth device, the ninth synchronization indication including the ninth time at which the first master device sends the ninth synchronization indication; The at least one ninth device is used to synchronize the clock of the at least one ninth device to the second clock according to the ninth time.

32. The system according to claim 21 or 22, characterized in that, The first device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; The first device is further configured to send a tenth synchronization indication to the at least one tenth device, the tenth synchronization indication including the tenth time at which the first device sends the tenth synchronization indication; The at least one tenth device is used to synchronize the clock of the at least one tenth device to the second clock according to the tenth time.

33. The system according to claim 21 or 22, characterized in that, The first information is a data frame or a management frame; the second clock field identification information is located in the frame header of the data frame or management frame; And / or, The second clock domain identification information is determined by preset identification information and the identification information of the second master device.

34. A communication device, characterized in that, The wireless mesh network system in which the communication device is located also includes a second device, a first master device, and a second master device; wherein, the clock of the communication device is synchronized with the clock of the first master device, and the clock of the second device is synchronized with the second clock of the second master device; The communication device includes a processor and a memory, the processor being configured to execute instructions stored in the memory, causing the communication device to perform: Receive first information sent by the second device, the first information including second clock domain identification information, the second clock domain identification information corresponding to the second clock; When the signal quality between the communication device and the second master device meets the first condition, the clock domain identification information of the communication device is updated to the second clock domain identification information, and a first synchronization request is sent to the second device. The second device receives a first synchronization indication, which is sent by the second device in response to the first synchronization request. The first synchronization indication includes the second clock domain identification information and the first time when the second device sends the first synchronization indication. Based on the second clock domain identifier information and the first time, the clock of the communication device is synchronized to the second clock.

35. The communication device according to claim 34, characterized in that, The first condition includes: the signal quality between the communication device and the second master device is greater than the signal quality between the communication device and the first master device, and / or the signal quality between the communication device and the second master device is greater than a preset quality threshold.

36. The communication device according to claim 34 or 35, characterized in that, When the signal quality between the communication device and the second master device meets the first condition, and the sorting priority of the second master device is greater than the sorting priority of the first master device, the processor executes the instructions stored in the memory, causing the communication device to further execute: update the clock domain identification information of the communication device to the second clock domain identification information, and send a first synchronization request to the second device.

37. The communication device according to claim 34 or 35, characterized in that, The wireless mesh network system also includes a third device, wherein the third device and the communication device are located on the first island, and the third device is the island owner of the first island; The processor is used to execute instructions stored in the memory, causing the communication device to further perform: This is used to send a first domain merge request to the third device. The first domain merge request includes information about the second master device, which includes either the identification information of the second master device or the second clock domain identification information. The information of the second master device is used by the third device to update the clock domain identification information of the third device to the second clock domain identification information. The communication device is used to send a second synchronization indication to the third device. The second synchronization indication includes the second clock domain identification information and the second time when the communication device sends the second synchronization indication. The second clock domain identification information and the second time are used by the third device to synchronize the clock of the third device to the second clock.

38. The communication device according to claim 34 or 35, characterized in that, The wireless mesh network system further includes at least one eighth device, wherein the at least one eighth device and the communication device are also located in the second island, and the communication device is the island owner of the second island; The processor is configured to execute instructions stored in the memory, causing the communication device to further execute: sending a seventh synchronization indication to the at least one eighth device, the seventh synchronization indication including a seventh time at which the communication device sends the seventh synchronization indication, the seventh time being used by the at least one eighth device to synchronize the clock of the at least one eighth device to the second clock.

39. The communication device according to claim 38, characterized in that, The processor is used to execute instructions stored in the memory, causing the communication device to further perform: A third domain merge request is sent to the first master device. The third domain merge request includes information about the second master device, which includes either the identification information of the second master device or the identification information of the second clock domain. The information of the second master device is used by the first master device to update the clock domain identification information of the first master device to the identification information of the second clock domain. The communication device sends an eighth synchronization indication to the first master device. The eighth synchronization indication includes the second clock domain identification information and the eighth time at which the communication device sends the eighth synchronization indication. The second clock domain identification information and the eighth time are used by the first master device to synchronize the clock of the first master device to the second clock.

40. The communication device according to claim 34 or 35, characterized in that, The communication device and the first master device are the same device, and the wireless mesh network system further includes at least one tenth device; The processor is configured to execute instructions stored in the memory, causing the communication device to further perform: sending a tenth synchronization indication to the at least one tenth device, the tenth synchronization indication including the tenth time at which the communication device sends the tenth synchronization indication; the tenth time being used by the at least one tenth device to synchronize the clock of the at least one tenth device to the second clock.

41. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computing device, perform the method as described in any one of claims 1 to 13 or 14 to 20.

42. A computer program product containing instructions, characterized in that, When the instructions are executed by the computing device, the computing device performs the method as described in any one of claims 1 to 13 or 14 to 20.

Citation Information

Patent Citations

  • Communication method, device and system

    CN113271653A