WO2012016496A1 - Clock control method, device and base station for input having multiple reference sources - Google Patents

Clock control method, device and base station for input having multiple reference sources Download PDF

Info

Publication number
WO2012016496A1
WO2012016496A1 PCT/CN2011/077687 CN2011077687W WO2012016496A1 WO 2012016496 A1 WO2012016496 A1 WO 2012016496A1 CN 2011077687 W CN2011077687 W CN 2011077687W WO 2012016496 A1 WO2012016496 A1 WO 2012016496A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference source
clock
local clock
module
control parameter
Prior art date
Application number
PCT/CN2011/077687
Other languages
French (fr)
Chinese (zh)
Inventor
崔文会
邱文才
何祎
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012016496A1 publication Critical patent/WO2012016496A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements

Abstract

A clock control method, device and base station for input having multiple reference sources are provided by the invention, which relates to the mobile communication field. In the method, device, and base station, a first reference source for local clock synchronization is selected from a plurality of reference sources; and the current clock control parameter of said local clock is obtained; according to the current clock control parameter, a first clock control parameter is calculated using the first reference source; said first clock control parameter is used for local clock synchronization adjustment; the local clock is adjusted step-by-step according to the first clock control parameter, so as to synchronize the local clock with the first reference source. The method, device and base station of the invention ensure that when handover occurs among a plurality of reference sources, the local clock can transition smoothly from the original reference source clock synchronization to the new reference source synchronization.

Description

一种多参考源输入的时钟控制方法、 装置及基站 技术领域  Clock control method, device and base station for multiple reference source input
本发明属于移动通信领域, 尤其涉及一种多参考源输入的时钟控制方 法、 装置及基站。 背景技术  The invention belongs to the field of mobile communications, and in particular relates to a clock control method, device and base station for multiple reference source inputs. Background technique
基站如果能够正常工作, 必须与传输设备的时钟或者上级基站的时钟 同步。 对于基站来说, 要完成与传输设备的时钟同步, 必须接收传输设备 输入到基站的参考源, 并利用输入的参考源与本地的时钟进行同步, 才能 完成后续基站的各项工作和任务。  If the base station is working properly, it must synchronize with the clock of the transmission device or the clock of the upper base station. For the base station to complete the clock synchronization with the transmission device, the reference source of the transmission device input to the base station must be received, and the input reference source is used to synchronize with the local clock to complete the tasks and tasks of the subsequent base station.
但由于不同的国家, 不同的地区, 不同的环境以及不同的运营商使用 不同的传输设备, 使传输设备可以提供给基站的参考源有多种形式, 例如 However, because different countries, different regions, different environments, and different operators use different transmission devices, the reference source that the transmission device can provide to the base station has various forms, for example,
GPS (全球定位系统)时钟参考源, 线路时钟参考源(其中线路时钟, 又可 以分为外部 2Mbps、外部 2MHz以及传输线路恢复时钟等;), syncE参考源 , 支持 IEEE1588协议的参考源以及微波信号参考源等。根据基站各个运营商 的实际的传输设备, 运营商可能会提供一种或者多种参考源供基站使用 , 例如, 仅仅提供 GPS时钟参考源, 或者提供线路时钟和 IEEE1588两种参 考源。 GPS (Global Positioning System) clock reference source, line clock reference source (including line clock, can be divided into external 2Mbps, external 2MHz and transmission line recovery clock, etc.), syncE reference source, support IEEE1588 protocol reference source and microwave signal Reference source, etc. Depending on the actual transmission equipment of each operator of the base station, the operator may provide one or more reference sources for the base station to use, for example, only provide a GPS clock reference source, or provide both a line clock and IEEE1588 reference sources.
由于本地时钟是不断的与选择的参考源进行同步运算处理, 即参考源 变化时, 本地时钟必然会随着参考源变化。 为了确保基站的正常工作, 当 参考源发生切换时, 需要确保使本地时钟从原有的参考源时钟同步, 平滑 过渡到与新的参考源同步。  Since the local clock is continuously synchronized with the selected reference source, that is, when the reference source changes, the local clock necessarily changes with the reference source. In order to ensure the normal operation of the base station, when the reference source is switched, it is necessary to ensure that the local clock is synchronized from the original reference source clock and smoothly transition to synchronize with the new reference source.
然而, 在现有技术中并未提供当多个参考源之间发生切换时, 如何对 本地时钟进行控制的相关技术方案。 发明内容 However, there is no related art solution in the prior art for how to control the local clock when switching occurs between multiple reference sources. Summary of the invention
为了解决上述问题, 本发明的目的是提供一种多参考源输入的时钟控 制方法、 装置及基站, 保证当多个参考源之间发生切换时, 本地时钟从原 有的参考源时钟同步, 平滑过度到与新的参考源同步。  In order to solve the above problems, an object of the present invention is to provide a multi-reference source input clock control method, apparatus and base station, which ensure that when a switchover occurs between multiple reference sources, the local clock is synchronized from the original reference source clock, smoothing Excessively synchronized with the new reference source.
为了达到上述目的, 本发明的技术方案是这样实现的:  In order to achieve the above object, the technical solution of the present invention is achieved as follows:
一种多参考源输入的时钟控制方法, 包括: 从多个参考源中选出用于 本地时钟同步的第一参考源, 以及获取所述本地时钟当前的时钟控制参数; 根据所述当前的时钟控制参数, 并利用所述第一参考源计算出第一时 钟控制参数, 据此对所述本地时钟进行步进调整, 使所述本地时钟与所述 第一参考源同步。  A clock control method for multiple reference source inputs, comprising: selecting a first reference source for local clock synchronization from a plurality of reference sources, and acquiring current clock control parameters of the local clock; according to the current clock Controlling parameters, and calculating a first clock control parameter by using the first reference source, and performing step adjustment on the local clock to synchronize the local clock with the first reference source.
所述第一参考源为: 当满足预先设置的多个参考源中各个参考源之间 的切换策略时, 根据所述切换策略从所述多个参考源中选出的参考源。  The first reference source is: a reference source selected from the plurality of reference sources according to the switching policy when a switching policy between each of the plurality of reference sources set in advance is satisfied.
所述各个参考源之间的切换策略包括: 参考源切换按照配置优先级切 换策略、 参考源按照配置顺序切换策略、 参考源按照当前可用不切换策略 和参考源独断保持切换策略中的任意一种或多种。  The switching policy between the reference sources includes: a reference source switching according to a configuration priority switching policy, a reference source switching policy according to a configuration order, a reference source according to a currently available non-switching policy, and a reference source arbitrarily maintaining a switching policy. Or a variety.
当所述第一参考源发生异常时, 所述方法还包括: 根据所述各个参考 源之间的切换策略, 激活所述多个参考源中的第二参考源, 并去激活所述 第一参考源; 根据所述第一时钟控制参数, 利用所述第二参考源计算出用 于对本地时钟进行同步调整的第二时钟控制参数, 据此对所述本地时钟进 行步进调整, 使所述本地时钟与所述第二参考源同步。  When the first reference source is abnormal, the method further includes: activating a second reference source of the multiple reference sources according to a switching policy between the reference sources, and deactivating the first Determining, according to the first clock control parameter, a second clock control parameter for performing synchronous adjustment on the local clock by using the second reference source, and performing step adjustment on the local clock according to the step The local clock is synchronized with the second reference source.
所述方法还包括: 预先设置所述多个参考源中每个参考源的参考源内 部处理策略。  The method further includes: pre-setting a reference source internal processing policy for each of the plurality of reference sources.
所述参考源内部处理策略包括: 参考源内部异常抖动策略、 参考源内 部异常判定检测策略、 参考源内部状态的跃迁策略和参考源内部的控制步 进策略中的任意一种或多种。 所述方法还包括: 判断所述多个参考源中是否有可用参考源, 若没有, 则本地时钟自由运行; 若有, 则选出所述第一参考源, 以及获取所述时钟 控制参数。 The reference source internal processing strategy includes: one or more of a reference source internal abnormal jitter policy, a reference source internal abnormality determination detection strategy, a reference source internal state transition strategy, and a reference source internal control stepping strategy. The method further includes: determining whether a reference source is available among the plurality of reference sources, and if not, the local clock is free to run; if so, selecting the first reference source and acquiring the clock control parameter.
一种多参考源输入的时钟控制装置, 包括:  A multi-reference source input clock control device includes:
主控模块, 用于从多个参考源中选出用于本地时钟同步的第一参考源, 以及获取所述本地时钟当前的时钟控制参数;  a main control module, configured to select, from a plurality of reference sources, a first reference source for local clock synchronization, and obtain a current clock control parameter of the local clock;
时钟模块, 用于根据所述当前的时钟控制参数, 利用所述第一参考源 计算出第一时钟控制参数;  a clock module, configured to calculate, by using the first reference source, a first clock control parameter according to the current clock control parameter;
硬件模块, 用于产生所述本地时钟;  a hardware module, configured to generate the local clock;
执行模块, 用于根据所述第一时钟控制参数对所述本地时钟进行步进 调整, 使所述本地时钟与所述第一参考源同步。  And an execution module, configured to perform step adjustment on the local clock according to the first clock control parameter, to synchronize the local clock with the first reference source.
所述时钟模块包括:  The clock module includes:
参考源配置接口, 用于接收所述主控模块下发的每个参考源的配置信 息, 以及每个参考源的参考源内部处理策略;  a reference source configuration interface, configured to receive configuration information of each reference source delivered by the main control module, and a reference source internal processing policy of each reference source;
参考源状态检测单元, 用于利用所述参考源内部处理策略, 以及参考 源与本地时钟同步运算的结果, 判断当前参考源的状态是否正常;  a reference source state detecting unit, configured to use the reference source internal processing strategy, and the result of the reference source and the local clock synchronization operation to determine whether the current reference source state is normal;
时钟控制参数计算单元, 用于计算出用于对本地时钟同步调整的时钟 控制参数;  a clock control parameter calculation unit, configured to calculate a clock control parameter used for synchronous adjustment of the local clock;
状态跃迁处理单元, 用于在本地时钟与参考源同步过程中, 对本地时 钟的状态跃迁进行控制。  The state transition processing unit is configured to control the state transition of the local clock during the synchronization of the local clock with the reference source.
所述硬件模块包括:  The hardware module includes:
时钟电路, 用于产生所述本地时钟;  a clock circuit, configured to generate the local clock;
参考源选择单元, 用于从多个参考源中选择出有效的参考源; 逻辑处理运算单元, 用于根据各个参考源的输入信息、 本地时钟的输 入信息以及参考源的配置信息, 计算出各个参考源运算的相关信息, 供所 述时钟模块后续调用。 a reference source selection unit, configured to select a valid reference source from the plurality of reference sources; a logic processing operation unit, configured to calculate each according to input information of each reference source, input information of the local clock, and configuration information of the reference source Reference source operation related information The subsequent call of the clock module.
所述主控模块, 还用于当所述第一参考源发生异常时, 根据各个参考 源之间的切换策略, 激活所述多个参考源中的第二参考源, 并去激活所述 第一参考源;  The main control module is further configured to: when the first reference source is abnormal, activate a second reference source of the multiple reference sources according to a switching policy between the reference sources, and deactivate the first a reference source;
所述时钟模块, 还用于根据所述第一时钟控制参数, 利用所述第二参 考源计算出第二时钟控制参数; 所述第二时钟控制参数用于对本地时钟进 行同步调整;  The clock module is further configured to calculate a second clock control parameter by using the second reference source according to the first clock control parameter; the second clock control parameter is used for synchronously adjusting a local clock;
所述执行模块, 还用于根据所述第二时钟控制参数对所述本地时钟进 行步进调整, 使所述本地时钟与所述第二参考源同步。  The execution module is further configured to perform step adjustment on the local clock according to the second clock control parameter, so that the local clock is synchronized with the second reference source.
所述装置还包括: 采集模块, 用于采集参考源的状态信息, 并将采集 得到的状态信息反馈给所述主控模块。  The device further includes: an acquisition module, configured to collect state information of the reference source, and feed back the collected state information to the main control module.
所述装置还包括: 配置模块, 用于预先设置所述多个参考源中各个参 考源之间的切换策略, 以及用于预先设置所述多个参考源中每个参考源的 参考源内部处理策略, 并将所述参考源之间的切换策略和所述参考源内部 处理策略下发给所述主控模块。  The device further includes: a configuration module, configured to preset a switching policy between each of the plurality of reference sources, and a reference source internal processing for presetting each of the plurality of reference sources The policy, and the switching policy between the reference source and the reference source internal processing policy are sent to the main control module.
所述装置设置于基站中。  The device is disposed in a base station.
由上述技术方案可知, 在进行多参考源输入的时钟控制时, 获取本地 时钟当前的时钟控制参数, 然后根据当前的时钟控制参数, 利用所选的参 考源 (激活的参考源)计算出时钟控制参数, 然后根据计算得到的时钟控 制参数对本地时钟进行步进调整, 使本地时钟与所选的参考源同步, 由于 在时钟控制过程中, 激活的参考源总是把上个参考源对本地时钟的相关时 钟控制参数获取到, 并在该基础上进行同步调整, 从而使得在参考源之间 进行切换时, 能够保证从原有的参考源时钟同步, 平滑过度到与新的参考 源同步, 本地时钟的晶振的输出时钟稳定, 有效确保了本地时钟的输出质 量。 其次, 可通过预先设置多个参考源中各个参考源之间的切换策略, 并 将该切换策略应用到具体的参考源切换过程中, 从而实现了对多个参考源 进行有效的管理, 可以使参考源按照用户的策略要求进行切换; According to the foregoing technical solution, when clock control of the multi-reference source input is performed, the current clock control parameter of the local clock is obtained, and then the clock control is calculated by using the selected reference source (the activated reference source) according to the current clock control parameter. Parameters, and then step-adjust the local clock according to the calculated clock control parameters, so that the local clock is synchronized with the selected reference source, because during the clock control, the activated reference source always puts the previous reference source to the local clock. The relevant clock control parameters are acquired, and the synchronization adjustment is performed on the basis, so that when the reference source is switched, the original reference source clock can be synchronized, smoothed to synchronize with the new reference source, and localized. The output clock of the crystal oscillator of the clock is stable, which effectively ensures the output quality of the local clock. Secondly, the switching policy between each reference source in the multiple reference sources is preset, and the switching policy is applied to the specific reference source switching process, thereby implementing effective management of multiple reference sources, which can enable The reference source switches according to the user's policy requirements;
最后, 还可设置多个参考源中每个参考源的参考源内部处理策略, 通 过参考源内部处理策略, 来实现对参考源本身的有效管理。 附图说明  Finally, the reference source internal processing strategy of each of the multiple reference sources can be set, and the reference source internal processing strategy can be effectively managed by referring to the source internal processing strategy. DRAWINGS
图 1为本发明的实施例中多参考源输入的时钟控制方法的流程图; 图 2为本发明的实施例中状态跃迁示意图 (跃迁策略 1 );  1 is a flowchart of a clock control method for multiple reference source inputs in an embodiment of the present invention; FIG. 2 is a schematic diagram of a state transition in a embodiment of the present invention (transition strategy 1);
图 3为本发明的实施例中状态跃迁示意图 (跃迁策略 2 );  3 is a schematic diagram of a state transition in a embodiment of the present invention (transition strategy 2);
图 4为本发明的实施例中多参考源输入的时钟控制装置的结构示意图; 图 5为本发明的实施例中硬件模块的结构示意图。 具体实施方式  4 is a schematic structural diagram of a clock control apparatus for multi-reference source input according to an embodiment of the present invention; and FIG. 5 is a schematic structural diagram of a hardware module according to an embodiment of the present invention. detailed description
在本实施例中, 在进行多参考源输入的时钟控制时, 首先获取本地时 钟当前的时钟控制参数, 然后根据当前的时钟控制参数, 以及利用所选的 参考源计算出时钟控制参数, 然后根据计算得到的时钟控制参数对本地时 钟进行步进调整, 使本地时钟与所选的参考源同步, 当所选参考源发生异 常时, 可根据预先设定的参考源策略, 从多个参考源中选择有效的参考源, 从而完成参考源之间的切换处理。  In this embodiment, when performing clock control of the multi-reference source input, first acquiring the current clock control parameter of the local clock, and then calculating the clock control parameter according to the current clock control parameter and using the selected reference source, and then according to The calculated clock control parameter adjusts the local clock step by step to synchronize the local clock with the selected reference source. When an abnormality occurs in the selected reference source, it can be from multiple reference sources according to a preset reference source policy. Select a valid reference source to complete the switching process between reference sources.
在本实施例中, 为了更好的对多个参考源进行有效管理, 可预先设置 参考源策略。 当然, 该参考源策略也可在实际运用过程中进行设置或调整。 该参考源策略可分为公共策略和专用策略, 其中公共策略主要是针对多个 参考源中各个参考源之间的切换策略, 而专用策略主要是针对每个参考源 的参考源内部处理策略。  In this embodiment, in order to effectively manage multiple reference sources, the reference source policy may be preset. Of course, the reference source strategy can also be set or adjusted during actual use. The reference source policy can be divided into a common policy and a dedicated policy. The public policy is mainly for a switching policy between each reference source in multiple reference sources, and the dedicated policy is mainly a reference source internal processing policy for each reference source.
上述各个参考源之间的切换策略包括: 参考源切换按照配置优先级切 换策略、 参考源按照配置顺序切换策略、 参考源按照当前可用不切换策略、 参考源独断保持切换策略以及其他自定义的参考源切换策略, 其中 The switching policies between the above reference sources include: Reference source switching is cut according to the configuration priority The switching policy, the reference source switch policy according to the configuration order, the reference source according to the currently available non-switching policy, the reference source arbitrarily maintaining the switching policy, and other customized reference source switching policies, where
1 )参考源按照配置优先级切换策略, 是指按照用户配置的优先级进行 切换的策略, 即参考源正常, 优先级高的参考源则优先选择为当前有效参 考源。  1) The reference source according to the configuration priority switching policy refers to the policy of switching according to the priority configured by the user, that is, the reference source is normal, and the reference source with high priority is preferentially selected as the current valid reference source.
2 )参考源按照配置顺序切换策略, 是指按照用户配置的顺序作为优先 级来进行切换的策略, 即参考源正常, 而最先配置的参考源则优先选择为 当前有效参考源。  2) The reference source switches the policy according to the configuration order. It refers to the policy of switching according to the user configuration order, that is, the reference source is normal, and the first configured reference source is preferentially selected as the current valid reference source.
3 )参考源当前可用不切换策略, 是指假如同时并存两种参考源, 参考 源 A和参考源 B, 参考源 A优先级高, 参考源 B优先级低, 而且两种参考 源均正常, 那么基站首先会选择参考源 A作为当前激活参考源, 当参考源 A异常时, 切换到参考源 B, 则参考源 B成为当前激活参考源, 参考源 A 成为未激活参考源, 而当参考源 A恢复正常时, 还保持参考源 B作为当前 的选择的参考源, 而不切换到参考源 A。  3) The reference source currently available without switching policy means that if two reference sources are coexisted at the same time, reference source A and reference source B, reference source A has a higher priority, reference source B has a lower priority, and both reference sources are normal. Then, the base station first selects the reference source A as the current active reference source, and when the reference source A is abnormal, switches to the reference source B, the reference source B becomes the current active reference source, and the reference source A becomes the inactive reference source, and when the reference source When A returns to normal, reference source B is also kept as the reference source of the current selection without switching to reference source A.
4 )参考源独断保持切换策略, 是指参考源异常后, 参考源不会选择切 换到其它可用参考源, 仍然保持当前的参考源。  4) The reference source arbitrarily maintains the switching strategy. After the reference source is abnormal, the reference source does not choose to switch to other available reference sources, and still maintains the current reference source.
当然, 在本实施例中并不限定各个参考源之间的切换策略的具体内容, 上述切换策略可根据实际情况进行设置。  Certainly, the specific content of the switching policy between the reference sources is not limited in this embodiment, and the foregoing switching policy may be set according to actual conditions.
上述参考源内部处理策略包括: 参考源内部异常抖动策略、 参考源内 部异常判定检测策略、 参考源内部状态的跃迁策略、 参考源内部的控制步 进策略等。 对于每一种参考源内部处理策略, 针对不同的参考源均有默认 的初始状态。 对于参考源的每种参考源内部处理策略, 如果用户不进行重 新配置, 参考源将保持默认初始策略执行。  The above reference source internal processing strategies include: reference source internal anomaly dithering strategy, reference source internal anomaly determination detection strategy, reference source internal state transition strategy, reference source internal control stepping strategy, and the like. For each reference source internal processing strategy, there is a default initial state for different reference sources. For each reference source internal processing policy for the reference source, the reference source will remain the default initial policy execution if the user does not reconfigure.
1 )参考源内部异常抖动策略, 主要是防止异常抖动的反复, 即设置异 常抖动的处理,例如异常抖动持续时间 TO秒后,该参考源才上报发生异常, 当参考源恢复后,要持续时间 T1秒,该参考源才上报正常。通过上述设置, 可以防止参考源之间不断的切换; 1) The reference source internal abnormal jitter strategy is mainly to prevent the abnormal jitter from being repeated, that is, to set the abnormal jitter processing. For example, after the abnormal jitter duration TO seconds, the reference source reports an abnormality. When the reference source is restored, the reference source is reported to be normal for a duration of T1 seconds. With the above settings, it is possible to prevent constant switching between reference sources;
2 )参考源内部异常判定检测策略,主要是告警的门限以及判定的准则, 例如以 GPS的卫星数的数目作为参考源异常的门限或者判定准则, 或者以 参考源的相位或者频差作为判定准则等;  2) Reference source internal anomaly determination detection strategy, mainly the threshold of the alarm and the criterion of the determination, for example, the number of satellites in the GPS is used as the threshold or criterion for the reference source anomaly, or the phase or frequency difference of the reference source is used as the criterion. Wait;
3 )参考源内部状态的跃迁策略, 是指本地时钟与参考源之间同步过程 中的几个状态或者环节的转移策略, 可以依据参考源的实际的工作情况, 进行本地时钟状态跃迁条件的重新的定义和划分。 例如自由运行、 快捕、 跟踪、 保持等状态或者环节之间的跃迁条件进行重新的定义;  3) The transition strategy of the internal state of the reference source refers to the transition strategy of several states or links in the process of synchronization between the local clock and the reference source. The local clock state transition condition can be re-established according to the actual working conditions of the reference source. Definition and division. For example, free running, fast catching, tracking, maintaining, etc., or transition conditions between links are redefined;
4 )参考源内部的控制步进策略, 是指参考源与本地时钟同步过程中的 步进控制, 要依据实际情况进行调整, 如果对时钟稳定性要求不高, 可以 加大步进, 从而可以节省同步时间。 如果时钟稳定性要求较高, 可以降低 步进, 但是需要耗费同步时间。  4) The control stepping strategy inside the reference source refers to the stepping control in the process of synchronizing the reference source with the local clock. It should be adjusted according to the actual situation. If the stability of the clock is not high, the stepping can be increased, so that Save synchronization time. If the clock stability requirements are high, the stepping can be reduced, but it takes time to synchronize.
当然, 在本实施例中并不限定参考源内部处理策略的具体内容, 参考 源内部处理策略可根据实际情况进行设置。  Certainly, the specific content of the internal processing strategy of the reference source is not limited in this embodiment, and the internal processing strategy of the reference source may be set according to actual conditions.
为了使本发明实施例的目的、 技术方案和优点更加清楚明白, 下面结 合实施例和附图, 对本发明实施例故进一步详细地说明。 在此, 本发明的 示意性实施例及说明用于解释本发明, 但并不作为对本发明的限定。  In order to make the objects, the technical solutions and the advantages of the embodiments of the present invention more comprehensible, the embodiments of the present invention will be described in detail below with reference to the embodiments. The illustrative embodiments and the description of the present invention are intended to be illustrative of the invention, but are not intended to limit the invention.
参见图 1 , 为本发明的实施例中多参考源输入的时钟控制方法的流程 图, 具体步驟如下:  Referring to FIG. 1 , which is a flow chart of a clock control method for multiple reference source inputs according to an embodiment of the present invention, the specific steps are as follows:
步驟 101、 从多个参考源中选出用于本地时钟同步的第一参考源; 在执行本步驟之前, 可预先设置多个参考源中各个参考源之间的切换 策略, 上述第一参考源为当满足切换策略时, 根据所述切换策略从多个参 考源中选出的参考源。 通过设置切换策略, 使得能够有效的对多个参考源 进行管理。 关于切换策略的介绍可参见上面的描述。 其实, 在执行步驟 101之前, 还可判断多个参考源中是否有可用参考 源(例如根据参考源的状态信息来判断), 若没有, 则该本地时钟自由运行; 否则, 执行步驟 101。 Step 101: Select a first reference source for local clock synchronization from multiple reference sources. Before performing this step, a switching policy between each reference source of the multiple reference sources may be preset, the first reference source. A reference source selected from a plurality of reference sources according to the switching policy when the switching policy is satisfied. By setting a switching policy, it is possible to effectively manage multiple reference sources. See the description above for an introduction to the switching strategy. In fact, before performing step 101, it may be determined whether there is a reference source available among the plurality of reference sources (for example, according to status information of the reference source), and if not, the local clock is free to run; otherwise, step 101 is performed.
步驟 102、 获取本地时钟当前的时钟控制参数;  Step 102: Acquire a current clock control parameter of the local clock.
上述时钟控制参数可以是用于控制时钟晶振的相关参数。  The above clock control parameters may be related parameters for controlling the clock crystal.
需要说明的是, 步驟 101与步驟 102之间没有严格的时间先后顺序。 步驟 103、根据当前的时钟控制参数, 并利用与所选的第一参考源计算 出第一时钟控制参数, 该第一时钟控制参数用于对本地时钟进行同步调整; 在本实施例中, 上述第一时钟控制参数可以是用于控制时钟晶振的相 关参数。 通过结合本地时钟当前的时钟控制参数, 来获取用于同步调整的 时钟控制参数, 可实现从原有的参考源时钟同步, 平滑过度到与新的参考 源同步。 在得到该第一时钟控制参数后, 可记录该参数, 以便在后续步驟 中使用。  It should be noted that there is no strict chronological order between step 101 and step 102. Step 103: Calculate a first clock control parameter according to a current clock control parameter, and calculate a first clock control parameter, where the first clock control parameter is used to perform synchronization adjustment on the local clock. In this embodiment, the foregoing The first clock control parameter can be a related parameter for controlling the clock crystal. By combining the current clock control parameters of the local clock to obtain the clock control parameters for synchronization adjustment, the original reference source clock can be synchronized, smoothed out, and synchronized with the new reference source. After the first clock control parameter is obtained, the parameter can be recorded for use in subsequent steps.
步驟 104、根据该第一时钟控制参数对本地时钟进行步进调整,使该本 地时钟与第一参考源同步;  Step 104: Perform step adjustment on the local clock according to the first clock control parameter, so that the local clock is synchronized with the first reference source;
在本实施例中, 每个参考源都有默认的控制步进策略, 当然也可根据 实际情况调整步进的幅度, 通过步进调整确保本地时钟的输出平衡, 稳定。  In this embodiment, each reference source has a default control stepping strategy. Of course, the amplitude of the step can be adjusted according to the actual situation, and the output of the local clock is balanced and stabilized by step adjustment.
步驟 105、 当该第一参考源发生异常时,根据各个参考源之间的切换策 略, 激活该多个参考源中的第二参考源, 并去激活第一参考源;  Step 105: When an abnormality occurs in the first reference source, activate a second reference source of the multiple reference sources according to a switching policy between the reference sources, and deactivate the first reference source;
在本实施例中, 可通过采集模块来获取各个参考源的状态信息, 当发 现当前激活参考源发生异常时, 可执行步驟 105来选取其他有效的参考源。  In this embodiment, the status information of each reference source may be acquired by the acquisition module. When an abnormality is found in the current active reference source, step 105 may be performed to select other valid reference sources.
步驟 106、根据第一时钟控制参数, 并利用第二参考源计算出第二时钟 控制参数, 该第二时钟控制参数用于对本地时钟进行同步调整;  Step 106: Calculate a second clock control parameter according to the first clock control parameter, and use the second reference source, where the second clock control parameter is used to perform synchronous adjustment on the local clock.
也就是, 在进行参考源切换后, 都需要在上个时钟控制参数的基础上 进行本地时钟的控制调整。 当然, 在第二参考源发生异常时, 也可根据步驟 105~107 中的处理流 程从多个参考源中选择出其他的参考源, 作为本地时钟的同步参考源。 That is, after the reference source switching, the local clock control adjustment needs to be performed on the basis of the last clock control parameter. Certainly, when an abnormality occurs in the second reference source, other reference sources may be selected from the plurality of reference sources according to the processing flow in steps 105-107 as a synchronous reference source of the local clock.
由上述技术方案可知, 在进行多参考源输入的时钟控制时, 获取本地 时钟当前的时钟控制参数, 然后根据当前的时钟控制参数, 利用所选的参 考源 (激活的参考源)计算出时钟控制参数, 然后根据计算得到的时钟控 制参数对本地时钟进行步进调整, 使本地时钟与所选的参考源同步, 由于 在时钟控制过程中, 激活的参考源总是把上个参考源对本地时钟的相关时 钟控制参数获取到, 并在该基础上进行同步调整, 从而使得在参考源之间 进行切换时, 能够保证从原有的参考源时钟同步, 平滑过度到与新的参考 源同步, 本地时钟的晶振的输出时钟稳定, 有效确保了本地时钟的输出质 量。  According to the foregoing technical solution, when clock control of the multi-reference source input is performed, the current clock control parameter of the local clock is obtained, and then the clock control is calculated by using the selected reference source (the activated reference source) according to the current clock control parameter. Parameters, and then step-adjust the local clock according to the calculated clock control parameters, so that the local clock is synchronized with the selected reference source, because during the clock control, the activated reference source always puts the previous reference source to the local clock. The relevant clock control parameters are acquired, and the synchronization adjustment is performed on the basis, so that when the reference source is switched, the original reference source clock can be synchronized, smoothed to synchronize with the new reference source, and localized. The output clock of the crystal oscillator of the clock is stable, which effectively ensures the output quality of the local clock.
其次, 可通过预先设置多个参考源中各个参考源之间的切换策略, 并 将该切换策略应用到具体的参考源切换过程中, 从而实现了对多个参考源 进行有效的管理, 可以使参考源按照用户的策略要求进行切换;  Secondly, the switching policy between each reference source in the multiple reference sources is preset, and the switching policy is applied to the specific reference source switching process, thereby implementing effective management of multiple reference sources, which can enable The reference source switches according to the user's policy requirements;
最后, 还可设置多个参考源中每个参考源的参考源内部处理策略, 通 过参考源内部处理策略, 来实现对参考源本身的有效管理。  Finally, the reference source internal processing strategy of each of the multiple reference sources can be set, and the reference source internal processing strategy can be effectively managed by referring to the source internal processing strategy.
在本实施例中, 参考源内部处理策略中的参考源内部状态的跃迁策略, 参见图 2和图 3。 图 2中^ ί叚设本地时钟的初始状态为 "自由运行" 时, 当满 足条件 Α时, 本地时钟的状态跃迁至 "快捕"; 在 "快捕" 状态, 当满足条 件 C时, 状态跃迁至 "跟踪 ", 当满足条件 B时, 状态跃迁至 "自由运行"; 在 "跟踪" 状态时, 当满足条件 E时, 状态跃迁至 "保持", 当满足条件 D 时, 状态跃迁至 "快捕"; 在 "保持" 状态时, 当满足条件 F时, 状态跃迁 至 "跟踪 "。 图 3中假设本地时钟的初始状态为 "自由运行" 时, 当满足条件 A时, 本地时钟的状态跃迁至 "快捕"; 在 "快捕" 状态, 当满足条件 B时, 状态 跃迁至 "自由运行", 当满足条件 C时, 状态跃迁至 "跟踪"; 在 "跟踪,, 状态, 当满足条件 D时, 状态跃迁至 "快捕", 当满足条件 E时, 状态跃迁 至 "保持 ", 当满足条件 G时, 状态跃迁至 "自由运行"; 在 "保持" 状态, 当满足条件 F时, 状态跃迁至 "跟踪", 当满足条件 H时, 状态跃迁至 "自 由运行 "。 In this embodiment, the transition strategy of the reference source internal state in the reference source internal processing strategy is shown in FIG. 2 and FIG. In Fig. 2, when the initial state of the local clock is "free running", when the condition Α is satisfied, the state of the local clock transitions to "fast catch"; in the "fast catch" state, when the condition C is satisfied, the state Transition to "tracking", when condition B is satisfied, the state transitions to "free running"; in the "tracking" state, when condition E is satisfied, the state transitions to "hold", when condition D is satisfied, the state transitions to " Fast catch"; In the "hold" state, when condition F is satisfied, the state transitions to "tracking". In Fig. 3, assuming that the initial state of the local clock is "free running", when the condition A is satisfied, the state of the local clock transitions to "fast catch"; in the "fast catch" state, when the condition B is satisfied, the state transitions to "" Free running", when condition C is satisfied, the state transitions to "tracking"; in "tracking, state, when condition D is satisfied, state transitions to "fast catch", when condition E is satisfied, state transitions to "hold" When the condition G is satisfied, the state transitions to "free running"; in the "hold" state, when the condition F is satisfied, the state transitions to "tracking", and when the condition H is satisfied, the state transitions to "free running".
参见图 4,为本发明的实施例中多参考源输入的时钟控制装置的结构示 意图, 该时钟控制装置包括:  4 is a schematic diagram showing the structure of a multi-reference source input clock control apparatus according to an embodiment of the present invention. The clock control apparatus includes:
主控模块 401 ,用于从多个参考源中选出用于本地时钟同步的第一参考 源, 以及获取所述本地时钟当前的时钟控制参数;  The main control module 401 is configured to select a first reference source for local clock synchronization from the plurality of reference sources, and obtain a current clock control parameter of the local clock;
时钟模块 402, 与主控模块 401连接, 用于根据所述当前的时钟控制参 数, 并利用所述第一参考源计算出第一时钟控制参数, 所述第一时钟控制 参数用于对本地时钟进行同步调整;  The clock module 402 is connected to the main control module 401, configured to calculate a first clock control parameter by using the first reference source according to the current clock control parameter, where the first clock control parameter is used for a local clock Make synchronization adjustments;
硬件模块 403, 与时钟模块 402连接, 用于产生所述本地时钟; 执行模块 404, 与时钟模块 402和硬件模块 403连接, 用于根据所述第 一时钟控制参数对所述本地时钟进行步进调整, 使所述本地时钟与所述第 一参考源同步。  The hardware module 403 is connected to the clock module 402 for generating the local clock. The execution module 404 is connected to the clock module 402 and the hardware module 403, and is configured to step the local clock according to the first clock control parameter. Adjusting to synchronize the local clock with the first reference source.
在本发明的另一实施例中, 上述主控模块 401 ,还用于当所述第一参考 源发生异常时, 根据各个参考源之间的切换策略, 激活所述多个参考源中 的第二参考源, 并去激活所述第一参考源;  In another embodiment of the present invention, the main control module 401 is further configured to activate the first one of the multiple reference sources according to a switching policy between each reference source when an abnormality occurs in the first reference source. Two reference sources, and deactivating the first reference source;
上述时钟模块 402,还用于根据所述第一时钟控制参数, 并利用所述第 二参考源计算出第二时钟控制参数, 所述第二时钟控制参数用于对本地时 钟进行同步调整;  The clock module 402 is further configured to: according to the first clock control parameter, calculate a second clock control parameter by using the second reference source, where the second clock control parameter is used for synchronous adjustment of a local clock;
上述执行模块 404,还用于根据所述第二时钟控制参数对所述本地时钟 进行步进调整, 使所述本地时钟与所述第二参考源同步。 The execution module 404 is further configured to: pair the local clock according to the second clock control parameter Step adjustment is performed to synchronize the local clock with the second reference source.
在本发明的另一实施例中, 该时钟控制装置还包括:  In another embodiment of the present invention, the clock control apparatus further includes:
采集模块 405 , 分别与时钟模块 402和主控模块 401连接, 用于采集参 考源的状态信息, 并将采集得到的状态信息反馈给主控模块 401 ;  The acquisition module 405 is connected to the clock module 402 and the main control module 401, and is used for collecting state information of the reference source, and feeding back the collected state information to the main control module 401;
在本发明的另一实施例中, 该时钟控制装置还包括:  In another embodiment of the present invention, the clock control apparatus further includes:
配置模块 406, 与主控模块 401连接, 用于预先设置多个参考源中各个 参考源之间的切换策略, 以及用于预先设置所述多个参考源中每个参考源 的参考源内部处理策略, 并将所述参考源之间的切换策略和所述参考源内 部处理策略下发给所述主控模块 401。  The configuration module 406 is connected to the main control module 401, configured to preset a switching policy between each of the plurality of reference sources, and a reference source internal processing for presetting each of the plurality of reference sources The policy, and the switching policy between the reference source and the reference source internal processing policy are sent to the main control module 401.
在本发明的另一实施例中, 该时钟模块 402包括:  In another embodiment of the present invention, the clock module 402 includes:
参考源配置接口, 与主控模块 401 连接, 用于接收所述主控模块 401 下发的每个参考源的配置信息, 以及每个参考源的参考源内部处理策略; 参考源状态检测单元, 用于利用参考源内部处理策略, 以及参考源与 本地时钟同步运算的结果, 判断当前参考源的状态是否正常;  a reference source configuration interface, connected to the main control module 401, configured to receive configuration information of each reference source sent by the main control module 401, and a reference source internal processing strategy of each reference source; a reference source state detecting unit, It is used to determine whether the current reference source is in a normal state by using the reference source internal processing strategy and the result of the reference source and the local clock synchronization operation;
时钟控制参数计算单元, 用于计算出用于对本地时钟同步调整的时钟 控制参数;  a clock control parameter calculation unit, configured to calculate a clock control parameter used for synchronous adjustment of the local clock;
状态跃迁处理单元, 用于在本地时钟与参考源同步过程中, 对本地时 钟的状态跃迁进行控制。  The state transition processing unit is configured to control the state transition of the local clock during the synchronization of the local clock with the reference source.
参见图 5 , 为本发明的实施例中硬件模块的结构示意图, 该硬件模块包 括:  Referring to FIG. 5, it is a schematic structural diagram of a hardware module according to an embodiment of the present invention, where the hardware module includes:
时钟电路 501 , 与所述执行模块 404连接, 用于产生本地时钟; 参考源选择单元 502, 用于从多个参考源中选择有效的参考源; 例如可根据预先设置的切换策略来进行参考源的选取, 将选取的参考 源设置为激活参考源, 并将激活参考源的相关信息发送给逻辑处理单元 The clock circuit 501 is connected to the execution module 404 for generating a local clock; the reference source selection unit 502 is configured to select a valid reference source from a plurality of reference sources; for example, the reference source can be used according to a preset switching policy. Selection, set the selected reference source to activate the reference source, and send the relevant information of the activated reference source to the logical processing unit
503 , 由逻辑处理单元 503进行相关计算。 逻辑处理运算单元 503 ,分别与所述时钟电路 501和所述参考源选择单 元 502连接, 用于根据各个参考源的输入信息、 本地时钟的输入信息以及 参考源的配置信息, 计算出各个参考源运算的相关信息, 供所述时钟模块 后续调用。 503. Perform correlation calculation by the logic processing unit 503. The logic processing operation unit 503 is respectively connected to the clock circuit 501 and the reference source selection unit 502, and is configured to calculate each reference source according to the input information of each reference source, the input information of the local clock, and the configuration information of the reference source. The information related to the operation is subsequently called by the clock module.
继续参阅图 4。在本实施例中, 上述主控模块 401用于完成把配置模块 406中的预先配置的相关配置信息(例如参考源的优先级、参考源的类型等) 传递到时钟模块 402中, 以及把从时钟模块 402采集到的各种信息(例如 参考源状态, 参考源的告警等)进行处理, 最终结合配置信息, 以及采集 到的信息, 来达到对多输入参考源的切换控制。  Continue to Figure 4. In this embodiment, the main control module 401 is configured to complete the pre-configured related configuration information (such as the priority of the reference source, the type of the reference source, and the like) in the configuration module 406, and the slave module 402 is The various information collected by the clock module 402 (for example, reference source status, reference source alarm, etc.) is processed, and finally combined with the configuration information and the collected information to achieve switching control of the multi-input reference source.
上述采集模块 405 ,用于将各个参考源的状态信息采集并上报给主控模 块 401 , 由主控模块 401处理。  The foregoing collecting module 405 is configured to collect and report the status information of each reference source to the main control module 401, and the main control module 401 processes the information.
上述时钟模块 402 包括多个参考源模块, 该参考源模块用于完成对每 种参考源的处理,各个参考源模块的功能包括: 1 )参考源配置接口功能(对 应于参考源配置接口;); 2 )参考源状态的检测功能(对应于参考源状态检 测单元); 3 )各个参考源与本地时钟之间同步的执行时钟控制参数的计算 (对应于时钟控制参数计算单元); 4 )参考源与本地时钟同步过程的状态 跃迁策略处理(对应于状态跃迁处理单元); 其中,  The clock module 402 includes a plurality of reference source modules, and the reference source module is configured to complete processing for each reference source. The functions of each reference source module include: 1) a reference source configuration interface function (corresponding to a reference source configuration interface;) 2) reference source state detection function (corresponding to reference source state detection unit); 3) calculation of execution clock control parameters synchronized between each reference source and local clock (corresponding to clock control parameter calculation unit); 4) reference State transition policy processing of the source and local clock synchronization process (corresponding to the state transition processing unit);
参考源配置接口, 可用于接收主控模块 401 下发的每个参考源的配置 信息, 以及每个参考源的参考源内部处理策略;  The reference source configuration interface is configured to receive configuration information of each reference source that is sent by the main control module 401, and a reference source internal processing policy of each reference source;
参考源状态检测单元, 主要是依据用户配置的参考源内部处理策略, 结合实际的参考源与本地时钟同步运算的结果, 给出当前参考源正常还是 异常的结论。 参考源异常可分两种情况, 其一: 参考源丟失异常, 其二: 参考源降质异常 (参考源质量无法满足可用参考源标准或者门限)。  The reference source state detecting unit mainly provides a conclusion that the current reference source is normal or abnormal according to the internal processing strategy of the reference source configured by the user, combined with the actual reference source and the local clock synchronization operation. The reference source anomaly can be divided into two cases, one: the reference source loss anomaly, and the second: the reference source degraded anomaly (the reference source quality cannot meet the available reference source standard or threshold).
时钟参数计算单元, 计算出用于对本地时钟同步调整的时钟控制参数。 为了使本地时钟与参考源同步, 需要对本地时钟的进行相应的调整, 而时 钟控制参数计算单元就是实时的输出硬件模块 403 (例如时钟晶振)要调整 的参数; The clock parameter calculation unit calculates a clock control parameter for synchronously adjusting the local clock. In order to synchronize the local clock with the reference source, the local clock needs to be adjusted accordingly. The clock control parameter calculation unit is a parameter to be adjusted by the real-time output hardware module 403 (for example, a clock crystal oscillator);
状态跃迁处理单元, 用于完成本地时钟与参考源同步过程中定义的几 个状态或者环节的相互转移处理。 例如本地时钟可以定义为自由运行、 快 捕、 跟踪、 保持等状态之间的跃迁条件进行重新的定义; 如果用户不进行 跃迁条件的重新定义, 则参考源则保留初始的跃迁定义。 关于状态跃迁策 略可参见图 2和图 3。  The state transition processing unit is configured to perform mutual transfer processing of several states or links defined in the process of synchronizing the local clock with the reference source. For example, the local clock can be defined as a transition condition between free running, fast catching, tracking, holding, etc.; if the user does not redefine the transition condition, the reference source retains the initial transition definition. See Figure 2 and Figure 3 for the state transition strategy.
执行模块 404, 则是根据时钟模块 402计算出的时钟控制参数,对硬件 模块 403进行控制调整, 使硬件输出的本地时钟与参考源趋于同步。  The execution module 404 controls the hardware module 403 according to the clock control parameters calculated by the clock module 402, so that the local clock output by the hardware is synchronized with the reference source.
其中对于时钟模块 402的得到的各个参考源的相关信息中, 只有当前 处于激活的参考源, 才拥有使用执行模块 404的权限(也就是根据激活的 参考源来进行本地时钟的控制调整), 其它未激活参考源则没有权限。 即当 激活某个参考源, 参考源将接手执行模块 404的控制权。 而去激活某个参 考源, 参考源将失去执行模块 404的控制权, 同时恢复到参考源的初始状 态;  Among the related information of the obtained reference sources of the clock module 402, only the currently active reference source has the right to use the execution module 404 (that is, the local clock control adjustment according to the activated reference source), and other There is no permission if the reference source is not activated. That is, when a reference source is activated, the reference source will take over control of the execution module 404. When a reference source is deactivated, the reference source will lose control of the execution module 404 and return to the initial state of the reference source;
硬件模块 403包括: 产生本地时钟的时钟电路 501 , 各个参考源输入的 参考源选择单元 502, 以及逻辑运算处理单元 503。 具体参见图 5。 其中, 产生本地时钟的时钟电路 501 ,依据执行模块 404传递的时钟控制参数, 输出的相应的本地时钟;  The hardware module 403 includes: a clock circuit 501 that generates a local clock, a reference source selection unit 502 that inputs each reference source, and a logical operation processing unit 503. See Figure 5 for details. The clock circuit 501 generating the local clock outputs a corresponding local clock according to the clock control parameter transmitted by the execution module 404;
参考源选择单元 502, 例如从参考源 A、 参考源 B和参考源 X中选择 有效的参考源, 使参考源输入有效, 例如可根据多个参考源中各个参考源 之间的切换策略进行选择;  The reference source selection unit 502, for example, selects a valid reference source from the reference source A, the reference source B, and the reference source X to make the reference source input valid, for example, may be selected according to a switching policy between each of the plurality of reference sources. ;
逻辑处理运算单元 503 ,有三个输入端口和一个输出端口, 三个输入端 口分别是各个参考源输入端口、 本地时钟的输入端口以及配置信息的输入 端口, 由这三个输入信息的结合, 逻辑处理运算单元 503将通过一系列逻 辑处理运算, 输出各个参考源运算所需的基本信息, 以供时钟模块 402后 续的调用处理。 The logic processing operation unit 503 has three input ports and one output port, and the three input ports are respectively a reference source input port, an input port of a local clock, and an input port of configuration information, and a combination of the three input information is logically processed. The operation unit 503 will pass a series of logic The processing operations are performed to output basic information required for each reference source operation for subsequent processing by the clock module 402.
下面通过一具体实施例, 来介绍本发明中的时钟控制装置如何实现在 多个参考源输入条件下进行时钟控制。  The following describes how the clock control apparatus of the present invention implements clock control under a plurality of reference source input conditions by way of a specific embodiment.
假设目前配置的参考源包括: 参考源 A、 参考源 B和参考源 X。 其中 参考源的公共策略选择优先级切换策略, 优先级分别为 PI , P2和 P3 , 且 P1〉P3〉P2。 对于参考源的专用策略, 参考源 A选择默认专用策略, 参考源 B选择参考源内部异常抖动策略(根据策略, 配置参数 TO和 T1 ), 其它默 认(默认步进参数为 S ), 参考源 X选用控制步进策略(配置步进控制参数 M ), 其它默认。 通过配置模块 406, 可把参考源的相关配置信息以及切换 策略传递到主控模块 401。 主控模块 401先按照优先级进行排序,把优先级 最高的排在轮训最前列, 例如参考源 A、 参考源 X、 参考源 B。 主控模块 401同时会把每个参考源的配置信息,以及专用策略,传递到时钟模块 402。 时钟模块 402根据上述配置信息和专用策略, 开始执行相应处理。  Assume that the currently configured reference sources include: Reference Source A, Reference Source B, and Reference Source X. The public policy of the reference source selects the priority switching policy, and the priorities are PI, P2, and P3, respectively, and P1>P3>P2. For the dedicated policy of the reference source, reference source A selects the default dedicated policy, reference source B selects the reference source internal abnormal jitter policy (according to the policy, configuration parameters TO and T1), other defaults (default step parameter is S), reference source X Select the control step strategy (configure step control parameter M), other defaults. Through the configuration module 406, the relevant configuration information of the reference source and the switching policy can be delivered to the main control module 401. The main control module 401 first sorts according to the priority, and ranks the highest priority in the forefront of the rotation training, for example, reference source A, reference source X, and reference source B. The master module 401 also passes the configuration information of each reference source, as well as the dedicated policy, to the clock module 402. The clock module 402 starts executing the corresponding processing according to the above configuration information and a dedicated policy.
同时采集模块 405 , 将会不断的采集各个参考源的状态信息, 并提供给 主控模块 401。主控模块 401依据采集模块 405提供的各个参考源的状态信 息, 从而确定有效的参考源, 并将参考源记为即将激活的参考源。  At the same time, the module 405 is collected, and the status information of each reference source is continuously collected and provided to the main control module 401. The main control module 401 determines the valid reference source according to the status information of each reference source provided by the acquisition module 405, and records the reference source as the reference source to be activated.
假设参考源 A被选中, 那么参考源 A将被激活, 同时拥有对硬件模块 403的控制权。 在行使控制权的同时, 参考源 A会首先从执行模块 404获 取当前的时钟控制参数 P0, 参考源 A会在时钟控制参数 P0基础上依据参 考源 A的算法, 得到时钟控制参数 PA ( PA并不是固定值 ), 通过该时钟控 制参数对硬件模块 403进行步进调整, 从而达到参考源 A与本地时钟逐渐 同步的目标。 由于参考源 A采取了默认控制步进策略(配置步进控制参数 S ), 那么每次形成的新 PA与之前 PA差的绝对值要小于 S。 参考源中的运 算过程可以是:参考源 A首先从执行模块 404获取当前的时钟控制参数 P0, 参考源 A输入到硬件模块的逻辑中, 本地时钟会与参考源 A在逻辑中进行 相位或者频段比对, 输出差异参数, 由差异参数、 原有控制参数 P0以及算 法公式, 来不断的计算出 PA。 Assuming reference source A is selected, reference source A will be activated while having control of hardware module 403. While exercising the control right, the reference source A will first obtain the current clock control parameter P0 from the execution module 404, and the reference source A will obtain the clock control parameter PA (PA according to the reference source A algorithm based on the clock control parameter P0. It is not a fixed value), and the hardware module 403 is step-adjusted by the clock control parameter, thereby achieving the goal that the reference source A is gradually synchronized with the local clock. Since the reference source A adopts the default control stepping strategy (configure step control parameter S), the absolute value of the difference between the new PA and the previous PA formed each time is less than S. The operation process in the reference source may be: the reference source A first obtains the current clock control parameter P0 from the execution module 404, The reference source A is input into the logic of the hardware module, and the local clock performs phase or band comparison with the reference source A in the logic, and outputs the difference parameter, which is continuously calculated by the difference parameter, the original control parameter P0, and the algorithm formula. PA.
如果参考源 A发生异常, 由于参考源 A没有配置专用策略, 那么参考 源 A马上会被主控模块 401去激活, 从而失去对硬件模块 403的控制权。 在失去控制权的同时, 参考源 A会把当前对硬件模块 403的时钟控制参数 保存起来, 记为 Pl。  If an abnormality occurs in the reference source A, since the reference source A is not configured with a dedicated policy, the reference source A is immediately deactivated by the main control module 401, thereby losing control of the hardware module 403. While losing control, reference source A will save the current clock control parameters of hardware module 403, denoted as Pl.
主控模块 401将重新选择可用的参考源, 那么就会选择参考源 X, 如 果参考源 X工作正常, 在激活参考源 X的同时, 参考源 X获取了执行模块 404的控制权。 参考源 X获取到时钟控制参数 P1 , 那么激活参考源 X将代 替参考源 A, 在 P1基础上依据参考源 X的算法, 得到时钟控制参数 Px, 并根据该时钟控制参数对硬件模块 403进行调整, 从而达到参考源 X与本 地时钟逐渐同步的目标。 由于参考源 X采取了控制步进策略(配置步进控 制参数 M ), 那么每次形成的新 PA的值与之前的 PA值的差的绝对值要小 于 M。  The master module 401 will reselect the available reference source, then the reference source X will be selected. If the reference source X is working properly, the reference source X acquires control of the execution module 404 while the reference source X is activated. The reference source X obtains the clock control parameter P1, then the reference source X is activated instead of the reference source A. Based on the algorithm of the reference source X on the basis of P1, the clock control parameter Px is obtained, and the hardware module 403 is adjusted according to the clock control parameter. , thereby achieving the goal that the reference source X is gradually synchronized with the local clock. Since the reference source X adopts the control stepping strategy (configure step control parameter M), the absolute value of the difference between the value of the new PA formed each time and the previous PA value is less than M.
通过系统配置参考源之间的公共策略以及参考源本身的专用策略, 可 以使参考源按照用户的策略要求进行切换, 同时由于在切换过程中, 即将 激活的参考源总是把上个参考源对硬件模块 403 的时钟控制参数获取到, 并在该基础上进行硬件模块 403的控制调整, 同时硬件模块 403调整的参 数幅度进行限定(即每个参考源均有默认控制步进策略, 也可以根据实际 情况调整步进的幅度), 从而使得在多个参考源之间进行切换时, 保证本地 时钟的输出平滑、 稳定, 确保了参考源切换过程中, 本地时钟的输出质量。  Through the common policy between the system configuration reference source and the dedicated policy of the reference source itself, the reference source can be switched according to the user's policy requirements, and since the reference source to be activated is always the last reference source pair during the handover process. The clock control parameter of the hardware module 403 is obtained, and the control adjustment of the hardware module 403 is performed on the basis, and the parameter amplitude adjusted by the hardware module 403 is limited (that is, each reference source has a default control stepping strategy, and may also be The actual situation adjusts the amplitude of the step), so that when switching between multiple reference sources, the output of the local clock is guaranteed to be smooth and stable, and the output quality of the local clock during the reference source switching is ensured.
接下来介绍, 在本实施例中在参考源配置和策略配置完成后, 参考源 是如何切换, 各种策略是如何生效的。  Next, in this embodiment, after the reference source configuration and the policy configuration are completed, how the reference source is switched, and how various policies are effective.
例如: 时钟模块 402获取以下参考源 2Mbps/2MHz/GPS/SyncE的配置 信息, 同时专用策略也已经生效, 每个参考源均会对硬件模块 403进行相 应的设置, 以保证硬件模块 403能够为时钟模块 402的每个参考源提供基 本的处理信息。 For example: Clock module 402 obtains the following reference source 2Mbps/2MHz/GPS/SyncE configuration The information, while the dedicated policy has also taken effect, each reference source will have corresponding settings for the hardware module 403 to ensure that the hardware module 403 can provide basic processing information for each reference source of the clock module 402.
在参考源被配置后, 每个配置的参考源的初始状态均认为是正常的, 此时主控模块 401 将依据公共策略, 例如: 优先级切换策略和参考源当前 可用不切换策略(针对 GPS时钟参考源)来选择合适的参考源作为即将激 活的参考源。  After the reference source is configured, the initial state of each configured reference source is considered normal. At this time, the main control module 401 will be based on a common policy, for example: priority switching policy and reference source currently available no switching policy (for GPS) Clock reference source) to select the appropriate reference source as the reference source to be activated.
由于参考源 2Mbps排在最前面, 那么参考源 2Mbps被选择作为当前激 活参考源, 其拥有了对执行模块 404的控制权, 其首先会获取执行模块 404 保存的初始的时钟控制参数 P0。 同时采集模块 405会对每个参考源按照排 序规则进行状态查询, 以保证信号源的公共策略能够正常执行。  Since the reference source 2 Mbps is at the top, the reference source 2 Mbps is selected as the current active reference source, which has control over the execution module 404, which first acquires the initial clock control parameter P0 held by the execution module 404. At the same time, the acquisition module 405 performs a status query on each reference source according to the ordering rules to ensure that the common policy of the signal source can be executed normally.
对于每个参考源内部来说, 参考源 2Mbps的内部的跃迁策略, 可按照 图 2所示的状态跃迁条件进行转换。 其它专用策略, 保持默认。 在运行过 程中, 参考源 2Mbps会表现出该参考源的状态, 例如当前所处的跃迁状态, 以及当前参考源的正常或者异常。 参考源 2Mbps的异常有两种: 参考源丟 失和参考源降质异常。  For each reference source internal, the internal transition strategy of the reference source of 2 Mbps can be converted according to the state transition conditions shown in Figure 2. Other proprietary strategies, keep the default. During operation, the reference source 2Mbps will show the status of the reference source, such as the current transition state, and the normal or abnormal of the current reference source. There are two types of reference source 2Mbps anomalies: reference source loss and reference source degradation.
而对于参考源 2MHz的内部的跃迁策略, 可按照图 3所示的状态跃迁 条件进行转换。 其它专用策略, 保持默认。 其它同参考源 2Mbps。  For the internal transition strategy of the reference source of 2MHz, the transition can be performed according to the state transition condition shown in Figure 3. Other proprietary strategies, keep the default. Other same reference source 2Mbps.
对于 GPS时钟参考源, 在搜星时, 连续 TO时间, 当卫星数目均小于 4 时, GPS时钟参考源上报异常, 当连续 T1时间,卫星数目均大于等于 4时, GPS时钟参考源上报正常。  For the GPS clock reference source, when searching for stars, continuous TO time, when the number of satellites is less than 4, the GPS clock reference source reports an abnormality. When the number of satellites is greater than or equal to 4 for consecutive T1 time, the GPS clock reference source reports normal.
对于参考源 SyncE, 则按照默认专用策略执行。  For the reference source SyncE, it is executed according to the default dedicated policy.
对于参考源 2Mbps获取到执行模块 404的控制权后, 会在时钟控制参 数 P0基数上,依据参考源 2Mbps的算法,实时的运算出 P2mbps控制参数, 通过执行模块 404,对硬件模块 403的时钟电路 501进行配置,从而使时钟 电路 501的本地时钟输出与参考源 2Mbps保持同步。 需要注意的是, 对硬 件模块 403的实际的配置参数的运算如下:为相邻两次 P2mbps差值的绝对 值 p, 如果 p大于或者等于默认步进值 S, 则配置参数为 S, 否则配置参数 为 p。 After obtaining the control right of the execution module 404 for the reference source 2 Mbps, the P2mbps control parameter is calculated in real time according to the reference source 2 Mbps algorithm on the clock control parameter P0 base, and the clock circuit of the hardware module 403 is executed by the execution module 404. 501 is configured to make the clock The local clock output of circuit 501 is synchronized with the reference source 2 Mbps. It should be noted that the actual configuration parameters of the hardware module 403 are calculated as follows: the absolute value p of the adjacent two P2mbps difference values, if p is greater than or equal to the default step value S, the configuration parameter is S, otherwise configuration The parameter is p.
拔掉参考源 2Mbps的输入或者以其它方式, 使参考源 2Mbps处于异常 状态。 那么 TO秒(60s )后, 主控模块 401会去激活参考源 2Mbps, 同时 执行模块 404保留时钟控制参数为 P1。  Unplug the reference source 2 Mbps input or otherwise leave the reference source 2 Mbps in an abnormal state. Then, after TO seconds (60s), the main control module 401 deactivates the reference source 2Mbps, and the execution module 404 reserves the clock control parameter as P1.
由于参考源 2MHz的状态是正常的, 那么主控模块 401会选择参考源 2MHz作为当前激活参考源,那么参考源 2MHz将获取到执行模块 404的控 制权, 同时获取到时钟控制参数 P1 , 依据参考源 2MHz的算法, 实时的运 算出 P2MHz控制参数,通过执行模块 404,对硬件模块 403的时钟电路 501 进行步进参数配置, 从而使时钟电路 501 的本地时钟输出与参考源 2MHz 保持同步。  Since the state of the reference source 2 MHz is normal, the main control module 401 selects the reference source 2 MHz as the current active reference source, then the reference source 2 MHz will acquire the control right of the execution module 404, and simultaneously acquire the clock control parameter P1, according to the reference. The source 2 MHz algorithm calculates the P2MHz control parameters in real time, and performs the step parameter configuration on the clock circuit 501 of the hardware module 403 through the execution module 404, so that the local clock output of the clock circuit 501 is synchronized with the reference source 2 MHz.
拔掉参考源 2MHz的输入或者以其它方式, 使参考源 2MHz处于异常 状态。 那么 10秒(默认抖动处理策略)后, 参考源 2MHz上报异常, 采集 模块 405将把该异常上报到主控模块 401 , 主控模块 401将把参考源 2MHz 去激活, 收回参考源 2Mhz对执行模块 404的控制权, 同时执行模块 404 保留时钟控制参数为 P2。  Unplug the reference source from the 2MHz input or otherwise leave the reference source 2MHz in an abnormal state. Then, after 10 seconds (the default jitter processing policy), the reference source 2MHz reports an exception, the acquisition module 405 will report the abnormality to the main control module 401, the main control module 401 will deactivate the reference source 2MHz, and reclaim the reference source 2Mhz to the execution module. Control of 404, while execution module 404 reserves the clock control parameter as P2.
如果此时参考源 2Mbps恢复正常, 那么主控模块 401会重新选择参考 源 2Mbps作为当前激活参考源。  If the reference source 2 Mbps returns to normal at this time, the main control module 401 will reselect the reference source 2 Mbps as the current active reference source.
如果此时参考源 2Mbps还处于异常状态, 由于此时 GPS时钟参考源状 态是正常的, 那么主控模块 401会选择 GPS时钟参考源作为当前激活参考 源, 那么 GPS时钟参考源将获取执行模块 404的控制权, 同时获取到执行 模块 404的控制参数为 P2。 那么 GPS时钟参考源, 依据 GPS时钟参考源 的算法, 实时的运算出 PGPS时钟控制参数, 通过执行模块 404, 对硬件模 块 403的时钟电路 501进行步进参数配置, 从而使时钟电路 501的本地时 钟输出与 GPS时钟参考源保持同步。 If the reference source 2 Mbps is still in an abnormal state at this time, since the GPS clock reference source state is normal at this time, the main control module 401 selects the GPS clock reference source as the current active reference source, then the GPS clock reference source acquires the execution module 404. The control right is obtained, and the control parameter of the execution module 404 is obtained as P2. Then the GPS clock reference source, according to the algorithm of the GPS clock reference source, calculates the PGPS clock control parameter in real time, and executes the module 404 to the hardware module. The clock circuit 501 of block 403 performs step parameter configuration to synchronize the local clock output of clock circuit 501 with the GPS clock reference source.
如果此时参考源 2Mbps/2MHz恢复了正常, 因为用户设定了公共策略: 参考源当前可用不切换策略(针对 GPS 时钟参考源), 就是说, 只要 GPS 时钟参考源可用, 那么就不会在切换到任务参考源上, 除非 GPS时钟参考 源不可用, 主控模块 401才会按照顺序进行参考源的重新选取。  If the reference source 2Mbps/2MHz is restored to normal at this time, because the user has set a common policy: The reference source is currently available without switching policy (for the GPS clock reference source), that is, as long as the GPS clock reference source is available, then it will not Switching to the task reference source, the master module 401 will perform the reselection of the reference source in sequence unless the GPS clock reference source is not available.
只要当参考源 2Mbps/2MHz/GPS均不可用时, 那么参考源 SyncE才有 可能被主控模块 401选择为当前激活参考源。  As long as the reference source 2Mbps/2MHz/GPS is not available, then the reference source SyncE may be selected by the master module 401 as the currently active reference source.
纵观整个运行过程, 大到每个切换过程, 小到每个专用策略的应用, 均不同程度的呈现了参考源切换中的灵活度、 可操作性, 同时由于控制参 数也在不断的参考源切换中, 总是在原有的基础上, 按照设置的步进策略 对硬件模块 403进行调整, 保证了本地时钟输出的稳定性。  Throughout the entire operation process, as large as each switching process, as small as the application of each dedicated strategy, the flexibility and operability of the reference source switching are presented to varying degrees, and the control parameters are also constantly referenced. During the switching, the hardware module 403 is always adjusted according to the set stepping strategy on the original basis to ensure the stability of the local clock output.
下面结合图 1和图 4来介绍本发明的实施例中参考源的具体切换流程。 当用户配置了参考源的各种切换策略后, 参考源将按照配置的切换策 略进行运行, 同时采集模块 405会实时的采集各个配置参考源状态的信息, 提供给主控模块 401。 主控模块 401根据各个参考源状态以及切换策略, 选 择最佳有效的参考源, 如果当前没有最佳有效, 则硬件模块 403 的时钟电 路 501将自由运行, 不受任何参考源的控制。  The specific switching procedure of the reference source in the embodiment of the present invention will be described below with reference to FIG. 1 and FIG. 4. After the user configures various switching policies of the reference source, the reference source will run according to the configured switching policy, and the collecting module 405 collects the information of each configuration reference source state in real time and provides the information to the main control module 401. The main control module 401 selects the best valid reference source according to each reference source state and the switching strategy. If not currently optimal, the clock circuit 501 of the hardware module 403 will run freely without being controlled by any reference source.
如果当前有最佳有效的参考源, 那么主控模块 401 会判断当前激活参 考源是否就是最佳有效参考源, 如果不是, 则去激活当前参考源, 激活当 前最佳有效的参考源, 并获取执行模块 404的当前控制参数以及控制模块 404的控制权。 如果是, 则当前激活参考源继续运行。 激活参考源在拥有了 执行模块 404的控制权后, 会依据参考源的算法, 计算出时钟控制参数, 同时结合参考源的控制参数步进, 步进调整硬件模块 403的时钟输出。  If there is currently a best valid reference source, the main control module 401 determines whether the currently activated reference source is the best valid reference source, and if not, deactivates the current reference source, activates the currently best valid reference source, and obtains The current control parameters of module 404 and the control of control module 404 are performed. If yes, the currently active reference source continues to run. After the activation reference source has the control right of the execution module 404, the clock control parameter is calculated according to the algorithm of the reference source, and the clock output of the hardware module 403 is stepwise adjusted in combination with the control parameter step of the reference source.
目前基站常用的参考源, 有 GPS时钟参考源, 参考源 2Mbps, 参考源 2MHz, 线路时钟( E1/T1/STM1 ), 参考源 IEEE588, 参考源 SyncE等。 假设用户选择参考源 2Mbps/2MHz/GPS/SyncE时钟作为基站的输入参 考源 ,选取的公共策略为优先级切换策略和参考源当前可用不切换策略(针 对 GPS时钟参考源),参考源 2Mbps优先级为 0,参考源 2MHz优先级为 0, GPS时钟参考源优先级为 1 , 参考源 SyncE优先级为 2。 即参考源 2Mbps 和参考源 2MHz优先级大于 GPS时钟参考源,参考源 2Mbps和参考源 2MHz 优先级相同, 而 GPS 时钟参考源优先级大于参考源 SyncE。 对于参考源 2MHz和参考源 2Mbps优先级相同的情况下, 则由主控模块 401 自行处理, 那么假设主控模块 401最终优先级顺序依次为参考源 2Mbps、参考源 2MHz、 GPS时钟参考源、 和参考源 SyncE。 Reference source commonly used by base stations, GPS clock reference source, reference source 2Mbps, reference source 2MHz, line clock (E1/T1/STM1), reference source IEEE588, reference source SyncE, etc. Suppose the user selects the reference source 2Mbps/2MHz/GPS/SyncE clock as the input reference source of the base station. The selected common policy is the priority switching policy and the reference source currently available non-switching strategy (for GPS clock reference source), reference source 2Mbps priority. 0, the reference source 2MHz priority is 0, the GPS clock reference source priority is 1, and the reference source SyncE priority is 2. That is, the reference source 2 Mbps and the reference source 2 MHz priority are greater than the GPS clock reference source, the reference source 2 Mbps and the reference source 2 MHz have the same priority, and the GPS clock reference source priority is greater than the reference source SyncE. For the case where the reference source 2 MHz and the reference source 2 Mbps have the same priority, the main control module 401 processes it by itself, and then assumes that the final priority order of the main control module 401 is the reference source 2 Mbps, the reference source 2 MHz, the GPS clock reference source, and Reference source SyncE.
对于参考源 2Mbps选用的专用策略: 参考源内部状态的跃迁策略, 具 体策略是参考源刚激活时, 本地时钟状态转移条件见图 2所示。 其它专用 策略, 均采用默认策略(例如控制参数步进为 S, 持续 10s异常, 参考源为 异常, 持续 20s为正常, 参考源为正常)。  For the reference source 2Mbps selected dedicated strategy: reference source internal state transition strategy, the specific strategy is the reference source just activated, the local clock state transition conditions are shown in Figure 2. For other dedicated strategies, the default policy is adopted (for example, the control parameter step is S, the 10s is abnormal, the reference source is abnormal, the 20s is normal, and the reference source is normal).
对于参考源 2Mbps选用的专用策略: 参考源内部状态的跃迁策略, 具 体策略是参考源刚激活时, 本地时钟状态转移条件见图 3 所示。 其它专用 策略, 均采用默认策略(例如控制参数步进为 S, 持续 10s异常, 参考源为 异常, 持续 20s为正常, 参考源为正常)。  For the reference source 2Mbps selected dedicated strategy: reference source internal state transition strategy, the specific strategy is the reference source just activated, the local clock state transition conditions are shown in Figure 3. For other dedicated strategies, the default policy is adopted (for example, the control parameter step is S, the 10s is abnormal, the reference source is abnormal, the 20s is normal, and the reference source is normal).
对于 GPS时钟参考源选用的专用策略: 1 )参考源内部异常判定检测策 略(即 GPS搜星大于等于 4时为正常, 小于 4时为异常); 2 )参考源内部 异常抖动策略, 即持续 TO ( 60s )秒为异常时, GPS 将上报异常, 当持续 Tl ( 120s ) 为正常时, GPS 将上报正常。 其它专用策略, 均采用默认策略 (例如控制参数步进为 s )。  The dedicated strategy for the GPS clock reference source: 1) Reference source internal anomaly detection detection strategy (ie, GPS search star is greater than or equal to 4 is normal, less than 4 is abnormal); 2) Reference source internal abnormal jitter strategy, that is, continuous TO (60s) When the second is abnormal, the GPS will report an abnormality. When the continuous Tl (120s) is normal, the GPS will report normal. For other proprietary strategies, the default policy is used (for example, the control parameter step is s ).
对于参考源 SyncE选用的专用策略, 均采用默认(例如控制参数步进 为 S, 持续 10s异常, 参考源为异常, 持续 20s为正常, 参考源为正常)。 主控模块 401 获取参考源配置信息和公共策略配置信息, 同时主控模 块 401 会把参考源配配置信息以及参考源专用策略配置信息传递到时钟模 块 402, 时钟模块 402的配置参考源获取到配置信息以及专用配置策略后, 会对硬件模块 403进行对应的设置。 For the dedicated strategy selected by the reference source SyncE, the default is adopted (for example, the control parameter step is S, the 10s is abnormal, the reference source is abnormal, the 20s is normal, and the reference source is normal). The main control module 401 obtains the reference source configuration information and the common policy configuration information, and the main control module 401 transmits the reference source configuration information and the reference source-specific policy configuration information to the clock module 402, and the configuration reference source of the clock module 402 acquires the configuration. After the information and the dedicated configuration policy, the hardware module 403 is correspondingly set.
在本发明的实施例中还提供一种基站, 包括:  A base station is further provided in an embodiment of the present invention, including:
主控模块, 用于从多个参考源中选出用于本地时钟同步的第一参考源, 以及获取所述本地时钟当前的时钟控制参数;  a main control module, configured to select, from a plurality of reference sources, a first reference source for local clock synchronization, and obtain a current clock control parameter of the local clock;
时钟模块, 与所述主控模块连接, 用于根据所述当前的时钟控制参数, 并利用所述第一参考源计算出第一时钟控制参数, 所述第一时钟控制参数 用于对本地时钟进行同步调整;  a clock module, configured to be connected to the main control module, configured to calculate a first clock control parameter by using the first reference source according to the current clock control parameter, where the first clock control parameter is used for a local clock Make synchronization adjustments;
硬件模块, 与所述时钟模块连接, 用于产生所述本地时钟;  a hardware module, connected to the clock module, for generating the local clock;
执行模块, 与所述时钟模块和硬件模块连接, 用于根据所述第一时钟 控制参数对所述本地时钟进行步进调整, 使所述本地时钟与所述第一参考 源同步。  And an execution module, connected to the clock module and the hardware module, configured to perform step adjustment on the local clock according to the first clock control parameter, so that the local clock is synchronized with the first reference source.
在本发明的另一实施例中, 所述主控模块, 还用于当所述第一参考源 发生异常时, 根据各个参考源之间的切换策略, 激活所述多个参考源中的 第二参考源, 并去激活所述第一参考源;  In another embodiment of the present invention, the main control module is further configured to: when an abnormality occurs in the first reference source, activate a first one of the multiple reference sources according to a switching policy between each reference source Two reference sources, and deactivating the first reference source;
所述时钟模块, 还用于根据所述第一时钟控制参数, 并利用所述第二 参考源计算出第二时钟控制参数, 所述第二时钟控制参数用于对本地时钟 进行同步调整;  The clock module is further configured to: according to the first clock control parameter, calculate a second clock control parameter by using the second reference source, where the second clock control parameter is used to perform synchronous adjustment on a local clock;
所述执行模块, 还用于根据所述第二时钟控制参数对所述本地时钟进 行步进调整, 使所述本地时钟与所述第二参考源同步。  The execution module is further configured to perform step adjustment on the local clock according to the second clock control parameter, so that the local clock is synchronized with the second reference source.
以上所述仅是本发明的优选实施方式, 应当指出, 对于本技术领域的 普通技术人员来说, 在不脱离本发明原理的前提下, 还可以作出若干改进 和润饰, 这些改进和润饰也应视为本发明的保护范围。 工业实用性 The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It is considered as the scope of protection of the present invention. Industrial applicability
本发明的多参考源输入的时钟控制方法、 装置及基站, 从多个参考源 中选出用于本地时钟同步的第一参考源; 以及获取所述本地时钟当前的时 钟控制参数; 根据所述当前的时钟控制参数, 利用所述第一参考源计算出 第一时钟控制参数; 所述第一时钟控制参数用于对本地时钟进行同步调整; 根据所述第一时钟控制参数对所述本地时钟进行步进调整, 使所述本地时 钟与所述第一参考源同步。 本发明方法、 装置及基站, 保证当多个参考源 之间发生切换时, 本地时钟从原有的参考源时钟同步, 平滑过度到与新的 参考源同步。  The multi-reference source input clock control method, device and base station of the present invention select a first reference source for local clock synchronization from a plurality of reference sources; and acquire current clock control parameters of the local clock; a current clock control parameter, using the first reference source to calculate a first clock control parameter; the first clock control parameter is used for synchronously adjusting a local clock; and the local clock is configured according to the first clock control parameter Step adjustment is performed to synchronize the local clock with the first reference source. The method, device and base station of the invention ensure that when a switchover occurs between multiple reference sources, the local clock is synchronized from the original reference source clock, smoothed out to synchronize with the new reference source.

