IP Library Granted Patent US 12,634,853
Granted Patent B2
US 12,634,853 · App. 18/336,891 · Granted May 19, 2026

Method and apparatus for selecting clock source

Inventors: Yawei Zhang (Beijing, CN); Jingfei Lyu (Wuhan, CN); Songyan Chen (Beijing, CN); Cong Chen (Dongguan, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04W56/0015H04J3/0658
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,634,853
App. No.
18/336,891
Granted
May 19, 2026
Kind
B2
Abstract

A method for selecting a clock source includes a first network device that obtains synchronization offset data between the first network device and a second network device through a first port in a clock synchronization failed state. The first network device determines, based on the synchronization offset data, whether to refer to, during clock source selection, clock information received by the first port.

Claims (69)

1 . A method implemented by a first network device for selecting a clock source, the method comprising:

receiving, through a first port, a synchronization packet from a second network device, wherein the first port is in a clock synchronization failed state;

determining, based on the synchronization packet, that the port is in a clock synchronization normal state;

receiving, by the first port, clock information after receiving the synchronization packet; and

determining, based on the first port being in the clock synchronization normal state, to refer to the clock information during clock source selection.

2 . The method of claim 1 , wherein a port attribute of the first port comprises tag information, wherein a first value of the tag information indicates that the first port is in the clock synchronization failed state, and wherein the method further comprises setting the tag information to a second value, wherein the second value indicates that the first port is in a clock synchronization normal state.

3 . The method of claim 1 , wherein a state of the first port is a first state, and wherein the method further comprises obtaining synchronization offset data between the first network device and the second network device based on the synchronization packet.

4 . The method of claim 3 , wherein the first state comprises a slave state, a master state, a monitor state, or a passive state.

5 . The method of claim 4 , further comprising setting the state of the first port to the first state.

6 . The method of claim 5 , wherein setting the state of the first port to the first state comprises periodically setting the state of the first port to the first state, wherein the first state comprises the slave state, the monitor state, or the passive state.

7 . The method of claim 4 , further comprising controlling, when the first state is the slave state, a clock of the first network device to not be adjusted based on a clock input signal of the first port.

8 . The method of claim 3 , further comprising obtaining synchronization data between the first network device and the second network device, wherein obtaining the synchronization data comprises:

receiving a Sync packet from the second network device, wherein the Sync packet comprises a first sending time T1 indicating when the Sync packet was sent;

determining a first receiving time T2 at which the Sync packet is received;

sending a delay request (Delay_Req) packet to the second network device at a second sending time T3;

determining T3; and

receiving a delay response (Delay_Resp) packet from the second network device, wherein the Delay_Resp packet comprises a second receiving time T4 based on the Delay_Req packet, and wherein the synchronization data comprises at least one of T1, T2, T3, or T4.

9 . The method of claim 8 , further comprising obtaining synchronization offset data between the first network device and the second network device according to the synchronization data, wherein the synchronization offset data comprises a time offset between the first network device and the second network device.

10 . The method of claim 1 , further comprising obtaining synchronization data between the first network device and the second network device, wherein obtaining the synchronization data comprises:

receiving, through the first port, a first physical clock signal from the second network device; and

obtaining synchronization offset data between the first network device and a second network device by obtaining a frequency offset between the first network device and the second network device based on the first physical clock signal and a second physical clock signal, wherein the second physical clock signal is a local signal of the first network device.

11 . The method of claim 10 , further comprising controlling a clock of the first network device to not be adjusted based on the first physical clock signal.

12 . A first network device comprising:

one or more processors; and

a memory configured to store program instructions, which, when executed by the one or more processors, cause the first network device to:

receive, through a first port, a synchronization packet from a second network device, wherein the first port is in a clock synchronization failed state;

determine, based on the synchronization packet, that the port is in the clock synchronization normal state;

receive, by the first port, clock information after receiving the synchronization packet; and

determine, based on the first port being in the clock synchronization normal state, to refer to the clock information during clock source selection.

13 . The first network device of claim 12 , wherein a port attribute of the first port comprises tag information, wherein a first value of the tag information indicates that the first port is in the clock synchronization failed state; and wherein the program instructions further cause the first network device to set the tag information to a second value, wherein the second value indicates that the first port is in a clock synchronization normal state.

14 . The first network device of claim 12 , wherein a state of the first port is a first state, and wherein the program instructions further cause the first network device to obtain synchronization offset data between the first network device and the second network device based on the synchronization packet.

15 . The first network device of claim 14 , wherein the first state comprises a slave state, a master state, a monitor state, or a passive state.

16 . The first network device of claim 15 , wherein the program instructions further cause the first network device to set the state of the first port to the first state.

17 . The first network device of claim 16 , wherein the program instructions further cause the first network device to periodically set the state of the first port to the first state.

18 . The first network device of claim 15 , wherein the program instructions further cause the first network device to control, when the first state is the slave state, a clock of the first network device to not be adjusted based on a clock input signal of the first port.

19 . The first network device of claim 14 , wherein the program instructions further cause the first network device to obtain synchronization data between the first network device and the second network device, wherein the program instructions to obtain the synchronization data comprises program instructions to:

receive a Sync packet from the second network device, wherein the Sync packet comprises a first sending time T1 indicating when the Sync packet was sent;

determine a first receiving time T2 at which the Sync packet is received;

send a delay request (Delay_Req) packet to the second network device at a second sending time T3;

determine T3; and

receive a delay response (Delay_Resp) packet from the second network device, wherein the Delay_Resp packet comprises a second receiving time T4 based on the Delay_Req packet, and wherein the synchronization data comprises at least one of T1, T2, T3, or T4.

20 . The first network device of claim 14 , wherein the synchronization offset data comprises a time offset between the first network device and the second network device.

21 . The first network device of claim 12 , wherein the program instructions further cause the first network device to:

receive, through the first port, a first physical clock signal from the second network device; and

obtain a frequency offset between the first network device and the second network device based on the first physical clock signal and a second physical clock signal, wherein the second physical clock signal is a local signal of the first network device.

22 . The first network device of claim 21 , wherein the program instructions further cause the first network device to control a clock of the first network device to not be adjusted based on the first physical clock signal.

23 . A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable medium and that, when executed by one or more processors, cause a first network device to:

receive, through a first port, a synchronization packet from a second network device, wherein the first port is in a clock synchronization failed state;

determine, based on the synchronization packet, that the port is in the clock synchronization normal state;

receive, by the first port, clock information after receiving the synchronization packet; and

determine, based on the first port being in the clock synchronization normal state, to refer to the clock information during clock source selection.

24 . The computer program product of claim 23 , wherein a port attribute of the first port comprises tag information, wherein a first value of the tag information indicates that the first port is in the clock synchronization failed state, and wherein the computer-executable instructions when executed by the one or more processors further cause the first network device to set the tag information to a second value, wherein the second value indicates that the first port is in a clock synchronization normal state.

25 . The computer program product of claim 23 , wherein a state of the first port is a first state, and wherein the first state comprises a slave state, a master state, a monitor state, or a passive state.

26 . The computer program product of claim 23 , wherein the computer-executable instructions when executed by the one or more processors further cause the first network device to obtain synchronization data between the first network device and the second network device through the synchronization packet, wherein the computer-executable instructions to obtain the synchronization data comprises computer-executable instructions to:

receive a synchronization (Sync) packet from the second network device, wherein the Sync packet comprises a first sending time T1 indicating when the Sync packet was sent;

determine a first receiving time T2 at which the Sync packet is received;

send a delay request (Delay_Req) packet to the second network device at a second sending time T3;

determine T3; and

receive a delay response (Delay_Resp) packet from the second network device, wherein the Delay_Resp packet comprises a second receiving time T4 based on the Delay_Req packet, and wherein the synchronization data comprises at least one of T1, T2, T3, or T4.

27 . The computer program product of claim 26 , wherein the computer-executable instructions when executed by the one or more processors further cause the first network device to obtain synchronization offset data between the first network device and the second network device based on the synchronization data, wherein the synchronization offset data comprises a time offset between the first network device and the second network device.

28 . The method of claim 1 , wherein determining that the first port is in the clock synchronization normal state comprises:

obtaining synchronization offset data between the first network device and the second network device based on the synchronization packet; and

determining that the synchronization offset data is less than an offset threshold.

29 . The first network device of claim 12 , wherein the program instructions further cause the first network device to:

obtain synchronization offset data between the first network device and the second network device based on the synchronization packet; and

determine that the first port is in the clock synchronization normal state when the synchronization offset data is less than an offset threshold.

30 . The computer program product of claim 23 , wherein the computer-executable instructions when executed by the one or more processors further cause the first network device to:

obtain synchronization offset data between the first network device and the second network device based on the synchronization packet; and

determine that the first port is in the clock synchronization normal state when the synchronization offset data is less than an offset threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2025
From: ZHANG, YAWEI; LYU, JINGFEI; CHEN, SONGYAN; CHEN, CONG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 072092/0410 →
Priority Claims (1)
CN 202011507206.5 · Dec 18, 2020 · national
Continuity (2)
Continuation PCTCN2021139372 · Dec 17, 2021
Related Publication 20230362854A1 · Nov 9, 2023
References Cited (27)
US 6754171B1 · Bernier · 2004 [cited by examiner]
US 9310832B2 · Frels · 2016 [cited by examiner]
US 20100189127A1 · Suzuki · 2010 [cited by examiner]
US 20140086375A1 · Secker · 2014 [cited by examiner]
US 20150318941A1 · Zheng · 2015 [cited by examiner]
US 20150350111A1 · Xiu · 2015 [cited by examiner]
US 20170359790A1 · Wang · 2017 [cited by examiner]
US 20190363973A1 · Hsieh · 2019 [cited by examiner]
US 20210328696A1 · Lv et al. · 2021 [cited by applicant]
US 20210385058A1 · Guignard · 2021 [cited by examiner]
US 20220190945A1 · Lv · 2022 [cited by examiner]
US 20220263677A1 · Neugeboren · 2022 [cited by examiner]
US 20220337384A1 · Lv · 2022 [cited by examiner]
US 20230262625A1 · Lyu · 2023 [cited by examiner]
US 20240146566A1 · Neugeboren · 2024 [cited by examiner]
CN 102006135A · 2011 [cited by applicant]
CN 102263630A · 2011 [cited by applicant]
CN 104579534A · 2015 [cited by applicant]
CN 105024798A · 2015 [cited by applicant]
CN 112367137A · 2021 [cited by applicant]
JP H06104882A · 1994 [cited by applicant]
JP 2013207526A · 2013 [cited by applicant]
JP 2016152489A · 2016 [cited by applicant]
JP 2020188401A · 2020 [cited by applicant]
WO 2020135279A1 · 2020 [cited by applicant]
ITU-T G.8275.1/Y.1369.1, “Series G: Transmission Systems and Media, Digital Systems and Networks, Packet over Transport aspects—Synchronization, quality and availability targets, Series Y: Global Information Infrastruct… [cited by applicant]
IEEE Std 1588-2019, (Revision of IEEE Std 1588-2008), “IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems,” IEEE Instrumentation and Measurement Society, Approved … [cited by applicant]