CN101667909A - Clock docking method, clock device and clock docking system - Google Patents

Clock docking method, clock device and clock docking system Download PDF

Info

Publication number
CN101667909A
CN101667909A CN200910093189A CN200910093189A CN101667909A CN 101667909 A CN101667909 A CN 101667909A CN 200910093189 A CN200910093189 A CN 200910093189A CN 200910093189 A CN200910093189 A CN 200910093189A CN 101667909 A CN101667909 A CN 101667909A
Authority
CN
China
Prior art keywords
clockwork
port
notification message
clock
adjacent
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.)
Granted
Application number
CN200910093189A
Other languages
Chinese (zh)
Other versions
CN101667909B (en
Inventor
裴玲
谭伟
陈亘
陈旻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2009100931892A priority Critical patent/CN101667909B/en
Publication of CN101667909A publication Critical patent/CN101667909A/en
Application granted granted Critical
Publication of CN101667909B publication Critical patent/CN101667909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the invention relates to a clock docking method, a clock device and a clock docking system, wherein the method comprises the following steps: receiving notification messages sent from ports of every adjacent clock equipment, wherein the notification messages carries time intervals of the notification messages sent from the ports of the adjacent clock equipment; respectively setting authentication filter windows specific to the ports of the adjacent clock equipment according to the time intervals of the notification messages sent from the ports of the adjacent clock equipment;authorizing and filtering the notification messages of the ports of the adjacent clock equipment according to the authentication filter windows; determining the master-slave status of every port of the clock equipment by adopting the best master clock algorithm, thereby completing docking between the clock equipment and the adjacent clock equipment based on the master-slave status of every port.The embodiment of the invention realizes clock equipment docking under the condition of inconsistent time intervals of the notification messages sent by the ports of clock equipment.

Description

Clock docking calculation, clockwork and clock docking system
Technical field
The embodiment of the invention relates to communication technical field, particularly a kind of clock docking calculation, clockwork and clock docking system.
Background technology
Precision Time Protocol (Precision Time Protocol; Be called for short: PTP), utilize protocol massages to transmit clock synchronization information.The PTP agreement is used for disperseing in network measure and the control system at first, synchronous (frequency and time synchronized) between the clock of independent operating, precision can reach submicrosecond (us) grade.At present, as the important technology of packet network clock, be widely used in field of telecommunications.
The IEEE1588 agreement is to realize the normative reference of PTP agreement, and the grouping clock synchronization implementation procedure of this standard to describe comprises and selects source and two steps of clock synchronization.
Each clockwork in the packet network generally can be with reference to different external clock references, as GPS (Global Position System) (Global Position System; Be called for short: GPS), network real-time protocol (RTP) (NetworkTime Protocol; Be called for short: NTP) etc., at first identify which clockwork and be connected with optimal external clock source, or the priority which clockwork is set up is the highest, this clockwork is called original master clock (GRANDMASTER).After original master clock is determined, need to determine that other clockworks arrive the path of original master clock.From single clockwork angle, whole process is exactly to determine principal and subordinate (MASTER, the SLAVE) state of each port of each clockwork.Fig. 1 is the existing schematic diagram that selects source mechanism, as shown in Figure 1, wherein state 1 initially connects for network, and state 2 is for selecting original master clock and each port status after the source is determined, state 3 is for determining the logical schematic of final principal and subordinate's level, and this principal and subordinate's level is a chain structure.
Select the realization principle of source mechanism to be: behind the electrifying startup, notice (ANNOUNCE) message packet of each clockwork by the IEEE1588 standard definition in the network is notified to adjacent clockwork with own clock attribute information (can comprise that also priority facility, message send interval etc.).The clockwork of receiving ANNOUNCE message begins to carry out best master clock (Best Master Clock; Be called for short: BMC) algorithm specifically comprises:
The first step: based on each port, the clock attribute that all ANNOUNCE message that port is received are carried compares, and determines the outside best ANNOUNCE message that this port is received, i.e. Erbest;
Second step: the Erbest that clockwork is determined each port compares, and determines the outside best ANNOUNCE message that the entire equipment level is received, i.e. Ebest;
The 3rd step: clockwork compares Erbest, Ebest and own original clock attribute information, determine it oneself whether is GRANDMASTER (clock attribute information the highest be GRANDMASTER), and the master slave mode of definite this clockwork subordinate's port, generally be to receive that the port of Ebest is the SLAVE state, stop to send ANNOUNCE message, the port of not receiving Ebest is the MASTER state, continue to send ANNOUNCE message, if the attribute optimum of this clockwork own, then all of the port all is the MASTER state.
Another function of selecting source mechanism is refreshing of data set, what data set was deposited is to put into the clock attribute information that ANNOUNCE message is carried, when Ebest information is better than the clock attribute information of clock itself, the clock attribute information of clock itself will be substituted by the entrained clock attribute information of Ebest, the ANNOUNCE message bearing that follow-up MASTER port sends be clock attribute information after refreshing.The data set refresh function, make select source mechanism to finish after, be the clock attribute information of GRANDMASTER between all clockworks by the transmission of ANNOUNCE message.And the GRANDMASTER variation will cause network to be restrained again.
After selecting the source to finish, determine the clock synchronization level, realized the butt joint of clockwork.Begin to carry out the clock synchronization operation between the clockwork again: the shaking hands of the message by carrying timestamp between principal and subordinate's port of adjacent clockwork, obtain the time migration between the master-slave equipment, the local clock of regulating clockwork is to reach the clock synchronization between the master-slave equipment.
In selecting source mechanism, before the message that each port receives entered the BMC algorithm, for anti-shake demand, port need authenticate each notification message that receives, and the notification message that has only authentication to pass through just can enter follow-up BMC algorithm process.IEEE1588 standard code at present: the time interval that sends a notification message need guarantee the unified configuration of the whole network, when receiving port authenticates notification message, the time span of the authenticated time window that adopts is because be to set according to the time interval that sends a notification message of the unified configuration of the whole network, so also be that the whole network is unified.
The inventor finds prior art at least in realizing process of the present invention there are the following problems at least:
When different clockworks disposes different message transmission time interval values, when the time interval that sends a notification message differs more than 2 times, adopt the IEEE1588 standard techniques, the time interval that then sends a notification message, fast clockwork then can't pass through the notification message authentication that slow clockwork of the time interval that sends a notification message sends, and caused and can't dock.Can't satisfy application request.
Summary of the invention
The embodiment of the invention provides a kind of clock docking calculation, clockwork and clock docking system, differ and exceed the problem that 2 times of clockworks can't dock in order to solve value that notification message sends the time interval of described notification message, under the inconsistent situation of the time interval of the described notification message of transmission of notification message, realize the butt joint of clockwork.
The embodiment of the invention provides a kind of clock docking calculation, comprising:
Receive the notification message of the port transmission of each adjacent clockwork, the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message;
Send time interval of described notification message according to the port of each described adjacent clockwork, the authentication filtering window at the port of each described adjacent clockwork is set respectively;
According to described authentication filtering window the notification message of the port of described adjacent clockwork is authenticated filtration;
Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
The embodiment of the invention provides a kind of clockwork again, comprising:
Receiver module is used to receive the notification message that the port of each adjacent clockwork sends, and the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message;
First is provided with module, is used for sending according to the port of each described adjacent clockwork the time interval of described notification message, and the authentication filtering window at the port of each described adjacent clockwork is set respectively;
To connection module, be used for the notification message of the port of described adjacent clockwork being authenticated filtration according to described authentication filtering window; Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
The embodiment of the invention provides a kind of clock docking system again, comprising: comprising: at least two clockworks, and each clockwork comprises at least one port; Described at least two clockworks comprise first clockwork and the second clock equipment adjacent with described first clockwork;
Described first clockwork is connected with second clock equipment, is used to send a notification message to described second clock equipment, and the port that carries described first clockwork in the wherein said notification message sends the time interval of described notification message;
Described second clock equipment is used to receive the notification message that the port of each adjacent described first clockwork sends; Send time interval of described notification message according to the port of each described first clockwork, the authentication filtering window at the port of each described first clockwork is set respectively; According to described authentication filtering window the notification message of the port of described first clockwork is authenticated filtration, the notification message that passes through according to authentication, adopt the best master clock algorithm to determine the master slave mode of each port of second clock equipment, make described second clock equipment and described first clockwork finish butt joint according to the master slave mode of each port.
The clock docking calculation that the embodiment of the invention provides, clockwork and clock docking system, the time interval that sends a notification message of carrying in the notification message according to the port of each adjacent clockwork is corresponding respectively is provided with the authentication filtering window, under the inconsistent situation of the time interval of the notification message that can send, realize the butt joint of clockwork at the port of each adjacent clockwork.
Description of drawings
Fig. 1 is the existing schematic diagram that selects source mechanism;
Fig. 2 is the flow chart of clock docking calculation first embodiment of the present invention;
Fig. 3 among clock docking calculation first embodiment of the present invention about the schematic diagram of standard;
Fig. 4 a is the schematic diagram of clock docking calculation second embodiment of the present invention;
Fig. 4 b is the flow chart of clock docking calculation second embodiment of the present invention;
Fig. 5 a is the structural representation of clock docking calculation the 3rd embodiment of the present invention;
Fig. 5 b is the schematic flow sheet of clock docking calculation the 3rd embodiment of the present invention;
Fig. 6 is the schematic diagram of clockwork first embodiment of the present invention;
Fig. 7 is the schematic diagram of clockwork second embodiment of the present invention;
Fig. 8 is the structural representation of clock docking system embodiment of the present invention.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Fig. 2 is the flow chart of clock docking calculation first embodiment of the present invention, and as shown in Figure 2, this clock docking calculation comprises:
Step 101, receive the notification message that the port of each adjacent clockwork sends, the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message.
Selecting in the source procedure of packet network, a port of clockwork can receive the notification message of the port transmission of a plurality of adjacent clockworks, wherein, the port of adjacent clockwork generally is the port that points to other adjacent clockworks that this port of this clockwork sends a notification message.
Step 102, send time interval of described notification message, the authentication filtering window at the port of each described adjacent clockwork is set respectively according to the port of each described adjacent clockwork.
In the embodiment of the invention, step 102 is specially: the time interval that sends a notification message of carrying according to each notification message that receives is determined the authentication filtering window, wherein, the time interval that sends a notification message is a field that exists in the form of notification message of standard definition.The port of this clockwork all therefrom extracts the time interval that sends a notification message for the notification message from the port of each adjacent clockwork that receives, and the authentication filtering window of the port correspondence of each adjacent clockwork is set respectively.For example: with reference in the above-mentioned IEEE1588 standard, port can be set to 4 times of the time interval that sends a notification message of the port of this adjacent clockwork at the authentication filtering window of the port of an adjacent clockwork.Certainly, other multiples in the time interval that sends a notification message that the authentication filtering window is set to the port of this adjacent clockwork also are feasible, do not limit in the embodiment of the invention.
Step 103, the notification message of the port of described adjacent clockwork is authenticated filtration according to described authentication filtering window; Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
In by the process of selecting the butt joint of source mechanism realization clock, adopt best master clock algorithm (BMC) algorithm of present IEEE1588 standard, set following two restrictive conditions:
The first, the authentication of best master clock algorithm (BMC) algorithm is filtered and required: the port of clockwork is received 2 notification messages at least at the transmission time interval of 4 notices (ANNOUNCE) message in the cycle, illustrate to authenticate and filter successfully that this notification message just can enter the comparison of BMC algorithm.BMC algorithm authentication is filtered and required main use is message to be carried out anti-shake, avoids causing the error condition of succeeding state machine to switch from the message packet of unstable source device.
The second, the overtime requirement of state machine: port status machine timeout interval is generally the time interval that 3-10 notification message doubly sends described notification message.In case do not receive notification message at timeout interval in the cycle, then port be set to automatically main (MASTER) state.The purposes of the overtime requirement of state machine is to carry out state machine to reset.
In order to satisfy the restrictive condition that first authentication of BMC algorithm is filtered, the embodiment of the invention adopts time interval auto-negotiation mechanism, the port of clockwork is according to the authentication filtering window of the port of each adjacent clockwork, and the notification message that can be respectively the port of each adjacent clockwork be sent authenticates filtration.When the port of a clockwork receives notification message from the port of a plurality of adjacent clockworks, there are a plurality of authentication filtering windows, adopt corresponding authentication filtering window to authenticate filtration to the notification message of the port of the adjacent clockwork of difference.In addition, if the time interval that sends a notification message that a certain notification message carries change also respective change of the setting of Dui Ying authentication filtering window then; But the quantity of filtering window is based on the quantity of the port of adjacent clockwork.
Wherein, in step 103, the port of clockwork can be following example according to described authentication filtering window to the concrete grammar that the notification message of the port of described adjacent clockwork authenticates filtration:
If in described authentication filtering window, receive at least two notification messages of the port of described adjacent clockwork, then the port authentication of described adjacent clockwork filters and passes through.For example: will authenticate 4 times of time interval of being set to send described notification message in the filtering window, then can satisfy this moment and stipulate in first restrictive condition of BMC algorithm in the IEEE1588 standard: the port of clockwork is received 2 notification messages at least in the cycle in the time interval of the described notification message of transmission of 4 notices (ANNOUNCE) message, illustrate to authenticate to filter successfully.
Further, in step 103, adopt the best master clock algorithm to determine the concrete grammar of master slave mode of each port of described clockwork, can comprise:
From the notification message of the port of each described adjacent clockwork of receiving, obtain the best notification message of each port of described clockwork; The best notification message of the port of clockwork can be represented with Erbest, the method of relatively obtaining the Erbest of port is: from all notification messages that this port receives, relatively obtain the highest notification message of clock attribute information, as the Erbest of this port.Wherein the clock attribute information can be parameters such as the precision of clock, deviation, priority.
From the best notification message of described each port of clockwork, obtain the best notification message of described clockwork; The best notification message of clockwork can represent that the method for relatively obtaining the Ebest of clockwork is with Ebest: all the time the Erbest of each port of equipment, relatively obtain the highest Erbest of clock attribute information from this, as this Ebest of equipment all the time.
If the clock attribute information that the best notification message of described clockwork carries is higher than the clock attribute information that described clockwork is provided with, then the best notification message corresponding port of described clockwork is set to from state, and other ports beyond the best notification message corresponding port of described clockwork are set to major state; Wherein, if the clock attribute letter of Ebest is higher than the clock attribute information of the original setting of clockwork, determine that the clockwork of transmission Ebest is original master clock (GRANDMASTER), otherwise determine that this clockwork of reception Ebest is original master clock.
If the clock attribute information that the best notification message of described clockwork carries is lower than the clock attribute information that described clockwork is provided with, then all of the port of described clockwork is set to major state.
For the convergence time of Control Network, present embodiment clock docking calculation can further include:
If the clock attribute information that the best notification message of described clockwork carries is higher than the original clock attribute information of described clockwork, use the time interval of the best notification message of the described clockwork of transmission that carries in the best notification message of described clockwork, upgrade the time interval of the described notification message of transmission that each port data of described clockwork concentrates.
The time interval that each port of clockwork sends a notification message can dynamic refresh, when network convergence, finally can unify the time interval that sends a notification message of disposing to original master clock.Concrete since the time interval that sends a notification message of the notification message of standard code be kept at data centralization, the frequency that sends by the time interval controls real messages that sends a notification message.This time interval that sends a notification message of primary standard regulation is a static configuration, and the embodiment of the invention also refreshes this time interval that sends a notification message that data are concentrated then behind the BMC algorithm.Concrete refresh scheme is as follows:
(1) if through the BMC algorithm relatively after, the default value (D0) that the best notification message (Ebest) of clockwork is better than clockwork is the original clock attribute information of clock equipment, then uses the time interval that sends a notification message of carrying in the best notification message of clockwork to replace the time interval that sends a notification message of the concentrated correspondence of each port data of clockwork.Represent that the time interval that sends a notification message of new notification message is controlled by the best notification message of clockwork, the time interval that sends a notification message of carrying in the new notification message also is the value after refreshing.
(2) if Ebest is not better than D0, then the numerical value of data centralization adopts the default value (D0) of clockwork, and the time interval that promptly sends a notification message is controlled by the default configuration of clockwork.
In addition, when each port power-up initializing of clockwork, the time interval that sends a notification message of each port can be the default value D0 of this clockwork static configuration.
Again further, in order to satisfy second restrictive condition in the BMC algorithm, thereby the port state machine is resetted, the embodiment of the invention is provided with the timeout interval of port status machine, concrete grammar comprises: in the time interval of the best notification message of the port of the described clockwork of transmission that carries in the best notification message according to the port of described clockwork, the timeout interval of the port status machine of described clockwork is set; If in described timeout interval, the port status machine of described clockwork does not receive the announcement information that the port of described adjacent clockwork sends, then with the major state that is reset to of the port status machine of described clockwork.
Particularly, the embodiment of the invention adopts timeout interval auto-negotiation mechanism, in the time interval that sends a notification message of carrying in the best notification message (Erbest) according to port, timeout interval is set.For example: the time interval that sends a notification message that the timeout interval of port status machine is made as 3-10 Erbest doubly.When the best notification message of port was sky, timeout interval was provided with according to the default value (D0) of this port.Because the best notification message of each port of clockwork refreshes according to the BMC algorithm, and is used for follow-up comparison always, even port receives a plurality of notification messages, other notification messages except the best notification message of port are nugatory.If the best notification message of current port changes, the best notification message that new port also can occur, if there is not the best notification message of port, represent that promptly port do not receive the notification message of any authentication, this port status can consider to be reset to main (MASTER) state so.
In the clock system of loop configuration, the port status machine is the process from the recommendation state to major state, exist a major state authenticated time at interval, this major state authenticated time mainly is to guarantee that notification message from original master clock to this port is that the best notification message of port can arrive this port at the major state authenticated time at interval at interval, with the stability of Guarantee Status switching.The embodiment of the invention is provided with major state authenticated time method at interval and specifically comprises: the time interval of the best notification message of the port of the described clockwork of transmission that carries in the best notification message according to the port of described clockwork, be provided with described clockwork port the major state authenticated time at interval, make described clockwork port best notification message the major state authenticated time at interval in the port of the described clockwork of arrival.
Fig. 3 among clock docking calculation first embodiment of the present invention about the schematic diagram of standard, as shown in Figure 3, specifically comprise:
Step 201, receive notification message 1 from the port one of adjacent clockwork;
The time interval field of carrying in step 202, the extraction notification message 1, what time interval field comprised is the time interval that sends this notification message 1;
Whether step 203, judgement receive 2 notification messages 1 in the time interval of 4 notification messages 1, if, illustrate that the authentication of notification message 1 is filtered successfully, then execution in step 204; Judge in the present embodiment that whether receiving 2 notification messages 1 in time interval of 4 notification messages 1 only is a kind of example, it or not restriction, the time interval authentication authorization and accounting filtering window of 4 notification messages, wherein 4 do not limit to a number or amount, also can specifically be provided with according to concrete demand for for example 3,5,6 of other quantity etc.
Wherein step 201 to step 203 can be corresponding replace with following steps 201 ' to step 203 ':
Step 201 ', receive notification message N from the port N of adjacent clockwork.
Step 202 ', extract the time interval field of carrying among the notification message N; Wherein, the time interval of the notification message of the port of different adjacent clockworks transmission can be different.
Step 203 ', judge in the time interval of 4 notification message N, whether to receive 2 notification message N, if, illustrate that the authentication of notification message N is filtered successfully, then execution in step 204.
Step 204, execution BMC algorithm: the best notification message (Erbest) that carries out port compares, and obtains the Erbest of port; Execution in step 205 and step 208 then.
Step 205, execution BMC algorithm: (Ebest) comparison of best notification message and the state machine algorithms of carrying out clockwork; Obtain the Ebest of clockwork; The port that receives Ebest on the clockwork is changed to from state, stops to send a notification message; Other ports are changed to major state, continue to send a notification message.
Step 206, judge whether the Ebest of clockwork is better than clockwork self original value (D0), if then execution in step 207.
Step 207, data set upgrade.Data set to each port of clockwork upgrades, and except parameters such as refresh clock attribute information, also needs to upgrade the time interval that sends message.
In addition, after execution in step 204, obtained after the Erbest of port, based on the Erbest of port, execution in step 208.
The time interval of transmission Erbest among the Erbest of step 208, extraction port, the major state authenticated time interval of calculating the timeout interval and the state of recommendation of this port based on the Erbest of port.
The time interval that sends a notification message of carrying in the notification message of present embodiment according to the port of each adjacent clockwork is corresponding respectively is provided with the authentication filtering window, under the inconsistent situation of the time interval of the notification message that can send, realize the butt joint of clockwork at the port of each adjacent clockwork; The mode of the time interval dynamic refresh that sends a notification message by employing makes that the convergence time of network is controlled; The time interval that sends based on the best notification message of port is provided with timeout interval, the time interval that can utilize the best notification message of port to send, the resetting of control port state machine; The time interval that sends based on the best notification message of port is provided with the major state authenticated time at interval, can guarantee the stability that loop network middle port state switches.
Fig. 4 a is the schematic diagram of clock docking calculation second embodiment of the present invention, shown in Fig. 4 a, on the basis of clock docking calculation first embodiment of the present invention, network form with the simplest two clockworks butt joint is that example describes, wherein the time interval initial static value of the notice of clockwork A1 (Announce) message transmission is 4 seconds, the Announce message interval initial static value of clockwork A2 is 1 second, and clockwork A1 connects Primary reference clock (the Primary Reference Clock of external reference; Be called for short: PRC) be GPS, clockwork A2 reference source is the internal clocking self-vibration.
Fig. 4 b is for the flow chart of clock docking calculation second embodiment of the present invention, shown in Fig. 4 b.This clock docking calculation may further comprise the steps:
Behind step 301, the electrifying startup, the port of clockwork A1 and clockwork A2 all is in main (MASTER) state, and Announce message is sent out in beginning mutually.Wherein, clockwork A1 sends Announce message 1 to clockwork A2, and time interval 1 of the transmission Announce message 1 of configuration is passed to clockwork A2, and clockwork A1 sent an Announce message 1 in per 4 seconds; Clockwork A2 sends Announce message 2 to clockwork A1, and time interval 2 of the transmission Announce message 2 of configuration is passed to clockwork A1, and clockwork A2 sent an Announce message 2 in per 1 second; Wherein, Announce message 1 or 2 form all adopt the form of EEE1588 standard definition.At this moment, because the port BMC algorithm of clockwork A1 and clockwork A2 is not carried out as yet, therefore, the best notification message (Erbest) of port and the best notification message (Ebest) of clockwork are empty (NULL), at this moment, the authentication filtering window of port also is NULL, timeout interval can be set to 3 times of time interval static configuration value that each port sends a notification message, generally speaking, the time interval that the state authenticated time equals to send a notification message at interval be multiply by the value after " jumping figure in the message that receives+1 ", recommends the major state authenticated time of state can be set to NULL or 0 at interval.
Step 302, the authentication filtering window of each port is set.Receive the Announce message 1 of clockwork A1 transmission at clockwork A2 after, extract the time interval 1 that sends Announce message 1, it is 4 seconds, the authentication filtering window of the port of corresponding clockwork A1 is set to 4 * 4=16 second, at this moment, with respect to the port of clockwork A2, the port of clockwork A1 is the port of adjacent clockwork.Receive the Announce message 2 of A2 transmission at clockwork A1 after, extract the time interval 2 that sends Announce message 2, it is 1 second, the authentication filtering window of the port of corresponding clockwork A2 is set to 4 * 1=4 second, at this moment, with respect to the port of clockwork A1, the port of clockwork A2 is the port of adjacent clockwork.
Step 303, clockwork A1 be according to the authentication filtering window of clockwork A2 port, and 2 Announce message 2 of clockwork A2 are authenticated filtration.In the authentication filtering window (4s) of clockwork A2 correspondence, after supposing 2 seconds, clockwork A1 receives 2 Announce message 2 from clockwork A2, think that then Announce message 2 that the port of clockwork A2 sends passed through authentication and filtered, Announce message 2 is sent into BMC algorithm Executive Module; And this moment, clockwork A2 was in the state that continues the authentication filtration.
Step 304, clockwork A1 carry out the BMC algorithm of IEEE1588 definition to Announce message 2, because the clock source of clockwork A1 is GPS, the clock source of clockwork A2 is the internal clocking self-vibration, therefore can determine that the clock attribute of clockwork A1 self is better than clockwork A2, then the port of clockwork A1 maintains main (MASTER) state, continues to send Announce message 1 to clockwork A2; Because the port of clockwork A1 is only received the Announce message 2 from clockwork A2, so clockwork A1 is Announce message 2, and timeout interval is set to the time interval 2 of 3 times transmission Announce message 2, i.e. 3 * 1=3 second; The major state authenticated time is set to the time interval 2 that sends Announce message 2, promptly 1 second;
Step 305, clockwork A2 be according to the authentication filtering window of clockwork A2 port, and the Announce message 1 of clockwork A1 is authenticated filtration.In the authentication filtering window (16s) of clockwork A1 correspondence, after supposing 8 seconds, clockwork A2 has received 2 Announce message 1 that clockwork A1 sends, then, Announce message 1 is sent into BMC algorithm Executive Module to thinking that Announce message 1 that clockwork A1 sends passed through authentication and filtered.
Step 306, clockwork A2 carry out the BMC algorithm of IEEE1588 definition to Announce message 1, the clock attribute of determining clockwork A2 is inferior to clockwork A1, then the port of clockwork A2 maintains the SLAVE state, stops to continue to send Announce message 2 to A1.Because the port of clockwork A2 is only received the Announce message 1 from clockwork A1, and clockwork A2 has only a port, then the Erbest of clockwork A2 and Ebest are Announce message 1, the timeout interval of clockwork A2 is set to the time interval 1 of 3 times transmission Announce message 1, i.e. 3 * 4=12 second; The major state authenticated time is set to the time interval 2 that sends Announce message 1, promptly 4 seconds.
Through above-mentioned step, clockwork A1 and clockwork A2 have finished the definite of port master slave mode, and promptly network is restrained; Clockwork A1 is in the MASTER state, continue to send Announce message 1 with 4 second cycle, and clockwork A2 is in the SLAVE state, stops to send Announce message 2;
In addition, if the link instability of network, cause losing from the Announce message 1 of clockwork A1, if in authentication filtering window 16 seconds, clockwork A2 detects and receives that the Announce message 1 from clockwork A1 is less than 2, then think to authenticate to filter and do not pass through, Announce message 1 can not delivered to BMC algorithm Executive Module.
Simultaneously, if the port status machine of clockwork A2 detects the Announce message 1 that timeout interval does not receive the transmission of any A1 in 12 seconds, then the port of clockwork A2 automatically resets, and enters the MASTER state, and beginning outwards sends Announce message 2; Receive Announce message 1 in 12 seconds if the machine examination of clockwork A2 port status measures, then state is constant.
Owing to have only a jumping between the clockwork A2 of present embodiment and the clockwork A2, then network convergence time can be judged at interval based on the port of the equipment that connects optimum clock source, promptly 4 seconds * 2.
Present embodiment can be realized the butt joint of clockwork by the authentication filtering window is set flexibly under the inconsistent situation of the time interval of the Announce message that each port sends; The mode of the time interval dynamic refresh that sends a notification message by employing makes that the convergence time of network is controlled.
Fig. 5 a is the structural representation of clock docking calculation the 3rd embodiment of the present invention, shown in Fig. 5 a, on the basis of clock docking calculation first embodiment of the present invention, the network form that forms chain with a plurality of clockworks is that example describes, wherein the port P1 of clockwork A1 communicates by letter with the port P2 of clockwork A2, the port P3 of clockwork A2 communicates by letter with the port P4 of clockwork A3, wherein two between the equipment farthest distance jump greater than one.
Fig. 5 b is the schematic flow sheet of clock docking calculation the 3rd embodiment of the present invention, and this clock docking calculation may further comprise the steps shown in Fig. 5 b:
Behind step 401, the electrifying startup, all of the port P1/P2/P3/P4 of all clockworks is in main (MASTER) state in the network, and beginning is sent out Announce message mutually to adjacent port.
Wherein clockwork A1 sends Announce message 1 by port P1 to the port P2 of clockwork A2, time interval 1 of transmission Announce message 1 of configuration is passed to clockwork A2, the time interval 1 that sends Announce message 1 is 10 seconds, i.e. Announce message 1 of clock device A 1 transmission in per 10 seconds;
Clockwork A2 sends Announce message 2 by port P2 to clockwork A1 and A3, time interval 2 of transmission Announce message 2 of configuration is passed to clockwork A1 and A3, the time interval 2 that sends Announce message 2 is 5 seconds, i.e. Announce message 2 of clock device A 2 transmissions in per 5 seconds;
Clockwork A3 sends Announce message 3 by port P4 to the port P3 of clockwork A2, time interval 3 of transmission Announce message 3 of configuration is passed to clockwork A2, the time interval 3 that sends Announce message 3 is 1 second, i.e. Announce message 3 of clock device A 3 transmissions in per 1 second;
Because this moment, the BMC algorithm of each port was not carried out as yet, so the Erbest of each port and the Ebest of each equipment are empty (NULL), at this moment, the port authentication filtering window is NULL, 3 times of the time interval static configuration value that sends a notification message that this port can each port timeout interval be set are set to the major state authenticated time time interval static configuration value that sends a notification message of this port.
Step 402, the authentication filtering window of the port of each adjacent clockwork is set.If the port of each clockwork is received the Announce message that the port of the adjacent clockwork of neighbouring device sends, with the authentication filtering window that is provided with respectively at the port of each adjacent clockwork, for example:
Port P1 receives the Announce message 2 that port P2 sends, and is set to 5 seconds * 4=20 second at the authentication filtering window of port P2; At this moment, with respect to clockwork A1, port P1 is the port of clockwork A1, and port P2 is the port of adjacent clockwork A2.
Port P2 receives the Announce message 1 that port P1 sends, and is set to 10 seconds * 4=40 second at the authentication filtering window of port P1; At this moment, with respect to clockwork A2, port P2 is a clockwork A2 port, and port P1 is the port of adjacent clockwork A1.
Port P3 receives the Announce message 3 that port P4 sends, and is set to 1 second * 4=4 second at the authentication filtering window of port P4; At this moment, with respect to clockwork A2, port P3 is a clockwork A2 port, and port P4 is the port of adjacent clockwork A3.
Port P4 receives the Announce message 2 that port P3 sends, and is set to 5 seconds * 4=20 second at the authentication filtering window of port P3.At this moment, with respect to clockwork A3, port P4 is a clockwork A3 port, and port P3 is the port of adjacent clockwork A2.
Step 403, port P3 be according to the authentication filtering window of the port P4 of clockwork A3, and the Announce message 3 of port P4 is authenticated filtration.In authentication filtering window (4s) at the port P4 of clockwork A3, when supposing the 2nd second, port P 3 has received 2 Announce message 3 from the port P4 of clockwork A3, then the Announce message 3 that the port P4 of clockwork A3 is sent has been passed through authentication and has been filtered, and Announce message 3 is sent into BMC algorithm Executive Module; And this moment, clockwork A1 and A2 were in the continuation authentication state.
Step 404, clockwork A2 carry out the BMC algorithm of IEEE1588 definition to Announce message 3, if determine that clockwork A2 self clock attribute is inferior to clockwork A3, then the port P3 of clockwork A2 maintains the state from (SLAVE), stops to continue to send Announce message 2 to clockwork A3.
Because at present port P3 only receives the Announce message 3 from clockwork A 3, then the Erbest of port P3 is an Announce message 3, can timeout interval be set to send 3 times of the time interval 3 of Announce message 3, promptly 3 seconds; The major state authenticated time of port P3 is set to the time interval 3 that sends Announce message 3, promptly 1 second.
In addition, the Ebest of clockwork A2 also is the Announce message 3 from clockwork A3 at this moment, so the time intervals 3 of the transmission Announce message 3 that Announce message 3 can be carried substitute the time interval 2 of the original transmission Announce message 2 of clockwork A2.
The port P2 of step 405, clockwork A2 sends Announce message 2 by the port P1 to clockwork A1, the time interval 3 of the transmission Announce message 2 after will refreshing passes to clockwork A1, the time interval of the transmission Announce message 2 of this moment is 1 second, and promptly per 1 second port P1 to clockwork A1 of the port P2 of clock device A 2 sends an Announce message 2;
Step 406, port P1 reset at the setting of port P2 authentication filtering window after receiving Announce message 2 behind the refreshing that the port P2 of clockwork A2 sends, and for example: the authentication filtering window at port P2 is set to 1 second * 4=4 second.
Step 407, port P1 be according to the authentication filtering window of the port P2 of clockwork A2, and the Announce message 2 of port P2 is authenticated filtration.In authentication filtering window (4s) at port P2, when supposing the 3rd second, the port P1 of clockwork A1 has received 2 Announce message 2 from the port P2 of clockwork A2, can think that then the Announce message 2 that the port P2 of clockwork A2 is sent passed through authentication and filtered, Announce message 2 is sent into BMC algorithm Executive Module; Clockwork A1 carries out the BMC algorithm of IEEE1588 definition, determines that self clock attribute of clockwork A1 is better than clockwork A2, and then port P1 maintains main (MASTER) state, continues to send Announce message 1 to clockwork A2, and other configurations are constant.
Step 408, port P2 be according to the authentication filtering window of the port P1 of clockwork A1, and the Announce message 1 of port P1 is authenticated filtration.In authentication filtering window (4s) at port P1, when supposing the 20th second, the port P2 of clockwork A2 has received 2 Announce message 1 from the port P1 of clockwork A1, can think that then the Announce message 1 that the port P1 of clockwork A1 is sent passed through authentication and filtered, Announce message 1 is sent into BMC algorithm Executive Module; A2 carries out the BMC algorithm of IEEE1588 definition, determines that the clock attribute of clockwork A1 is better than clockwork A2, and then port P2 is arranged on the SLAVE state, stops to send out Announce message 2 to clockwork A1; Port P3 is arranged on the MASTER state, continues to send Announce message 2 to clockwork A3.
Because this moment, port P2 only received the Announce message 1 from clockwork A1, then the Erbest of port P2 is an Announce message 1, can timeout interval be set to send 3 times of the time interval 1 of Announce message 1, promptly 30 seconds; The major state authenticated time is set to the time interval 1 that sends Announce message 1, promptly 10 seconds.
In addition, the Ebest of clockwork A2 is the Announce message 1 from clockwork A1, substitutes time interval 3 of the current transmission Announce message 2 of clockwork A2 so Announce message 1 is carried the time interval 1 that sends Announce message 1;
The time interval 1 of the transmission Announce message 2 after the port P3 of step 409, clockwork A2 will refresh by Announce message 2 passes to the port P4 of clockwork A3, the time interval that send Announce message 2 this moment is 10 seconds, and promptly per 10 seconds port P4 to clockwork A3 of the port P3 of clock device A 2 send an Announce message 2.
The port P4 of step 410, clockwork A3 resets the authentication filtering window at port P3 after receiving the new Announce message 2 that the port P3 of A2 sends, and for example: the authentication filtering window at port P3 is set to 10 seconds * 4=4 second;
Step 411, port P4 be according to the authentication filtering window of the port P3 of clockwork A2, and the Announce message 2 of port P3 is authenticated filtration.In authentication filtering window (4s) at port P3, when supposing the 40th second, port P4 has received 2 Announce message 2 from the port P3 of clockwork A2, then the Announce message 2 that the port P3 of clockwork A2 is sent is filtered by authentication, and Announce message 2 is sent into BMC algorithm Executive Module; Clockwork A3 carries out the BMC algorithm of IEEE1588 definition, determines that the clock attribute of clockwork A2 is better than clockwork A3, and then port P4 is arranged on the SLAVE state, stops to send out message.
Because port P4 only receives Announce message 2 from clockwork A2, then the Erbest of port P4 is an Announce message 2, can timeout interval be set to 3 times of the time interval 1 of current transmission Announce message 2, promptly 30 seconds; With the major state authenticated time be set to current transmission Announce message 2 the time interval 1, promptly 10 seconds.
In addition, the Ebest of clockwork A3 is the Announce message 2 from clockwork A2, so the time interval 1 of the transmission Announce message 2 that Announce message 2 is carried substitutes the time interval 3 of the original transmission Announce message 3 of clockwork A3.
At this moment, the whole network convergence finishes, and principal and subordinate's level of each port of clockwork is determined to finish.
Present embodiment can be realized the butt joint of clockwork by the authentication filtering window is set flexibly under the inconsistent situation of the time interval of the Announce message that each port sends; The mode of the time interval dynamic refresh that sends a notification message by employing, make complex network as: the convergence time of the networking that jumping figure is more is controlled.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Fig. 6 is the schematic diagram of clockwork first embodiment of the present invention, and as shown in Figure 6, this clockwork comprises: receiver module 61, first is provided with module 63 and to connection module 65.
Wherein, receiver module 61 is used to receive the notification message that the port of each adjacent clockwork sends, and the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message;
First is provided with module 63, is used for sending according to the port of each described adjacent clockwork the time interval of described notification message, and the authentication filtering window at the port of each described adjacent clockwork is set respectively;
To connection module 65, be used for the notification message of the port of described adjacent clockwork being authenticated filtration according to described authentication filtering window; Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
Particularly, selecting in the source procedure of packet network, behind the notification message that the port of receiver module 61 each adjacent clockworks of reception sends, first is provided with the time interval that sends a notification message of carrying in the port notification message of module 63 according to each adjacent clockwork, authentication filtering window at the port of each adjacent clockwork is set, for example: 4 times of the time interval that sends a notification message that can be set to the port of this adjacent clockwork respectively at the authentication filtering window of the port of an adjacent clockwork.Connection module 65 is authenticated filtration according to described authentication filtering window to the notification message of the port of adjacent clockwork, the notification message that passes through is filtered in authentication carry out the best master clock algorithm, with the master slave mode of each port of determining described clockwork.When the port of a clockwork receives notification message from the port of a plurality of adjacent clockworks, there are a plurality of authentication filtering windows, adopt corresponding authentication filtering window to authenticate filtration to the notification message of the port of the adjacent clockwork of difference.In addition, if the transmission time interval that a certain notification message carries changes, also respective change of the setting of Dui Ying authentication filtering window then; But the quantity of filtering window is based on the quantity of the port of adjacent clockwork.Wherein, receiver module 61, first is provided with module 63 and can be arranged on the clockwork to connection module 65, also can be arranged on each port of clockwork, perhaps receiver module 61, first is provided with on each port that module 63 is arranged on clockwork, and will be arranged on the clockwork connection module 65.Receiver module 61, first is provided with module 63 and connection module 65 is finished the method for clockwork butt joint can be with reference to the associated description among clock docking calculation first, second, third embodiment of the present invention.
The time interval that present embodiment first is provided with the described notification message of transmission that carries in the notification message of module according to the port of each adjacent clockwork is corresponding respectively is provided with the authentication filtering window, can under the inconsistent situation of the time interval of the notification message that the port of each adjacent clockwork sends, realize the butt joint of clockwork to connection module.
Fig. 7 is the schematic diagram of clockwork second embodiment of the present invention, as shown in Figure 7, on the basis of clockwork first embodiment of the present invention, specifically can comprising of this clockwork: filter submodule 650 to connection module 65, be used for if in described authentication filtering window, receive at least two notification messages of the port of described adjacent clockwork, then the port authentication of described adjacent clockwork filters and passes through.If will authenticate 4 times that are set to time interval of sending a notification message in the filtering window, can satisfy and stipulate in first restrictive condition in the IEEE1588 standard: the port of clockwork receives 2 notification messages at least in the cycle in the time interval of the described notification message of transmission of 4 notices (ANNOUNCE) message, illustrates that authentication filters successfully.
Further, can also comprise connection module 65: first obtains submodule 651, second obtains submodule 653, the first state subgroup module 655 and the second state subgroup module 657.
Wherein, first obtains submodule 651, is used for obtaining from the notification message of the port of each described adjacent clockwork of receiving the best notification message of each port of described clockwork;
Second obtains submodule 653, is used for obtaining from the best notification message of described each port of clockwork the best notification message of described clockwork;
The first state subgroup module 655, be used for if the clock attribute information that the best notification message of described clockwork carries is higher than the clock attribute information that described clockwork is provided with, then the best notification message corresponding port of described clockwork is set to from state, and other ports beyond the best notification message corresponding port of described clockwork are set to major state;
The second state subgroup module 657 is used for if the clock attribute information that the best notification message of described clockwork carries is lower than the clock attribute information that described clockwork is provided with, and then all of the port of described clockwork is set to major state.
Particularly, according to the clock attribute information that carries in the notification message for example: data such as the precision of clock, deviation, priority height, the height of the clock attribute information that carries between the different notification messages be can judge, the clock attribute information that carries in the optimum notification message of clockwork and the height of clockwork original clock attribute information also can be judged.
For convergence time that can Control Network, the present embodiment clockwork further, can also comprise:
Update module 66, be used for if the clock attribute information that the best notification message of described clockwork carries is higher than the original clock attribute information of described clockwork, use the time interval of the best notification message of the described clockwork of transmission that carries in the best notification message of described clockwork, upgrade the time interval of the described notification message of transmission that each port data of described clockwork concentrates.The time interval that each port of clockwork sends a notification message can dynamic refresh, when network convergence, finally can unify the time interval that sends a notification message of disposing to original master clock.Concrete since the time interval that sends a notification message of the notification message of standard code be kept at data centralization, the frequency that sends by the time interval controls real messages that sends a notification message.Update module 66 can be with reference to the associated description among clock docking calculation first, second, third embodiment of the present invention for the method for the time interval dynamic refresh that each port of clockwork sends a notification message.
Again further, for the port state machine is resetted, this clockwork can also comprise: second is provided with module 67, in the time interval of best notification message that is used for the port of the described clockwork of transmission that the best notification message according to the port of described clockwork carries, the timeout interval of the port status machine of described clockwork is set;
Reseting module 68 is used for if in described timeout interval, and the port status machine of described clockwork does not receive the announcement information that the port of described adjacent clockwork sends, then with the major state that is reset to of the port status machine of described clockwork.
Particularly, obtain submodule 651 can obtain the port of clockwork from the notification message of the port of each adjacent clockwork of receiving best notification message (Erbest) first, second is provided with the time interval of module 67 according to the transmission Erbest that carries among the Erbest, and the timeout interval of each port is set.For example: the timeout interval of port status machine is made as the time interval that sends a notification message of carrying among the 3-10 Erbest doubly.When Erbest was sky, timeout interval was provided with according to the default value (D0) of this port of clockwork.Because Erbest refreshes according to the BMC algorithm, and is used for follow-up comparison always, even this port of clockwork receives a plurality of notification messages, other notification messages except Erbest are nugatory.If current Erbest changes, also new Erbest can appear, if there is not Erbest, represent that promptly this port of clockwork is not received the notification message of any authentication, this port status of clockwork can consider to be reset to main (MASTER) state so.
In addition, in the clock system of loop configuration, this port status machine of clockwork is the process from the recommendation state to major state, exist a major state authenticated time at interval, this major state authenticated time mainly is to guarantee that the notification message of this port from original master clock to clock equipment can arrive this port of clockwork in timeout interval at interval, with the stability of Guarantee Status switching.For the major state authenticated time being set at interval, this clockwork can also comprise:
The 3rd is provided with module 69, the time interval of best notification message that is used for the port of the described clockwork of transmission that the best notification message according to the port of described clockwork carries, be provided with described clockwork port the major state authenticated time at interval, make described clockwork port best notification message the major state authenticated time at interval in the port of the described clockwork of arrival.Particularly, obtain submodule 651 obtains Erbest from the notification message of the port of each adjacent clockwork of receiving after first, the 3rd is provided with the time interval of module 69 according to the transmission Erbest that carries among the Erbest, and the major state authenticated time interval of port is set.
Present embodiment first be provided with module according to time interval that sends a notification message of the notification message of the port of each adjacent clockwork corresponding respectively the authentication filtering window is set, under the inconsistent situation of the time interval of the notification message that can send at the port of each adjacent clockwork each submodule of connection module, realize the butt joint of clockwork; Update module makes the convergence time of network controlled by the time interval dynamic refresh to sending a notification message; Second time interval that the transmission Erbest that carries in the best notification message (Erbest) of module based on the port of clockwork is set was provided with timeout interval, reseting module can utilize the time interval of the transmission Erbest that carries among the Erbest, the resetting of port status machine of control clockwork; The 3rd is provided with module is provided with the major state authenticated time at interval based on time interval of the transmission Erbest that carries among the Erbest, can guarantee the stability that the port status of clockwork in the loop network switches.
Fig. 8 is the structural representation of clock docking system embodiment of the present invention, and as shown in Figure 8, this clock docking system comprises at least two clockworks, and each clockwork comprises at least one port; Wherein at least two clockworks comprise first clockwork 81 and and the second clock equipment 82 adjacent with first clockwork 81;
Wherein, first clockwork 81 is connected with second clock equipment 82, is used to send a notification message to second clock equipment 82, and the port that carries first clockwork 81 in the wherein said notification message sends the time interval of described notification message;
Second clock equipment 82 is used to receive the notification message that the port of each first adjacent clockwork 81 sends; Send time interval of described notification message according to the port of each first clockwork 81, the authentication filtering window at the port of each first clockwork 81 is set respectively; According to described authentication filtering window the notification message of the port of first clockwork 81 is authenticated filtration, the notification message that passes through according to authentication, adopt the best master clock algorithm to determine the master slave mode of each port of second clock equipment, make the second clock equipment 82 and first clockwork 81 finish butt joint according to the master slave mode of each port.
First, second clockwork can adopt the clockwork of any one structure among first, second embodiment of clockwork of the present invention in the present embodiment, and the concrete grammar that clockwork docks can be with reference to the associated description among clock docking calculation of the present invention first, second and the 3rd embodiment.
In the present embodiment, the time interval that sends a notification message of carrying in the notification message of second clock equipment according to the port of each first adjacent clockwork is corresponding respectively is provided with the authentication filtering window, under the inconsistent situation of the time interval of the notification message that can send at the port of each first adjacent clockwork, determine the master slave mode of first, second each port of clockwork, thereby realize the butt joint between the clockwork.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1, a kind of clock docking calculation is characterized in that, comprising:
Receive the notification message of the port transmission of each adjacent clockwork, the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message;
Send time interval of described notification message according to the port of each described adjacent clockwork, the authentication filtering window at the port of each described adjacent clockwork is set respectively;
According to described authentication filtering window the notification message of the port of described adjacent clockwork is authenticated filtration;
Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
2, clock docking calculation according to claim 1 is characterized in that, describedly according to described authentication filtering window the notification message of the port of described adjacent clockwork is authenticated filtration, comprising:
If in described authentication filtering window, receive at least two notification messages of the port of described adjacent clockwork, then the port authentication of described adjacent clockwork filters and passes through.
3, clock docking calculation according to claim 1 and 2 is characterized in that, described employing best master clock algorithm is determined the master slave mode of each port of described clockwork, comprising:
From the notification message of the port of each described adjacent clockwork of receiving, obtain the best notification message of each port of described clockwork;
From the best notification message of described each port of clockwork, obtain the best notification message of described clockwork;
If the clock attribute information that the best notification message of described clockwork carries is higher than the clock attribute information that described clockwork is provided with, then the best notification message corresponding port of described clockwork is set to from state, and other ports beyond the best notification message corresponding port of described clockwork are set to major state;
If the clock attribute information that the best notification message of described clockwork carries is lower than the clock attribute information that described clockwork is provided with, then all of the port of described clockwork is set to major state.
4, clock docking calculation according to claim 3 is characterized in that, also comprises:
If the clock attribute information that the best notification message of described clockwork carries is higher than the original clock attribute information of described clockwork, use the time interval of the best notification message of the described clockwork of transmission that carries in the best notification message of described clockwork, upgrade the time interval of the described notification message of transmission that each port data of described clockwork concentrates.
5, clock docking calculation according to claim 3 is characterized in that, also comprises:
In the time interval of the best notification message of the port of the described clockwork of transmission that carries in the best notification message according to the port of described clockwork, the timeout interval of the port status machine of described clockwork is set;
If in described timeout interval, the port status machine of described clockwork does not receive the announcement information that the port of described adjacent clockwork sends, then with the major state that is reset to of the port status machine of described clockwork.
6, according to claim 1,2,4 or 5 described clock docking calculations, it is characterized in that, also comprise:
The time interval of the best notification message of the port of the described clockwork of transmission that carries in the best notification message according to the port of described clockwork, be provided with described clockwork port the major state authenticated time at interval, make described clockwork port best notification message the major state authenticated time at interval in the port of the described clockwork of arrival.
7, a kind of clockwork is characterized in that, comprising:
Receiver module is used to receive the notification message that the port of each adjacent clockwork sends, and the port that carries described adjacent clockwork in the described notification message sends the time interval of described notification message;
First is provided with module, is used for sending according to the port of each described adjacent clockwork the time interval of described notification message, and the authentication filtering window at the port of each described adjacent clockwork is set respectively;
To connection module, be used for the notification message of the port of described adjacent clockwork being authenticated filtration according to described authentication filtering window; Pass through when the port authentication filtration of described adjacent clockwork, then adopt the best master clock algorithm to determine the master slave mode of each port of clockwork, make described clockwork and described adjacent clockwork finish butt joint according to the master slave mode of each port.
8, clockwork according to claim 7 is characterized in that, described connection module is specifically comprised:
Filter submodule, be used for receiving at least two notification messages of the port of described adjacent clockwork if in described authentication filtering window, then the port authentication of described adjacent clockwork filters and passes through;
First obtains submodule, is used for obtaining from the notification message of the port of each described adjacent clockwork of receiving the best notification message of each port of described clockwork;
Second obtains submodule, is used for obtaining from the best notification message of described each port of clockwork the best notification message of described clockwork;
The first state subgroup module, be used for if the clock attribute information that the best notification message of described clockwork carries is higher than the clock attribute information that described clockwork is provided with, then the best notification message corresponding port of described clockwork is set to from state, and other ports beyond the best notification message corresponding port of described clockwork are set to major state;
The second state subgroup module is used for if the clock attribute information that the best notification message of described clockwork carries is lower than the clock attribute information that described clockwork is provided with, and then all of the port of described clockwork is set to major state.
9, according to claim 7 or 8 described clockworks, it is characterized in that, also comprise with one or more of lower module:
Update module, be used for if the clock attribute information that the best notification message of described clockwork carries is higher than the original clock attribute information of described clockwork, use the time interval of the best notification message of the described clockwork of transmission that carries in the best notification message of described clockwork, upgrade the time interval of the described notification message of transmission that each port data of described clockwork concentrates;
Second is provided with module, is used for time interval of best notification message of the port of the described clockwork of transmission that the best notification message according to the port of described clockwork carries, and the timeout interval of the port status machine of described clockwork is set;
Reseting module is used for if in described timeout interval, and the port status machine of described clockwork does not receive the announcement information that the port of described adjacent clockwork sends, then with the major state that is reset to of the port status machine of described clockwork;
The 3rd is provided with module, the time interval of best notification message that is used for the port of the described clockwork of transmission that the best notification message according to the port of described clockwork carries, be provided with described clockwork port the major state authenticated time at interval, make described clockwork port best notification message the major state authenticated time at interval in the port of the described clockwork of arrival.
10, a kind of clock docking system is characterized in that, comprising: at least two clockworks, and each clockwork comprises at least one port; Described at least two clockworks comprise first clockwork and the second clock equipment adjacent with described first clockwork;
Described first clockwork is connected with second clock equipment, is used to send a notification message to described second clock equipment, and the port that carries described first clockwork in the wherein said notification message sends the time interval of described notification message;
Described second clock equipment is used to receive the notification message that the port of each adjacent described first clockwork sends; Send time interval of described notification message according to the port of each described first clockwork, the authentication filtering window at the port of each described first clockwork is set respectively; According to described authentication filtering window the notification message of the port of described first clockwork is authenticated filtration, the notification message that passes through according to authentication, adopt the best master clock algorithm to determine the master slave mode of each port of second clock equipment, make described second clock equipment and described first clockwork finish butt joint according to the master slave mode of each port.
CN2009100931892A 2009-09-25 2009-09-25 Clock docking method, clock device and clock docking system Active CN101667909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100931892A CN101667909B (en) 2009-09-25 2009-09-25 Clock docking method, clock device and clock docking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100931892A CN101667909B (en) 2009-09-25 2009-09-25 Clock docking method, clock device and clock docking system

Publications (2)

Publication Number Publication Date
CN101667909A true CN101667909A (en) 2010-03-10
CN101667909B CN101667909B (en) 2011-12-07

Family

ID=41804364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100931892A Active CN101667909B (en) 2009-09-25 2009-09-25 Clock docking method, clock device and clock docking system

Country Status (1)

Country Link
CN (1) CN101667909B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011134371A1 (en) * 2010-04-26 2011-11-03 中兴通讯股份有限公司 Method for synchronizing clocks and clock synchronization device
CN102263631A (en) * 2011-08-10 2011-11-30 瑞斯康达科技发展股份有限公司 Method and clock node for determining master clock within 1588 clock domain
WO2012034374A1 (en) * 2010-09-15 2012-03-22 中兴通讯股份有限公司 Method and apparatus for enhancing time source maintainability
WO2012152124A1 (en) * 2011-05-09 2012-11-15 中兴通讯股份有限公司 Externally connected temporal port changeover method and device
CN102904662A (en) * 2012-09-29 2013-01-30 北京东土科技股份有限公司 Cross-domain clock synchronization method and system based on PTP (Precision Time Protocol)
CN106301645A (en) * 2015-05-21 2017-01-04 中兴通讯股份有限公司 A kind of time synchronization implementation method based on clean culture, device and the network equipment
CN107046449A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Method and clock for time synchronized
WO2020192784A1 (en) * 2019-03-28 2020-10-01 中兴通讯股份有限公司 Method and device for transmitting message, and method and device for selecting target cell

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011134371A1 (en) * 2010-04-26 2011-11-03 中兴通讯股份有限公司 Method for synchronizing clocks and clock synchronization device
CN102237996A (en) * 2010-04-26 2011-11-09 中兴通讯股份有限公司 Clock synchronization method and clock synchronization device
WO2012034374A1 (en) * 2010-09-15 2012-03-22 中兴通讯股份有限公司 Method and apparatus for enhancing time source maintainability
WO2012152124A1 (en) * 2011-05-09 2012-11-15 中兴通讯股份有限公司 Externally connected temporal port changeover method and device
US9325442B2 (en) 2011-05-09 2016-04-26 Zte Corporation Externally connected time port changeover method and device
CN102263631A (en) * 2011-08-10 2011-11-30 瑞斯康达科技发展股份有限公司 Method and clock node for determining master clock within 1588 clock domain
CN102263631B (en) * 2011-08-10 2013-09-25 瑞斯康达科技发展股份有限公司 Method and clock node for determining master clock within 1588 clock domain
CN102904662A (en) * 2012-09-29 2013-01-30 北京东土科技股份有限公司 Cross-domain clock synchronization method and system based on PTP (Precision Time Protocol)
CN102904662B (en) * 2012-09-29 2015-06-24 北京东土科技股份有限公司 Cross-domain clock synchronization method and system based on PTP (Precision Time Protocol)
CN106301645A (en) * 2015-05-21 2017-01-04 中兴通讯股份有限公司 A kind of time synchronization implementation method based on clean culture, device and the network equipment
CN107046449A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Method and clock for time synchronized
WO2020192784A1 (en) * 2019-03-28 2020-10-01 中兴通讯股份有限公司 Method and device for transmitting message, and method and device for selecting target cell

Also Published As

Publication number Publication date
CN101667909B (en) 2011-12-07

Similar Documents

Publication Publication Date Title
CN101667909B (en) Clock docking method, clock device and clock docking system
US9577774B2 (en) Time synchronization method and system
US8954496B2 (en) Multi-screen display system
US8705578B2 (en) Method and system for implementing time synchronization in local area network (LAN)
CN110581742B (en) Clock synchronization method, system and base station
US20040223515A1 (en) Method and apparatus for the synchronization of a system time of a communications network with a clock reference
CN102347814B (en) Slave clock regulation method based on master clock frequency difference
US20050013394A1 (en) Clock synchronization in a distributed system
CN101860365B (en) Reference clock source switching method and device
WO2020043181A1 (en) Clock synchronization method and apparatus, system, storage medium, and electronic device
CN101207606A (en) Method and apparatus for main clock selecting
CN102291232A (en) Clock synchronization method and device
CN103188064A (en) Clock synchronization method and clock synchronization device
CN102013967A (en) 1588 protocol-based beidou time synchronization device and application thereof
CN111835446A (en) Method, device and medium for determining master equipment
CN102129219A (en) Clock calibration method of wireless meter reading system and clock calibration method of distributed system
KR100655625B1 (en) Wireless network with user clock synchronization
CN113014350A (en) PMC interface-based time synchronization method between simulation devices
CN101511042A (en) Data synchronization method and device
KR20060059254A (en) Network node
CN111711506B (en) Communication system and time service method thereof
US20240264627A1 (en) Satellite And Miniature Atomic Clocks For Near Perfect Time For Distributed Blockchain Non-Interactive Synchronization
CN101145864A (en) A method and system for improving base clock performance
US5373537A (en) Method and apparatus for the synchronization of a clock means of a telecommunication switching system
CN109217966B (en) Operating system clock synchronization method and system under 2oo3 redundant structure

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant