CBR service clock rate recovery method

By accumulating the timestamp difference and the number of cycles at the sink node to recover the CBR service clock rate, the clock performance loss caused by step-by-step recovery in long-distance transmission cascades is resolved, achieving efficient and accurate clock recovery.

CN120768494APending Publication Date: 2025-10-10SANECHIPS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410379974.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

In long-distance service transmission cascades, existing CBR service clock recovery needs to be performed stage by stage, resulting in clock performance loss.

Method used

At the source node, the timestamp information of the CBR service signal is encapsulated in the timestamp overhead of the OSU frame and transparently transmitted to the sink node through the intermediate node. The sink node accumulates the timestamp difference within the preset period and the number of periods to directly recover the CBR service clock rate.

Benefits of technology

The clock recovery performance is improved, the complexity is reduced, the recovery accuracy is enhanced, and the clock performance loss caused by step-by-step recovery is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120768494A_ABST
    Figure CN120768494A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a CBR service clock rate recovery method. The method comprises the following steps: receiving an OSU frame; the OSU frame carries timestamp information of the CBR service signal, and the timestamp information comprises a timestamp difference value for transmitting the CBR service signal; sampling the OSU frame through a frequency divider, and counting an accumulated timestamp difference value and an accumulated local clock period number in a sampling period number; and recovering the CBR service clock rate according to the sampling period number, the accumulated timestamp difference value and the accumulated local clock period number. Compared with an existing CBR clock recovery technology, step-by-step recovery is not needed, the clock recovery performance is greatly improved, the complexity is greatly reduced, the precision is greatly improved based on point-to-point recovery, and the problems that in long-distance service transmission cascading in the related technology, step-by-step recovery is needed, offset exists in the step-by-step clock recovery process, and the clock recovery efficiency is poor are solved. And the finally recovered clock performance loss is caused.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communications, and in particular to a method for recovering the clock rate of a CBR service. Background Art

[0002] As the Optical Transport Network (OTN) gradually extends to the edge of metropolitan area networks (MANs), Optical Service Unit (OSU) technology has emerged, driven by differentiated demands for low latency, small granularity, and multiple services. As an emerging technology in the transport sector, OSU supports services at Mbit / s and above, extending the existing OTN technology's support for small granularity services.

[0003] OSU devices support two clock synchronization methods: physical layer clock synchronization and adaptive clock synchronization. Compared to physical layer clock synchronization, adaptive clock synchronization does not require a reference clock. It can ensure that the clocks of the receiving end and the transmitting end remain synchronized based on the timestamp in the communication network, thereby ensuring the transmission quality of constant bit rate (CBR) services.

[0004] Traditional CBR service clock recovery requires stage-by-stage recovery in long-distance service transmission cascades. However, this stage-by-stage clock recovery process can introduce offsets, resulting in performance loss in the final recovered clock. Summary of the Invention

[0005] An embodiment of the present application provides a method for recovering the CBR service clock rate to at least solve the problem in the related art that in long-distance service transmission cascades, step-by-step recovery is required, and there will be offsets in the step-by-step clock recovery process, resulting in loss of performance of the ultimately recovered clock.

[0006] According to one embodiment of the present application, a method for recovering a CBR service clock rate is provided, which is applied to a sink node and includes:

[0007] Receive an optical service unit (OSU) frame sent by a source node; the OSU frame carries timestamp information of a constant bit rate (CBR) service signal, and the timestamp information includes a timestamp difference for transmitting the CBR service signal;

[0008] The OSU frame is sampled by a frequency divider, and the accumulated timestamp difference and the accumulated local clock cycle number within a preset sampling period are counted;

[0009] The CBR service clock rate is recovered according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles.

[0010] According to another embodiment of the present application, a chip is provided for executing the steps in any one of the above method embodiments to achieve recovery of the CBR service clock rate.

[0011] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0012] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0013] In an embodiment of the present application, an optical service unit (OSU) frame transmitted by a source node is received; the OSU frame carries timestamp information of a fixed bit rate (CBR) service signal, including a timestamp difference for transmitting the CBR service signal; the OSU frame is sampled by a frequency divider, and the accumulated timestamp difference and the accumulated number of local clock cycles within a preset number of sampling cycles are counted; and the CBR service clock rate is recovered based on the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles. Compared to existing CBR clock recovery techniques, this embodiment eliminates the need for stage-by-stage recovery. Furthermore, the present embodiment, based on point-to-point recovery, can directly recover the service rate of the CBR signal at the CBR signal's destination based on the accumulated timestamp difference and the accumulated number of cycles, significantly improving clock recovery performance. Compared to traditional CBR service clock recovery, the embodiment significantly reduces complexity and improves accuracy, resolving the problem in related technologies of requiring stage-by-stage recovery in long-distance service transmission cascades, which can cause offsets in the stage-by-stage clock recovery process and result in a loss of performance in the ultimately recovered clock. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a hardware structure block diagram of a mobile terminal for a CBR service clock rate recovery method according to an embodiment of the present application;

[0015] Figure 2 This is a flowchart of adaptively recovering a CBR service clock based on timestamp overhead according to an embodiment of the present application;

[0016] Figure 3 This is a flowchart of a method for recovering the CBR service clock rate according to an embodiment of the present application. DETAILED DESCRIPTION

[0017] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0018] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0019] When CBR services are mapped to the OSU via GMP, if adaptive clock synchronization is used to recover the CBR service clock, the existing technology usually records the sending time of the multiframe header at the OTN device source end, generates timestamp information based on the sending time and places it in the OSU frame TS (timestamp) overhead position, and records the arrival time of the multiframe header at the OTN device sink end. At this time, the sink end can calculate the accumulated value of the CBR service clock based on the sending time and receiving time, and then recover the CBR service clock.

[0020] However, in long-distance service transmission cascades, the CBR service clock recovery using the above method requires stage-by-stage recovery. During the stage-by-stage clock recovery process, there will be offsets, which will cause a loss in the performance of the ultimately recovered clock.

[0021] Based on the technical problems existing in the above-mentioned prior art, an embodiment of the present application provides a method for recovering the CBR service clock rate. The technical concept is that the source node encapsulates the timestamp information of the CBR service signal in the timestamp overhead of the OSU frame, and transparently transmits the timestamp information of the CBR service signal to the destination node through the intermediate node. The destination node can receive the timestamp information of the CBR service signal, accumulate the timestamp difference within a preset period, and count the number of periods within the preset period. The CBR service clock rate is recovered according to the accumulated timestamp difference, the accumulated number of periods, and the transmission rate of the current service signal. Compared with the existing CBR clock recovery technology, there is no need for step-by-step recovery. In addition, the present application is based on point-to-point recovery, and can directly recover the service rate of the CBR signal based on the accumulated timestamp difference and the accumulated number of cycles at the destination of the CBR signal. The clock recovery performance is greatly improved. Compared with the traditional CBR service clock recovery, the complexity is greatly reduced and the accuracy is greatly improved. This solves the problem in the related technology that in long-distance service transmission cascades, step-by-step recovery is required, and there will be offsets in the step-by-step clock recovery process, resulting in loss of clock performance in the final recovery.

[0022] The CBR service clock rate recovery method of the embodiment of the present application can be applied to OTN bearer network processing chips, can support long-distance optical transmission systems, and can be used in optical transmission equipment of enterprise OTN product lines, including backbone, metropolitan area, converged access and data centers.

[0023] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1This is a hardware structure block diagram of a mobile terminal of a CBR service clock rate recovery method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0024] Memory 104 can be used to store computer programs, such as application software programs and modules, such as the computer program corresponding to the CBR service clock rate recovery method in the embodiments of the present application. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the aforementioned methods. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located from processor 102, and such remote memory may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0025] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] Figure 2 Flowchart of adaptively recovering a CBR service clock based on timestamp overhead according to an embodiment of the present application, as shown in FIG. Figure 2 As shown, the following steps may be specifically included:

[0027] Step 1: The source node generates timestamp overhead;

[0028] The source node may generate a timestamp difference according to the CBR service transmission rate and the CBR service signal bit width, and may encapsulate the timestamp difference as timestamp information of the CBR service signal in the timestamp overhead position of the OSU frame.

[0029] Step 2: Transparent transmission processing at the intermediate node;

[0030] The intermediate node may receive the OSU frame carrying the timestamp information of the CBR service signal sent by the source node, and transparently transmit the timestamp information of the CBR service signal to the sink node.

[0031] Step 3: The sink node obtains the timestamp information in the timestamp overhead;

[0032] The sink node can receive the OSU frame transparently transmitted by the intermediate node and obtain the timestamp information of the CBR service signal from the timestamp overhead position of the OSU frame.

[0033] The timestamp information may include a timestamp difference for transmitting a CBR service signal.

[0034] Step 4: Accumulate the timestamp difference and the number of local clock cycles;

[0035] Step 5, generating a frequency divider sampling indication;

[0036] The accumulation of timestamp differences and the accumulation of local clock cycles in step 4 may be the accumulation of the previous sampling cycle. When the preset number of sampling cycles is reached, the frequency divider may generate a sampling indication and enter the next sampling cycle.

[0037] Step 6: Determine the number of service transmission bits and calculate the frequency division parameters of the frequency divider;

[0038] The number of service transmission bits can be determined based on the timestamp difference accumulated in step 4 and the service transmission rate, and the current frequency division parameter of the frequency divider can be calculated based on the number of service transmission bits, the accumulated number of local clock cycles, and the preset number of sampling cycles.

[0039] Step 7: Restore the service clock rate.

[0040] The service clock rate may be calculated and restored based on the current frequency division parameter calculated in step 6 and the preset number of sampling cycles.

[0041] Step 8: Correct the number of service transmission bits and the accumulated number of local clock cycles;

[0042] The current service transmission bit number can be corrected based on the calculated current frequency division parameter, and the accumulated local clock cycle number can be corrected based on the preset sampling cycle number, so as to restore the service clock rate of the next sampling cycle.

[0043] The following further describes the procedure of recovering the CBR service clock rate based on the timestamp overhead.

[0044] In the embodiment, a method for recovering the CBR service clock rate of the mobile terminal is provided, Figure 3 is a flowchart of the method for recovering the CBR service clock rate according to the embodiment of the application, and is applied to a sink node, such as Figure 3 As shown in the figure, the procedure includes the following steps:

[0045] In step S301, an optical service unit (OSU) frame sent by a source node is received; the OSU frame carries timestamp information of a CBR service signal, and the timestamp information includes a timestamp difference value of transmitting the CBR service signal.

[0046] In the embodiment, the CBR service transmission rate information and the data bit width information of the CBR service signal can be encapsulated in the timestamp overhead position of the OSU frame as the timestamp information of the CBR service signal carried by the OSU frame, and the sink node can determine the timestamp difference value of transmitting the CBR service signal according to the CBR service transmission rate information and the data bit width information of the CBR service signal in the timestamp information after receiving the OSU frame.

[0047] The source node can also determine the timestamp difference value of transmitting the CBR service signal according to the CBR service transmission rate information and the data bit width information of the CBR service signal, and the timestamp difference value of transmitting the CBR service signal can be encapsulated in the timestamp overhead position of the OSU frame as the timestamp information of the CBR service signal carried by the OSU frame, and the sink node can obtain the timestamp information of the CBR service signal from the OSU frame after receiving the OSU frame.

[0048] Exemplarily, the sink node can receive an optical service unit (OSU) frame sent by a source node, the OSU frame can carry timestamp information of a CBR service signal, and the timestamp information can include a timestamp difference value of transmitting the CBR service signal.

[0049] For example, the data bit width of each CBR service signal is 8 bits, and the CBR service transmission rate is v, then the sink node can obtain a timestamp difference value of 8 / v from the timestamp overhead of the OSU frame after receiving one OSU frame, and the sink node can accumulate a timestamp difference value of 8 / v after receiving one OSU frame.

[0050] In an exemplary embodiment, the OSU frame carries the timestamp information of the CBR service signal obtained via the transparent processing of the intermediate node.

[0051] As an example, after the source node encapsulates the timestamp information of the CBR service signal into the timestamp overhead of the OSU frame, it can be sent to the intermediate node. The intermediate node then transparently transmits the timestamp information of the CBR service signal to the destination node, and the clock rate is recovered at the destination node, thereby reducing the error introduced by recovering the clock rate at the intermediate node and greatly improving the performance of the final clock recovery.

[0052] Step S302: The OSU frame is sampled by a frequency divider, and the accumulated timestamp difference and the accumulated local clock cycle number within a preset sampling period are counted.

[0053] In an embodiment of the present invention, the sampling period of the frequency divider can be preset, and the OSU frame is sampled by the frequency divider. After the frequency divider reaches the preset sampling period, the accumulated timestamp difference and the accumulated local clock period can be counted.

[0054] As an example, taking the timestamp overhead occupied by a complete timestamp information as the statistical period, within the preset number of sampling cycles, the difference between the current complete timestamp overhead and the previous complete timestamp overhead can be accumulated to obtain the timestamp difference accumulated within the preset number of sampling cycles; the number of local clock cycles between adjacent timestamp overheads occupied by a complete timestamp information can be accumulated to obtain the number of local clock cycles accumulated within the preset number of sampling cycles.

