Method and device for clock synchronization

文档序号:24468 发布日期:2021-09-21 浏览:34次 中文

阅读说明:本技术 时钟同步的方法和装置 (Method and device for clock synchronization ) 是由 傅健新 于 2019-02-15 设计创作,主要内容包括:一种时钟同步的方法和装置,该方法包括:控制第一网元的第一计时器与第二网元的第二计时器处于时间对齐的状态,该时间对齐的状态为在相同时间内该第一计时器和该第二计时器的时间增量相同(S101);在该时间对齐的状态下,根据目标时钟对应的相邻的两个上升沿的出现时间或相邻的两个下降沿的出现时间,获取该目标时钟的周期信息或频率信息,该目标时钟的周期信息或频率信息用于该第二网元获取与该目标时钟同步的时钟,该目标时钟为需要从该第一网元传输至该第二网元的任一时钟(S103);将该目标时钟的周期信息或频率信息发送至该第二网元(S104)。上述时钟同步网元间的时钟同步占用的物理资源少,简单易实现。(A method and apparatus for clock synchronization, the method comprising: controlling a first timer of a first network element and a second timer of a second network element to be in a time alignment state, wherein the time alignment state is that time increments of the first timer and the second timer are the same within the same time (S101); in the time alignment state, acquiring cycle information or frequency information of a target clock according to the occurrence time of two adjacent rising edges or the occurrence time of two adjacent falling edges corresponding to the target clock, where the cycle information or frequency information of the target clock is used by the second network element to acquire a clock synchronized with the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element (S103); and sending the period information or the frequency information of the target clock to the second network element (S104). The clock synchronization between the clock synchronization network elements occupies less physical resources, and is simple and easy to implement.)

A method of clock synchronization, comprising:

controlling a first timer of a first network element and a second timer of a second network element to be in a time alignment state, wherein the time alignment state is that time increments of the first timer and the second timer are the same in the same time;

in the time alignment state, acquiring cycle information or frequency information of a target clock according to the occurrence time of two adjacent rising edges or the occurrence time of two adjacent falling edges corresponding to the target clock, where the cycle information or frequency information of the target clock is used by the second network element to acquire a clock synchronized with the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and sending the period information or the frequency information of the target clock to the second network element.

The method of claim 1, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the period information of the target clock includes: a first time at which the first rising edge occurs and a second time at which the second rising edge occurs.

The method of claim 1, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the acquiring the period information of the target clock according to the time of occurrence of two adjacent rising edges corresponding to the target clock includes:

acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

correspondingly, the period information of the target clock comprises a clock period corresponding to the target clock.

The method of claim 1, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the acquiring the period information of the target clock according to the two adjacent rising edges corresponding to the target clock includes:

acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

obtaining a clock frequency corresponding to the target clock according to the reciprocal of the clock period corresponding to the target clock;

accordingly, the frequency information of the target clock includes a clock frequency corresponding to the target clock.

The method according to any one of claims 1 to 4, wherein the two adjacent rising edges corresponding to the target clock are two adjacent rising edges of a clock divided by the target clock; alternatively, the first and second electrodes may be,

the two adjacent falling edges corresponding to the target clock are two adjacent falling edges of the clock subjected to frequency division of the target clock;

correspondingly, the period information or the frequency information of the target clock further includes a frequency division coefficient of the target clock, the clock period corresponding to the target clock is the period of the clock divided by the target clock, and the clock frequency corresponding to the target clock is the frequency of the clock divided by the target clock.

The method according to any one of claims 1 to 4,

two adjacent rising edges corresponding to the target clock are two adjacent rising edges of the target clock; alternatively, the first and second electrodes may be,

two adjacent falling edges corresponding to the target clock are two adjacent falling edges of the target clock;

correspondingly, the clock period corresponding to the target clock is the clock period of the target clock, and the clock frequency corresponding to the target clock is the clock frequency of the target clock.