Claims

权利要求书 Claim
1、 一种多参考源输入的时钟控制方法, 该方法包括:  1. A clock control method for multiple reference source inputs, the method comprising:
从多个参考源中选出用于本地时钟同步的第一参考源, 以及获取所述 本地时钟当前的时钟控制参数;  Selecting a first reference source for local clock synchronization from a plurality of reference sources, and acquiring current clock control parameters of the local clock;
根据所述当前的时钟控制参数, 并利用所述第一参考源计算出第一时 钟控制参数, 据此对所述本地时钟进行步进调整, 使所述本地时钟与所述 第一参考源同步。  Determining, according to the current clock control parameter, a first clock control parameter by using the first reference source, and performing step adjustment on the local clock to synchronize the local clock with the first reference source. .
2、 根据权利要求 1所述的方法, 其中, 所述第一参考源为: 当满足预 先设置的多个参考源中各个参考源之间的切换策略时, 根据所述切换策略 从所述多个参考源中选出的参考源。  2. The method according to claim 1, wherein the first reference source is: when a handover policy between each reference source of the plurality of reference sources set in advance is met, according to the handover policy from the multiple The reference source selected from the reference sources.
3、 根据权利要求 2所述的方法, 其中, 所述各个参考源之间的切换策 略包括: 参考源切换按照配置优先级切换策略、 参考源按照配置顺序切换 策略、 参考源按照当前可用不切换策略和参考源独断保持切换策略中的任 意一种或多种。  3. The method according to claim 2, wherein the switching policy between the reference sources comprises: a reference source switching according to a configuration priority switching policy, a reference source switching policy according to a configuration order, and a reference source not switching according to a current available state. The policy and reference source arbitrarily maintain any one or more of the switching policies.
4、根据权利要求 2所述的方法,其中, 当所述第一参考源发生异常时, 所述方法还包括:  The method of claim 2, wherein when the first reference source is abnormal, the method further includes:
根据所述各个参考源之间的切换策略, 激活所述多个参考源中的第二 参考源, 并去激活所述第一参考源;  Deactivating a second one of the plurality of reference sources and deactivating the first reference source according to a switching policy between the reference sources;
根据所述第一时钟控制参数, 利用所述第二参考源计算出用于对本地 时钟进行同步调整的第二时钟控制参数, 据此对所述本地时钟进行步进调 整, 使所述本地时钟与所述第二参考源同步。  Determining, by using the second reference source, a second clock control parameter for performing synchronization adjustment on the local clock according to the first clock control parameter, and performing step adjustment on the local clock, so that the local clock is Synchronized with the second reference source.
5、 根据权利要求 1至 4任一项所述的方法, 其中, 该方法还包括: 预先设置所述多个参考源中每个参考源的参考源内部处理策略。  The method according to any one of claims 1 to 4, wherein the method further comprises: presetting a reference source internal processing policy of each of the plurality of reference sources.
6、根据权利要求 5所述的方法,其中,所述参考源内部处理策略包括: 参考源内部异常抖动策略、 参考源内部异常判定检测策略、 参考源内部状 态的跃迁策略和参考源内部的控制步进策略中的任意一种或多种。 The method according to claim 5, wherein the reference source internal processing strategy comprises: a reference source internal abnormal jitter strategy, a reference source internal abnormality determination detection strategy, and a reference source internal shape. Any one or more of the transition strategy of the state and the control stepping strategy inside the reference source.
7、 根据权利要求 1至 4任一项所述的方法, 其中, 该方法还包括: 判断所述多个参考源中是否有可用参考源, 若没有, 则本地时钟自由 运行; 若有, 则选出所述第一参考源, 以及获取所述时钟控制参数。  The method according to any one of claims 1 to 4, wherein the method further comprises: determining whether a reference source is available among the plurality of reference sources, and if not, the local clock is free to run; if yes, Selecting the first reference source and acquiring the clock control parameters.
8、 一种多参考源输入的时钟控制装置, 该装置包括:  8. A multi-reference source input clock control device, the device comprising:
主控模块, 用于从多个参考源中选出用于本地时钟同步的第一参考源, 以及获取所述本地时钟当前的时钟控制参数;  a main control module, configured to select, from a plurality of reference sources, a first reference source for local clock synchronization, and obtain a current clock control parameter of the local clock;
时钟模块, 用于根据所述当前的时钟控制参数, 利用所述第一参考源 计算出第一时钟控制参数;  a clock module, configured to calculate, by using the first reference source, a first clock control parameter according to the current clock control parameter;
硬件模块, 用于产生所述本地时钟;  a hardware module, configured to generate the local clock;
执行模块, 用于根据所述第一时钟控制参数对所述本地时钟进行步进 调整, 使所述本地时钟与所述第一参考源同步。  And an execution module, configured to perform step adjustment on the local clock according to the first clock control parameter, to synchronize the local clock with the first reference source.
9、 根据权利要求 8所述的装置, 其中, 所述时钟模块包括:  9. The device according to claim 8, wherein the clock module comprises:
参考源配置接口, 用于接收所述主控模块下发的每个参考源的配置信 息, 以及每个参考源的参考源内部处理策略;  a reference source configuration interface, configured to receive configuration information of each reference source delivered by the main control module, and a reference source internal processing policy of each reference source;
参考源状态检测单元, 用于利用所述参考源内部处理策略, 以及参考 源与本地时钟同步运算的结果, 判断当前参考源的状态是否正常;  a reference source state detecting unit, configured to use the reference source internal processing strategy, and the result of the reference source and the local clock synchronization operation to determine whether the current reference source state is normal;
时钟控制参数计算单元, 用于计算出用于对本地时钟同步调整的时钟 控制参数;  a clock control parameter calculation unit, configured to calculate a clock control parameter used for synchronous adjustment of the local clock;
状态跃迁处理单元, 用于在本地时钟与参考源同步过程中, 对本地时 钟的状态跃迁进行控制。  The state transition processing unit is configured to control the state transition of the local clock during the synchronization of the local clock with the reference source.
10、 根据权利要求 8所述的装置, 其中, 所述硬件模块包括: 时钟电路, 用于产生所述本地时钟;  The device of claim 8, wherein the hardware module comprises: a clock circuit, configured to generate the local clock;
参考源选择单元, 用于从多个参考源中选择出有效的参考源; 逻辑处理运算单元, 用于根据各个参考源的输入信息、 本地时钟的输 入信息以及参考源的配置信息, 计算出各个参考源运算的相关信息, 供所 述时钟模块后续调用。 a reference source selection unit for selecting a valid reference source from a plurality of reference sources; a logic processing operation unit for inputting information according to each reference source and a local clock The information of the input and the configuration information of the reference source are used to calculate related information of each reference source operation for subsequent call by the clock module.
11、 根据权利要求 8至 10任一项所述的装置, 其中, 所述主控模块, 还用于当所述第一参考源发生异常时, 根据各个参考源之间的切换策略, 激活所述多个参考源中的第二参考源, 并去激活所述第一参考源;  The device according to any one of claims 8 to 10, wherein the main control module is further configured to activate, according to a switching policy between each reference source, when an abnormality occurs in the first reference source Deriving a second reference source of the plurality of reference sources and deactivating the first reference source;
所述时钟模块, 还用于根据所述第一时钟控制参数, 利用所述第二参 考源计算出第二时钟控制参数; 所述第二时钟控制参数用于对本地时钟进 行同步调整;  The clock module is further configured to calculate a second clock control parameter by using the second reference source according to the first clock control parameter; the second clock control parameter is used for synchronously adjusting a local clock;
所述执行模块, 还用于根据所述第二时钟控制参数对所述本地时钟进 行步进调整, 使所述本地时钟与所述第二参考源同步。  The execution module is further configured to perform step adjustment on the local clock according to the second clock control parameter, so that the local clock is synchronized with the second reference source.
12、 根据权利要求 11所述的装置, 其中, 该装置还包括:  12. The device according to claim 11, wherein the device further comprises:
采集模块, 用于采集参考源的状态信息, 并将采集得到的状态信息反 馈给所述主控模块。  The acquiring module is configured to collect state information of the reference source, and feed the collected state information to the main control module.
13、 根据权利要求 11所述的装置, 其中, 该装置还包括:  13. The device according to claim 11, wherein the device further comprises:
配置模块, 用于预先设置所述多个参考源中各个参考源之间的切换策 略, 以及用于预先设置所述多个参考源中每个参考源的参考源内部处理策 略, 并将所述参考源之间的切换策略和所述参考源内部处理策略下发给所 述主控模块。  a configuration module, configured to pre-set a switching policy between each of the plurality of reference sources, and a reference source internal processing policy for pre-setting each of the plurality of reference sources, and The switching policy between the reference sources and the internal processing policy of the reference source are sent to the main control module.
14、 根据权利要求 8至 10任一项所述的装置, 其中, 该装置设置于基 站中。  14. Apparatus according to any one of claims 8 to 10, wherein the apparatus is arranged in a base station.
PCT/CN2011/077687 2010-08-02 2011-07-27 Clock control method, device and base station for input having multiple reference sources WO2012016496A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010243407.9A CN102348275B (en) 2010-08-02 2010-08-02 Clock control method of multi-reference source input, device and base station
CN201010243407.9 2010-08-02