[0055] Step S303: Recover the CBR service clock rate according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles.

[0056] As an example, in an embodiment of the present invention, sampling may be performed based on a sampling period. The sampling period of each sampling period may be the same. The accumulated timestamp difference and the accumulated local clock period may be obtained by adding the timestamp difference and the accumulated local clock period in the previous sampling period. The CBR service clock rate for the current sampling period may be calculated and recovered based on the timestamp difference and the accumulated local clock period in the previous sampling period.

[0057] As an example, the sink node may recover the CBR service clock rate according to the number of sampling cycles, the accumulated timestamp differences, and the accumulated number of local clock cycles.

[0058] In an exemplary embodiment, recovering the CBR service clock rate according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles includes:

[0059] Determine a current frequency division parameter of the frequency divider according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles; and restore a CBR service clock rate according to the current frequency division parameter and the number of sampling cycles.

[0060] As an example, the current frequency division parameter of the frequency divider in the current sampling period number can be calculated according to the current sampling period number, the accumulated timestamp difference and the accumulated local clock period number, so that the current CBR service clock rate can be calculated and recovered according to the current frequency division parameter of the frequency divider and the current sampling period number.

[0061] In an exemplary embodiment, the current frequency division parameter of the frequency divider is determined according to the preset sampling period number, the accumulated timestamp difference and the accumulated local clock period number, comprising:

[0062] The CBR service transmission rate of the current sampling period is obtained, and the number of bits of the CBR service transmission is determined according to the accumulated timestamp difference and the CBR service transmission rate;

[0063] The current frequency division parameter of the frequency divider is determined according to the number of bits of the CBR service transmission, the accumulated local clock period number and the preset sampling period number.

[0064] As an example, the transmission rate of the CBR service signal may be different in different sampling period numbers, so it is necessary to update the frequency division parameter of the frequency divider in the corresponding sampling period number based on the transmission rate of the different CBR service signals.

[0065] For example, assuming that the sampling period number is M, the accumulated timestamp difference is sum_ts, the accumulated local clock period number is sum_t, and the current CBR service transmission rate is v1, then the number of bits of the current CBR service transmission sum_ts_d can be expressed as:

[0066] sum_ts_d=sum_ts*v1

[0067] The current frequency division parameter N of the frequency divider can be expressed as:

[0068] N=M*sum_ts_d / sum_t

[0069] Assuming that a CBR service signal is 8 bits, and one CBR service signal is transmitted, i.e. 8 bits are transmitted, then the current frequency division parameter N of the frequency divider can be expressed as:

[0070]

[0071] In an exemplary embodiment, after the current frequency division parameter of the frequency divider is determined, it further comprises:

[0072] According to the relationship between the accumulated number of local clock cycles and a preset cycle number threshold, the accumulated number of local clock cycles and the number of bits transmitted by the CBR service are corrected.

[0073] As an example, a threshold for clock cycle accumulation can be set in advance, and whether the sampling meets the requirements can be judged based on the relationship between the number of accumulated local clock cycles and the preset cycle number threshold. After determining that the sampling meets the requirements, the accumulated number of local clock cycles and the number of bits transmitted by the CBR service can be corrected to determine the division parameters of the divider for the next sampling cycle number.

[0074] In an exemplary embodiment, the preset cycle number threshold includes a preset maximum cycle number and a preset minimum cycle number, and the correcting the accumulated local clock cycle number and the number of bits transmitted by the CBR service according to the relationship between the accumulated local clock cycle number and the preset cycle number threshold includes:

[0075] If the accumulated number of local clock cycles is less than the preset maximum number of cycles and greater than or equal to the preset minimum number of cycles, a correction value of the accumulated number of local clock cycles is determined by subtracting the preset number of sampling cycles from the accumulated number of local clock cycles; and

[0076] Subtracting the current frequency division parameter from the number of bits transmitted by the CBR service to obtain a difference, and determining the difference as a correction value of the number of bits transmitted by the CBR service;

[0077] The corrected value of the accumulated number of local clock cycles and the corrected value of the number of bits transmitted by the CBR service are used to determine the frequency division parameter of the next sampling period of the frequency divider.

[0078] For example, assuming the preset maximum number of cycles is th max , the preset minimum number of cycles is th min , if th min ≤sum_t <th max , it means that the sampling requirements are met this time, and sum_t can be corrected to sum_t-M, and sum_ts_d can be corrected to sum_ts_d-N.

