CN107528655A - Method for synchronizing time and clock synchronization system - Google Patents

Method for synchronizing time and clock synchronization system Download PDF

Info

Publication number
CN107528655A
CN107528655A CN201610455008.6A CN201610455008A CN107528655A CN 107528655 A CN107528655 A CN 107528655A CN 201610455008 A CN201610455008 A CN 201610455008A CN 107528655 A CN107528655 A CN 107528655A
Authority
CN
China
Prior art keywords
clock source
message
clock
source
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610455008.6A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610455008.6A priority Critical patent/CN107528655A/en
Publication of CN107528655A publication Critical patent/CN107528655A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a kind of method for synchronizing time and system, this method includes:Based on the clock source connected, the Synchronication status message of the clock source connected is generated, and is used to indicate whether the instruction message for the clock source that switching has connected;Synchronication status message and instruction message are added in slow protocol massages and are transmitted, so that recipient selects from the clock source connected according to Synchronication status message the time source for carrying out time synchronized, and determine whether to switch over the time source for carrying out time synchronized according to instruction message.Technique according to the invention scheme, increase the instruction message outside SSM message in EMSC messages, more detailed clock information is provided to base station, base station is improved the stability and maintenance efficiency of whole system by indicating that message enters taking over seamlessly for row clock.

Description