The method according to any one of claims 1 to 6, wherein the sending the period information or the frequency information of the target clock to the second network element comprises:

and sending the period information or the frequency information of the target clock to the second network element through a message or a domain segment for transmitting network overhead.

A method of clock synchronization, comprising:

controlling a second timer of a second network element and a first timer of a first network element to be in a time alignment state, wherein the time alignment state is that time increments of the first timer and the second timer are the same in the same time;

receiving, from the first network element, period information or frequency information of a target clock, where the period information or frequency information of the target clock is obtained by the first network element in the time aligned state according to the occurrence time of two adjacent rising edges or the occurrence time of two adjacent falling edges corresponding to the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and acquiring a clock synchronous with the target clock according to the period information or the frequency information of the target clock.

The method according to claim 8, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the period information of the target clock comprises the first time and the second time, or the period information of the target clock comprises a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference value between the first time and the second time.

The method according to claim 8, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the frequency information of the target clock includes a clock frequency corresponding to the target clock, the clock frequency corresponding to the target clock is a reciprocal of a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference between the first time and the second time.

The method according to any one of claims 8 to 10, wherein the obtaining a clock synchronized with the target clock according to the period information or the frequency information of the target clock comprises:

acquiring a clock period or clock frequency corresponding to the target clock according to the period information or frequency information of the target clock;

and acquiring a clock synchronous with the target clock according to the clock period or clock frequency corresponding to the target clock.

An apparatus for clock synchronization, comprising:

a control module, configured to control a first timer of a first network element and a second timer of a second network element to be in a time alignment state, where the time alignment state is that time increments of the first timer and the second timer are the same within the same time;

an obtaining module, configured to obtain, in the time aligned state, cycle information or frequency information of a target clock according to occurrence times of two adjacent rising edges or occurrence times of two adjacent falling edges corresponding to the target clock, where the cycle information or frequency information of the target clock is used by the second network element to obtain a clock synchronized with the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and the sending module is used for sending the period information or the frequency information of the target clock to the second network element.

The apparatus of claim 12, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the period information of the target clock includes: a first time at which the first rising edge occurs and a second time at which the second rising edge occurs.

The apparatus of claim 12, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the acquisition module is specifically configured to: acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

correspondingly, the period information of the target clock comprises a clock period corresponding to the target clock.

The apparatus of claim 12, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the acquisition module is specifically configured to:

acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

obtaining a clock frequency corresponding to the target clock according to the reciprocal of the clock period corresponding to the target clock;

accordingly, the frequency information of the target clock includes a clock frequency corresponding to the target clock.

The apparatus according to any one of claims 12 to 15, wherein the sending module is specifically configured to:

and sending the period information or the frequency information of the target clock to the second network element through a message or a domain segment for transmitting network overhead.

A clock synchronization apparatus, comprising:

a control module, configured to control a second timer of a second network element and a first timer of a first network element to be in a time alignment state, where the time alignment state is that time increments of the first timer and the second timer are the same within the same time;

a receiving module, configured to receive, from the first network element, period information or frequency information of a target clock, where the period information or frequency information of the target clock is obtained by the first network element in the time aligned state according to occurrence times of two adjacent rising edges or occurrence times of two adjacent falling edges corresponding to the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and the acquisition module is used for acquiring a clock synchronous with the target clock according to the period information or the frequency information of the target clock.

The apparatus according to claim 17, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the period information of the target clock includes the first time and the second time, or the period information of the target clock includes a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference between the first time and the second time.

The apparatus according to claim 17, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the frequency information of the target clock includes a clock frequency corresponding to the target clock, the clock frequency corresponding to the target clock is a reciprocal of a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference between the first time and the second time.

The apparatus of any one of claims 17 to 19, wherein the acquisition module is configured to:

acquiring a clock period or clock frequency corresponding to the target clock according to the period information or frequency information of the target clock;

and acquiring a clock synchronous with the target clock according to the clock period or clock frequency corresponding to the target clock.

