WO2021190080A1 - Error adjustment method and system for time synchronization - Google Patents
Error adjustment method and system for time synchronization Download PDFInfo
- Publication number
- WO2021190080A1 WO2021190080A1 PCT/CN2021/070738 CN2021070738W WO2021190080A1 WO 2021190080 A1 WO2021190080 A1 WO 2021190080A1 CN 2021070738 W CN2021070738 W CN 2021070738W WO 2021190080 A1 WO2021190080 A1 WO 2021190080A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- time difference
- signal
- error
- adjustment
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/004—Synchronisation arrangements compensating for timing error of reception due to propagation delay
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/004—Synchronisation arrangements compensating for timing error of reception due to propagation delay
- H04W56/005—Synchronisation arrangements compensating for timing error of reception due to propagation delay compensating for timing error by adjustment in the receiver
Definitions
- the present invention relates to the field of communication technology, in particular to an error adjustment method and system for time synchronization.
- time synchronization uses the bytes in the FlexE overhead frame to transfer the message content, while using the fixed framing signal of the overhead frame in FlexE to record the time synchronization message Send and receive timestamps.
- the fixed framing signal generated by the timestamp will be affected by the insertion and deletion operations, resulting in the jitter of the timestamp.
- the timestamp is usually corrected. , Used to eliminate the jitter of the time stamp, but due to the lack of a corrected reference value, there are the following problems: each time synchronization is affected by the jitter of the fixed framing signal, and the corrected time stamp has no reference value, which makes the synchronization static error Larger.
- the purpose of the present invention is to provide an error adjustment method and system for time synchronization, which measure based on the signal timestamp of the source or sink, and detect the static error of the link. Then the time delay is corrected, thereby reducing the influence of static errors in the time synchronization process.
- the present invention discloses an error adjustment method for time synchronization.
- the method includes a source adjustment process, and the source adjustment process includes the following steps:
- the time error correction algorithm is used to adjust the time error.
- the source adjustment process further includes the following steps:
- the time error correction algorithm is used to adjust the time error.
- the method includes a sink end adjustment process, and the sink end adjustment process includes the following steps:
- the time error correction algorithm is used to adjust the time error.
- the method further includes the following steps:
- the time-stamp correction algorithm is used to adjust the time error.
- the use of the timestamp correction algorithm to adjust the time error according to the ⁇ t a specifically includes the following steps:
- the time error correction algorithm is being used to adjust the time error
- the present invention also discloses an error adjustment system for time synchronization, the system including:
- the time point acquisition unit which is used to acquire the time point of the current signal sent out in the source and the corresponding time point of the current signal reception, and is also used to acquire the time point of the current signal reception in the sink and the corresponding time point of the signal currently sent out ;
- Time difference calculation unit which is used to obtain the first time difference ⁇ t 1 according to the signal time difference between the current sent signal and the corresponding current received signal, and the signal of the current received signal processed by the corresponding time stamp correction algorithm according to the current sent signal Time difference, obtain the second time difference ⁇ t 2 ;
- An adjustment information release unit which is configured to obtain the source end to-be-adjusted time difference ⁇ t a according to the difference between the ⁇ t 1 and the ⁇ t 2 ;
- the time error adjustment unit is configured to use the time stamp correction algorithm to adjust the time error according to the time difference ⁇ t a to be adjusted at the source end.
- the time difference calculation unit is further configured to obtain the corresponding first time difference average value ⁇ T 1 according to the signal time difference between a plurality of the currently sent signals and the corresponding current received signals;
- the time difference calculation unit is further configured to obtain a corresponding first time difference average value ⁇ T 2 according to a plurality of currently sent signals and corresponding signal time differences of the currently received signal processed by a timestamp correction algorithm;
- the adjustment information release unit is further configured to obtain the average value ⁇ T a of the source end to be adjusted time difference according to the ⁇ T 1 and the ⁇ T 2 ;
- the time error adjustment unit is further configured to use the time stamp correction algorithm to adjust the time error according to the average value ⁇ T a of the time difference to be adjusted at the source end.
- the time difference calculation unit is further configured to obtain a third time difference ⁇ t 3 according to the signal time difference corresponding to the current received signal and the corresponding transmitted signal;
- the time difference calculation unit is further configured to obtain the corresponding fourth time difference ⁇ t 4 according to the current received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm;
- the adjustment information issuing unit is further configured to obtain the time difference ⁇ t b of the sink to be adjusted according to the ⁇ t 3 and the ⁇ t 4 ;
- the time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the time difference ⁇ t b to be adjusted at the sink end.
- the time difference calculation unit is further configured to obtain a third time difference average value ⁇ T 3 according to the signal time differences corresponding to the multiple currently received signals and corresponding sent signals;
- the time difference calculation unit is further configured to obtain a corresponding fourth time difference average value ⁇ T 4 according to a plurality of currently received signals and corresponding signal time differences corresponding to the sent signals processed by the timestamp correction algorithm;
- the adjustment information issuing unit is further configured to obtain the average value ⁇ T b of the time difference to be adjusted at the sink end according to the ⁇ T 3 and the ⁇ T 4 ;
- the time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the average value ⁇ T b of the time difference to be adjusted at the sink.
- the adjustment information issuing unit is further configured to compare the ⁇ t a with a preset adjustment error threshold, and when the ⁇ t a exceeds the adjustment error threshold, issue an adjustment instruction.
- the present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
- 1 is a flow chart of the steps of the source end adjustment process in the error adjustment method for time synchronization in the first embodiment of the present invention
- FIG. 2 is a flow chart of the steps of the sink adjustment process in the error adjustment method for time synchronization in the first embodiment of the present invention
- FIG. 3 is a schematic diagram of the link delay when the link delay is 0 in the error adjustment method for time synchronization in the first embodiment of the present invention
- FIG. 4 is a schematic diagram of the link delay when the link delay is ⁇ in the error adjustment method for time synchronization in the first embodiment of the present invention
- FIG. 5 is an error adjustment principle diagram of an error adjustment method for time synchronization in Embodiment 1 of the present invention.
- FIG. 6 is a structural block diagram of an error adjustment system for time synchronization in the second embodiment of the present invention.
- Time point acquisition unit 2. Time difference calculation unit; 3. Adjustment information release unit; 4. Time error adjustment unit.
- the embodiments of the present invention provide an error adjustment method and system for time synchronization, which measure based on the signal timestamp of the source or sink, and correct the time delay, thereby reducing the influence of static errors in the time synchronization process , Improve the accuracy of time delay correction.
- An error adjustment method for time synchronization includes a source-end adjustment process, and the source-end adjustment process includes the following steps:
- the time error correction algorithm is used to adjust the time error.
- Embodiment 1 of the present invention provides an error adjustment method for time synchronization.
- the method includes a source-end adjustment process, and the source-end adjustment process includes the following steps:
- the time error correction algorithm is used to adjust the time error.
- the time point corresponding to the signal sent by the source is recorded as t 2
- the time point at which the source end receives the received signal corresponding to the sent signal is recorded as t 1.
- the time difference between ⁇ t 1 and ⁇ t 2 is used to obtain the source to be adjusted time difference ⁇ t a ;
- the present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
- the source adjustment process further includes the following steps:
- the time-stamp correction algorithm is used to adjust the time error.
- the time error correction algorithm is used to adjust the time error
- the method includes a sink end adjustment process, and the sink end adjustment process includes the following steps:
- the sink adjustment process Similar to the source adjustment process, when the sink node needs to be detected, the sink adjustment process:
- the time point corresponding to the received signal of the sink is recorded as t 4
- the time point at which the source end receives the received signal corresponding to the transmitted signal is recorded as t 5 , according to t 4 and t 5
- Obtain the first time difference ⁇ t 3 corresponding to the sent signal, that is, ⁇ t 3 t 4 -t 5 ;
- the time difference between ⁇ t 3 and ⁇ t 4 is used to obtain the source end to-be-adjusted time difference ⁇ t b ;
- the time error correction algorithm is used to adjust the time error.
- the method further includes the following steps:
- the time-stamp correction algorithm is used to adjust the time error.
- the time error correction algorithm is used to adjust the time error
- the time error adjustment using the timestamp correction algorithm according to ⁇ t a specifically includes the following steps:
- the error threshold can be adjusted within +-0.5ns, where ns is nanoseconds.
- the local framing indicator signal is used to detect the link delay principle, and the local sending end sends the framing signal fp tx (or mfp tx) To the receiving end through the link (the delay is 0), it becomes the local receiving framing signal fp rx (or mfp rx) of the receiving end; similarly, the local sending framing signal of the receiving end reaches the sending end through the link and becomes In order to receive the fixed framing signal locally at the sender, the time at which the fixed framing signal is generated at the sender and the receiving end is completely independent, and the time at which both ends receive the fixed framing signal is also completely independent, but the sender sends and receives locally.
- the phase difference of the framing signal is the phase difference between the local transmission and reception of the framing signal at the receiving end, and the sum of the two phase differences is the period fp period (or mfp period) of the framing signal
- the local framing indicator signal is used to detect the link delay principle, and the local sending and receiving fixed framing signal at the receiving end
- the time delay ⁇ is increased; the phase difference between the local sending framing signal and the local receiving framing signal at the transmitting end, compared to the one shown in Figure 3, also increases the time delay ⁇ , therefore, the phase difference between the local sending and receiving of the framing signal at the sending end and the phase difference between the local sending and receiving at the receiving end.
- the sum of the two phase differences is the framing signal period plus twice the link delay, that is, fp_period +2 ⁇ .
- the revised time stamp is corrected again, and the phase difference ⁇ t 1 between the original local receiving and sending framing signal is compared with the phase of the local sending framing signal and the corrected local receiving framing signal Difference ⁇ t 2 , compare the two to determine whether the current synchronization state is correct. Due to the jitter characteristics of the fixed framing signal, statistical average is used to count the phase difference ⁇ T 1 of consecutive original local receiving and sending fixed framing signals, and the phase difference ⁇ T of continuous multiple local sending and receiving fixed framing signals after correction 2.
- the corrected time stamp that filters out jitter does not bring static synchronization error, that is, it eliminates the impact on the time stamp and also avoids static errors; if the two are not equal, the corrected reception is fixed.
- the frame signal is fine-tuned (or the time stamp is adjusted) to make the two equal.
- this application provides an embodiment of an error adjustment system for time synchronization corresponding to Embodiment 1. For details, see Embodiment 2.
- an embodiment of the present invention provides an error adjustment system for time synchronization, and the system includes:
- the time point acquisition unit 1 which is used to acquire the time point of the current signal being sent in the source and the corresponding time point of the current signal reception, and is also used to acquire the time point of the current signal reception in the sink and the corresponding time point of the current signal being sent point;
- the time difference calculation unit 2 which is used to obtain the first time difference ⁇ t 1 according to the signal time difference between the current sent signal and the corresponding current received signal, and the signal time difference of the current received signal processed by the corresponding time stamp correction algorithm according to the current sent signal , Obtain the second time difference ⁇ t 2 ;
- the adjustment information issuance unit 3 is used to obtain the source end to-be-adjusted time difference ⁇ t a according to the difference between ⁇ t 1 and ⁇ t 2 ;
- the time error adjustment unit 4 is used to adjust the time error by using the time stamp correction algorithm according to the time difference ⁇ t a to be adjusted at the source end.
- the time point corresponding to the signal sent by the source is recorded as t 2
- the time point at which the source end receives the received signal corresponding to the sent signal is recorded as t 1.
- the time difference between ⁇ t 1 and ⁇ t 2 is used to obtain the source to be adjusted time difference ⁇ t a ;
- the present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
- the time difference calculation unit 2 is further configured to obtain the corresponding first time difference average value ⁇ T 1 according to the signal time difference between multiple currently sent signals and corresponding current received signals;
- the time difference calculation unit 2 is further configured to obtain the corresponding first time difference average value ⁇ T 2 according to the signal time difference of the multiple currently sent signals and the corresponding current received signal processed by the time stamp correction algorithm;
- the adjustment information release unit 3 is also used to obtain the average value ⁇ T a of the time difference at the source to be adjusted according to ⁇ T 1 and ⁇ T 2 ;
- the time error adjustment unit 4 is also used to adjust the time error by using the time stamp correction algorithm according to the average value ⁇ T a of the time difference to be adjusted at the source end.
- the time error correction algorithm is used to adjust the time error
- the time difference calculation unit 2 is further configured to obtain the third time difference ⁇ t 3 according to the signal time difference corresponding to the current received signal and the corresponding sent signal;
- the time difference calculation unit 2 is further configured to obtain the corresponding fourth time difference ⁇ t 4 according to the signal time difference corresponding to the current received signal and the corresponding transmitted signal processed by the time stamp correction algorithm;
- the adjustment information issuing unit 3 is further configured to obtain the time difference ⁇ t b of the sink to be adjusted according to ⁇ t 3 and ⁇ t 4 ;
- the time error adjustment unit 4 is also used to adjust the time error according to the time difference ⁇ t b to be adjusted at the sink end by using a timestamp correction algorithm.
- the sink adjustment process Similar to the source adjustment process, when the sink node needs to be detected, the sink adjustment process:
- the time point corresponding to the received signal of the sink is recorded as t 4
- the time point at which the source end receives the received signal corresponding to the transmitted signal is recorded as t 5 , according to t 4 and t 5
- Obtain the first time difference ⁇ t 3 corresponding to the sent signal, that is, ⁇ t 3 t 4 -t 5 ;
- the time difference between ⁇ t 3 and ⁇ t 4 is used to obtain the source end to-be-adjusted time difference ⁇ t b ;
- the time error correction algorithm is used to adjust the time error.
- the time difference calculation unit 2 is further configured to obtain the third time difference average value ⁇ T 3 according to the signal time difference corresponding to the multiple currently received signals and the corresponding sent signals;
- the time difference calculation unit 2 is further configured to obtain the corresponding fourth time difference average value ⁇ T 4 according to the multiple current received signals and the corresponding signal time differences corresponding to the sent signals processed by the timestamp correction algorithm;
- the adjustment information issuing unit 3 is further configured to obtain the average value ⁇ T b of the time difference to be adjusted at the sink according to ⁇ T 3 and ⁇ T 4 ;
- the time error adjustment unit 4 is further configured to adjust the time error by using the time stamp correction algorithm according to the average value ⁇ T b of the time difference to be adjusted at the sink.
- the time error correction algorithm is used to adjust the time error
- the adjustment information issuing unit 3 is further configured to compare ⁇ t a with a preset adjustment error threshold, and when ⁇ t a exceeds the adjustment error threshold, issue an adjustment instruction;
- this application provides an embodiment of a storage medium corresponding to Embodiment 1. For details, see Embodiment 3.
- the third embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored.
- the computer program is executed by a processor, all or part of the method steps in the first embodiment are implemented.
- the present invention implements all or part of the process in the above-mentioned first embodiment, and it can also be completed by instructing relevant hardware by a computer program.
- the computer program can be stored in a computer-readable storage medium.
- the computer program is executed by a processor, , The steps of the above-mentioned method embodiments can be realized.
- the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
- the computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access Memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, software distribution medium, etc.
- ROM Read-Only Memory
- RAM random access Memory
- electric carrier signal telecommunications signal
- software distribution medium etc.
- Embodiment 4 Based on the same inventive concept, this application provides an embodiment of the device corresponding to Embodiment 1. For details, see Embodiment 4.
- the fourth embodiment of the present invention also provides a device, including a memory and a processor, and a computer program running on the processor is stored in the memory.
- a computer program running on the processor is stored in the memory.
- the processor executes the computer program, all the method steps or part of the method in the first embodiment are implemented. step.
- the so-called processor can be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
- the processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
- the memory may be used to store computer programs and/or modules, and the processor implements various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory.
- the memory may mainly include a storage program area and a storage data area, where the storage program area can store the operating system, at least one application program required by the function (such as sound playback function, image playback function, etc.), etc.; the storage data area can be stored according to the mobile phone Use the created data (such as audio data, video data, etc.) and so on.
- the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards.
- non-volatile memory such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards.
- Flash Card at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
- the embodiments of the present invention can be provided as a method, a system, a server, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
- computer-usable storage media including but not limited to disk storage, optical storage, etc.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Disclosed are an error adjustment method and system for time synchronization, which relate to the technical field of communications. The method comprises: a source-end adjustment procedure, and the source-end adjustment procedure comprises the following steps: obtaining a first time difference Δt1 according to a signal time difference between a transmitted signal and a received signal that is fed back; obtaining a second time difference Δt2 according to a signal time difference between the current transmitted signal and a received signal that is fed back and processed by means of a timestamp correction algorithm; according to Δt1 and Δt2, obtaining a time difference value Δta to be adjusted of a source end; and according to Δta, using the timestamp correction algorithm to perform time error adjustment. In the present invention, measurement is performed on the basis of a signal timestamp of a source end or a destination end, and a time delay situation is corrected, thereby reducing the influence of a static error in a time synchronization process.
Description
本发明涉及通信技术领域,具体涉及一种用于时间同步的误差调整方法及系统。The present invention relates to the field of communication technology, in particular to an error adjustment method and system for time synchronization.
随着移动互联网的迅猛发展,物联网、车联网等多种新形应用的需求激增,数据流量呈现爆炸性增长,第五代移动通信技术(5G)应运而生。在5G承载中,对时间同步的精度需求较上一代通信技术有了更大提升。同时,时间同步中存在的静态误差在超高精度的性能需求前也凸显出来,解决时间同步的静态同步误差已成为超高精度时间同步的重点和难点。基于FlexE(Flexible Ethernet,灵活以太网)的5G核心网承载技术,时间同步使用FlexE的开销帧中的字节进行传递报文内容,同时使用FlexE中开销帧的定帧信号记录时间同步报文的收发时间戳。With the rapid development of the mobile Internet, the demand for a variety of new applications such as the Internet of Things and the Internet of Vehicles has surged, and the data traffic has shown explosive growth. The fifth generation of mobile communication technology (5G) has emerged as the times require. In 5G bearer, the accuracy requirements for time synchronization have been greatly improved compared with the previous generation of communication technology. At the same time, the static error in time synchronization is also highlighted before ultra-high-precision performance requirements. Solving the static synchronization error of time synchronization has become the focus and difficulty of ultra-high-precision time synchronization. Based on FlexE (Flexible Ethernet) 5G core network bearer technology, time synchronization uses the bytes in the FlexE overhead frame to transfer the message content, while using the fixed framing signal of the overhead frame in FlexE to record the time synchronization message Send and receive timestamps.
5G承载网中运用FlexE技术时,用于时间戳产生的定帧信号会受到插入和删除操作的影响导致时间戳存在抖动,为了时间戳抖动导致影响时间同步的精度,通常会对时间戳进行修正,用于消除时间戳的抖动,但由于缺少修正的参考值,故而存在以下问题:每次时间同步时,受到定帧信号抖动的影响,且修正的时间戳没有参考值,使得同步的静态误差较大。When the FlexE technology is used in the 5G bearer network, the fixed framing signal generated by the timestamp will be affected by the insertion and deletion operations, resulting in the jitter of the timestamp. In order for the jitter of the timestamp to affect the accuracy of time synchronization, the timestamp is usually corrected. , Used to eliminate the jitter of the time stamp, but due to the lack of a corrected reference value, there are the following problems: each time synchronization is affected by the jitter of the fixed framing signal, and the corrected time stamp has no reference value, which makes the synchronization static error Larger.
基于上述问题,给出一种用于时间同步的误差调整方案,满足使用需求。Based on the above problems, an error adjustment solution for time synchronization is provided to meet the usage requirements.
发明内容Summary of the invention
针对现有技术中存在的缺陷,本发明的目的在于提供一种用于时间同步的误差调整方法及系统,基于源端或宿端的信号时间戳进行测量,对链路的静态误差情况进行检测,进而对时延情况进行修正,从而减小在时间同步过程中的静态误差的影响。In view of the defects in the prior art, the purpose of the present invention is to provide an error adjustment method and system for time synchronization, which measure based on the signal timestamp of the source or sink, and detect the static error of the link. Then the time delay is corrected, thereby reducing the influence of static errors in the time synchronization process.
为达到以上目的,本发明采取的技术方案是:In order to achieve the above objectives, the technical solution adopted by the present invention is:
第一方面,本发明公开一种用于时间同步的误差调整方法,所述方法包括源端调整流程,所述源端调整流程包括以下步骤:In the first aspect, the present invention discloses an error adjustment method for time synchronization. The method includes a source adjustment process, and the source adjustment process includes the following steps:
根据发出信号以及反馈的接收信号的信号时间差,获得第一时间差Δt
1;
Obtain the first time difference Δt 1 according to the signal time difference between the transmitted signal and the feedback received signal;
根据所述当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得第二时间差Δt
2;
Obtain the second time difference Δt 2 according to the signal time difference between the currently sent signal and the feedback received signal processed by the timestamp correction algorithm;
根据所述Δt
1以及所述Δt
2,获得源端待调整时间差值Δt
a;
According to the Δt 1 and the Δt 2 , obtain the source end to-be-adjusted time difference Δt a ;
根据所述Δt
a,利用所述时间戳矫正算法进行时间误差调整。
According to the Δt a , the time error correction algorithm is used to adjust the time error.
在上述技术方案的基础上,所述源端调整流程还包括以下步骤:On the basis of the above technical solution, the source adjustment process further includes the following steps:
根据多个所述发出信号以及反馈的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
1;
Obtain the corresponding first time difference average value ΔT 1 according to the signal time difference of the multiple of the sent signals and the feedback of the current received signal;
根据多个所述当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得对应的第一时间差平均值ΔT
2;
Obtain the corresponding first time difference average value ΔT 2 according to the signal time differences of the plurality of currently sent signals and the feedback received signals processed by the timestamp correction algorithm;
根据所述ΔT
1以及所述ΔT
2,获得源端待调整时间差平均值ΔT
a;
According to the ΔT 1 and the ΔT 2 , obtain the average value ΔT a of the time difference to be adjusted at the source end;
根据所述ΔT
a,利用所述时间戳矫正算法进行时间误差调整。
According to the ΔT a , the time error correction algorithm is used to adjust the time error.
在上述技术方案的基础上,所述方法包括宿端调整流程,所述宿端调整流程包括以下步骤:On the basis of the above technical solution, the method includes a sink end adjustment process, and the sink end adjustment process includes the following steps:
根据接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差Δt
3;
Obtain the third time difference Δt 3 according to the signal time difference corresponding to the received signal and the feedback sent signal;
根据接收信号以及反馈的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差Δt
4;
Obtain the corresponding fourth time difference Δt 4 according to the received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm and fed back;
根据所述Δt
3以及所述Δt
4,获得宿端待调整时间差值Δt
b;
According to the Δt 3 and the Δt 4 , obtain the time difference Δt b of the sink to be adjusted;
根据所述Δt
b,利用所述时间戳矫正算法进行时间误差调整。
According to the Δt b , the time error correction algorithm is used to adjust the time error.
在上述技术方案的基础上,所述方法还包括以下步骤:On the basis of the above technical solution, the method further includes the following steps:
根据多个接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差平均值ΔT
3;
Obtain the third time difference average value ΔT 3 according to the signal time differences corresponding to the multiple received signals and the feedback transmitted signals;
根据多个接收信号以及反馈的经过时间戳矫正算法处理后的发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT
4;
Obtain the corresponding fourth time difference average value ΔT 4 according to the multiple received signals and the signal time difference corresponding to the sent signal after being processed by the time stamp correction algorithm.
根据所述ΔT
3以及所述ΔT
4,获得宿端待调整时间差平均值ΔT
b;
According to the ΔT 3 and the ΔT 4 , obtain the average value ΔT b of the time difference to be adjusted at the sink end;
根据所述ΔT
b,利用所述时间戳矫正算法进行时间误差调整。
According to the ΔT b , the time-stamp correction algorithm is used to adjust the time error.
在上述技术方案的基础上,所述根据所述Δt
a,利用所述时间戳矫正算法进行时间误差调整中,具体包括以下步骤:
On the basis of the above technical solution, the use of the timestamp correction algorithm to adjust the time error according to the Δt a specifically includes the following steps:
将所述Δt
a与预设的调整误差阈值进行比对;
Comparing the Δt a with a preset adjustment error threshold;
当所述Δt
a超过调整误差阈值时,利用所述时间戳矫正算法进行时间误差调整中;
When the Δt a exceeds the adjustment error threshold, the time error correction algorithm is being used to adjust the time error;
当所述Δt
a未超过调整误差阈值时,终止所述源端调整流程。
When the Δt a does not exceed the adjustment error threshold, the source adjustment process is terminated.
第二方面,本发明还公开一种用于时间同步的误差调整系统,所述系统包括:In the second aspect, the present invention also discloses an error adjustment system for time synchronization, the system including:
时间点获取单元,其用于获取源端中当前发出信号的时间点以及对应的当前接收信号的时间点,还用于获取宿端中当前接收信号的时间点以及对应的当前发出信号的时间点;The time point acquisition unit, which is used to acquire the time point of the current signal sent out in the source and the corresponding time point of the current signal reception, and is also used to acquire the time point of the current signal reception in the sink and the corresponding time point of the signal currently sent out ;
时间差计算单元,其用于根据当前发出信号以及对应的当前接收信号的信号时间差,获得第一时间差Δt
1,根据所述当前发出信号以及对应的经过时间戳矫正算法处理后的当前接收信号的信号时间差,获得第二时间差Δt
2;
Time difference calculation unit, which is used to obtain the first time difference Δt 1 according to the signal time difference between the current sent signal and the corresponding current received signal, and the signal of the current received signal processed by the corresponding time stamp correction algorithm according to the current sent signal Time difference, obtain the second time difference Δt 2 ;
调整信息发布单元,其用于根据所述Δt
1以及所述Δt
2的差值,获得源端待调整时间差值Δt
a;
An adjustment information release unit, which is configured to obtain the source end to-be-adjusted time difference Δt a according to the difference between the Δt 1 and the Δt 2 ;
时间误差调整单元,其用于根据所述源端待调整时间差值Δt
a,利用所述时间戳矫正算法进行时间误差调整。
The time error adjustment unit is configured to use the time stamp correction algorithm to adjust the time error according to the time difference Δt a to be adjusted at the source end.
在上述技术方案的基础上,所述时间差计算单元,其还用于根据多个所述当前发出信号以及对应的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
1;
On the basis of the above technical solution, the time difference calculation unit is further configured to obtain the corresponding first time difference average value ΔT 1 according to the signal time difference between a plurality of the currently sent signals and the corresponding current received signals;
所述时间差计算单元,其还用于根据多个所述当前发出信号以及对应的经过时间戳矫正算法处理后的所述当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
2;
The time difference calculation unit is further configured to obtain a corresponding first time difference average value ΔT 2 according to a plurality of currently sent signals and corresponding signal time differences of the currently received signal processed by a timestamp correction algorithm;
所述调整信息发布单元,其还用于根据所述ΔT
1以及所述ΔT
2,获得源端待调整时间差平均值ΔT
a;
The adjustment information release unit is further configured to obtain the average value ΔT a of the source end to be adjusted time difference according to the ΔT 1 and the ΔT 2 ;
所述时间误差调整单元,其还用于根据所述源端待调整时间差平均值ΔT
a,利用所述时间戳矫正算法进行时间误差调整。
The time error adjustment unit is further configured to use the time stamp correction algorithm to adjust the time error according to the average value ΔT a of the time difference to be adjusted at the source end.
在上述技术方案的基础上,所述时间差计算单元,其还用于根据当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差Δt
3;
On the basis of the above technical solution, the time difference calculation unit is further configured to obtain a third time difference Δt 3 according to the signal time difference corresponding to the current received signal and the corresponding transmitted signal;
所述时间差计算单元,其还用于根据当前接收信号以及对应的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差Δt
4;
The time difference calculation unit is further configured to obtain the corresponding fourth time difference Δt 4 according to the current received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm;
所述调整信息发布单元,其还用于根据所述Δt
3以及所述Δt
4, 获得宿端待调整时间差值Δt
b;
The adjustment information issuing unit is further configured to obtain the time difference Δt b of the sink to be adjusted according to the Δt 3 and the Δt 4 ;
所述时间误差调整单元,其还用于根据所述宿端待调整时间差值Δt
b,利用所述时间戳矫正算法进行时间误差调整。
The time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the time difference Δt b to be adjusted at the sink end.
在上述技术方案的基础上,所述时间差计算单元,其还用于根据多个所述当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差平均值ΔT
3;
On the basis of the above technical solution, the time difference calculation unit is further configured to obtain a third time difference average value ΔT 3 according to the signal time differences corresponding to the multiple currently received signals and corresponding sent signals;
所述时间差计算单元,其还用于根据多个当前接收信号以及对应的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT
4;
The time difference calculation unit is further configured to obtain a corresponding fourth time difference average value ΔT 4 according to a plurality of currently received signals and corresponding signal time differences corresponding to the sent signals processed by the timestamp correction algorithm;
所述调整信息发布单元,其还用于根据所述ΔT
3以及所述ΔT
4,获得宿端待调整时间差平均值ΔT
b;
The adjustment information issuing unit is further configured to obtain the average value ΔT b of the time difference to be adjusted at the sink end according to the ΔT 3 and the ΔT 4 ;
所述时间误差调整单元,其还用于根据所述宿端待调整时间差平均值ΔT
b,利用所述时间戳矫正算法进行时间误差调整。
The time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the average value ΔT b of the time difference to be adjusted at the sink.
在上述技术方案的基础上,所述调整信息发布单元,其还用于将所述Δt
a与预设的调整误差阈值进行比对,当所述Δt
a超过调整误差阈值时,发布调整指令。
On the basis of the above technical solution, the adjustment information issuing unit is further configured to compare the Δt a with a preset adjustment error threshold, and when the Δt a exceeds the adjustment error threshold, issue an adjustment instruction.
与现有技术相比,本发明的优点在于:Compared with the prior art, the advantages of the present invention are:
本发明基于源端或宿端的信号时间戳以及固有链路时延进行辅助测量,对链路的静态误差情况进行检测,进而对时延情况进行修正,从而减小在时间同步过程中的静态误差的影响,提升时延修正的精准度。The present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
图1为本发明实施例一中用于时间同步的误差调整方法中源端调整流程的步骤流程图;1 is a flow chart of the steps of the source end adjustment process in the error adjustment method for time synchronization in the first embodiment of the present invention;
图2为本发明实施例一中用于时间同步的误差调整方法中宿端调整流程的步骤流程图;2 is a flow chart of the steps of the sink adjustment process in the error adjustment method for time synchronization in the first embodiment of the present invention;
图3为本发明实施例一中用于时间同步的误差调整方法中链路时延为0时的链路时延原理图;3 is a schematic diagram of the link delay when the link delay is 0 in the error adjustment method for time synchronization in the first embodiment of the present invention;
图4为本发明实施例一中用于时间同步的误差调整方法中链路时延为Δ时的链路时延原理图;4 is a schematic diagram of the link delay when the link delay is Δ in the error adjustment method for time synchronization in the first embodiment of the present invention;
图5为本发明实施例一中用于时间同步的误差调整方法的误差调整原理图;FIG. 5 is an error adjustment principle diagram of an error adjustment method for time synchronization in Embodiment 1 of the present invention;
图6为本发明实施例二中用于时间同步的误差调整系统的结构框图;6 is a structural block diagram of an error adjustment system for time synchronization in the second embodiment of the present invention;
图中:1、时间点获取单元;2、时间差计算单元;3、调整信息发布单元;4、时间误差调整单元。In the figure: 1. Time point acquisition unit; 2. Time difference calculation unit; 3. Adjustment information release unit; 4. Time error adjustment unit.
以下结合附图对本发明的实施例作进一步详细说明。The embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.
本发明实施例提供一种用于时间同步的误差调整方法及系统,基于源端或宿端的信号时间戳进行测量,对时延情况进行修正,从而减小在时间同步过程中的静态误差的影响,提升时延修正的精准度。The embodiments of the present invention provide an error adjustment method and system for time synchronization, which measure based on the signal timestamp of the source or sink, and correct the time delay, thereby reducing the influence of static errors in the time synchronization process , Improve the accuracy of time delay correction.
为达到上述技术效果,本申请的总体思路如下:In order to achieve the above technical effects, the general idea of this application is as follows:
一种用于时间同步的误差调整方法,该方法包括源端调整流程,源端调整流程包括以下步骤:An error adjustment method for time synchronization, the method includes a source-end adjustment process, and the source-end adjustment process includes the following steps:
S1、根据发出信号以及反馈的接收信号的信号时间差,获得第一时间差Δt
1;
S1. Obtain the first time difference Δt 1 according to the signal time difference between the sent signal and the feedback received signal;
S2、根据当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得第二时间差Δt
2;
S2. Obtain the second time difference Δt 2 according to the signal time difference between the currently sent signal and the feedback signal time difference of the received signal processed by the timestamp correction algorithm;
S3、根据Δt
1以及Δt
2,获得源端待调整时间差值Δt
a;
S3. According to Δt 1 and Δt 2 , obtain the time difference Δt a of the source to be adjusted;
S4、根据Δt
a,利用时间戳矫正算法进行时间误差调整。
S4. According to Δt a , the time error correction algorithm is used to adjust the time error.
以下结合附图对本发明的实施例作进一步详细说明。The embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.
实施例1Example 1
参见图1至图5所示,本发明实施例1提供一种用于时间同步的误差调整方法,该方法包括源端调整流程,源端调整流程包括以下步骤:Referring to Figures 1 to 5, Embodiment 1 of the present invention provides an error adjustment method for time synchronization. The method includes a source-end adjustment process, and the source-end adjustment process includes the following steps:
S1、根据发出信号以及反馈的接收信号的信号时间差,获得第一时间差Δt
1;
S1. Obtain the first time difference Δt 1 according to the signal time difference between the sent signal and the feedback received signal;
S2、根据当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得第二时间差Δt
2;
S2. Obtain the second time difference Δt 2 according to the signal time difference between the currently sent signal and the feedback signal time difference of the received signal processed by the timestamp correction algorithm;
S3、根据Δt
1以及Δt
2,获得源端待调整时间差值Δt
a;
S3. According to Δt 1 and Δt 2 , obtain the time difference Δt a of the source to be adjusted;
S4、根据Δt
a,利用时间戳矫正算法进行时间误差调整。
S4. According to Δt a , the time error correction algorithm is used to adjust the time error.
本发明实施例中,首先,记录源端的发出信号对应的时间点,记作t
2,记录源端接收与发出信号对应的接收信号的时间点,记作t
1,根据t
1以及t
2,获得与发出信号对应的第一时间差Δt
1,即Δt
1=t
2-t
1;
In the embodiment of the present invention, firstly, the time point corresponding to the signal sent by the source is recorded as t 2 , and the time point at which the source end receives the received signal corresponding to the sent signal is recorded as t 1. According to t 1 and t 2 , Obtain the first time difference Δt 1 corresponding to the sent signal, that is, Δt 1 =t 2 -t 1 ;
进而,记录源端接收经过时间戳矫正算法处理后的与发出信号对应的接收信号的时间点,记作t
3,根据t
3以及t
2,获得与当前发出信号对应的第二时间差Δt
2,即Δt
2=t
2-t
3;
Furthermore, the time point at which the recording source receives the received signal corresponding to the transmitted signal processed by the time stamp correction algorithm is denoted as t 3 , and according to t 3 and t 2 , the second time difference Δt 2 corresponding to the current transmitted signal is obtained, That is, Δt 2 =t 2 -t 3 ;
进而,根据Δt
1以及Δt
2,利用Δt
1与Δt
2的时间差来获得源端待调整时间差Δt
a;
Furthermore, according to Δt 1 and Δt 2 , the time difference between Δt 1 and Δt 2 is used to obtain the source to be adjusted time difference Δt a ;
最后,当源端待调整时间差Δt
a超出预设的许可范围时,则表示此前进行时间误差调整,仍存在静态误差需要调整,此时,再次利用时间戳矫正算法进行时间误差调整。
Finally, when the time difference Δt a to be adjusted at the source end exceeds the preset allowable range, it means that the time error adjustment was performed before, and there is still a static error that needs to be adjusted. At this time, the time error correction algorithm is again used to adjust the time error.
其中,Δt
1以及Δt
2的差值,由于,即Δt
1=t
2-t
1,而Δt
2=t
2-t
3,故而Δt
a=Δt
1-Δt
2,即Δt
a=(t
1-t
2)-(t
1-t
3)=t
3-t
2。
Among them, the difference between Δt 1 and Δt 2 , because Δt 1 =t 2 -t 1 , and Δt 2 =t 2 -t 3 , so Δt a =Δt 1 -Δt 2 , that is, Δt a =(t 1 -t 2 )-(t 1 -t 3 )=t 3 -t 2 .
本发明基于源端或宿端的信号时间戳以及固有链路时延进行辅助测量,对链路的静态误差情况进行检测,进而对时延情况进行修正,从而减小在时间同步过程中的静态误差的影响,提升时延修正的精准度。The present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
本发明实施例中的另一种实施方式中,源端调整流程还包括以下步骤:In another implementation manner in the embodiment of the present invention, the source adjustment process further includes the following steps:
根据多个发出信号以及反馈的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
1;
Obtain the corresponding average value ΔT 1 of the first time difference according to the signal time difference of the multiple transmitted signals and the feedback of the current received signal;
根据多个当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得对应的第一时间差平均值ΔT
2;
Obtain the corresponding first time difference average value ΔT 2 according to the multiple currently sent signals and the feedback signal time differences of the received signals processed by the timestamp correction algorithm;
根据ΔT
1以及ΔT
2,获得源端待调整时间差平均值ΔT
a;
According to ΔT 1 and ΔT 2 , obtain the average value ΔT a of the time difference to be adjusted at the source end;
根据ΔT
a,利用时间戳矫正算法进行时间误差调整。
According to ΔT a , the time-stamp correction algorithm is used to adjust the time error.
本发明实施例中,为了减小计算误差,需要对多个发出信号进行计算,获得多个t
1以及t
2,进而获得多个Δt
1,最后获得对应的第一时间差平均值ΔT
1;
In the embodiment of the present invention, in order to reduce the calculation error, it is necessary to calculate multiple sent signals to obtain multiple t 1 and t 2 , and then obtain multiple Δt 1 , and finally obtain the corresponding first time difference average value ΔT 1 ;
同样,获得多个t
3,进而获得多个Δt
2,最后获得对应的第一时间差平均值ΔT
2;
Similarly, obtain multiple t 3 , and then obtain multiple Δt 2 , and finally obtain the corresponding first time difference average value ΔT 2 ;
最后,根据ΔT
1以及ΔT
2,获得源端待调整时间差平均值ΔT
a;
Finally, according to ΔT 1 and ΔT 2 , the average value ΔT a of the time difference to be adjusted at the source end is obtained;
根据ΔT
a,利用时间戳矫正算法进行时间误差调整;
According to ΔT a , the time error correction algorithm is used to adjust the time error;
从而减小在数据统计过程中的误差。Thereby reducing the error in the data statistics process.
本发明实施例中的另一种实施方式中,方法包括宿端调整流程,宿端调整流程包括以下步骤:In another implementation manner in the embodiment of the present invention, the method includes a sink end adjustment process, and the sink end adjustment process includes the following steps:
A1、根据接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差Δt
3;
A1. Obtain the third time difference Δt 3 according to the signal time difference corresponding to the received signal and the feedback sent signal;
A2、根据接收信号以及反馈的经过时间戳矫正算法处理后的发 出信号对应的信号时间差,获得对应的第四时间差Δt
4;
A2. Obtain the corresponding fourth time difference Δt 4 according to the received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm and fed back;
A3、根据Δt
3以及Δt
4,获得宿端待调整时间差值Δt
b;
A3. Obtain the time difference Δt b of the sink to be adjusted according to Δt 3 and Δt 4 ;
A4、根据Δt
b,利用时间戳矫正算法进行时间误差调整;
A4. According to Δt b , use the timestamp correction algorithm to adjust the time error;
同理,与源端调整流程类似,当需要对宿端节点进行检测时,宿端调整流程中:Similarly, similar to the source adjustment process, when the sink node needs to be detected, the sink adjustment process:
本发明实施例中,首先,记录宿端的接收信号对应的时间点,记作t
4,记录源端接收与发出信号对应的接收信号的时间点,记作t
5,根据t
4以及t
5,获得与发出信号对应的第一时间差Δt
3,即Δt
3=t
4-t
5;
In the embodiment of the present invention, first, the time point corresponding to the received signal of the sink is recorded as t 4 , and the time point at which the source end receives the received signal corresponding to the transmitted signal is recorded as t 5 , according to t 4 and t 5 , Obtain the first time difference Δt 3 corresponding to the sent signal, that is, Δt 3 =t 4 -t 5 ;
进而,记录宿端对应的接收经过时间戳矫正算法处理后的与发出信号的时间点,记作t
6,根据t
4以及t
6,获得与当前发出信号对应的第二时间差Δt
4,即Δt
4=t
4-t
6;
Furthermore, the time point of receiving and sending the signal corresponding to the recording sink after the time stamp correction algorithm is processed is recorded as t 6 , and according to t 4 and t 6 , the second time difference Δt 4 corresponding to the current sent signal is obtained, that is, Δt 4 = t 4 -t 6 ;
进而,根据Δt
3以及Δt
5,利用Δt
3与Δt
4的时间差来获得源端待调整时间差Δt
b;
Furthermore, according to Δt 3 and Δt 5 , the time difference between Δt 3 and Δt 4 is used to obtain the source end to-be-adjusted time difference Δt b ;
最后,当源端待调整时间差Δt
b超出预设的许可范围时,则表示此前进行时间误差调整,仍存在静态误差需要调整,此时,再次利用时间戳矫正算法进行时间误差调整。
Finally, when the time difference Δt b at the source end to be adjusted exceeds the preset allowable range, it means that the time error adjustment was performed before, and there is still a static error that needs to be adjusted. At this time, the time error correction algorithm is again used to adjust the time error.
其中,Δt
3以及Δt
4的差值,由于,即Δt
3=t
4-t
5,而Δt
5=t
4-t
6,故而Δt
b=Δt
3-Δt
4,即Δt
b=(t
4-t5
2)-(t
4-t
6)=t
6-t
5;
Among them, the difference between Δt 3 and Δt 4 , because Δt 3 =t 4 -t 5 , and Δt 5 =t 4 -t 6 , so Δt b =Δt 3 -Δt 4 , that is, Δt b =(t 4 -t5 2 )-(t 4 -t 6 )=t 6 -t 5 ;
最后,根据Δt
b,利用时间戳矫正算法进行时间误差调整。
Finally, according to Δt b , the time error correction algorithm is used to adjust the time error.
本发明实施例中的另一种实施方式中,方法还包括以下步骤:In another implementation manner in the embodiment of the present invention, the method further includes the following steps:
根据多个接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差平均值ΔT
3;
Obtain the third time difference average value ΔT 3 according to the signal time differences corresponding to the multiple received signals and the feedback transmitted signals;
根据多个接收信号以及反馈的经过时间戳矫正算法处理后的发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT
4;
Obtain the corresponding fourth time difference average value ΔT 4 according to the multiple received signals and the signal time difference corresponding to the sent signal after being processed by the time stamp correction algorithm.
根据ΔT
3以及ΔT
4,获得宿端待调整时间差平均值ΔT
b;
According to ΔT 3 and ΔT 4 , obtain the average value ΔT b of the time difference to be adjusted at the sink end;
根据ΔT
b,利用时间戳矫正算法进行时间误差调整。
According to ΔT b , the time-stamp correction algorithm is used to adjust the time error.
本发明实施例中,为了减小计算误差,需要对多个发出信号进行计算,获得多个t
4以及t
5,进而获得多个Δt
3,最后获得对应的第一时间差平均值ΔT
3;
In the embodiment of the present invention, in order to reduce the calculation error, it is necessary to calculate multiple sent signals, obtain multiple t 4 and t 5 , and then obtain multiple Δt 3 , and finally obtain the corresponding first time difference average value ΔT 3 ;
同样,获得多个t
6,进而获得多个Δt
4,最后获得对应的第一时间差平均值ΔT
4;
Similarly, obtain multiple t 6 , and then obtain multiple Δt 4 , and finally obtain the corresponding first time difference average value ΔT 4 ;
最后,根据ΔT
3以及ΔT
4,获得源端待调整时间差平均值ΔT
b;
Finally, according to ΔT 3 and ΔT 4 , obtain the average value ΔT b of the time difference to be adjusted at the source end;
根据ΔT
b,利用时间戳矫正算法进行时间误差调整;
According to ΔT b , the time error correction algorithm is used to adjust the time error;
从而减小在数据统计过程中的误差。Thereby reducing the error in the data statistics process.
本发明实施例中的另一种实施方式中,根据Δt
a,利用时间戳矫正算法进行时间误差调整中,具体包括以下步骤:
In another implementation manner in the embodiment of the present invention, the time error adjustment using the timestamp correction algorithm according to Δt a specifically includes the following steps:
将Δt
a与预设的调整误差阈值进行比对;
Compare Δt a with the preset adjustment error threshold;
当Δt
a超过调整误差阈值时,利用时间戳矫正算法进行时间误差调整中;
When Δt a exceeds the adjustment error threshold, use the time stamp correction algorithm to adjust the time error;
当Δt
a未超过调整误差阈值时,终止源端调整流程。
When Δt a does not exceed the adjustment error threshold, the source adjustment process is terminated.
需要说明的是,同样的,也会将Δt
b、ΔT
a以及ΔT
b预设的调整误差阈值进行比对,进而判断是否需要进行时间误差调整;
It should be noted that, similarly, the preset adjustment error thresholds of Δt b , ΔT a and ΔT b will be compared to determine whether time error adjustment is needed;
必要时,调整误差阈值可以在+-0.5ns范围内,ns即纳秒。If necessary, the error threshold can be adjusted within +-0.5ns, where ns is nanoseconds.
本发明实施例中,具体实施时,如下文原理图图3~图5所示:In the embodiments of the present invention, during specific implementation, the following principle diagrams are shown in Figures 3 to 5:
如图3所示,当进行误差调整的目标链路的链路时延为0时,利用本地定帧指示信号检测链路时延原理,发送端的本地发送定帧信号fp tx(或者mfp tx)通过链路(时延为0)到了接收端,变成了接收端的本地接收定帧信号fp rx(或者mfp rx);类似的,接收端的本地发送定帧信号通过链路到了发送端,变成了发送端的本地接收定帧信号,在发送端和接收端,两端产生发送定帧信号的时间是完全独立 的,两端接收定帧信号的时间也是完全独立的,但是发送端本地发送和接收定帧信号的相位差,与接收端的本地发送和接收定帧信号的相位差,两个相位差之和即为定帧信号的周期fp period(或者mfp period)。As shown in Figure 3, when the link delay of the target link for error adjustment is 0, the local framing indicator signal is used to detect the link delay principle, and the local sending end sends the framing signal fp tx (or mfp tx) To the receiving end through the link (the delay is 0), it becomes the local receiving framing signal fp rx (or mfp rx) of the receiving end; similarly, the local sending framing signal of the receiving end reaches the sending end through the link and becomes In order to receive the fixed framing signal locally at the sender, the time at which the fixed framing signal is generated at the sender and the receiving end is completely independent, and the time at which both ends receive the fixed framing signal is also completely independent, but the sender sends and receives locally. The phase difference of the framing signal is the phase difference between the local transmission and reception of the framing signal at the receiving end, and the sum of the two phase differences is the period fp period (or mfp period) of the framing signal.
如图4所示,链路时延为Δ时(假设链路时延是对称的),利用本地定帧指示信号检测链路时延原理,接收端的本地发送定帧信号与本地接收定帧信号的相位差,相比图3中所示的,增加了时延Δ;发送端本地发送定帧信号与本地接收定帧信号的相位差,相比图3中所示的,也增加了时延Δ,故而发送端本地发送和接收定帧信号的相位差,与接收端本地发送和接收的相位差,两个相位差之和为定帧信号周期加上两倍的链路时延,即fp_period+2Δ。As shown in Figure 4, when the link delay is Δ (assuming the link delay is symmetric), the local framing indicator signal is used to detect the link delay principle, and the local sending and receiving fixed framing signal at the receiving end Compared with the phase difference shown in Figure 3, the time delay Δ is increased; the phase difference between the local sending framing signal and the local receiving framing signal at the transmitting end, compared to the one shown in Figure 3, also increases the time delay Δ, therefore, the phase difference between the local sending and receiving of the framing signal at the sending end and the phase difference between the local sending and receiving at the receiving end. The sum of the two phase differences is the framing signal period plus twice the link delay, that is, fp_period +2Δ.
图3与图4所示的原理,表明了利用接收端和发送端,两端各自的本地发送和接收的定帧信号的相位差,可以求得链路时延,类似的,可以得到,假设链路不对等的情况下,两端的发送和接收定帧信号相位差之和为定帧信号周期加上发送端到接收端的链路时延和接收端到发送端的链路时延,本地定帧信号与时延有着密不可分的关系,本地发送和接收定帧信号的相位差客观的反映了链路时延的特性。The principles shown in Figure 3 and Figure 4 show that the phase difference of the framing signal sent and received locally at the receiving end and the sending end can be used to obtain the link delay. Similarly, it can be obtained, assuming In the case of unequal links, the sum of the phase difference between the sending and receiving framing signals at both ends is the framing signal period plus the link delay from the sender to the receiver and the link delay from the receiver to the sender. Local framing There is an inseparable relationship between signal and time delay. The phase difference between the local transmission and reception of fixed framing signals objectively reflects the characteristics of link time delay.
如图5所示,对修正后的时间戳进行再次修正,通过原始的本地接收和发送定帧信号的相位差Δt
1,与本地发送定帧信号与经过修正后的本地接收定帧信号的相位差Δt
2,两者比对确定当前的同步状态是否正确。由于定帧信号的抖动特性,使用统计平均,统计连续多个原始的本地接收和发送定帧信号的相位差ΔT
1,统计连续多个本地发送和经过修正后的接收定帧信号的相位差ΔT
2,当两者相等,意味着滤去抖动的修正时间戳没有带来静态同步误差,即在消除对时间戳应影响同时也避免了静态误差;若两者不相等,对修正后的接收定帧信 号进行微调(或对时间戳进行调整),使得两者相等。
As shown in Figure 5, the revised time stamp is corrected again, and the phase difference Δt 1 between the original local receiving and sending framing signal is compared with the phase of the local sending framing signal and the corrected local receiving framing signal Difference Δt 2 , compare the two to determine whether the current synchronization state is correct. Due to the jitter characteristics of the fixed framing signal, statistical average is used to count the phase difference ΔT 1 of consecutive original local receiving and sending fixed framing signals, and the phase difference ΔT of continuous multiple local sending and receiving fixed framing signals after correction 2. When the two are equal, it means that the corrected time stamp that filters out jitter does not bring static synchronization error, that is, it eliminates the impact on the time stamp and also avoids static errors; if the two are not equal, the corrected reception is fixed. The frame signal is fine-tuned (or the time stamp is adjusted) to make the two equal.
基于同一发明构思,本申请提供了实施例一对应的用于时间同步的误差调整系统的实施例,详见实施例二Based on the same inventive concept, this application provides an embodiment of an error adjustment system for time synchronization corresponding to Embodiment 1. For details, see Embodiment 2.
实施例二Example two
参见图6所示,本发明实施例提供一种用于时间同步的误差调整系统,该系统包括:Referring to FIG. 6, an embodiment of the present invention provides an error adjustment system for time synchronization, and the system includes:
时间点获取单元1,其用于获取源端中当前发出信号的时间点以及对应的当前接收信号的时间点,还用于获取宿端中当前接收信号的时间点以及对应的当前发出信号的时间点;The time point acquisition unit 1, which is used to acquire the time point of the current signal being sent in the source and the corresponding time point of the current signal reception, and is also used to acquire the time point of the current signal reception in the sink and the corresponding time point of the current signal being sent point;
时间差计算单元2,其用于根据当前发出信号以及对应的当前接收信号的信号时间差,获得第一时间差Δt
1,根据当前发出信号以及对应的经过时间戳矫正算法处理后的当前接收信号的信号时间差,获得第二时间差Δt
2;
The time difference calculation unit 2, which is used to obtain the first time difference Δt 1 according to the signal time difference between the current sent signal and the corresponding current received signal, and the signal time difference of the current received signal processed by the corresponding time stamp correction algorithm according to the current sent signal , Obtain the second time difference Δt 2 ;
调整信息发布单元3,其用于根据Δt
1以及Δt
2的差值,获得源端待调整时间差值Δt
a;
The adjustment information issuance unit 3 is used to obtain the source end to-be-adjusted time difference Δt a according to the difference between Δt 1 and Δt 2 ;
时间误差调整单元4,其用于根据源端待调整时间差值Δt
a,利用时间戳矫正算法进行时间误差调整。
The time error adjustment unit 4 is used to adjust the time error by using the time stamp correction algorithm according to the time difference Δt a to be adjusted at the source end.
本发明实施例中,首先,记录源端的发出信号对应的时间点,记作t
2,记录源端接收与发出信号对应的接收信号的时间点,记作t
1,根据t
1以及t
2,获得与发出信号对应的第一时间差Δt
1,即Δt
1=t
2-t
1;
In the embodiment of the present invention, firstly, the time point corresponding to the signal sent by the source is recorded as t 2 , and the time point at which the source end receives the received signal corresponding to the sent signal is recorded as t 1. According to t 1 and t 2 , Obtain the first time difference Δt 1 corresponding to the sent signal, that is, Δt 1 =t 2 -t 1 ;
进而,记录源端接收经过时间戳矫正算法处理后的与发出信号对应的接收信号的时间点,记作t
3,根据t
3以及t
2,获得与当前发出信号对应的第二时间差Δt
2,即Δt
2=t
2-t
3;
Furthermore, the time point at which the recording source receives the received signal corresponding to the transmitted signal processed by the time stamp correction algorithm is denoted as t 3 , and according to t 3 and t 2 , the second time difference Δt 2 corresponding to the current transmitted signal is obtained, That is, Δt 2 =t 2 -t 3 ;
进而,根据Δt
1以及Δt
2,利用Δt
1与Δt
2的时间差来获得源端待调整时间差Δt
a;
Furthermore, according to Δt 1 and Δt 2 , the time difference between Δt 1 and Δt 2 is used to obtain the source to be adjusted time difference Δt a ;
最后,当源端待调整时间差Δt
a超出预设的许可范围时,则表示此前进行时间误差调整,仍存在静态误差需要调整,此时,再次利用时间戳矫正算法进行时间误差调整。
Finally, when the time difference Δt a to be adjusted at the source end exceeds the preset allowable range, it means that the time error adjustment was performed before, and there is still a static error that needs to be adjusted. At this time, the time error correction algorithm is again used to adjust the time error.
其中,Δt
1以及Δt
2的差值,由于,即Δt
1=t
2-t
1,而Δt
2=t
2-t
3,故而Δt
a=Δt
1-Δt
2,即Δt
a=(t
1-t
2)-(t
1-t
3)=t
3-t
2。
Among them, the difference between Δt 1 and Δt 2 , because Δt 1 =t 2 -t 1 , and Δt 2 =t 2 -t 3 , so Δt a =Δt 1 -Δt 2 , that is, Δt a =(t 1 -t 2 )-(t 1 -t 3 )=t 3 -t 2 .
本发明基于源端或宿端的信号时间戳以及固有链路时延进行辅助测量,对链路的静态误差情况进行检测,进而对时延情况进行修正,从而减小在时间同步过程中的静态误差的影响,提升时延修正的精准度。The present invention performs auxiliary measurement based on the signal time stamp of the source or sink and the inherent link delay, detects the static error condition of the link, and then corrects the delay condition, thereby reducing the static error in the time synchronization process The impact of, improve the accuracy of time delay correction.
本发明实施例中的另一种实施方式中,时间差计算单元2,其还用于根据多个当前发出信号以及对应的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
1;
In another implementation of the embodiment of the present invention, the time difference calculation unit 2 is further configured to obtain the corresponding first time difference average value ΔT 1 according to the signal time difference between multiple currently sent signals and corresponding current received signals;
时间差计算单元2,其还用于根据多个当前发出信号以及对应的经过时间戳矫正算法处理后的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT
2;
The time difference calculation unit 2 is further configured to obtain the corresponding first time difference average value ΔT 2 according to the signal time difference of the multiple currently sent signals and the corresponding current received signal processed by the time stamp correction algorithm;
调整信息发布单元3,其还用于根据ΔT
1以及ΔT
2,获得源端待调整时间差平均值ΔT
a;
The adjustment information release unit 3 is also used to obtain the average value ΔT a of the time difference at the source to be adjusted according to ΔT 1 and ΔT 2 ;
时间误差调整单元4,其还用于根据源端待调整时间差平均值ΔT
a,利用时间戳矫正算法进行时间误差调整。
The time error adjustment unit 4 is also used to adjust the time error by using the time stamp correction algorithm according to the average value ΔT a of the time difference to be adjusted at the source end.
本发明实施例中,为了减小计算误差,需要对多个发出信号进行计算,获得多个t
1以及t
2,进而获得多个Δt
1,最后获得对应的第一时间差平均值ΔT
1;
In the embodiment of the present invention, in order to reduce the calculation error, it is necessary to calculate multiple sent signals to obtain multiple t 1 and t 2 , and then obtain multiple Δt 1 , and finally obtain the corresponding first time difference average value ΔT 1 ;
同样,获得多个t
3,进而获得多个Δt
2,最后获得对应的第一时间差平均值ΔT
2;
Similarly, obtain multiple t 3 , and then obtain multiple Δt 2 , and finally obtain the corresponding first time difference average value ΔT 2 ;
最后,根据ΔT
1以及ΔT
2,获得源端待调整时间差平均值ΔT
a;
Finally, according to ΔT 1 and ΔT 2 , the average value ΔT a of the time difference to be adjusted at the source end is obtained;
根据ΔT
a,利用时间戳矫正算法进行时间误差调整;
According to ΔT a , the time error correction algorithm is used to adjust the time error;
从而减小在数据统计过程中的误差。Thereby reducing the error in the data statistics process.
本发明实施例中的另一种实施方式中,时间差计算单元2,其还用于根据当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差Δt
3;
In another implementation manner in the embodiment of the present invention, the time difference calculation unit 2 is further configured to obtain the third time difference Δt 3 according to the signal time difference corresponding to the current received signal and the corresponding sent signal;
时间差计算单元2,其还用于根据当前接收信号以及对应的经过时间戳矫正算法处理后的发出信号对应的信号时间差,获得对应的第四时间差Δt
4;
The time difference calculation unit 2 is further configured to obtain the corresponding fourth time difference Δt 4 according to the signal time difference corresponding to the current received signal and the corresponding transmitted signal processed by the time stamp correction algorithm;
调整信息发布单元3,其还用于根据Δt
3以及Δt
4,获得宿端待调整时间差值Δt
b;
The adjustment information issuing unit 3 is further configured to obtain the time difference Δt b of the sink to be adjusted according to Δt 3 and Δt 4 ;
时间误差调整单元4,其还用于根据宿端待调整时间差值Δt
b,利用时间戳矫正算法进行时间误差调整。
The time error adjustment unit 4 is also used to adjust the time error according to the time difference Δt b to be adjusted at the sink end by using a timestamp correction algorithm.
同理,与源端调整流程类似,当需要对宿端节点进行检测时,宿端调整流程中:Similarly, similar to the source adjustment process, when the sink node needs to be detected, the sink adjustment process:
本发明实施例中,首先,记录宿端的接收信号对应的时间点,记作t
4,记录源端接收与发出信号对应的接收信号的时间点,记作t
5,根据t
4以及t
5,获得与发出信号对应的第一时间差Δt
3,即Δt
3=t
4-t
5;
In the embodiment of the present invention, first, the time point corresponding to the received signal of the sink is recorded as t 4 , and the time point at which the source end receives the received signal corresponding to the transmitted signal is recorded as t 5 , according to t 4 and t 5 , Obtain the first time difference Δt 3 corresponding to the sent signal, that is, Δt 3 =t 4 -t 5 ;
进而,记录宿端对应的接收经过时间戳矫正算法处理后的与发出信号的时间点,记作t
6,根据t
4以及t
6,获得与当前发出信号对应的第二时间差Δt
4,即Δt
4=t
4-t
6;
Furthermore, the time point of receiving and sending the signal corresponding to the recording sink after the time stamp correction algorithm is processed is recorded as t 6 , and according to t 4 and t 6 , the second time difference Δt 4 corresponding to the current sent signal is obtained, that is, Δt 4 = t 4 -t 6 ;
进而,根据Δt
3以及Δt
5,利用Δt
3与Δt
4的时间差来获得源端待调整时间差Δt
b;
Furthermore, according to Δt 3 and Δt 5 , the time difference between Δt 3 and Δt 4 is used to obtain the source end to-be-adjusted time difference Δt b ;
最后,当源端待调整时间差Δt
b超出预设的许可范围时,则表示此前进行时间误差调整,仍存在静态误差需要调整,此时,再次利用时间戳矫正算法进行时间误差调整。
Finally, when the time difference Δt b at the source end to be adjusted exceeds the preset allowable range, it means that the time error adjustment was performed before, and there is still a static error that needs to be adjusted. At this time, the time error correction algorithm is again used to adjust the time error.
其中,Δt
3以及Δt
4的差值,由于,即Δt
3=t
4-t
5,而Δt
5=t
4-t
6,故而Δt
b=Δt
3-Δt
4,即Δt
b=(t
4-t5
2)-(t
4-t
6)=t
6-t
5;
Among them, the difference between Δt 3 and Δt 4 , because Δt 3 =t 4 -t 5 , and Δt 5 =t 4 -t 6 , so Δt b =Δt 3 -Δt 4 , that is, Δt b =(t 4 -t5 2 )-(t 4 -t 6 )=t 6 -t 5 ;
最后,根据Δt
b,利用时间戳矫正算法进行时间误差调整。
Finally, according to Δt b , the time error correction algorithm is used to adjust the time error.
本发明实施例中的另一种实施方式中,时间差计算单元2,其还用于根据多个当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差平均值ΔT
3;
In another implementation manner in the embodiment of the present invention, the time difference calculation unit 2 is further configured to obtain the third time difference average value ΔT 3 according to the signal time difference corresponding to the multiple currently received signals and the corresponding sent signals;
时间差计算单元2,其还用于根据多个当前接收信号以及对应的经过时间戳矫正算法处理后的发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT
4;
The time difference calculation unit 2 is further configured to obtain the corresponding fourth time difference average value ΔT 4 according to the multiple current received signals and the corresponding signal time differences corresponding to the sent signals processed by the timestamp correction algorithm;
调整信息发布单元3,其还用于根据ΔT
3以及ΔT
4,获得宿端待调整时间差平均值ΔT
b;
The adjustment information issuing unit 3 is further configured to obtain the average value ΔT b of the time difference to be adjusted at the sink according to ΔT 3 and ΔT 4 ;
时间误差调整单元4,其还用于根据宿端待调整时间差平均值ΔT
b,利用时间戳矫正算法进行时间误差调整。
The time error adjustment unit 4 is further configured to adjust the time error by using the time stamp correction algorithm according to the average value ΔT b of the time difference to be adjusted at the sink.
本发明实施例中,为了减小计算误差,需要对多个发出信号进行计算,获得多个t
4以及t
5,进而获得多个Δt
3,最后获得对应的第一时间差平均值ΔT
3;
In the embodiment of the present invention, in order to reduce the calculation error, it is necessary to calculate multiple sent signals, obtain multiple t 4 and t 5 , and then obtain multiple Δt 3 , and finally obtain the corresponding first time difference average value ΔT 3 ;
同样,获得多个t
6,进而获得多个Δt
4,最后获得对应的第一时间差平均值ΔT
4;
Similarly, obtain multiple t 6 , and then obtain multiple Δt 4 , and finally obtain the corresponding first time difference average value ΔT 4 ;
最后,根据ΔT
3以及ΔT
4,获得源端待调整时间差平均值ΔT
b;
Finally, according to ΔT 3 and ΔT 4 , obtain the average value ΔT b of the time difference to be adjusted at the source end;
根据ΔT
b,利用时间戳矫正算法进行时间误差调整;
According to ΔT b , the time error correction algorithm is used to adjust the time error;
从而减小在数据统计过程中的误差。Thereby reducing the error in the data statistics process.
本发明实施例中的另一种实施方式中,调整信息发布单元3,其还用于将Δt
a与预设的调整误差阈值进行比对,当Δt
a超过调整误差阈值时,发布调整指令;
In another implementation of the embodiment of the present invention, the adjustment information issuing unit 3 is further configured to compare Δt a with a preset adjustment error threshold, and when Δt a exceeds the adjustment error threshold, issue an adjustment instruction;
需要说明的是,同样的,也会将Δt
b、ΔT
a以及ΔT
b预设的调整 误差阈值进行比对,进而判断是否需要进行时间误差调整。
It should be noted that in the same way, the preset adjustment error thresholds of Δt b , ΔT a and ΔT b will be compared to determine whether time error adjustment is required.
基于同一发明构思,本申请提供了实施例一对应的存储介质的实施例,详见实施例三Based on the same inventive concept, this application provides an embodiment of a storage medium corresponding to Embodiment 1. For details, see Embodiment 3.
实施例三Example three
本发明第三实施例提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现第一实施例中的所有方法步骤或部分方法步骤。The third embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the method steps in the first embodiment are implemented.
本发明实现上述第一实施例中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The present invention implements all or part of the process in the above-mentioned first embodiment, and it can also be completed by instructing relevant hardware by a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, , The steps of the above-mentioned method embodiments can be realized. Among them, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access Memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, software distribution medium, etc. It should be noted that the content contained in computer-readable media can be appropriately added or deleted in accordance with the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, computer-readable media does not include Electric carrier signal and telecommunications signal.
基于同一发明构思,本申请提供了实施例一对应的设备的实施例,详见实施例四Based on the same inventive concept, this application provides an embodiment of the device corresponding to Embodiment 1. For details, see Embodiment 4.
实施例四Example four
本发明第四实施例还提供一种设备,包括存储器和处理器,存储 器上储存有在处理器上运行的计算机程序,处理器执行计算机程序时实现第一实施例中的所有方法步骤或部分方法步骤。The fourth embodiment of the present invention also provides a device, including a memory and a processor, and a computer program running on the processor is stored in the memory. When the processor executes the computer program, all the method steps or part of the method in the first embodiment are implemented. step.
所称处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,处理器是计算机装置的控制中心,利用各种接口和线路连接整个计算机装置的各个部分。The so-called processor can be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
存储器可用于存储计算机程序和/或模块,处理器通过运行或执行存储在存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现计算机装置的各种功能。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、视频数据等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory may be used to store computer programs and/or modules, and the processor implements various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, where the storage program area can store the operating system, at least one application program required by the function (such as sound playback function, image playback function, etc.), etc.; the storage data area can be stored according to the mobile phone Use the created data (such as audio data, video data, etc.) and so on. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards. , Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、服务器或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的 计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, a server, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施例的方法、设备(系统)、服务器和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), servers, and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims (10)
- 一种用于时间同步的误差调整方法,所述方法包括源端调整流程,所述源端调整流程包括以下步骤:An error adjustment method for time synchronization, the method includes a source-end adjustment process, and the source-end adjustment process includes the following steps:根据发出信号以及反馈的接收信号的信号时间差,获得第一时间差Δt 1; Obtain the first time difference Δt 1 according to the signal time difference between the transmitted signal and the feedback received signal;根据所述当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得第二时间差Δt 2; Obtain the second time difference Δt 2 according to the signal time difference between the currently sent signal and the feedback received signal processed by the timestamp correction algorithm;根据所述Δt 1以及所述Δt 2,获得源端待调整时间差值Δt a; According to the Δt 1 and the Δt 2 , obtain the source end to-be-adjusted time difference Δt a ;根据所述Δt a,利用所述时间戳矫正算法进行时间误差调整。 According to the Δt a , the time error correction algorithm is used to adjust the time error.
- 如权利要求1所述的方法,其特征在于,所述源端调整流程还包括以下步骤:The method according to claim 1, wherein the source adjustment process further comprises the following steps:根据多个所述发出信号以及反馈的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT 1; Obtain the corresponding first time difference average value ΔT 1 according to the signal time difference of the multiple of the sent signals and the feedback of the current received signal;根据多个所述当前发出信号以及反馈的经过时间戳矫正算法处理后的接收信号的信号时间差,获得对应的第一时间差平均值ΔT 2; Obtain the corresponding first time difference average value ΔT 2 according to the signal time differences of the plurality of currently sent signals and the feedback received signals processed by the timestamp correction algorithm;根据所述ΔT 1以及所述ΔT 2,获得源端待调整时间差平均值ΔT a; According to the ΔT 1 and the ΔT 2 , obtain the average value ΔT a of the time difference to be adjusted at the source end;根据所述ΔT a,利用所述时间戳矫正算法进行时间误差调整。 According to the ΔT a , the time error correction algorithm is used to adjust the time error.
- 如权利要求1所述的方法,其特征在于,所述方法包括宿端调整流程,所述宿端调整流程包括以下步骤:The method according to claim 1, wherein the method comprises a sink end adjustment process, and the sink end adjustment process comprises the following steps:根据接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差Δt 3; Obtain the third time difference Δt 3 according to the signal time difference corresponding to the received signal and the feedback sent signal;根据接收信号以及反馈的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差Δt 4; Obtain the corresponding fourth time difference Δt 4 according to the received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm and fed back;根据所述Δt 3以及所述Δt 4,获得宿端待调整时间差值Δt b; According to the Δt 3 and the Δt 4 , obtain the time difference Δt b of the sink to be adjusted;根据所述Δt b,利用所述时间戳矫正算法进行时间误差调整。 According to the Δt b , the time error correction algorithm is used to adjust the time error.
- 如权利要求3所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 3, wherein the method further comprises the following steps:根据多个接收信号以及反馈的发出信号对应的信号时间差,获得第三时间差平均值ΔT 3; Obtain the third time difference average value ΔT 3 according to the signal time differences corresponding to the multiple received signals and the feedback transmitted signals;根据多个接收信号以及反馈的经过时间戳矫正算法处理后的发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT 4; Obtain the corresponding fourth time difference average value ΔT 4 according to the multiple received signals and the signal time difference corresponding to the sent signal after being processed by the time stamp correction algorithm.根据所述ΔT 3以及所述ΔT 4,获得宿端待调整时间差平均值ΔT b; According to the ΔT 3 and the ΔT 4 , obtain the average value ΔT b of the time difference to be adjusted at the sink end;根据所述ΔT b,利用所述时间戳矫正算法进行时间误差调整。 According to the ΔT b , the time-stamp correction algorithm is used to adjust the time error.
- 如权利要求1所述的方法,其特征在于,所述根据所述Δt a,利用所述时间戳矫正算法进行时间误差调整中,具体包括以下步骤: 5. The method according to claim 1, wherein said using said time stamp correction algorithm to adjust time error according to said Δt a specifically includes the following steps:将所述Δt a与预设的调整误差阈值进行比对; Comparing the Δt a with a preset adjustment error threshold;当所述Δt a超过调整误差阈值时,利用所述时间戳矫正算法进行时间误差调整中; When the Δt a exceeds the adjustment error threshold, the time error correction algorithm is being used to adjust the time error;当所述Δt a未超过调整误差阈值时,终止所述源端调整流程。 When the Δt a does not exceed the adjustment error threshold, the source adjustment process is terminated.
- 一种用于时间同步的误差调整系统,所述系统包括:An error adjustment system for time synchronization, the system comprising:时间点获取单元,其用于获取源端中当前发出信号的时间点以及对应的当前接收信号的时间点,还用于获取宿端中当前接收信号的时间点以及对应的当前发出信号的时间点;The time point acquisition unit, which is used to acquire the time point of the current signal sent out in the source and the corresponding time point of the current signal reception, and is also used to acquire the time point of the current signal reception in the sink and the corresponding time point of the signal currently sent out ;时间差计算单元,其用于根据当前发出信号以及对应的当前接收信号的信号时间差,获得第一时间差Δt 1,根据所述当前发出信号以及对应的经过时间戳矫正算法处理后的当前接收信号的信号时间差,获得第二时间差Δt 2; Time difference calculation unit, which is used to obtain the first time difference Δt 1 according to the signal time difference between the current sent signal and the corresponding current received signal, and the signal of the current received signal processed by the corresponding time stamp correction algorithm according to the current sent signal Time difference, obtain the second time difference Δt 2 ;调整信息发布单元,其用于根据所述Δt 1以及所述Δt 2的差值, 获得源端待调整时间差值Δt a; An adjustment information release unit, which is used to obtain the source end to-be-adjusted time difference Δt a according to the difference between the Δt 1 and the Δt 2 ;时间误差调整单元,其用于根据所述源端待调整时间差值Δt a,利用所述时间戳矫正算法进行时间误差调整。 The time error adjustment unit is configured to use the time stamp correction algorithm to adjust the time error according to the time difference Δt a to be adjusted at the source end.
- 如权利要求6所述的系统,其特征在于:The system of claim 6, wherein:所述时间差计算单元,其还用于根据多个所述当前发出信号以及对应的当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT 1; The time difference calculation unit is further configured to obtain the corresponding first time difference average value ΔT 1 according to the signal time difference between a plurality of the currently sent signals and the corresponding current received signals;所述时间差计算单元,其还用于根据多个所述当前发出信号以及对应的经过时间戳矫正算法处理后的所述当前接收信号的信号时间差,获得对应的第一时间差平均值ΔT 2; The time difference calculation unit is further configured to obtain a corresponding first time difference average value ΔT 2 according to a plurality of currently sent signals and corresponding signal time differences of the currently received signal processed by a timestamp correction algorithm;所述调整信息发布单元,其还用于根据所述ΔT 1以及所述ΔT 2,获得源端待调整时间差平均值ΔT a; The adjustment information release unit is further configured to obtain the average value ΔT a of the source end to be adjusted time difference according to the ΔT 1 and the ΔT 2 ;所述时间误差调整单元,其还用于根据所述源端待调整时间差平均值ΔT a,利用所述时间戳矫正算法进行时间误差调整。 The time error adjustment unit is further configured to use the time stamp correction algorithm to adjust the time error according to the average value ΔT a of the time difference to be adjusted at the source end.
- 如权利要求6所述的系统,其特征在于:The system of claim 6, wherein:所述时间差计算单元,其还用于根据当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差Δt 3; The time difference calculation unit is further configured to obtain a third time difference Δt 3 according to the signal time difference corresponding to the current received signal and the corresponding sent signal;所述时间差计算单元,其还用于根据当前接收信号以及对应的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差Δt 4; The time difference calculation unit is further configured to obtain the corresponding fourth time difference Δt 4 according to the current received signal and the signal time difference corresponding to the sent signal processed by the time stamp correction algorithm;所述调整信息发布单元,其还用于根据所述Δt 3以及所述Δt 4,获得宿端待调整时间差值Δt b; The adjustment information issuing unit is further configured to obtain the time difference Δt b of the sink to be adjusted according to the Δt 3 and the Δt 4 ;所述时间误差调整单元,其还用于根据所述宿端待调整时间差值Δt b,利用所述时间戳矫正算法进行时间误差调整。 The time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the time difference Δt b to be adjusted at the sink end.
- 如权利要求8所述的系统,其特征在于:The system of claim 8, wherein:所述时间差计算单元,其还用于根据多个所述当前接收信号以及对应的发出信号对应的信号时间差,获得第三时间差平均值ΔT 3; The time difference calculation unit is further configured to obtain a third time difference average value ΔT 3 according to the signal time difference corresponding to a plurality of the currently received signals and the corresponding sent signals;所述时间差计算单元,其还用于根据多个当前接收信号以及对应的经过时间戳矫正算法处理后的所述发出信号对应的信号时间差,获得对应的第四时间差平均值ΔT 4; The time difference calculation unit is further configured to obtain a corresponding fourth time difference average value ΔT 4 according to a plurality of currently received signals and corresponding signal time differences corresponding to the sent signals processed by the timestamp correction algorithm;所述调整信息发布单元,其还用于根据所述ΔT 3以及所述ΔT 4,获得宿端待调整时间差平均值ΔT b; The adjustment information issuing unit is further configured to obtain the average value ΔT b of the time difference to be adjusted at the sink end according to the ΔT 3 and the ΔT 4 ;所述时间误差调整单元,其还用于根据所述宿端待调整时间差平均值ΔT b,利用所述时间戳矫正算法进行时间误差调整。 The time error adjustment unit is further configured to use the timestamp correction algorithm to adjust the time error according to the average value ΔT b of the time difference to be adjusted at the sink.
- 如权利要求6所述的系统,其特征在于:The system of claim 6, wherein:所述调整信息发布单元,其还用于将所述Δt a与预设的调整误差阈值进行比对,当所述Δt a超过调整误差阈值时,发布调整指令。 The adjustment information issuing unit is further configured to compare the Δt a with a preset adjustment error threshold, and when the Δt a exceeds the adjustment error threshold, issue an adjustment instruction.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010231354.2 | 2020-03-27 | ||
CN202010231354.2A CN111478744B (en) | 2020-03-27 | 2020-03-27 | Error adjusting method and system for time synchronization |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021190080A1 true WO2021190080A1 (en) | 2021-09-30 |
Family
ID=71748422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/070738 WO2021190080A1 (en) | 2020-03-27 | 2021-01-08 | Error adjustment method and system for time synchronization |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN111478744B (en) |
EC (1) | ECSP22068268A (en) |
WO (1) | WO2021190080A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111478744B (en) * | 2020-03-27 | 2022-02-08 | 烽火通信科技股份有限公司 | Error adjusting method and system for time synchronization |
CN112383379B (en) * | 2020-10-29 | 2022-05-20 | 南昌大学 | Method and device for calculating node time error of wireless information system |
CN114745774B (en) * | 2022-03-16 | 2023-05-12 | 烽火通信科技股份有限公司 | Centralized time synchronization method, device, equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101958745A (en) * | 2009-07-20 | 2011-01-26 | 华为技术有限公司 | Method, device and system for realizing time synchronization |
CN104602141A (en) * | 2015-01-16 | 2015-05-06 | 深圳市中兴微电子技术有限公司 | Method, device and system for synchronizing time in OTN (Open Transport Network) |
US9912426B1 (en) * | 2012-11-09 | 2018-03-06 | Marvell Israel (M.I.S.L) Ltd. | Time correction using extension fields |
CN109787703A (en) * | 2019-02-28 | 2019-05-21 | 烽火通信科技股份有限公司 | A kind of modification method of timestamp, clock synchronizing method and system |
CN111478744A (en) * | 2020-03-27 | 2020-07-31 | 烽火通信科技股份有限公司 | Error adjusting method and system for time synchronization |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3846578B2 (en) * | 2002-07-30 | 2006-11-15 | ソニー株式会社 | Information processing apparatus and method, recording medium, and program |
JP2006236251A (en) * | 2005-02-28 | 2006-09-07 | Fujitsu Ltd | Time stamp device, time calibration method and time calibration program |
-
2020
- 2020-03-27 CN CN202010231354.2A patent/CN111478744B/en active Active
-
2021
- 2021-01-08 WO PCT/CN2021/070738 patent/WO2021190080A1/en active Application Filing
-
2022
- 2022-09-01 EC ECSENADI202268268A patent/ECSP22068268A/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101958745A (en) * | 2009-07-20 | 2011-01-26 | 华为技术有限公司 | Method, device and system for realizing time synchronization |
US9912426B1 (en) * | 2012-11-09 | 2018-03-06 | Marvell Israel (M.I.S.L) Ltd. | Time correction using extension fields |
CN104602141A (en) * | 2015-01-16 | 2015-05-06 | 深圳市中兴微电子技术有限公司 | Method, device and system for synchronizing time in OTN (Open Transport Network) |
CN109787703A (en) * | 2019-02-28 | 2019-05-21 | 烽火通信科技股份有限公司 | A kind of modification method of timestamp, clock synchronizing method and system |
CN111478744A (en) * | 2020-03-27 | 2020-07-31 | 烽火通信科技股份有限公司 | Error adjusting method and system for time synchronization |
Also Published As
Publication number | Publication date |
---|---|
CN111478744B (en) | 2022-02-08 |
CN111478744A (en) | 2020-07-31 |
ECSP22068268A (en) | 2022-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021190080A1 (en) | Error adjustment method and system for time synchronization | |
US11223439B1 (en) | Maintaining a time of day in a physical layer circuit including compensating for drift away from a grandmaster time | |
US9338208B2 (en) | Common event-based multidevice media playback | |
US8762580B2 (en) | Common event-based multidevice media playback | |
US8824511B2 (en) | Clock synchronization system, node, clock synchronization method, and program | |
EP1931084A1 (en) | A method for getting the link estimating parameters | |
US11552721B2 (en) | Clock synchronization method and apparatus | |
US11552871B2 (en) | Receive-side timestamp accuracy | |
CN112804078B (en) | Bandwidth adjustment method, service transmission method, network device and readable storage medium | |
US20050265270A1 (en) | Radio communication system using timeout control with flexible timeout interval setting | |
JP2022547891A (en) | Method, apparatus and system for selecting clock source and storage medium | |
CN114172604A (en) | Time delay compensation method, device, equipment and computer readable storage medium | |
US20230300051A1 (en) | In-band Edge-to-Edge Round-Trip Time Measurement | |
US20220286989A1 (en) | Method and Network Device for Locating Clock Fault | |
EP4064589A1 (en) | Ethernet time synchronization method and apparatus | |
US20100074254A1 (en) | Communication system, transmitting apparatus, receiving apparatus, communication method, and record medium | |
US20220021513A1 (en) | Delay jitter compensation method and device, and computer storage medium | |
CN116260539A (en) | Audio data synchronization method, digital broadcasting system and electronic equipment | |
WO2020155738A1 (en) | Clock distribution method and apparatus in network | |
WO2019134607A1 (en) | Information processing method and device, communication apparatus, and computer readable storage medium | |
US11995375B2 (en) | Audio stream switching method and apparatus | |
CN118400795B (en) | Communication equipment synchronization method and device | |
WO2013064905A1 (en) | Services, systems and methods for precisely estimating a delay within a network | |
WO2023203772A1 (en) | Device translator, communication system, communication method, and communication program | |
CN115499342A (en) | Time delay calculation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21774726 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21774726 Country of ref document: EP Kind code of ref document: A1 |