WO2013040909A1 - 时钟倒换方法和装置 - Google Patents

时钟倒换方法和装置 Download PDF

Info

Publication number
WO2013040909A1
WO2013040909A1 PCT/CN2012/076351 CN2012076351W WO2013040909A1 WO 2013040909 A1 WO2013040909 A1 WO 2013040909A1 CN 2012076351 W CN2012076351 W CN 2012076351W WO 2013040909 A1 WO2013040909 A1 WO 2013040909A1
Authority
WO
WIPO (PCT)
Prior art keywords
system clock
main system
clock
service board
interrupted
Prior art date
Application number
PCT/CN2012/076351
Other languages
English (en)
French (fr)
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 WO2013040909A1 publication Critical patent/WO2013040909A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0685Clock or time synchronisation in a node; Intranode synchronisation
    • H04J3/0688Change of the master or reference, e.g. take-over or failure of the master

Definitions

  • the present invention relates to the field of communications, and in particular to a clock switching method and apparatus.
  • the active/standby protection mode is mostly adopted, that is, when the primary device is abnormal, the system automatically switches to the standby device to implement the function of the active/standby switchover, thereby reducing the The service damage caused by the failure of the main equipment improves the reliability of the communication equipment.
  • the active/standby clock switching is one of its important functions. As shown in FIG. 1 , the primary device and the standby device simultaneously provide the clock to the service board 100 through the system clock unit 102.
  • the service board 100 selects the main system clock provided by the active device currently in the active state through the clock selection unit 104. In this way, the main system clock and the standby system clock are generated and used by all service boards on the communication device.
  • the primary device in the active state fails, the system is switched to the standby device.
  • the standby device is in the active state and the clock used by the service card is switched to the standby device in the active state.
  • the active/standby switchover is implemented.
  • the clock signal received on the service board may be interrupted due to reasons such as plugging and unplugging the card. That is, the service board cannot receive the service.
  • the primary system clock provided by the primary device in the primary state.
  • the current protocol does not specify the operation of the service board in this scenario.
  • the service board does not receive the clock switching command, and thus cannot perform the clock switching operation.
  • the service board may be affected by the clock interruption, causing service interruption or abnormal board operation.
  • a clock switching method including: detecting whether an interrupt of a main system clock received by a service board is interrupted; and if a main system clock received by a service board is interrupted, the main system clock is Switch to the standby system clock; transfer the standby system clock to the service board.
  • the step of detecting whether the main system clock received by the service board is interrupted comprises: determining that the main system clock received by the service board is interrupted after detecting that the service board does not receive the main system clock.
  • the step of detecting whether the main system clock received by the service board is interrupted comprises: if it is detected that the service board does not receive the main system clock in the predetermined time period, determining the main received by the service board The system clock has been interrupted.
  • the step of detecting whether the main system clock received by the service board is interrupted includes: if it is detected that the service board does not receive the main system clock, the timer is started; determining whether the timer is detected during the timing period of the timer The service board does not receive the main system clock. If the service board receives the main system clock during the timer period, it determines that the main system clock received by the service board is not interrupted.
  • the entity providing the primary system clock is functioning properly.
  • the step of detecting whether the main system clock received by the service board is interrupted comprises: using a high frequency clock with a frequency higher than the main system clock to detect whether the main system clock received by the service board is interrupted.
  • a clock switching apparatus including: a clock detecting unit configured to detect whether an interruption of a main system clock received by a service board occurs; and a control unit configured to receive on a service board When the main system clock is interrupted, the main system clock is switched to the standby system clock, and the standby system clock is transmitted to the service board.
  • the clock detecting unit comprises: a first detecting module, configured to determine that the main system clock received by the service board is interrupted when it is detected that the service board does not receive the main system clock.
  • the clock detecting unit comprises: a second detecting module, configured to determine that the main system clock received by the service board is interrupted when the service board does not receive the main system clock in a predetermined period of time.
  • the clock switching device further comprises: a system clock unit in a normal working state, configured to provide a main system clock and a standby system clock.
  • the clock detecting unit comprises: a high frequency clock circuit configured to generate a clock having a higher frequency than the main system clock; and a detecting circuit configured to use the clock generated by the high frequency clock circuit to detect whether the main system clock received by the service board is An interruption occurred.
  • the invention realizes the switching of the clocks of the active and standby systems when the clock of the main system received by the service board is interrupted, which solves the problem that the clock switching of the active and standby systems cannot be realized in the prior art when the clock signal is interrupted. This improves the reliability of the device operation due to service interruption or abnormal board operation caused by abnormal clocks in the active and standby systems.
  • FIG. 1 is a structural block diagram of a clock switching system in the prior art
  • FIG. 2 is a block diagram showing a preferred structure of a clock switching device according to an embodiment of the present invention
  • FIG. 3 is a clock according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing a preferred structure of a clock detecting unit according to an embodiment of the present invention
  • FIG. 5 is a preferred flowchart of a clock switching method according to an embodiment of the present invention
  • FIG. 6 is another preferred flowchart of a clock switching method according to an embodiment of the present invention
  • FIG. 7 is still another preferred flowchart of a clock switching method according to an embodiment of the present invention.
  • the clock switching apparatus includes: a clock detecting unit 202 configured to detect a main received by a service board. Whether the system clock is interrupted; the control unit 204 is connected to the clock detecting unit 202, and is configured to switch the main system clock to the standby system clock when the main system clock received by the service board is interrupted, and transmit the standby system clock to Business board.
  • the main system clock received by the service board is interrupted, the clock of the active and standby systems is switched, which solves the problem that the active and standby systems cannot be implemented in the prior art when the clock signal is interrupted.
  • the problem of clock switching which avoids service interruption or abnormal board operation caused by abnormal clocks of the active and standby systems, and improves the reliability of equipment operation.
  • the present invention provides a preferred clock detection unit 202 that detects a service order using a high frequency clock having a higher frequency than the main system clock. Whether the main system clock received by the board is interrupted.
  • the clock detecting unit 202 may include: a high frequency clock circuit 402 configured to generate a clock having a higher frequency than the main system clock; and a detecting circuit 404 configured to use the high frequency clock The clock generated by the circuit detects whether the main system clock received by the service board is interrupted.
  • the high-frequency clock having a higher frequency than the main system clock Since the high-frequency clock having a higher frequency than the main system clock is used, it is possible to accurately determine whether the main system clock received by the service board is interrupted on each clock cycle of the main system clock by the high-frequency clock, thereby ensuring that the main system clock is interrupted. Interrupt detection accuracy. Further, since a high frequency clock having a higher frequency than the main system clock is used, the detection frequency can be set according to actual needs. For example, the high frequency clock is twice the frequency of the main system clock, assuming that each clock cycle of the main system clock is used.
  • the high frequency clock is sampled twice, so that when the values sampled by the clock cycles of two consecutive high frequency clocks are 0 and 1 (or 1 and 0), respectively, the main system clock reception is judged to be normal, otherwise the main system clock reception is interrupted. . Assume that each clock cycle of the main system clock is sampled four times using the high frequency clock, so that when the values of the consecutive four high frequency clocks are sampled at 0011 (or 1100, 1001, 0110), the main system clock is judged. The reception is normal, otherwise it is judged that the main system clock reception is interrupted. It can be seen that the detection can be applied to different field teeth by using a high frequency clock having a frequency higher than the main system clock.
  • the present invention improves the detection circuit 404 and provides two detection methods.
  • the detecting circuit 404 includes: a first detecting module 4041, configured to: when it is detected that the service board does not receive the main system clock, determine that the main system clock received by the service board is interrupted; and
  • the second detecting module 4042 is configured to determine that the main system clock received by the service board is interrupted when the service board does not receive the main system clock in a predetermined period of time.
  • the requirements of different service boards can be met by different detection modes.
  • the second detecting module 4042 detects whether the main system clock received on the service board is interrupted by the following steps: if it is detected that the service board does not receive the main system clock, the timer is started; Whether the service board does not receive the main system clock in the timing period of the timer; if the service board receives the main system clock in the timing period of the timer, It is determined that the main system clock received by the service board is not interrupted.
  • the clock switching apparatus shown in FIG. 2 further includes: a system clock unit (such as the system clock unit 302 shown in FIG. 3) in a normal working state, configured to The primary system clock and the standby system clock are provided.
  • FIG. 3 is a block diagram of another preferred structure of a clock processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the following unit is included; a system clock unit 302 is configured to provide a service board with a primary device and a standby device.
  • the two system clocks provided by the device implement control management of the service board;
  • the clock selection unit 304 is configured to select one system from the two system clocks provided by the system clock unit 302.
  • the clock is provided to the service board.
  • the clock detection unit 306 is configured to detect whether the main system clock received by the service board is interrupted. The method for detecting the method may be the method described in the foregoing embodiment, and details are not described herein.
  • the processing unit 308 is configured to complete the processing and sending and receiving of the service on the service board.
  • the control unit 310 is configured to switch the main system clock to the standby system clock when the main system clock received by the service board is interrupted, and prepare The system clock is transmitted to the service board; the inter-board communication unit 312 is configured to implement the system board to the service board. Is a service board of the system clock unit 302 of the communication unit.
  • Embodiment 2 Based on the clock switching device shown in FIG. 2 to FIG. 4, the present invention also provides a preferred clock switching method. As shown in FIG. 5, the method includes the following steps:
  • S502 Detect whether an interrupt of the main system clock received by the service board is interrupted.
  • the standby system clock is transmitted to the service board.
  • the clock of the active and standby systems is switched, which solves the problem that the clock of the active and standby systems cannot be realized in the prior art when the clock signal is interrupted.
  • the problem of switching which avoids service interruption or abnormal board operation caused by abnormal clocks of the active and standby systems, and improves the reliability of equipment operation.
  • the present invention provides a preferred detection step, that is, the step of detecting whether the main system clock received by the service board is interrupted includes: The high-frequency clock of the system clock is used to detect whether the main system clock received by the service board is interrupted.
  • the high-frequency clock having a higher frequency than the main system clock Since the high-frequency clock having a higher frequency than the main system clock is used, it is possible to accurately determine whether the main system clock received by the service board is interrupted on each clock cycle of the main system clock by the high-frequency clock, thereby ensuring that the main system clock is interrupted. Interrupt detection accuracy. Further, since a high frequency clock having a higher frequency than the main system clock is used, the detection frequency can be set according to actual needs. For example, the high frequency clock is twice the frequency of the main system clock, assuming that each clock cycle of the main system clock is used.
  • the high frequency clock is sampled twice, so that when the values sampled by the clock cycles of two consecutive high frequency clocks are 0 and 1 (or 1 and 0), respectively, the main system clock reception is judged to be normal, otherwise the main system clock reception is interrupted. .
  • each clock cycle of the main system clock is sampled four times using a high frequency clock, so that when the values of the clock cycles of four consecutive high frequency clocks are respectively 0011 (or 1100, 1001, 0110), the main system clock is judged.
  • the reception is normal, otherwise it is judged that the main system clock reception is interrupted.
  • the detection can be applied to different field teeth by using a high frequency clock having a frequency higher than the main system clock.
  • the present invention further improves the detection step, and provides the following two detection methods to meet the requirements of different service boards:
  • the clock switching method includes the following steps: S602: The system clock unit works normally, and provides the service board with two system clocks provided by the primary device and the standby device (that is, the primary system clock). And standby system clock);
  • the clock detection unit detects a main system clock received by the service board.
  • the clock detecting unit determines whether the main system clock received by the service board is interrupted. If the interrupt occurs, the process goes to step S608. Otherwise, the process goes to step S604 to continue the detection.
  • the detection method in the above embodiment can be used. Determine whether the main system clock received by the service board is interrupted.
  • the clock detecting unit detects that the main system clock is not received, and determines that the main system clock is interrupted, and records the corresponding record value;
  • S610 The control unit detects the recorded value recorded in the clock detecting unit;
  • S612 The control unit determines whether the record value is detected; if the record value is detected, the process goes to step S614, otherwise the process goes to step S610 to perform the test;
  • the control clock selection unit switches the main system clock to the standby system clock, and clears the record value.
  • the clock detecting unit determines that the main system clock is interrupted when the service board is not received and sent to the main system clock, detects the interruption of the main system clock in time, and automatically switches the main system clock in real time.
  • the service board is not able to receive the clock of the main system.
  • the service is damaged or the board is abnormal due to abnormal clock signals.
  • the clock detecting unit starts counting, and the counting reaches the set value and records once, ensuring that the main system clock is interrupted accurately, and is convenient to control.
  • the unit system detects to avoid the system switching the system clock blindly and frequently.
  • the clock switching method includes the following steps:
  • the system clock unit works normally, and provides the service board with two system clocks provided by the primary device and the standby device (that is, the primary system clock and the standby system clock);
  • the clock detection unit detects a main system clock received by the service board.
  • the clock detecting unit determines whether the main system clock received by the service board is interrupted. If an interrupt occurs, the process goes to step S708. Otherwise, the process goes to step S704 to continue the detection.
  • the clock detecting unit mentioned here determines whether the service is serviced.
  • the process of interrupting the main system clock received by the board refers to: Whether the clock detecting unit detects that the service board is not received and sent to the main system clock in a predetermined period of time; Preferably, the detection in the above embodiment can be performed. The method is used to determine whether the main system clock received by the service board is interrupted, and details are not described herein.
  • the clock detecting unit determines that the service board does not receive the clock sent to the main system (that is, determines that the main system clock is interrupted), and records the corresponding record value in a predetermined period of time;
  • S710 The control unit detects the record value of the clock detection unit; S712: the control unit determines whether the record value is detected; if the record value is detected, the process goes to step S714, otherwise, the process goes to step S710.
  • the initial clock detecting unit detects that the service board does not receive the main system clock, and keeps detecting until the service board does not receive the main system clock after the 3-5 microseconds are maintained.
  • the main system clock is interrupted, so that it continuously detects whether the service board receives the main system clock within the allowed time period, and ensures that the main system clock is interrupted to make an accurate judgment, so as to avoid blindly and frequently switching the main system. clock.
  • the above 3-5 microseconds in the step S706 is only a preferred embodiment, and the present invention is not limited thereto.
  • the step of detecting whether the main system clock received by the service board is interrupted includes: if it is detected that the service board does not receive the main system clock, the timer is started; determining whether the timer is detected during the timing period of the timer The service board does not receive the main system clock. If the service board receives the main system clock during the timer period, it determines that the main system clock received by the service board is not interrupted. In this way, it is ensured that the main system clock is interrupted accurately and is easily detected by the control unit system to prevent the system from switching the system clock blindly and frequently.
  • the entity providing the main system clock in each of the above preferred embodiments works normally.
  • the clock switching method in the preferred embodiment may be adapted to provide a normal working state of the main system clock, and the service order, by defining a state of the entity providing the main system clock.
  • the scene where the main system clock received by the board is interrupted.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.