A communication device comprising a processor and a memory, wherein the memory has instructions stored therein, and wherein the processor invokes the instructions to control the operations of:

controlling a first timer of a first network element and a second timer of a second network element to be in a time alignment state, wherein the time alignment state is that time increments of the first timer and the second timer are the same in the same time;

in the time alignment state, acquiring cycle information or frequency information of a target clock according to the occurrence time of two adjacent rising edges or the occurrence time of two adjacent falling edges corresponding to the target clock, where the cycle information or frequency information of the target clock is used by the second network element to acquire a clock synchronized with the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and sending the period information or the frequency information of the target clock to the second network element.

The communication device according to claim 21, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

the period information of the target clock includes: a first time at which the first rising edge occurs and a second time at which the second rising edge occurs.

The communication device according to claim 21, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

when the processor is configured to control and execute an operation of acquiring cycle information of a target clock according to the time when two adjacent rising edges corresponding to the target clock occur, the processor is specifically configured to control and execute the following operations:

acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

correspondingly, the period information of the target clock comprises a clock period corresponding to the target clock.

The communication device according to claim 21, wherein the two adjacent rising edges corresponding to the target clock are a first rising edge and a second rising edge;

when the processor is configured to control and execute an operation of acquiring frequency information of a target clock according to the time when two adjacent rising edges corresponding to the target clock occur, the processor is specifically configured to control and execute the following operations:

acquiring an absolute value of a difference value between a first time when the first rising edge appears and a second time when the second rising edge appears to obtain a clock period corresponding to the target clock;

obtaining a clock frequency corresponding to the target clock according to the reciprocal of the clock period corresponding to the target clock;

accordingly, the frequency information of the target clock includes a clock frequency corresponding to the target clock.

The communication device according to any one of claims 21 to 24, wherein the processor, when configured to control the operation of sending the period information or the frequency information of the target clock to the second network element, is specifically configured to control to perform the following operations:

and sending the period information or the frequency information of the target clock to the second network element through a message or a domain segment for transmitting network overhead.

A communication device comprising a processor and a memory, wherein the memory has instructions stored therein, and wherein the instructions are invoked by the processor to control the execution of the following operations:

controlling a second timer of a second network element and a first timer of a first network element to be in a time alignment state, wherein the time alignment state is that time increments of the first timer and the second timer are the same in the same time;

receiving, from the first network element, period information or frequency information of a target clock, where the period information or frequency information of the target clock is obtained by the first network element in the time aligned state according to the occurrence time of two adjacent rising edges or the occurrence time of two adjacent falling edges corresponding to the target clock, and the target clock is any clock that needs to be transmitted from the first network element to the second network element;

and acquiring a clock synchronous with the target clock according to the period information or the frequency information of the target clock.

The apparatus according to claim 26, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the period information of the target clock comprises the first time and the second time, or the period information of the target clock comprises a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference between the first time and the second time.

The apparatus according to claim 26, wherein when the occurrence time of two adjacent rising edges corresponding to the target clock is a first time and a second time, respectively, the frequency information of the target clock includes a clock frequency corresponding to the target clock, the clock frequency corresponding to the target clock is a reciprocal of a clock period corresponding to the target clock, and the clock period corresponding to the target clock is an absolute value of a difference between the first time and the second time.

The communication apparatus according to any one of claims 26 to 28,

when the processor is configured to control and execute an operation of acquiring a clock synchronized with the target clock according to the period information or the frequency information of the target clock, the processor is specifically configured to control and execute the following operations:

acquiring a clock period or clock frequency corresponding to the target clock according to the period information or frequency information of the target clock;

and acquiring a clock synchronous with the target clock according to the clock period or clock frequency corresponding to the target clock.

A computer readable storage medium comprising a program or instructions, wherein the method of any of claims 1 to 7 or the method of any of claims 8 to 11 is performed when the program or instructions are run on a computer.

43页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:通信系统及用于通信比特符号的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!