CN108462548A - Method for synchronizing time and device - Google Patents
Method for synchronizing time and device Download PDFInfo
- Publication number
- CN108462548A CN108462548A CN201710097245.4A CN201710097245A CN108462548A CN 108462548 A CN108462548 A CN 108462548A CN 201710097245 A CN201710097245 A CN 201710097245A CN 108462548 A CN108462548 A CN 108462548A
- Authority
- CN
- China
- Prior art keywords
- port
- network element
- clock
- state
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/42—Loop networks
- H04L12/437—Ring fault isolation or reconfiguration
Abstract
The present invention provides a kind of method for synchronizing time and devices, wherein above-mentioned method for synchronizing time, including:The time synchronization of the network element is carried out by the clock synchronized result that clock synchronization algorithm determines based on network element.
Description
Technical field
The present invention relates to field of synchronization, in particular to a kind of method for synchronizing time and device.
Background technology
In grouping conveying network, the method for generally using the clock of synchronous ethernet+1588v2 to synchronize, by it is synchronous with
Too net establishes the synchronization of equipment room system frequency, and time synchronization is realized by accurate time synchronization protocol (PTP), wherein due to
Clock includes frequency and/or time, and therefore, clock synchronization includes Frequency Synchronization and/or time synchronization.The place of above-mentioned synchronizing process
Reason flow is roughly divided into two parts:
(1) foundation of 1588v2 Time Synchronization Networks:Reception and certification come from the notice report of other clock (time) ports
Text;Utilize the recommendation state of best master clock (Best Master Clock, referred to as BMC) algorithm decision exit port;According to end
Enter the update of recommendation state decision point completing port data acquisition system in mouth state decision making algorithm;According to recommendation state and " state
Decision event " determines the virtual condition of port according to port state machine, establishes master-slave relationship.
(2) time deviation measurement and time synchronization:By time-stamping messages answering, i.e., main equipment and from equipment room not
Disconnected PTP (Precision Time Protocol, referred to as PTP) the synchronization message message that sends obtains deviant (Offset), from
Equipment can correct local time value according to Offset, and local zone time is made to synchronize the time of main equipment.
The sources the BMC selection mechanism of settling time synchronizing network is by notification packet passing time source quality information, in system
Each time source carry out independent BMC operations.BMC algorithms include two decision making algorithms:Time state decision making algorithm, port shape
State decision making algorithm.
Each clock is master clock without negotiating which time source in BMC algorithms, which time source is from clock;Phase
Instead, each clock only assesses the state of oneself port.It is substantially the algorithm of class minimum spanning tree, networking process not only without
Method carries out real-time manual intervention, but also there are algorithm complexity high (growth of times grade is presented with the increase of NE quantity),
It is easy the problem of cyclization, leverages the efficiency of Time Synchronization Network foundation.The stability of network also influences synchronous precision,
If the change of network topology cannot be rapidly adapted to, time synchronization can be severely impacted.Existing time synchronization BMC algorithms
Substantially with frequency synchronization algorithm (such as SSM algorithms, wherein SSM is the letter of Synchronization Status Message
Claim) it is completely different two kinds of implementation methods, thus the inconsistent of Time Synchronization Network and Frequency Synchronization network is frequently resulted in, make
The equipment of time synchronization and the clock frequency of main equipment are obtained there are deviation, cannot be satisfied the precision of subnanosecond grade time synchronization needs
It asks.
The prior art cannot be satisfied the interference of clock associated synchronisation and network topology change to time synchronization so that when
The realization ever more important of clock associated synchronisation.
Invention content
An embodiment of the present invention provides a kind of method for synchronizing time and devices, at least to solve time synchronization in the related technology
Precision is bad and the problem of easily influence by network topology change.
According to one embodiment of present invention, a kind of method for synchronizing time is provided, including:It is same by clock based on network element
The clock synchronized result that step algorithm determines carries out the time synchronization of the network element.
According to another embodiment of the invention, a kind of time synchronism apparatus is provided, including:Synchronization module is used for base
The time synchronization of the network element is carried out by the clock synchronized result that clock synchronization algorithm determines in network element.
According to still another embodiment of the invention, a kind of storage medium is additionally provided.The storage medium is set as storage and uses
In the program code for executing following steps:The net is carried out by the clock synchronized result that clock synchronization algorithm determines based on network element
The time synchronization of member.
Through the invention, based on network element by the clock synchronized result that clock synchronization algorithm determines carry out the network element when
Between it is synchronous, it is thereby achieved that quick networking, reduces the influence that network topological change generates time synchronization, when to solve
Between synchronization accuracy it is bad and the problem of easily influenced by network topology change, achieve the effect that improve time precision and stability.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and is constituted part of this application, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware block diagram of the mobile terminal of method for synchronizing time of the embodiment of the present invention;
Fig. 2 is the flow chart of method for synchronizing time according to the ... of the embodiment of the present invention;
Fig. 3 is a kind of structure diagram of time synchronism apparatus according to the ... of the embodiment of the present invention;
Fig. 4 is the configuration diagram of clock synchronous network network according to the ... of the embodiment of the present invention;
Fig. 5 is a kind of optional message description according to the ... of the embodiment of the present invention and interaction flow schematic diagram;
Fig. 6 is a kind of optional clock time associated synchronisation state decision making algorithm (State according to the ... of the embodiment of the present invention
Decision Algorithm, referred to as SDA) principle schematic;
Fig. 7 is the operation principle of clock time associated synchronisation state machine (Finite State Machine, referred to as FSM)
Schematic diagram.
Specific implementation mode
Come that the present invention will be described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, "
Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.
Embodiment 1
One application scenarios of the embodiment of the present application are:Network element completes Frequency Synchronization by selected frequency synchronization algorithm,
Then by the time synchronization by the result of frequency synchronization algorithm operation for realizing network.Wherein, selected frequency synchronization algorithm,
It is Synchronization Status Message algorithm (SSM, Synchronization Status Message) in this programme.Frequency Synchronization will be passed through
The result of algorithm operation is as follows for realizing the realization principle of the time synchronization of network:The principal and subordinate obtained based on SSM algorithms is closed
System's (being port status), be locked on network element (about that section of interaction of PLL among Fig. 6) by protocol interaction mode (or
Person says and is locked on network element port), it is then based on this and (calculates) port status by SSM, calculated by time synchronization
Method realizes network time synchronization.Above-mentioned Time synchronization algorithm, including but not limited to best master clock is calculated in the embodiment of the present application
Method (BMCA, Best Master Clock Algorithm), it should be noted that " clock " core in BMCA algorithms refers to
" time ".
Based on above-mentioned scene, the technical solution that the embodiment of the present application 1 uses is as follows:
The embodiment of the method that the present embodiment is provided can be in mobile terminal, terminal or similar arithmetic unit
Middle execution.For running on a computing device, Fig. 1 is that a kind of computer of method for synchronizing time of the embodiment of the present invention is set
Standby hardware block diagram.As shown in Figure 1, computer equipment 10 may include one or more (only showing one in figure) processing
Device 102 (processor 102 can include but is not limited to the processing unit of Micro-processor MCV or programmable logic device FPGA etc.),
Memory 104 for storing data and the transmitting device 106 for communication function.Those of ordinary skill in the art can be with
Understand, structure shown in FIG. 1 is only to illustrate, and does not cause to limit to the structure of above-mentioned electronic device.For example, computer equipment
10 may also include than shown in Fig. 1 more either less components or with the configuration different from shown in Fig. 1.
Memory 104 can be used for storing the software program and module of application software, such as the time in the embodiment of the present invention
Corresponding program instruction/the module of synchronous method, processor 102 by operation be stored in software program in memory 104 and
Module realizes above-mentioned method to perform various functions application and data processing.Memory 104 may include high speed with
Machine memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or other it is non-easily
The property lost solid-state memory.In some instances, memory 104 can further comprise remotely located relative to processor 102 deposit
Reservoir, these remote memories can pass through network connection to computer equipment 10.The example of above-mentioned network includes but not limited to
Internet, intranet, LAN, mobile radio communication and combinations thereof.
Transmitting device 106 is used to receive via a network or transmission data.Above-mentioned network specific example may include
The wireless network that the communication providers of computer equipment 10 provide.In an example, transmitting device 106 includes that a network is suitable
Orchestration (Network InterfaceController, NIC), can be connected with other network equipments by base station so as to
Internet is communicated.In an example, transmitting device 106 can be radio frequency (RadioFrequency, RF) module, use
In wirelessly being communicated with internet.
A kind of method running on above computer equipment is provided in the present embodiment, and Fig. 2 is implemented according to the present invention
The flow chart of the method for synchronizing time of example, as shown in Fig. 2, the flow includes the following steps:
Step S202 obtains the clock synchronized result determined by clock synchronization algorithm based on network element;Optionally, when above-mentioned
Clock synchronized result includes:The port status of designated port in said network element, wherein above-mentioned port status includes:Master port state
With from port status.
Optionally, the port status of designated port determines in the following manner in said network element:It is according to said network element
The tracking mode of system clock determines the port status of designated port in said network element, wherein above-mentioned tracking mode includes:Whether connect
By external ethernet clock, i.e., above-mentioned tracking mode includes:When receiving external ethernet clock, refusing to receive external ethernet
Clock.
Step S204 is based on above-mentioned clock synchronized result, carries out time synchronization.
As the alternative embodiment of the application, step S204 can show as following implementations, but not limited to this:
Judge whether the local data sets of said network element belong to pre-set priority clock grade range;It is no in judging result
In the case of, trigger following processing procedure:The tracking mode of system clock according to said network element is determined in said network element and is specified
The first port state of port;The time synchronization of said network element is carried out according to above-mentioned first port state;It is yes in judging result
In the case of, compare the local data sets of best port data set and said network element that the designated port of said network element is judged
Priority;The second port state of above-mentioned designated port is determined according to comparison result;It is carried out according to above-mentioned second port state
State the time synchronization of network element.It should be noted that above-mentioned first port state and second port state can be identical ports
State or second port state defer to first port state.
Optionally, above-mentioned pre-set priority clock grade may range from high priority clock grade range, such as locally
The value of the priority clock grade range (Class ID) of data set is any number in 0 to 127, certainly, above-mentioned default
Priority clock grade range is adjustable, however it is not limited to the numerical value between 0 to 127.It, can at one based on above-mentioned value range
It selects in embodiment, before step S202, can be determined according to actual needs (whether by said network element be appointed as top network element)
Whether above-mentioned Class ID are set to the value between 1-127, wherein when top network element refers to that local clock does not track outside
The equipment of clock.
Optionally, the processing procedure of " the second port state that above-mentioned designated port is determined according to comparison result " can pass through
Following manner realization, but not limited to this:
The case where priority of above-mentioned local data sets is higher than above-mentioned best port data set is indicated in above-mentioned comparison result
Under, the port status of above-mentioned designated port is determined as master port state;Above-mentioned local data sets are indicated in above-mentioned comparison result
Priority less than in the case of above-mentioned best port data set (Erbest), the port status of above-mentioned designated port is determined as
Passively (Passive) port status.
Optionally, after the port status of above-mentioned designated port being determined as passive (Passive) port status, above-mentioned side
Method further includes:Set the source port ID in above-mentioned Erbest to father's port id of said network element, wherein above-mentioned father's port id is used
The port corresponding with above-mentioned designated port in the upstream equipment of instruction said network element.
Optionally, the Erbest of above-mentioned designated port is obtained in the following manner:Obtain above-mentioned designated port receive it is specified
The hop count that message is undergone;The number that the port of the corresponding source node of Minimal routing hop count in above-mentioned hop count is received
According to storing into above-mentioned Erbest.
Optionally, it is carried out required for time synchronization for storage in above-mentioned local data sets and/or best port data set
Information, including but not limited to:Clock priority, clock grade, clock type (such as boundary clock, transmission clock etc.).Tool
Body definition can learn that details are not described herein again from inquiry in the related technology.Wherein, the source in best port data set Erbest
It can be obtained by the relevant technologies, details are not described herein again.
Optionally, the executive agent of above-mentioned steps can be base station, terminal etc., but not limited to this.
Said program is described in detail below in conjunction with a specific application scenarios:
The first step, under the premise of clock network establishes completion, the configuration of time network is completed in the configuration in reference clock source.
According to the configuration of clock network LAN, time synchronization configuration is carried out to same network element port, establishes correct virtual local area
Net.Port in primary ring direction is configured to unified primary direction virtual LAN, and the port in spare ring direction is configured to
Unified spare direction virtual LAN ensures that time synchronization is consistent with clock synchronous network.Wherein, LAN makes same
The standard PTP messages of VLAN can only be run in defined virtual network, i.e., primary direction PTP messages can only be in active clock ring
Interior transmission, spare direction PTP messages can only transmit in standby clock ring.
Second step, compatibility standard PTP notification packets, using information such as the port-marks of notification packet send-receive clock node,
Carry out the interaction of equipment room timing node information;Wherein, notification packet transmits in defined virtual network, in boundary clock
In the network of (Boundary Clock, referred to as BC) equipment composition, notification packet is only sent to neighbouring device.Including transparent transmission
In the network of clock (Transfer Clock, referred to as TC) equipment, notification packet will be sent to adjacent in regulation virtual network
Equipment and each equipment being transparent to.
Third walks, and uses the data set comparison algorithm of BMC algorithms.Data set comparison algorithm 1 therein is omitted, i.e., acquiescence is received
Hold the priority of all clock nodes received identical, the topological relation only between comparison node.Use data set comparison algorithm 2
Traversal port receives the experience node hop count of message.Using the shortest source node of topology distance as the best port (number of the port
According to there are in Erbest), i.e., data set comparison algorithm 2 is used to carry out the data set that each notification packet that port receives carries
Compare, decision goes out Erbest, provide data for port decision making algorithm and support.
4th step is compared the ports PTP using the state decision making algorithm based on clock source selection result, when according to SSM
Clock sync direction decision port status.It is relatively more local if the Class ID of local data sets belong to the number within 1~127
Data set and Erbest, it is Master states that port is arranged if local data sets are more excellent;It is arranged if Erbest is more excellent
Port is the ports Passive.It is external according to equipment if the Class ID of local data sets are not belonging to the number between 1~127
Clock output is provided or receives the master slave mode that input carrys out control port.It is set as if port does not receive external clock
Master states are set as Slave states if port receives external clock, are still set even if not configuring reference source clock
It is set to Master states;
Port decision making algorithm is in addition to being that value dependence data set compares calculation within 1~127 in the Class ID of local data sets
2 decision port status of method 1 and data set comparison algorithm.For feelings of the Class ID not within 1~127 of local data sets
Condition, the master slave mode for fully relying on clock source carry out decision port status.For top equipment, then by its local data sets
Class ID are 1~127 values, it is made not track external equipment;For other equipment by the Class ID of its local data sets
The value being set as except 1~127, is set as master state if not tracking external clock, is arranged if tracking external clock
For from state.If port does not configure synchronization timing source, it is still set as master state.To push up by port decision making algorithm
End node will not track the external network time, but also the time of timing node selects source direction and clock source selection direction one in network
It causes.
5th step is that can write the device port ID of the Erbest of the port as from the port (Slave) and originally set for decision
Standby father's port id, such equipment room just establish the master-slave relationship of logic;
6th step, the connection of equipment room is established by signaling message, and decision is actively to be set from the equipment of port to master port
Preparation plays link, and master port is interacted with from port after receiving message, established the link;For example, being completed between Node A and Node B
The interaction of signaling message executes clock and synchronizes.Start time synchronization control after clock lock.
7th step executes normal PTP time synchronizations deviation and measures after the completion of link, the time for correcting master-salve clock is inclined
Difference after the completion of waiting for time synchronization link establishment, executes PTP protocol message response time of measuring deviation and the adjustment principal and subordinate of standard
Time.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical scheme of the present invention is substantially in other words to existing
The part that technology contributes can be expressed in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 2
A kind of time synchronism apparatus is additionally provided in the present embodiment, and the device is real for realizing above-described embodiment and preferably
Mode is applied, repeating no more for explanation had been carried out.As used below, the soft of predetermined function may be implemented in term " module "
The combination of part and/or hardware.Although device described in following embodiment is preferably realized with software, hardware, or
The realization of the combination of software and hardware is also that may and be contemplated.
Fig. 3 is the structure diagram of time synchronism apparatus according to the ... of the embodiment of the present invention, as shown in figure 3, the device includes:
Acquisition module 30, for obtaining the clock synchronized result determined by clock synchronization algorithm based on network element, optionally,
Above-mentioned clock synchronized result includes:The port status of designated port in said network element, wherein above-mentioned port status includes:Main side
Mouthful state and from port status.
Optionally, the port status of designated port determines in the following manner in said network element:It is according to said network element
The tracking mode of system clock determines the port status of designated port in said network element, wherein above-mentioned tracking mode includes:Whether connect
By external ethernet clock, i.e., above-mentioned tracking mode includes:Receive external ethernet clock and when refusal receives external ethernet
Clock two states.
Synchronization module 32 is connected to acquisition module 30, for being based on above-mentioned clock synchronized result, carries out time synchronization.
Optionally, above-mentioned synchronization module, when for judging whether the local data sets of said network element belong to pre-set priority
Clock rate range;In the case where judging result is no, following processing procedure is triggered:According to said network element system clock with
Track state determines the first port state of designated port in said network element;Said network element is carried out according to above-mentioned first port state
Time synchronization;And in the case where the judgment result is yes, compare the best port number that the designated port of said network element is judged
According to the priority of collection and the local data sets of said network element;The second port shape of above-mentioned designated port is determined according to comparison result
State;The time synchronization of said network element is carried out according to above-mentioned second port state.
As an optional embodiment of the present embodiment, the Erbest of said network element is the number obtained in the following manner
According to collection:It obtains above-mentioned designated port and receives the hop count that specified message is undergone;Minimal routing in above-mentioned hop count is jumped
The port received data of the corresponding source node of number is stored into above-mentioned Erbest.
Optionally, above-mentioned synchronization module 32 is additionally operable to indicate the priority of above-mentioned local data sets in above-mentioned comparison result
In the case of higher than above-mentioned best port data set, the port status of above-mentioned designated port is determined as master port state;Upper
It states comparison result and indicates that the priority of above-mentioned local data sets less than in the case of above-mentioned best port data set, above-mentioned will be specified
The port status of port is determined as passive Passive port status.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong
Following manner realization is crossed, but not limited to this:Above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with arbitrary
The form of combination is located in different processors.
It should be noted that the preferred embodiment in the present embodiment may refer to the associated description in embodiment 1, herein
It repeats no more.
Embodiment 3
Method for synchronizing time provided in this embodiment includes following processing step:
Step 501:Clock node extracts SSM best master clock according to Synchronization Status Message, and the SSM best master clock is used
In the best master clock of Frequency Synchronization;
Step 501 further comprises:
As shown in Figure 4:Clock synchronous network is established according to the form of looped network between equipment, completes active link (SEC1--
SEC2------SEC6 it) is configured with the clock source of reserve link (SEC1--SEC6------SEC2).Legend only describes list
The configuration of ring, large-scale network is according to core layer, convergence-level and access layer layered configuration.Represented by SEC or EEC in Fig. 4
Meaning identifies the network equipment in the embodiment of the present application, meets the clock request of three-level clock.
Step 502:Time virtual LAN as shown in Figure 4 is configured to different void according to active link and reserve link
Quasi- local area network.First it is to realize that the two-way time configures mutual indepedent, second each virtual LAN includes complete in ring again
Portion's equipment ensures the normal transmission of message in ring.
As shown in figure 5, in clock synchronous network network, equipment enters listening state after powering on, initializing, and monitoring receives
PTP notification packets.According to data set comparison algorithm and port decision making algorithm shown in fig. 6, Node A decisions are Master shapes
State, into pre- master state.In Fig. 6, the judgement for Class, YES branches belong to the port decision making algorithm of original BMC standards
Content, NO part be modification content.If single come decision port with the content on right side, being likely encountered top network element can not determine
The problem of plan, because of the network element on the top not equipment in tracking network, even if clock is synchronized with external clock reference, so needing
Specially treated.
Step 601:Node A timings send notification packet, and Node B update port data collection after receiving notification packet;
Step 602:According to data set comparison algorithm 2, the Erbest (Erbest) of the ports PTP of Node B is calculated;
As shown in fig. 6, the port to having calculated Erbest, its port status of decision.Node B decisions are Slave shapes
State, into not demarcating state.
Step 701:For top network element, it is undesirable to which it tracks external time, and also needs to provide for network node
Time exports.It then needs the Class by its local data sets (D0) to be arranged to the numerical value in 1~127, local number can be properly increased
According to the grade of collection so that its local data sets is more than the data set of remaining node in network.It thus will be considered that local data sets
More than port optimum data collection Erbest, then it is master state that port, which is arranged,.Even if its value is less than outer net port optimum data collection
Erbest, then it is transparent transmission state that port, which is arranged, can't track external time;
Step 702:For ordinary node in network or even the lower node for hanging branch network, need the Class of its D0
The numerical value being arranged to except 1~127, in this way if port has tracked external clock, according to port decision making algorithm be arranged to from
Port;If port does not track best master clock, it is set as master port.Even if not configuring reference source clock, it is also provided with
For master port.
As shown in fig. 7, the state machine of standard PTP does not change, only it is because by the ports SSM decision PTP shape
State decision making algorithm (SDA) is accordingly modified as the condition of original BMC decisions the state machine of SSM decisions in verbal description
(FSM)。
Step 603:Enter Master states, Node B completing port decision making algorithms after Node A completing port decision making algorithms
Enter state of not demarcating afterwards, Node B actively send signaling message to Node A and establish the link.Node B are detecting clock source
The selected rear signaling message that Source Selected are sent to Node A, Node A notify that Node B can after receiving message
To carry out the PLL START signaling messages of phaselocked loop tracking, Node B are sent after detecting phase lock loop locks to Node A
PLL LOCKED signaling messages, Node A send TimeLock ModeOn after the message for receiving phase lock loop locks to Node B,
Node B establish the time synchronization link link of Node A and Node B after receiving message, into Slave states.
Step 604:The normal transmission PTP event synchronization message deadlines synchronize, according to the execution pattern of standard, Master
Sync event messages (carry the message estimated and send the required time) are sent to Slave, enable the equipment of two-step method also
It needs to send FollowUp messages (carrying present system time), Slave gives Master loopbacks after receiving Sync messages
DelayReq event messages, Master send the common messages of DelayResp to Slave again.Slave equipment collect complete T1,
The time deviation offset from equipment and main equipment is calculated according to formula after T2, T3, T4 timestamp, adjusts local zone time, is completed
Time synchronization.During time synchronization message interaction, notification packet also can be periodically sent, according to receiving data information
Variation adjustment time synchronizing network execute change according to the content of step 601~603, later if data set changes
It constantly repeats step 604 and changes the time tracking completed from the end time to main side equipment immediately.
Using said program provided in this embodiment, compared with the relevant technologies, the networking efficiency of time network is improved, is kept away
Network cyclization is exempted from, has saved the time of time network foundation, improve precision of time synchronization etc..
Existing 4G technologies are 1.5us to the transmission requirement of time synchronization, and with next generation mobile networks technology and
The development of Pre5G needs highdensity networking, the demand of 3GPP to show especially out again.With indoor positioning, augmented reality (AR)
The contour development applied in real time, to time synchronization, higher requirements are also raised, the time synchronization of subnanosecond at there is an urgent need to
It solves the problems, such as.Therefore it needs to select source algorithm to adjust original PTP network time synchronizations, realizes quick networking, reduce
The influence that network topological change generates time synchronization.By realizing clock time, synchronous elimination master-salve clock frequency is inclined in the same direction
Difference improves the precision of time synchronization.
Embodiment 4
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can
To be arranged to store the program code for executing following steps:The clock determined by clock synchronization algorithm based on network element is same
Step result carries out the time synchronization of the network element.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or
The various media that can store program code such as CD.
Optionally, the specific example in the present embodiment can refer to described in above-described embodiment and optional embodiment
Example, details are not described herein for the present embodiment.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
It is performed by computing device in the storage device, and in some cases, it can be with different from shown in sequence execution herein
The step of going out or describing, either they are fabricated to each integrated circuit modules or by them multiple modules or
Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of method for synchronizing time, which is characterized in that including:
The time synchronization of the network element is carried out by the clock synchronized result that clock synchronization algorithm determines based on network element.
2. according to the method described in claim 1, it is characterized in that, the clock synchronized result includes:It is specified in the network element
The port status of port, wherein the port status includes:Master port state and from port status.
3. according to the method described in claim 2, it is characterized in that, in the network element port status of designated port pass through it is following
Mode determines:The tracking mode of system clock according to the network element determines the port status of designated port in the network element,
In, the tracking mode includes:Receive external ethernet clock, refusal receives external ethernet clock.
4. according to the method in any one of claims 1 to 3, which is characterized in that pass through clock synchronization algorithm based on network element
Determining clock synchronized result carries out the time synchronization of the network element, including:
Judge whether the local data sets of the network element belong to pre-set priority clock grade range;
In the case where judging result is no, following processing procedure is triggered:The tracking mode of system clock according to the network element
Determine the first port state of designated port in the network element;The time for carrying out the network element according to the first port state is same
Step;
In the case where the judgment result is yes, the best port data set that the designated port of the network element is judged with it is described
The priority of the local data sets of network element;The second port state of the designated port is determined according to comparison result;According to described in
Second port state carries out the time synchronization of the network element.
5. according to the method described in claim 4, it is characterized in that, determining the second end of the designated port according to comparison result
Mouth state, including:
It, will in the case where the comparison result indicates that the priority of the local data sets is higher than the best port data set
The port status of the designated port is determined as master port state;The preferential of the local data sets is indicated in the comparison result
The port status of the designated port is determined as the passive ends Passive by grade less than in the case of the best port data set
Mouth state.
6. a kind of time synchronism apparatus, which is characterized in that including:
Synchronization module, the time for carrying out the network element by the clock synchronized result that clock synchronization algorithm determines based on network element
It is synchronous.
7. device according to claim 6, which is characterized in that the clock synchronized result includes:It is specified in the network element
The port status of port, wherein the port status includes:Master port state and from port status.
8. device according to claim 7, which is characterized in that the port status of designated port passes through following in the network element
Mode determines:The tracking mode of system clock according to the network element determines the port status of designated port in the network element,
In, the tracking mode includes:Receive external ethernet clock, refusal receives external ethernet clock.
9. the device according to any one of claim 6 to 8, which is characterized in that the synchronization module, it is described for judging
Whether the local data sets of network element belong to pre-set priority clock grade range;Judging result be it is no in the case of, triggering with
Lower processing procedure:The tracking mode of system clock according to the network element determines the first port shape of designated port in the network element
State;The time synchronization of the network element is carried out according to the first port state;And in the case where the judgment result is yes, compare
The priority of the best port data set that the designated port of the network element is judged and the local data sets of the network element;According to than
Relatively result determines the second port state of the designated port;The time for carrying out the network element according to the second port state is same
Step.
10. the device according to any one of claim 6 to 9, which is characterized in that the synchronization module is additionally operable in institute
It states comparison result and indicates that the priority of the local data sets higher than in the case of the best port data set, described will be specified
The port status of port is determined as master port state;Indicate that the priority of the local data sets is less than institute in the comparison result
In the case of stating best port data set, the port status of the designated port is determined as passive Passive port status.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710097245.4A CN108462548B (en) | 2017-02-22 | 2017-02-22 | Time synchronization method and device |
PCT/CN2018/073569 WO2018153192A1 (en) | 2017-02-22 | 2018-01-22 | Time synchronization method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710097245.4A CN108462548B (en) | 2017-02-22 | 2017-02-22 | Time synchronization method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108462548A true CN108462548A (en) | 2018-08-28 |
CN108462548B CN108462548B (en) | 2021-09-03 |
Family
ID=63220197
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710097245.4A Active CN108462548B (en) | 2017-02-22 | 2017-02-22 | Time synchronization method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108462548B (en) |
WO (1) | WO2018153192A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109586833B (en) * | 2018-12-18 | 2020-11-06 | 中国移动通信有限公司研究院 | Method and network node for determining port state |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101399757A (en) * | 2007-09-25 | 2009-04-01 | 华为技术有限公司 | Method and device for tracing time clock source |
US20100291955A1 (en) * | 2007-11-28 | 2010-11-18 | Saettele Peter | Method and apparatus for autonomous port role assignments in master-slave networks |
CN101938318A (en) * | 2010-09-15 | 2011-01-05 | 中兴通讯股份有限公司 | Synchronous method, system and convergent ring device among devices in convergent network |
CN103023595A (en) * | 2012-06-08 | 2013-04-03 | 中兴通讯股份有限公司 | Method and device for realizing best master clock algorithm |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101453316B (en) * | 2007-11-30 | 2011-04-13 | 华为技术有限公司 | Time information synchronization system, method and related apparatus |
CN102036361B (en) * | 2009-09-25 | 2013-08-28 | 华为技术有限公司 | Processing method, device and system for clock source selection |
CN102457346A (en) * | 2010-10-29 | 2012-05-16 | 中兴通讯股份有限公司 | Time synchronization realizing method and clock node |
-
2017
- 2017-02-22 CN CN201710097245.4A patent/CN108462548B/en active Active
-
2018
- 2018-01-22 WO PCT/CN2018/073569 patent/WO2018153192A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101399757A (en) * | 2007-09-25 | 2009-04-01 | 华为技术有限公司 | Method and device for tracing time clock source |
US20100291955A1 (en) * | 2007-11-28 | 2010-11-18 | Saettele Peter | Method and apparatus for autonomous port role assignments in master-slave networks |
CN101938318A (en) * | 2010-09-15 | 2011-01-05 | 中兴通讯股份有限公司 | Synchronous method, system and convergent ring device among devices in convergent network |
CN103023595A (en) * | 2012-06-08 | 2013-04-03 | 中兴通讯股份有限公司 | Method and device for realizing best master clock algorithm |
Also Published As
Publication number | Publication date |
---|---|
WO2018153192A1 (en) | 2018-08-30 |
CN108462548B (en) | 2021-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10790921B2 (en) | Configuration of synchronisation network | |
CN103916950B (en) | Method for synchronizing time and system | |
JP5480977B2 (en) | Synchronization network configuration with synchronization trail for time synchronization and frequency synchronization | |
CN107078958B (en) | The system, apparatus and method communicated for low jitter in the packet switching network | |
EP3270531B1 (en) | System and method of synchronizing a distributed clock in a packet-compatible network | |
CN103107876B (en) | A kind of method and system and device of multi-clock simultaneous techniques mixed networking | |
CN108173614A (en) | A kind of time synchronization and dispatching method of vehicle-mounted Ethernet | |
CN102237941B (en) | Time synchronization system and method | |
CN101616163B (en) | Method and device for processing precise time transfer protocol message | |
CN101938318B (en) | Synchronous method, system and convergent ring device among devices in convergent network | |
CN102195766B (en) | Time synchronization method and clock device | |
Garner et al. | Synchronization of audio/video bridging networks using IEEE 802.1 AS | |
CN103001720A (en) | Time synchronization method and device | |
US9363206B2 (en) | Method and apparatus for selecting passive port of transparent clock node based on PTP | |
CN105978652B (en) | Equipment, system and method at synchronous pair of Redundant Ethernet | |
CN103026645A (en) | Method for transmitting an ESMC message through a SONET/SDH domain | |
CN101848193B (en) | Method, system and network node for network synchronization | |
CN106231669A (en) | The method of Time Synchronization for Wireless Sensor Networks | |
US20170142676A1 (en) | Method and Apparatus for Determining Synchronisation References | |
CN104092528A (en) | Clock synchronization method and device | |
CN102457346A (en) | Time synchronization realizing method and clock node | |
CN103634208B (en) | Method and device for preventing loop in PTP (precision time protocol) TC (transparent clock) looped network | |
CN107959537B (en) | State synchronization method and device | |
CN103051439A (en) | Method and device for selecting clock source | |
CN108462548A (en) | Method for synchronizing time and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |