IP Library Granted Patent US 12,278,695
Granted Patent B2
US 12,278,695 · App. 17/765,417 · Granted Apr 15, 2025

Method and apparatus for acquiring timestamp of data stream, storage medium, and electronic apparatus

Inventor: Yan Zhou (Guangdong, CN)
Assignee: SANECHIPS TECHNOLOGY CO., LTD.
H04J3/0661H03M9/00H04L7/0012
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,278,695
App. No.
17/765,417
Granted
Apr 15, 2025
Kind
B2
Abstract

The present disclosure provides a method and apparatus for acquiring a timestamp of a data stream, a storage medium and an electronic apparatus. The method for acquiring the timestamp of the data stream includes: receiving a data stream to be transmitted, and acquiring a first frame header identifier of the data stream to be transmitted in a serializer-deserializer (SERDES) clock mode, the first frame header identifier being used for representing a position of a frame header of the data stream to be transmitted; determining, based on the first frame header identifier, a timestamp of the data stream to be transmitted under a system clock; encapsulating the timestamp to obtain a first target data frame; and outputting the first target data frame.

Claims (76)

1. A method for acquiring a timestamp of a data stream, comprising:

receiving a data stream to be transmitted, and acquiring a first frame header identifier of the data stream to be transmitted in a serializer-deserializer (SERDES) clock mode, wherein the first frame header identifier represents a position of a frame header of the data stream to be transmitted;

determining, based on the first frame header identifier, a timestamp of the data stream to be transmitted under a system clock;

encapsulating the timestamp to obtain a first target data frame; and

outputting the first target data frame;

wherein receiving the data stream to be transmitted and acquiring the first frame header identifier of the data stream to be transmitted in the SERDES clock mode comprise:

receiving the data stream to be transmitted, and demultiplexing the data stream to be transmitted in the SERDES clock mode, to obtain data of N logic lanes, wherein N is an integer;

acquiring a position of a frame header of data of each logic lane when the position of the frame header of the data of each logic lane is determined to obtain a second frame header identifier of the data of each logic lane; and

determining the first frame header identifier based on the second frame header identifier of the data of each logic lane.

2. The method according to claim 1 , wherein determining the first frame header identifier based on the second frame header identifier of the data of each logic lane comprises:

selecting, from the data of the N logic lanes, data of one logic lane as data of a designated logic lane;

calculating a plurality of offsets of second frame header identifiers of data of N−1 logic lanes except the data of the designated logic lane among the data of the N logic lanes relative to a second frame header identifier of the data of the designated logic lane; and

acquiring a largest offset of the plurality of offsets, and determining a second frame header identifier corresponding to the largest offset as the first frame header identifier.

3. The method according to claim 1 , wherein determining, based on the first frame header identifier, the timestamp of the data stream to be transmitted under the system clock comprises:

synchronizing a rising edge and a falling edge of the system clock with the first frame header identifier to obtain the timestamp of the data stream to be transmitted under the system clock.

4. The method according to claim 3 , wherein synchronizing the rising edge and the falling edge of the system clock with the first frame header identifier to obtain the timestamp of the data stream to be transmitted under the system clock comprises:

synchronizing the rising edge of the system clock with the first frame header identifier to obtain a third frame header identifier of the data stream to be transmitted under the system clock;

synchronizing the falling edge of the system clock with the first frame header identifier to obtain a fourth frame header identifier of the data stream to be transmitted under the system clock; and

acquiring the timestamp based on the third frame header identifier and the fourth frame header identifier.

5. The method according to claim 4 , wherein acquiring the timestamp based on the third frame header identifier and the fourth frame header identifier comprises:

comparing the third frame header identifier with the fourth frame header identifier; and

determining a smaller frame header identifier of the third frame header identifier and the fourth frame header identifier based on a comparison result, and taking the smaller frame header identifier as the timestamp.

6. The method according to claim 1 , wherein encapsulating the timestamp to obtain the first target data frame comprises:

generating a cyclic redundancy check (CRC); and

encapsulating the timestamp and the CRC based on a preset frame format to obtain the first target data frame.

7. The method according to claim 1 , wherein outputting the first target data frame comprises:

broadening a pulse width of the first target data frame to obtain a second target data frame; and

outputting the second target data frame.

8. A non-transitory computer readable storage medium, storing a computer program configured to cause a processor to perform a method for acquiring a timestamp of a data stream when the computer program is running on the processor, the method comprising:

receiving a data stream to be transmitted, and acquiring a first frame header identifier of the data stream to be transmitted in a serializer-deserializer (SERDES) clock mode, wherein the first frame header identifier represents a position of a frame header of the data stream to be transmitted;

determining, based on the first frame header identifier, a timestamp of the data stream to be transmitted under a system clock;

encapsulating the timestamp to obtain a first target data frame; and

outputting the first target data frame;

wherein receiving the data stream to be transmitted and acquiring the first frame header identifier of the data stream to be transmitted in the SERDES clock mode comprises:

receiving the data stream to be transmitted, and demultiplexing the data stream to be transmitted in the SERDES clock mode, to obtain data of N logic lanes, wherein N is an integer;

acquiring a position of a frame header of data of each logic lane when the position of the frame header of the data of each logic lane is determined to obtain a second frame header identifier of the data of each logic lane; and

determining the first frame header identifier based on the second frame header identifier of the data of each logic lane.

9. The non-transitory computer readable storage medium according to claim 8 , wherein determining the first frame header identifier based on the second frame header identifier of the data of each logic lane comprises:

selecting, from the data of the N logic lanes, data of one logic lane as data of a designated logic lane;

