Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Figure 1 shows that the schematic diagram that in IEEE P1588V2 agreement, exact time synchronization realizes, wherein, Master is the master clock stipulating in standard, Slave be in standard, stipulate from clock, according to standard protocol specifies, Offset is the deviation from clock and master clock, and Delay1 is that master clock arrives the path delay from clock, Delay2 is the path delay from clock to master clock, known according to Fig. 1:
Ts0=Tm1+Offset
Ts1-Ts0=Delay1
So: Offset=Ts1-Tm1-Delay1
In like manner, Tm2=Ts2-Offset+Delay2
Draw Offset=Ts2-Tm2+Delay2
If the time delay of both direction equates, Delay1=Delay2, so
Offset=(Ts1+Ts2-Tm1-Tm2)/2 (1)
Just obtained from the deviation of clock and master clock like this, just can be accurately on from clock synchronous to master clock.
(comprise ADSL for digital user wire DSL, ADSL2 or VDSL2) equipment carries out the situation of the carrying of mobile service, corresponding local side (the Central Office of Master, CO) equipment, the corresponding remote equipment of Slave (Customer Premises Equipment, CPE).Due to the channel more complicated between CO equipment and CPE, will be through the analog circuit of local side, cable, the analog circuit of far-end, also will pass through digital signal processing circuit at local side and far-end, simultaneously, because uplink and downlink signals is frequency division multiplexing, the time delay difference of the signal of different frequency in twisted-pair feeder, therefore local side is generally not equal to the upper line delay of far-end to local side to the lower line delay of far-end, namely Delay1 ≠ Delay2 generally.We just can not directly obtain the deviation of local side clock and far-end clock with formula (1) so, also just cannot realize the synchronous of time.
In order to solve the time synchronization problem in DSL system, the embodiment of the present invention is at CO and a synchronous processing module of the each increase of cpe side, and concrete structure as shown in Figure 2.In synchro system shown in Fig. 2, both can allow the synchronous CO of CPE, also can allow the synchronous CPE of CO.
In Fig. 2, hold the lower line delay Delay1 of cpe end to comprise by CO: the time delay Δ t1 of CO digital signal processing module 201, the time delay Δ t2 of CO simulation transtation mission circuit 202, the circuit delay Δ t3 of down link 21, the time delay Δ t2 ' of CPE simulation receiving circuit 207, the time delay Δ t1 ' of CPE digital signal processing module 208; Comprised to the upper line delay Delay2 of CO end by cpe end: the time delay Δ t4 ' of CPE digital signal processing module 212, the time delay Δ t5 ' of CPE simulation transtation mission circuit 211, the time delay Δ t3 ' of up link 22, the CO simulation time delay Δ t5 of receiving circuit 206 and the time delay Δ t4 of CO digital signal processing module 205.
The embodiment of the present invention provides a kind of method for synchronizing time of Digital Subscriber Line, comprises the following steps:
The first equipment reads very first time information in the time of the primary importance receiving on the first symbol, and the second equipment reads the second temporal information in the time of the primary importance sending on described the first symbol;
Described the first equipment receives the second temporal information of described the second equipment, and according to described very first time information, described the second temporal information and delayed data, calculate the time deviation of described the first equipment and described the second equipment, described delayed data is-symbol is sent to the time of delay of described the second equipment from described the first equipment;
Described the first equipment is adjusted the time of described the first equipment to realize time synchronized according to described time deviation.
In following examples, will be take the first equipment as remote equipment CPE, the second equipment be local side CO equipment as an example, first equipment that it will be understood by those skilled in the art that can be also CO, the second equipment can be CPE.
Fig. 3 is the flow chart of embodiment of the method, be by the clock synchronous of CO to CPE.Specifically comprise:
S101, CO are to CPE transmitting time synchronization request message.
The form embodiment of the present invention of time synchronized request message that CO sends to CPE does not limit, the protocol format that can both identify as long as CO and cpe end.Preferably, the type of message that the form of the time synchronized message that CO sends to CPE forms in EOC (Embedded Operations Channel, embedd operations channel), and send in EOC passage.Wherein, EOC passage is the embedd operations channel in DSL, is the logical data passage for transmitted in both directions control message by the sync byte of DSL frame.EOC is by the Frame of sync byte and data byte composition DSL.
The form of the EOC message defining in DSL standard is as shown in table 1:
Table 1
Bit | Explanation |
Annotation | |
1,2 |
Address field |
00: destination address 01: do not use 10: do not use 11: transmitting terminal address |
3 |
Data/command code |
0: data (reading or writing) 1: command code |
4 |
Very/even bytes |
Send description successive byte for multibyte |
5 |
Automatic message territory |
Be set to 0 transmission " Dying Gasp " message by ATU-R |
6~13 |
Information field |
Data or command code |
In the EOC of standard message, represented the type of EOC message by the message field that is positioned at 6~13 bits, the content that we can define information field in EOC message represents time synchronized request message.In the embodiment of the present invention, utilize reserved command code in the EOC message of standard to carry out the synchronous request message of definition time.CO is as shown in table 2 to the EOC message of CPE transmitting time synchronization request:
Table 2
Bit | Explanation |
Value | |
1,2 |
Address field |
00 |
3 |
Data/operand |
1 |
4 |
Very/even bytes |
0 |
5 |
Automatic message territory |
1 |
6~13 |
Information field |
15
16 |
In table 2, the value 15 of information field
16represent time synchronized request message.
S102, CPE are to CO transmitting time synchronous response message.
CPE receives after the time synchronized request message that CO sends, and to CO end transmitting time synchronous response message, the protocol format embodiment of the present invention of this response message does not limit, the protocol format that can both identify as long as CO and cpe end.CPE can be according to the type of equipment of itself, as whether supported the function of time synchronized, according to factors such as the operating functional requirements of equipment, determines whether to carry out time synchronized, and to CO end transmitting time synchronous response message.
In the embodiment of the present invention, need to carry out time synchronized take cpe end describes as example, if cpe end does not need to carry out time synchronized, send refusal and carry out the response message of time synchronized or do not respond, CO end, receiving after refusal response message, does not carry out operation response.
In the embodiment of the present invention, cpe end need to carry out time synchronized, sends the response message of agreeing to carry out time synchronized, and this response message comprises agrees to carry out the message of time synchronized and the positional information of beating timestamp.
The form of the response message that preferably, CPE sends can be also the protocol type defining in EOC passage.The form of time synchronized response message is with above-mentioned EOC reference format, at the information field of EOC message, need to be by the content of 2 byte representation response messages, and for example, the form of this response message is as shown in table 3:
Table 3
Bit | Explanation |
Value | |
1,2 |
Address field |
00 |
3 |
Data/operand |
0 |
4 |
Very/even bytes |
1 |
5 |
Automatic message territory |
1 |
6~13 |
Information field |
Symbol index byte |
Bit | Explanation |
Value | |
1,2 |
Address field |
00 |
3 |
Data/operand |
0 |
4 |
Very/even bytes |
1 |
5 |
Automatic message territory |
1 |
6~13 |
Information field |
Symbol index byte |
In table 3, two forms represent 2 bytes, these 2 these response messages of byte representation, and wherein, the information field of 6~13 bits in table 3 specifically represents the content of this response message, represents the positional information of beating timestamp.General, in DSL system, CO end and cpe end transmit the base unit that discrete multitone, DMT DMT modulation signal carries out when mutual and are symbol (symbol), and general, CO holds and the number of the symbol that cpe end is mutual is 4000 per second.
Preferably, in the response message of CPE, represent that the positional information of beating timestamp can be: the index value information of symbol, take CPE at the symbol that carries out receiving when time synchronized responds as current symbol, N symbol after current symbol.The positional representation of this dozen of timestamps is beaten timestamp at this N symbol.Wherein, the index value of this symbol is 65535 to the maximum.
In table 3, the value of information field can show the content of response message: if two bytes are all full 0, represent refusal time synchronized; Otherwise, represent with carrying out time synchronized, and two bytes one are used from the index value information that represents symbol.
For example: the value of the information field of the EOC message of CPE transmitting time sync response is: 00011111,11111111, represent that CPE agrees to the time synchronized requirement of CO, and the index value that represents symbol is 8191, represent that the position of beating timestamp is: the 8191st symbol after current symbol beats timestamp.
Because above-mentioned response message forms at EOC, and the message that EOC passage forms needs the chip of DSP to separate frame processing, after separating frame processing, CO end or cpe end just can identify response message, and therefore this solution frame process need regular hour has certain time delay.Therefore the index value of symbol (time that each symbol transmits is 250us) can not be too little, and general, the index value of symbol should be greater than 2048.Like this, receive after the EOC message after parsing when CO end, there will not be the time point of beating timestamp to pass by already, cannot beat timestamp problem.
S103, CO termination are received after the response message of CPE transmission, beat the position of the positional information mark of timestamp and beat time stamp T m1 in response message.
CO end need to carry out after the confirmation response of time synchronized obtaining CPE, according to the positional information of beating timestamp of carrying in response message, beats time stamp T m1 in position accordingly.
CO end is beaten timestamp, is exactly the triggering signal that CO end basis is beaten timestamp, in the time receiving the positional information of beating timestamp of carrying in response message, reads the temporal information of local clock, and temporal information coding is preserved.This positional information can be to beat timestamp at the ad-hoc location of specific symbol, wherein, specifically beat timestamp in which position of symbol, can consult agreement by transmitting terminal CO and receiving terminal CPE both sides, also can be in advance by software set, as long as can keep CO end and cpe end to beat timestamp in the same position of the symbol specifying: original position or end position or other any positions that can be symbol (symbol).
For example, the process that CO beats timestamp is: after the digital signal processing module 201 of CO completes the processing of numerical portion, (comprise data framing, FEC forward error correction, interweave, add cyclic extensions, windowing etc.), to send CO simulation transtation mission circuit 202 to through CO digital signal processing module 201 serial data after treatment, in the time sending the ad-hoc location of described special symbol, generation is read the triggering signal of local time information to CO synchronous processing module 203, 203 dozens of timestamps of triggering synchronous processing module, synchronous processing module 230 is being received triggering signal, read the temporal information Tm1 of CO, and temporal information is encoded and preserve.
S104, CPE beat the position of the positional information mark of timestamp and beat time stamp T s1 in response message.
CPE is receiving after CO transmission symbol, converting serial digital signal to through CPE simulation receiving circuit 207, and serial digital signal is sent to CPE digital signal processing module 208, CPE digital signal processing module 208 completes after Digital Signal Processing and will transmit the time synchronizing module 210 of a triggering signal to cpe end, 210 dozens of time stamp T s1 of triggering synchronous processing module, synchronous processing module 210 is according to trigger command, when receiving after the symbol of positional information mark of beating timestamp in response message, synchronous processing module 210 reads the temporal information of local clock, and temporal information coding is preserved.CPE beats the ad-hoc location of the special symbol in the response message that the position of timestamp is CPE.
S105, CPE receive the Tm1 that CO sends, and calculate the time deviation of the clock of CPE and the clock of CO according to Tm1, Ts1 and delayed data Delay, and adjust the clock of CPE according to the time deviation calculating, to realize time synchronized.
CO, completing after dozen timestamp, sends to CPE by the delayed data Delay of time stamp T m1, CO by EOC passage.CPE is receiving after the time stamp T m1 and Delay of CO end, according to calculating time deviation Offset, wherein, Offset=Ts1-Tm1-Delay.CPE, according to the time deviation offset obtaining, corrects local zone time: Tcpe=Tcpe '-Offset
In above formula, Tcpe ' is the time of CPE before correcting, and Tcpe is the time after CPE corrects, and Offset is the time deviation before CO and CPE correct.By said method, can realize the time synchronized of DSL system.
Wherein, delayed data Delay be Δ t1+ Δ t2+ Δ t3+ Δ t2 '+Δ t1 ' and, wherein, Δ t1 is the time delay of CO digital signal processing module 201, Δ t2 is the time delay of CO simulation transtation mission circuit 202, the circuit delay of Δ t3 down link 21, Δ t2 ' is the time delay of CPE simulation receiving circuit 207, Δ t1 ' is the time delay of CPE digital signal processing module 208.Wherein, Δ t1, Δ t2, Δ t1 ' and Δ t2 can record by measuring instrument, or measure by the mode of emulation.Introduce several method of measurement of circuit delay Δ t3 below.
In the process of above-described embodiment, to CPE transmitting time synchronization request by CO, CPE carries out time synchronized response, and determine the position of beating timestamp in time synchronized response, the ad-hoc location that is carried at special symbol symbol in response message reads CO and CPE local time information separately, above-described embodiment is preferred embodiment, can certainly be arranged in advance by CO and CPE (software set while dispatching from the factory as equipment) and read local time information at the ad-hoc location of special symbol.
Introduce the method for measurement of circuit delay Δ t3 below, the embodiment of the present invention is by DELT (DoubleEnd Line Testing, Dual-Ended Loop Test) or SELT (Single End Line Testing, single end testing) measure, or, circuit delay Delay also can, by measuring, for example, directly obtain by apparatus measures in the time that equipment dispatches from the factory.
Introduce the method that records circuit delay by DELT and SELT below, specific as follows:
1, measure by the method for DELT (Dual-ended Line Testing, Dual-Ended Loop Test).
According to the definition of ITU-T standard A DSL2 (G.992.3), Dual-Ended Loop Test technology DELT arranges test point at circuit two ends, tests this line conditions, and DELT can directly measure Line Attenuation situation, to obtain the length of test line.According to transmission delay corresponding to setting-out line road length, derive circuit delay.
Specifically as shown in Figure 4, CO digital signal processing module 401 by local side sends known signal, through CO simulation transtation mission circuit 402, hybrid circuit 403, arrive the hybrid circuit 404 of user side through down link 41, through CPE simulation receiving circuit 405, CPE digital signal processing module 406, directly measure by the attenuation to known signal, to obtain the length of local side to the circuit of user side, and according to transmission delay corresponding to setting-out line road length, draw the line delay Δ t3 that the embodiment of the present invention needs.
2, obtain by SELT (Single End Line Testing, single end testing is measured).
SELT is single-ended transmitted signal, single-ended reception, thus draw circuit delay.SELT test has two kinds of methods: Time Domain Reflectometry TDR and frequency domain reflection FDR method of measurement.
Specifically as shown in Figure 5, paper is by the time delay of Time Domain Reflectometry TDR measurement circuitry: the CO digital signal processing module 501 of local side sends known signal, respectively through CO simulation transtation mission circuit 502, hybrid circuit 503 and down link 51, then signal is reflected, via up link 51, hybrid circuit 503, CO simulation receiving circuit 504 and CO digital signal processing module 505, digital processing signal processing module 505 is by analyzing with the time domain of reflected signal transmitting, such as detection transmits and the peak value of reflected signal, estimate to obtain line length.
According to transmission delay corresponding to setting-out line road length, draw the line delay Δ t3 that the embodiment of the present invention needs.
Further, above-mentioned line delay can measure by survey tool.
The embodiment of the present invention also provides a kind of time synchronism apparatus of Digital Subscriber Line, and as shown in Figure 6, this device can be arranged in local side apparatus CO to the structural representation of this device, also can be arranged in ustomer premises access equipment CPE.This equipment comprises:
Executive Module 602, reads very first time information during for primary importance receiving on the first symbol.Wherein, Executive Module 602, according to the trigger command of beating timestamp, is receiving after the symbol symbol of described primary importance message identification, reads the temporal information Ts1 of local clock.The same embodiment of the method for this process, specifically beat timestamp in which position of symbol, can consult agreement by transmitting terminal CO and receiving terminal CPE both sides, also can be in advance by software set, as long as can keep CO end and cpe end to beat timestamp in the same position of the symbol specifying.
Synchronization module 603, the Tm1 sending for connecing opposite equip., wherein, described Tm1 is the temporal information that opposite equip. reads in the time of the primary importance sending on described the first symbol, and calculate time deviation according to Tm1, Ts1 and delayed data Delay, and adjust local clock according to described time deviation, realize time synchronized.Wherein, described delayed data is-symbol is sent to the described time of delay to end device from described device.
This device also comprises transceiver module 601, wherein,
Transceiver module 601, the request message of time synchronized sending for receiving opposite equip., and send time synchronized response message, in described time synchronized response message, carry primary importance information.Wherein, the same embodiment of the method for form of the request message of time synchronized and time synchronized response message no longer describes in detail herein.
Preferably, the primary importance information in response message can be: the index value information of symbol, the index value of symbol should be greater than 2048.Like this, receive after the EOC message after parsing when CO end, there will not be the time point of beating timestamp to pass by already, cannot beat timestamp problem.The index value information of symbol is that the symbol receiving in the time that time synchronized responds is current symbol, N symbol after described current symbol.This primary importance information represents that opposite end, in the time receiving this N symbol, reads local zone time, and local zone time is preserved.Wherein, the index value of this symbol is 65535 to the maximum.
Wherein, receiver module 601 can also comprise generation unit 6011, comprises for generating the embedd operations channel response message of agreeing to carry out the information of time synchronized and beating the positional information of timestamp.
Executive Module 602 specifically comprises:
Receiving element 6021, for becoming serial digital signal by the first symbol transition receiving.
Trigger element 6022, in the time receiving the primary importance of described serial digital signal, produces the trigger command of acquisition time information.
Coding unit 6023, for according to the order of described trigger element 6022, reads the described very first time information of local device, and preserves after described very first time information is encoded.
Synchronization module 603 specifically comprises:
Computing unit 6031, for calculating time deviation Offset according to Offset=Ts1-Tm1-Delay;
Time synchronized unit 6032, for the Offset calculating according to computing unit 6031, utilize local zone time with the difference of Offset as the time after synchronizeing, realize time synchronized.Be specially, CPE, according to the time deviation offset obtaining, corrects local zone time: Tcpe=Tcpe '-Offset
In above formula, Tcpe ' is the time of CPE before correcting, and Tcpe is the time after CPE corrects, and Offset is the time deviation before CO and CPE correct.By said method, can realize the time synchronized of DSL system.
The embodiment of the present invention also provides a kind of clock synchronization system of Digital Subscriber Line, comprise local side apparatus CO701 and remote equipment CPE702, in this clock synchronization system, can realize the synchronous remote equipment CPE702 of local side apparatus CO701, also can realize the synchronous local side apparatus CO701 of remote equipment CPE702.Native system embodiment describes as an example of the synchronous CPE702 of CO701 example, and this system as shown in Figure 7.Wherein,
Local side apparatus CO701, for reading the second temporal information when the primary importance sending on the first symbol, and sends to described remote equipment CPE by described the second temporal information.
Remote equipment CPE702, for read very first time information in the time of the primary importance receiving on described the first symbol, and receive the second temporal information that described CO701 sends, and obtain the time deviation of the clock of described CPE702 and the clock of described CO701 according to described very first time information, the second temporal information and delayed data, described delayed data is-symbol is sent to the time of delay of described CPE702 from described CO701, and adjust the clock of described CPE according to the time deviation calculating, to realize time synchronized.
Preferably, in this system, local side apparatus CO701, also for to remote equipment CPE702 transmitting time synchronization request, and receives the time synchronized response message that remote equipment CPE702 sends, and in described time synchronized response message, carries primary importance information.
Remote equipment CPE702, the time synchronized request also sending for receiving local side apparatus CO701, and to local side apparatus CO701 transmitting time synchronous response message, in described time synchronized response message, carry the index value information of described the first symbol.Wherein, beat timestamp positional information require same embodiment of the method, no longer describe in detail herein.
Wherein, local side apparatus CO701 can generate the time synchronized request message of EOC form, and described synchronization request message is sent to remote equipment CPE702, CPE702 generates the time synchronized request response of EOC form, and described time synchronized request response is sent to CO701.The same embodiment of the method for concrete message format no longer describes in detail herein.Preferably, in the response message of CPE702, represent that the positional information of beating timestamp can be: the index value information of symbol.
Remote equipment CPE702 beats time stamp T s1 in the position of described positional information mark of beating timestamp, specifically comprise: the first symbol transition receiving is become serial digital signal by described CPE, and in the time receiving the primary importance of described serial digital, produce the trigger command of acquisition time information, and read the described very first time information Ts1 of local device according to described trigger command.Specifically beat timestamp in which position of symbol, can consult agreement by transmitting terminal CO701 and receiving terminal CPE702 both sides, also can be in advance by software set, as long as can keep CO end and cpe end to beat timestamp in the same position of the symbol specifying: original position or end position or other any positions that can be symbol (symbol).
Remote equipment CPE702 obtains the time deviation of the clock of CPE702 and the clock of CO701 according to Tm1, Ts1 and Delay, and according to the clock of the time deviation adjustment CPE702 calculating, take the detailed process that realizes time synchronized as: CPE702 is receiving after the time stamp T m1 and Delay of CO701 end, according to calculating time deviation Offset, wherein, Offset=Ts1-Tm1-Delay.The time deviation offset that CPE702 basis obtains, synchronous local zone time: Tcpe=Tcpe '-Offset.Wherein obtain the same embodiment of the method for method of Delay.
In above formula, Tcpe ' is the time of CPE702 before synchronous, and Tcpe is the time of CPE after synchronous, and Offset is CO701 and the CPE702 time deviation before synchronous, thereby realizes time synchronized.It should be noted that, in above-described embodiment, if remote equipment CPE702 does not need to carry out time synchronized or does not support time synchronized, time synchronized request is not responded or the message of response reject time synchronized, this embodiment only carries out time synchronized as example take needs.
One of ordinary skill in the art will appreciate that, realize all or part of flow process in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Method, the Apparatus and system of the time synchronized of a kind of the DSL above embodiment of the present invention being provided are described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.