Landscapes

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

Abstract

本发明提供一种时钟倒换方法和装置,其中,该方法包括:检测业务单板接收到的主系统时钟是否出现中断;若业务单板接收到的主系统时钟出现中断,则将主系统时钟倒换到备系统时钟;将备系统时钟传输给业务单板。本发明解决了现有技术中在出现时钟信号中断的情况下无法实现主备系统时钟倒换的问题,从而避免了由于主备系统时钟异常导致的业务中断或单板运行异常,提高设备运行的可靠性。

Description

时钟倒换方法和装置 技术领域 本发明涉及通讯领域, 具体而言, 涉及一种时钟倒换方法和装置。 背景技术 目前, 通讯领域为了提高通讯设备的运行可靠性能, 大多采用主备保护方式, 即, 当主用设备出现异常时系统会自动倒换到备用设备上, 实现主备倒换的功能, 从而降 低了由于主用设备出现故障导致的业务损伤, 提高了通讯设备的可靠性。 对于具有主备保护功能的通讯设备来说, 主备时钟倒换又是其重要的功能之一, 如图 1所示,主用设备和备用设备同时通过系统时钟单元 102提供时钟给业务单板 100 使用, 业务单板 100通过时钟选择单元 104选择使用当前处于主用状态的主用设备提 供的主系统时钟。 通过这种方式, 主系统时钟和备系统时钟产生后被提供给通讯设备 上所有的业务单板使用。 当处于主用状态的主用设备发生故障时, 系统会倒换到备用 设备上, 此时备用设备处于主用状态, 同时业务单板使用的时钟也会倒换到处于主用 状态的备用设备上, 从而实现主备倒换。 然而, 当处于主用状态的主用设备处于正常工作状态下, 可能会由于诸如插拔单 板等原因而导致业务单板上接收的时钟信号出现中断, 也就是说, 业务单板无法接收 到由处于主用状态的主用设备提供的主系统时钟。 但是, 目前的协议对这种场景下业 务单板所执行的操作没有进行规定, 例如, 在这种场景下业务单板并不会收到时钟倒 换命令, 从而无法执行时钟倒换操作, 在这种情况下, 业务单板就有可能受到时钟中 断的影响, 造成业务中断或者单板运行异常等情况的发生。 发明内容 本发明提供了一种时钟倒换方法和装置, 以至少解决现有技术中在出现时钟信号 中断的情况下无法实现主备系统时钟倒换的问题。 根据本发明的一个方面, 提供了一种时钟倒换方法, 其包括: 检测业务单板接收 到的主系统时钟是否出现中断; 若业务单板接收到的主系统时钟出现中断, 则将主系 统时钟倒换到备系统时钟; 将备系统时钟传输给业务单板。 优选的, 检测业务单板上接收到的主系统时钟是否出现中断的步骤包括: 一旦检 测到业务单板没有接收到主系统时钟,则判断业务单板接收到的主系统时钟出现中断。 优选的, 检测业务单板上接收到的主系统时钟是否出现中断的步骤包括: 若在预 定的时间段上均检测到业务单板没有接收到主系统时钟, 则判断业务单板接收到的主 系统时钟出现中断。 优选的, 检测业务单板上接收到的主系统时钟是否出现中断的步骤包括: 若检测 到业务单板没有接收到主系统时钟, 则开启定时器; 判断在定时器的定时周期内是否 均检测到业务单板没有接收到主系统时钟; 若在定时器的定时周期内检测到业务单板 接收到主系统时钟, 则判断业务单板接收到的主系统时钟没有出现中断。 优选的, 提供主系统时钟的实体工作正常。 优选的, 检测业务单板接收到的主系统时钟是否出现中断的步骤包括: 使用频率 高于主系统时钟的高频时钟来检测业务单板接收到的主系统时钟是否出现中断。 根据本发明的另一方面, 提供了一种时钟倒换装置, 其包括: 时钟检测单元, 设 置为检测业务单板接收到的主系统时钟是否出现中断; 控制单元, 设置为在业务单板 接收到的主系统时钟出现中断时, 将主系统时钟倒换到备系统时钟, 并将备系统时钟 传输给业务单板。 优选的, 时钟检测单元包括: 第一检测模块, 设置为在一旦检测到业务单板没有 接收到主系统时钟时, 判断业务单板接收到的主系统时钟出现中断。 优选的, 时钟检测单元包括: 第二检测模块, 设置为在预定的时间段上均检测到 业务单板没有接收到主系统时钟时, 判断业务单板接收到的主系统时钟出现中断。 优选的, 时钟倒换装置还包括: 处于正常工作状态下的系统时钟单元, 设置为提 供主系统时钟和备系统时钟。 优选的, 时钟检测单元包括: 高频时钟电路, 设置为产生频率高于主系统时钟的 时钟; 检测电路, 设置为使用高频时钟电路产生的时钟来检测业务单板接收到的主系 统时钟是否出现中断。 本发明在业务单板接收到的主系统时钟出现中断时实现了主备系统时钟的倒换, 解决了现有技术中在出现时钟信号中断的情况下无法实现主备系统时钟倒换的问题, 从而避免了由于主备系统时钟异常导致的业务中断或单板运行异常, 提高设备运行的 可靠性。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1 是现有技术中的时钟倒换系统的结构框图; 图 2 是根据本发明实施例的时钟倒换装置的一种优选的结构框图; 图 3 是根据本发明实施例的时钟倒换装置的另一种优选的结构框图; 图 4 是根据本发明实施例的时钟检测单元的一种优选的结构框图; 图 5 是根据本发明实施例的时钟倒换方法的一种优选的流程图; 图 6 是根据本发明实施例的时钟倒换方法的另一种优选的流程图; 以及 图 7 是根据本发明实施例的时钟倒换方法的又一种优选的流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 实施例 1 图 2 是根据本发明实施例的时钟倒换装置的一种优选的结构框图, 如图 2所示, 该时钟倒换装置包括: 时钟检测单元 202, 设置为检测业务单板接收到的主系统时钟 是否出现中断; 控制单元 204, 与时钟检测单元 202连接, 设置为在业务单板接收到 的主系统时钟出现中断时, 将主系统时钟倒换到备系统时钟, 并将备系统时钟传输给 业务单板。 在上述优选的实施例中, 在业务单板接收到的主系统时钟出现中断时实现了主备 系统时钟的倒换, 解决了现有技术中在出现时钟信号中断的情况下无法实现主备系统 时钟倒换的问题,从而避免了由于主备系统时钟异常导致的业务中断或单板运行异常, 提高设备运行的可靠性。 为了检测业务单板接收到的主系统时钟是否出现中断, 本发明提供了一种优选的 时钟检测单元 202, 该优选的时钟检测单元 202使用频率高于主系统时钟的高频时钟 来检测业务单板接收到的主系统时钟是否出现中断。如图 4所示, 为了实现上述目的, 时钟检测单元 202可以包括: 高频时钟电路 402, 设置为产生频率高于所述主系统时 钟的时钟; 检测电路 404, 设置为使用所述高频时钟电路产生的时钟来检测业务单板 接收到的主系统时钟是否出现中断。 由于使用了频率高于主系统时钟的高频时钟, 因此, 可以通过高频时钟准确地在 主系统时钟的每个时钟周期上判断业务单板接收到的主系统时钟是否出现中断, 从而 保证了中断检测的准确性。 进一步, 由于使用了频率高于主系统时钟的高频时钟, 可 以根据实际需求来设置检测频率, 例如, 高频时钟为主系统时钟的频率的两倍, 假设 主系统时钟的每个时钟周期使用高频时钟采样两次, 从而当连续两个高频时钟的时钟 周期采样到的值分别为 0和 1 (或者 1和 0 )时, 判断主系统时钟接收正常, 否则判断 主系统时钟接收出现中断。 假设主系统时钟的每个时钟周期使用高频时钟采样四次, 从而当连续四个高频时钟的时钟周期采样到的值分别为 0011 (或者为 1100、 1001、 0110 ) 时, 判断主系统时钟接收正常, 否则判断主系统时钟接收出现中断。 可见, 通 过使用频率高于主系统时钟的高频时钟来进行检测可以使得本发明适用于不同的场 牙、。 在上述实施例的基础上, 本发明对检测电路 404进行了改进, 还提供了两种检测 方式。 如图 4所示, 检测电路 404包括: 第一检测模块 4041, 设置为在一旦检测到所 述业务单板没有接收到主系统时钟时, 判断业务单板接收到的主系统时钟出现中断; 和 /或第二检测模块 4042,设置为在预定的时间段上均检测到所述业务单板没有接收到 所述主系统时钟时, 判断所述业务单板接收到的所述主系统时钟出现中断。 在本实施 例中, 通过不同的检测方式, 可以满足不同业务单板的需求。 优选的,第二检测模块 4042通过以下步骤检测业务单板上接收到的主系统时钟是 否出现中断: 若检测到所述业务单板没有接收到所述主系统时钟, 则开启定时器; 判 断在所述定时器的定时周期内是否均检测到所述业务单板没有接收到所述主系统时 钟; 若在所述定时器的定时周期内检测到所述业务单板接收到主系统时钟, 则判断所 述业务单板接收到的主系统时钟没有出现中断。 优选的,在本发明各个优选实施例的基础上,如图 2所示的时钟倒换装置还包括: 处于正常工作状态下的系统时钟单元(如图 3所示的系统时钟单元 302), 设置为提供 所述主系统时钟和所述备系统时钟。 在本优选的实施例中, 通过限定系统时钟单元的 状态,使得本优选的实施例中的时钟倒换装置可以适用于系统时钟单元工作状态正常、 且业务单板接收到的主系统时钟出现中断的场景。 作为一种可选择的方案, 也可以由两个系统时钟单元来分别提供主系统时钟和所 述备系统时钟, 本发明不仅限于此。 图 3 是根据本发明实施例的时钟的处理装置的另一种优选的结构框图, 如图 3所 示, 包括以下单元; 系统时钟单元 302, 设置为为业务单板提供由主用设备和备用设 备提供的两路系统时钟(即,主系统时钟和备系统时钟),实现对业务单板的控制管理; 时钟选择单元 304, 设置为从系统时钟单元 302提供的两路系统时钟中选择一路系统 时钟提供给业务单板使用; 时钟检测单元 306, 设置为检测业务单板接收到的主系统 时钟是否出现中断, 这里检测的方法可以采用上述实施例所描述的方法, 在此不再赘 述; 业务处理单元 308, 设置为完成业务单板上业务的处理和收发; 控制单元 310, 设置为在业务单板接收到的主系统时钟出现中断时,将主系统时钟倒换到备系统时钟, 并将备系统时钟传输给业务单板; 板间通讯单元 312, 设置为实现系统板对业务板的 管理, 是业务单板与系统时钟单元 302的通讯单元。 实施例 2 在图 2-图 4所示的时钟倒换装置的基础上, 本发明还提出了一种优选的时钟倒换 方法, 如图 5示出, 其包括如下步骤:
S502: 检测业务单板接收到的主系统时钟是否出现中断;
S504: 若业务单板接收到的主系统时钟出现中断, 则将主系统时钟倒换到备系统 时钟;
S506: 将备系统时钟传输给业务单板。 在上述优选的实施例中, 在业务单板接收到的主系统时钟出现中断时实现了主备 系统时钟的倒换, 解决了现有技术中在出现时钟信号中断的情况下无法实现主备系统 时钟倒换的问题,从而避免了由于主备系统时钟异常导致的业务中断或单板运行异常, 提高设备运行的可靠性。 为了检测业务单板接收到的主系统时钟是否出现中断, 本发明提供了一种优选的 检测步骤, 即, 检测业务单板接收到的主系统时钟是否出现中断的步骤包括: 使用频 率高于主系统时钟的高频时钟来检测业务单板接收到的主系统时钟是否出现中断。 由于使用了频率高于主系统时钟的高频时钟, 因此, 可以通过高频时钟准确地在 主系统时钟的每个时钟周期上判断业务单板接收到的主系统时钟是否出现中断, 从而 保证了中断检测的准确性。 进一步, 由于使用了频率高于主系统时钟的高频时钟, 可 以根据实际需求来设置检测频率, 例如, 高频时钟为主系统时钟的频率的两倍, 假设 主系统时钟的每个时钟周期使用高频时钟采样两次, 从而当连续两个高频时钟的时钟 周期采样到的值分别为 0和 1 (或者 1和 0)时, 判断主系统时钟接收正常, 否则判断 主系统时钟接收出现中断。 假设主系统时钟的每个时钟周期使用高频时钟采样四次, 从而当连续四个高频时钟的时钟周期采样到的值分别为 0011 (或者为 1100、 1001、 0110) 时, 判断主系统时钟接收正常, 否则判断主系统时钟接收出现中断。 可见, 通 过使用频率高于主系统时钟的高频时钟来进行检测可以使得本发明适用于不同的场 牙、。 在上述实施例的基础上, 本发明对检测步骤进行了进一步改进, 还提供了以下两 种检测方式, 以便满足不同业务单板的需求:
1 )一旦检测到所述业务单板没有接收到主系统时钟, 则判断业务单板接收到的主 系统时钟出现中断。 为了实现上述检测方式, 如图 6所示, 时钟倒换方法包括如下步骤: S602: 系统时钟单元正常工作, 为业务单板提供主用设备和备用设备提供的两路 系统时钟 (即, 主系统时钟和备系统时钟);
S604: 时钟检测单元检测业务单板接收到的主系统时钟;
S606: 时钟检测单元判断是否业务单板接收的主系统时钟出现中断;若出现中断, 则转至步骤 S608, 否则, 转至步骤 S604继续检测; 优选的, 可以通过上述实施例中 的检测方法来判断是否业务单板接收的主系统时钟出现中断, 在此不再赘述;
S608: 时钟检测单元一旦检测到业务单板没有接收发到主系统时钟, 则判断主系 统时钟出现中断, 并记录相应的记录值;
S610: 控制单元检测时钟检测单元中记录的记录值; S612: 控制单元判断是否检测到记录值; 若检测到记录值, 则转至步骤 S614, 否 则转至步骤 S610进行检测;
S614; 控制时钟选择单元倒换主系统时钟至备系统时钟, 并清零记录值。 在上述优选的实施例中, 时钟检测单元一旦检测到业务单板没有接收发到主系统 时钟则判断主系统时钟出现中断, 及时检测到主系统时钟的中断, 实时倒换主系统时 钟, 最大限度的缩短了业务单板接收不到主系统时钟的时间, 同时, 减少了因主备时 钟信号异常导致的业务损伤或单板运行异常。 优选的, 在上述流程步骤 S608中, 时钟检测单元判断主系统时钟出现中断后, 时 钟检测单元开始计数, 计数达到设定值后记录一次, 确保准确地判断是否主系统时钟 出现中断, 并便于控制单元系统检测, 以避免系统盲目频繁地倒换系统时钟。
2)若在预定的时间段上均检测到所述业务单板没有接收到所述主系统时钟, 则判 断所述业务单板接收到的所述主系统时钟出现中断。 为了实现上述检测方式, 如图 7所示, 时钟倒换方法包括如下步骤:
S702: 系统时钟单元正常工作, 为业务单板提供主用设备和备用设备提供的两路 系统时钟 (即, 主系统时钟和备系统时钟);
S704: 时钟检测单元检测业务单板接收到的主系统时钟;
S706: 时钟检测单元判断是否业务单板接收的主系统时钟出现中断;若出现中断, 则转至步骤 S708, 否则, 转至步骤 S704继续检测; 优选的, 这里提到的时钟检测单 元判断是否业务单板接收的主系统时钟出现中断的过程指的是: 时钟检测单元是否在 预定的时间段上均检测到业务单板没有接收发到主系统时钟; 优选的, 可以通过上述 实施例中的检测方法来判断是否业务单板接收的主系统时钟出现中断,在此不再赘述;
S708: 时钟检测单元判断出在预定的时间段上均检测到业务单板没有接收发到主 系统时钟 (即, 判断出主系统时钟出现中断), 记录相应的记录值;
S710: 控制单元检测时钟检测单元的记录值; S712: 控制单元判断是否检测到记录值; 若检测到记录值, 则转至步骤 S714, 否 则转至步骤 S710进行检测 S714;控制单元检测到记录值后控制时钟选择单元倒换主系统时钟至备系统时钟, 并清零记录值。 在上述优选的步骤 S706中,最初时钟检测单元检测到业务单板没有接收到主系统 时钟, 并一直保持检测, 如保持 3-5微秒钟后仍检测到业务单板没有接收到主系统时 钟, 则判断主系统时钟出现中断, 这样在允许的时间段内持续检测业务单板是否接收 到主系统时钟, 确保对主系统时钟是否出现中断做出准确的判断, 以避免盲目频繁地 倒换主系统时钟。 当然,上述步骤 S706中的 3-5微秒钟只是一种优选的实施例,本发明不仅限于此, 例如, 还可以在秒级或毫秒级的时间段内判断接收到的主系统时钟是否出现中断, 以 便满足不同设备中检测主系统时钟中断的需求。 优选的, 检测业务单板上接收到的主系统时钟是否出现中断的步骤包括: 若检测 到业务单板没有接收到主系统时钟, 则开启定时器; 判断在定时器的定时周期内是否 均检测到业务单板没有接收到主系统时钟; 若在定时器的定时周期内检测到业务单板 接收到主系统时钟, 则判断业务单板接收到的主系统时钟没有出现中断。 这样, 确保 准确地判断是否主系统时钟出现中断, 并便于控制单元系统检测, 以避免系统盲目频 繁地倒换系统时钟。 优选的, 上述各个优选实施例中的提供所述主系统时钟的实体工作正常。 在本优 选的实施例中, 通过限定提供所述主系统时钟的实体的状态, 使得本优选的实施例中 的时钟倒换方法可以适用于提供所述主系统时钟的实体工作状态正常、 且业务单板接 收到的主系统时钟出现中断的场景。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种时钟倒换方法, 包括:
检测业务单板接收到的主系统时钟是否出现中断;
若所述业务单板接收到的所述主系统时钟出现中断, 则将所述主系统时钟 倒换到备系统时钟;
将所述备系统时钟传输给所述业务单板。
2. 根据权利要求 1所述的方法, 其中, 检测业务单板上接收到的主系统时钟是否 出现中断的步骤包括:
一旦检测到所述业务单板没有接收到主系统时钟, 则判断业务单板接收到 的主系统时钟出现中断。
3. 根据权利要求 1所述的方法, 其中, 检测业务单板上接收到的主系统时钟是否 出现中断的步骤包括:
若在预定的时间段上均检测到所述业务单板没有接收到所述主系统时钟, 则判断所述业务单板接收到的所述主系统时钟出现中断。
4. 根据权利要求 1所述的方法, 其中, 检测业务单板上接收到的主系统时钟是否 出现中断的步骤包括:
若检测到所述业务单板没有接收到所述主系统时钟, 则开启定时器; 判断在所述定时器的定时周期内是否均检测到所述业务单板没有接收到所 述主系统时钟;
若在所述定时器的定时周期内检测到所述业务单板接收到主系统时钟, 则 判断所述业务单板接收到的主系统时钟没有出现中断。
5. 根据权利要求 1至 4中任一项所述的方法, 其中, 提供所述主系统时钟的实体 工作正常。
6. 根据权利要求 1至 4中任一项所述的方法, 其中, 检测业务单板接收到的主系 统时钟是否出现中断的步骤包括: 使用频率高于所述主系统时钟的高频时钟来 检测业务单板接收到的主系统时钟是否出现中断。
7. 一种时钟倒换装置, 包括:
时钟检测单元, 设置为检测业务单板接收到的主系统时钟是否出现中断; 控制单元, 设置为在所述业务单板接收到的所述主系统时钟出现中断时, 将所述主系统时钟倒换到备系统时钟, 并将所述备系统时钟传输给所述业务单 板。
8. 根据权利要求 7所述的装置, 其中, 所述时钟检测单元包括: 第一检测模块, 设置为在一旦检测到所述业务单板没有接收到主系统时钟 时, 判断业务单板接收到的主系统时钟出现中断。
9. 根据权利要求 7所述的装置, 其中, 所述时钟检测单元包括: 第二检测模块, 设置为在预定的时间段上均检测到所述业务单板没有接收 到所述主系统时钟时, 判断所述业务单板接收到的所述主系统时钟出现中断。
10. 根据权利要求 7至 9中任一项所述的装置, 其中, 还包括: 处于正常工作状态 下的系统时钟单元, 设置为提供所述主系统时钟和所述备系统时钟。
11. 根据权利要求 7至 9中任一项所述的装置, 其中, 所述时钟检测单元包括: 高频时钟电路, 设置为产生频率高于所述主系统时钟的时钟; 检测电路, 设置为使用所述高频时钟电路产生的时钟来检测业务单板接收 到的主系统时钟是否出现中断。
PCT/CN2012/076351 2011-09-19 2012-05-31 时钟倒换方法和装置 WO2013040909A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110277619.3A CN103001789B (zh) 2011-09-19 2011-09-19 时钟倒换方法和装置
CN201110277619.3 2011-09-19