[0079] In an exemplary embodiment, the method further includes:

[0080] If the accumulated number of local clock cycles is less than the preset minimum number of cycles, the timestamp difference accumulated in the current sampling period is added to the timestamp difference of the next sampling period, and the local clock cycles accumulated in the current sampling period is added to the local clock cycles of the next sampling period, and sampling is performed for the next sampling period.

[0081] For example, if sum_t <th min , then after entering the next sampling period, accumulation can be continued based on the currently accumulated timestamp difference and the accumulated number of local clock cycles.

[0082] In an exemplary embodiment, the method further includes:

[0083] If the accumulated number of local clock cycles is greater than the preset maximum number of cycles, the accumulated number of local clock cycles and the accumulated timestamp difference are cleared respectively, and sampling is performed for the next sampling number of cycles to update the frequency division parameter of the next sampling number of cycles.

[0084] For example, if sum_t≥th max , it can be considered that the sampled data is abnormal, and the accumulated local clock cycles and the accumulated timestamp difference can be cleared respectively, and re-sampling can be performed within the next sampling cycle to update the frequency division parameters of the next sampling cycle.

[0085] In an exemplary embodiment, the method further includes:

[0086] When a reset signal is received, the currently accumulated number of local clock cycles and the currently accumulated timestamp difference are cleared to zero respectively, and the step of sampling the OSU frame through the frequency divider and counting the accumulated timestamp difference and the accumulated number of local clock cycles within a preset number of sampling cycles is returned.

[0087] As an example, in the case of a sampling anomaly, the embodiment of the present application can reset to the initial state based on the received reset signal and re-sample the OSU frame, thereby terminating the anomaly and avoiding the error from spreading.

[0088] The following further illustrates the process of recovering the clock rate of the CBR service of this application through an example.

[0089] Example 1

[0090] Taking the recovery of the CBR (STM1, STM4) STM16 service clock rate from the OSU_CBR (STM1, STM4) STM16 service as an example, the following steps may be specifically included:

[0091] 1. Obtain the timestamp overhead (TS) at the OSU device sink. Extract the TS overhead in the OSU frame structure according to the OSU frame header indication. Each OSU frame TS overhead position can carry 8 bits of timestamp information. According to the sequence number (SQ) overhead, obtain the complete 32-bit TS timestamp of 4 consecutive multiframes in sequence. The timestamp unit is nanoseconds (ns).

[0092] 2. Accumulate the timestamp difference and the number of local clock cycles. Within the preset sampling period M, a complete TS timestamp can be obtained every 4 multiframes. The difference between the current 4-multiframe complete timestamp overhead and the previous 4-multiframe complete timestamp overhead is calculated, and then the difference is accumulated to sum_ts. At the same time, a local clock cycle counter can be set to count the number of local clocks between adjacent 4-multiframe frame headers and then accumulate it to sum_t.

[0093] 3. Generate a divider sampling indication: Set the denominator of the sigma_delta divider to M. When the accumulated value of the divider clock counter clk_cnt is M, a divider sampling indication is generated. At the same time, the number of bits transmitted by the CBR service at this moment, sum_ts_d, and the accumulated number of local clock cycles, sum_t, are obtained.

[0094] 4. Calculate the divider parameters:

[0095] According to the preset clock cycle number threshold upper limit thmax and lower limit thmin, since the transmission delay of the OSU frame is relatively fixed, if the cumulative number sum_t of local clocks obtained by the divider sampling each time is within the set threshold range, it means that the sampling requirements are met this time.

[0096] At the same time, the number of bits of STM16 service transmission in the current sampling period can be calculated as sum_ts_d=sum_ts*v based on the accumulated value sum_ts of the previous sampling period timestamp and the current service rate v of STM16; the divider parameter N can be calculated based on N / M=sum_ts_d / sum_t.

[0097] 5. Recover the CBR service clock rate: Based on the current divider parameter N and the current sampling period number M, the service clock rate ultimately output by the clock divider can be calculated as N / M, thus completing the recovery of the current service clock rate.

[0098] 6. Accumulated value correction:

[0099] After completing the sampling calculation that meets the conditions, it is necessary to correct sum_t and sum_ts_d; when th min ≤sum_t <th max When sum_t is corrected to sum_t-M, sum_ts_d is corrected to sum_ts_d-N; when sum_t <th min When sum_t≥th maxWhen the data is considered abnormal, the two accumulated values ​​of sum_ts_d and sum_t are cleared respectively, and sum_t and sum_ts are accumulated again in the next sampling period.