Method for synchronizing time and clock synchronization system
Technical field
The present invention relates to moving communicating field, more particularly to a kind of method for synchronizing time and clock synchronization system.
Background technology
The timing of ITU-T (standard branch office of the international telecommunication union telecommunication) packet network defined in G.8261 standard and synchronous characteristic; propose the concept of synchronous ether (abbreviation SyncE); and the performance indications requirement of synchronous ether nodal clock (Ethernet Equipment Clock, abbreviation EEC) and pretection switch agreement G.8262 and are G.8264 being specify that in standard.By ITU-T, G.781 standard defines SSM (Synchronous Status Message, Synchronication status message) message.G.781 agreement defines the clock source credit rating under different transmission systems.China uses E1 systems (European transmission standard), one group of status message of clock quality (QL) grade of corresponding wherein Option 1 definition, with a byte representation at present.High 4bit retains, and low 4bit represents credit rating QL, as synchronization status message byte (SSMB).Common definition and application such as following table:
Credit rating (QL) Low 4 codings of SSM message Priority
PRC 0010 It is high
SSU-A 0100 |
SSU-B 1000 |
SEC 1011 |
DNU 1111 It is low
According to upper table (credit rating is from high to low), a clock source carried in PRC SSM message, its credit rating is highest.Under normal circumstances, equipment can use the highest-ranking timing reference inputs of SSM, and the timing reference input that SSM ranks are taken second place can be switched to after the highest-ranking timing reference inputs of SSM break down.
But when carrying the timing reference input failure of SSM message, O&M engineer can only investigate receiving terminal, network one by one, timing reference input, can not orient specific failure cause quickly, lead to not to be switched to correct time source in time and carry out lock in time.
The content of the invention
In view of this, it is an object of the invention to provide a kind of method for synchronizing time and clock synchronization system, when problem be present with the clock source for solving the carry out time synchronized that base station uses, other clock sources are switched in time and carry out normal time synchronized.
Technical scheme is as follows used by the present invention solves above-mentioned technical problem:
According to an aspect of the present invention, there is provided a kind of method for synchronizing time, including:Based on the clock source connected, the Synchronication status message of the clock source connected described in generation, and it is used to indicate whether the instruction message of clock source connected described in switching;The Synchronication status message and the instruction message are added in slow protocol massages and are transmitted, so that recipient selects from the clock source connected according to the Synchronication status message time source for carrying out time synchronized, and determine whether to switch over the time source for being used to carry out time synchronized according to the instruction message.
Alternatively, foregoing method, the instruction message include the clock source state of the clock source connected, and the clock source state is locking, keeps or freely shake;When the clock source state is locks, the recipient persistently uses the time source for being used to carry out time synchronized;When the clock source state is keeps, the recipient switches over after persistently using the time source arrival default retention time for being used to carry out time synchronized;When the clock source state for when freely shaking, the recipient switches over to the time source for being used to carry out time synchronized.
Alternatively, foregoing method, when the clock source state is keeps, the instruction message also includes the retention time.
Alternatively, foregoing method, when the clock source state is locks or kept, the instruction message also includes the satellite number that the clock source connected locks;The recipient is lasting to use the time source for carrying out time synchronized when the satellite number is higher than predetermined threshold value, or is switched over after persistently using the time source arrival default retention time for being used to carry out time synchronized.
Alternatively, foregoing method, the Synchronication status message and the instruction message is added in slow protocol massages and are transmitted, is specifically included:The data that the Synchronication status message and the instruction message are placed in the Type Length codomain of the message are filled into field, wherein the instruction message is placed in after the Synchronication status message.
According to another aspect of the present invention, there is provided a kind of method for synchronizing time, including:Slow protocol massages are received, and parse the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected;The clock source for carrying out time synchronized is selected from the clock source connected according to the Synchronication status message;Determine whether to switch over the clock source for being used to carry out time synchronized according to the instruction message.
Alternatively, foregoing method, the instruction message include the clock source state of the clock source connected, and the clock source state is locking, keeps or freely shake;Determine whether to switch over the clock source for being used to carry out time synchronized according to the instruction message, specifically include:It is lasting to use the time source for being used to carry out time synchronized when the clock source state is locks;It is lasting to use the time source for carrying out time synchronized to be switched over after reaching the default retention time when the clock source state is to keep;When the clock source state is freely to shake, the time source for being used to carry out time synchronized is switched over.
Alternatively, foregoing method, when the clock source state is keeps, the instruction message also includes the retention time.
Alternatively, foregoing method, when the clock source state is locks or kept, the instruction message also includes the satellite number that the clock source connected locks;Determine whether to switch over the clock source for being used to carry out time synchronized according to the instruction message, specifically include:It is lasting to use the time source for carrying out time synchronized when the satellite number is higher than predetermined threshold value, or switched over after persistently using the time source arrival default retention time for being used to carry out time synchronized.
Alternatively, foregoing method, slow protocol massages are received, and parses the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected, specifically included:The Synchronication status message and the instruction message are parsed from the data filling field in the Type Length codomain of the message, wherein the indication message bit is after the Synchronication status message.
According to another aspect of the present invention, there is provided a kind of clock synchronization system, including:Message generating module, for based on the clock source connected, the Synchronication status message of the generation clock source connected, and the instruction message of the clock source connected described in being used to indicate whether to switch;Message sending module, it is transmitted for the Synchronication status message and the instruction message to be added in slow protocol massages, so that recipient selects from the clock source connected according to the Synchronication status message time source for carrying out time synchronized, and determine whether to switch over the time source for being used to carry out time synchronized according to the instruction message.
Alternatively, foregoing system, the instruction message include the clock source state of the clock source connected, and the clock source state is locking, keeps or freely shake;When the clock source state is locks, the recipient persistently uses the time source for being used to carry out time synchronized;When the clock source state is keeps, the recipient switches over after persistently using the time source arrival default retention time for being used to carry out time synchronized;When the clock source state for when freely shaking, the recipient switches over to the time source for being used to carry out time synchronized.
Alternatively, foregoing system, when the clock source state is keeps, the instruction message also includes the retention time.
Alternatively, foregoing system, when the clock source state is locks or kept, the instruction message also includes the satellite number that the clock source connected locks;The recipient is lasting to use the time source for carrying out time synchronized when the satellite number is higher than predetermined threshold value, or is switched over after persistently using the time source arrival default retention time for being used to carry out time synchronized.
Alternatively, foregoing system, the data that the Synchronication status message and the instruction message are placed in the Type Length codomain of the message are filled field by the message sending module, wherein the instruction message is placed in after the Synchronication status message.
According to another aspect of the present invention, there is provided a kind of clock synchronization system, including:Parsing module, for receiving slow protocol massages, and the Synchronication status message for the clock source that sender has connected is parsed, and for whether switching the instruction message of the clock source connected;Clock source selection module, for selecting the clock source for carrying out time synchronized from the clock source connected according to the Synchronication status message;Clock source switching module, for determining whether to switch over the clock source for being used to carry out time synchronized according to the instruction message.
Alternatively, foregoing system, the instruction message include the clock source state of the clock source connected, and the clock source state is locking, keeps or freely shake;When the clock source state is locks, the clock source switching module persistently uses the time source for being used to carry out time synchronized;When the clock source state is keeps, the clock source switching module switches over after persistently using the time source arrival default retention time for being used to carry out time synchronized;When the clock source state for when freely shaking, the clock source switching module switches over to the time source for being used to carry out time synchronized.
Alternatively, foregoing system, when the clock source state is keeps, the instruction message also includes the retention time.
Alternatively, foregoing system, when the clock source state is locks or kept, the instruction message also includes the satellite number that the clock source connected locks;When the satellite number is higher than predetermined threshold value, the clock source switching module switches over after persistently using the time source for carrying out time synchronized, or the lasting use time source arrival default retention time for being used to carry out time synchronized.
Alternatively, foregoing system, the parsing module parses the Synchronication status message and the instruction message from the data filling field in the Type Length codomain of the message, wherein the indication message bit is after the Synchronication status message.
According to above technical scheme, method for synchronizing time of the invention and system at least have advantages below:
Technique according to the invention scheme, increase the instruction message outside SSM message in EMSC messages, more detailed clock information is provided to base station, base station is improved the stability and maintenance efficiency of whole system by indicating that message enters taking over seamlessly for row clock.
Brief description of the drawings
Fig. 1 is the flow chart of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 2 is the datagram of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 3 is the schematic diagram of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 4 is the flow chart of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 5 is the flow chart of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 6 is the flow chart of the method for synchronizing time of one embodiment of the embodiment of the present invention;
Fig. 7 is the block diagram of the clock synchronization system of one embodiment of the embodiment of the present invention;
Fig. 8 is the block diagram of the clock synchronization system of one embodiment of the embodiment of the present invention;
Fig. 9 is the block diagram of the clock synchronization system of one embodiment of the embodiment of the present invention;
Figure 10 is the block diagram of the clock synchronization system of one embodiment of the embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
In order that technical problems, technical solutions and advantages to be solved are clearer, clear, below in conjunction with drawings and examples, the present invention will be described in further detail.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in figure 1, a kind of method for synchronizing time is provided in one embodiment of the present of invention, including:
Step S110, based on the clock source connected, the Synchronication status message of the clock source connected is generated, and be used to indicate whether the instruction message for the clock source that switching has connected.In the present embodiment, for indicating that the content of message is not limited, it can be the result analyzed according to the quality of clock source, to indicate whether the clock source can be continuing with or need to switch immediately;In the present embodiment, the clock source connected can be one or more, or empty.
Step S120, Synchronication status message and instruction message are added in slow protocol massages and are transmitted, so that recipient selects from the clock source connected according to Synchronication status message the time source for carrying out time synchronized, and determine whether to switch over the time source for carrying out time synchronized according to instruction message.In the technical scheme of the present embodiment, for Synchronication status message as described in prior art, it have recorded the credit rating of one or more clock sources, and base station can synchronize according to the clock source that credit rating selects quality higher;And indicate message and then provide further reference for base station, base station can judge that the clock source whether there is problem after the higher clock source of selection quality according to instruction message, to switch it in time, so as to ensure the synchronous correctness of clock.
On the basis of previous embodiment, step S120 is specifically included:The data that Synchronication status message and instruction message are placed in the Type Length codomain of message are filled into field, wherein instruction message is placed in after Synchronication status message.
In synchronous ethernet, ITU-T provides to carry and transmit SSM information by special ESMC messages.EMSC messages are discussed in detail in G.8264 agreement.And SSM credit ratings are filled in EMSC PDU TLV (Type Length Value, type lengths values) in domain, in the data that the Data and Padding (data filling field) that SSM is filled in TLV domains most start, others filling data are after SSM TLV.SSM TLV form is as follows:According to preceding table QL definition, the transmission that corresponding credit rating completes clock quality is added in SSM code, shown in form following table:
8bits Type:0x01
16bits Length:0x04
4bits 0(unused)
4bits SSM code
And in the present embodiment, it is necessary to increase ESMC PDU (protocol Data Unit, i.e. message) extension partition definition instruction message, follow closely after SSM message quality grades.Point of addition (square frame only shows point of addition, does not limit the content of addition) as shown in square frame position in Fig. 2.It is then as shown in Figure 3 according to the technical scheme of the present embodiment, the transmitting terminal of message and the handling process of receiving terminal:
Transmitting terminal (synchronous ethernet server) Message processing flow:
A. 1 ESMC Information (message) PDU message of generation per second, according to the requirement form output indication message and QL information of the present invention in the TLV of message.
B. when the QL of the clock source (GPS/ big-dipper satellites etc.) connected changes, transmission immediately one includes new QL and ESMC Event (event) message for indicating message, the change in notice base station clock source.Information messages transmission timer resets simultaneously, sends Information messages again with the rate of giving out a contract for a project of 1 second.
Receiving terminal Message processing flow:
A. if can not receive ESMC Information messages in 5 seconds, then corresponding clock source QL grades are arranged to DNU (minimum), while Information messages receive timer and will be reset, and intercept Information messages again.If receiving Information messages in 5 seconds, timer is also resetted at once, while changes clock source state (cancelling DNU).
B. when receiving Event messages, the clock status of the port are then updated at once, defined according to the present embodiment, report the content (the clock source state that specifically can include subsequently being related to, retention time etc.) of current instruction message and alert, triggering, which re-starts, afterwards selects source to calculate.The reception timer of Information messages will be reset simultaneously, restart to intercept Information messages.
As shown in figure 4, a kind of method for synchronizing time is provided in one embodiment of the present of invention, including:
Step S410, based on the clock source connected, generate the Synchronication status message of the clock source connected, and it is used to indicate whether the instruction message for the clock source that switching has connected, indicate that message includes the clock source state of the clock source connected, clock source state is locks, kept or freely shake, and when clock source state is keeps, instruction message also includes the retention time.In the present embodiment, locking represents that the clock data of clock source is stable, keep representing that the clock data of clock source can keep stable within a period of time (being more than or equal to the retention time), it is sky freely to shake the data source for representing to have connected, and now clock data accuracy is low.
Step S420, Synchronication status message and instruction message are added in slow protocol massages and are transmitted, the time source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message for recipient, and when clock source state is locks, recipient continues using the time source for being used to carry out time synchronized;When clock source state is keeps, recipient continues using for switched over after the time source of time synchronized reaches the default retention time;When clock source state for when freely shaking, recipient switches over to the time source for carrying out time synchronized.In the present embodiment, locking represents that the clock data of clock source is stable so can continue to synchronize using the clock source, the data for keeping representing clock source are accurate at least within the retention time, it is possible to which, persistently using being switched over after a period of time, the mode of switching includes:Quality highest clock source is selected from other clock sources corresponding to Synchronication status message, freely shakes and represents that present clock source is empty, it is necessary to be immediately switched to other clock sources, the mode of switching includes:Other messages are received, and by the Synchronication status message selection clock source in other messages.In the present embodiment, when clock source state is locks, base station does not respond when can also provide the retention time, but reach the retention time.
On the basis of previous embodiment, when clock source state is locks or kept, instruction message also includes the satellite number of the clock source locking connected;Recipient continues using the time source for being used to carry out time synchronized when satellite number is higher than predetermined threshold value, or continues to use the time source for being used to carry out time synchronized to switch over after reaching the default retention time.In the present embodiment, when the satellite number of clock source locking is higher, the clock data accuracy that it is provided is also higher;When the satellite number of clock source locking is relatively low, the clock data accuracy that it is provided is relatively low;Therefore, base station can switch the higher clock source of clock data accuracy based on the information.
One specifically used scene of the present embodiment is as follows:
A, when the clock source state that base station is got is locking, parse the clock grade of clock source, lock the information such as retention time, current base station locking satellite number.
B, when the clock status that base station is got are to keep, according to the retention time parsed, chock smotthing switching time thresholding is determined, it is remaining 30 minutes in the retention time, actively it is switched on standby clock.Exception be present and inform abnormal cause (searching star exception, phaselocked loop losing lock etc.) in webmaster report and alarm prompting master clock
C, when base station parses the retention time remaining 30 minutes, and during without standby clock, high severity alarm is reported to webmaster and reminds questions and prospect.
As shown in figure 5, a kind of method for synchronizing time is provided in one embodiment of the present of invention, including:
Step S510, slow protocol massages are received, and parse the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected.In the present embodiment, for indicating that the content of message is not limited, it can be the result analyzed according to the quality of clock source, to indicate whether the clock source can be continuing with or need to switch immediately;In the present embodiment, the clock source connected can be one or more, or empty.
Step S520, the clock source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message.
Step S530, determine whether to switch over the clock source for carrying out time synchronized according to instruction message.
In the technical scheme of the present embodiment, for Synchronication status message as described in prior art, it have recorded the credit rating of one or more clock sources, and base station can synchronize according to the clock source that credit rating selects quality higher;And indicate message and then provide further reference for base station, base station can judge that the clock source whether there is problem after the higher clock source of selection quality according to instruction message, to switch it in time, so as to ensure the synchronous correctness of clock.
On the basis of previous embodiment, step S510, specifically include:Synchronication status message and instruction message are parsed from the data filling field in the Type Length codomain of message, wherein indication message bit is after Synchronication status message.
In synchronous ethernet, ITU-T provides to carry and transmit SSM information by special ESMC messages.EMSC messages are discussed in detail in G.8264 agreement.And SSM credit ratings are filled in EMSC PDU TLV (Type Length Value, type lengths values) in domain, in the data that the Data and Padding (data filling field) that SSM is filled in TLV domains most start, others filling data are after SSM TLV.SSM TLV form is as follows:According to preceding table QL definition, the transmission that corresponding credit rating completes clock quality is added in SSM code, shown in form following table:
8bits Type:0x01
16bits Length:0x04
4bits 0(unused)
4bits SSM code
And in the present embodiment, it is necessary to increase ESMC PDU (protocol Data Unit, i.e. message) extension partition definition instruction message, follow closely after SSM message quality grades.Point of addition (square frame only shows point of addition, does not limit the content of addition) as shown in square frame position in Fig. 2.It is then as shown in Figure 3 according to the technical scheme of the present embodiment, the transmitting terminal of message and the handling process of receiving terminal:
Transmitting terminal (synchronous ethernet server) Message processing flow:
A. 1 ESMC Information (message) PDU message of generation per second, according to the requirement form output indication message and QL information of the present invention in the TLV of message.
B. when the QL of the clock source (GPS/ big-dipper satellites etc.) connected changes, transmission immediately one includes new QL and ESMC Event (event) message for indicating message, the change in notice base station clock source.Information messages transmission timer resets simultaneously, sends Information messages again with the rate of giving out a contract for a project of 1 second.
Receiving terminal Message processing flow:
A. if can not receive ESMC Information messages in 5 seconds, then corresponding clock source QL grades are arranged to DNU (minimum), while Information messages receive timer and will be reset, and intercept Information messages again.If receiving Information messages in 5 seconds, timer is also resetted at once, while changes clock source state (cancelling DNU).
B. when receiving Event messages, the clock status of the port are then updated at once, defined according to the present embodiment, report the content (the clock source state that specifically can include subsequently being related to, retention time etc.) of current instruction message and alert, triggering, which re-starts, afterwards selects source to calculate.The reception timer of Information messages will be reset simultaneously, restart to intercept Information messages.
As shown in fig. 6, a kind of method for synchronizing time is provided in one embodiment of the present of invention, including:
Step S610, receive slow protocol massages, and parse the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected, indicate that message includes the clock source state of the clock source connected, clock source state is locks, kept or freely shake, and when clock source state is keeps, instruction message also includes the retention time.In the present embodiment, locking represents that the clock data of clock source is stable, keep representing that the clock data of clock source can keep stable within a period of time (being more than or equal to the retention time), it is sky freely to shake the data source for representing to have connected, and now clock data accuracy is low.
Step S620, the clock source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message.
Step S630, when clock source state is locks, continue using the time source for being used to carry out time synchronized;When clock source state is keeps, continue using for switched over after the time source of time synchronized reaches the default retention time;When clock source state is freely to shake, the time source for carrying out time synchronized is switched over.In the present embodiment, locking represents that the clock data of clock source is stable so can continue to synchronize using the clock source, the data for keeping representing clock source are accurate at least within the retention time, it is possible to which, persistently using being switched over after a period of time, the mode of switching includes:Quality highest clock source is selected from other clock sources corresponding to Synchronication status message, freely shakes and represents that present clock source is empty, it is necessary to be immediately switched to other clock sources, the mode of switching includes:Other messages are received, and by the Synchronication status message selection clock source in other messages.In the present embodiment, when clock source state is locks, base station does not respond when can also provide the retention time, but reach the retention time.
On the basis of previous embodiment, when clock source state is locks or kept, instruction message also includes the satellite number of the clock source locking connected;Step S630 is specifically included:When satellite number is higher than predetermined threshold value, continue using the time source for being used to carry out time synchronized, or continue to use the time source for being used to carry out time synchronized to switch over after reaching the default retention time.In the present embodiment, when the satellite number of clock source locking is higher, the clock data accuracy that it is provided is also higher;When the satellite number of clock source locking is relatively low, the clock data accuracy that it is provided is relatively low;Therefore, base station can switch the higher clock source of clock data accuracy based on the information.
One specifically used scene of the present embodiment is as follows:
A, when the clock source state that base station is got is locking, parse the clock grade of clock source, lock the information such as retention time, current base station locking satellite number.
B, when the clock status that base station is got are to keep, according to the retention time parsed, chock smotthing switching time thresholding is determined, it is remaining 30 minutes in the retention time, actively it is switched on standby clock.Exception be present and inform abnormal cause (searching star exception, phaselocked loop losing lock etc.) in webmaster report and alarm prompting master clock
C, when base station parses the retention time remaining 30 minutes, and during without standby clock, high severity alarm is reported to webmaster and reminds questions and prospect.
As shown in fig. 7, a kind of clock synchronization system is provided in one embodiment of the present of invention, including:
Message generating module 710, based on the clock source connected, the Synchronication status message of the clock source connected is generated, and be used to indicate whether the instruction message for the clock source that switching has connected.In the present embodiment, for indicating that the content of message is not limited, it can be the result analyzed according to the quality of clock source, to indicate whether the clock source can be continuing with or need to switch immediately;In the present embodiment, the clock source connected can be one or more, or empty.The system of the present embodiment is located at synchronous ethernet server.
Message sending module 720, Synchronication status message and instruction message are added in slow protocol massages and are transmitted, so that recipient selects from the clock source connected according to Synchronication status message the time source for carrying out time synchronized, and determine whether to switch over the time source for carrying out time synchronized according to instruction message.In the technical scheme of the present embodiment, for Synchronication status message as described in prior art, it have recorded the credit rating of one or more clock sources, and base station can synchronize according to the clock source that credit rating selects quality higher;And indicate message and then provide further reference for base station, base station can judge that the clock source whether there is problem after the higher clock source of selection quality according to instruction message, to switch it in time, so as to ensure the synchronous correctness of clock.
On the basis of previous embodiment, the data that Synchronication status message and instruction message are placed in the Type Length codomain of message are filled field by message sending module 720, wherein instruction message is placed in after Synchronication status message.
In synchronous ethernet, ITU-T provides to carry and transmit SSM information by special ESMC messages.EMSC messages are discussed in detail in G.8264 agreement.And SSM credit ratings are filled in EMSC PDU TLV (Type Length Value, type lengths values) in domain, in the data that the Data and Padding (data filling field) that SSM is filled in TLV domains most start, others filling data are after SSM TLV.SSM TLV form is as follows:According to preceding table QL definition, the transmission that corresponding credit rating completes clock quality is added in SSM code, shown in form following table:
8bits Type:0x01
16bits Length:0x04
4bits 0(unused)
4bits SSM code
And in the present embodiment, it is necessary to increase ESMC PDU (protocol Data Unit, i.e. message) extension partition definition instruction message, follow closely after SSM message quality grades.Point of addition (square frame only shows point of addition, does not limit the content of addition) as shown in square frame position in Fig. 2.It is then as shown in Figure 3 according to the technical scheme of the present embodiment, the transmitting terminal of message and the handling process of receiving terminal:
Transmitting terminal (synchronous ethernet server) Message processing flow:
A. 1 ESMC Information (message) PDU message of generation per second, according to the requirement form output indication message and QL information of the present invention in the TLV of message.
B. when the QL of the clock source (GPS/ big-dipper satellites etc.) connected changes, transmission immediately one includes new QL and ESMC Event (event) message for indicating message, the change in notice base station clock source.Information messages transmission timer resets simultaneously, sends Information messages again with the rate of giving out a contract for a project of 1 second.
Receiving terminal Message processing flow:
A. if can not receive ESMC Information messages in 5 seconds, then corresponding clock source QL grades are arranged to DNU (minimum), while Information messages receive timer and will be reset, and intercept Information messages again.If receiving Information messages in 5 seconds, timer is also resetted at once, while changes clock source state (cancelling DNU).
B. when receiving Event messages, the clock status of the port are then updated at once, defined according to the present embodiment, report the content (the clock source state that specifically can include subsequently being related to, retention time etc.) of current instruction message and alert, triggering, which re-starts, afterwards selects source to calculate.The reception timer of Information messages will be reset simultaneously, restart to intercept Information messages.
As shown in fig. 7, a kind of clock synchronization system is provided in one embodiment of the present of invention, including:
Message generating module 710, based on the clock source connected, generate the Synchronication status message of the clock source connected, and it is used to indicate whether the instruction message for the clock source that switching has connected, indicate that message includes the clock source state of the clock source connected, clock source state is locks, kept or freely shake, and when clock source state is keeps, instruction message also includes the retention time.In the present embodiment, locking represents that the clock data of clock source is stable, keep representing that the clock data of clock source can keep stable within a period of time (being more than or equal to the retention time), it is sky freely to shake the data source for representing to have connected, and now clock data accuracy is low.
Message sending module 720, Synchronication status message and instruction message are added in slow protocol massages and are transmitted, the time source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message for recipient, and when clock source state is locks, recipient continues using the time source for being used to carry out time synchronized;When clock source state is keeps, recipient continues using for switched over after the time source of time synchronized reaches the default retention time;When clock source state for when freely shaking, recipient switches over to the time source for carrying out time synchronized.In the present embodiment, locking represents that the clock data of clock source is stable so can continue to synchronize using the clock source, the data for keeping representing clock source are accurate at least within the retention time, it is possible to which, persistently using being switched over after a period of time, the mode of switching includes:Quality highest clock source is selected from other clock sources corresponding to Synchronication status message, freely shakes and represents that present clock source is empty, it is necessary to be immediately switched to other clock sources, the mode of switching includes:Other messages are received, and by the Synchronication status message selection clock source in other messages.In the present embodiment, when clock source state is locks, base station does not respond when can also provide the retention time, but reach the retention time.
On the basis of previous embodiment, when clock source state is locks or kept, instruction message also includes the satellite number of the clock source locking connected;Recipient continues using the time source for being used to carry out time synchronized when satellite number is higher than predetermined threshold value, or continues to use the time source for being used to carry out time synchronized to switch over after reaching the default retention time.In the present embodiment, when the satellite number of clock source locking is higher, the clock data accuracy that it is provided is also higher;When the satellite number of clock source locking is relatively low, the clock data accuracy that it is provided is relatively low;Therefore, base station can switch the higher clock source of clock data accuracy based on the information.
One specifically used scene of the present embodiment is as follows:
A, when the clock source state that base station is got is locking, parse the clock grade of clock source, lock the information such as retention time, current base station locking satellite number.
B, when the clock status that base station is got are to keep, according to the retention time parsed, chock smotthing switching time thresholding is determined, it is remaining 30 minutes in the retention time, actively it is switched on standby clock.Exception be present and inform abnormal cause (searching star exception, phaselocked loop losing lock etc.) in webmaster report and alarm prompting master clock
C, when base station parses the retention time remaining 30 minutes, and during without standby clock, high severity alarm is reported to webmaster and reminds questions and prospect.
As shown in figure 8, a kind of clock synchronization system is provided in one embodiment of the present of invention, including:
Parsing module 810, slow protocol massages are received, and parse the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected.In the present embodiment, for indicating that the content of message is not limited, it can be the result analyzed according to the quality of clock source, to indicate whether the clock source can be continuing with or need to switch immediately;In the present embodiment, the clock source connected can be one or more, or empty.
Clock source selection module 820, the clock source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message.
Clock source switching module 830, determine whether to switch over the clock source for carrying out time synchronized according to instruction message.
In the technical scheme of the present embodiment, for Synchronication status message as described in prior art, it have recorded the credit rating of one or more clock sources, and base station can synchronize according to the clock source that credit rating selects quality higher;And indicate message and then provide further reference for base station, base station can judge that the clock source whether there is problem after the higher clock source of selection quality according to instruction message, to switch it in time, so as to ensure the synchronous correctness of clock.
On the basis of previous embodiment, parsing module 820 parses Synchronication status message and instruction message from the data filling field in the Type Length codomain of message, and wherein indication message bit is after Synchronication status message.
In synchronous ethernet, ITU-T provides to carry and transmit SSM information by special ESMC messages.EMSC messages are discussed in detail in G.8264 agreement.And SSM credit ratings are filled in EMSC PDU TLV (Type Length Value, type lengths values) in domain, in the data that the Data and Padding (data filling field) that SSM is filled in TLV domains most start, others filling data are after SSM TLV.SSM TLV form is as follows:According to preceding table QL definition, the transmission that corresponding credit rating completes clock quality is added in SSM code, shown in form following table:
8bits Type:0x01
16bits Length:0x04
4bits 0(unused)
4bits SSM code
And in the present embodiment, it is necessary to increase ESMC PDU (protocol Data Unit, i.e. message) extension partition definition instruction message, follow closely after SSM message quality grades.Point of addition (square frame only shows point of addition, does not limit the content of addition) as shown in square frame position in Fig. 2.It is then as shown in Figure 3 according to the technical scheme of the present embodiment, the transmitting terminal of message and the handling process of receiving terminal:
Transmitting terminal (synchronous ethernet server) Message processing flow:
A. 1 ESMC Information (message) PDU message of generation per second, according to the requirement form output indication message and QL information of the present invention in the TLV of message.
B. when the QL of the clock source (GPS/ big-dipper satellites etc.) connected changes, transmission immediately one includes new QL and ESMC Event (event) message for indicating message, the change in notice base station clock source.Information messages transmission timer resets simultaneously, sends Information messages again with the rate of giving out a contract for a project of 1 second.
Receiving terminal Message processing flow:
A. if can not receive ESMC Information messages in 5 seconds, then corresponding clock source QL grades are arranged to DNU (minimum), while Information messages receive timer and will be reset, and intercept Information messages again.If receiving Information messages in 5 seconds, timer is also resetted at once, while changes clock source state (cancelling DNU).
B. when receiving Event messages, the clock status of the port are then updated at once, defined according to the present embodiment, report the content (the clock source state that specifically can include subsequently being related to, retention time etc.) of current instruction message and alert, triggering, which re-starts, afterwards selects source to calculate.The reception timer of Information messages will be reset simultaneously, restart to intercept Information messages.
A kind of clock synchronization system is provided in one embodiment of the present of invention, including:
Parsing module 810, receive slow protocol massages, and parse the Synchronication status message for the clock source that sender has connected, and for whether switching the instruction message of the clock source connected, indicate that message includes the clock source state of the clock source connected, clock source state is locks, kept or freely shake, and when clock source state is keeps, instruction message also includes the retention time.In the present embodiment, locking represents that the clock data of clock source is stable, keep representing that the clock data of clock source can keep stable within a period of time (being more than or equal to the retention time), it is sky freely to shake the data source for representing to have connected, and now clock data accuracy is low.
Clock source selection module 820, the clock source for carrying out time synchronized is selected from the clock source connected according to Synchronication status message.
Clock source switching module 830, when clock source state is locks, continue using the time source for being used to carry out time synchronized;When clock source state is keeps, continue using for switched over after the time source of time synchronized reaches the default retention time;When clock source state is freely to shake, the time source for carrying out time synchronized is switched over.In the present embodiment, locking represents that the clock data of clock source is stable so can continue to synchronize using the clock source, the data for keeping representing clock source are accurate at least within the retention time, it is possible to which, persistently using being switched over after a period of time, the mode of switching includes:Quality highest clock source is selected from other clock sources corresponding to Synchronication status message, freely shakes and represents that present clock source is empty, it is necessary to be immediately switched to other clock sources, the mode of switching includes:Other messages are received, and by the Synchronication status message selection clock source in other messages.In the present embodiment, when clock source state is locks, base station does not respond when can also provide the retention time, but reach the retention time.
On the basis of previous embodiment, when clock source state is locks or kept, instruction message also includes the satellite number of the clock source locking connected;Clock source switching module 830 continues using the time source for being used to carry out time synchronized when satellite number is higher than predetermined threshold value, or continues to use the time source for being used to carry out time synchronized to switch over after reaching the default retention time.In the present embodiment, when the satellite number of clock source locking is higher, the clock data accuracy that it is provided is also higher;When the satellite number of clock source locking is relatively low, the clock data accuracy that it is provided is relatively low;Therefore, base station can switch the higher clock source of the true property of clock data based on the information.
One specifically used scene of the present embodiment is as follows:
A, when the clock source state that base station is got is locking, parse the clock grade of clock source, lock the information such as retention time, current base station locking satellite number.
B, when the clock status that base station is got are to keep, according to the retention time parsed, chock smotthing switching time thresholding is determined, it is remaining 30 minutes in the retention time, actively it is switched on standby clock.Exception be present and inform abnormal cause (searching star exception, phaselocked loop losing lock etc.) in webmaster report and alarm prompting master clock
C, when base station parses the retention time remaining 30 minutes, and during without standby clock, high severity alarm is reported to webmaster and reminds questions and prospect.
Fig. 7 clock synchronization system is located at synchronous ethernet server, and Fig. 8 clock synchronization system is located at base station, then single network clocking embodiment based on above-mentioned synchronous ethernet server and base station realization is as shown in Figure 9:
Direct network connection clock synchronous network:
Hardware environment requirement:Synchronous ethernet server external clock source, such as the Big Dipper, GPS, atomic clock etc..
It is as follows according to Fig. 9 networking, detailed process:
1st, external clock and synchronous ethernet server sync.
2nd, synchronous ethernet server via Ethernet, which will carry QL+ and define the ESMC PDU messages of content herein, is sent in synchronous ethernet node.
Whether the 3rd, base station receives ESMC messages, parses clock source information and synchronous, needed to enter switching state (switching other types clock source) according to the validation of information of parsing extraction.
4th, remote maintenance personnel can send order to extract the ESMC messages on base station by diagnosing debugging interface to base station, if time server is abnormal, base station in the form of alerting active reporting to background net management.
The single network clocking embodiment realized based on above-mentioned synchronous ethernet server and base station is as shown in Figure 10:
More network incoming clock synchronous network:
Hardware environment requirement:PTN (Packet Transport Network), synchronous ethernet server, external clock source, such as the Big Dipper, GPS, atomic clock etc..
It is as follows according to Figure 10 networking, detailed process:
1. external clock and synchronous ethernet server sync.
2. the ESMC PDU messages that synchronous ethernet server via Ethernet defines carrying QL+ content herein are sent to PTN.
3. base station receives ESMC messages, clock source information and synchronous is parsed, whether needs to enter switching state (cut-in stand-by syncE clocks) according to the validation of information of parsing extraction.
4. remote maintenance personnel can send order to extract the ESMC messages on base station by diagnosing debugging interface to multiple base stations or some base station, if time server is abnormal, base station in the form of alerting active reporting to background net management.
Above by reference to the preferred embodiments of the present invention have been illustrated, not thereby limit to the interest field of the present invention.Those skilled in the art do not depart from the scope of the present invention and essence, can have a variety of flexible programs to realize the present invention, can be used for another embodiment for example as the feature of one embodiment and obtain another embodiment.All all any modification, equivalent and improvement made within the technical concept with the present invention, all should be within the interest field of the present invention.