Publications (1)

Publication Number Publication Date
WO2012016496A1 true WO2012016496A1 (en) 2012-02-09

Family

ID=45546453

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077687 WO2012016496A1 (en) 2010-08-02 2011-07-27 Clock control method, device and base station for input having multiple reference sources

Country Status (2)

Country Link
CN (1) CN102348275B (en)
WO (1) WO2012016496A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657816A (en) * 2016-03-30 2016-06-08 京信通信技术(广州)有限公司 Method and device for keeping base stations synchronous
GB2551328A (en) * 2016-06-10 2017-12-20 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
GB2551327A (en) * 2016-06-10 2017-12-20 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
WO2021136149A1 (en) * 2019-12-31 2021-07-08 京信网络系统股份有限公司 Clock synchronization method and apparatus, computer device, and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248445B (en) * 2012-02-09 2018-01-05 中兴通讯股份有限公司 A kind of clock synchronizing method and device
CN102694616B (en) * 2012-06-11 2014-11-26 福建星网锐捷网络有限公司 Clock detection circuit, clock circuit and clock exception detection method
CN103684733B (en) * 2013-09-28 2017-01-25 国家电网公司 Automatic verification method and special-purpose equipment for clock synchronization
CN106707736A (en) * 2015-11-17 2017-05-24 惠州市德赛西威汽车电子股份有限公司 Automobile instrument clock precision measuring method and automobile instrument clock precision measuring device
CN105912430B (en) * 2016-04-08 2018-06-01 广州北极瑞光电子科技有限公司 A kind of taming clock system with backup
CN109147083B (en) * 2017-06-28 2021-08-06 北京嘀嘀无限科技发展有限公司 Exception recovery method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030076851A1 (en) * 1998-09-24 2003-04-24 Sanjeev A. Mahajan Method and apparatus for switching a clock source from among multiple t1/e1 lines with user defined priority
CN101079630A (en) * 2006-05-23 2007-11-28 中兴通讯股份有限公司 A digital phase lock loop device for smooth switching of clock phase and its method
CN101447828A (en) * 2008-12-16 2009-06-03 北京华环电子股份有限公司 Multi-service access SDH optical transmission device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030076851A1 (en) * 1998-09-24 2003-04-24 Sanjeev A. Mahajan Method and apparatus for switching a clock source from among multiple t1/e1 lines with user defined priority
CN101079630A (en) * 2006-05-23 2007-11-28 中兴通讯股份有限公司 A digital phase lock loop device for smooth switching of clock phase and its method
CN101447828A (en) * 2008-12-16 2009-06-03 北京华环电子股份有限公司 Multi-service access SDH optical transmission device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657816A (en) * 2016-03-30 2016-06-08 京信通信技术(广州)有限公司 Method and device for keeping base stations synchronous
CN105657816B (en) * 2016-03-30 2019-03-19 京信通信系统(中国)有限公司 Maintain the method and apparatus of synchronization among base stations
GB2551328A (en) * 2016-06-10 2017-12-20 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
GB2551327A (en) * 2016-06-10 2017-12-20 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
GB2551328B (en) * 2016-06-10 2020-02-19 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
GB2551327B (en) * 2016-06-10 2020-02-19 Bluwireless Tech Ltd Clock synchronisation in wireless mesh communications networks
WO2021136149A1 (en) * 2019-12-31 2021-07-08 京信网络系统股份有限公司 Clock synchronization method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN102348275A (en) 2012-02-08
CN102348275B (en) 2014-12-10