calculating a plurality of offsets of second frame header identifiers of data of N−1 logic lanes except the data of the designated logic lane among the data of the N logic lanes relative to a second frame header identifier of the data of the designated logic lane; and

acquiring a largest offset of the plurality of offsets, and determining a second frame header identifier corresponding to the largest offset as the first frame header identifier.

10. The non-transitory computer readable storage medium according to claim 8 , wherein determining, based on the first frame header identifier, the timestamp of the data stream to be transmitted under the system clock comprises:

synchronizing a rising edge of the system clock with the first frame header identifier to obtain a third frame header identifier of the data stream to be transmitted under the system clock;

synchronizing a falling edge of the system clock with the first frame header identifier to obtain a fourth frame header identifier of the data stream to be transmitted under the system clock;

comparing the third frame header identifier with the fourth frame header identifier; and

determining a smaller frame header identifier of the third frame header identifier and the fourth frame header identifier based on a comparison result, and taking the smaller frame header identifier as the timestamp.

11. The non-transitory computer readable storage medium according to claim 8 , wherein encapsulating the timestamp to obtain the first target data frame comprises:

generating a cyclic redundancy check (CRC);

encapsulating the timestamp and the CRC based on a preset frame format to obtain the first target data frame.

12. The non-transitory computer readable storage medium according to claim 8 , wherein outputting the first target data frame comprises:

broadening a pulse width of the first target data frame to obtain a second target data frame; and

outputting the second target data frame.

13. An electronic apparatus, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform a method for acquiring a timestamp of a data stream, comprising:

receiving a data stream to be transmitted, and acquiring a first frame header identifier of the data stream to be transmitted in a serializer-deserializer (SERDES) clock mode, wherein the first frame header identifier represents a position of a frame header of the data stream to be transmitted;

determining, based on the first frame header identifier, a timestamp of the data stream to be transmitted under a system clock;

encapsulating the timestamp to obtain a first target data frame; and

outputting the first target data frame;

wherein receiving the data stream to be transmitted and acquiring the first frame header identifier of the data stream to be transmitted in the SERDES clock mode comprise:

receiving the data stream to be transmitted, and demultiplexing the data stream to be transmitted in the SERDES clock mode, to obtain data of N logic lanes, wherein N is an integer;

acquiring a position of a frame header of data of each logic lane when the position of the frame header of the data of each logic lane is determined to obtain a second frame header identifier of the data of each logic lane; and

determining the first frame header identifier based on the second frame header identifier of the data of each logic lane.

14. The electronic apparatus according to claim 13 , wherein determining the first frame header identifier based on the second frame header identifier of the data of each logic lane comprises:

selecting, from the data of the N logic lanes, data of one logic lane as data of a designated logic lane;

calculating a plurality of offsets of second frame header identifiers of data of N−1 logic lanes except the data of the designated logic lane among the data of the N logic lanes relative to a second frame header identifier of the data of the designated logic lane; and

acquiring a largest offset of the plurality of offsets, and determining a second frame header identifier corresponding to the largest offset as the first frame header identifier.

15. The electronic apparatus according to claim 13 , wherein determining, based on the first frame header identifier, the timestamp of the data stream to be transmitted under the system clock comprises:

synchronizing a rising edge of the system clock with the first frame header identifier to obtain a third frame header identifier of the data stream to be transmitted under the system clock;

synchronizing a falling edge of the system clock with the first frame header identifier to obtain a fourth frame header identifier of the data stream to be transmitted under the system clock;

comparing the third frame header identifier with the fourth frame header identifier; and

determining a smaller frame header identifier of the third frame header identifier and the fourth frame header identifier based on a comparison result, and taking the smaller frame header identifier as the timestamp.

16. The electronic apparatus according to claim 13 , wherein encapsulating the timestamp to obtain the first target data frame comprises:

generating a cyclic redundancy check (CRC); and

encapsulating the timestamp and the CRC based on a preset frame format to obtain the first target data frame.

17. The electronic apparatus according to claim 13 , wherein outputting the first target data frame comprises:

broadening a pulse width of the first target data frame to obtain a second target data frame; and

outputting the second target data frame.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 5, 2022
From: ZTE CORPORATION
To: SANECHIPS TECHNOLOGY CO., LTD.
Reel/Frame 061983/0105 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2022
From: ZHOU, YAN
To: ZTE CORPORATION
Reel/Frame 061664/0744 →
Priority Claims (1)
CN 201910944071.X · Sep 30, 2019 · national
Continuity (1)
Related Publication 20220360350A1 · Nov 10, 2022
References Cited (13)
US 20080005310A1 · Xu · 2008 [cited by examiner]
US 20120148248A1 · Li · 2012 [cited by examiner]
US 20140092918A1 · Jost · 2014 [cited by examiner]
US 20160205008A1 · Dasu et al. · 2016 [cited by applicant]
US 20180192323A1 · Zhang · 2018 [cited by examiner]
CN 102761396A · 2012 [cited by applicant]
CN 103036893A · 2013 [cited by applicant]
CN 105846941A · 2016 [cited by applicant]
CN 106911426A · 2017 [cited by applicant]
CN 107070576A · 2017 [cited by applicant]
CN 108259106A · 2018 [cited by applicant]
Sanechips Technology Co., Ltd., International Search Report with English Translation, PCT/CN2020/118316, Nov. 25, 2020, 5 pgs. [cited by applicant]
(Non-official translation: Information Consumption Supermarket), “Technical Requirements of Multi-Service bearing for Optical Transport Network (OTN),” (non-official translation: Originality Document, https://max.book11… [cited by applicant]