Publications (1)

Publication Number Publication Date
WO2013040909A1 true WO2013040909A1 (zh) 2013-03-28

Family

ID=47913829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/076351 WO2013040909A1 (zh) 2011-09-19 2012-05-31 时钟倒换方法和装置

Country Status (2)

Country Link
CN (1) CN103001789B (zh)
WO (1) WO2013040909A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106301744B (zh) * 2015-05-14 2020-04-28 中兴通讯股份有限公司 一种时钟板时钟保护倒换的方法及装置
CN110149163B (zh) * 2019-03-22 2021-04-20 珠海高凌信息科技股份有限公司 一种标准数字时钟系统冗余切换的电路

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1484384A (zh) * 2003-06-25 2004-03-24 Ut斯达康(中国)有限公司 平滑的时钟切换方法及时钟系统
US7043655B2 (en) * 2002-11-06 2006-05-09 Sun Microsystems, Inc. Redundant clock synthesizer
CN101840357A (zh) * 2010-04-08 2010-09-22 北京星网锐捷网络技术有限公司 时钟备份方法及时钟备份装置
US7911240B1 (en) * 2007-05-17 2011-03-22 Altera Corporation Clock switch-over circuits and methods

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6194969B1 (en) * 1999-05-19 2001-02-27 Sun Microsystems, Inc. System and method for providing master and slave phase-aligned clocks
CN101170754B (zh) * 2007-11-27 2010-07-14 中兴通讯股份有限公司 一种全球定位系统时钟丢失情况下的单板上电方法
CN101521565A (zh) * 2008-02-26 2009-09-02 华为技术有限公司 主/备系统时钟无缝切换的方法、装置及通信设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7043655B2 (en) * 2002-11-06 2006-05-09 Sun Microsystems, Inc. Redundant clock synthesizer
CN1484384A (zh) * 2003-06-25 2004-03-24 Ut斯达康(中国)有限公司 平滑的时钟切换方法及时钟系统
US7911240B1 (en) * 2007-05-17 2011-03-22 Altera Corporation Clock switch-over circuits and methods
CN101840357A (zh) * 2010-04-08 2010-09-22 北京星网锐捷网络技术有限公司 时钟备份方法及时钟备份装置