Similar Documents

Publication Publication Date Title
WO2012016496A1 (en) Clock control method, device and base station for input having multiple reference sources
US8611906B2 (en) Mobile communications system, general base station apparatus, base station apparatus, and base station status control method
US9106352B2 (en) Frequency distribution using precision time protocol
KR102440533B1 (en) Beam failure detection method, information configuration method, terminal and network device
CN103001720A (en) Time synchronization method and device
WO2006047946A1 (en) Method for determining clock trace path and method of clock trace in the network
CN1643955B (en) Timing transitions between wireless communication systems
CN111818614B (en) UWB-based dynamic distributed ad hoc network scheduling method and system
KR20060135779A (en) Wireless multimode communication device using a single clock signal and method of operating the same
CN102291232A (en) Clock synchronization method and device
CN105281884B (en) A kind of node time synchronous method in network without center
CN103036690A (en) Wireless conference system
WO2015100962A1 (en) Method and device for implementing self-healing of base station device
CN102075317B (en) Reliable time frequency synchronization method and system in home base station system
CN104427607A (en) Method for time synchronization between nodes in self-organizing network
WO2013163803A1 (en) Intelligent supervision for configuration of precision time protocol (ptp) entities
AU2019295486B2 (en) Coordinating communications between nodes having asynchronous time slot schedules
WO2013097199A1 (en) Method and device for switching clocks, and distributed indoor system using repeater as relay
CN104253665A (en) Synchronizing equipment and synchronizing system with same
JP2006211016A (en) Mobile communication system
WO2012159570A1 (en) Link switchover method and apparatus
JPH10304437A (en) Radio block synchronization monitor system and radio base station system adopting the monitor system
WO2012152124A1 (en) Externally connected temporal port changeover method and device
CN102201910A (en) Method for adjusting frequency based on IEEE1588 (institute of electrical and electronic engineers) protocol and network device
CN102904661B (en) PTP equipment realizes the method and PTP equipment of smooth restarting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11814079

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11814079

Country of ref document: EP

Kind code of ref document: A1