CN102136901A - Time synchronization method, device and system - Google Patents
Time synchronization method, device and system Download PDFInfo
- Publication number
- CN102136901A CN102136901A CN2010105197130A CN201010519713A CN102136901A CN 102136901 A CN102136901 A CN 102136901A CN 2010105197130 A CN2010105197130 A CN 2010105197130A CN 201010519713 A CN201010519713 A CN 201010519713A CN 102136901 A CN102136901 A CN 102136901A
- Authority
- CN
- China
- Prior art keywords
- time information
- sending
- receiving
- time
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
本发明实施例公开了一种时间同步方法、装置及系统,涉及通信领域。为提供实现高精度时间同步的xDSL技术,满足移动业务的需要,本发明实施例提供的技术方案如下:当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,获取本地的DTU deframer接收第一检测数据发送单元的检测比特时的第一接收时间信息;获取本地的DTUframer发送第二检测数据发送单元的检测比特时的第二发送时间信息;获取发送端的DTU deframer发送第一检测数据发送单元的检测比特时的第一发送时间信息和接收第二检测数据发送单元的检测比特时的第二接收时间信息;根据第一、第二发送时间信息和第一、第二接收时间信息进行时间调整,使得本地时钟和发送端的时钟达到时间同步。
The embodiment of the invention discloses a time synchronization method, device and system, and relates to the communication field. In order to provide the xDSL technology that realizes high-precision time synchronization and meet the needs of mobile services, the technical solution provided by the embodiment of the present invention is as follows: when the uplink and downlink delays between the PMD layer of the receiving end and the PMD layer of the sending end are equal, the local The first receiving time information when the DTU deframer receives the detection bits of the first detection data transmission unit; the second transmission time information when the local DTU framer sends the detection bits of the second detection data transmission unit; The first transmission time information when detecting the detection bit of the data transmission unit and the second reception time information when receiving the detection bit of the second detection data transmission unit; according to the first and second transmission time information and the first and second reception time The time of the information is adjusted so that the local clock and the clock of the sending end achieve time synchronization.
Description
技术领域technical field
本发明涉及通信领域,尤其涉及一种时间同步方法、装置及系统。The present invention relates to the communication field, in particular to a time synchronization method, device and system.
背景技术Background technique
随着无线技术的发展,第三代移动通信以及LTE(Long Term Evolution,长期演进)的逐渐商用,移动基站逐渐向高密度布放、高带宽、低成本的方向发展。从而,要求将宽带接入技术应用到移动承载网络中。以降低移动承载网络的成本。与此同时,宽带接入技术需要提供高精度的时钟传递,即高精度的频率同步和高精度的时间同步,以满足移动业务的需要。With the development of wireless technology, the gradual commercialization of third-generation mobile communications and LTE (Long Term Evolution, Long Term Evolution), mobile base stations are gradually developing in the direction of high-density deployment, high bandwidth, and low cost. Therefore, it is required to apply the broadband access technology to the mobile bearer network. In order to reduce the cost of the mobile bearer network. At the same time, broadband access technology needs to provide high-precision clock transmission, that is, high-precision frequency synchronization and high-precision time synchronization, so as to meet the needs of mobile services.
xDSL(Digital subscriber line,数字用户系统)技术是目前布放最为广泛的接入技术,将其应用到移动承载网络中,可以作为移动承载网络低成本化的一种解决方案。目前,xDSL技术已提供了NTR(Network Time Reference,网络时钟参考)方案,可满足移动业务对高精度频率同步的要求。xDSL (Digital subscriber line, digital subscriber system) technology is the most widely deployed access technology at present, and it can be used as a solution to reduce the cost of mobile bearer network when it is applied to mobile bearer network. At present, xDSL technology has provided NTR (Network Time Reference, network clock reference) solution, which can meet the requirements of high-precision frequency synchronization for mobile services.
在时间同步方面,由于现有的xDSL系统,其物理层的上下行时延是不相等的(即不具有对称性),不能满足PTP(Precision Time Protocol,时间同步协议)方案对物理层上下行时延对称的要求。因此,现有的xDSL系统无法采用PTP实现高精度的时间同步。另外,现有的以太网系统是利用同步脉冲信号来进行时间同步的,但对以符号为单位连续传输的通带传输系统(如DMT(Discrete Multi Tone,离散多音频)系统、OFDM(Orthogonal Frequency Division Multiplexing,正交频分复用)系统等)来说,相邻符号间没有明显的界限,因此,现有的xDSL系统很难使用以太网接入系统所采用的方式实现高精度的时间同步。In terms of time synchronization, due to the existing xDSL system, the uplink and downlink delays of the physical layer are not equal (that is, not symmetrical), and cannot meet the PTP (Precision Time Protocol, time synchronization protocol) scheme for the uplink and downlink of the physical layer. Delay symmetry requirements. Therefore, the existing xDSL system cannot adopt PTP to realize high-precision time synchronization. In addition, the existing Ethernet system uses synchronous pulse signals for time synchronization. Division Multiplexing, Orthogonal Frequency Division Multiplexing (OFDM) systems, etc.), there is no clear boundary between adjacent symbols. Therefore, it is difficult for existing xDSL systems to achieve high-precision time synchronization using the method used by Ethernet access systems. .
在实现本发明的过程中,发明人发现现有技术中至少存在如下问题:现有的xDSL系统无法提供高精度的时间同步,以满足移动业务的需要。In the process of realizing the present invention, the inventors found that there are at least the following problems in the prior art: the existing xDSL system cannot provide high-precision time synchronization to meet the needs of mobile services.
发明内容Contents of the invention
本发明的实施例提供一种时间同步方法、装置及系统,能够提供实现高精度时间同步的xDSL技术,以满足移动业务的需要。Embodiments of the present invention provide a time synchronization method, device and system, which can provide xDSL technology for high-precision time synchronization to meet the needs of mobile services.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
一种时间同步方法,包括:A time synchronization method comprising:
当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,在接收所述发送端发送的第一检测数据发送单元时,获取第一接收时间信息,所述第一接收时间信息为所述接收端的DTU deframer接收所述第一检测数据发送单元的检测比特时的时间信息;When the uplink and downlink time delays between the PMD layer of the receiving end and the PMD layer of the sending end are equal, when receiving the first detection data sending unit sent by the sending end, the first receiving time information is obtained, and the first receiving time information Time information when the DTU deframer at the receiving end receives the detection bits of the first detection data transmission unit;
在向所述发送端发送第二检测数据发送单元时,获取第二发送时间信息,所述第二发送时间信息为所述接收端的DTU framer发送所述第二检测数据发送单元的检测比特时的时间信息;When sending the second detection data sending unit to the sending end, the second sending time information is obtained, and the second sending time information is when the DTU framer of the receiving end sends the detection bit of the second detection data sending unit time information;
接收所述发送端发送的第一发送时间信息和第二接收时间信息,所述第一发送时间信息为所述发送端的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息,所述第二接收时间信息为所述发送端的DTU deframer接收所述第二检测数据发送单元的检测比特时的时间信息;Receive the first sending time information and the second receiving time information sent by the sending end, the first sending time information is the time information when the DTU framer of the sending end sends the detection bits of the first detection data sending unit, The second receiving time information is the time information when the DTU deframer at the sending end receives the detection bits of the second detection data transmission unit;
根据所述第一发送时间信息,所述第一接收时间信息,所述第二发送时间信息和所述第二接收时间信息进行时间调整,使得所述接收端的时钟与所述发送端的时钟达到时间同步。Perform time adjustment according to the first sending time information, the first receiving time information, the second sending time information and the second receiving time information, so that the clock of the receiving end and the clock of the sending end reach the same time Synchronize.
一种时间同步装置,包括:A time synchronization device comprising:
数据发送单元解析帧模块,用于接收发送端发送的第一检测数据发送单元;或者,接收所述发送端发送的第一发送时间信息和第二接收时间信息,所述第一发送时间信息为所述发送端的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息,所述第二接收时间信息为所述发送端的DTU deframer接收所述第二检测数据发送单元的检测比特时的时间信息;The data sending unit parses the frame module, configured to receive the first detection data sending unit sent by the sending end; or receive the first sending time information and the second receiving time information sent by the sending end, the first sending time information is The time information when the DTU framer at the sending end sends the detection bits of the first detection data sending unit, and the second receiving time information is when the DTU deframer at the sending end receives the detection bits of the second detection data sending unit time information;
数据发送单元成帧模块,用于生成第二检测数据发送单元,并向所述发送端发送所述第二检测数据发送单元;A data sending unit framing module, configured to generate a second detection data sending unit, and send the second detection data sending unit to the sending end;
时钟获取模块,用于获取第一接收时间信息,所述第一接收时间信息为所述数据发送单元解析帧模块接收所述第一检测数据发送单元的检测比特时的时间信息;或者,获取第二发送时间信息,所述第二发送时间信息为所述数据发送单元成帧模块发送所述第二检测数据发送单元的检测比特时的时间信息;The clock acquisition module is used to acquire the first receiving time information, the first receiving time information is the time information when the data sending unit parses the frame module to receive the detection bit of the first detection data sending unit; or, acquire the second 2. Sending time information, the second sending time information is the time information when the framing module of the data sending unit sends the detection bits of the second detection data sending unit;
纠正模块,用于当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,根据所述时钟获取模块获取的第一接收时间信息和第二发送时间信息,所述数据发送单元解析帧模块获取的第一发送时间信息和第二接收时间信息进行时间调整,使得所述接收端的时钟与所述发送端的时钟达到时间同步。Correction module, for when the uplink and downlink delays between the PMD layer of the receiving end and the PMD layer of the sending end are equal, according to the first receiving time information and the second sending time information obtained by the clock acquisition module, the data sending unit Time adjustment is performed on the first sending time information and the second receiving time information obtained by the frame parsing module, so that the clock of the receiving end is synchronized with the clock of the sending end.
一种时间同步装置,包括:A time synchronization device comprising:
数据发送单元成帧模块,用于向接收端发送第一检测数据发送单元,并向所述接收端发送时钟获取模块获取的第一发送时间信息和第二接收时间信息;The data sending unit framing module is used to send the first detection data sending unit to the receiving end, and send the first sending time information and the second receiving time information acquired by the clock acquisition module to the receiving end;
数据发送单元解析帧模块,用于接收所述接收端发送的第二检测数据发送单元;The data sending unit parses the frame module, which is used to receive the second detection data sending unit sent by the receiving end;
时钟获取模块,用于获取第一发送时间信息,所述第一发送时间信息为所述数据发送单元成帧模块发送所述第一检测数据发送单元的检测比特时的时间信息;或者,获取第二接收时间信息,所述第二接收时间信息为所述数据发送单元解析帧模块接收所述第二检测数据发送单元的检测比特时的时间信息。A clock acquiring module, configured to acquire first sending time information, where the first sending time information is the time information when the data sending unit framing module sends the detection bits of the first detected data sending unit; or, acquire the second 2. Receiving time information, where the second receiving time information is the time information when the frame analysis module of the data sending unit receives the detection bits of the second detection data sending unit.
一种时间同步系统,包括发送端和接收端;A time synchronization system, including a sending end and a receiving end;
所述发送端,用于当所述发送端的PMD层与所述接收端的PMD层之间的上下行时延相等时,在向所述接收端发送第一检测数据发送单元时,获取第一发送时间信息,所述第一发送时间信息为所述发送端的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息;在接收所述接收端发送的第二检测数据发送单元时,获取第二接收时间信息,所述第二接收时间信息为所述发送端的DTU deframer接收所述第二检测数据发送单元的检测比特时的时间信息;向所述接收端发送所述第一发送时间信息和所述第二接收时间信息;The sending end is configured to obtain the first transmission when sending the first detection data sending unit to the receiving end when the uplink and downlink delays between the PMD layer of the sending end and the PMD layer of the receiving end are equal. Time information, the first sending time information is the time information when the DTU framer of the sending end sends the detection bit of the first detection data transmission unit; when receiving the second detection data transmission unit sent by the receiving end, Acquire the second receiving time information, the second receiving time information is the time information when the DTU deframer of the sending end receives the detection bits of the second detection data sending unit; send the first sending time to the receiving end information and said second receiving time information;
所述接收端,用于在接收所述发送端发送的第一检测数据发送单元时,获取第一接收时间信息,所述第一接收时间信息为所述接收端的DTU deframer接收所述第一检测数据发送单元的检测比特时的时间信息;在向所述发送端发送第二检测数据发送单元时,获取第二发送时间信息,所述第二发送时间信息为所述接收端的DTU framer发送所述第二检测数据发送单元的检测比特时的时间信息;接收所述发送端发送的第一发送时间信息和第二接收时间信息;根据所述第一发送时间信息,所述第一接收时间信息,所述第二发送时间信息和所述第二接收时间信息进行时间调整,使得所述接收端的时钟与所述发送端的时钟达到时间同步。The receiving end is configured to obtain first receiving time information when receiving the first detection data sending unit sent by the sending end, and the first receiving time information is that the DTU deframer of the receiving end receives the first detection The time information when the detection bit of the data sending unit; When sending the second detection data sending unit to the sending end, obtain the second sending time information, and the second sending time information is that the DTU framer of the receiving end sends the described The time information when detecting the bit of the second detection data sending unit; receiving the first sending time information and the second receiving time information sent by the sending end; according to the first sending time information, the first receiving time information, Time adjustment is performed on the second sending time information and the second receiving time information, so that the clock of the receiving end is time-synchronized with the clock of the sending end.
本发明实施例提供的时间同步方法、装置及系统,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,发送端将DTUframer发送第一检测数据发送单元的检测比特时获取的第一发送时间信息通知给接收端,接收端的DTU deframer在接收该第一检测数据发送单元的检测比特时获取第一接收时间信息;并且,接收端获取DTU framer发送第二检测数据发送单元的检测比特时的第二发送时间信息,发送端将DTU deframer接收第二检测数据发送单元的检测比特时获取的第二接收时间信息通知给接收端;然后,接收端根据第一发送时间信息,第一接收时间信息,第二发送时间信息和第二接收时间信息进行时间调整,使得接收端的时钟与发送端的时钟达到时间同步。因此,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟达到精确的时间同步,满足移动业务对时间同步精度的需要。从而,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization method, device and system provided by the embodiments of the present invention, when the uplink and downlink time delays between the PMD layer of the receiving end and the PMD layer of the sending end are equal, the sending end sends the DTUframer to the detection bit of the first detection data transmission unit The obtained first sending time information is notified to the receiving end, and the DTU deframer of the receiving end obtains the first receiving time information when receiving the detection bit of the first detection data sending unit; and, the receiving end obtains the DTU framer and sends the second detection data sending unit The second sending time information when the detection bit is detected, the sending end notifies the receiving end of the second receiving time information obtained when the DTU deframer receives the detection bit of the second detection data sending unit; then, the receiving end sends the information according to the first sending time, Time adjustment is performed on the first receiving time information, the second sending time information and the second receiving time information, so that the clock at the receiving end is synchronized with the clock at the sending end. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve accurate time synchronization between the clock at the sending end and the clock at the receiving end, meeting the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the drawings that need to be used in the description of the embodiments. Apparently, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings according to these drawings without creative efforts.
图1为本发明实施例提供的一种时间同步方法流程示意图;FIG. 1 is a schematic flowchart of a time synchronization method provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种时间同步方法流程示意图;FIG. 2 is a schematic flowchart of another time synchronization method provided by an embodiment of the present invention;
图3为本发明实施例发送端的PMD层与接收端的PMD层之间的时延示意图;Fig. 3 is the schematic diagram of time delay between the PMD layer of the sending end and the PMD layer of the receiving end according to the embodiment of the present invention;
图4为本发明实施例PMS-TC层功能模型结构图;Fig. 4 is a structural diagram of a PMS-TC layer functional model according to an embodiment of the present invention;
图5为本发明实施例PMS-TC层功能模型结构图;FIG. 5 is a structural diagram of a PMS-TC layer functional model according to an embodiment of the present invention;
图6为本发明实施例数据发送单元的成帧格式示意图;6 is a schematic diagram of a framing format of a data sending unit according to an embodiment of the present invention;
图7为本发明实施例数据发送单元的成帧格式示意图;7 is a schematic diagram of a framing format of a data sending unit according to an embodiment of the present invention;
图8为本发明实施例提供的一种时间同步装置构成示意图;FIG. 8 is a schematic diagram of a time synchronization device provided by an embodiment of the present invention;
图9为本发明实施例提供的另一种时间同步装置构成示意图;FIG. 9 is a schematic diagram of another time synchronization device provided by an embodiment of the present invention;
图10为本发明实施例提供的一种时间同步系统构成示意图。FIG. 10 is a schematic diagram of a time synchronization system provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
为了能够提供实现高精度时间同步的xDSL技术来满足移动业务的需要,本发明实施例提供了一种时间同步方法,如图1所示,包括:In order to provide xDSL technology for high-precision time synchronization to meet the needs of mobile services, an embodiment of the present invention provides a time synchronization method, as shown in Figure 1, including:
101、当接收端的PMD(Physical Media Dependent,物理媒质相关)层与发送端的PMD层之间的上下行时延相等时,接收端在接收发送端所发送的第一检测数据发送单元时,获取第一接收时间信息,所述第一接收时间信息为接收端的DTU deframer接收所述第一检测数据发送单元的检测比特时的时间信息;101. When the uplink and downlink delays between the PMD (Physical Media Dependent) layer of the receiving end and the PMD layer of the sending end are equal, when the receiving end receives the first detection data transmission unit sent by the sending end, obtain the first One receiving time information, the first receiving time information is the time information when the DTU deframer at the receiving end receives the detection bit of the first detection data transmission unit;
举例而言,可以在进行发送端的时钟与接收端的时钟之间的时间同步操作前,获取接收端的PMD层与发送端的PMD层之间的上行时延和下行时延,例如通过测量、量化等方式。当根据所获得的接收端的PMD层与发送端的PMD层之间的上行时延和下行时延,确定接收端的PMD层与发送端的PMD层之间的上下行时延不相等时,可以通过补偿的方式进行调整,使得接收端的PMD层与发送端的PMD层之间的上下行时延相等。For example, the uplink delay and downlink delay between the PMD layer of the receiving end and the PMD layer of the sending end can be obtained before the time synchronization operation between the clock of the sending end and the clock of the receiving end, for example, by means of measurement, quantification, etc. . When it is determined that the uplink and downlink delays between the PMD layer at the receiving end and the PMD layer at the sending end are not equal according to the obtained uplink delay and downlink delay between the PMD layer at the receiving end and the PMD layer at the sending end, you can use the compensated The method is adjusted so that the uplink and downlink delays between the PMD layer at the receiving end and the PMD layer at the sending end are equal.
接收端在接收DTU(Data Transfer Unit,数据发送单元)时,可以根据预定的规则(如DTU的序号或者DTU中的指示标识等)确定该DTU中的规定比特数据是用来进行时间同步的数据。在此,将该DTU称为第一检测数据发送单元,将该规定比特数据称为检测比特,例如第一检测数据发送单元的第一个比特等。接收端在本地的DTUdeframer接收第一检测数据发送单元的检测比特时,获得本地时钟的时间信息,即第一接收时间信息,例如时间戳Ts1。When receiving a DTU (Data Transfer Unit, data sending unit), the receiving end can determine that the specified bit data in the DTU is used for time synchronization according to predetermined rules (such as the serial number of the DTU or the indicator in the DTU, etc.) . Here, the DTU is referred to as a first detection data transmission unit, and the specified bit data is referred to as a detection bit, for example, the first bit of the first detection data transmission unit. When the local DTUdeframer receives the detection bit of the first detection data sending unit, the receiving end obtains the time information of the local clock, that is, the first reception time information, such as the time stamp Ts1.
102、接收端在向所述发送端发送第二检测数据发送单元时,获取第二发送时间信息,所述第二发送时间信息为接收端的DTU framer发送所述第二检测数据发送单元的检测比特时的时间信息;102. The receiving end obtains second sending time information when sending the second detection data sending unit to the sending end, and the second sending time information is the detection bit of the second detecting data sending unit sent by the DTU framer of the receiving end time information;
举例而言,接收端可以根据预先设定的规则,确定发给发送端的某一DTU用来进行时间同步。在此,将该DTU称为第二检测数据发送单元。接收端在本地的DTU framer发送第二检测数据发送单元的规定比特时,获得本地时钟的时间信息,即第二发送时间信息,例如时间戳Ts2。在此,将该规定比特称为检测比特。For example, the receiving end can determine a certain DTU to be sent to the sending end for time synchronization according to preset rules. Here, the DTU is referred to as a second detection data transmission unit. When the local DTU framer sends the specified bits of the second detection data sending unit, the receiving end obtains the time information of the local clock, that is, the second sending time information, such as the time stamp Ts2. Here, this predetermined bit is called a detection bit.
另外,第二检测数据发送单元的检测比特与第一检测数据发送单元的检测比特可以在第一检测数据发送单元和第二检测数据发送单元中相同的位置上,如均是第一检测数据发送单元和第二检测数据发送单元的第一个比特。当然,第二检测数据发送单元的检测比特与第一检测数据发送单元的检测比特也可以分别在第一检测数据发送单元和第二检测数据发送单元中不同的位置上。In addition, the detection bit of the second detection data sending unit and the detection bit of the first detection data sending unit can be in the same position in the first detection data sending unit and the second detection data sending unit, such as the first detection data sending unit unit and the second detection data to send the first bit of the unit. Certainly, the detection bits of the second detection data sending unit and the detection bits of the first detection data sending unit may also be in different positions in the first detection data sending unit and the second detection data sending unit respectively.
103、接收端接收所述发送端发送的第一发送时间信息和第二接收时间信息,所述第一发送时间信息为所述发送端的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息,所述第二接收时间信息为所述发送端的DTU deframer接收所述第二检测数据发送单元的检测比特时的时间信息;103. The receiving end receives the first sending time information and the second receiving time information sent by the sending end, and the first sending time information is when the DTU framer of the sending end sends the detection bit of the first detection data sending unit The time information of the time information, the second receiving time information is the time information when the DTU deframer of the sending end receives the detection bit of the second detection data transmission unit;
举例而言,接收端可以根据预定的规则(如接收的DTU的DTU序号或DTU中的指示标识等)确定DTU中是否包含发送端的DTU framer发送第一检测DTU的检测比特数据时的时间信息,即第一发送时间信息,例如时间戳Tm1。并且,接收端可以根据预定的规则(如接收的DTU的序号或接收的DTU中的指示标识等)确定某一DTU中包含发送端的DTU deframer接收第二检测数据发送单元的检测比特时的时间信息,即第二接收时间信息,例如时间戳Tm2。其中,所述第一信息承载数据发送单元或者第二信息承载数据发送单元通过第一时延通道传输。在此,将包含第一发送时间信息的DTU称为第一信息承载数据发送单元,将包含第二接收时间信息的DTU称为第二信息承载数据发送单元。接收端从第一信息承载数据发送单元的规定比特中获取第一发送时间信息,从第二信息承载数据发送单元的规定比特中获取第二接收时间信息。For example, the receiving end can determine whether the DTU includes the time information when the DTU framer of the sending end sends the detection bit data of the first detection DTU according to a predetermined rule (such as the DTU sequence number of the received DTU or the indicator in the DTU, etc.), That is, the first sending time information, such as the time stamp Tm1. And, the receiving end can determine the time information when the DTU deframer of the sending end receives the detection bit of the second detection data transmission unit in a certain DTU according to predetermined rules (such as the sequence number of the received DTU or the indication mark in the received DTU, etc.) , that is, the second receiving time information, such as the time stamp Tm2. Wherein, the first information-carrying data sending unit or the second information-carrying data sending unit is transmitted through a first delay channel. Here, the DTU including the first sending time information is called a first information-carrying data sending unit, and the DTU including the second receiving time information is called a second information-carrying data sending unit. The receiving end obtains the first sending time information from the specified bits of the first information-bearing data sending unit, and obtains the second receiving time information from the specified bits of the second information-bearing data sending unit.
或者,接收端也可以根据预定的规则(如接收的DTU的DTU序号或DTU中的指示标识等)确定DTU中是否包含第一发送时间信息和第二接收时间信息,例如时间戳Tm1和时间戳Tm。其中,所述第三信息承载数据发送单元通过第一时延通道传输。在此,将该DTU称为第三信息承载数据发送单元,接收端从第三信息承载数据发送单元的规定比特中获取第一发送时间信息和第二接收时间信息。Alternatively, the receiving end can also determine whether the DTU contains the first sending time information and the second receiving time information, such as the time stamp Tm1 and the time stamp Tm. Wherein, the third information-carrying data sending unit transmits through the first delay channel. Here, the DTU is referred to as a third information-carrying data sending unit, and the receiving end obtains the first sending time information and the second receiving time information from specified bits of the third information-carrying data sending unit.
或者,接收端也可以从发送端所发送的管理消息中,获取发送端的DTU framer发送第一检测数据发送单元的检测比特时的时间信息(即第一发送时间信息),例如时间戳Tm1。然后,接收端接收发送端之后发来的管理消息,从中获取发送端的DTU deframer接收第二检测数据发送单元的检测比特时的时间信息(即第二接收时间信息),例如时间戳Tm2。在此,将包含第一发送时间信息的管理消息称为第一管理消息,将包含第二接收时间信息的管理消息称为第二管理消息。Or, the receiving end can also obtain the time information (i.e. the first sending time information) when the DTU framer of the sending end sends the detection bit of the first detection data transmission unit from the management message sent by the sending end, such as the time stamp Tm1. Then, the receiving end receives the management message sent after the sending end, from which the time information (i.e. the second receiving time information) when the DTU deframer of the sending end receives the detection bit of the second detection data transmission unit, such as the time stamp Tm2. Here, the management message including the first sending time information is called a first management message, and the management message including the second receiving time information is called a second management message.
或者,接收端也可以接收发送端发来的管理消息,从中获取发送端的DTU framer发送第一检测数据发送单元的检测比特时的时间信息(即第一发送时间信息)以及发送端的DTU deframer接收第二检测数据发送单元的检测比特时的时间信息(即第二接收时间信息),在此,将该管理消息称为第三管理消息。Or, the receiving end can also receive the management message sent by the sending end, and obtain the time information (that is, the first sending time information) when the DTU framer of the sending end sends the detection bit of the first detection data sending unit and the DTU framer of the sending end receives the first detection bit. 2. Time information when the detection bit of the data sending unit is detected (that is, the second receiving time information). Here, the management message is referred to as the third management message.
104、接收端根据所述第一发送时间信息,所述第一接收时间信息,所述第二发送时间信息,所述第二接收时间信息进行时间调整,使得接收端的时钟与发送端的时钟达到时间同步。104. The receiving end performs time adjustment according to the first sending time information, the first receiving time information, the second sending time information, and the second receiving time information, so that the clock of the receiving end and the clock of the sending end reach the same time Synchronize.
举例而言,当发送端与接收端之间的通道上的交织器(interleaver)所产生的上下行交织时延相等(当交织器去使能时,认为上下行交织时延相等)时,可以在获得第一发送时间信息Tm1,第一接收时间信息Ts1,第二发送时间信息Ts2和第二接收时间信息Tm2后,根据公式Offset=(Ts1+Ts2-Tm1-Tm2)/2,来获取接收端的时钟与发送端的时钟之间的时间偏移量Offset。当交织器去使能时,认为上下行交织时延相等。在交织器所产生的上下行交织时延不相等的情况下,获取交织器的上下行交织时延差Delayilv。接收端在获得第一发送时间信息Tm1,第一接收时间信息Ts1,第二发送时间信息Ts2和第二接收时间信息Tm2后,根据公式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv)/2,来获取接收端的时钟与发送端的时钟之间的时间偏移量Offset。在获得时间偏移量Offset后,根据时间偏移量Offset调整本地时钟的时间,使接收端的时钟与发送端的时钟达到时间同步。一般来说,主时钟位于发送端,从时钟位于接收端。接收端的时钟与发送端的时钟达到时间同步即意味着从时钟与主时钟之间达到时间同步。For example, when the uplink and downlink interleaving delays generated by the interleaver on the channel between the sending end and the receiving end are equal (when the interleaver is disabled, the uplink and downlink interleaving delays are considered to be equal), you can After obtaining the first sending time information Tm1, the first receiving time information Ts1, the second sending time information Ts2 and the second receiving time information Tm2, according to the formula Offset=(Ts1+Ts2-Tm1-Tm2)/2, the receiving The time offset Offset between the clock at the end and the clock at the sender. When the interleaver is disabled, the uplink and downlink interleaving delays are considered to be equal. In the case that the uplink and downlink interleaving delays generated by the interleaver are not equal, the uplink and downlink interleaving delay difference Delay ilv of the interleaver is obtained. After the receiving end obtains the first sending time information Tm1, the first receiving time information Ts1, the second sending time information Ts2 and the second receiving time information Tm2, according to the formula Offset=(Ts1+Ts2-Tm1-Tm2-Delay ilv )/ 2. To obtain the time offset Offset between the clock of the receiving end and the clock of the sending end. After the time offset Offset is obtained, the time of the local clock is adjusted according to the time offset Offset, so that the clock of the receiving end is synchronized with the clock of the sending end. Generally speaking, the master clock is at the transmitting end and the slave clock is at the receiving end. Time synchronization between the clock at the receiving end and the clock at the sending end means time synchronization between the slave clock and the master clock.
另外,也可以在进行时间同步之前,并且,获取接收端的PMD层和发送端的PMD层之间的上下行时延差Delaypmd之后,不对接收端的PMD层和发送端的PMD层之间的上下行时延进行调整,而在接收端在获得第一发送时间信息Tm1,第一接收时间信息Ts1,第二发送时间信息Ts2和第二接收时间信息Tm2后,根据公式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv-Delaypmd)/2,来获取接收端的时钟与发送端的时钟之间的时间偏移量Offset。并且,根据该时间偏移量Offset调整本地时钟的时间,使接收端的时钟与发送端的时钟达到时间同步。In addition, before performing time synchronization, and after obtaining the uplink and downlink delay difference Delay pmd between the PMD layer of the receiving end and the PMD layer of the sending end, the uplink and downlink time between the PMD layer of the receiving end and the PMD layer of the sending end are not adjusted. Adjustment is delayed, and after the receiving end obtains the first sending time information Tm1, the first receiving time information Ts1, the second sending time information Ts2 and the second receiving time information Tm2, according to the formula Offset=(Ts1+Ts2-Tm1- Tm2-Delay ilv -Delay pmd )/2 to obtain the time offset Offset between the clock at the receiving end and the clock at the sending end. And, the time of the local clock is adjusted according to the time offset Offset, so that the clock of the receiving end and the clock of the sending end achieve time synchronization.
本实施例提供的时间同步方法,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,接收端在DTU deframer接收发送端发送的第一检测数据发送单元时获取第一接收时间信息,接收端在向发送端发送第二检测数据发送单元的检测比特时获取第二发送时间信息,并获取发送端发送的第一发送时间信息和第二接收时间信息;然后,根据第一发送时间信息,第一接收时间信息,第二发送时间信息,第二接收时间信息进行时间同步调整。因此,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟之间达到精确的时间同步,满足移动业务对时间同步精度的需要。从而,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization method that this embodiment provides, by when the uplink and downlink time delay between the PMD layer of the receiving end and the PMD layer of the sending end is equal, the receiving end obtains the first detection data sending unit when the DTU deframer receives the first detection data transmission unit sent by the sending end Receiving time information, the receiving end obtains the second sending time information when sending the detection bit of the second detection data sending unit to the sending end, and obtains the first sending time information and the second receiving time information sent by the sending end; then, according to the first Time synchronization adjustment is performed on the first sending time information, the first receiving time information, the second sending time information, and the second receiving time information. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve precise time synchronization between the clock at the sending end and the clock at the receiving end, meeting the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
另外,当发送端和接收端具有多个时延通道时,可以仅在发送端和接收端之间的一个时延通道上设置上述DTU framer和DTUdeframer,进行发送端的时钟和接收端的时钟之间的时间同步。从而,以少量的器件实现高精度时间同步。In addition, when the sending end and the receiving end have multiple delay channels, the above-mentioned DTU framer and DTU deframer can be set on only one delay channel between the sending end and the receiving end, and the clock of the sending end and the clock of the receiving end can be synchronized. Time synchronization. Thus, high-precision time synchronization is realized with a small number of devices.
与上述方法相对应地,本发明实施例还提供了一种时间同步方法,如图2所示,包括:Corresponding to the above method, the embodiment of the present invention also provides a time synchronization method, as shown in Figure 2, including:
201、当发送端的PMD层与接收端的PMD层之间的上下行时延相等时,发送端在向接收端发送第一检测数据发送单元时,获取第一发送时间信息,所述第一发送时间信息为发送端的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息;201. When the uplink and downlink delays between the PMD layer of the sending end and the PMD layer of the receiving end are equal, when the sending end sends the first detection data sending unit to the receiving end, obtain the first sending time information, and the first sending time The information is the time information when the DTU framer at the sending end sends the detection bits of the first detection data transmission unit;
举例而言,可以在进行发送端的时钟与接收端的时钟之间的时间同步操作前,获取发送端的PMD层与接收端的PMD层之间的上下行时延,例如通过测量、量化等方式。根据所获得的发送端与接收端的PMD层之间的上下行时延,当确定发送端与接收端的PMD层之间的上下行时延不相等时,可以通过补偿的方式进行调整,使得发送端的PMD层与接收端的PMD层之间的上下行时延相等。For example, the uplink and downlink delay between the PMD layer of the sending end and the PMD layer of the receiving end can be obtained before the time synchronization operation between the clock of the sending end and the clock of the receiving end, for example, by means of measurement and quantization. According to the obtained uplink and downlink time delay between the sending end and the PMD layer of the receiving end, when it is determined that the uplink and downlink time delay between the sending end and the receiving end's PMD layer is not equal, it can be adjusted by means of compensation, so that the sending end's The uplink and downlink delays between the PMD layer and the PMD layer at the receiving end are equal.
发送端将TPS-TC(Transport Protocol Specific-Transmission Convergence,传送协议特定-传输汇聚)层发送的数据和管理消息生成对应的DTU。发送端在向接收端发送生成的DTU时,可以根据预先设定的规则,确定某一DTU中的规定比特,将其用来进行时间同步。在此,将该DTU称为第一检测数据发送单元,将该规定比特称为检测比特,例如第一个比特等。发送端在本地的DTU framer发送该第一检测数据发送单元的检测比特时,获得本地时钟的时间信息,即第一发送时间信息,例如时间戳Tm1。The sender generates corresponding DTUs from the data and management messages sent by the TPS-TC (Transport Protocol Specific-Transmission Convergence) layer. When the sending end sends the generated DTU to the receiving end, it can determine a specified bit in a certain DTU according to a preset rule, and use it for time synchronization. Here, the DTU is referred to as a first detection data transmission unit, and the specified bit is referred to as a detection bit, such as the first bit. When the local DTU framer sends the detection bit of the first detection data transmission unit, the sending end obtains the time information of the local clock, that is, the first transmission time information, such as the time stamp Tm1.
202、发送端在接收由接收端发送的第二检测数据发送单元时,获取第二接收时间信息,所述第二接收时间信息为发送端的DTU deframer接收所述第二检测数据发送单元的检测比特时的时间信息;202. The sending end acquires second receiving time information when receiving the second detection data sending unit sent by the receiving end, and the second receiving time information is that the DTU deframer at the sending end receives the detection bit of the second detection data sending unit time information;
举例而言,发送端在接收DTU时,可以根据预定的规则(如DTU的序号等)确定该DTU中的规定比特是用来进行时间同步的数据,在此将该DTU称为第二检测数据发送单元。发送端在本地的DTU deframer接收该第二检测数据发送单元的检测比特时,获得本地时钟的时间信息,即第二接收时间信息,例如时间戳Tm1。For example, when receiving a DTU, the sending end can determine that the specified bits in the DTU are data for time synchronization according to predetermined rules (such as the sequence number of the DTU, etc.), and the DTU is referred to as the second detection data herein. sending unit. When the local DTU deframer receives the detection bit of the second detection data transmission unit, the sending end obtains the time information of the local clock, that is, the second receiving time information, such as the time stamp Tm1.
203、发送端向所述接收端发送所述第一发送时间信息和所述第二接收时间信息,以便于所述接收端根据所述第一发送时间信息和所述第二接收时间信息进行时间同步调整。203. The sending end sends the first sending time information and the second receiving time information to the receiving end, so that the receiving end performs timing according to the first sending time information and the second receiving time information Synchronized adjustments.
举例而言,发送端可以根据预先设定的规则,确定某一DTU,将第一发送时间信息添加在该DTU内,并向接收端发送该DTU。而该DTU即为第一信息承载数据发送单元。然后,发送端可以根据预先设定的规则,确定某一DTU,将第二接收时间信息添加在该DTU内,并向接收端发送该DTU。而该DTU即为第二信息承载数据发送单元。其中,所述第一信息承载数据发送单元或者第二信息承载数据发送单元通过第一时延通道传输。例如,发送端可以在规定序号的DTU内添加第一发送时间信息并向接收端发送。然后,发送端在规定序号的DTU内添加第二接收时间信息并向接收端发送。或者,发送端也可以在发送第一检测数据发送单元后,选择一个DTU作为第一信息承载数据发送单元,在该第一信息承载数据发送单元内添加第一发送时间信息和指示标识,该指示标识用来指示该DTU内包含第一发送时间信息。并且,在接收第二检测数据发送单元后,选择一个DTU作为第二信息承载数据发送单元,在该第二信息承载数据发送单元内添加第二接收时间信息和指示标识,该指示标识用来指示该DTU内包含第二接收时间信息。For example, the sending end may determine a certain DTU according to a preset rule, add the first sending time information to the DTU, and send the DTU to the receiving end. The DTU is the first information-carrying data sending unit. Then, the sending end may determine a certain DTU according to a preset rule, add the second receiving time information to the DTU, and send the DTU to the receiving end. The DTU is the second information-carrying data sending unit. Wherein, the first information-carrying data sending unit or the second information-carrying data sending unit is transmitted through a first delay channel. For example, the sending end may add the first sending time information to the DTU with the specified sequence number and send it to the receiving end. Then, the sending end adds the second receiving time information to the DTU with the specified sequence number and sends it to the receiving end. Alternatively, the sending end may also select a DTU as the first information-carrying data sending unit after sending the first detection data sending unit, and add the first sending time information and the indication identifier in the first information-carrying data sending unit, the indication The identifier is used to indicate that the DTU contains the first sending time information. And, after receiving the second detection data sending unit, select a DTU as the second information-carrying data sending unit, add the second receiving time information and the indicator in the second information-carrying data sending unit, and the indicator is used to indicate The DTU includes the second receiving time information.
或者,发送端也可以根据预先设定的规则,确定某一DTU,将第一发送时间信息和第二接收时间信息添加在该DTU内,并向接收端发送该DTU。而该DTU即为第三信息承载数据发送单元。其中,所述第三信息承载数据发送单元通过第一时延通道传输。Alternatively, the sending end may also determine a certain DTU according to a preset rule, add the first sending time information and the second receiving time information to the DTU, and send the DTU to the receiving end. The DTU is the third information-carrying data sending unit. Wherein, the third information-carrying data sending unit transmits through the first delay channel.
或者,发送端也可以向接收端发送包含第一发送时间信息的管理消息,在此将该管理消息称为第一管理消息,然后,发送端向接收端发送包含第二接收时间信息的管理消息,在此将该管理消息称为第二管理消息。Alternatively, the sending end may also send a management message including the first sending time information to the receiving end, where the management message is referred to as the first management message, and then, the sending end sends a management message including the second receiving time information to the receiving end , the management message is referred to as the second management message here.
或者,发送端还可以向接收端发送管理消息,其中包含了第一发送时间信息和第二接收时间信息,该管理消息即为第三管理消息。Alternatively, the sending end may also send a management message to the receiving end, which includes the first sending time information and the second receiving time information, and the management message is the third management message.
另外,也可以在进行时间同步之前,并且,获取接收端的PMD层和发送端的PMD层之间的上下行时延差Delaypmd之后,不对接收端的PMD层和发送端的PMD层之间的上下行时延进行调整,而在接收端在获得第一发送时间信息Tm1,第一接收时间信息Ts1,第二发送时间信息Ts2和第二接收时间信息Tm2后,根据公式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv-Delaypmd)/2,来获取接收端的时钟与发送端的时钟之间的时间偏移量Offset。并且,根据该时间偏移量Offset调整本地时钟的时间,使接收端的时钟与发送端的时钟达到时间同步。In addition, before performing time synchronization, and after obtaining the uplink and downlink delay difference Delay pmd between the PMD layer of the receiving end and the PMD layer of the sending end, the uplink and downlink time between the PMD layer of the receiving end and the PMD layer of the sending end are not adjusted. Adjustment is delayed, and after the receiving end obtains the first sending time information Tm1, the first receiving time information Ts1, the second sending time information Ts2 and the second receiving time information Tm2, according to the formula Offset=(Ts1+Ts2-Tm1- Tm2-Delay ilv -Delay pmd )/2 to obtain the time offset Offset between the clock at the receiving end and the clock at the sending end. And, the time of the local clock is adjusted according to the time offset Offset, so that the clock of the receiving end and the clock of the sending end achieve time synchronization.
本实施例提供的时间同步方法,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,发送端在DTU framer向接收端发送第一检测数据发送单元的检测比特时获取第一发送时间信息,,发送端在DTU deframer接收接收端发送的第二检测数据发送单元的检测比特时获取第二接收时间信息,并且,将第一发送时间信息和第二接收时间信息通知给接收端;以使接收端根据第一发送时间信息和第二接收时间信息进行时间同步调整。因此,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟之间达到精确的时间同步,满足移动业务对时间同步精度的需要。从而,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization method provided by the present embodiment, when the uplink and downlink time delay between the PMD layer of the receiving end and the PMD layer of the sending end is equal, the sending end obtains when the DTU framer sends the detection bit of the first detection data transmission unit to the receiving end The first sending time information, the sending end obtains the second receiving time information when the DTU deframer receives the detection bit of the second detection data sending unit sent by the receiving end, and notifies the first sending time information and the second receiving time information to The receiving end; enabling the receiving end to perform time synchronization adjustment according to the first sending time information and the second receiving time information. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve precise time synchronization between the clock at the sending end and the clock at the receiving end, meeting the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
另外,当发送端和接收端具有多个时延通道时,可以仅在发送端和接收端之间的一个时延通道上设置上述DTU framer和DTUdeframer,进行发送端的时钟和接收端的时钟之间的时间同步。从而,以少量的器件实现高精度时间同步。In addition, when the sending end and the receiving end have multiple delay channels, the above-mentioned DTU framer and DTU deframer can be set on only one delay channel between the sending end and the receiving end, and the clock of the sending end and the clock of the receiving end can be synchronized. Time synchronization. Thus, high-precision time synchronization is realized with a small number of devices.
在上述实施例中,进行时间同步操作时,需要发送端的PMD层和接收端的PMD层之间的上下行时延相等。现有的xDSL系统(如ADSL、ADSL 2/2+、VDSL 2等)中,局端和终端的PMD层间的上下行时延具有较好的对称性,特别是VDSL2系统。现有的xDSL的结构可以如图3所示。一般来说,主时钟位于局端,从时钟位于终端。在本发明实施例中,当PMS-TC(Physical Media Specific-Transmission Convergence,物理媒质特定-传输汇聚)层只有一个时延通道时,DTUframer位于screambler之前(如图4所示)。业务数据和管理数据被DTU framer封装到数据发送单元中。可选择的,当PMS-TC层使能两个时延通道时,DTU framer仅存在于第0个时延通道上(即p=0的通道,如图5所示)。当PMS-TC层使能两个时延通道,仅测量第0个时延通道中交织器所产生的时延差。假定Delay1为局端的PMD层到终端的PMD层的时延,即PMD层的下行时延,而Delay2为终端的PMD层到局端的PMD层的时延,即PMD层的上行时延。当局端的PMD层和终端的PMD层间的上下行时延不相等,即Delay1≠Delay2时,可通过某种手段使得PMD层上下行时延相等,即Delay1=Delay2。例如,通过测量、量化等方式分别获得PMD层上下行时延,然后通过补偿的方式,使得局端的PMD层和终端的PMD层间的上行时延和下行时延相等,即Delay1=Delay2,具有对称性。In the above embodiments, when performing time synchronization operations, the uplink and downlink delays between the PMD layer at the sending end and the PMD layer at the receiving end need to be equal. In existing xDSL systems (such as ADSL, ADSL 2/2+, VDSL 2, etc.), the uplink and downlink delays between the central office and the PMD layer of the terminal have relatively good symmetry, especially in the VDSL2 system. The structure of the existing xDSL can be shown in FIG. 3 . Generally speaking, the master clock is located at the central office, and the slave clock is located at the terminal. In the embodiment of the present invention, when the PMS-TC (Physical Media Specific-Transmission Convergence, Physical Media Specific-Transmission Convergence) layer has only one delay channel, the DTUframer is located before the screamer (as shown in Figure 4). Business data and management data are encapsulated into the data sending unit by DTU framer. Optionally, when the PMS-TC layer enables two delay channels, the DTU framer only exists on the 0th delay channel (that is, the channel of p=0, as shown in FIG. 5 ). When the PMS-TC layer enables two delay channels, only the delay difference generated by the interleaver in the 0th delay channel is measured. It is assumed that Delay1 is the delay from the PMD layer of the central office to the PMD layer of the terminal, that is, the downlink delay of the PMD layer, and Delay2 is the delay from the PMD layer of the terminal to the PMD layer of the central office, that is, the uplink delay of the PMD layer. When the uplink and downlink delays between the PMD layer of the client and the PMD layer of the terminal are not equal, that is, Delay1≠Delay2, some means can be used to make the uplink and downlink delays of the PMD layer equal, that is, Delay1=Delay2. For example, the uplink and downlink delays of the PMD layer are respectively obtained by measurement, quantization, etc., and then the uplink delay and the downlink delay between the PMD layer of the central office and the PMD layer of the terminal are equal through compensation, that is, Delay1=Delay2, with symmetry.
下面以图3所示的场景为例,分别通过以下几种方式对上述实施例作进一步详细描述。Taking the scene shown in FIG. 3 as an example, the above-mentioned embodiment will be further described in detail in the following ways.
方式一method one
本实施例时间同步方法,包括:The time synchronization method of this embodiment includes:
301、在局端的PMD层和终端的PMD层间的上下行时延相等时,在局端,DTU framer将上层(TPS-TC层)发送的数据和管理消息生成DTU,并向终端发送所产生的DTU。并且,根据预先的设定,从本地时钟(即主时钟)获取DTU framer发送某一特定DTU的第x个比特时的时间信息,即第一发送时间信息(时间戳Tm1)。并且,将局端获取的时间戳Tm1承载在下一DTU中。301. When the uplink and downlink delays between the PMD layer of the central office and the PMD layer of the terminal are equal, at the central office, the DTU framer generates a DTU from the data and management messages sent by the upper layer (TPS-TC layer), and sends the generated DTU to the terminal DTUs. And, according to the preset setting, the time information when the DTU framer sends the xth bit of a certain DTU is obtained from the local clock (ie, the master clock), that is, the first sending time information (time stamp Tm1). And, the time stamp Tm1 acquired by the central office is carried in the next DTU.
具体可以为:当局端的PMD层和终端的PMD层的上下行时延相等时,在局端,位于PMS-TC层的DTU framer接收从TPS-TC层发送过来的数据和管理消息,并将接收的数据和管理消息生成DTU。其中,DTU的大小等于一个或多个RS码字(其中,1个RS码字为K字节)的净荷,即n*K字节(n>=1)。每个DTU可包含在固定个数的符号(DMTsymbol)中,即每个符号中包含整数个DTU,或每个DTU包含在整数个符号中,即Lp=k*DTUsize=k*n*K或k*Lp=DTUsize=n*K(其中,k和n均为不小于1的整数,Lp为一个符号中所包含的比特数,即一个符号的大小)。另外,当该DTU framer对应的通道中包含interleaver时,interleaver的大小(即D*I)等于一个或多个RS码字(其中,一个RS码字的长度为N字节),即D*I=m*N。Specifically, it can be as follows: when the uplink and downlink delays of the PMD layer of the central office and the PMD layer of the terminal are equal, at the central office, the DTU framer located at the PMS-TC layer receives the data and management messages sent from the TPS-TC layer, and will receive Data and management messages generate DTUs. Wherein, the size of the DTU is equal to the payload of one or more RS codewords (one RS codeword is K bytes), that is, n*K bytes (n>=1). Each DTU can be contained in a fixed number of symbols (DMTsymbol), that is, each symbol contains an integer number of DTUs, or each DTU is contained in an integer number of symbols, that is, L p =k*DTU size =k*n* K or k*L p =DTU size =n*K (wherein, k and n are both integers not less than 1, and L p is the number of bits included in a symbol, that is, the size of a symbol). In addition, when the channel corresponding to the DTU framer contains an interleaver, the size of the interleaver (ie D*I) is equal to one or more RS codewords (wherein, the length of an RS codeword is N bytes), ie D*I =m*N.
假设预先设定DTU framer在生成DTU时,在特定位置预留t个字节。根据预定的规则,选择相应的DTU(即第一信息承载数据发送单元),将该DTU framer发送前一个DTU的第x个比特时的本地时钟(主时钟)的时间信息,即时间戳Tm1,添加在该预留的t个字节中。Assume that the DTU framer is preset to reserve t bytes at a specific position when generating DTU. According to the predetermined rule, select the corresponding DTU (i.e. the first information bearing data sending unit), and send the time information of the local clock (master clock) when the DTU framer sends the xth bit of the previous DTU, i.e. the time stamp Tm1, Added to the reserved t bytes.
例如,以DTU a为例,局端的DTU framer根据从TPS-TC层接收的数据和管理消息生成DTU a。在发送DTU a的第x个比特时,获得本地时钟的时间信息,即时间戳Tm1,并如图6或7所示,在DTU a+1中预留t个字节,承载该时间戳Tm1。另外,DTU framer获得发送DTU a的第x个比特的时间戳Tm1后,不局限于将时间戳Tm1承载在DTU a+1中,也可以将该时间戳Tm1承载在其他指定的DTU中所预留的t个字节中。For example, taking DTU a as an example, the DTU framer at the central office generates DTU a according to the data and management messages received from the TPS-TC layer. When sending the xth bit of DTU a, obtain the time information of the local clock, that is, the time stamp Tm1, and as shown in Figure 6 or 7, reserve t bytes in DTU a+1 to carry the time stamp Tm1 . In addition, after the DTU framer obtains the time stamp Tm1 of the x-th bit of sending DTU a, it is not limited to carrying the time stamp Tm1 in DTU a+1, and can also carry the time stamp Tm1 in other designated DTUs. In the remaining t bytes.
302、在终端,根据预先的设定,从本地时钟(即从时钟)获取DTU deframer接收局端所发送的用于时间同步的DTU的第x个比特时的时间信息,即第一接收时间信息(时间戳Ts1)。并且,在接收该DTU的下一个DTU时,从该下一个DTU中获取局端的DTU framer发送该DTU的第x个比特时的时间戳Tm1。302. At the terminal, according to the preset setting, obtain the time information when the DTU deframer receives the xth bit of the DTU sent by the central office for time synchronization from the local clock (ie, the slave clock), that is, the first receiving time information (time stamp Ts1). And, when receiving the next DTU of the DTU, the time stamp Tm1 when the DTU framer at the central office sends the xth bit of the DTU is obtained from the next DTU.
例如,终端的DTU deframer在接收DTU a的第x个比特时,获得本地时钟的时间信息,即时间戳Ts1,并且,在接收DTU a+1时,对DTU a+1进行解析,从该DTU a+1预留的t个字节中获取局端的DTU framer发送DTU a的第x个比特时的时间戳Tm1。For example, when the DTU deframer of the terminal receives the xth bit of DTU a, it obtains the time information of the local clock, that is, the time stamp Ts1, and when receiving DTU a+1, it analyzes DTU a+1, and from the DTU The time stamp Tm1 when the DTU framer at the central office sends the xth bit of DTU a is obtained from the t bytes reserved by a+1.
303、在终端,该DTU framer根据上层(TPS-TC层)发送的数据和管理消息生成DTU,并向局端发送所生成的DTU。并且,按照预先的设定,从本地时钟(即从时钟)获取DTU framer发送每一个DTU的第x个比特时的时间信息,即第二发送时间信息(时间戳Ts2)。303. At the terminal, the DTU framer generates a DTU according to the data and management messages sent by the upper layer (TPS-TC layer), and sends the generated DTU to the central office. And, according to the preset setting, the time information when the DTU framer sends the xth bit of each DTU is obtained from the local clock (ie, the slave clock), that is, the second sending time information (time stamp Ts2).
例如,以DTU b为例,在终端,位于PMS-TC层的DTU framer接收从TPS-TC层发送过来的数据和管理消息,并根据接收的数据和管理消息生成DTU b。并且,DTU framer在发送DTU b的第x个比特时,获得本地时钟的时间信息,即时间戳Ts2。For example, taking DTU b as an example, at the terminal, the DTU framer at the PMS-TC layer receives the data and management messages sent from the TPS-TC layer, and generates DTU b according to the received data and management messages. And, when the DTU framer sends the xth bit of DTU b, it obtains the time information of the local clock, that is, the time stamp Ts2.
304、在局端,根据预先的设定,从本地时钟(即主时钟)获取DTU deframer接收终端所发送的用于时间同步的DTU的第x个比特时的时间信息,即第二接收时间信息(时间戳Tm2)。并且,在之后发送给终端的DTU中承载局端获取的时间戳Tm2。304. At the central office, according to the preset setting, obtain the time information at the xth bit of the DTU sent by the DTU deframer receiving terminal for time synchronization from the local clock (ie, the master clock), that is, the second receiving time information (time stamp Tm2). And, the time stamp Tm2 obtained by the central office is carried in the DTU sent to the terminal later.
例如,局端的DTU deframer在接收DTU b的第x个比特时,获得本地时钟的时间信息,即时间戳Tm2。并且,在局端的DTU deframer获取接收DTU b的第x个比特时的时间戳Tm2后,如图6或7所示,还可以在DTU c中预留t个字节,承载获取的时间戳Tm2和该时间戳所对应的DTU的序列号,以及用于指示所承载的时间戳的收发属性的指示比特。其中,该指示比特可以设置为:指示比特置为1时,该时间戳为DTU的发送时间戳;指示比特置为0时,该时间戳为DTU的接收时间戳。在此,将DTU c的预留的t个字节中的该指示比特置为0。然后,向终端发送承载了时间戳Tm2的DTU c。另外,在发送端所发送的包含预留的t字节的DTU内,均可将时间戳所对应的DTU的序列号,以及用于指示所承载的时间戳的收发属性的指示比特等信息承载在该预留的t字节中。For example, when the DTU deframer at the central office receives the xth bit of DTU b, it obtains the time information of the local clock, that is, the time stamp Tm2. Moreover, after the DTU deframer at the central office obtains the timestamp Tm2 when receiving the xth bit of DTU b, as shown in Figure 6 or 7, t bytes can also be reserved in DTU c to carry the acquired timestamp Tm2 The serial number of the DTU corresponding to the time stamp, and the indication bit used to indicate the sending and receiving attribute of the carried time stamp. Wherein, the indication bit can be set as follows: when the indication bit is set to 1, the time stamp is the sending time stamp of the DTU; when the indication bit is set to 0, the time stamp is the receiving time stamp of the DTU. Here, the indication bit in the reserved t bytes of DTU c is set to 0. Then, send the DTU c carrying the timestamp Tm2 to the terminal. In addition, in the DTU containing the reserved t bytes sent by the sender, the serial number of the DTU corresponding to the time stamp, and the indication bits used to indicate the sending and receiving attributes of the carried time stamp can be carried. in the reserved t bytes.
在本实施例中,局端是通过两个DTU分别传送时间戳Tm1和Tm2,当然,局端还可以将获取的时间戳Tm1和Tm2承载在同一个DTU中,将该DTU发送给终端。In this embodiment, the central office transmits the time stamps Tm1 and Tm2 respectively through two DTUs. Of course, the central office can also carry the acquired time stamps Tm1 and Tm2 in the same DTU and send the DTU to the terminal.
305、在终端,在接收承载了局端的DTU deframer接收的时间戳Tm2的DTU时,从该DTU中获取局端的DTU deframer接收终端发送的DTU的第x个比特时的时间戳Tm2。305. At the terminal, when receiving the DTU carrying the time stamp Tm2 received by the DTU deframer at the central office, acquire from the DTU the time stamp Tm2 when the DTU deframer at the central office receives the xth bit of the DTU sent by the terminal.
例如,终端的DTU deframer在接收DTU c时,对DTU c进行解析,确定从该t个字节中获取的时间戳为局端的DTU deframer接收DTU b的第x个比特时的时间戳Tm2。For example, when the DTU deframer of the terminal receives DTU c, it analyzes DTU c, and determines that the time stamp obtained from the t bytes is the time stamp Tm2 when the DTU deframer of the central office receives the xth bit of DTU b.
306、在终端,根据时间戳Tm1、Ts1、Ts2和Tm2,进行时间同步调整。306. At the terminal, perform time synchronization adjustment according to the time stamps Tm1, Ts1, Ts2, and Tm2.
具体可以为:在发送端与接收端之间的通道上未使能交织的情况下,在获知时间戳Tm1、Ts1、Ts2和Tm2后,可以获得等式Tm1+Delay1+Offset=Ts1,以及Ts2+Delay2-Offset=Tm2,其中,Offset为局端和终端的主从时钟间的时间偏移量,Delay1为DTU的第x个比特从局端的MUX模块发送至终端的DEMUX模块所需的时延,Delay2为DTU的第x个比特从终端的MUX模块发送至局端的DEMUX模块所需的时延。由于局端的PMD层和终端的PMD层的上下行时延相等,即Delay1=Delay2,由上述等式可以推导出等式Specifically, if interleaving is not enabled on the channel between the sending end and the receiving end, after knowing the time stamps Tm1, Ts1, Ts2, and Tm2, the equation Tm1+Delay1+Offset=Ts1, and Ts2 can be obtained +Delay2-Offset=Tm2, where Offset is the time offset between the master-slave clocks of the central office and the terminal, and Delay1 is the delay required for the xth bit of DTU to be sent from the MUX module of the central office to the DEMUX module of the terminal , Delay2 is the delay required for the xth bit of the DTU to be sent from the MUX module of the terminal to the DEMUX module of the central office. Since the uplink and downlink delays of the PMD layer of the central office and the PMD layer of the terminal are equal, that is, Delay1=Delay2, the equation can be derived from the above equation
Offset=(Ts1+Ts2-Tm1-Tm2)/2Offset=(Ts1+Ts2-Tm1-Tm2)/2
在发送端与接收端之间的通道上使能交织的情况下,假设Delay3为在主时钟到从时钟的方向上交织所产生的时延,即交织所产生的下行时延,Delay4为在从时钟到主时钟的方向上交织所产生的时延,即交织所产生的上行时延。那么,在获知时间戳Tm1、Ts1、Ts2和Tm2后,可以获得等式When interleaving is enabled on the channel between the sending end and the receiving end, it is assumed that Delay3 is the delay generated by interleaving from the master clock to the slave clock, that is, the downlink delay generated by interleaving, and Delay4 is the delay generated by the slave clock. The delay generated by interleaving from the clock to the master clock, that is, the uplink delay generated by interleaving. Then, after knowing the timestamps Tm1, Ts1, Ts2 and Tm2, the equation can be obtained
Tm1+Delay1+Delay3+Offset=Ts1;Tm1+Delay1+Delay3+Offset=Ts1;
Ts2+Delay2+Delay4-Offset=Tm2。Ts2+Delay2+Delay4-Offset=Tm2.
此时,Delay1和Delay2中不包括由交织器所引起的交织时延。当Delay1≠Delay2时,需要通过补偿的方式,使得Delay1=Delay2。At this time, Delay1 and Delay2 do not include the interleaving delay caused by the interleaver. When Delay1≠Delay2, it is necessary to make Delay1=Delay2 through compensation.
当交织所产生的上下行交织时延相等(即Delay3=Delay4,或(D-1)×(I-1)相等)时,可以推导出等式When the uplink and downlink interleaving delays generated by interleaving are equal (that is, Delay3=Delay4, or (D-1)×(I-1) is equal), the equation can be derived
Offset=(Ts1+Ts2-Tm1-Tm2)/2Offset=(Ts1+Ts2-Tm1-Tm2)/2
在交织所产生的上下行交织时延不相等(即Delay3≠Delay4,或(D-1)×(I-1)不相等)时,终端可以根据上下行不同的交织器参数计算获得交织器所产生的上下行时延差Delayilv,即Delay3-Delay4=Delayilv。由此,可以推导出等式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv)/2When the uplink and downlink interleaving delays generated by interleaving are not equal (that is, Delay3≠Delay4, or (D-1)×(I-1) is not equal), the terminal can calculate the interleaver parameters according to different uplink and downlink interleaver parameters. The generated uplink and downlink delay difference Delay ilv , that is, Delay3-Delay4=Delay ilv . From this, the equation Offset=(Ts1+Ts2-Tm1-Tm2-Delay ilv )/2 can be derived
终端根据上述公式计算得出Offset后,可以按照偏移量Offset对本地时钟(即从时钟)进行调整,使主时钟和从时钟达到时间同步。After calculating the Offset according to the above formula, the terminal can adjust the local clock (that is, the slave clock) according to the offset, so that the master clock and the slave clock can achieve time synchronization.
方式二way two
本实施例时间同步方法,包括:The time synchronization method of this embodiment includes:
401、在局端的PMD层和终端的PMD层间的上下行时延相等时,在局端,DTU framer根据上层(TPS-TC层)发送的数据和管理消息生成DTU,并向终端发送该DTU。并且,根据预先的设定,每当该DTU framer当前发送的DTU与上一个获取时间戳的DTU之间相隔h个DTU时,从本地时钟(即主时钟)获取该DTU framer发送当前DTU的第x个比特时的时间信息,即第一发送时间信息(时间戳Tm1。并且,将局端获取的时间戳Tm1承载在下一个DTU中。401. When the uplink and downlink delays between the PMD layer of the central office and the PMD layer of the terminal are equal, at the central office, the DTU framer generates a DTU according to the data and management messages sent by the upper layer (TPS-TC layer), and sends the DTU to the terminal . And, according to the preset setting, whenever h DTUs are separated between the DTU currently sent by the DTU framer and the last DTU to obtain the timestamp, the first DTU sent by the DTU framer to send the current DTU is obtained from the local clock (ie, the main clock). The time information of x bits, that is, the first transmission time information (time stamp Tm1. And, the time stamp Tm1 acquired by the central office is carried in the next DTU.
具体可以为:当局端的PMD层和终端的PMD层的上下行时延相等时,在局端,位于PMS-TC层的DTU framer接收从TPS-TC层发送过来的数据和管理消息,并根据接收的数据和管理消息生成DTU。假设预先设定在局端或终端,在位于PMS-TC层的DTU framer生成DTU时在DTU中预留t个字节,每当该DTU framer当前发送的DTU与上一个获取时间戳的DTU之间相隔h个DTU时,从本地时钟(即主时钟)获取该DTU framer发送当前的DTU的第x个比特时的时间戳,并将该时间戳添加在下一个DTU预留的t个字节中。Specifically, it can be as follows: when the uplink and downlink delays of the PMD layer of the authority end and the PMD layer of the terminal are equal, at the office end, the DTU framer located at the PMS-TC layer receives the data and management messages sent from the TPS-TC layer, and according to the received Data and management messages generate DTUs. Assuming that it is pre-set at the central office or terminal, t bytes are reserved in the DTU when the DTU framer at the PMS-TC layer generates the DTU. When h DTUs are separated between each other, obtain the time stamp when the DTU framer sends the xth bit of the current DTU from the local clock (that is, the main clock), and add the time stamp to the t bytes reserved for the next DTU .
例如,局端的DTU framer根据从TPS-TC层接收的数据和管理消息生成DTU后,每隔h个DTU获取一次该DTU frame r发送当前的DTU的第x个比特时的时间戳,即,该DTU framer当前生成的DTU a与上一个获取时间戳的DTU之间相隔h个DTU时,局端的DTU framer在发送DTU a的第x个比特时,获得本地时钟的时间信息,即时间戳Tm1。并且,如图6或7所示,在DTU a+1中预留t个字节,承载该时间戳Tm1。For example, after the DTU framer at the central office generates DTUs according to the data and management messages received from the TPS-TC layer, it obtains the time stamp when the DTU frame r sends the xth bit of the current DTU every h DTUs, that is, the When there are h DTUs between the DTU a currently generated by the DTU framer and the last DTU to obtain the timestamp, the DTU framer at the central office obtains the time information of the local clock when sending the xth bit of DTU a, that is, the timestamp Tm1. And, as shown in Figure 6 or 7, t bytes are reserved in DTU a+1 to carry the timestamp Tm1.
另外,该DTU framer获得发送DTU a的第x个比特时的时间戳Tm1后,不局限于将时间戳Tm1承载在DTU a+1中,也可以将该时间戳Tm1承载在其他DTU的预留的t个字节中。In addition, after the DTU framer obtains the time stamp Tm1 when sending the xth bit of DTU a, it is not limited to carrying the time stamp Tm1 in DTU a+1, and can also carry the time stamp Tm1 in the reserved space of other DTUs. of t bytes.
进一步地,还可以在两个连续获取时间戳的DTU a和DTU a+h之间的所有的DTU或规定个数的DTU中都该承载DTU framer发送DTUa的第x个比特时的时间戳Tm1。并且,可以在这些DTU中承载指示比特,用该指示比特来指示这些DTU承载该时间戳的次数,或者是否是首次发送该时间戳。Further, it is also possible to carry the time stamp Tm1 when the DTU framer sends the xth bit of DTUa in all DTUs or a specified number of DTUs between the two consecutive time stamped DTU a and DTU a+h . In addition, indication bits can be carried in these DTUs, and the indication bits can be used to indicate the number of times these DTUs carry the timestamp, or whether it is the first time to send the timestamp.
例如,局端获取DTU framer发送DTU a的第x个比特时的时间戳后,在DTU a+1的预留的t个字节中承载时间戳Tm1,并将指示比特置为1,即DTU a+1为第一次承载时间戳Tm1的DTU。在DTU a+2至DTU a+k(k≤h+1)的预定的t个字节中承载时间戳Tm1,并将指示比特置为0,即DTU a+2,......,DTU a+k之前的DTU中已承载时间戳Tm1信息。For example, after the central office obtains the time stamp when the DTU framer sends the xth bit of DTU a, it carries the time stamp Tm1 in the reserved t bytes of DTU a+1, and sets the indicated bit to 1, that is, DTU a+1 is the DTU carrying the timestamp Tm1 for the first time. Carry the time stamp Tm1 in the predetermined t bytes from DTU a+2 to DTU a+k (k≤h+1), and set the indication bit to 0, that is, DTU a+2,... , the time stamp Tm1 information has been carried in the DTU before DTU a+k.
或者,局端获取DTU framer发送DTU a的第x个比特时的时间戳后,在DTU a+1的预留的t个字节中承载DTU a的时间戳Tm1,并将指示比特置为1,即DTU a+1为第一次承载时间戳Tm1的DTU。在DTU a+2至DTU a+k(k≤h+1)的预留的t个字节中承载时间戳Tm1,并将指示比特分别置为2,......,k,即DTU a+2为第二次承载时间戳Tm1的DTU,......,DTU a+k为第k次承载时间戳Tm1的DTU。Or, after the central office obtains the time stamp when the DTU framer sends the xth bit of DTU a, it carries the time stamp Tm1 of DTU a in the reserved t bytes of DTU a+1, and sets the indication bit to 1 , that is, DTU a+1 is the DTU carrying the timestamp Tm1 for the first time. The time stamp Tm1 is carried in the reserved t bytes of DTU a+2 to DTU a+k (k≤h+1), and the indication bits are respectively set to 2, ..., k, that is DTU a+2 is the DTU carrying the timestamp Tm1 for the second time, ..., DTU a+k is the DTU carrying the timestamp Tm1 for the kth time.
402、在终端,根据预先的设定,接收与上一个局端获取时间戳的DTU之间相隔h个DTU的DTU时,从本地时钟(即从时钟)获取DTU deframer接收该DTU的第x个比特时的时间信息,即第一接收时间信息(时间戳Ts1)。并且,在接收该DTU的下一个DTU时,从该下一个DTU中获取局端的DTU framer发送该DTU的第x个比特时的时间戳Tm1。402. At the terminal, according to the preset setting, when receiving a DTU separated by h DTUs from the DTU obtained by the previous central office, obtain the DTU deframer from the local clock (that is, the slave clock) and receive the xth DTU of the DTU The time information of the bit time, that is, the first receiving time information (time stamp Ts1). And, when receiving the next DTU of the DTU, the time stamp Tm1 when the DTU framer at the central office sends the xth bit of the DTU is obtained from the next DTU.
例如,终端确定接收的DTU a与上一个局端获取时间戳的DTU之间相隔h个DTU时,终端的DTU deframer获取接收DTU a的第x个比特时的本地时钟的时间信息,即时间戳Ts1,并且,在接收DTU a+1时,对DTU a+1进行解析,从该DTU a+1的预留的t个字节中获取局端的DTU framer发送DTU a的第x个比特时的时间戳Tm1。For example, when the terminal determines that the received DTU a is separated by h DTUs from the DTU obtained by the previous central office, the DTU deframer of the terminal obtains the time information of the local clock when the xth bit of DTU a is received, that is, the timestamp Ts1, and, when receiving DTU a+1, analyze DTU a+1, and obtain the DTU framer at the central office from the reserved t bytes of DTU a+1 when sending the xth bit of DTU a Timestamp Tm1.
403、在终端,DTU framer根据上层(TPS-TC层)发送的数据和管理消息生成DTU,并向局端发送该DTU。并且,按照预先的设定,每当该DTU framer当前发送的DTU与上一个获取时间戳的DTU之间相隔h个DTU时,从本地时钟(即从时钟)获取该DTU framer发送当前的DTU的第x个比特时的时间信息,即第二发送时间信息(时间戳Ts2)。403. At the terminal, the DTU framer generates a DTU according to the data and management messages sent by the upper layer (TPS-TC layer), and sends the DTU to the central office. And, according to the preset setting, whenever h DTUs are separated between the DTU currently sent by the DTU framer and the last DTU to obtain the timestamp, the DTU framer sends the current DTU from the local clock (that is, the slave clock) The time information at the xth bit, that is, the second transmission time information (time stamp Ts2).
例如,终端每隔h个DTU获取一次DTU framer发送当前的DTU的第x个比特时的时间戳,即,DTU b与上一个获取时间戳的DTU之间相隔h个DTU时,终端的DTU framer在发送DTU b的第x个比特时,获得本地时钟的时间信息,即时间戳Ts2。For example, the terminal obtains the time stamp when the DTU framer sends the xth bit of the current DTU every h DTUs, that is, when there are h DTUs between DTU b and the last DTU that obtained the time stamp, the DTU framer of the terminal When the xth bit of DTU b is sent, the time information of the local clock is obtained, that is, the time stamp Ts2.
404、在局端,根据预先的设定,接收与上一个终端获取时间戳的DTU之间相隔h个DTU的DTU时,从本地时钟(即主时钟)获取DTU deframer接收该DTU的第x个比特时的时间信息,即第二接收时间信息(时间戳Tm2)。并且,在之后发送给终端的DTU中承载局端获取的时间戳Tm2。404. At the central office, according to the preset setting, when receiving a DTU separated by h DTUs from the DTU obtained by the previous terminal, obtain the DTU deframer from the local clock (ie, the master clock) and receive the xth DTU of the DTU The time information of the bit time, that is, the second reception time information (time stamp Tm2). And, the time stamp Tm2 obtained by the central office is carried in the DTU sent to the terminal later.
例如,局端确定接收的DTU b与上一个终端获取时间戳的DTU之间相隔h个DTU时,局端的DTU deframer在接收DTU b的第x个比特时,获得本地时钟的时间信息,即时间戳Tm2,并且,在该DTUdeframer获取接收DTU b的第x个比特时的时间戳Tm2后,还可以如图6或7所示,在DTU c中预留t个字节,承载获取的时间戳Tm2和该时间戳所对应的DTU b的序列号,以及用于指示所承载的时间戳的收发属性的指示比特。其中,该指示比特可以设置为:指示比特置为1时该时间戳为DTU的发送时间戳,指示比特置为0时该时间戳为DTU的接收时间戳。在此,将DTU c的预留的t个字节中的该指示比特置为0。然后,向终端发送承载了时间戳Tm2的DTU c。For example, when the central office determines that there is a distance of h DTUs between the received DTU b and the DTU obtained by the last terminal, the DTU deframer at the central office obtains the time information of the local clock when receiving the xth bit of DTU b, that is, the time Stamp Tm2, and, after the DTUdeframer obtains the time stamp Tm2 when receiving the xth bit of DTU b, it can also reserve t bytes in DTU c as shown in Figure 6 or 7 to carry the obtained time stamp Tm2 and the sequence number of the DTU b corresponding to the timestamp, and the indication bit used to indicate the sending and receiving attributes of the carried timestamp. Wherein, the indication bit can be set as follows: when the indication bit is set to 1, the time stamp is the sending time stamp of the DTU; when the indication bit is set to 0, the time stamp is the receiving time stamp of the DTU. Here, the indication bit in the reserved t bytes of DTU c is set to 0. Then, send the DTU c carrying the timestamp Tm2 to the terminal.
在本实施例中,局端是通过两个DTU分别传送时间戳Tm1和Tm2,当然,局端还可以将获取的时间戳Tm1和Tm2承载在同一个DTU中,将该DTU发送给终端。In this embodiment, the central office transmits the time stamps Tm1 and Tm2 respectively through two DTUs. Of course, the central office can also carry the acquired time stamps Tm1 and Tm2 in the same DTU and send the DTU to the terminal.
405、在终端,在接收承载了局端的DTU deframer接收的时间戳Tm2的DTU时,从该DTU中获取局端的DTU deframer接收终端发送的DTU的第x个比特时的时间戳Tm2。405. At the terminal, when receiving the DTU carrying the time stamp Tm2 received by the DTU deframer at the central office, acquire from the DTU the time stamp Tm2 when the DTU deframer at the central office receives the xth bit of the DTU sent by the terminal.
例如,终端在接收DTU c时,对DTU c进行解析,从该t个字节中获取的时间戳为局端的DTU deframer接收DTU b的第x个比特时的时间戳Tm2。For example, when the terminal receives DTU c, it parses DTU c, and the time stamp obtained from the t bytes is the time stamp Tm2 when the DTU deframer at the central office receives the xth bit of DTU b.
406、在终端,根据时间戳Tm1、Ts1、Ts2和Tm2,进行时间同步调整。具体调整的方法参照步骤306,在此不做赘述。406. At the terminal, perform time synchronization adjustment according to the time stamps Tm1, Ts1, Ts2, and Tm2. For the specific adjustment method, refer to step 306, which will not be repeated here.
方式三way three
本实施例时间同步方法,包括:The time synchronization method of this embodiment includes:
501、在局端的PMD层和终端的PMD层间的上下行时延相等时,在局端,DTU framer根据上层(TPS-TC层)发送的数据和管理消息生成DTU,并向终端发送该DTU。并且,根据预先的设定,从本地时钟(即主时钟)获取该DTU framer发送每一个DTU的第x个比特时的时间信息,即第一发送时间信息(时间戳Tm1。并且,将局端获取的时间戳Tm1承载在规定的管理消息(如eoc消息)中,通过嵌入式通道发送给终端。501. When the uplink and downlink delays between the PMD layer of the central office and the PMD layer of the terminal are equal, at the central office, the DTU framer generates a DTU according to the data and management messages sent by the upper layer (TPS-TC layer), and sends the DTU to the terminal . And, according to the preset setting, obtain the time information when the DTU framer sends the xth bit of each DTU from the local clock (i.e. the master clock), i.e. the first transmission time information (time stamp Tm1. And, the central office The acquired time stamp Tm1 is carried in a prescribed management message (such as an eoc message) and sent to the terminal through an embedded channel.
502、在终端,根据预先的设定,从本地时钟(即从时钟)获取DTU deframer接收每一个DTU的第x个比特时的时间信息,即第一接收时间信息(时间戳Ts1)。并且,通过嵌入式通道接收管理消息,并从该管理消息中获取局端的DTU framer发送该DTU的第x个比特时的时间戳Tm1。502. At the terminal, according to the preset setting, the time information when the DTU deframer receives the xth bit of each DTU, that is, the first receiving time information (time stamp Ts1), is obtained from the local clock (ie, the slave clock). Moreover, the management message is received through the embedded channel, and the time stamp Tm1 when the DTU framer at the central office sends the xth bit of the DTU is obtained from the management message.
503、在终端,DTU framer根据上层(TPS-TC层)发送的数据和管理消息生成DTU,并向局端发送该DTU。并且,按照预先的设定,从本地时钟(即从时钟)获取DTU framer发送每一个DTU的第x个比特时的时间信息,即第二发送时间信息(时间戳Ts2)。503. At the terminal, the DTU framer generates a DTU according to the data and management messages sent by the upper layer (TPS-TC layer), and sends the DTU to the central office. And, according to the preset setting, the time information when the DTU framer sends the xth bit of each DTU is obtained from the local clock (ie, the slave clock), that is, the second sending time information (time stamp Ts2).
504、在局端,根据预先的设定,从本地时钟(即主时钟)获取DTU deframer接收每一个DTU的第x个比特时的时间信息,即第二接收时间信息(时间戳Tm2)。并且,将局端获取的时间戳Tm2承载在规定的管理消息(如eoc消息)中,通过嵌入式通道发送给终端。504. At the central office, according to preset settings, the time information when the DTU deframer receives the xth bit of each DTU, that is, the second receiving time information (time stamp Tm2), is obtained from the local clock (ie, the master clock). In addition, the time stamp Tm2 obtained by the central office is carried in a prescribed management message (such as an eoc message), and sent to the terminal through an embedded channel.
在此,局端是通过两个管理消息分别传送时间戳Tm1和Tm2,当然,局端还可以将获取的时间戳Tm1和Tm2承载在同一个管理消息中,通过嵌入式通道发送给终端。Here, the central office transmits the time stamps Tm1 and Tm2 respectively through two management messages. Of course, the central office can also carry the obtained time stamps Tm1 and Tm2 in the same management message and send it to the terminal through an embedded channel.
505、在终端,通过嵌入式通道接收管理消息,并从该管理消息中获取局端的DTU deframer接收该DTU的第x个比特时的时间戳Tm2。505. At the terminal, receive the management message through the embedded channel, and obtain the time stamp Tm2 when the DTU deframer at the central office receives the xth bit of the DTU from the management message.
506、在终端,根据时间戳Tm1、Ts1、Ts2和Tm2,进行时间同步调整。具体调整的方法参照步骤306,在此不做赘述。506. At the terminal, perform time synchronization adjustment according to the time stamps Tm1, Ts1, Ts2, and Tm2. For the specific adjustment method, refer to step 306, which will not be repeated here.
可选的,为了保证传输中时间戳的安全性和准确性,还可以在上述实施例中,对DTU的预留的t个字节中所承载的时间戳及其相关信息进行校验操作,例如,采用CRC(Cyclical Redundancy Check,循环冗余码校验)或格雷(Golay)码等得到时间戳及其相关信息的校验信息,并将该校验信息承载DTU的预留的t个字节中。Optionally, in order to ensure the security and accuracy of the time stamp during transmission, in the above embodiment, the time stamp and its related information carried in the reserved t bytes of the DTU can also be verified, For example, use CRC (Cyclical Redundancy Check, Cyclic Redundancy Check) or Gray (Golay) code to obtain the verification information of the timestamp and its related information, and carry the verification information with the reserved t words of DTU section.
可选的,还可以在上述实施例中,使DTU framer匀速地输出数据,从而确保PMS-TC层时延的稳定性,使时间同步操作更加精准。进一步的,还可以在上述实施例中,使PMS-TC层匀速地输出数据,来确保PMD层输入速率恒定,进而使得PMS-TC层和PMD层的接口时延稳定。从而,从PMS-TC层的输出到对端PMS-TC层输入之间的上下行时延相等,即上下行时延具有对称性。Optionally, in the above embodiment, the DTU framer can also be used to output data at a uniform speed, so as to ensure the stability of the PMS-TC layer delay and make the time synchronization operation more accurate. Further, in the above embodiment, the PMS-TC layer may output data at a uniform rate to ensure a constant input rate of the PMD layer, thereby making the interface delay between the PMS-TC layer and the PMD layer stable. Therefore, the uplink and downlink delays between the output of the PMS-TC layer and the input of the peer PMS-TC layer are equal, that is, the uplink and downlink delays are symmetrical.
另外,在上述实施例中,局端和终端获取时间戳的方式都是预先设定的,但也可以局端和终端通过管理消息协商来确定获取时间戳的方式。In addition, in the above-mentioned embodiment, the ways for the central office and the terminal to obtain the time stamp are preset, but the way for the central office and the terminal to obtain the time stamp may also be determined through management message negotiation.
上述各方式下的实施例提供的时间同步方法,通过当局端的PMD层与终端的PMD层之间的上下行时延相等时,局端将DTU framer发送第一检测数据发送单元的检测比特时的第一发送时间信息通知给终端,终端获取DTU deframer接收该第一检测数据发送单元的检测比特时获取第一接收时间信息,并且,终端获取DTU framer发送第二检测数据发送单元的检测比特时的第二发送时间信息,局端将DTUdeframer接收第二检测数据发送单元的检测比特时的第二接收时间信息通知给终端,然后,终端根据第一发送时间信息,第一接收时间信息,第二发送时间信息和第二接收时间信息进行时间调整,使得终端的时钟与局端的时钟达到时间同步。从而,能够在xDSL系统中以一种简单的时间同步机制实现局端和终端之间的主从时钟达到精确的时间同步,满足移动业务对时间同步精度的需要。因此,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization method provided by the embodiments under the above-mentioned various modes, when the uplink and downlink time delays between the PMD layer of the authority end and the PMD layer of the terminal are equal, when the detection bit of the first detection data transmission unit is sent by the central office by the DTU framer The first sending time information is notified to the terminal, and the terminal obtains the first receiving time information when the DTU deframer receives the detection bit of the first detection data transmission unit, and the terminal obtains the time when the DTU framer sends the detection bit of the second detection data transmission unit For the second sending time information, the central office notifies the terminal of the second receiving time information when the DTUdeframer receives the detection bit of the second detection data sending unit, and then, the terminal sends the second sending time information according to the first sending time information and the first receiving time information. Time adjustment is performed on the time information and the second received time information, so that the clock of the terminal and the clock of the central office achieve time synchronization. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve accurate time synchronization between the master and slave clocks between the central office and the terminal, and to meet the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
另外,当局端和终端具有多个时延通道时,可以仅在局端和终端之间的一个时延通道上设置上述DTU framer和DTU deframer,进行主时钟和从时钟之间的时间同步。从而,以少量的器件实现高精度时间同步。In addition, when the central office and the terminal have multiple delay channels, the above-mentioned DTU framer and DTU deframer can be set on only one delay channel between the central office and the terminal to perform time synchronization between the master clock and the slave clock. Thus, high-precision time synchronization is realized with a small number of devices.
与上述方法相对应地,本发明实施例还提供了一种时间同步装置,如图8所示,包括:Corresponding to the above method, an embodiment of the present invention also provides a time synchronization device, as shown in FIG. 8 , including:
数据发送单元解析帧模块801,用于接收发送端发送的第一检测数据发送单元;或者,接收所述发送端发送的第一发送时间信息和第二接收时间信息,所述第一发送时间信息为所述发送端的数据发送单元成帧模块发送所述第一检测数据发送单元的检测比特时的时间信息,所述第二接收时间信息为所述发送端的数据发送单元解析帧模块接收所述第二检测数据发送单元的检测比特时的时间信息;The data sending unit parses the frame module 801, configured to receive the first detection data sending unit sent by the sending end; or, receive the first sending time information and the second receiving time information sent by the sending end, the first sending time information The time information when the framing module of the data sending unit at the sending end sends the detection bit of the first detection data sending unit, and the second receiving time information is the time information when the frame analysis module of the data sending unit at the sending end receives the first detection bit 2. Time information when detecting the detection bit of the data transmission unit;
数据发送单元成帧模块802,用于生成第二检测数据发送单元,并向所述发送端发送所述第二检测数据发送单元;A data sending unit framing module 802, configured to generate a second detection data sending unit, and send the second detection data sending unit to the sending end;
时钟获取模块803,用于获取第一接收时间信息,所述第一接收时间信息为所述数据发送单元解析帧模块801接收所述第一检测数据发送单元的检测比特时的时间信息;或者,获取第二发送时间信息,所述第二发送时间信息为所述数据发送单元成帧模块802发送所述第二检测数据发送单元的检测比特时的时间信息;A clock acquisition module 803, configured to acquire first receiving time information, where the first receiving time information is the time information when the data sending unit parsing frame module 801 receives the detection bits of the first detected data sending unit; or, Acquire second sending time information, where the second sending time information is time information when the data sending unit framing module 802 sends the detection bits of the second detection data sending unit;
纠正模块804,用于当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,根据所述时钟获取模块803获取的第一接收时间信息和第二发送时间信息,所述数据发送单元解析帧模块801接收的第一发送时间信息和第二接收时间信息进行时间调整,使得所述接收端的时钟与所述发送端的时钟达到时间同步。Correction module 804, for when the uplink and downlink time delay between the PMD layer of the receiving end and the PMD layer of the sending end is equal, according to the first receiving time information and the second sending time information obtained by the clock obtaining module 803, the data The sending unit analyzes the first sending time information and the second receiving time information received by the frame module 801 and performs time adjustment, so that the clock of the receiving end is time-synchronized with the clock of the sending end.
进一步地,所述数据发送单元解析帧模块801具体包括:Further, the data sending unit parsing frame module 801 specifically includes:
解析帧数据接收单元,用于接收所述发送端发送的第一检测数据发送单元或第一信息承载数据发送单元或第二信息承载数据发送单元或第三信息承载数据发送单元;An analysis frame data receiving unit, configured to receive the first detection data sending unit or the first information-carrying data sending unit or the second information-carrying data sending unit or the third information-carrying data sending unit sent by the sending end;
解析帧时间获取单元,用于从所述解析帧数据接收单元接收的第一信息承载数据发送单元中获取第一发送时间信息;或者,从所述解析帧数据接收单元接收的第二信息承载数据发送单元中获取第二接收时间信息;或者,从所述解析帧数据接收单元接收的第三信息承载数据发送单元中获取第一发送时间信息和第二接收时间信息。An analysis frame time acquisition unit, configured to acquire first sending time information from the first information-bearing data sending unit received by the analysis frame data receiving unit; or, from the second information-bearing data received by the analysis frame data receiving unit Acquiring the second receiving time information from the sending unit; or acquiring the first sending time information and the second receiving time information from the third information-carrying data sending unit received by the parsing frame data receiving unit.
进一步地,所述解析帧数据接收单元,具体用于通过第一时延通道接收所述第一信息承载数据发送单元或者第二信息承载数据发送单元或者第三信息承载数据发送单元。Further, the parsing frame data receiving unit is specifically configured to receive the first information-carrying data sending unit or the second information-carrying data sending unit or the third information-carrying data sending unit through the first delay channel.
或者,所述数据发送单元解析帧模块801具体包括:Alternatively, the data sending unit parsing frame module 801 specifically includes:
解析帧数据接收单元,用于接收所述发送端发送的第一检测数据发送单元;An analysis frame data receiving unit, configured to receive the first detection data sending unit sent by the sending end;
消息接收单元,用于接收发送端发送的第一管理消息或第二管理消息或第三管理消息;a message receiving unit, configured to receive the first management message or the second management message or the third management message sent by the sending end;
解析帧时间获取单元,用于从所述消息接收单元接收的第一管理消息中获取第一发送时间信息;或者,从所述消息接收单元接收的第二管理消息中获取第二接收时间信息;或者,从所述消息接收单元接收的第三管理消息中获取第一发送时间信息和第二接收时间信息。An analysis frame time obtaining unit, configured to obtain first sending time information from the first management message received by the message receiving unit; or obtain second receiving time information from the second management message received by the message receiving unit; Or, acquire the first sending time information and the second receiving time information from the third management message received by the message receiving unit.
进一步地,所述纠正模块804具体包括:Further, the correcting module 804 specifically includes:
偏移量获取单元,用于当交织器的上下行交织时延相等时,根据所述第一发送时间信息Tm1,所述第一接收时间信息Ts1,所述第二发送时间信息Ts2,所述第二接收时间信息Tm2以及公式Offset=(Ts1+Ts2-Tm1-Tm2)/2,获取时间偏移量Offset;An offset acquisition unit, configured to, when the uplink and downlink interleaving delays of the interleaver are equal, according to the first transmission time information Tm1, the first reception time information Ts1, the second transmission time information Ts2, the The second receiving time information Tm2 and the formula Offset=(Ts1+Ts2-Tm1-Tm2)/2 to obtain the time offset Offset;
时间调整单元,用于根据所述偏移量获取单元获取的时间偏移量Offset调整接收端的时钟,使得接收端的时钟与所述发送端的时钟达到时间同步。The time adjustment unit is configured to adjust the clock of the receiving end according to the time offset Offset obtained by the offset obtaining unit, so that the clock of the receiving end and the clock of the sending end achieve time synchronization.
或者,所述纠正模块804具体包括:Alternatively, the correcting module 804 specifically includes:
时延差获取单元,用于获取交织器的上下行交织时延差Delayilv;A delay difference obtaining unit, configured to obtain the uplink and downlink interleaving delay difference Delay ilv of the interleaver;
偏移量获取单元,用于根据所述第一发送时间信息Tm1,所述第一接收时间信息Ts1,所述第二发送时间信息Ts2,所述第二接收时间信息Tm2,交织器的上下行交织时延差Delayilv以及公式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv)/2,获取时间偏移量Offset;An offset acquisition unit, configured to, according to the first transmission time information Tm1, the first reception time information Ts1, the second transmission time information Ts2, the second reception time information Tm2, the uplink and downlink of the interleaver Interleaving delay difference Delay ilv and the formula Offset=(Ts1+Ts2-Tm1-Tm2-Delay ilv )/2 to obtain the time offset Offset;
时间调整单元,用于根据所述偏移量获取单元获取的时间偏移量Offset调整接收端的时钟,使得所述接收端的时钟与所述发送端的时钟达到时间同步。The time adjustment unit is configured to adjust the clock of the receiving end according to the time offset Offset obtained by the offset obtaining unit, so that the clock of the receiving end and the clock of the sending end achieve time synchronization.
本实施例提供的时间同步装置,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,接收端在DTU deframer接收发送端所发送的第一检测数据发送单元的检测比特时获取第一接收时间信息,接收端在向发送端发送第二检测数据发送单元的检测比特时获取第二发送时间信息,并且,接收发送端发送的第一发送时间信息和第二接收时间信息;然后,根据第一发送时间信息,第一接收时间信息,第二发送时间信息和第二接收时间信息进行时间同步调整。因此,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟之间达到精确的时间同步,满足移动业务对时间同步精度的需要。从而,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization device provided by the present embodiment, when the uplink and downlink time delay between the PMD layer of the receiving end and the PMD layer of the sending end is equal, the receiving end receives the detection bit of the first detection data sending unit sent by the sending end at the DTU deframer When the first receiving time information is obtained, the receiving end obtains the second sending time information when sending the detection bit of the second detection data sending unit to the sending end, and receives the first sending time information and the second receiving time information sent by the sending end ; Then, perform time synchronization adjustment according to the first sending time information, the first receiving time information, the second sending time information and the second receiving time information. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve precise time synchronization between the clock at the sending end and the clock at the receiving end, meeting the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
与上述装置对应的,本发明实施例还提供了一种时间同步装置,如图9所示,包括:Corresponding to the above-mentioned device, an embodiment of the present invention also provides a time synchronization device, as shown in FIG. 9 , including:
数据发送单元成帧模块901,用于向接收端发送第一检测数据发送单元,并向所述接收端发送时钟获取模块获取的第一发送时间信息和第二接收时间信息;A data sending
数据发送单元解析帧模块902,用于接收所述接收端发送的第二检测数据发送单元;The data sending unit parses the
时钟获取模块903,用于获取第一发送时间信息,所述第一发送时间信息为所述数据发送单元成帧模块901发送所述第一检测数据发送单元的检测比特时的时间信息;或者,获取第二接收时间信息,所述第二接收时间信息为所述数据发送单元解析帧模块902接收所述第二检测数据发送单元的检测比特时的时间信息。A
进一步地,所述数据发送单元成帧模块901具体包括:Further, the data sending
生成数据单元,用于根据预先的设定生成第一检测数据发送单元或第一信息承载数据发送单元或第二信息承载数据发送单元或第三信息承载数据发送单元,所述第一信息承载数据发送单元包含所述第一发送时间信息,所述第二信息承载数据发送单元包含所述第二接收时间信息,所述第三信息承载数据发送单元包含所述第一发送时间信息和所述第二接收时间信息;A generating data unit is used to generate a first detection data sending unit or a first information-carrying data sending unit or a second information-carrying data sending unit or a third information-carrying data sending unit according to preset settings, the first information-carrying data sending unit The sending unit includes the first sending time information, the second information-carrying data sending unit includes the second receiving time information, and the third information-carrying data sending unit includes the first sending time information and the second receiving time information. 2. Receive time information;
发送数据单元,用于向所述接收端发送所述生成数据单元生成的第一检测数据发送单元或第一信息承载数据发送单元或第二信息承载数据发送单元或第三信息承载数据发送单元。The sending data unit is configured to send the first detection data sending unit or the first information-carrying data sending unit or the second information-carrying data sending unit or the third information-carrying data sending unit generated by the generating data unit to the receiving end.
进一步地,所述发送数据单元,具体用于通过第一时延通道向所述接收端发送第一信息承载数据发送单元或第二信息承载数据发送单元或第三信息承载数据发送单元。Further, the sending data unit is specifically configured to send the first information-carrying data sending unit or the second information-carrying data sending unit or the third information-carrying data sending unit to the receiving end through the first delay channel.
或者,所述数据发送单元成帧模块901具体包括:Alternatively, the data sending
生成数据单元,用于根据预先的设定生成第一检测数据发送单元;generating a data unit, configured to generate a first detection data sending unit according to preset settings;
发送数据单元,用于向所述接收端发送所述生成数据单元生成的第一检测数据发送单元a sending data unit, configured to send the first detection data sending unit generated by the generating data unit to the receiving end
消息发送单元,用于向所述接收端发送第一管理消息,所述第一管理消息包含所述时钟获取模块获取的第一发送时间信息;或者,向所述接收端发送第二管理消息,所述第二管理消息包含所述时钟获取模块获取的第二接收时间信息;或者,向所述接收端发送第三管理消息,所述第三管理消息包含所述时钟获取模块获取的第一发送时间信息和第二接收时间信息。a message sending unit, configured to send a first management message to the receiving end, where the first management message includes the first sending time information acquired by the clock acquisition module; or, send a second management message to the receiving end, The second management message includes the second receiving time information acquired by the clock acquisition module; or, send a third management message to the receiving end, the third management message includes the first transmission time information acquired by the clock acquisition module time information and the second received time information.
本实施例提供的时间同步装置,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,发送端在DTU framer向接收端发送第一检测数据发送单元的检测比特时获取第一发送时间信息,发送端在DTU deframer接收接收端发送的第二检测数据发送单元的检测比特时获取第二接收时间信息,并将第一发送时间信息和第二接收时间信息通知给接收端,以使接收端根据第一发送时间信息和第二接收时间信息进行时间同步调整。因此,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟之间达到精确的时间同步,满足移动业务对时间同步精度的需要。从而,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization device that this embodiment provides, by when the uplink and downlink time delay between the PMD layer of the receiving end and the PMD layer of the sending end is equal, the sending end acquires when the DTU framer sends the detection bit of the first detection data transmission unit to the receiving end The first sending time information, the sending end obtains the second receiving time information when the DTU deframer receives the detection bit of the second detection data sending unit sent by the receiving end, and notifies the receiving end of the first sending time information and the second receiving time information , so that the receiving end performs time synchronization adjustment according to the first sending time information and the second receiving time information. Therefore, a simple time synchronization mechanism can be used in the xDSL system to achieve precise time synchronization between the clock at the sending end and the clock at the receiving end, meeting the needs of mobile services for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
与上述方法、装置相对应的,本发明实施例还提供了一种时间同步系统,如图10所示,包括发送端1001和接收端1002;Corresponding to the above method and device, the embodiment of the present invention also provides a time synchronization system, as shown in FIG. 10 , including a sending
所述发送端1001,用于当发送端1001的PMD层与接收端1002的PMD层之间的上下行时延相等时,在向接收端1002发送第一检测数据发送单元时获取第一发送时间信息,所述第一发送时间信息为所述发送端1001的DTU framer发送所述第一检测数据发送单元的检测比特时的时间信息;在接收接收端1002发送的第二检测数据发送单元时获取第二接收时间信息,所述第二接收时间信息为本地的DTUdeframer接收所述第二检测数据发送单元的检测比特时的时间信息;向所述接收端1002发送所述第一发送时间信息和所述第二接收时间信息;The sending
所述接收端1002,用于在接收发送端1001发送的第一检测数据发送单元时获取第一接收时间信息,所述第一接收时间信息为所述接收端1002的DTU deframer接收所述第一检测数据发送单元的检测比特时的时间信息;在向所述发送端1001发送第二检测数据发送单元时获取第二发送时间信息,所述第二发送时间信息为所述接收端1002的DTU framer发送所述第二检测数据发送单元的检测比特时的时间信息;接收所述发送端1001发送的第一发送时间信息和第二接收时间信息;根据所述第一发送时间信息,所述第一接收时间信息,所述第二发送时间信息和所述第二接收时间信息进行时间调整,使得所述接收端1002的时钟与所述发送端1001的时钟达到时间同步。The receiving
进一步地,所述接收端1002,具体用于当交织器的上下行交织时延相等时,根据所述第一发送时间信息Tm1,所述第一接收时间信息Ts1,所述第二发送时间信息Ts2,所述第二接收时间信息Tm2以及公式Offset=(Ts1+Ts2-Tm1-Tm2)/2,获取时间偏移量Offset;并根据所述时间偏移量0ffset调整所述接收端的时钟,使得所述接收端1002的时钟与所述发送端1001的时钟达到时间同步。Further, the receiving
进一步地,所述接收端1002,具体用于获取交织器的上下行交织时延差Delayilv;根据所述第一发送时间信息Tm1,所述第一接收时间信息Ts1,所述第二发送时间信息Ts2,所述第二接收时间信息Tm2,交织器的上下行交织时延差Delayilv以及公式Offset=(Ts1+Ts2-Tm1-Tm2-Delayilv)/2,获取时间偏移量Offset;根据所述时间偏移量Offset调整所述接收端的时钟,使得所述接收端的时钟1002与所述发送端1001的时钟达到时间同步。Further, the receiving
本发明实施例提供的时间同步方法、装置及系统,通过当接收端的PMD层与发送端的PMD层之间的上下行时延相等时,发送端将DTUframer发送第一检测数据发送单元的检测比特时的第一发送时间信息通知给接收端,接收端获取DTU deframer接收该第一检测数据发送单元的检测比特时的第一接收时间信息,并且,接收端获取DTUframer发送第二检测数据发送单元的检测比特时的第二发送时间信息,发送端将DTU deframer接收第二检测数据发送单元的检测比特时的第二接收时间信息通知给接收端,然后,接收端根据第一发送时间信息,第一接收时间信息,第二发送时间信息和第二接收时间信息进行时间调整,使得接收端的时钟与发送端的时钟达到时间同步。从而,能够在xDSL系统中以一种简单的时间同步机制实现发送端的时钟和接收端的时钟之间精确的时间同步,满足移动业务对时间同步精度的需要。因此,能够在降低移动承载网络的成本的同时,实现高精度时间同步。The time synchronization method, device and system provided by the embodiments of the present invention, when the uplink and downlink time delays between the PMD layer of the receiving end and the PMD layer of the sending end are equal, the sending end sends the DTUframer to the detection bit of the first detection data transmission unit The first sending time information is notified to the receiving end, and the receiving end obtains the first receiving time information when the DTU deframer receives the detection bit of the first detection data transmission unit, and the receiving end obtains the detection of the second detection data transmission unit sent by the DTU framer The second sending time information at the time of the bit, the sending end notifies the receiving end of the second receiving time information when the DTU deframer receives the detection bit of the second detection data sending unit, and then, the receiving end sends the first receiving time information according to the first sending time information. The time information, the second sending time information and the second receiving time information are time adjusted, so that the clock at the receiving end is synchronized with the clock at the sending end. Therefore, in the xDSL system, a simple time synchronization mechanism can be used to realize accurate time synchronization between the clock of the transmitting end and the clock of the receiving end, which meets the requirement of the mobile service for time synchronization accuracy. Therefore, it is possible to achieve high-precision time synchronization while reducing the cost of the mobile bearer network.
另外,当发送端和接收端具有多个时延通道时,可以仅在发送端和接收端之间的一个时延通道上设置上述DTU framer和DTUdeframer,进行发送端的时钟和接收端的时钟之间的时间同步。从而,以少量的器件实现高精度时间同步。In addition, when the sending end and the receiving end have multiple delay channels, the above-mentioned DTU framer and DTU deframer can be set on only one delay channel between the sending end and the receiving end, and the clock of the sending end and the clock of the receiving end can be synchronized. Time synchronization. Thus, high-precision time synchronization is realized with a small number of devices.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010105197130A CN102136901A (en) | 2010-10-26 | 2010-10-26 | Time synchronization method, device and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010105197130A CN102136901A (en) | 2010-10-26 | 2010-10-26 | Time synchronization method, device and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102136901A true CN102136901A (en) | 2011-07-27 |
Family
ID=44296563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2010105197130A Pending CN102136901A (en) | 2010-10-26 | 2010-10-26 | Time synchronization method, device and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102136901A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103220060A (en) * | 2012-01-24 | 2013-07-24 | 索尼公司 | Time control apparatus, time control method, and program |
| CN103227709A (en) * | 2013-04-10 | 2013-07-31 | 华为技术有限公司 | Method and system for processing periodic signals, and local side equipment |
| WO2014026617A1 (en) * | 2012-08-15 | 2014-02-20 | Huawei Technologies Co., Ltd. | Traffic-adaptive repeated transmission |
| CN109005557A (en) * | 2018-09-26 | 2018-12-14 | 南京中兴新软件有限责任公司 | A kind of time delay symmetry measurement method, device and system |
| WO2019174554A1 (en) * | 2018-03-13 | 2019-09-19 | 华为技术有限公司 | Time delay compensation method and device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6782065B1 (en) * | 1999-02-19 | 2004-08-24 | Fujitsu Limited | Method and apparatus for reproducing system clock in digital data transmission network |
| CN101207432A (en) * | 2006-12-19 | 2008-06-25 | 华为技术有限公司 | A method and system for realizing automatic time synchronization |
| CN101425891A (en) * | 2008-12-09 | 2009-05-06 | 中兴通讯股份有限公司 | Time synchronization method, system and customer terminal |
| CN102137483A (en) * | 2010-08-09 | 2011-07-27 | 华为技术有限公司 | Time synchronization method, device and system |
-
2010
- 2010-10-26 CN CN2010105197130A patent/CN102136901A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6782065B1 (en) * | 1999-02-19 | 2004-08-24 | Fujitsu Limited | Method and apparatus for reproducing system clock in digital data transmission network |
| CN101207432A (en) * | 2006-12-19 | 2008-06-25 | 华为技术有限公司 | A method and system for realizing automatic time synchronization |
| CN101425891A (en) * | 2008-12-09 | 2009-05-06 | 中兴通讯股份有限公司 | Time synchronization method, system and customer terminal |
| CN102137483A (en) * | 2010-08-09 | 2011-07-27 | 华为技术有限公司 | Time synchronization method, device and system |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103220060A (en) * | 2012-01-24 | 2013-07-24 | 索尼公司 | Time control apparatus, time control method, and program |
| WO2014026617A1 (en) * | 2012-08-15 | 2014-02-20 | Huawei Technologies Co., Ltd. | Traffic-adaptive repeated transmission |
| CN103227709A (en) * | 2013-04-10 | 2013-07-31 | 华为技术有限公司 | Method and system for processing periodic signals, and local side equipment |
| CN103227709B (en) * | 2013-04-10 | 2016-06-08 | 华为技术有限公司 | A kind of periodic signal processing method, local side apparatus and system |
| WO2019174554A1 (en) * | 2018-03-13 | 2019-09-19 | 华为技术有限公司 | Time delay compensation method and device |
| CN110278065A (en) * | 2018-03-13 | 2019-09-24 | 华为技术有限公司 | Method and equipment for compensating time delay |
| US11641266B2 (en) | 2018-03-13 | 2023-05-02 | Huawei Technologies Co., Ltd. | Latency compensation method and device |
| CN109005557A (en) * | 2018-09-26 | 2018-12-14 | 南京中兴新软件有限责任公司 | A kind of time delay symmetry measurement method, device and system |
| CN109005557B (en) * | 2018-09-26 | 2021-12-07 | 中兴通讯股份有限公司 | Time delay symmetry measuring method, device and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102111380B (en) | Time synchronization method, device and system | |
| CN102843620B (en) | A kind of OTN Apparatus and method for realizing time synchronized and transmit | |
| CN102783078B (en) | Method and system for precise clock synchronization through interaction between communication layers and sublayers for a communication system | |
| CN102013931B (en) | Time synchronization method and system, salve timing device and main timing device | |
| CN113612564B (en) | A message processing method and network device | |
| CN100566307C (en) | Synchronous data transmission system for time sensitive data in packet switched network | |
| CN102468898B (en) | The method, apparatus and system of time synchronized are realized in time division multiplex network | |
| CN101741853B (en) | Method for synchronizing clock time, line card veneer and network equipment | |
| WO2008098491A1 (en) | A time synchronous method, system and apparatus | |
| CN110291758A (en) | Method and device for delay monitoring | |
| WO2019071369A1 (en) | METHOD FOR TRANSMITTING DATA IN OPTICAL NETWORK AND OPTICAL NETWORK DEVICE | |
| CN102202386B (en) | Clock synchronization method, device and system | |
| WO2009003335A1 (en) | A synchronization and delay compensation method between baseband unit and radio frequency unit | |
| CN1957556A (en) | Determining a time difference between first and second clock domains | |
| CN103259640B (en) | A kind of method and apparatus of lock in time | |
| Ferrant et al. | Synchronous Ethernet and IEEE 1588 in Telecoms: Next Generation Synchronization Networks | |
| EP3890218A1 (en) | Timestamp acquisition method and time synchronization system | |
| WO2020173175A1 (en) | Timestamp correction method and system, clock synchronization method and system | |
| EP2312775B1 (en) | Physical time-stamping | |
| CN102136901A (en) | Time synchronization method, device and system | |
| CN105846884B (en) | A kind of communication means suitable for space-based network networking | |
| WO2010102565A1 (en) | Method, apparatus and system for time synchronization | |
| CN102137483A (en) | Time synchronization method, device and system | |
| CN101436898B (en) | Method, system and apparatus for time synchronization in TDM system | |
| JP2008527894A (en) | Method for synchronizing receiver clock to transmitter clock in less than 100 nanoseconds |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110727 |