[0100] In this embodiment of the present application, CBR services carried by the OSU can be quickly recovered at the sink end. Compared with existing OTN clock recovery methods, this reduces complexity and improves accuracy. Furthermore, the configuration of clock recovery calculation parameters can be flexibly adjusted according to the CBR service rate, quickly completing the adaptation processing of multiple services. This ensures the transmission quality of CBR services from the OSU to the OTN bearer network.

[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0102] This embodiment further provides a chip, which is used to execute the steps in any of the above method embodiments to achieve recovery of the CBR service clock rate.

[0103] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0104] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0105] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0106] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0107] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0108] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0109] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for recovering the clock rate of a CBR service, characterized in that: Applied to the sink node, including: Receive an optical service unit (OSU) frame sent by a source node; the OSU frame carries timestamp information of a constant bit rate (CBR) service signal, and the timestamp information includes a timestamp difference for transmitting the CBR service signal; The OSU frame is sampled by a frequency divider, and the accumulated timestamp difference and the accumulated local clock cycle number within a preset sampling period are counted; The CBR service clock rate is recovered according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles.

2. The method according to claim 1, characterized in that The recovering the CBR service clock rate according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles includes: Determining a current frequency division parameter of the frequency divider according to the number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles; The CBR service clock rate is restored according to the current frequency division parameter and the number of sampling periods.

3. The method according to claim 2, characterized in that The determining of the current frequency division parameter of the frequency divider according to the preset number of sampling cycles, the accumulated timestamp difference, and the accumulated number of local clock cycles includes: Obtaining a CBR service transmission rate for a current sampling period, and determining the number of bits transmitted by the CBR service based on the accumulated timestamp difference and the CBR service transmission rate; A current frequency division parameter of the frequency divider is determined according to the number of bits transmitted by the CBR service, the accumulated number of local clock cycles, and the preset number of sampling cycles.

4. The method according to claim 3, characterized in that After determining the current frequency division parameter of the frequency divider, the method further includes: According to the relationship between the accumulated number of local clock cycles and a preset cycle number threshold, the accumulated number of local clock cycles and the number of bits transmitted by the CBR service are corrected.

5. The method according to claim 4, characterized in that The preset cycle number threshold includes a preset maximum cycle number and a preset minimum cycle number. The correcting of the accumulated local clock cycle number and the number of bits transmitted by the CBR service according to the relationship between the accumulated number of local clock cycles and the preset cycle number threshold includes: If the accumulated number of local clock cycles is less than the preset maximum number of cycles and greater than or equal to the preset minimum number of cycles, a correction value of the accumulated number of local clock cycles is determined by subtracting the preset number of sampling cycles from the accumulated number of local clock cycles; and Subtracting the current frequency division parameter from the number of bits transmitted by the CBR service to obtain a difference, and determining the difference as a correction value of the number of bits transmitted by the CBR service; The corrected value of the accumulated number of local clock cycles and the corrected value of the number of bits transmitted by the CBR service are used to determine the frequency division parameter of the next sampling period of the frequency divider.

6. The method according to claim 5, characterized in that Also includes: If the accumulated number of local clock cycles is less than the preset minimum number of cycles, the timestamp difference accumulated in the current sampling period is added to the timestamp difference of the next sampling period, and the local clock cycles accumulated in the current sampling period is added to the local clock cycles of the next sampling period, and sampling is performed for the next sampling period.

7. The method according to claim 5, characterized in that Also includes: If the accumulated number of local clock cycles is greater than the preset maximum number of cycles, the accumulated number of local clock cycles and the accumulated timestamp difference are cleared respectively, and sampling is performed for the next sampling number of cycles to update the frequency division parameter of the next sampling number of cycles.

8. The method according to claim 1, characterized in that The timestamp information of the CBR service signal carried by the OSU frame is obtained through transparent transmission processing of the intermediate node.

9. The method according to claim 1, characterized in that Also includes: When a reset signal is received, the currently accumulated number of local clock cycles and the currently accumulated timestamp difference are cleared to zero respectively, and the step of sampling the OSU frame through the frequency divider and counting the accumulated timestamp difference and the accumulated number of local clock cycles within a preset number of sampling cycles is returned.

10. A chip, characterized in that: The method described in any one of claims 1 to 9 is executed to realize the recovery of the CBR service clock rate.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.