Specific embodiment
Present disclosure is described in further detail below in conjunction with preferred embodiment and attached drawing.Obviously, hereafter institute
The embodiment of description is only used for explaining the present invention rather than limitation of the invention.Based on the embodiments of the present invention, this field is general
Logical technical staff all other embodiments obtained without making creative work belong to what the present invention protected
Scope.It should be noted that part related to the present invention rather than full content are illustrated only for ease of description, in attached drawing.
Fig. 1 is the flow diagram of the clock synchronizing method of the base station equipment of the present invention in one embodiment, such as Fig. 1 institutes
Show, the clock synchronizing method of the base station equipment in the embodiment of the present invention comprises the following steps:
Step S110 obtains the priority of each clock source, and the priority of each clock source is ranked up.
In the existing communications field, clock is synchronously to ensure the committed step that communication is smoothed out.Equipment (such as base station
Equipment) clock synchronously mainly for system provide Frequency Synchronization and Phase synchronization, be that equipment works normally essential one
A function.Time synchronism equipment (such as base station equipment) be it is a kind of can receive external time reference signal, and as requested when
Between the equipment of the outside output time synchronizing signal of precision and temporal information.It can make in network other clock alignments and synchronous, lead to
Time synchronization is exactly that technical measures is taken to implement high-precision " to table " to network internal clock for custom.External reference signal is exactly
Clock source signals, are a kind of signals generated by clock source, and wherein time source is to provide fiducial time letter for time synchronism equipment
Number device.In the present embodiment, the clock source can be multiple, for example, big dipper clock source, GPS clock source,
1588 clock sources, air interface synchronization clock source and NTP clock sources etc..
When there is multiple clock sources, it is necessary to which one of clock source is selected to carry out base station equipment as synchronous clock source
Clock is synchronous.Wherein, in the present embodiment, each clock source has the priority of itself, synchronizer (such as base station is set
It is standby) it can select to access different clock sources successively according to the priority orders of clock source, it is selected by more time sources of priority
It selects, realizes more time source time services, correctly select effective guarantee time source.
In the present embodiment, the priority of each clock source is obtained first, and then each clock source priority is ranked up.Its
In, each clock source has its corresponding priority, and the clooating sequence of i.e. each clock source of can be known is ranked up to priority.
Step S120, according to the corresponding clock source conduct of first priority of priority ranking sequential selection of each clock source
Synchronous clock source is synchronous into row clock to base station equipment.
Specifically, it is excellent according to priority ranking sequential selection first after the completion of the priority ranking to each clock source
The corresponding clock source of first grade is synchronous into row clock to base station equipment as synchronous clock source.Optionally, priority ranking order is logical
It is often to be arranged according to the order of priority from high to low, i.e., under normal conditions, the clock source of highest priority is first selected to make
It is synchronous into row clock to base station equipment for synchronous clock source.
Step S130 in base station equipment clock synchronization failure, selects the corresponding clock source of next priority as same
It is synchronous into row clock to base station equipment to walk clock source, until the synchronously success of base station equipment clock.
When selecting the corresponding clock source of first priority synchronous into row clock to base station equipment as synchronous clock source, so
Judge whether base station equipment clock synchronously succeeds afterwards, in the synchronously success of base station equipment clock, first priority pair will be selected
The clock source answered is synchronous into row clock to base station equipment as synchronous clock source;In base station equipment clock synchronization failure, selection
The corresponding clock source of next priority is synchronous into row clock to base station equipment as synchronous clock source, and so on, until base
The synchronously success of station equipment clock.
Above-mentioned base station equipment clock synchronizing method, into during row clock synchronization, is obtaining each clock source first to base station equipment
Priority, the priority of each clock source is ranked up, then according to clooating sequence select first priority it is corresponding when
Zhong Yuan is synchronous into row clock to base station equipment as synchronous clock source, in base station equipment clock synchronization failure, selects next
Priority to by the use of clock source it is synchronous into row clock to base station equipment as synchronous clock source, until base station equipment clock it is synchronous into
Work(.Above-mentioned base station equipment clock synchronizing method, using multiple clock sources, and it is each according to the priority ranking order of clock source
Select a clock source synchronous into row clock to base station equipment as synchronous clock source, when base station equipment clock synchronization failure,
It is synchronous into row clock to base station equipment as synchronous clock source to switch next clock source, clock synchronization mode is flexible and changeable, energy
The accuracy of base station equipment clock is effectively ensured.
In one of the embodiments, as shown in Fig. 2, in the step of priority to each clock source is ranked up, also
Including:
The priority of each clock source is numbered in step S111;
Step S112 is ranked up the priority of each clock source according to the order of number.
Specifically, the priority of each clock source in each clock source is encoded, then according to number from small to large
Order the priority of each clock source is ranked up.
A detailed embodiment is provided for the ease of understanding, wherein having GPS clock source, 1588 clock sources and air interface synchronization
The priority of clock source, wherein GPS clock source is higher than the priority of 1588 clock sources, and the priority of 1588 clock sources, which is higher than, eats dishes without rice or wine
The priority of synchronous clock source;The priority that the priority of GPS clock source can be arranged to 1,1588 clock sources is arranged to 2,
The priority of air interface synchronization clock source is arranged to 3, and the wherein smaller priority of numerical value is higher, therefore, the priority row of each clock source
Sequence order be:1st, 2 and 3.
Alternatively, it is also possible to use the bigger priority of numerical value higher, then the priority of GPS clock source will be arranged to 3,1588
The priority of clock source is arranged to 2, and the priority of air interface synchronization clock source is arranged to 3, therefore, the priority ranking of each clock source
Sequentially it is:3rd, 2 and 1.
It is very convenient easy using above-mentioned numbering, convenient for quickly according to number sorting sequentially screen out with accordingly
The corresponding clock source of priority.
In one of the embodiments, further include:
When the corresponding clock source of each priority is synchronous into row clock to base station equipment as synchronous clock source, base station is set
Standby all synchronization failure and base station equipment need into row clock re-synchronize when, it is again every according to the priority arrangement order of each clock source
It is secondary to select the corresponding clock source of a priority synchronous into row clock to base station equipment as synchronous clock source, until base station equipment
Clock synchronously success.
Specifically, according to the arrangement mode of priority using each clock source in each clock source as synchronous clock source pair
Base station equipment is synchronous into row clock, and base station equipment all synchronization failures, i.e. base station equipment can not utilize arbitrary in each clock source
One clock source is used as synchronised clock and carries out clock synchronization operation to it.Clock synchronization operation need not be carried out in base station equipment
When, terminate clock synchronization operation.When base station equipment is re-synchronized and (needs to re-start clock synchronization), then again
Select the corresponding clock source of a priority as synchronous clock source to base every time according to the priority arrangement order of each clock source
Station equipment is synchronous into row clock, until the synchronously success of base station equipment clock;It is i.e. again suitable according to the priority ranking of each clock source
Sequence selects the corresponding clock source of first priority synchronous into row clock to base station equipment as synchronous clock source, in base station equipment
During clock synchronization failure, select the corresponding clock source of next priority same into row clock to base station equipment as synchronous clock source
Step, until the synchronously success of base station equipment clock.Using the above-mentioned mode that re-synchronizes, i.e. Xun Huan performs the priority according to clock source
Clooating sequence selects clock source synchronous into row clock to base station equipment as synchronous clock source, can utmostly ensure base station equipment
The successful and accuracy of clock synchronization.
In one of the embodiments, further include:
When detecting that the corresponding clock source of current priority is same into row clock to the base station equipment as synchronous clock source
Step, the base station equipment first synchronous success then synchronization failure again, and the base station equipment need into row clock re-synchronize when, press
According to each clock source the corresponding clock source of the next priority of priority arrangement sequential selection as synchronous clock source to institute
It is synchronous into row clock to state base station equipment, until the base station equipment clock synchronously success.
Specifically, it is synchronous into row clock to base station equipment as synchronous clock source in the corresponding clock source of current priority
When, base station equipment starts synchronous success, need not in base station equipment when then there is synchronization failure again in Clock Synchronization Procedure
When carrying out clock synchronization operation, terminate clock synchronization operation.It is re-synchronized in base station equipment (when needing to re-start
Clock is synchronous) when, according to the corresponding clock of the next priority of the priority arrangement sequential selection of current priority and clock source
Source is synchronous into row clock to base station equipment as synchronous clock source.
In order to make it easy to understand, a detailed embodiment is provided, when having GPS clock source, 1588 clock sources and air interface synchronization
The priority of Zhong Yuan, wherein GPS clock source are higher than the priority of 1588 clock sources, and the priority of 1588 clock sources is same higher than eating dishes without rice or wine
Walk the priority of clock source;The priority that the priority of GPS clock source can be arranged to 1,1588 clock sources is arranged to 2, sky
The priority of mouth synchronous clock source is arranged to 3, and the wherein smaller priority of numerical value is higher, therefore, the priority ranking of each clock source
Sequentially it is:1st, 2 and 3.Use first priority for 1 clock source (i.e. GPS clock source) to base station equipment into during row clock synchronization,
Start synchronous success, after synchronous a period of time, synchronization failure;Clock source (i.e. 1588 clocks that priority is 2 then may be employed
Source) it is synchronous into row clock to base station equipment.Mode is re-synchronized using above-mentioned, can utmostly ensure the synchronization of base station equipment clock
Successful and accuracy.
In one of the embodiments, as shown in figure 3, further including:
Step S140, in the synchronously success of base station equipment clock, when being carried out using current sync clock source to base station equipment
Clock synchronization simultaneously keeps present clock synchronous regime.
Specifically, when same into row clock to base station equipment as synchronous clock source using the corresponding clock source of current priority
During step, when base station equipment clock is synchronously successful, then clock synchronization operation is carried out to base station equipment using current sync clock source, and
Keep clock synchronous regime.Using it is above-mentioned it is synchronous by the way of so that base station equipment is always only with clock source as synchronous
Clock source go forward side by side row clock synchronization, avoid influence of other clock sources to base station equipment.
In one of the embodiments, further include:Base station clock synchronization failure is determined by following steps:
When synchronous clock source is invalid, base station clock synchronization failure is determined;It can wherein be judged by following steps same
It is invalid to walk clock source:
Detect the clock signal of synchronous clock source;
When clock signal is unchanged always within the default period, judge that synchronous clock source is invalid.
Specifically, in order to ensure synchronization of the base station equipment into row clock, i.e., in a clock source as synchronous clock source pair
Base station equipment into during row clock synchronization failure, it is necessary to which to switch a clock source same into row clock to base station equipment as synchronised clock
Step, it is thus necessary to determine that base station clock synchronization failure situation.In the present embodiment, when synchronous clock source is invalid, base station is determined
Clock synchronization failure.Wherein it is possible to by detecting situation of change of the clock signal of synchronous clock source within the default period
It determines whether synchronous clock source is invalid, usually when clock signal is unchanged always within the default period, judges synchronous
Clock source is invalid.It usually can be a few minutes, tens seconds etc. in addition, can be any time period in the default period.
Base station clock synchronization failure situation can quickly be determined using the clock signal judgment mode of synchronous clock source, so as to switch synchronization
Clock source.
In one of the embodiments, the synchronously success of base station equipment clock is judged by following steps:
The clock signal state of synchronous clock source and the clock signal state of base station setting are detected, in synchronization, when
When the clock signal state of synchronous clock source is identical with the clock signal state that base station is set, judge that synchronised clock is same into row clock
It walks successfully.
Specifically, in order to ensure synchronization of the base station equipment into row clock, i.e., in a clock source as synchronous clock source pair
It is when base station equipment succeeds into row clock is synchronous, current sync clock is synchronous into row clock to base station equipment, it is thus necessary to determine that
Base station clock synchronization successful instance.In the present embodiment, the clock clock signal state of synchronous clock source and base station set
Signal condition is compared, and when the two signal conditions are identical in synchronization, determines base station clock synchronously success.Using same
The clock signal judgment mode of step clock source can quickly determine base station clock synchronization successful instance, so as to keep synchronised clock
Source.
For the ease of understanding present invention method, a detailed embodiment is given.Present invention could apply to
In the base station products such as macro base station, micro-base station and smallCell, mainly realized by the OAM professional softwares of base station.As shown in figure 4,
Relevant steps flow chart detailed annotation is as follows:
Step S1:Clock synchronization apparatus is initialized, including obtaining each clock carried out required for maintenance personnel from database
Source, and the priority orders of clock source are ranked up and are stored in a clock synchronization apparatus;
Step S2:Judge whether to synchronously complete (i.e. whether without optional clock source), if there is then entering step
S3 is synchronous into row clock, if not provided, being all clock sources all synchronization failures, meets the condition that clock re-synchronizes, then jumps
Judge whether to need to re-synchronize into row clock to step S8;
Step S3:It is synchronous into row clock, according to the order that step S1 is sequenced, priority is selected most from clock synchronization apparatus
High clock source synchronizes;
Step S4:Whether the clock in judgment step S3 is synchronous synchronous successful, if clock is synchronously successful, jumps to step
Rapid S5 keeps synchronous regime, if clock synchronization failure, jumps to step S6 switching clock sources;
Step S5:Synchronous regime is kept, preserve clock synchronous regime and notifies equipment normal operation at this time, then jumps to step
Rapid S7;
Step S6:Switching clock source, the clock synchronization mode (clock of i.e. existing highest priority that step S3 is carried out
Source) it is deleted from clock synchronization apparatus, and rebound step S2;
Step S7:Judge whether clock synchronous regime becomes failure, if so, be at this time clock source first synchronous success, it
(the problems such as due to environment) synchronization failure afterwards meets the condition that clock re-synchronizes, then jumps to step S8, if it is not, then jumping to
Step S5 continues to keep synchronous regime;
Step S8:Judge whether to need to re-synchronize into row clock, it is same by the weight filled out from database acquisition maintenance personnel
Step switch judges, is re-synchronized if necessary, then enters step S9 clocks and re-synchronize, if you do not need to same into row clock weight
Step, then enter step S10 and terminate clock synchronization flow;
Step S9:Clock re-synchronizes, and removes original clock synchronization mode when preserving in clock synchronization apparatus, and by from
Database, which obtains maintenance personnel, to be filled out clock and re-synchronizes the waited time and waited, and the time enters step S1 after and initializes
Clock is synchronous;
Step S10:The same the end of the step of clock.
Fig. 5 is the structure diagram of the clock synchronization apparatus of the base station equipment of the present invention in one embodiment.Such as Fig. 5 institutes
Show, the clock synchronization apparatus of the base station equipment in the embodiment, including:
Priority acquisition module 10, for obtaining the priority of each clock source;
Prioritization module 20 is ranked up for the priority to each clock source;
Clock synchronization module 30, it is corresponding for first priority of priority ranking sequential selection according to each clock source
Clock source is synchronous into row clock to base station equipment as synchronous clock source;
Clock synchronization module 30 is additionally operable to, in base station equipment clock synchronization failure, select next priority corresponding
Clock source is synchronous into row clock to base station equipment as synchronous clock source, until the synchronously success of base station equipment clock.
In one of the embodiments, prioritization module 20 further includes:
Priority number module is numbered for the priority to each clock source;
Prioritization module 20, for being ranked up according to the order of number to the priority of each clock source.
In one of the embodiments, further include:
Clock synchronization module 30 is additionally operable to set base station as synchronous clock source when the corresponding clock source of each priority
It is standby synchronous into row clock, base station equipment all synchronization failures and base station equipment need into row clock re-synchronize when, again according to it is each when
Zhong Yuan priority arrangement order every time select the corresponding clock source of a priority as synchronous clock source to base station equipment into
Row clock is synchronous, until the synchronously success of base station equipment clock.
In one of the embodiments, further include:
Clock synchronization module 30 is additionally operable to detect the corresponding clock source of current priority as synchronous clock source to base
Station equipment is synchronous into row clock, the first synchronous successful then synchronization failure, and base station equipment is needed into row clock weight again of base station equipment
When synchronous, according to the corresponding clock source of the next priority of priority arrangement sequential selection of each clock source as synchronous clock source
It is synchronous into row clock to base station equipment, until the synchronously success of base station equipment clock.
In one of the embodiments, further include:
Clock synchronously keep module, for base station equipment clock synchronously success when, using current sync clock source to base
Station equipment is into row clock synchronization and keeps present clock synchronous regime.
In one of the embodiments, further include:
Synchronization failure judgment module, for determining base station clock synchronization failure by following steps:
The synchronization failure judgment module, for when the synchronous clock source is invalid, determining that the base station clock is synchronous
Failure;Wherein described synchronization failure judgment module includes the invalid module of clock source;
The invalid module of clock source, for that can judge that the synchronous clock source is invalid by following steps:
The invalid module of clock source further includes:Clock signal detection module;
Clock signal detection module, for detecting the clock signal of the synchronous clock source;
The invalid module of clock source is additionally operable to when the clock signal is unchanged always within the default period,
Judge that the synchronous clock source is invalid.
In one of the embodiments, further include:
Clock synchronization success judgment module judges the synchronously success of base station equipment clock for passing through following steps:
Clock synchronously success judgment module, be additionally operable to detection synchronous clock source clock signal state and base station set when
Clock signal condition, in synchronization, the clock signal state of Zhong Yuan and base station are set when in sync clock signal state phase
Meanwhile judge synchronised clock into row clock synchronously success.
The clock that the clock synchronization apparatus of above-mentioned base station equipment can perform the base station equipment that the embodiment of the present invention is provided is same
One step process possesses the corresponding function module of execution method and advantageous effect.As for the processing performed by wherein each function module
Method, such as priority acquisition module 10, prioritization module 20, clock synchronization module 30 can refer to above method implementation
Description in example, is no longer repeated herein.
According to the clock synchronizing method and device of the base station equipment of the invention described above, the present invention also provides a kind of computers to set
Standby, below in conjunction with the accompanying drawings and the computer equipment of the present invention is described in detail in preferred embodiment.
Fig. 6 is the structure diagram of the computer equipment of the present invention in one embodiment.As shown in fig. 6, the embodiment
In computer equipment 600, can be run on a memory and on a processor including memory 601, processor 602 and storage
Computer program, wherein processor can realize all method and steps in the method for the present invention embodiment when performing program.
Processor 602 can perform the clock for the base station equipment that the embodiment of the present invention is provided in above computer equipment 600
Synchronous method possesses the corresponding advantageous effect of execution method.The description in above method embodiment is can refer to, is no longer carried out herein
It repeats.
According to the clock synchronizing method, device and computer equipment of the base station equipment of the invention described above, the present invention also provides
A kind of computer readable storage medium, below in conjunction with the accompanying drawings and preferred embodiment to the present invention computer readable storage medium into
Row is described in detail.
Computer readable storage medium in the embodiment of the present invention, is stored thereon with computer program, which is processed
Device can realize all method and steps in the method for the present invention embodiment when performing.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, program can be stored in a computer read/write memory medium,
The program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Storage medium therein can be magnetic disc, CD,
Read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory,
RAM) etc. ".
The clock that above computer readable storage medium storing program for executing is used to store the base station equipment that the embodiment of the present invention is provided is synchronous
The program (instruction) of method, wherein the clock synchronization for the base station equipment that the embodiment of the present invention is provided can be performed by performing the program
Method possesses the corresponding advantageous effect of execution method.The description in above method embodiment is can refer to, is no longer repeated herein.
Each technical characteristic of above example can be combined arbitrarily, to make description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the scope of this specification record.
Above example only expresses the several embodiments of the present invention, and description is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art,
On the premise of not departing from present inventive concept, various modifications and improvements can be made, these belong to protection scope of the present invention.
Therefore, the protection domain of patent of the present invention should be determined by the appended claims.