CN106330420A - Time synchronization method, server and system - Google Patents
Time synchronization method, server and system Download PDFInfo
- Publication number
- CN106330420A CN106330420A CN201510376774.9A CN201510376774A CN106330420A CN 106330420 A CN106330420 A CN 106330420A CN 201510376774 A CN201510376774 A CN 201510376774A CN 106330420 A CN106330420 A CN 106330420A
- Authority
- CN
- China
- Prior art keywords
- clock source
- external clock
- ptp
- satellite number
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention discloses a time synchronization method which comprises the following steps: time synchronization is conducted on a server and an external clock source, and information of the external clock source is acquired; the information of the external clock source is integrated and packed into a precision time synchronization protocol (PTP) message to obtain a PTP addition message; and the PTP addition message is sent to a client, so that the client is time-synchronized with the server, and the information of the external clock source is demodulated. The invention further discloses a server and a system. As the information of the external clock source connected with the server is added into the PTP message based on the IEEE1588 protocol, more detailed synchronization information is provided to the client, adverse effects caused by failures of the external clock source is avoided, and the stability of the system is improved.
Description
Technical field
The present invention relates to communication technique field, particularly relate to a kind of method for synchronizing time, server and be
System.
Background technology
IEEE1588 (the precision interval clock synchronous protocol standard of network measure and control system) clock is to pass through
The clock of the client in network is realized Tong Bu with the clock of server by software and hardware combining, it is provided that synchronize to build
The Ethernet Timing Synchronization mode of 10 μ s it is less than between immediately.It is as a kind of master-slave synchronisation system, client
The master clock being fully synchronized in server from clock, in the synchronizing process of system, master clock cycle
Issue PTP (Precision Time Synchronization Protocol, accurate time synchronization protocol) timely
Between information, receive the timestamp information sent of master clock port from clock port, system calculates master accordingly
Postpone and principal and subordinate's time difference from wire time, and utilize this time difference to adjust local zone time, make client
Time keeps consistent frequency and phase place with the time of server.
Server is in order to provide high-quality clock to export, it usually needs external high accuracy real-time clock is such as
GPS (Global Positioning System, global positioning system), the Big Dipper and atomic clock etc. are propped up
Hold, by utilizing the master clock of server to carry out synchronize with extraneous high precision clock, reach high-quality
Clock output requirement.But due to the external height that in the PTP message that server is issued, master clock does not synchronizes
The specifying information of accuracy clock, client cannot determine the state of the external high precision clock of server, make
Must cannot know external clock produced problem from clock, thus cause whole synchronous network system to go out
Now abnormal.
Foregoing is only used for auxiliary and understands technical scheme, does not represent and recognizes that foregoing is
Prior art.
Summary of the invention
A kind of method for synchronizing time of offer, server and system are provided, it is intended to
Based on IEEE1588 agreement, PTP message adds the external clock source information being connected with server, for
Client provides more detailed synchronizing information, it is to avoid the adverse consequences that external clock source fault causes,
Thus improve the stability of system.
For achieving the above object, a kind of method for synchronizing time that the present invention provides, described method for synchronizing time
Comprise the following steps:
Server and external clock source carry out time synchronized, and obtain the information in described external clock source;
The information integration in described external clock source is bundled in accurate time synchronization protocol PTP message, shape
PTP is become to add message;
Described PTP is added message send to client, so that described client is carried out with described server
Time synchronized, and demodulate the information in described external clock source.
Preferably, the information in described external clock source includes described server satellite digital section, signal to noise ratio word
Section, antenna feeder state and Quality field.
Preferably, the described information integration by described external clock source is bundled in PTP message, is formed
PTP adds the step of message and includes:
When the antenna feeder state in described external clock source is normal, according to described satellite number and signal to noise ratio, meter
Calculate the mass value in described external clock source;
The packing of the satellite number in described external clock source, signal to noise ratio, antenna feeder state and mass value is added to
In PTP message, form PTP and add message.
Preferably, described satellite number includes satellite number and the satellite number of locking that described server search arrives,
When the described antenna feeder state in described external clock source is normal, according to described satellite number and signal to noise ratio, meter
The step of the mass value calculating described external clock source includes:
When the antenna feeder state in described external clock source is normal, the relatively satellite number of described locking is defended with predetermined
The magnitude relationship of star number and signal to noise ratio and predetermined signal to noise ratio;
Satellite number in described locking is more than described more than or equal to described predetermined satellite number and described signal to noise ratio
During predetermined signal to noise ratio, the mass value being calculated described external clock source is the first value;
Satellite number in described locking is less than described predetermined letter more than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the second value;
Satellite number in described locking is more than described predetermined letter less than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the 3rd value;
Satellite number in described locking is less than described predetermined letter less than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the 4th value.
Preferably, described PTP interpolation message includes head, main body and extended field, described extension word
Section is type/length/value TLV form.
Additionally, for achieving the above object, the present invention also proposes a kind of server, and described server includes:
Data obtaining module, carries out time synchronized for server and external clock source, and obtain described outside
Connect the information of clock source;
Packetization module, for being bundled to accurate time synchronization protocol by the information integration in described external clock source
In PTP message, form PTP and add message;
First sending module, sends to client for described PTP is added message, so that described client
End and described server carry out time synchronized, and demodulate the information in described external clock source.
Preferably, the information in described external clock source includes described server satellite digital section, signal to noise ratio word
Section, antenna feeder state and Quality field.
Preferably, described packetization module includes:
Computing unit, for when the antenna feeder state in described external clock source is normal, according to described satellite number
And signal to noise ratio, calculate the mass value in described external clock source;
Packaged unit, for by satellite number, signal to noise ratio, antenna feeder state and the matter in described external clock source
Value packing is added in PTP message, forms PTP and adds message.
Preferably, described satellite number includes satellite number and the satellite number of locking that described server search arrives,
Described computing unit includes:
Relatively subelement, for when the antenna feeder state in described external clock source is normal, compares described locking
Satellite number and predetermined satellite number and the magnitude relationship of signal to noise ratio and predetermined signal to noise ratio;
First subelement, for the satellite number in described locking more than or equal to described predetermined satellite number and institute
When stating signal to noise ratio more than described predetermined signal to noise ratio, the mass value being calculated described external clock source is first
Value;
Second subelement, for the satellite number in described locking more than described predetermined satellite number and described noise
Than during less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the second value;
3rd subelement, for the satellite number in described locking less than described predetermined satellite number and described noise
Than during more than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 3rd value;
4th subelement, for the satellite number in described locking less than described predetermined satellite number and described noise
Than during less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 4th value.
Preferably, described PTP interpolation message includes head, main body and extended field, described extension word
Section is type/length/value TLV form.
Additionally, for achieving the above object, the present invention also proposes a kind of system, described system include client,
Remote port and server as above,
Described client includes:
First receiver module, for receive described server send PTP add message and described remotely
The PTP that end sends adds message and extracts order;
Parsing module, extracts order for adding message according to described PTP, described PTP is added message
Resolve, to obtain the information in described external clock source;
Second sending module, the information transmission in the described external clock source for parsing being obtained is the most described far
Cheng Duan.
Described remote port includes:
Request module, adds message extraction order for sending described PTP to described client;
Second receiver module, for receiving the information in the described external clock source that described client sends.
Method for synchronizing time, server and the system that the present invention provides, by server and external clock
Source carries out time synchronized, obtains the information in described external clock source, in the information by described external clock source
After integration is bundled in accurate time synchronization protocol PTP message form PTP interpolation message, by described PTP
Add message to send to client, so that described client and described server carry out time synchronized, and solve
Recall the information in described external clock source.So, it is connected with server by interpolation in PTP message
External clock source information, provides more detailed synchronizing information for client so that external clock source is occurring
During fault, client flexible conversion clock strategy can be facilitated, to avoid the adverse consequences being likely to occur,
Thus improve the stability of system.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of method for synchronizing time one embodiment of the present invention;
Fig. 2 is that in Fig. 1, the information integration in described external clock source is bundled to accurate time synchronization protocol by step
In PTP message, form PTP and add the refinement schematic flow sheet of message;
Fig. 3 is that in Fig. 2, step is when the antenna feeder state in described external clock source is normal, according to described satellite number
And signal to noise ratio, calculate the refinement schematic flow sheet of the mass value in described external clock source;
Fig. 4 is the high-level schematic functional block diagram of server one embodiment of the present invention;
Fig. 5 is the refinement high-level schematic functional block diagram of packetization module in Fig. 4;
Fig. 6 is the refinement high-level schematic functional block diagram of computing unit in Fig. 5;
Fig. 7 is the high-level schematic functional block diagram of present system one embodiment;
Fig. 8 is the refinement high-level schematic functional block diagram of client in Fig. 7;
Fig. 9 is the high-level schematic functional block diagram of Fig. 7 medium-long range end;
Figure 10 is single-stage server sync transmission group net figure;
Figure 11 is multistage server synchronous transfer networking diagram.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, do referring to the drawings further
Explanation.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not used to limit
Determine the present invention.
The present invention provides a kind of method for synchronizing time, and with reference to Fig. 1, in one embodiment, the described time is same
One step process comprises the following steps:
Step S10, server and external clock source carry out time synchronized, and obtain described external clock source
Information;
In the present embodiment, external clock source includes GPS, the Big Dipper and atomic clock etc., with GPS and the Big Dipper
As a example by, the information in external clock source includes the satellite number of described server search, the satellite number of locking, letter
Make an uproar the information such as ratio, antenna feeder state and satellite Quality field, as a example by atomic clock, the letter in external clock source
Breath includes the information such as signal to noise ratio and antenna feeder state.
Step S20, is bundled to accurate time synchronization protocol PTP by the information integration in described external clock source
In message, form PTP and add message;
In the present embodiment, according to IEEE 1588 (being originally preferably implemented as version IEEE 1588v2) agreement
Describe, in the case of following TLV (type-length-value), by for PTP message in 1588 agreements
It is added with information field such as satellite digital section, signal to noise ratio, antenna feeder state and the quality closing external clock source
Fields etc. represent satellite quality condition, so, can carry out monitoring server by remote maintenance instrument external
The information state of clock source, thus improve the maintenance efficiency that IEEE 1588 clock synchronizes.
Specifically, satellite digital section is used for representing satellite number and the satellite of locking that 1588 servers search out
Number.Using hexadecimal representation, wherein upper byte represents locking number, and low byte represents searches star number.
Such as: 0x0407 represents and searches out 7 satellites, and locking satellite is 4.Signal to noise ratio field is used for representing 1588
The satellite quality that server is used, the SNR value of the satellite of all lockings is averaging by 1588 servers
Value.
The antenna feeder state of clock source is divided into normally, opens a way and short circuit three kinds, represents with 0,1 and 2 respectively.
Quality field is used to indicate that the satellite quality that 1588 servers are used, and this value is by locking
Satellite number and signal-to-noise ratio computation draw.
Step S30, adds message by described PTP and sends to client, so that described client is with described
Server carries out time synchronized, and demodulates the information in described external clock source.
In the present embodiment, described client is preferably base station, certainly, in other embodiments, and described visitor
Family end can also be other network equipments.Client and 1588v2 server are to be carried out by PTP message
Communication.In this preferred embodiment, described PTP type of message is preferably and describes time source ability
Announce message, the most in other embodiments, it is also possible to select other types.
It is understood that in other embodiments, it is also possible to by multistage server, PTP is added report
The transmission of literary composition, adds message by described PTP and sends to client, as a example by three tier server, specifically
Process is as follows:
First order server and external clock source carry out time synchronized, and obtain the letter in described external clock source
Breath;
The information integration in described external clock source is bundled to exact time synchronization association by described first order server
In view PTP message, form a PTP and add message;
A described PTP is added message and sends to second level server by described first order server;
The described PTP received is added message and adds self transmitting terminal to by described second level server
PTP message in, formed the 2nd PTP add message;
Described 2nd PTP is added message and sends to third level server by described second level server;
Described 2nd PTP received is added message and adds self transmitting terminal to by described third level server
PTP message in, formed the 3rd PTP add message;
Described 3rd PTP is added message and sends to client by described third level server, so that described visitor
Family end and described server carry out time synchronized, and demodulate the information in described external clock source.
So, by the series connection of multistage server, make PTP add message and carry out transparent transmission in a network, can
With need not external multiple external time sources, it is achieved the synchronization of time between LAN.
The method for synchronizing time that the present invention provides, carries out time synchronized by server and external clock source,
Obtain the information in described external clock source, when being bundled to accurate by the information integration in described external clock source
Between synchronous protocol PTP message is formed after PTP adds message, described PTP is added message and sends extremely
Client so that described client and described server carry out time synchronized, and demodulate described external time
The information of Zhong Yuan.So, by adding the external clock source information being connected with server in PTP message,
More detailed synchronizing information is provided so that external clock source, when breaking down, can facilitate for client
Client flexible conversion clock strategy, to avoid the adverse consequences being likely to occur, thus improves system
Stability.
Further, as in figure 2 it is shown, on the basis of the embodiment of above-mentioned Fig. 1, in the present embodiment,
Described step S20 includes:
Step S201, when the antenna feeder state in described external clock source is normal, according to described satellite number and
Signal to noise ratio, calculates the mass value in described external clock source;
In this preferred embodiment, the mass value in described external clock source is Quality field and passes through actual lock
Satellite number and signal to noise ratio obtain, in other embodiments, it is also possible to specific reference to search satellite number,
One or more information such as the satellite number of locking, signal to noise ratio are calculated mass value.
Step S202, packs the mass value in described external clock source and adds in PTP message, formed
PTP adds message.
In the present embodiment, PTP adds message and includes head, main body and extended field, described extension word
Section is type/length/value TLV form.
In the present embodiment, construct described PTP and add the message format of message, be shown in Table one:
1, the supplier that IEEE1588 agreement specifies with the scalable format of normal structure is:
Table one
Wherein: Tlv Type uses IEEE1588 agreement regulation
ORGANIZATION_EXTENSION value 0003 represents, takies 2 bytes;
Length Field represents the length of whole extended field;
Organization ID and Organization SubType is supplier ID and subtype, accounts for respectively
By 3 bytes;
Data part is satellite digital section, signal to noise ratio field, antenna feeder state and Quality field.Concrete division
Such as table two:
Table two
2, increase the PTP after extended field and add message format, see table three:
Table three
Wherein, Origin Timestamp be defined as numerical value be 0 or precision be ± 1ns time timestamp;
Current UTC Offset is defined as the leap second time difference between UTC and TAIl time ruler;
Grandmaster Priority1/2 represents user-defined Grandmaster priority 1/2;
The temporal quality rank of the Grandmaster that Grandmaster Clock Quality is defined as;
Grandmaster Identity is defined as the clockwork ID of Grandmaster;
Steps Removed is defined as the clock path jumping figure of Grandmaster Yu Slave equipment room;
Time Source is defined as time source type;
Tlv is newly-increased extended field, takies 15 bytes.
In the present embodiment, construct described PTP and add the data set of message, due to the value of Time Source
The value of TimeSource element in time characteristic data collection (Time Properties DS), therefore, time
Between performance data concentrate also increase such as satellite digital section, signal to noise ratio, antenna feeder state and Quality field etc..
The initial value of Time Properties DS satellite number selects as follows:
If external time source is known when initializing, then the initial value of satellite number is exactly actual defending
Star number value, including the satellite number searched and the satellite number of locking, otherwise initial value is NULL.
The initial value of Time Properties DS signal to noise ratio selects as follows:
If external time source is known when initializing, then the initial value of signal to noise ratio is exactly actual value,
Otherwise initial value is NULL.
The selection of the initial value of Time Properties DS antenna feeder state is as follows:
If external time source is known when initializing, then the initial value of antenna feeder state is actual
State value, otherwise initial value is NULL.
The initial value of Time Properties DS mass value selects as follows:
If external time source is known when initializing, then the quality initial value of time source is exactly actual
Value, otherwise initial value is NULL.
In one embodiment, as it is shown on figure 3, on the basis of the embodiment of above-mentioned Fig. 2, the present embodiment
In, described step S201 includes:
Step S2011, when the antenna feeder state in described external clock source is normal, compares defending of described locking
The magnitude relationship of star number and predetermined satellite number and signal to noise ratio and predetermined signal to noise ratio;
Step S2012, the satellite number in described locking is more than or equal to described predetermined satellite number and described letter
Ratio of making an uproar is during more than described predetermined signal to noise ratio, and the mass value being calculated described external clock source is the first value;
In the present embodiment, when the satellite number of described locking is big more than or equal to predetermined value such as 4 and described signal to noise ratio
In predetermined snr value such as 30dBm (dBm), calculated mass value is 0x01, and representing should
The quality in external clock source is preferably;
Step S2013 is little more than described predetermined satellite number and described signal to noise ratio at the satellite number of described locking
When described predetermined signal to noise ratio, the mass value being calculated described external clock source is the second value;
In the present embodiment, when described locking satellite number is less than predetermined noise more than predetermined value such as 4 and signal to noise ratio
Ratio such as 30dbm, calculated mass value is 0x02, represents that quality is for poor;
Step S2014 is big less than described predetermined satellite number and described signal to noise ratio at the satellite number of described locking
When described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 3rd value;
In the present embodiment, the satellite number in described locking is believed more than predetermined less than predetermined value such as 4 and signal to noise ratio
Make an uproar ratio such as 30dbm, and calculated mass value is 0x03, represents that quality is for poor;
Step S2015 is little less than described predetermined satellite number and described signal to noise ratio at the satellite number of described locking
When described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 4th value.
In the present embodiment, the satellite number in described locking is believed less than predetermined less than predetermined value such as 4 and signal to noise ratio
Make an uproar ratio such as 30dbm, and calculated mass value is 0x04, represents that quality is unavailable.
In this preferred embodiment, the satellite number of predetermined locking is 4, and wherein three are used for determining position
Longitude, dimension, highly, another is used for determining temporal information, it is to be understood that implement at other
In example, longitude in position, dimension, height it has been determined that in the case of, it is also possible to according to actual needs
Only one satellite of locking.
The present invention also provides for a kind of server 100, with reference to Fig. 4, in one embodiment, described server
100 include:
Data obtaining module 10, carries out time synchronized, and obtains described for server and external clock source
The information in external clock source;
In the present embodiment, external clock source includes GPS, the Big Dipper and atomic clock etc., with GPS and the Big Dipper
As a example by, the information in external clock source include satellite number that described server 100 searches for, the satellite number of locking,
The information such as signal to noise ratio, antenna feeder state and satellite Quality field, as a example by atomic clock, external clock source
Information includes the information such as signal to noise ratio and antenna feeder state.
Packetization module 20, for being bundled to exact time synchronization association by the information integration in described external clock source
In view PTP message, form PTP and add message;
In the present embodiment, according to IEEE 1588 (being originally preferably implemented as version IEEE 1588v2) agreement
Describe, in the case of following TLV (type-length-value), by for PTP message in 1588 agreements
It is added with information field such as satellite digital section, signal to noise ratio, antenna feeder state and the quality closing external clock source
Fields etc. represent satellite quality condition, so, can carry out monitoring server 100 by remote maintenance instrument
The information state in external clock source, thus improve the maintenance efficiency that IEEE 1588 clock synchronizes.
Specifically, satellite digital section is used for representing satellite number and the satellite of locking that 1588 servers search out
Number.Using hexadecimal representation, wherein upper byte represents locking number, and low byte represents searches star number.
Such as: 0x0407 represents and searches out 7 satellites, and locking satellite is 4.Signal to noise ratio field is used for representing 1588
The satellite quality that server is used, the SNR value of the satellite of all lockings is averaging by 1588 servers
Value.
The antenna feeder state of clock source is divided into normally, opens a way and short circuit three kinds, represents with 0,1 and 2 respectively.
Quality field is used to indicate that the satellite quality that 1588 servers are used, and this value is by locking
Satellite number and signal-to-noise ratio computation draw.
First sending module 30, sends to client for described PTP is added message, so that described visitor
Family end and described server 100 carry out time synchronized, and demodulate the information in described external clock source.
In the present embodiment, described client is preferably base station, certainly, in other embodiments, and described visitor
Family end can also be other network equipments.Client and 1588v2 server are to be carried out by PTP message
Communication.In this preferred embodiment, described PTP type of message is preferably and describes time source ability
Announce message, the most in other embodiments, it is also possible to select other types.
It is understood that in other embodiments, it is also possible to by multistage server, PTP is added report
The transmission of literary composition, adds message by described PTP and sends to client, as a example by three tier server, specifically
Process is as follows:
First order server and external clock source carry out time synchronized, and obtain the letter in described external clock source
Breath;
The information integration in described external clock source is bundled to exact time synchronization association by described first order server
In view PTP message, form a PTP and add message;
A described PTP is added message and sends to second level server by described first order server;
The described PTP received is added message and adds self transmitting terminal to by described second level server
PTP message in, formed the 2nd PTP add message;
Described 2nd PTP is added message and sends to third level server by described second level server;
Described 2nd PTP received is added message and adds self transmitting terminal to by described third level server
PTP message in, formed the 3rd PTP add message;
Described 3rd PTP is added message and sends to client by described third level server, so that described visitor
Family end and described server carry out time synchronized, and demodulate the information in described external clock source.
So, by the series connection of multistage server, make PTP add message and carry out transparent transmission in a network, can
With need not external multiple external time sources, it is achieved the synchronization of time between LAN.
The server 100 that the present invention provides, by carrying out time synchronized with external clock source, obtains described
The information in external clock source, is being bundled to exact time synchronization association by the information integration in described external clock source
After view PTP message is formed PTP interpolation message, described PTP is added message and sends to client,
So that described client and described server 100 carry out time synchronized, and demodulate described external clock source
Information.So, by adding the external clock source information being connected with server 100 in PTP message,
More detailed synchronizing information is provided so that external clock source, when breaking down, can facilitate for client
Client flexible conversion clock strategy, to avoid the adverse consequences being likely to occur, thus improves system
Stability.
In one embodiment, as it is shown in figure 5, on the basis of the embodiment of above-mentioned Fig. 4, the present embodiment
In, described packetization module 20 includes:
Computing unit 201, for when the antenna feeder state in described external clock source is normal, according to described lock
Fixed satellite number and signal to noise ratio, calculate the mass value in described external clock source;
In this preferred embodiment, the mass value in described external clock source is Quality field and passes through actual lock
Satellite number and signal to noise ratio obtain, in other embodiments, it is also possible to specific reference to search satellite number,
One or more information such as the satellite number of locking, signal to noise ratio are calculated mass value.
Packaged unit 202, adds in PTP message for being packed by the mass value in described external clock source,
Form PTP and add message.
In the present embodiment, PTP adds message and includes head, main body and extended field, described extension word
Section is type/length/value TLV form.
In the present embodiment, construct described PTP and add the message format of message, be shown in Table one:
1, the supplier that IEEE1588 agreement specifies with the scalable format of normal structure is:
Table one
Wherein: Tlv Type uses IEEE1588 agreement regulation
ORGANIZATION_EXTENSION value 0003 represents, takies 2 bytes;
Length Field represents the length of whole extended field;
Organization ID and Organization SubType is supplier ID and subtype, accounts for respectively
By 3 bytes;
Data part is satellite digital section, signal to noise ratio field, antenna feeder state and Quality field.Concrete division
Such as table two:
Table two
2, increase the PTP after extended field and add message format, see table three:
Table three
Wherein, Origin Timestamp be defined as numerical value be 0 or precision be ± 1ns time timestamp;
Current UTC Offset is defined as the leap second time difference between UTC and TAIl time ruler;
Grandmaster Priority1/2 represents user-defined Grandmaster priority 1/2;
The temporal quality rank of the Grandmaster that Grandmaster Clock Quality is defined as;
Grandmaster Identity is defined as the clockwork ID of Grandmaster;
Steps Removed is defined as the clock path jumping figure of Grandmaster Yu Slave equipment room;
Time Source is defined as time source type;
Tlv is newly-increased extended field, takies 15 bytes.
In the present embodiment, construct described PTP and add the data set of message, due to the value of Time Source
The value of TimeSource element in time characteristic data collection (Time Properties DS), therefore, time
Between performance data concentrate also increase such as satellite digital section, signal to noise ratio, antenna feeder state and Quality field etc..
The initial value of Time Properties DS satellite number selects as follows:
If external time source is known when initializing, then the initial value of satellite number is exactly actual defending
Star number value, including the satellite number searched and the satellite number of locking, otherwise initial value is NULL.
The initial value of Time Properties DS signal to noise ratio selects as follows:
If external time source is known when initializing, then the initial value of signal to noise ratio is exactly actual value,
Otherwise initial value is NULL.
The selection of the initial value of Time Properties DS antenna feeder state is as follows:
If external time source is known when initializing, then the initial value of antenna feeder state is actual
State value, otherwise initial value is NULL.
The initial value of Time Properties DS mass value selects as follows:
If external time source is known when initializing, then the quality initial value of time source is exactly actual
Value, otherwise initial value is NULL.
In one embodiment, as shown in Figure 6, on the basis of the embodiment of above-mentioned Fig. 5, described calculating
Unit 201 includes:
Relatively subelement 2011, for when the antenna feeder state in described external clock source is normal, the most described
The magnitude relationship of satellite number and the predetermined satellite number of locking and signal to noise ratio and predetermined signal to noise ratio;
First subelement 2012, for the satellite number in described locking more than or equal to described predetermined satellite number
And described signal to noise ratio more than described predetermined signal to noise ratio time, the mass value being calculated described external clock source is
First value;
In the present embodiment, when the satellite number of described locking is big more than or equal to predetermined value such as 4 and described signal to noise ratio
In predetermined snr value such as 30dBm (dBm), calculated mass value is 0x01, and representing should
The quality in external clock source is preferably;
Second subelement 2013, for the satellite number in described locking more than described predetermined satellite number and described
When signal to noise ratio is less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the second value;
In the present embodiment, when described locking satellite number is less than predetermined noise more than predetermined value such as 4 and signal to noise ratio
Ratio such as 30dbm, calculated mass value is 0x02, represents that quality is for poor;
3rd subelement 2014, for the satellite number in described locking less than described predetermined satellite number and described
When signal to noise ratio is more than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 3rd value;
In the present embodiment, the satellite number in described locking is believed more than predetermined less than predetermined value such as 4 and signal to noise ratio
Make an uproar ratio such as 30dbm, and calculated mass value is 0x03, represents that quality is for poor;
4th subelement 2015, for the satellite number in described locking less than described predetermined satellite number and described
When signal to noise ratio is less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 4th value.
In the present embodiment, the satellite number in described locking is believed less than predetermined less than predetermined value such as 4 and signal to noise ratio
Make an uproar ratio such as 30dbm, and calculated mass value is 0x04, represents that quality is unavailable.
In this preferred embodiment, the satellite number of predetermined locking is 4, and wherein three are used for determining position
Longitude, dimension, highly, another is used for determining temporal information, it is to be understood that implement at other
In example, longitude in position, dimension, height it has been determined that in the case of, it is also possible to according to actual needs
Only one satellite of locking.
The present invention also provides for a kind of system 10, and with reference to Fig. 7, in one embodiment, described system 10 includes
Client 200, remote port 300 and above-mentioned server 100,
With reference to Fig. 8, described client 200 includes:
First receiver module 201, for receive described server 100 send PTP add message and
The PTP that described remote port 300 sends adds message and extracts order;
In the present embodiment, described client 200 is preferably base station, certainly, in other embodiments, institute
Stating client 200 can also be for other network equipment.In this preferred embodiment, described PTP type of message
It is preferably the Announce message describing time source ability, the most in other embodiments, it is also possible to choosing
Select other types.
Parsing module 202, extracts order for adding message according to described PTP, is added by described PTP
Message resolves, to obtain the information in described external clock source;
In the present embodiment, described client 200 receive described PTP add message extract order time,
I.e. the described PTP received is added message to resolve, thus obtains the information in described external clock source,
Satellite number, the satellite number of locking, signal to noise ratio, antenna feeder state and mass value etc. such as search.
Second sending module 203, the information in the described external clock source for parsing being obtained sends to institute
State remote port 300.
In the present embodiment, the information in the described external clock source that parsing is obtained by described client 200 sends
To described remote port 300 so that described remote port 300 can understand the state in external clock source in time,
Such that it is able to when external clock source breaks down, it is possible to flexible conversion clock strategy, thus improve system
The stability of 10 and maintenance efficiency.
With reference to Fig. 9, described remote port 300 includes:
Request module 301, adds message extraction order for sending described PTP to described client 200;
Second receiver module 302, for receiving the described external clock source of described client 200 transmission
Information.
In this preferred embodiment, remote maintenance personnel pass through described remote port 300 calling interface to described visitor
Family end 200 such as base station sends message and extracts order, thus obtains demodulated the obtaining of client 200 transmission
The information in described external clock source, in order to the state in external clock source can be monitored at any time, such that it is able to
The maintenance efficiency of raising system 10.
With reference to Figure 10, as a example by single-stage server sync is transmitted, client 200 and 1588v2 server
Being communicated by PTP message, the information in described external clock source is generated by described server 100
After PTP adds message, described PTP is added message and sends to the first switch, exchange through described first
It is transferred to described client 200 after machine exchange, is demodulated obtaining through described client 200 described external
After clock source information, described external clock source information is transferred to described remote port via the second switch
300。
With reference to Figure 11, as a example by multistage server synchronous transfer, client 200 takes with multistage 1588v2
Business device is communicated by PTP message, and described first server is by the information in described external clock source
After generating a PTP interpolation message, sending to second server, described second level server will receive
A described PTP add message and add in the PTP message of self transmitting terminal, form the 2nd PTP
Adding message, described 2nd PTP is added message and sends to third level server by described second level server,
Described 2nd PTP received is added message and adds self transmitting terminal to by described third level server
In PTP message, forming the 3rd PTP and add message, described 3rd PTP is added by described 3rd server
Message sends to the second switch, is transferred to described client 200 after described second switch exchange,
After described client 200 is demodulated obtaining described external clock source information, by described external clock source
Information is transferred to described remote port 300 via described switch.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every
Utilize equivalent structure or equivalence flow process conversion that description of the invention and accompanying drawing content made, or directly or
Connect and be used in other relevant technical fields, be the most in like manner included in the scope of patent protection of the present invention.
Claims (11)
1. a method for synchronizing time, it is characterised in that described method for synchronizing time comprises the following steps:
Server and external clock source carry out time synchronized, and obtain the information in described external clock source;
The information integration in described external clock source is bundled in accurate time synchronization protocol PTP message, shape
PTP is become to add message;
Described PTP is added message send to client, so that described client is carried out with described server
Time synchronized, and demodulate the information in described external clock source.
2. method for synchronizing time as claimed in claim 1, it is characterised in that described external clock source
Information includes described server satellite digital section, signal to noise ratio field, antenna feeder state and Quality field.
3. method for synchronizing time as claimed in claim 2, it is characterised in that described by described external time
The information integration of Zhong Yuan is bundled in PTP message, and the step forming PTP interpolation message includes:
When the antenna feeder state in described external clock source is normal, according to described satellite number and signal to noise ratio, meter
Calculate the mass value in described external clock source;
The packing of the satellite number in described external clock source, signal to noise ratio, antenna feeder state and mass value is added to
In PTP message, form PTP and add message.
4. method for synchronizing time as claimed in claim 3, it is characterised in that described satellite number includes institute
State satellite number and the satellite number of locking that server search arrives, the described antenna feeder shape in described external clock source
When state is normal, according to described satellite number and signal to noise ratio, calculate the mass value in described external clock source
Step includes:
When the antenna feeder state in described external clock source is normal, the relatively satellite number of described locking is defended with predetermined
The magnitude relationship of star number and signal to noise ratio and predetermined signal to noise ratio;
Satellite number in described locking is more than described more than or equal to described predetermined satellite number and described signal to noise ratio
During predetermined signal to noise ratio, the mass value being calculated described external clock source is the first value;
Satellite number in described locking is less than described predetermined letter more than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the second value;
Satellite number in described locking is more than described predetermined letter less than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the 3rd value;
Satellite number in described locking is less than described predetermined letter less than described predetermined satellite number and described signal to noise ratio
Make an uproar than time, the mass value being calculated described external clock source is the 4th value.
5. method for synchronizing time as claimed in claim 1, it is characterised in that described PTP adds report
Literary composition includes that head, main body and extended field, described extended field are type/length/value TLV form.
6. a server, it is characterised in that described server includes:
Data obtaining module, carries out time synchronized for server and external clock source, and obtain described outside
Connect the information of clock source;
Packetization module, for being bundled to accurate time synchronization protocol by the information integration in described external clock source
In PTP message, form PTP and add message;
First sending module, sends to client for described PTP is added message, so that described client
End and described server carry out time synchronized, and demodulate the information in described external clock source.
7. server as claimed in claim 6, it is characterised in that the information bag in described external clock source
Include described server satellite digital section, signal to noise ratio field, antenna feeder state and Quality field.
8. server as claimed in claim 7, it is characterised in that described packetization module includes:
Computing unit, for when the antenna feeder state in described external clock source is normal, according to described satellite number
And signal to noise ratio, calculate the mass value in described external clock source;
Packaged unit, for by satellite number, signal to noise ratio, antenna feeder state and the matter in described external clock source
Value packing is added in PTP message, forms PTP and adds message.
9. server as claimed in claim 8, it is characterised in that described satellite number includes described service
Satellite number that device searches and the satellite number of locking, described computing unit includes:
Relatively subelement, for when the antenna feeder state in described external clock source is normal, compares described locking
Satellite number and predetermined satellite number and the magnitude relationship of signal to noise ratio and predetermined signal to noise ratio;
First subelement, for the satellite number in described locking more than or equal to described predetermined satellite number and institute
When stating signal to noise ratio more than described predetermined signal to noise ratio, the mass value being calculated described external clock source is first
Value;
Second subelement, for the satellite number in described locking more than described predetermined satellite number and described noise
Than during less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the second value;
3rd subelement, for the satellite number in described locking less than described predetermined satellite number and described noise
Than during more than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 3rd value;
4th subelement, for the satellite number in described locking less than described predetermined satellite number and described noise
Than during less than described predetermined signal to noise ratio, the mass value being calculated described external clock source is the 4th value.
10. server as claimed in claim 6, it is characterised in that described PTP adds message and includes
Head, main body and extended field, described extended field is type/length/value TLV form.
11. 1 kinds of systems, it is characterised in that described system includes client, remote port and such as right
Require the server according to any one of 6 to 10,
Described client includes:
First receiver module, for receive described server send PTP add message and described remotely
The PTP that end sends adds message and extracts order;
Parsing module, extracts order for adding message according to described PTP, described PTP is added message
Resolve, to obtain the information in described external clock source;
Second sending module, the information transmission in the described external clock source for parsing being obtained is the most described far
Cheng Duan.
Described remote port includes:
Request module, adds message extraction order for sending described PTP to described client;
Second receiver module, for receiving the information in the described external clock source that described client sends.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510376774.9A CN106330420A (en) | 2015-07-01 | 2015-07-01 | Time synchronization method, server and system |
PCT/CN2015/094887 WO2017000480A1 (en) | 2015-07-01 | 2015-11-18 | Time synchronization method, server and system, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510376774.9A CN106330420A (en) | 2015-07-01 | 2015-07-01 | Time synchronization method, server and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106330420A true CN106330420A (en) | 2017-01-11 |
Family
ID=57607615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510376774.9A Pending CN106330420A (en) | 2015-07-01 | 2015-07-01 | Time synchronization method, server and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106330420A (en) |
WO (1) | WO2017000480A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866626A (en) * | 2022-04-28 | 2022-08-05 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
CN115396058A (en) * | 2022-08-15 | 2022-11-25 | 中国联合网络通信集团有限公司 | Signal transmission method, device and storage medium |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110445632B (en) * | 2018-05-04 | 2023-09-01 | 北京京东尚科信息技术有限公司 | Method and device for preventing client from crashing |
CN111258209A (en) * | 2018-12-25 | 2020-06-09 | 维沃移动通信有限公司 | Time information acquisition method, time information transmission method, terminal and network equipment |
CN111355553A (en) * | 2020-04-15 | 2020-06-30 | 东莞深证通信息技术有限公司 | High-reliability time synchronization system and method applied to data center |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202818369U (en) * | 2012-08-30 | 2013-03-20 | 上海远景数字信息技术有限公司 | Clock server supporting IEC61850 clock information publishing |
CN104320238B (en) * | 2014-10-21 | 2016-08-17 | 浙江大学 | A kind of method for synchronizing time under submarine observation network big flow background |
-
2015
- 2015-07-01 CN CN201510376774.9A patent/CN106330420A/en active Pending
- 2015-11-18 WO PCT/CN2015/094887 patent/WO2017000480A1/en active Application Filing
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866626A (en) * | 2022-04-28 | 2022-08-05 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
CN114866626B (en) * | 2022-04-28 | 2023-09-29 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
CN115396058A (en) * | 2022-08-15 | 2022-11-25 | 中国联合网络通信集团有限公司 | Signal transmission method, device and storage medium |
CN115396058B (en) * | 2022-08-15 | 2024-04-12 | 中国联合网络通信集团有限公司 | Signal transmission method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2017000480A1 (en) | 2017-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104737490B (en) | Communicator, communication system and method for synchronizing time | |
CN106330420A (en) | Time synchronization method, server and system | |
JP5811794B2 (en) | Communication device | |
CN105577349A (en) | Airborne network IEEE1588 protocol master-slave clock port synchronization method | |
CN104662826B (en) | Stand-by period in substation network determines | |
CN106357362B (en) | A kind of method for synchronizing time, device and PTP system | |
CN102468898B (en) | The method, apparatus and system of time synchronized are realized in time division multiplex network | |
US10778359B2 (en) | Time synchronization method, programmable logic device, single board and network element | |
CN107809295B (en) | A kind of cross-platform time synchronism apparatus and method | |
CN102006159A (en) | Multi-slave clock sampling value multi-interface synchronizing system based on IEEE1588 | |
CN103929293A (en) | Asymmetrically-delayed time synchronization method and system | |
CN102843620A (en) | OTN (Optical Transport Network) device and method for realizing time synchronous transmission | |
CN102710410A (en) | Clock synchronizing method for NTP network and PTP network | |
CN102315985A (en) | Time synchronization precision test method for intelligent device adopting IEEE1588 protocols | |
CN103812630A (en) | Clock synchronization for line differential protection | |
CN102932083A (en) | Microwave time synchronization method and device | |
CN103138887A (en) | Processing method of 1588 event messages and processing method of 1588 event messages | |
CN104579623A (en) | Network time-setting system and method for secondary equipment of electric power system | |
WO2012088931A1 (en) | Method and device for monitoring time synchronization | |
CN105703892A (en) | Method of realizing PTP nanosecond precision based on hardware time stamp | |
CN103546273B (en) | Frequency synchronism device and method based on PTP frames | |
CN104468014A (en) | Method for improving time synchronization precision under complex network environment | |
CN106688207A (en) | Method for determining a propagation time of a telegram in a communication network, and corresponding network components | |
CN107528655A (en) | Method for synchronizing time and clock synchronization system | |
CN102036123A (en) | Synchronization method and system for single frequency network digital broadcast television system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170111 |
|
WD01 | Invention patent application deemed withdrawn after publication |