Claims (12)

  1. A kind of 1. method for synchronizing time, it is characterised in that including:
    Based on the clock source connected, the Synchronication status message of the clock source connected described in generation, Yi Jiyong In the instruction message for the clock source for indicating whether to have connected described in switching;
    The Synchronication status message and the instruction message are added in slow protocol massages and are transmitted, for Recipient selects to be used to carry out time synchronized according to the Synchronication status message from the clock source connected Time source, and determine whether to be used to carry out the time source of time synchronized to described according to the instruction message Switch over.
  2. 2. according to the method for claim 1, it is characterised in that the instruction message includes described connected The clock source state of the clock source connect, the clock source state are locking, keep or freely shake;When described When clock source state is locks, the recipient persistently uses the time source for being used to carry out time synchronized; When the clock source state is keeps, the recipient persistently use it is described be used to carrying out time synchronized when Between source reach default retention time after switch over;It is described when the clock source state is freely to shake Recipient switches over to the time source for being used to carry out time synchronized.
  3. 3. according to the method for claim 2, it is characterised in that when the clock source state is keeps, The instruction message also includes the retention time.
  4. 4. according to the method for claim 2, it is characterised in that when the clock source state for locking or During holding, the instruction message also includes the satellite number of the clock source locking connected;The recipient When the satellite number is higher than predetermined threshold value, the lasting use time source for being used to carry out time synchronized, or It is lasting to use the time source for carrying out time synchronized to be switched over after reaching the default retention time.
  5. 5. according to the method for claim 1, it is characterised in that by the Synchronication status message and described Instruction message, which is added in slow protocol massages, to be transmitted, and is specifically included:
    The number that the Synchronication status message and the instruction message are placed in the Type Length codomain of the message According to filling field, wherein the instruction message is placed in after the Synchronication status message.
  6. A kind of 6. method for synchronizing time, it is characterised in that including:
    Slow protocol massages are received, and parse the Synchronication status message for the clock source that sender has connected, and For whether switching the instruction message of the clock source connected;
    Selected according to the Synchronication status message from the clock source connected for carrying out time synchronized Clock source;
    Determine whether to switch over the clock source for being used to carry out time synchronized according to the instruction message.
  7. 7. according to the method for claim 6, it is characterised in that the instruction message includes described connected The clock source state of the clock source connect, the clock source state are locking, keep or freely shake;According to institute State instruction message to determine whether to switch over the clock source for being used to carry out time synchronized, specifically include:
    It is lasting to use the time source for being used to carry out time synchronized when the clock source state is locks;
    It is lasting to use the time source for being used to carry out time synchronized to arrive when the clock source state is keeps Switched over after up to the default retention time;
    When the clock source state is freely to shake, the time source for being used to carry out time synchronized is carried out Switching.
  8. 8. according to the method for claim 7, it is characterised in that when the clock source state is keeps, The instruction message also includes the retention time.
  9. 9. according to the method for claim 7, it is characterised in that when the clock source state for locking or During holding, the instruction message also includes the satellite number of the clock source locking connected;According to the finger Show that message determines whether to switch over the clock source for being used to carry out time synchronized, specifically include:
    It is lasting to use the time source for being used to carry out time synchronized when the satellite number is higher than predetermined threshold value, Or switched over after the lasting use time source arrival default retention time for being used to carry out time synchronized.
  10. 10. according to the method for claim 6, it is characterised in that receive slow protocol massages, and parse Go out the Synchronication status message for the clock source that sender has connected, and for whether switch it is described connected when Zhong Yuan instruction message, is specifically included:
    The Synchronication status message is parsed from the data filling field in the Type Length codomain of the message With the instruction message, wherein the indication message bit is after the Synchronication status message.
  11. A kind of 11. clock synchronization system, it is characterised in that including:
    Message generating module, for the same of the clock source that based on the clock source connected, has been connected described in generation Status message is walked, and is used to indicate whether the instruction message of clock source connected described in switching;
    Message sending module, for the Synchronication status message and the instruction message to be added into slow agreement report It is transmitted in text, so that recipient selects according to the Synchronication status message from the clock source connected Select the time source for carrying out time synchronized, and according to the instruction message determine whether to it is described be used for into The time source of row time synchronized switches over.
  12. A kind of 12. clock synchronization system, it is characterised in that including:
    Parsing module, for receiving slow protocol massages, and parse the synchronization for the clock source that sender has connected Status message, and for whether switching the instruction message of the clock source connected;
    Clock source selection module, for being selected according to the Synchronication status message from the clock source connected Select the clock source for carrying out time synchronized;
    Clock source switching module, for being determined whether according to the instruction message to described same for carrying out the time The clock source of step switches over.