Also Published As

Publication number Publication date
CN103001789A (zh) 2013-03-27
CN103001789B (zh) 2017-09-29

Similar Documents

Publication Publication Date Title
CN101345663B (zh) 心跳检测方法和心跳检测设备
US20200151045A1 (en) Method and apparatus for disconnecting link between pcie device and host
US10348616B2 (en) Packet transmission method and apparatus, and interconnect interface
CN102984059B (zh) 千兆以太网冗余网卡及其链路切换条件判定结果控制方法
US9331922B2 (en) Automatic recover after loss of signal event in a network device
CN101119192B (zh) 一种时钟同步方法和系统
US20120023278A1 (en) Expander to control multipaths in a storage network
US10275373B2 (en) Hot swappable device and method
CN108809617B (zh) 一种时延补偿方法及终端
CN103916226A (zh) 基于嵌入式设备冗余备份的方法
US11258666B2 (en) Method, device, and system for implementing MUX machine
WO2020088351A1 (zh) 设备信息发送的方法、计算机设备和分布式计算机设备系统
CN107222256B (zh) 一种基于fpga的srio光纤链路在线重链接的实现方法
WO2013040909A1 (zh) 时钟倒换方法和装置
US10230625B2 (en) Information processing apparatus, information processing system, and communication device
US8917609B2 (en) Line monitoring apparatus and line monitoring method
US5784274A (en) System and method for monitoring errors occurring in data processed by a duplexed communication apparatus
US10891242B2 (en) Embedded USB2 (eUSB2) repeater operation
CN114095462A (zh) 一种雷达处理机srio通信系统的容错方法及系统
WO2010108376A1 (zh) 故障检测方法、系统以及时分复用单板
CN110690998B (zh) 一种基于bmc的主从设备管理方法
US9787532B2 (en) Module, system and method of switching modules
US11397661B1 (en) System and method for monitoring offline state of electronic device
JP3652910B2 (ja) 装置内状態監視方式
JPH11177594A (ja) 通信制御装置

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: 12834495

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: 12834495

Country of ref document: EP

Kind code of ref document: A1