WO2015176442A1 - 一种时钟切换方法及装置 - Google Patents
一种时钟切换方法及装置 Download PDFInfo
- Publication number
- WO2015176442A1 WO2015176442A1 PCT/CN2014/087230 CN2014087230W WO2015176442A1 WO 2015176442 A1 WO2015176442 A1 WO 2015176442A1 CN 2014087230 W CN2014087230 W CN 2014087230W WO 2015176442 A1 WO2015176442 A1 WO 2015176442A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- clock
- service
- slave
- domain
- available
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
Definitions
- the present invention relates to the field of packet transmission network technologies, and in particular, to a clock state detection and handover method and apparatus.
- PDN Packet Transport Network
- TDM Packet Transport Network
- the TDM data transmission rate is fixed at 8000 frames per second. Therefore, the TDM service transmission needs to ensure that the transmitting end and the receiving end clock are highly synchronized, so as to avoid error codes, slip codes or errors caused by clock out of synchronization. Other serious problems, so the detection of the clock state is more important.
- the related art TDM PWE3 service clock state detection has two modes: adaptive clock recovery and differential clock recovery.
- adaptive clock recovery when the service data packet transmitted from the PSN is not received, the data packet transmitted from the PSN side is abnormal.
- the clock recovery status is abnormal. As a result, the TDM service cannot be forwarded normally.
- TDM PWE3 service multiple TDM services can be created in one clock domain.
- one is the primary clock service, and the other are slave clock services.
- the clock of the clock is abnormal, the clock can be recovered by the main service clock.
- the clock of the main service is abnormal, the clock is reported to the processing platform.
- the user needs to manually select a slave clock service as the new master.
- Clock service based on the switching of the master-slave clock service in the prior art, there are two problems: (1) manual switching that needs to be considered, which wastes time resources; (2) the slave clock service that is manually switched cannot guarantee the selected slave Whether the clock service can be used normally. If it cannot be used normally, it will have to re-select the slave clock service to continue switching until it is available. This greatly reduces the efficiency of the system's response to the clock recovery state.
- the embodiment of the invention provides a clock switching method and device, which can solve the problem that the clock switching speed is slow and the switching efficiency is not high.
- a clock switching method including:
- selecting an available slave clock service from the clock domain as a new master clock service includes:
- One of the available slave clock services is selected as the new master clock service.
- the obtaining the available slave clock service in the clock domain includes:
- the slave clock service acts as an available slave clock service.
- the abnormality of the clock state of the slave clock service includes:
- the packet forwarding network side does not transmit the time division multiplexing service data packet
- the time division multiplexing service data packet transmitted by the packet forwarding network side is abnormal.
- selecting a available slave clock service from the clock domain as a new master clock service includes:
- the slave clock service with the least number of abnormal times is selected as the new master clock service from the available slave clock services in the clock domain.
- the embodiment of the present application further provides a clock switching apparatus, including: a detecting module and a processing module;
- the detecting module is configured to detect a clock state of a primary clock service in a clock domain
- the processing module is configured to determine whether the primary clock service needs to be switched, and if so, select an available slave clock service from the clock domain as a new primary clock service.
- the processing module includes an obtaining unit and a selecting unit; the obtaining unit is configured to acquire an available slave clock service in the clock domain;
- the selection unit is arranged to select one of the available slave clock services as a new master clock service.
- the obtaining unit is configured to acquire the available slave clock service in the clock domain in the following manner:
- the slave clock service After determining that the master clock service needs to be switched in the clock domain, detecting whether the clock state corresponding to the slave clock service in the clock domain is abnormal, and if yes, marking the slave clock service, and selecting the number of times of marking is less than a preset threshold.
- the slave clock service is available as a slave clock service.
- the acquiring unit is configured to determine that an abnormality occurs in a clock state of the clock service when the following state is detected:
- the packet forwarding network side does not transmit the time division multiplexing service data packet
- the time division multiplexing service data packet transmitted by the packet forwarding network side is abnormal.
- the selection unit is configured to select an available slave clock service from the clock domain as a new master clock service in the following manner:
- the slave clock service with the least number of abnormal times is selected as the new master clock service from the available slave clock services in the clock domain.
- the slave clock service in the clock domain is selected as the new master clock service, and the slave clock service that can be used normally needs to be switched.
- the first switched object is selected, rather than the available slave clock service determined after multiple selections of the switch. The problem of slow clock switching and low switching efficiency is avoided.
- FIG. 1 is a flowchart of a clock switching method according to a first embodiment of the present invention
- FIG. 2 is a flowchart of a method for simultaneously detecting a clock state of a master-slave clock service according to a first embodiment of the present invention
- FIG. 3 is a flowchart of a method for performing clock state detection of a slave clock service when a master clock service needs to be switched according to the first embodiment of the present invention
- FIG. 4 is a schematic structural diagram of a clock switching apparatus according to a second embodiment of the present invention.
- the clock state of the clock service in the clock domain is detected; whether the master clock service needs to be switched, and then, an available slave clock service is selected from the clock domain as a new master clock service.
- selecting an available slave clock service in the clock domain as a new master clock service process includes: obtaining an available slave clock service in the clock domain, and then selecting an available slave clock from the available slave clock service.
- the service serves as a new master clock service;
- the manner of obtaining the available slave clock service in the clock domain includes: in the master clock industry Before the switchover is performed, check whether the slave clock service in the clock domain is abnormal.
- the abnormal clock service is marked, and the slave clock service whose tag number is less than the preset threshold is selected as the available slave clock service.
- the master clock service needs to be switched, check whether the slave clock service in the clock domain is abnormal. If yes, the abnormal clock service is marked, and the slave clock service whose tag number is less than the preset threshold is selected as the available slave clock service.
- the preset threshold is the maximum number of occurrences of an abnormality in one cycle.
- Embodiment 1 is a diagrammatic representation of Embodiment 1:
- FIG. 1 is a flowchart of a clock switching method provided in this embodiment, including:
- Step 101 Detect a clock state of a primary clock service in a clock domain.
- Step 102 When the primary clock service needs to be switched, select an available slave clock service as the new master clock service.
- the purpose of detecting the service state of the main clock in the clock domain is to ensure that the clock state of the main clock service is restored to normal. If the clock recovery of the main clock service is abnormal, the normal transmission of the service in the entire clock domain is affected.
- the common situation of determining the abnormal recovery of the clock of the main clock service includes: not receiving the network data packet transmitted from the packet switching network (PSN) side; receiving the abnormal network data packet transmitted by the packet switching network (PSN) side; receiving At least one of the up and down overflow events occurs in the buffer area of the terminal.
- the abnormal network packet sent by the PSN side is received: the transmitted network packet sequence number is lost, the malformed packet, or the Lbit is received. Invalid packet, of course, the case where the clock state of the main clock service is abnormal is not limited to the above-described cases.
- step 102 when it is determined that the primary clock service needs to be handed over, an available slave clock service is selected as the new master clock service in the same clock domain.
- the available slave clock The service is a slave clock service that can be used normally before and after the switchover.
- the slave clock service can be normally used when the number of consecutive exceptions of the clock service in a specific period is less than the preset threshold.
- determining whether the primary clock service needs to be switched includes: determining whether the number of consecutive abnormal clock states of the primary clock service exceeds a preset parameter, where the preset parameter is that the clock state of the primary clock service continuously appears abnormally in one cycle. The maximum number of times.
- the clock status flag of the primary clock service is set to 1, indicating that the primary clock service needs to be switched.
- the preferred step of selecting an available slave clock service from the clock domain as the new master clock service comprises: first acquiring the available slave clock service in the clock domain; and selecting one of the available slave clock services. As a new master clock business.
- the process of acquiring the available slave clock service in the clock domain includes any one of the following manners:
- A Before determining that the master clock service needs to be switched, detecting whether the clock state of the slave clock service in the clock domain is abnormal, and if yes, marking the abnormal clock service, the flag is used to record the slave clock service.
- the slave clock service tag exceeds a preset threshold, the slave clock service is unavailable. Therefore, the clock state flag of the unavailable slave clock service is preferred.
- the bit is set to 1, or the forwarding status flag of the slave service is set to 1, and the specific setting manner is not limited; if the preset threshold is not exceeded, the slave clock service is available as a slave clock service, and therefore, it is used as an available slave.
- Clock service see FIG. 2, which is a flowchart of a method for simultaneously detecting a clock state of a master-slave clock service provided in this embodiment:
- Step 201 Detecting a clock state of the master-slave clock service.
- Step 202 Determine whether the master clock service needs to be switched, and if so, go to step 203; if no, go to step 201;
- Step 203 Determine whether there is available slave clock service, if yes, proceed to step 204; if not, proceed to step 205;
- Step 204 Select one as a new master clock service
- Step 205 Repair the system.
- Step 301 The primary clock service needs to be switched.
- Step 302 If there is a slave clock service, determine whether the packet forwarding state of the slave clock service is abnormal, and if yes, go to step 303; if no, go to step 304;
- Step 303 Determine whether the number of times the slave clock service packet forwarding status is abnormal exceeds a preset threshold, and if yes, go to step 305; if no, go to step 304;
- Step 304 Switch the slave clock service to a primary clock service.
- Step 305 The slave clock service is unavailable from the clock service.
- the preset threshold is the maximum number of consecutive abnormalities in the clock state of the clock service in one cycle.
- the preset condition for determining the clock state of the master clock service needs to be switched. It may be the same as the preset condition for judging whether the clock service is available or not.
- the slave clock service in the clock domain is detected.
- the processing is performed, for example, the clock state of the main clock service is reset or the system is repaired.
- the slave clock service exists in the clock domain and the available slave clock service exists. Therefore, the above situation is not described herein again.
- detecting that the clock state of the slave clock service is abnormal is preferably detecting whether the packet forwarding state of the slave clock service is abnormal, and the method includes: receiving the time division multiplexing service transmitted by the packet forwarding network side. The data packet; or the time division multiplexing service data packet transmitted from the packet forwarding network side is abnormal.
- it is determined that the time division multiplexing service data packet transmitted by the packet forwarding network side is abnormal the transmitted network The packet sequence number is lost, the malformed packet, or the Lbit invalid packet is received.
- the case where the clock state of the main clock service is abnormal is not limited to the above-mentioned cases.
- selecting a available slave clock service from the clock domain as the new master clock service includes any one of the following manners:
- A1 randomly select one of the available slave clock services in the clock domain as the new master clock service
- B1 Select the slave clock service with the least number of abnormal times from the available slave clock services in the clock domain as the new master clock service.
- the master clock service that needs to be switched is switched to the slave clock service.
- the clock switching method provided in this embodiment can solve the problem that the clock switching speed is slow and the switching efficiency is not high.
- Embodiment 2 is a diagrammatic representation of Embodiment 1:
- a clock switching device includes: a detecting mode Block 401 and processing module 402;
- the detecting module 401 is configured to detect the clock state of the main clock service in the clock domain.
- the purpose of detecting the clock state of the clock in the clock domain is to ensure that the clock state of the master clock service is restored. If the clock recovery of the master clock service is abnormal, The normal transmission of the service in the entire clock domain is affected.
- the common situation of determining that the clock recovery of the primary clock service is abnormal includes: not receiving the network data packet transmitted from the packet switching network (PSN) side; receiving the packet conversion network.
- the (PSN) side transmits an abnormal network packet; the buffer of the receiving end has at least one of an overflow event.
- the abnormal network packet sent by the PSN side includes: the transmitted network data. The packet sequence number is lost, the malformed packet, or the Lbit invalid packet is received.
- the case where the clock state of the main clock service is abnormal is not limited to the above-mentioned cases.
- the processing module 402 selects an available slave clock service as the new master clock service in the clock domain when determining that the master clock service needs to be handed over.
- the available slave clock service is a slave clock service that can be used normally before and after the switchover. (After a certain period, the number of consecutive abnormalities from the clock service is less than the preset threshold, the slave clock service can be considered as Normal use).
- the processing module 402 further includes a threshold setting unit 4023, where the threshold setting unit 4023 is configured to set a threshold parameter. In this embodiment, the threshold setting unit 4023 is configured to set a preset parameter and a preset threshold. ;
- the determining, by the processing module 402, whether the main clock service needs to be switched includes: determining whether the number of consecutive abnormal occurrences of the clock state of the main clock service exceeds a preset parameter, where the preset parameter is the maximum number of consecutive abnormal occurrences of the clock state of the main clock service in one cycle. .
- the clock state flag of the master clock service is set to 1, indicating that the master clock service needs to be switched.
- the processing module 402 includes an obtaining unit 4021 and a selecting unit 4022, and the obtaining unit 4021 is configured to acquire an available slave clock service in a clock domain; the selecting unit 4022 is configured to select one of available clock services. As a new master clock business.
- the process of the obtaining unit 4022 acquiring the available slave clock service in the clock domain includes any one of the following manners:
- A Before determining that the master clock service needs to be switched, detecting whether the clock state of the slave clock service in the clock domain is abnormal, and if yes, marking the abnormal clock service, the flag is used to record the slave clock service.
- the slave clock service tag exceeds a preset threshold, the slave clock service is unavailable. Therefore, the clock state flag of the unavailable slave clock service is preferred.
- the bit is set to 1, or the forwarding status flag of the slave service is set to 1, and the specific setting manner is not limited; if the preset threshold is not exceeded, the slave clock service is available as a slave clock service, and therefore, it is used as an available slave.
- the slave clock service After determining that the master clock service needs to be switched, detecting whether the clock state of the slave clock service in the clock domain is abnormal, and if so, marking the abnormal clock service, the flag is used to record the slave clock service. If the number of times of the slave clock service tag exceeds the preset threshold, the slave clock service is unavailable; if the preset threshold is not exceeded, the slave clock service is available. The slave clock service, therefore, treats it as an available slave clock service; in this mode, the processing after marking is the same as that of mode A.
- the preset threshold is the maximum number of consecutive abnormalities in the clock state of the clock service in one cycle.
- the preset condition for determining the clock state of the master clock service needs to be switched. It may be the same as the preset condition for judging whether the clock service is available or not.
- the slave clock service in the clock domain is detected.
- the system needs to be processed according to the specific situation of the system, for example, the master clock service.
- the clock state is reset or repaired, etc.
- the acquiring unit 4021 detects that the clock state of the slave clock service is abnormal, and preferably detects whether the packet forwarding state of the slave clock service is abnormal, and specifically includes: receiving the time when the packet forwarding network side is not received. The multiplexed service data packet is received; or the time division multiplexed service data packet transmitted from the packet forwarding network side is abnormal. In this embodiment, it is determined that the time division multiplexed service data packet transmitted by the packet forwarding network side is abnormal: The network packet sequence number that is coming over is lost, the malformed packet, or the Lbit invalid packet is received.
- the case where the clock state of the main clock service is abnormal is not limited to the above-mentioned cases.
- the manner in which the selecting unit 4022 selects an available slave clock service from the clock domain as the new master clock service includes any one of the following manners:
- A1 randomly select one of the available slave clock services in the clock domain as the new master clock service
- B1 Select the slave clock service with the least number of abnormal times from the available slave clock services in the clock domain as the new master clock service.
- the master clock service that needs to be switched is switched to the slave clock service.
- the clock switching device in this embodiment can solve the problem that the clock switching speed is slow and the switching efficiency is not high.
- all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
- the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
- each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
- the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
- the slave clock service in the clock domain is selected as the new master clock service, and the slave clock service that can be used normally needs to be switched.
- the first switched object is selected, rather than the available slave clock service determined after multiple selections of the switch. The problem of slow clock switching and low switching efficiency is avoided.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种时钟切换方法及装置,该方法包括对时钟域中主时钟业务的时钟状态进行检测;然后判断主时钟业务是否需要切换,如是,从时钟域中选择一个可用从时钟业务作为新的主时钟业务;该装置包括检测模块和处理模块。
Description
本发明涉及分组传送网络技术领域,尤其涉及一种时钟状态检测及切换方法及装置。
在分组传送网络(PTN,Packet Transport Network)中可以对时分复用(TDM,Time Dvision Multiplexing)伪线仿真(PWE3,Pseudo-Wire Emulation Edge-to-Edge)业务进行数据透传,与传统数据传送技术相比较,TDM数据传输速率是固定的,每秒8000帧,因此,TDM业务传输要求保证发送端与接收端时钟高度同步,这样才可以避免因时钟不同步而导致的误码、滑码或其它严重的问题,所以,对时钟状态的检测更为重要。
相关技术的TDM PWE3业务时钟状态检测有自适应时钟恢复和差分时钟恢复两种方式,在一个时钟域中,当没有收到PSN传输过来的业务数据包、PSN侧传输过来的数据包非正常、本端包缓存出现上下溢出事件时,则认为时钟恢复状态异常,从而导致TDM业务不能正常的转发。
在TDM PWE3业务中,一个时钟域中可创建多条TDM业务,在这创建的多条TDM业务中,有一条是主时钟业务,其余条都是从时钟业务,在业务传输过程中,从业务时钟出现异常可以通过主业务时钟进行恢复,在现有技术中,当主业务时钟出现异常时,需要将该主时钟业务上报给处理平台,用户通过处理平台需要手动选取一条从时钟业务作为新的主时钟业务;基于现有技术中对主从时钟业务的切换,存在有以下两点问题:(1)需要认为的手动切换,浪费时间资源;(2)人为切换的从时钟业务不能保证选取的从时钟业务是否可正常使用,如果不能正常使用,后续还得重新选取从时钟业务继续进行切换直到可用为止,这在很大程度上降低了系统对时钟恢复状态响应的效率。
因此,如何能够快速且有效的响应时钟状态的切换是亟待解决的技术问
题。
发明内容
本发明实施例提供一种时钟切换方法及装置,能够解决时钟切换速度慢以及切换效率不高的问题。
为了解决上述问题,本申请实施例提出了一种时钟切换方法,包括:
对时钟域中主时钟业务的时钟状态进行检测;
判断所述主时钟业务是否需要切换,如是,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务。
在本发明一实施例中,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务包括:
获取所述时钟域中的可用从时钟业务;
从所述可用从时钟业务中选择一个作为新的主时钟业务。
在本发明一实施例中,所述获取所述时钟域中的可用从时钟业务包括:
在判断所述时钟域中主时钟业务需要切换之前,检测所述时钟域中的从时钟业务的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务;
或
在判断所述时钟域中主时钟业务需要切换之后,检测所述时钟域中的从时钟业务对应的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务。
在本发明一实施例中,所述从时钟业务的时钟状态出现异常包括:
包转发网络侧没有传输过来时分复用业务数据包;
或
包转发网络侧传输过来的时分复用业务数据包非正常。
在本发明一实施例中,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务的方式包括:
从所述时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业务;或
从所述时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
为了解决上述问题,本申请实施例还提供一种时钟切换装置,包括:检测模块和处理模块;
所述检测模块设置为对时钟域中主时钟业务的时钟状态进行检测;以及
所述处理模块设置为判断所述主时钟业务是否需要切换,如是,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务。
在本发明一实施例中,所述处理模块包括获取单元和选择单元;所述获取单元设置为获取所述时钟域中的可用从时钟业务;
所述选择单元设置为从所述可用从时钟业务中选择一个作为新的主时钟业务。
在本发明一实施例中,所述获取单元是设置为以如下方式获取所述时钟域中的可用从时钟业务:
在判断所述时钟域中主时钟业务需要切换之前,检测所述时钟域中的从时钟业务的时钟状态是否异常,如有,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务;
或
在判断所述时钟域中主时钟业务需要切换之后,检测所述时钟域中的从时钟业务对应的时钟状态是否异常,如有,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务。
在本发明一实施例中,所述获取单元是设置为检测到以下状态时认定从时钟业务的时钟状态出现异常:
包转发网络侧没有传输过来的时分复用业务数据包;
或
包转发网络侧传输过来的时分复用业务数据包非正常。
在本发明一实施例中,所述选择单元是设置为以如下方式从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务的方式:
从所述时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业务;或
从所述时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
本申请实施例在检测到主时钟业务需要切换时,在时钟域中选择一个可以正常使用的从时钟业务作为新的主时钟业务,该可以正常使用的从时钟业务为主时钟业务需要切换时,优选选取的第一个被切换的对象,而非经过多次选择切换后确定的可用从时钟业务。避免了对时钟切换速度慢以及切换效率不高的问题。
附图概述
图1是本发明第一实施例提供的时钟切换方法流程图;
图2是本发明第一实施例提供的同时检测主从时钟业务的时钟状态的方法流程图;
图3本发明第一实施例提供的主时钟业务需要切换时,进行从时钟业务的时钟状态检测的方法流程图;
图4是本发明第二实施例提供的时钟切换装置结构示意图。
本发明的较佳实施方式
本发明实施例中对时钟域中主时钟业务的时钟状态进行检测;判断该主时钟业务是否需要切换,如是,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务。在本发明的另一实施例中,选取时钟域中一个可用从时钟业务作为新的主时钟业务过程包括:获取时钟域中可用从时钟业务,然后从该可用从时钟业务中选择一个可用从时钟业务作为新的主时钟业务;在本发明另一实施例中,获取时钟域中可用从时钟业务的方式包括:在主时钟业
务需要切换之前,检测时钟域中的从时钟业务是否异常,如是,则对该异常的从时钟业务进行标记,选取标记数小于预设门限的从时钟业务为可用从时钟业务;还可以是在主时钟业务需要切换之后,检测时钟域中的从时钟业务是否异常,如是,则对该异常的从时钟业务进行标记,选取标记数小于预设门限的从时钟业务为可用从时钟业务,在本实施例中,该预设门限为一个周期内最多出现异常的次数。通过采用本申请中的上述切换方法,能够解决时钟切换速度慢以及切换效率不高的问题。
下面结合附图对发明的实施例进行详细说明,在不冲突的情况下,本发明实施例及实施例中的特征可以相互任意组合。
实施例一:
图1是本实施例中提供的时钟切换方法流程图,包括:
步骤101:检测时钟域中主时钟业务的时钟状态;
步骤102:主时钟业务需要切换时,选取一个可用从时钟业务作为新的主时钟业务。
步骤101中,检测时钟域中主时钟业务状态的目的是确保主时钟业务的时钟状态恢复正常,如果主时钟业务的时钟恢复出现异常,会影响整个时钟域中业务的正常传输,在本实施例中,判断主时钟业务时钟恢复异常的常见情况包括:没有收到包转换网络(PSN)侧传输过来的网络数据包;接收到包转换网络(PSN)侧传输过来非正常的网络数据包;接收端的缓存区出现上下溢出事件中的至少一种,在本实施例中,接收到PSN侧发送过来非正常的网络数据包包括:传输过来的网络数据包序列号丢失、畸形包、或者接收到Lbit无效包,当然,判断主时钟业务的时钟状态出现异常的情况不限于上述所述的几种情况。
在步骤102中,当判断主时钟业务需要切换时,在同一时钟域中选取一个可用从时钟业务作为新的主时钟业务。在本实施例中,所述的可用从时钟
业务为切换前后可以正常使用的从时钟业务(在一个特定周期内从时钟业务连续出现异常的次数小于预设门限时,都认为该从时钟业务可以正常使用)。在本实施例中,判断主时钟业务是否需要切换包括:判断主时钟业务的时钟状态连续出现异常的次数是否超过预设参数,该预设参数为一个周期内主时钟业务的时钟状态连续出现异常的最多次数。在本实施例中,当该主时钟业务的时钟状态出现异常的次数超过预设参数时,将该主时钟业务的时钟状态标志位设为1,表示该主时钟业务需要切换。
可选地,在本实施例中,从时钟域中选择一个可用从时钟业务作为新的主时钟业务的优选步骤包括:先获取时钟域中的可用从时钟业务;从可用从时钟业务中选择一个作为新的主时钟业务。
可选地,在本实施例中,获取时钟域中的可用从时钟业务的过程包括以下方式中的任一种:
A:在判断主时钟业务需要切换之前,检测该时钟域中的从时钟业务的时钟状态是否出现异常,如是,则对该出现异常的从时钟业务进行标记,该标记用以记录该从时钟业务的时钟状态在一个特定周期内连续出现异常的次数,当该从时钟业务标记的次数超过预设门限时,说明该从时钟业务不可用,因此,优选将该不可用从时钟业务的时钟状态标志位设为1,或将该从业务的转发状态标志位设为1,具体设置方式不限;如果没有超过预设门限,说明该从时钟业务是可用从时钟业务,因此,将其作为可用从时钟业务;参见图2,是本实施例中提供的同时检测主从时钟业务的时钟状态的方法流程图:
步骤201:对主从时钟业务的时钟状态进行检测;
步骤202:判断主时钟业务是否需要切换,如是,进入步骤203;如否,进入步骤201;
步骤203:判断是否有可用从时钟业务,如是,进入步骤204;如否,进入步骤205;
步骤204:选择一个作为新的主时钟业务;
步骤205:修复系统。
B:在判断主时钟业务需要切换之后,检测该时钟域中的从时钟业务的时钟状态是否出现异常,如是,则对该出现异常的从时钟业务进行标记,该标记用以记录该从时钟业务的时钟状态在一个特定周期内连续出现异常的次数,当该从时钟业务标记的次数超过预设门限时,说明该从时钟业务不可用;如果没有超过预设门限,说明该从时钟业务是可用从时钟业务,因此,将其作为可用从时钟业务;该方式中,标记后的处理方式与方式A相同。在本实施例中,为了说明,假设时钟域中存在一个主时钟业务和一个从时钟业务,参见图3,为本实施例中提供的主业务时钟需要切换时,进行从时钟业务的时钟状态检测的方法流程图,其中,从时钟业务的时钟状态检测优选通过检测包转发状态来确定。
步骤301:主时钟业务需要切换;
步骤302:存在从时钟业务的前提下,判断从时钟业务的包转发状态是否异常,如是,进入步骤303;如否,进入步骤304;
步骤303:判断该从时钟业务包转发状态异常的次数是否超过预设门限,如是,进入步骤305;如否,进入步骤304;
步骤304:将该从时钟业务切换为主时钟业务;
步骤305:该从时钟业务为不可用从时钟业务。
在上述两种方式中,所述的预设门限为一个周期内从时钟业务的时钟状态连续出现异常的最多次数;在本实施例中,优选判断主时钟业务的时钟状态需要切换的预设条件与判断从时钟业务是否可用的预设条件相同,当然也可以不同。
上述两种方式中,在时钟域中进行从时钟业务的时钟状态检测之前,需要判断时钟域中是否存在从时钟业务,如果存在,则进行正常的处理;如果
不存在,需要根据系统的具体情况进行处理,同时,在本实施例中,对时钟域中的从时钟业务进行检测,当检测到所有的从时钟业务都不可用时,也需要根据系统的具体情况进行处理,例如,对主时钟业务的时钟状态进行复位或者修复系统等,在本实施例中,优选时钟域中存在从时钟业务且存在可用从时钟业务,因此,以上情况在此不再赘述。
可选地,在本实施例中,检测从时钟业务的时钟状态出现异常优选通过检测从时钟业务的包转发状态是否有异常,具体包括:没有收到包转发网络侧传输过来的时分复用业务数据包;或接收到包转发网络侧传输过来的时分复用业务数据包非正常,在本实施例中,判断包转发网络侧传输过来的时分复用业务数据包非正常包括:传输过来的网络数据包序列号丢失、畸形包、或者接收到Lbit无效包,当然,判断主时钟业务的时钟状态出现异常的情况不限于上述所述的几种情况。
可选地,在本实施例中,从时钟域中选择一个可用从时钟业务作为新的主时钟业务的方式包括以下方式中的任一种:
A1:从时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业务;
B1:从时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
在本实施例中,选取可用从时钟业务作为新的主时钟业务后,将当前需要切换的主时钟业务切换为从时钟业务。
采用上述方式中的任一种,都能够保证选择的从时钟业务可以正常使用。采用本实施例提供的时钟切换方法,能够解决时钟切换速度慢以及切换效率不高的问题。
实施例二:
本实施例中提供了一种时钟切换装置,参见图3,该装置包括:检测模
块401和处理模块402;
检测模块401设置为对时钟域中主时钟业务的时钟状态进行检测;检测时钟域中主时钟业务状态的目的是确保主时钟业务的时钟状态恢复正常,如果主时钟业务的时钟恢复出现异常,会影响整个时钟域中业务的正常传输,在本实施例中,判断主时钟业务时钟恢复异常的常见情况包括:没有收到包转换网络(PSN)侧传输过来的网络数据包;接收到包转换网络(PSN)侧传输过来非正常的网络数据包;接收端的缓存区出现上下溢出事件中的至少一种,在本实施例中,PSN侧发送过来非正常的网络数据包包括:传输过来的网络数据包序列号丢失、畸形包、或者接收到Lbit无效包,当然,判断主时钟业务的时钟状态出现异常的情况不限于上述所述的几种情况。
处理模块402在判断主时钟业务需要切换时,在该时钟域中选取一个可用从时钟业务作为新的主时钟业务。在本实施例中,所述的可用从时钟业务为切换前后可以正常使用的从时钟业务(在一个特定周期内从时钟业务连续出现异常的次数小于预设门限时,都认为该从时钟业务可以正常使用)。在本实施例中,处理模块402还包括门限设置单元4023,所述门限设置单元4023用于设置门限参数,在本实施例中,所述门限设置单元4023用于设置预设参数和预设门限;
处理模块402判断主时钟业务是否需要切换包括:判断主时钟业务的时钟状态连续出现异常的次数是否超过预设参数,该预设参数为一个周期内主时钟业务的时钟状态连续出现异常的最多次数。在本实施例中,优选当该主时钟业务的时钟状态出现异常的次数超过预设参数时,将该主时钟业务的时钟状态标志位设为1,表示该主时钟业务需要切换。
可选地,在本实施例中,处理模块402包括获取单元4021和选择单元4022,获取单元4021用于获取时钟域中的可用从时钟业务;选择单元4022用于从可用从时钟业务中选择一个作为新的主时钟业务。
可选地,在本实施例中,选择单元4022获取时钟域中的可用从时钟业务的过程包括以下方式中的任一种:
A:在判断主时钟业务需要切换之前,检测该时钟域中的从时钟业务的时钟状态是否出现异常,如是,则对该出现异常的从时钟业务进行标记,该标记用以记录该从时钟业务的时钟状态在一个特定周期内连续出现异常的次数,当该从时钟业务标记的次数超过预设门限时,说明该从时钟业务不可用,因此,优选将该不可用从时钟业务的时钟状态标志位设为1,或将该从业务的转发状态标志位设为1,具体设置方式不限;如果没有超过预设门限,说明该从时钟业务是可用从时钟业务,因此,将其作为可用从时钟业务;
B:在判断主时钟业务需要切换之后,检测该时钟域中的从时钟业务的时钟状态是否出现异常,如是,则对该出现异常的从时钟业务进行标记,该标记用以记录该从时钟业务的时钟状态在一个特定周期内连续出现异常的次数,当该从时钟业务标记的次数超过预设门限时,说明该从时钟业务不可用;如果没有超过预设门限,说明该从时钟业务是可用从时钟业务,因此,将其作为可用从时钟业务;该方式中,标记后的处理方式与方式A相同。
在上述两种方式中,所述的预设门限为一个周期内从时钟业务的时钟状态连续出现异常的最多次数;在本实施例中,优选判断主时钟业务的时钟状态需要切换的预设条件与判断从时钟业务是否可用的预设条件相同,当然也可以不同。
上述两种方式中,在时钟域中进行从时钟业务的时钟状态检测之前,需要判断时钟域中是否存在从时钟业务,如果存在,则进行正常的处理;如果不存在,需要根据系统的具体情况进行处理,同时,在本实施例中,对时钟域中的从时钟业务进行检测,当检测到所有的从时钟业务都不可用时,也需要根据系统的具体情况进行处理,例如,对主时钟业务的时钟状态进行复位或者修复系统等,在本实施例中,优选时钟域中存在从时钟业务且存在可用
从时钟业务,因此,以上情况在此不再赘述。
可选地,在本实施例中,获取单元4021检测从时钟业务的时钟状态出现异常优选通过检测从时钟业务的包转发状态是否有异常,具体包括:没有收到包转发网络侧传输过来的时分复用业务数据包;或接收到包转发网络侧传输过来的时分复用业务数据包非正常,在本实施例中,判断包转发网络侧传输过来的时分复用业务数据包非正常包括:传输过来的网络数据包序列号丢失、畸形包、或者接收到Lbit无效包,当然,判断主时钟业务的时钟状态出现异常的情况不限于上述所述的几种情况。
可选地,在本实施例中,选择单元4022从时钟域中选择一个可用从时钟业务作为新的主时钟业务的方式包括以下方式中的任一种:
A1:从时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业务;
B1:从时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
在本实施例中,选取可用从时钟业务作为新的主时钟业务后,将当前需要切换的主时钟业务切换为从时钟业务。
在进行时钟切换时,本实施例中的时钟切换装置,能够解决时钟切换速度慢以及切换效率不高的问题。
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,
在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
本申请实施例在检测到主时钟业务需要切换时,在时钟域中选择一个可以正常使用的从时钟业务作为新的主时钟业务,该可以正常使用的从时钟业务为主时钟业务需要切换时,优选选取的第一个被切换的对象,而非经过多次选择切换后确定的可用从时钟业务。避免了对时钟切换速度慢以及切换效率不高的问题。
Claims (12)
- 一种时钟切换方法,包括:对时钟域中主时钟业务的时钟状态进行检测;判断所述主时钟业务是否需要切换,如是,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务。
- 如权利要求1所述的时钟切换方法,其中,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务包括:获取所述时钟域中的可用从时钟业务;从所述可用从时钟业务中选择一个作为新的主时钟业务。
- 如权利要求2所述的时钟切换方法,其中,所述获取所述时钟域中的可用从时钟业务包括:在判断所述主时钟业务是否需要切换之前,检测所述时钟域中的从时钟业务的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务;或在判断所述主时钟业务需要切换之后,检测所述时钟域中的从时钟业务对应的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务。
- 如权利要求3所述的时钟切换方法,其中,所述从时钟业务的时钟状态出现异常包括:包转发网络侧没有传输过来时分复用业务数据包;或包转发网络侧传输过来的时分复用业务数据包非正常。
- 如权利要求3所述的时钟切换方法,其中,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务包括:从所述时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业 务;或从所述时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
- 一种时钟切换装置,包括:检测模块和处理模块;所述检测模块设置为:对时钟域中主时钟业务的时钟状态进行检测;所述处理模块设置为:判断所述主时钟业务是否需要切换,如是,从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务。
- 如权利要求6所述的时钟切换装置,其中,所述处理模块包括获取单元和选择单元;所述获取单元设置为:获取所述时钟域中的可用从时钟业务;所述选择单元设置为:从所述可用从时钟业务中选择一个作为新的主时钟业务。
- 如权利要求7所述的时钟切换装置,其中,所述获取单元是设置为以如下方式获取所述时钟域中的可用从时钟业务:在判断所述主时钟业务需要切换之前,检测所述时钟域中的从时钟业务的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务;或在判断所述主时钟业务需要切换之后,检测所述时钟域中的从时钟业务对应的时钟状态是否异常,如是,对所述从时钟业务进行标记,选取标记次数小于预设门限的从时钟业务作为可用从时钟业务。
- 如权利要求8所述的时钟切换装置,其中,所述获取单元是设置为检测到以下状态时认定所述从时钟业务的时钟状态出现异常:包转发网络侧没有传输过来的时分复用业务数据包;或包转发网络侧传输过来的时分复用业务数据包非正常。
- 如权利要求8所述的时钟切换装置,其中,所述选择单元是设置为 以如下方式从所述时钟域中选择一个可用从时钟业务作为新的主时钟业务:从所述时钟域内的可用从时钟业务中随机选择一个作为新的主时钟业务;或从所述时钟域中的可用从时钟业务中选择出现异常次数最少的从时钟业务作为新的主时钟业务。
- 一种计算机程序,包括程序指令,当该程序指令被时钟切换装置执行时,使得该装置可执行权利要求1-5任一项所述的方法。
- 一种载有权利要求11所述计算机程序的载体。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410216091.2 | 2014-05-21 | ||
CN201410216091.2A CN105099806A (zh) | 2014-05-21 | 2014-05-21 | 一种时钟切换方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015176442A1 true WO2015176442A1 (zh) | 2015-11-26 |
Family
ID=54553325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/087230 WO2015176442A1 (zh) | 2014-05-21 | 2014-09-23 | 一种时钟切换方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105099806A (zh) |
WO (1) | WO2015176442A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109101074B (zh) * | 2018-07-24 | 2020-07-07 | 中国电子科技集团公司第二十四研究所 | 一种加入随机扰动的多相时钟生成电路 |
CN113495832A (zh) * | 2020-04-05 | 2021-10-12 | 杭州迪普科技股份有限公司 | 缓存区泄漏检测系统及其方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547053A (zh) * | 2008-03-28 | 2009-09-30 | 华为技术有限公司 | 时钟切换方法与时钟产生装置 |
US20110158120A1 (en) * | 2009-12-28 | 2011-06-30 | Fujitsu Limited | Node device |
CN102263630A (zh) * | 2011-07-21 | 2011-11-30 | 中兴通讯股份有限公司 | 一种时钟源的选择方法 |
CN102487301A (zh) * | 2010-12-01 | 2012-06-06 | 中兴通讯股份有限公司 | 多链路时钟恢复方法及装置 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1675290B1 (en) * | 2004-12-23 | 2007-12-12 | Alcatel Lucent | A redundant synchronous clock distribution system |
JP2006238157A (ja) * | 2005-02-25 | 2006-09-07 | Fujitsu Ltd | クロック盤の位相合わせ回路 |
CN101667906B (zh) * | 2008-09-03 | 2012-01-11 | 中兴通讯股份有限公司 | 一种主备时钟切换的方法及系统 |
EP2429104A1 (en) * | 2010-09-08 | 2012-03-14 | Freie Universität Berlin | A method for synchronizing frequency between a master clock and a slave clock |
CN102013920A (zh) * | 2010-12-03 | 2011-04-13 | 中兴通讯股份有限公司 | 一种时分双工基站的时钟备份方法及系统 |
CN102347814B (zh) * | 2011-10-11 | 2014-02-26 | 上海电力学院 | 基于主时钟频率差值的从时钟调整方法 |
-
2014
- 2014-05-21 CN CN201410216091.2A patent/CN105099806A/zh active Pending
- 2014-09-23 WO PCT/CN2014/087230 patent/WO2015176442A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547053A (zh) * | 2008-03-28 | 2009-09-30 | 华为技术有限公司 | 时钟切换方法与时钟产生装置 |
US20110158120A1 (en) * | 2009-12-28 | 2011-06-30 | Fujitsu Limited | Node device |
CN102487301A (zh) * | 2010-12-01 | 2012-06-06 | 中兴通讯股份有限公司 | 多链路时钟恢复方法及装置 |
CN102263630A (zh) * | 2011-07-21 | 2011-11-30 | 中兴通讯股份有限公司 | 一种时钟源的选择方法 |
Also Published As
Publication number | Publication date |
---|---|
CN105099806A (zh) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10708132B2 (en) | Technique for handling a status change in an interconnect node | |
CN103684835B (zh) | 链路故障上报方法、处理方法、传输节点及主节点 | |
CN105024841B (zh) | 一种时钟和时间同步网络的同步故障处理方法和系统 | |
WO2009101531A3 (en) | System and method for network recovery from multiple link failures | |
US8780701B2 (en) | Communication apparatus and packet distribution method | |
US20090141641A1 (en) | Communication device, communication system, and communication fault detection method | |
JP6211218B1 (ja) | 転送装置およびフレーム転送方法 | |
US20130235718A1 (en) | Path switch-back method and apparatus in transport network | |
JP2014121093A5 (zh) | ||
JP5365234B2 (ja) | 端末装置間のトークン異常検出/回復方式 | |
US10404570B2 (en) | Automatically detecting an error in a communication and automatically determining a source of the error | |
WO2016091094A1 (zh) | 一种光传送网的保护倒换方法及装置 | |
WO2015176442A1 (zh) | 一种时钟切换方法及装置 | |
JP6509344B2 (ja) | タグ交換パス接続性の検出方法及び装置 | |
WO2016086638A1 (zh) | 一种实现链路检测的方法、装置及计算机存储介质 | |
KR102131863B1 (ko) | 라우팅 처리기의 동작 모드 천이 방법 | |
CN106454907B (zh) | 一种环形组网系统及故障检测和恢复方法 | |
JP2009010720A (ja) | 経路切替方法及び装置 | |
CN103281209B (zh) | 一种告警信息的处理方法及设备 | |
WO2016061943A1 (zh) | 实现生成树协议保护倒换的方法、装置及计算机存储介质 | |
US20180351766A1 (en) | Transmission system, transmission device, and loop prevention method | |
JP4207412B2 (ja) | ノード離脱管理方法 | |
JP2009296079A (ja) | ノード装置 | |
WO2018059344A1 (zh) | 复用段保护双向倒换方法、装置及系统、计算机存储介质 | |
JP6513992B2 (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: 14892472 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: 14892472 Country of ref document: EP Kind code of ref document: A1 |