CN201610455008.6A 2016-06-21 2016-06-21 Method for synchronizing time and clock synchronization system Pending CN107528655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610455008.6A CN107528655A (en) 2016-06-21 2016-06-21 Method for synchronizing time and clock synchronization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610455008.6A CN107528655A (en) 2016-06-21 2016-06-21 Method for synchronizing time and clock synchronization system

Publications (1)

Publication Number Publication Date
CN107528655A true CN107528655A (en) 2017-12-29

Family

ID=60735129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610455008.6A Pending CN107528655A (en) 2016-06-21 2016-06-21 Method for synchronizing time and clock synchronization system

Country Status (1)

Country Link
CN (1) CN107528655A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111148211A (en) * 2019-12-31 2020-05-12 京信通信***(中国)有限公司 Clock synchronization method and device, computer equipment and storage medium
CN111989889A (en) * 2018-04-04 2020-11-24 华为技术有限公司 Communication method and device
CN112040472A (en) * 2020-08-10 2020-12-04 烽火通信科技股份有限公司 Clock synchronization method, system and readable storage medium
WO2021203983A1 (en) * 2020-04-09 2021-10-14 华为技术有限公司 Method and apparatus for processing time synchronization packet
CN113518421A (en) * 2020-04-09 2021-10-19 华为技术有限公司 Method and device for processing time synchronization message

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111989889A (en) * 2018-04-04 2020-11-24 华为技术有限公司 Communication method and device
CN111989889B (en) * 2018-04-04 2023-06-02 华为技术有限公司 Communication method and device
CN111148211A (en) * 2019-12-31 2020-05-12 京信通信***(中国)有限公司 Clock synchronization method and device, computer equipment and storage medium
WO2021203983A1 (en) * 2020-04-09 2021-10-14 华为技术有限公司 Method and apparatus for processing time synchronization packet
CN113518419A (en) * 2020-04-09 2021-10-19 华为技术有限公司 Method and device for processing time synchronization message
CN113518421A (en) * 2020-04-09 2021-10-19 华为技术有限公司 Method and device for processing time synchronization message
CN113518419B (en) * 2020-04-09 2022-11-22 华为技术有限公司 Method and device for processing time synchronization message
CN112040472A (en) * 2020-08-10 2020-12-04 烽火通信科技股份有限公司 Clock synchronization method, system and readable storage medium
CN112040472B (en) * 2020-08-10 2022-10-18 烽火通信科技股份有限公司 Clock synchronization method, system and readable storage medium

