US 12,355,556 B2
Clock synchronization method and apparatus, and electronic device
Guolin Huang, Guangdong (CN); and Chun Zhang, Guangdong (CN)
Assigned to APUTURE IMAGING INDUSTRIES CO., LTD., Shenzhen (CN)
Filed by APUTURE IMAGING INDUSTRIES CO., LTD., Guangdong (CN)
Filed on Aug. 17, 2022, as Appl. No. 17/889,468.
Claims priority of application No. 202111495706.6 (CN), filed on Dec. 9, 2021.
Prior Publication US 2023/0188239 A1, Jun. 15, 2023
Int. Cl. H04J 3/06 (2006.01); H04L 1/08 (2006.01); H04L 43/106 (2022.01); H04L 43/16 (2022.01)
CPC H04J 3/0697 (2013.01) [H04J 3/0667 (2013.01); H04L 1/08 (2013.01); H04L 43/106 (2013.01); H04L 43/16 (2013.01)] 19 Claims
OG exemplary drawing
 
1. A clock synchronization method, characterized by comprising:
receiving a plurality of data packets sent by a host and acquiring receiving time when each data packet is received and a sending interval at which each two adjacent data packets are sent, wherein each data packet comprises a packet sequence number and a first packet timestamp when the first data packet is sent;
carrying out screening processing on all data packets according to the sending interval, the receiving time and the packet sequence number of each data packet so as to obtain at least one valid data packet;
obtaining a time compensation value according to the first packet timestamp, the sending interval, the receiving time and packet sequence number of each valid data packet; and
adjusting time of a slave according to the time compensation value so as to realize clock synchronization between the slave and the host.