Similar Documents

Publication Publication Date Title
CN107528655A (en) Method for synchronizing time and clock synchronization system
CN103563287B (en) Synchronization device and synchronization method
KR101247922B1 (en) Improved method, system and apparatus for synchronizing signals
CN102238719B (en) Time synchronization method and device and distributed time synchronization system
CN101594190B (en) Power system time synchronization method and device and power system thereof
US10778359B2 (en) Time synchronization method, programmable logic device, single board and network element
EP2469765A1 (en) Method and system for implementing time synchronization in local area network (lan)
CN102480780B (en) Time synchronization method of femto base station route (BSR) and system thereof
JP2001045092A (en) Communication equipment and method, communication system and recording medium
KR20120042354A (en) Center district dual mode network synchronization acquisition method and apparatus for satellite communication system
JPWO2014083640A1 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND TIME SYNCHRONIZATION METHOD
CN103916950A (en) Time synchronization method and system
JP6258006B2 (en) SFN broadcasting system and broadcast TS transmission method using IP line
CN102497014B (en) Method and device for realizing remote control command transmission in automatic power distribution system
CN113014345A (en) Clock synchronization early warning method, device and system
CN106506107A (en) A kind of ntp server time service implementation method based on hardware timestamping
CN102342051B (en) For coming the method for synchronised clock and relevant system and module by separating transmission first and second data via at least one time distribution protocol
CN102036123A (en) Synchronization method and system for single frequency network digital broadcast television system
CN106330420A (en) Time synchronization method, server and system
KR100686241B1 (en) Time synchronization method for wireless sensor networks
CN102244573A (en) Clock reporting method and device
CN116232519A (en) Clock synchronization method and network equipment
CN101272215B (en) Optical transmission unit frame generating method and device, method and device for transmitting clock rank
CN109842456A (en) A kind of clock synchronizing method based on AFDX network
US20100046522A1 (en) Relay Device And Method For Controlling The Relay Device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171229