Phase control method and device and communication system

By setting the startup time to an integer multiple of the multiframe period when the forwarding device is restarted, the phase difference change problem caused by the restart of the forwarding device is solved, ensuring that the service message delay of the network device and the next-hop device remains unchanged, and achieving stable service message crossing.

CN120729488APending Publication Date: 2025-09-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410381268.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the small-granularity technology, the restart of the forwarding device of the network equipment causes the phase difference between the Tx multiframe and the Rx multiframe to change, and the Tx sub-timeslot and Rx sub-timeslot need to be re-determined, resulting in an increase in the cross-delay of the service message.

Method used

By setting the start time to an integer multiple of the multiframe period from the reference time when the forwarding device is restarted, it is ensured that the forwarding device sends the multiframe after power-on, keeps the phase of the Rx multiframe and the Tx multiframe unchanged, and avoids re-determining the sub-time slot.

Benefits of technology

This ensures that the service message delay does not deteriorate, avoids the phase difference change caused by the restart of the forwarding device, and ensures that the cross-delay of the service message between the network device and the next-hop device remains unchanged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729488A_ABST
    Figure CN120729488A_ABST
Patent Text Reader

Abstract

The invention discloses a phase control method and device and a communication system, and belongs to the technical field of communication. In the application, the forwarding device in the network equipment starts to send the multiframe at the starting moment when the time difference between the forwarding device and the reference moment is the integral multiple of the multiframe period, so that the phase change of the Tx multiframe of the network equipment before and after the forwarding device is restarted can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a phase control method and device, and a communication system. Background Art

[0002] Small-granule technology achieves bandwidth segmentation within large-granule pipelines by using fine-grained basic units (fgBUs) to divide them into sub-slots. In a slicing packet network (SPN), a multiframe mechanism is used to extend the 5-gigabit-per-second (Gbps) time slot. A multiframe consists of 20 fgBUs, and an fgBU consists of 24 sub-slots. A sub-slot can carry eight 65B code blocks (i.e., code blocks of 65 bits in length). A sub-slot can be independently allocated to a sub-client, and a sub-client can be assigned to at least one sub-slot.

[0003] In the small particle technology, the network device carries the service message of the small particle service in the sub-time slot and sends it. The position of the sub-time slot in the multiframe is the phase of the sub-time slot, and the phase of the multiframe is the deviation of the time corresponding to the frame header of the multiframe (for example, the first sub-time slot in the multiframe) compared to the reference time. For the convenience of description, the multiframe received by the network device is called the Rx multiframe, the multiframe sent by the network device is called the Tx multiframe, the sub-time slot in the Rx multiframe is called the Rx sub-time slot, and the sub-time slot in the Tx multiframe is called the Tx sub-time slot. Based on the small particle crossing technology, the network device can cross the service message received in the Rx sub-time slot to the Tx sub-time slot for transmission. The delay of the network device in performing small particle crossing on the service message is determined by the phase relationship between the Rx sub-time slot used to carry the service message and the Tx sub-time slot used to carry the service message. The network device can optimize the delay of small-granular cross-connection of service packets by controlling the phase relationship between the Rx subslot used to carry the service packet and the Tx subslot used to carry the service packet. Specifically, the network device determines the Tx subslot used to carry the service packet and the Rx subslot used to carry the service packet based on the phase difference between the Rx multiframe and the Tx multiframe (that is, the phase deviation between the Rx multiframe and the Tx multiframe).

[0004] Network devices typically include forwarding devices such as forwarding boards and forwarding chips, and multiframes are sent by these forwarding devices. With current small-granule technology, restarting a network device's forwarding device can cause a phase shift in the device's Tx multiframe, potentially changing the phase difference between the device's Rx multiframe and the device's Tx multiframe. Therefore, after a network device's forwarding device restarts, the device must re-determine the Tx subslots and Rx subslots used to carry service packets. Summary of the Invention

[0005] The present application provides a phase control method and device, and a communication system. The technical solution of the present application is as follows.

[0006] In a first aspect, a phase control method is provided, which includes: obtaining first indication information, the first indication information being used to indicate a first start-up time, the first start-up time being the time when the first forwarding device starts sending a multiframe after being powered on, and the time difference between the first start-up time and the reference time being an integer multiple of the multiframe period; and starting to send a multiframe at the first start-up time according to the first indication information.

[0007] The phase control method provided in the present application can be executed by the first forwarding device, or by a network control device (such as a control board or a central processing unit (CPU), the control board is also called a main control board) in the network device including the first forwarding device. In the case where the phase control method is executed by the first forwarding device, the first forwarding device starts sending multiframes at the first startup moment according to the first indication information. In the case where the phase control method is executed by the network control device in the network device including the first forwarding device, the network control device controls the first forwarding device to start sending multiframes at the first startup moment. That is, regardless of whether the phase control method is executed by the first forwarding device or by the network control device in the network device including the first forwarding device, the action of sending multiframes is actually performed by the first forwarding device.

[0008] The technical solution provided by the present application is that the first forwarding device starts sending multiframes at the start-up time when the time difference from the reference time is an integer multiple of the multiframe period. Therefore, the restart of the first forwarding device will not cause the phase of the Tx multiframe of the network device including the first forwarding device to change. When the phase of the Rx multiframe of the network device does not change before and after the restart of the first forwarding device (for example, when the phase of the Tx multiframe of the previous hop device of the network device and the path delay from the previous hop device to the network device are unchanged, the phase of the Rx multiframe of the network device does not change), the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Specifically, when the clock source tracked by the network device does not change before and after the restart of the first forwarding device (for example, the network device tracks the first clock source before and after the restart of the first forwarding device), the restart of the first forwarding device will not cause the phase of the Tx multiframe of the network device to change; when the clock source tracked by the network device does not change before and after the restart of the first forwarding device and the phase of the Rx multiframe of the network device does not change, the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Therefore, after the first forwarding device is restarted, the network device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message to ensure that the delay of the service message is not degraded. In addition, when the path delay from the network device to the next-hop device of the network device remains unchanged, for example, when the next-hop device of the network device and the network device track the same clock source (for example, both track the first clock source) and the path delay from the network device to the next-hop device remains unchanged, the restart of the first forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change; when the next-hop device and the network device track the same clock source before and after the restart of the first forwarding device and the phase of the Tx multiframe of the next-hop device remains unchanged, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, after the first forwarding device is restarted, the next-hop device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message to ensure that the delay of the service message is not degraded. The Rx multiframe of a network device is the multiframe received by the network device, and the Tx multiframe of a network device is the multiframe sent by the network device (actually, the multiframe sent by the forwarding device in the network device). The Rx subslot is the subslot in the Rx multiframe, and the Tx subslot is the subslot in the Tx multiframe.

[0009] Optionally, the time difference between the first startup moment and the power-on moment of the first forwarding device is greater than the first duration and less than the second duration. For example, the first indication information is generated by a network control device in a network device including the first forwarding device. After the first forwarding device is powered on, the network control device generates the first indication information and sends the first indication information to the first forwarding device. The first forwarding device receives the first indication information sent by the network control device, and the first forwarding device starts sending multiframes at the first startup moment according to the first indication information. In the present application, the first duration is greater than the time required for the process from the network control device starting to generate the first indication information to the first forwarding device receiving the first indication information.

[0010] The technical solution provided by the present application is that the time difference between the first startup moment and the power-on moment of the first forwarding device is greater than the first duration and less than the second duration. On the one hand, it can reserve sufficient time for the network control device to generate the first indication information and send the first indication information to the first forwarding device. On the other hand, it can avoid the first startup moment being too far away from the power-on moment of the first forwarding device, resulting in the first forwarding device being unable to send the reframe in time after power-on, causing time waste.

[0011] Optionally, the first forwarding device includes a forwarding board or a network processor (NP) chip.

[0012] Optionally, the forwarding board includes a small-granularity dumb board or a small-granularity interface board. A small-granularity dumb board is a forwarding board that has a small-granularity service forwarding function but does not have an external communication interface. A small-granularity interface board is a forwarding board that has a small-granularity service forwarding function and an external communication interface. The external communication interface can be a physical interface of a network device. The network device can be a slicing packet network (SPN) device.

[0013] Optionally, the first forwarding device is in the network device, and before sending the multiframe according to the first indication information, the time of the network device is synchronized with the time of the first clock source (that is, the network device tracks the first clock source). For example, the first forwarding device is a forwarding board in the network device or an NP chip in the network device, and before sending the multiframe according to the first indication information, the time of all network devices in the communication network where the network device is located is synchronized with the time of the first clock source (that is, all network devices in the communication network track the first clock source). The method also includes: after the time synchronization of the network device with the first clock source fails and the time synchronization of the network device with the second clock source succeeds, stop sending the multiframe according to the first indication information and obtain the second indication information, the second indication information is used to indicate the second start time, the second start time is the time when the first forwarding device starts sending the multiframe after the time synchronization of the network device with the second clock source succeeds, and the time difference between the second start time and the reference time is an integer multiple of the multiframe period; start sending the multiframe at the second start time according to the second indication information. For example, the phase control method is executed by a network control device (e.g., a control board or CPU) in a network device including a first forwarding device. The network control device controls the first forwarding device to stop sending multiframes according to the first indication information (i.e., stops sending multiframes according to the first indication information) after the network device's time synchronization with the first clock source fails and the network device's time synchronization with the second clock source succeeds, and controls the first forwarding device to start sending multiframes at a second startup time. For another example, the phase control method is executed by the first forwarding device. The first forwarding device, under the control of the network control device in the network device, stops sending multiframes according to the first indication information after the network device's time synchronization with the first clock source fails and the network device's time synchronization with the second clock source succeeds. The first forwarding device receives the second indication information sent by the network control device, and the first forwarding device starts sending multiframes at the second startup time according to the second indication information. That is, regardless of whether the phase control method is executed by the first forwarding device or the network control device in the network device including the first forwarding device, the actions of stopping sending multiframes and sending multiframes are actually performed by the first forwarding device.

[0014] Since there is a deviation in the time of different clock sources, the phase of the Tx multiframe of the network device will generally change after the clock source tracked by the network device changes. The technical solution provided by the present application is that the first forwarding device stops the process of sending multiframes according to the first indication information after the time synchronization of the network device including the first forwarding device with the time of the first clock source fails and the time synchronization of the network device with the time of the second clock source succeeds (that is, after the clock source tracked by the network device changes), and starts sending multiframes according to the second indication information at the second start time when the time difference from the reference time is an integer multiple of the multiframe period. In this way, it is possible to avoid the phase change of the Tx multiframe of the network device caused by the restart of the first forwarding device during the period when the network device tracks the second clock source. In the case that the phase of the Rx multiframe of the network device remains unchanged before and after the restart of the first forwarding device during the period when the network device tracks the second clock source, the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Therefore, after the first forwarding device is restarted while the network device is tracking the second clock source, the network device does not need to redetermine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message to ensure that the delay of the service message is not degraded. In addition, when the next-hop device of the network device also tracks the second clock source and the path delay from the network device to the next-hop device remains unchanged, the restart of the first forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change. When the phase of the Tx multiframe of the next-hop device remains unchanged before and after the restart of the first forwarding device, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, during the period when the next-hop device of the network device is tracking the second clock source, after the first forwarding device is restarted, the next-hop device does not need to redetermine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message to ensure that the delay of the service message is not degraded.

[0015] Optionally, the time at which the network device's time is successfully synchronized with the time of the second clock source is synchronization time G, and the time difference between the second startup time and synchronization time G is greater than the first duration and less than the second duration. Thus, on the one hand, sufficient time can be reserved for the network control device to generate the second indication information and send the second indication information to the first forwarding device after the network device's time is successfully synchronized with the second clock source. On the other hand, this can avoid the second startup time being too far from the synchronization time G, resulting in the first forwarding device being unable to send a multiframe in a timely manner after the network device's time is successfully synchronized with the second clock source, thereby wasting time.

[0016] Optionally, the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and the first startup moment is also the moment when the second forwarding device starts sending multiframes after being powered on; starting to send multiframes at the first startup moment according to the first indication information includes: controlling the first forwarding device and the second forwarding device to start sending multiframes at the first startup moment according to the first indication information. Wherein, the first forwarding device and the second forwarding device are in the same network device, and the method can be executed by a network control device (such as a control board or a CPU) in the network device, the network control device sending the first indication information to the first forwarding device and the second forwarding device, so that the first forwarding device and the second forwarding device start sending multiframes at the first startup moment according to the first indication information. Optionally, the network device also includes a switching network board, and the first forwarding device and the second forwarding device start sending multiframes to the switching network board at the first startup moment according to the first indication information; after the switching network board receives the multiframes sent by the first forwarding device and the second forwarding device, the switching network board forwards the multiframes sent by the master forwarding device of the first forwarding device and the second forwarding device to the next-hop device of the network device through the interface board in the network device, and the switching network board discards the multiframes sent by the backup forwarding device. In this way, it can be ensured that the multiframe sent by the main forwarding device is sent out from the network device, and it can be prevented that the multiframe sent by the backup forwarding device is sent out from the network device.

[0017] The technical solution provided by the present application is that the first forwarding device and the second forwarding device in the network equipment, which are in a master-slave protection relationship with each other, both start sending multiframes at a first start-up moment whose time difference from the reference moment is an integer multiple of the multiframe period. Therefore, the phase of the multiframe sent by the first forwarding device and the multiframe sent by the second forwarding device are the same, which can avoid the phase of the Tx multiframe of the network device changing after the master-slave switching occurs between the first forwarding device and the second forwarding device.

[0018] Optionally, the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other; starting to send multiframes at the first startup moment according to the first indication information includes: controlling the first forwarding device to start sending multiframes at the first startup moment according to the first indication information; the method also includes: obtaining third indication information, the third indication information is used to indicate a third startup moment, the third startup moment is the moment when the second forwarding device starts sending multiframes after power-on, and the time difference between the third startup moment and the reference moment is an integer multiple of the multiframe period; controlling the second forwarding device to start sending multiframes at the third startup moment according to the third indication information. Wherein, the first forwarding device and the second forwarding device are in the same network device, and the method can be executed by a network control device (such as a control board or CPU) in the network device, the network control device sends the first indication information to the first forwarding device, so that the first forwarding device starts sending multiframes at the first startup moment according to the first indication information; and the network control device sends the third indication information to the second forwarding device, so that the second forwarding device starts sending multiframes at the third startup moment according to the third indication information. Optionally, the network device further includes a switching network board, wherein the first forwarding device starts sending multiframes to the switching network board at a first startup time according to the first indication information, and the second forwarding device starts sending multiframes to the switching network board at a third startup time according to the third indication information; after the switching network board receives the multiframes sent by the first forwarding device and the second forwarding device, the switching network board forwards the multiframes sent by the primary forwarding device of the first forwarding device and the second forwarding device to the next-hop device of the network device through the interface board in the network device, and the switching network board discards the multiframes sent by the backup forwarding device of the first forwarding device and the second forwarding device. In this way, it is possible to ensure that the multiframes sent by the primary forwarding device are sent out of the network device, and to prevent the multiframes sent by the backup forwarding device from being sent out of the network device.

[0019] The technical solution provided by the present application is that, in a network device with a first forwarding device and a second forwarding device in a master-slave protection relationship, the first forwarding device starts sending multiframes at a first startup moment whose time difference from a reference moment is an integer multiple of the multiframe period, and the second forwarding device starts sending multiframes at a third startup moment whose time difference from the reference moment is an integer multiple of the multiframe period. Therefore, the phases of the multiframes sent by the first forwarding device and the multiframes sent by the second forwarding device are the same. For example, if the network device tracks the same clock source at the first startup moment and the third startup moment, the phases of the multiframes sent by the first forwarding device and the multiframes sent by the second forwarding device are the same. This can prevent the phase of the Tx multiframe of the network device from changing after a master-slave switch occurs between the first forwarding device and the second forwarding device.

[0020] Optionally, the time difference between the third startup time and the power-on time of the second forwarding device is greater than the first time duration and less than the second time duration. This allows the network control device to reserve sufficient time to generate and send the third indication information to the second forwarding device. Furthermore, this avoids wasting time due to the third startup time being too far from the power-on time of the second forwarding device, resulting in the second forwarding device being unable to send multiframes in a timely manner after power-on.

[0021] Optionally, the first forwarding device is a primary forwarding device, the second forwarding device is a backup forwarding device, and the third startup time is after the first startup time. For example, the third startup time is after the first forwarding device is powered off.

[0022] Optionally, the first forwarding device includes a first forwarding board in the network device or a first NP chip in the network device; the second forwarding device includes a second forwarding board in the network device or a second NP chip in the network device.

[0023] Optionally, the multiframe is a fine grained basic unit (fgBU) multiframe.

[0024] In a second aspect, a phase control device is provided, comprising at least one functional module configured to execute the method provided in the first aspect or any optional embodiment of the first aspect. The at least one functional module can be implemented using software, hardware, or a combination of software and hardware, and the at least one functional module can be arbitrarily combined or divided based on the specific implementation.

[0025] Optionally, the phase control device includes a network device, a control board, a CPU, a forwarding board, or a forwarding chip. The CPU is located on the control board, and the forwarding chip is located on the forwarding board. The forwarding chip may be an NP chip. The control board is also called a main control board, and the forwarding board includes at least one of a small-particle dumb board and a small-particle interface board. The network device may be an SPN device.

[0026] In a third aspect, a phase control device is provided, comprising a memory and a processor; the memory is configured to store a computer program; and the processor is configured to execute the computer program stored in the memory to cause the phase control device to perform the method provided in the first aspect or any optional embodiment of the first aspect. Optionally, the phase control device comprises a network device, a control board, or a forwarding board. The forwarding board comprises at least one of a small-particle dummy board and a small-particle interface board. The network device may be an SPN device.

[0027] In a fourth aspect, a phase control device is provided, comprising a control board and at least one forwarding board. The control board and the at least one forwarding board are configured to implement the method provided in the first aspect or any optional embodiment of the first aspect. The at least one forwarding board comprises at least one of a small-particle dummy board and a small-particle interface board. Optionally, the phase control device is a network device. For example, the network device is an SPN device.

[0028] In a fifth aspect, a communication system is provided, which includes a plurality of network devices, the plurality of network devices are communicatively connected, and at least one of the plurality of network devices includes a phase control device as provided in the second to fourth aspects above.

[0029] In a sixth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, the method provided in the first aspect or any optional manner of the first aspect is implemented.

[0030] In a seventh aspect, a computer program product is provided, which includes a program or code, and when the program or code is executed, it implements the method provided in the first aspect or any optional manner of the first aspect.

[0031] In an eighth aspect, a chip is provided, comprising a programmable logic circuit and / or program instructions, wherein the chip, when running, is configured to implement the method provided in the first aspect or any optional embodiment of the first aspect. Optionally, the chip is a forwarding chip, such as an NP chip.

[0032] The technical effects of the above-mentioned second to eighth aspects can refer to the technical effects of the first aspect and its optional implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of a base frame;

[0034] Figure 2 It is a schematic diagram of a fgBU;

[0035] Figure 3 This is a schematic diagram of the sub-slot division of an fgBU;

[0036] Figure 4 It is a schematic diagram of a small particle intersection;

[0037] Figure 5 This is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0038] Figure 6 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0039] Figure 7 is a flow chart of a phase control method provided in an embodiment of the present application;

[0040] Figure 8 is a schematic diagram of a phase control method provided in an embodiment of the present application;

[0041] Figure 9 This is a schematic diagram of a primary-backup protection provided by an embodiment of the present application;

[0042] Figure 10 is a flow chart of another phase control method provided in an embodiment of the present application;

[0043] Figure 11 is a schematic diagram of another phase control method provided in an embodiment of the present application;

[0044] Figure 12 is a schematic diagram of a phase control device provided in an embodiment of the present application;

[0045] Figure 13 is a schematic diagram of another phase control device provided in an embodiment of the present application;

[0046] Figure 14 Schematic diagram of another phase control device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0048] Small-granule technology uses fine-grained basic units (fgBUs) within large-granule pipes to divide them into sub-slots, thereby achieving bandwidth segmentation within large-granule pipes. Large-granule pipes can be large-granule timeslots. Large-granule timeslots are also called large-granule timeslots, coarse-granule timeslots, or coarse-granularity timeslots. For example, the 5-gigabit-per-second (Gbps) timeslot (i.e., a timeslot with a bandwidth of 5 Gbps) defined by the metropolitan transport network (MTN) standard is a large-granule timeslot. Sub-slots are also called small-granule timeslots, small-granularity timeslots, fine-granularity timeslots, or fine-granularity timeslots (fgslots). For example, a timeslot with a bandwidth of 5 Gbps can be divided into 480 sub-slots.

[0049] In a slicing packet network (SPN), a multiframe mechanism is used to extend 5Gbps time slots. A 5Gbps time slot carries a multiframe, which consists of 20 fgBUs (fgBUs), which in turn consist of 24 subslots. Therefore, a multiframe consists of 480 subslots. A subslot can carry eight 65B code blocks (i.e., code blocks of 65 bits in length). A subslot can be independently allocated to a sub-client, and a sub-client can be assigned to at least one subslot. The bandwidth of a subslot is 10.101 Mbps (including sub-client signals, operation administration and maintenance (OAM) signals, and idle signals). The bandwidth available for sub-client signals in a subslot is 10 million bits per second (Mbps). A sub-client is also known as a small-granularity client, a small-granularity client, a fine-granularity client, or a fine-granularity client (fgclient). The multiframe including the fgBU is also called fgBU multiframe, small-granularity multiframe, small-granularity multiframe, fine-granularity multiframe, fine-granularity multiframe, etc.

[0050] Please refer to Figure 1 , which shows a schematic diagram of a base frame. Figure 1 In the figure, SOH stands for section overhead, slot stands for large-granularity time slot, and the bandwidth of slot can be 5Gbps. Figure 1 As shown, a base frame includes 8×(SOH+20×1023 code blocks), and each code block is carried on a slot, so it can also be described as a base frame including 8×(SOH+20×1023 slots). In some documents, the structure composed of a SOH+20×1023 code block is called an MTN segment layer frame, so a base frame includes 8 MTN segment layer frames. Slot 0 in the base frame can be used to carry small particle services (slots 1 to slot 19 can also be used to carry small particle services, which is not limited in this embodiment of the present application). For example Figure 1 As shown in the figure, slot 0 includes 20 fgBUs, and adjacent fgBUs are filled with idle code blocks so that the number of code blocks received by the receiving device in a unit time (for example, 1 second) matches the number of code blocks sent by the sending device in a unit time. When transmitting in the MTN channel layer service channel, idle code blocks between fgBUs can be added and / or deleted to achieve rate adaptation. As mentioned above, a multiframe includes 20 fgBUs, so Figure 1 Slot 0 in the packet is used to carry a multiframe.

[0051] Please refer to Figure 2 , which shows a schematic diagram of a fgBU. Figure 1 and Figure 2 As shown, an fgBU includes one start (S) code block (also known as the S0 code block), 195 data (D) code blocks, and one terminate (T) code block (also known as the T7 code block). The S0 code block is the first code block in the fgBU. The T7 code block is the last code block in the fgBU. The S0 code block, D code block, and T7 code block are all 66 bits long, so an fgBU includes 197 code blocks of 66 bits. The 195 D code blocks and the T7 code block together provide a 7-byte overhead (OH) area and a 1560-byte payload area. This payload area is also called the fgBU payload area, fgBU payload, or fgBU payload area. Figure 3 This is a schematic diagram of the sub-time slot division of fgBU. Figure 3 As shown in Figure 1, the payload area of ​​fgBU includes 24 sub-slots. One sub-slot carries 8 65B code blocks, and the 8 65B code blocks carried by each sub-slot come from the same sub-client. Figures 1 to 3 It can be seen that a slot with a bandwidth of 5 Gbps is divided into 20×24=480 sub-slots with a bandwidth of 10 Mbps.

[0052] In the small particle technology, the network device carries the service message of the small particle service in the sub-time slot and sends it. The position of the sub-time slot in the multiframe (also known as the fgBU multiframe) is the phase of the sub-time slot. The phase of the multiframe is the deviation of the moment corresponding to the frame header of the multiframe compared to the reference moment, for example, the time difference between the moment corresponding to the frame header of the multiframe and the reference moment minus an integer multiple of the multiframe period. For the sake of convenience of description, the multiframe received by the network device is called the Rx multiframe, the multiframe sent by the network device is called the Tx multiframe, the sub-time slot in the Rx multiframe is called the Rx sub-time slot, and the sub-time slot in the Tx multiframe is called the Tx sub-time slot. Based on the small particle crossing technology, the network device can cross the service message received in the Rx sub-time slot to the Tx sub-time slot for transmission. For example, Figure 4 This is a diagram of a network device performing small-granular cross-connection on service message 1. Figure 4 In the Rx multiframe and Tx multiframe, each of them includes 480 sub-time slots. Rx-f Indicates the phase of the Rx multiframe, T Tx-f Indicates the phase of the Tx multiframe, T p Indicates the phase difference between the Rx multiframe and the Tx multiframe, Tin Indicates the time when the network device receives service message 1, T out Indicates the time when the network device sends service message 1, and ΔT indicates the delay of the network device performing small-granular cross-connection on service message 1. Figure 4 As shown, service message 1 is carried in sub-time slot 122 in Rx multiframe n. The network device is in sub-time slot 122 in Rx multiframe n (sub-time slot 122 in Rx multiframe n corresponds to time T on the time axis). in ) After receiving the service message 1, the network device first buffers the service message 1 in the message queue, and then processes the service message 1 according to the order of the service message 1 in the message queue. After processing the service message 1, the network device crosses the service message 1 to the sub-time slot 121 in the Tx multiframe m+1 (the sub-time slot 121 in the Tx multiframe m+1 corresponds to the time T on the time axis). out ) is sent. Based on Figure 4 It can be seen that the network device's delay ΔT for performing small-granule cross-checking on service message 1 is determined by the phase relationship between subslot 122 in Rx multiframe n (i.e., the Rx subslot used to carry service message 1) and subslot 121 in Tx multiframe m+1 (i.e., the Tx subslot used to carry service message 1). The greater the phase distance between the Rx subslot used to carry service message 1 and the Tx subslot used to carry service message 1, the greater the network device's delay for performing small-granule cross-checking on service message 1. The closer the phase distance between the Rx subslot used to carry service message 1 and the Tx subslot used to carry service message 1, the shorter the network device's delay for performing small-granule cross-checking on service message 1. The delay of a network device performing small-granular cross-connection on a service message can be optimized by controlling the phase relationship between the Rx sub-timeslot used to carry the service message and the Tx sub-timeslot used to carry the service message, so that the delay of the network device performing small-granular cross-connection on the service message meets the delay requirement of the service message. For example, the Rx sub-timeslot used to carry the service message and the Tx sub-timeslot used to carry the service message are determined based on a time slot optimization scheme to control the phase relationship between the Rx sub-timeslot used to carry the service message and the Tx sub-timeslot used to carry the service message. Specifically, the network device obtains the phase difference between the Rx multiframe and the Tx multiframe; the network device determines the Tx sub-timeslot used to carry the service message based on the phase difference between the Rx multiframe and the Tx multiframe and the known Rx sub-timeslot used to carry the service message; or, the network device determines the Rx sub-timeslot used to carry the service message based on the phase difference between the Rx multiframe and the Tx multiframe and the known Tx sub-timeslot used to carry the service message.

[0053] It should be noted that the network device usually includes forwarding devices such as forwarding boards and forwarding chips, and the multiframe is sent by the forwarding device in the network device. For example, the forwarding device includes a time-division multiplexing (TDM) scheduler, and the multiframe is sent by the TDM scheduler. At present, the forwarding device starts sending multiframes after power-on. The phase of the Tx multiframe of the network device is related to the power-on time of the forwarding device in the network device, and the phase of the Rx multiframe of the network device is related to the power-on time of the forwarding device in the previous hop device of the network device and the path delay from the previous hop device to the network device. Restarting the forwarding device in the network device will cause the phase of the Tx multiframe of the network device to change, which may cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. After the forwarding device in the network device is restarted, if the network device still sends the service message in the Tx sub-timeslot used to carry the service message determined before the forwarding device is restarted, it may cause the network device to increase the delay in crossing the service message. Therefore, after the forwarding device in the network device is restarted, the network device needs to re-perform time slot optimization to determine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message or the degradation of the cross delay of receiving the service message. In addition, the restart of the forwarding device in the network device may also cause the phase of the Rx multiframe of the next-hop device of the network device to change, which may cause the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device to change. After the forwarding device in the network device is restarted, if the next-hop device of the network device still sends the service message in the Tx sub-time slot for carrying the service message determined before the forwarding device is restarted, it may cause the delay of the next-hop device to cross the service message to increase. Therefore, after the forwarding device in the network device is restarted, the next-hop device of the network device also needs to re-perform time slot optimization to determine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message or the degradation of the cross delay of receiving the service message.

[0054] The embodiments of the present application provide a phase control method and device, and a communication system. A forwarding device in a network device starts sending a multiframe at a start-up time when the time difference from the reference time is an integer multiple of the multiframe period. Therefore, restarting the forwarding device will not cause the phase of the Tx multiframe of the network device to change; if the phase of the Rx multiframe of the network device does not change before and after the forwarding device is restarted (for example, if the phase of the Tx multiframe of the previous hop device of the network device and the path delay from the previous hop device to the network device are unchanged, the phase of the Rx multiframe of the network device does not change), restarting the forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Specifically, if the clock source tracked by the network device does not change before and after the forwarding device is restarted, restarting the forwarding device will not cause the phase of the Tx multiframe of the network device to change; if the clock source tracked by the network device does not change before and after the forwarding device is restarted and the phase of the Rx multiframe of the network device does not change, restarting the forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Therefore, after the forwarding device is restarted, the network device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message to ensure that the delay of the service message is not degraded. In addition, when the path delay from the network device to the next-hop device of the network device remains unchanged, for example, when the next-hop device of the network device and the network device track the same clock source and the path delay from the network device to the next-hop device remains unchanged, the restart of the forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change; when the next-hop device and the network device track the same clock source before and after the forwarding device is restarted and the phase of the Tx multiframe of the next-hop device remains unchanged, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, after the forwarding device is restarted, the next-hop device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message to ensure that the delay of the service message is not degraded.

[0055] The following describes the technical solutions of the embodiments of the present application. First, the application scenarios of the embodiments of the present application are introduced.

[0056] The application scenario of the embodiments of the present application includes a communication network. The communication network includes multiple network devices. The multiple network devices communicate using a multiframe mechanism based on small-granule technology. For example, the multiple network devices communicate by sending multiframes. Specifically, the network device includes a forwarding device that begins sending multiframes at a startup time whose time difference from a reference time is an integer multiple of the multiframe period. This prevents a restart of the forwarding device from causing a phase change in the Tx multiframe of the network device including the forwarding device. For example, if the clock source tracked by the network device remains unchanged, a restart of the forwarding device in the network device prevents a phase change in the Tx multiframe of the network device. For any of the multiple network devices, if the clock source tracked by the forwarding device remains unchanged before and after the restart of the forwarding device in the network device and the phase of the Rx multiframe of the network device remains unchanged, the restart of the forwarding device will not cause a change in the phase difference between the Rx multiframe and the Tx multiframe of the network device. After the forwarding device is restarted, the network device does not need to re-determine the Tx subslot and the Rx subslot used to carry the service message, and can still ensure that the latency of the service message is not degraded. When the multiple network devices are time-synchronized (i.e., when the multiple network devices track the same clock source), the forwarding devices in the multiple network devices can all begin sending multiframes at a start time whose time difference from a reference time is an integer multiple of the multiframe period, thereby ensuring that the phases of the Tx multiframes of the multiple network devices are the same. The Rx multiframe of a network device is the multiframe received by the network device, and the Tx multiframe of a network device is the multiframe sent by the network device (specifically, the multiframe sent by the forwarding device in the network device). The Rx subslot is the subslot in the Rx multiframe, and the Tx subslot is the subslot in the Tx multiframe.

[0057] The network device may be a switch or a router. The network device is also referred to as a network element (NE). The forwarding device includes a forwarding board or a forwarding chip. The forwarding board is also referred to as a line card, and the forwarding chip may be a network processor (NP) chip, which is generally provided on the forwarding board. In an embodiment of the present application, the communication network may be a slicing packet network (SPN), and the network devices in the communication network may be SPN devices. The forwarding board may include a small-granularity dumb board or a small-granularity interface board. A small-granularity dumb board is a forwarding board that has a small-granularity service forwarding function but does not have an external communication interface, and a small-granularity interface board is a forwarding board that has a small-granularity service forwarding function and an external communication interface. The external communication interface may be a physical interface of the network device. The network devices in the communication network may include edge devices and non-edge devices. Edge devices are located at the edge of the communication network and are used for user devices to access the communication network. The edge devices of the communication network include ingress devices and egress devices. The ingress devices are used for traffic to flow into the communication network, and the egress devices are used for traffic to flow out of the communication network. Non-edge devices are connected between different edge devices, and non-edge devices are also referred to as core devices. For example, edge devices include provider edge (PE) devices, non-edge devices include provider (P) devices, and user devices include industrial equipment, user terminals, home gateways, base stations, hosts, servers, and virtual machines (VMs) created in servers. User terminals include mobile phones, tablets, desktop computers, and Internet of Things (IoT) devices.

[0058] As an example, see Figure 5, which shows a schematic diagram of an application scenario provided by an embodiment of the present application. The communication network provided by the application scenario includes network devices 1 to k. Network devices 1 to k are connected in sequence, network device 1 and network device k can be edge devices of the communication network, and network devices 2 to k-1 can be core devices of the communication network. Network devices 1 to k can communicate based on small-granule technology using a multiframe mechanism. For example, network device 1 is the ingress device of the communication network, network device k is the egress device of the communication network, and the forwarding device in each of the network devices 1 to k-1 can start sending multiframes at a start time when the time difference from the reference moment is an integer multiple of the multiframe period. For example, after the time synchronization of network devices 1 to k, the forwarding device in each of the network devices 1 to k-1 can start sending multiframes at a start time when the time difference from the reference moment is an integer multiple of the multiframe period. In one embodiment, network device 1 is used to implement on-board processing from Ethernet (ETH) service to small-particle service (for example, based on small-particle technology, service messages of Ethernet service are encapsulated to obtain service messages of small-particle service, and the service messages of small-particle service are carried in sub-time slots of multi-frames for transmission), each of network devices 2 to k-1 is used to implement cross-processing of small-particle service (for example, based on small-particle cross-processing technology, service messages of small-particle service received in Rx sub-time slots are cross-linked to Tx sub-time slots for transmission), and network device k is used to implement off-board processing from small-particle service to Ethernet service (for example, service messages of small-particle service received in Rx sub-time slots are decapsulated to obtain service messages of Ethernet service). The delay in each network device's interleaving of the small-particle service is determined by the phase relationship between the Rx sub-timeslot used to carry the small-particle service (i.e., the Rx sub-timeslot used to carry the service message of the small-particle service) and the Tx sub-timeslot used to carry the small-particle service (i.e., the Tx sub-timeslot used to carry the service message of the small-particle service). The delay in the network device's interleaving of the small-particle service can be optimized by controlling the phase relationship between the Rx sub-timeslot used to carry the small-particle service and the Tx sub-timeslot used to carry the small-particle service. Specifically, the network device uses a time slot optimization scheme to determine the Tx sub-timeslot used to carry the small-particle service and the Rx sub-timeslot used to carry the small-particle service based on the phase difference between the Rx multiframe and the Tx multiframe. In an embodiment of the present application, after the time synchronization of network devices 1 to k, the forwarding device in each network device in network devices 1 to k-1 starts sending multiframes at a start time when the time difference from the reference time is an integer multiple of the multiframe period. Therefore, the phase of the Tx multiframe of network devices 1 to k-1 is the same.Furthermore, restarting the forwarding device in any of network devices 1 to k-1 will not cause a change in the phase of the Tx multiframe of the network device, and if the path delay from the network device to the next-hop device of the network device remains unchanged, it will not cause a change in the phase of the Rx multiframe of the next-hop device of the network device. For any of network devices 2 to k-1, if the phase of the Rx multiframe of the network device and the phase difference of the Tx multiframe of the network device remain unchanged before and after the forwarding device in the network device is restarted, the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device remains unchanged; after the forwarding device in the network device is restarted, the network device can ensure that the delay of the service message is not degraded without having to re-determine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message. In an embodiment of the present application, when the time of network devices 1 to k-1 is synchronized, the phase alignment (i.e., the same) of the Tx multiframes of network devices 1 to k-1 can be achieved, and the phase of the Tx multiframe of any network device among network devices 1 to k-1 can be unchanged before and after the forwarding device in the network device is restarted; when the path delay from the network device to the next-hop device of the network device remains unchanged, the phase of the Rx multiframe of the next-hop device of the network device can also be unchanged.

[0059] In an optional embodiment, the application scenario of the embodiment of the present application further includes a controller, which is used to send a reference time to the network device so that the network device determines the start time of the forwarding device in the network device to start sending the multiframe based on the reference time. The controller can be deployed independently (that is, it is an independent device) or integrated into the network device. For example, for Figure 5 In the application scenario shown, the controller can be integrated into any network device among the network devices 1 to n. In an optional embodiment, Figure 6 shows the case of independent controller deployment, Figure 5 The difference between the application scenarios shown is that Figure 6 The illustrated application scenario also includes a standalone controller 10, which is connected to network devices 1-n to control them. For example, the controller 10 sends a reference time to the network devices 1-n. The controller 10 can be a server, a server cluster consisting of several servers, or a cloud computing control center. In some embodiments, the controller 10 is also referred to as a network controller, a control device, a network control device, etc., which is not limited in the present embodiment.

[0060] Figure 5 and Figure 6The application scenarios shown are for illustrative purposes only and are not intended to limit the technical solutions of the embodiments of the present application. During implementation, the number of network devices in the application scenario and the connection relationships between the network devices can be configured as needed. In addition, the application scenario can also include devices other than the network devices, controllers, etc. shown above. For example, the communication network can also include security protection equipment to ensure the security of the communication network. For another example, the application scenario can also include at least one clock source, and the network devices in the communication network track the same clock source in the at least one clock source to achieve time synchronization of the network devices in the communication network. The at least one clock source can include a 1588 clock source.

[0061] The above description only points out that the network device includes a forwarding device, and does not limit the number of forwarding devices in the network device. In actual applications, a network device may include one or more forwarding devices. When a network device includes multiple forwarding devices, the multiple forwarding devices can be in a master-slave protection relationship with each other to ensure the forwarding performance and reliability of the network device. In addition, the network device may also include a network control device, which cooperates with the forwarding device to implement the technical solution of the embodiment of the present application. The network control device can be a control board or a central processing unit (CPU). The control board is also called a main control board, and the CPU is usually on the control board.

[0062] The above is an introduction to the application scenarios of the embodiments of the present application. The following introduces the method embodiments of the present application.

[0063] Please refer to Figure 7 , which shows a flow chart of a phase control method provided by an embodiment of the present application. The phase control method is executed by a phase control device. The phase control device can be network device A, a first forwarding device in network device A, or a network control device in network device A. The first forwarding device can be a forwarding board or a forwarding chip, and the forwarding board can be a small-particle dumb board or a small-particle interface board. The network control device can be a control board or a CPU. Network device A can be Figure 5 or Figure 6 Any network device among network devices 1 to k-1 in the application scenario shown. Figure 7 The phase control method shown is implemented when the time of the network device A is synchronized with the time of the first clock source (that is, when the network device A tracks the first clock source). Figure 7 As shown, the phase control method includes the following steps S701 to S702.

[0064] S701. Obtain first indication information, which is used to indicate a first start-up time. The first start-up time is the time when the first forwarding device starts sending multiframes after being powered on. The time difference between the first start-up time and the reference time T0 is an integer multiple of the multiframe period.

[0065] Among them, the reference time T0 is a reference time in the communication network (such as SPN) where the network device A is located, and the network devices in the communication network where the network device A is located all use the reference time T0 as a reference to determine the start time for sending the multiframe. In addition, the reference time T0 is an absolute time, for example, the reference time T0 is 0:0:00 on January 1, 2022. Since the time difference between the first start time and the reference time T0 is an integer multiple of the multiframe period, the first start time is also an absolute time. The absolute time is not affected by the clock source tracked by the network device, and the absolute time remains unchanged regardless of whether the clock source tracked by the network device changes. The multiframe described in the embodiment of the present application can be an fgBU multiframe, and the multiframe period can be the period of the fgBU multiframe. The period of the fgBU multiframe defined by the current standard is 50.688us (microseconds).

[0066] Since the first startup moment is the moment when the first forwarding device starts sending multiframes after being powered on, the first startup moment is located after the power-on moment of the first forwarding device. In an optional embodiment, the time difference between the first startup moment and the power-on moment of the first forwarding device (for example, the moment when the first forwarding device was last powered on) is greater than the first duration and less than the second duration. Both the first duration and the second duration can be set according to actual conditions. For example, the first indication information is generated by a network control device in network device A, which generates the first indication information after the first forwarding device is powered on and sends the first indication information to the first forwarding device. The first forwarding device receives the first indication information sent by the network control device and starts sending multiframes at the first startup moment according to the first indication information. The first duration is greater than the time required for the process from the network control device starting to generate the first indication information to the first forwarding device receiving the first indication information. In an embodiment of the present application, the time difference between the first startup moment and the power-on moment of the first forwarding device is greater than the first duration and less than the second duration. This, on the one hand, allows the network control device to reserve sufficient time to generate the first indication information and send the first indication information to the first forwarding device. On the other hand, it prevents the first startup moment from being too far from the power-on moment of the first forwarding device, resulting in the first forwarding device being unable to send a multiframe in time after power-on, thereby wasting time. In one embodiment, the first startup moment is the moment closest to the reference moment T0 among multiple alternative moments X, the time difference between each alternative moment X in the multiple alternative moments X and the reference moment T0 is an integer multiple of the multiframe period, and the time difference between each alternative moment X and the power-on moment of the first forwarding device (e.g., the time when the first forwarding device was most recently powered on) is greater than the first duration and less than the second duration.

[0067] In the embodiment of the present application, the first indication information includes a first start time to indicate the first start time. Optionally, the first indication information also includes a start flag or a start flag to indicate that the first start time is the time to start sending the multiframe.

[0068] S701 is executed by a phase control device, which may be a first forwarding device in network device A or a network control device in network device A. In one embodiment, the phase control device is a network control device in network device A, and the phase control device generates first indication information. In a specific embodiment, the phase control device determines a reference time T0 and a power-on time of the first forwarding device (e.g., the time when the first forwarding device was last powered on), and the phase control device determines a first startup time based on the reference time T0 and the power-on time of the first forwarding device, and the phase control device generates first indication information based on the first startup time. In another embodiment, the phase control device is a first forwarding device in network device A, and the phase control device receives the first indication information sent by the network control device in network device A.

[0069] S702. Start sending multiframes at the first start time according to the first indication information.

[0070] S702 is performed by a phase control device, which may be a first forwarding device in network device A or a network control device in network device A. In one embodiment, the phase control device is the first forwarding device. The phase control device (i.e., the first forwarding device) determines a first start-up time based on the first indication information and begins sending multiframes at the first start-up time. In another embodiment, the phase control device is the network control device in network device A. The phase control device controls the first forwarding device to begin sending multiframes at the first start-up time based on the first indication information. In a specific embodiment, the phase control device sends the first indication information to the first forwarding device, which receives the first indication information. The first forwarding device determines the first start-up time based on the first indication information and begins sending multiframes at the first start-up time. In a specific embodiment, the first forwarding device determines the first start-up time based on the first indication information and determines whether the first start-up time has arrived based on the time of a clock source tracked by network device A (e.g., the first clock source). The first forwarding device begins sending multiframes upon determining that the first start-up time has arrived. In an embodiment of the present application, the time corresponding to the frame header of the first multiframe sent by the first forwarding device starting at the first startup moment may be the first startup moment, or may deviate from the first startup moment. For example, if the time of the clock source tracked by network device A deviates from the absolute time, the first startup moment determined to have arrived by the first forwarding device deviates from the actual first startup moment determined by the first forwarding device based on the first indication information, resulting in a deviation between the time corresponding to the frame header of the first multiframe sent by the first forwarding device starting at the first startup moment and the first startup moment indicated by the first indication information.

[0071] The embodiment of the present application is described by taking the first forwarding device starting to send the first multiframe header at the first start time as an example. Figure 8 FIG. 1 shows a schematic diagram of a phase control method provided by an embodiment of the present application. Figure 8As shown, the first forwarding device is powered on at time t0. After the first forwarding device is powered on, the network control device in the network device A generates a first indication message and sends the first indication message to the first forwarding device. The first indication message is used to indicate the first startup time t1. After the first forwarding device receives the first indication message, the first forwarding device determines the first startup time t1 according to the first indication message. The first forwarding device waits for the first startup time t1 to arrive and starts sending multiframes (that is, the first forwarding device starts sending multiframes at the first startup time t1). The first multiframe ( Figure 8 The time corresponding to the frame header of the Tx multiframe shown in is the first startup time t1. In other words, the frame header of the first multiframe sent by the first forwarding device starting at the first startup time t1 is aligned with the first startup time t1.

[0072] In an optional embodiment, network device A further includes a second forwarding device, and the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other. When the phase control device is a network control device in network device A, the phase control device further controls the second forwarding device to send multiframes after power-on. The second forwarding device includes a forwarding board or a forwarding chip (e.g., an NP chip). For example, the first forwarding device is the first forwarding board in network device A or the first NP chip in network device A, and the second forwarding device is the second forwarding board in network device A or the second NP chip in network device A. The time when the second forwarding device starts sending multiframes after power-on may be the same as or different from the time when the first forwarding device starts sending multiframes after power-on. Two cases are described below.

[0073] The first case: the moment when the second forwarding device starts sending multiframes after being powered on is the same as the moment when the first forwarding device starts sending multiframes after being powered on. For example, the first startup moment is also the moment when the second forwarding device starts sending multiframes after being powered on. In the case where the phase control device is a network control device in network device A, the phase control device also controls the second forwarding device to start sending multiframes at the first startup moment according to the first indication information. For example, the phase control device sends the first indication information to the second forwarding device, the second forwarding device receives the first indication information, the second forwarding device determines the first startup moment according to the first indication information, and the second forwarding device starts sending multiframes at the first startup moment. The implementation method of the second forwarding device starting to send multiframes at the first startup moment is similar to the implementation method of the first forwarding device starting to send multiframes at the first startup moment, and will not be repeated here. Since the first startup moment is also the moment when the second forwarding device starts sending multiframes after being powered on, the first startup moment is also after the power-on moment of the second forwarding device. For example, the time difference between the first startup time and the power-on time of the second forwarding device (e.g., the time when the second forwarding device was most recently powered on) is greater than the first duration and less than the second duration. Thus, on the one hand, sufficient time can be reserved for the network control device in network device A to generate the first indication information and send the first indication information to the second forwarding device. On the other hand, this can avoid the first startup time being too far from the power-on time of the second forwarding device, resulting in the second forwarding device being unable to send multiframes in time after powering on, thereby wasting time. For example, the first startup time is the time closest to the reference time T0 among multiple candidate times Y, the time difference between each candidate time Y in the multiple candidate times Y and the reference time T0 is an integer multiple of the multiframe period, the time difference between each candidate time Y in the multiple candidate times Y and the power-on time of the first forwarding device (e.g., the time when the first forwarding device was most recently powered on) is greater than the first duration and less than the second duration, and the time difference between each candidate time Y in the multiple candidate times Y and the power-on time of the second forwarding device (e.g., the time when the second forwarding device was most recently powered on) is greater than the first duration and less than the second duration.

[0074] In an optional embodiment, network device A further includes a switching network board, and the first forwarding device begins sending multiframes to the switching network board at the first startup moment, and the second forwarding device begins sending multiframes to the switching network board at the first startup moment. After the switching network board receives the multiframes sent by the first forwarding device and the second forwarding device, the switching network board forwards the multiframes sent by the primary forwarding device of the first forwarding device and the second forwarding device to the next-hop device of network device A via the interface board in network device A, and the switching network board discards the multiframes sent by the backup forwarding device. That is, the switching network board filters the multiframes sent by the first forwarding device and the second forwarding device and forwards the multiframes sent by the primary forwarding device, thereby ensuring that the multiframes sent by the primary forwarding device are sent from network device A and preventing the multiframes sent by the backup forwarding device from being sent from network device A.

[0075] The second scenario: The time at which the second forwarding device begins sending multiframes after power-on is different from the time at which the first forwarding device begins sending multiframes after power-on. For example, the third start-up time is the time at which the second forwarding device begins sending multiframes after power-on, and the time difference between the third start-up time and the reference time T0 is an integer multiple of the multiframe period. If the phase control device is a network control device in network device A, the phase control device controls the second forwarding device to begin sending multiframes at the third start-up time. In one embodiment, the phase control device obtains third indication information, which indicates the third start-up time. The phase control device controls the second forwarding device to begin sending multiframes at the third start-up time based on the third indication information. In a specific embodiment, the phase control device determines the third start-up time based on the reference time T0 and the power-on time of the second forwarding device, generates third indication information based on the third start-up time, and sends the third indication information to the second forwarding device. The second forwarding device receives the third indication information, determines the third start-up time based on the third indication information, and begins sending multiframes at the third start-up time. The implementation method of the second forwarding device starting to send the multiframe at the third startup moment is similar to the implementation method of the first forwarding device starting to send the multiframe at the first startup moment, and will not be repeated here. Since the third startup moment is the moment when the second forwarding device starts to send the multiframe after it is powered on, the third startup moment is located after the power-on moment of the second forwarding device. For example, the time difference between the third startup moment and the power-on moment of the second forwarding device (for example, the moment when the second forwarding device was last powered on) is greater than the first duration and less than the second duration. Therefore, on the one hand, sufficient time can be reserved for the network control device in the network device A to generate the third indication information and send the third indication information to the second forwarding device. On the other hand, it can avoid the third startup moment being too far away from the power-on moment of the second forwarding device, resulting in the second forwarding device being unable to send the multiframe in time after power-on, thereby wasting time. For example, the third start-up moment is the moment closest to the reference moment T0 among multiple alternative moments Z, the time difference between each alternative moment Z among the multiple alternative moments Z and the reference moment T0 is an integer multiple of the multi-frame period, and the time difference between each alternative moment Z among the multiple alternative moments Z and the power-on moment of the first forwarding device (for example, the moment when the first forwarding device was last powered on) is greater than the first duration and less than the second duration.

[0076] In an optional embodiment, network device A further includes a switching network board, and the first forwarding device begins sending multiframes to the switching network board at a first startup moment, and the second forwarding device begins sending multiframes to the switching network board at a third startup moment. After the switching network board receives the multiframes sent by the first forwarding device and the second forwarding device, the switching network board forwards the multiframes sent by the primary forwarding device of the first forwarding device and the second forwarding device to the next-hop device of network device A via the interface board in network device A, and the switching network board discards the multiframes sent by the backup forwarding device. That is, the switching network board filters the multiframes sent by the first forwarding device and the second forwarding device and forwards the multiframes sent by the primary forwarding device, thereby ensuring that the multiframes sent by the primary forwarding device are sent from network device A and preventing the multiframes sent by the backup forwarding device from being sent from network device A.

[0077] In an embodiment of the present application, a first forwarding device and a second forwarding device in a network device A that are in a master-slave protection relationship with each other both begin sending multiframes at a start time whose time difference from a reference time T0 is an integer multiple of the multiframe period. Therefore, the phases of the multiframes sent by the first forwarding device and the multiframes sent by the second forwarding device are the same (for example, if the clock source tracked by network device A remains unchanged, the phases of the multiframes sent by the first forwarding device and the multiframes sent by the second forwarding device are the same). This can prevent the phase of the Tx multiframe of network device A (i.e., the multiframe sent by network device A) from changing before and after a master-slave switchover between the first forwarding device and the second forwarding device. If the phase of the Rx multiframe of network device A remains unchanged before and after a master-slave switchover between the first forwarding device and the second forwarding device (for example, if the phase of the Tx multiframe of the previous-hop device of network device A and the path delay from the previous-hop device to network device A remain unchanged, the phase of the Rx multiframe of network device A remains unchanged), the master-slave switchover between the first forwarding device and the second forwarding device will not cause a change in the phase difference between the Rx multiframe of network device A and the Tx multiframe of network device A. Therefore, after the primary and secondary switching occurs between the first forwarding device and the second forwarding device, network device A can ensure that the delay of the service message is not degraded without re-determining the Tx sub-timeslot and the Rx sub-timeslot used to carry the service message.

[0078] Figure 9 FIG. 1 shows a schematic diagram of a primary-backup protection provided by an embodiment of the present application. Figure 9As shown, network devices 1 to k-1 respectively include two forwarding devices, and the two forwarding devices are in a master-standby protection relationship with each other (network device k may also include forwarding devices in a master-standby protection relationship with each other, and this embodiment of the present application is not limited to this). Both forwarding devices can start sending multiframes at the start time when the time difference from the reference time T0 is an integer multiple of the multiframe period. For example, network device 1 includes forwarding device 11 and forwarding device 12, and forwarding device 11 and forwarding device 12 are in a master-slave protection relationship with each other. Forwarding device 11 and forwarding device 12 both start to send multiframes at a start time when the time difference from the reference time T0 is an integer multiple of the multiframe period; network device 2 includes forwarding device 21 and forwarding device 22, and forwarding device 21 and forwarding device 22 are in a master-slave protection relationship with each other. Forwarding device 21 and forwarding device 22 both start to send multiframes at a start time when the time difference from the reference time T0 is an integer multiple of the multiframe period; and so on, network device k-1 includes forwarding device (k-1) 1 and forwarding device (k-1) 2, and forwarding device (k-1) 1 and forwarding device (k-1) 2 are in a master-slave protection relationship with each other. Forwarding device (k-1) 1 and forwarding device (k-1) 2 both start to send multiframes at a start time when the time difference from the reference time T0 is an integer multiple of the multiframe period. In an optional embodiment, network devices 1 to k-1 further include a network control device, a switching network board, etc. ( Figure 9(not shown), the two forwarding devices in each network device of network devices 1 to k-1 that have a master-slave protection relationship with each other, under the control of the network control device in the network device, start sending multiframes to the switching network board in the network device at a starting moment when the time difference from the reference moment T0 is an integer multiple of the multiframe period. The switching network board filters the multiframes sent by the two forwarding devices and then forwards the multiframes to the next-hop device. For any network device of network devices 1 to k-1, the time when the two forwarding devices in the network device that have a master-slave protection relationship start sending multiframes can be the same or different; regardless of whether the time when the two forwarding devices start sending multiframes is the same or different, since the two forwarding devices both start sending multiframes at a starting moment when the time difference from the reference moment T0 is an integer multiple of the multiframe period, the phases of the multiframes sent by the two forwarding devices are the same; before and after the master-slave switching of the two forwarding devices occurs, the phase of the Tx multiframe of the network device (that is, the multiframe sent by the network device) will not change. In the case where the phase of the Rx multiframe of the network device remains unchanged before and after the active / standby switching of the two forwarding devices occurs, the active / standby switching of the two forwarding devices will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Therefore, after the active / standby switching of the two forwarding devices occurs, the network device can ensure that the delay of the service message is not degraded without re-performing time slot optimization. Among them, forwarding device 11, forwarding device 12, forwarding device 21, forwarding device 22, forwarding device (k-1) 1 and forwarding device (k-1) 2 include forwarding boards or forwarding chips, and the forwarding boards include small-particle interface boards or small-particle dumb boards. For example, forwarding device 11, forwarding device 12, forwarding device 21, forwarding device 22, forwarding device (k-1) 1 and forwarding device (k-1) 2 are all small-particle dumb boards. Network device A can be any network device from network devices 1 to k-1, and the first forwarding device and the second forwarding device are two forwarding devices in the network device. For example, network device A is network device 2 , the first forwarding device is forwarding device 21 , and the second forwarding device is forwarding device 22 .

[0079] It should be noted that the power-on of the forwarding device described in the embodiment of the present application may be the first power-on of the forwarding device, or it may be the restart of the forwarding device (that is, power-off and then power-on). For example, after the communication network is established, the first power-on of the forwarding device in the network device in the communication network is called the first power-on of the forwarding device, and each subsequent power-on of the forwarding device is called the restart of the forwarding device. In addition, the power-on of the forwarding device may be the power-on of the network device including the forwarding device (for example, the network device is restarted) to power on the forwarding device, or it may be the power-on of the forwarding device itself (for example, the network device is always in the power-on state, and the forwarding device in the network device is powered off and then powered on). After the forwarding device in the network device is powered on for the first time, the forwarding device starts sending multiframes at the start-up time when the time difference from the reference time T0 is an integer multiple of the multiframe period, and the network control device in the network device performs service deployment and optimizes the sub-time slot for the service (that is, determines the Tx sub-time slot in the Tx multiframe for carrying the service message of the service and the Rx sub-time slot in the Rx multiframe for carrying the service message of the service). After each restart, the forwarding device in the network device starts sending multiframes at a starting time when the time difference from the reference time T0 is an integer multiple of the multiframe period. Therefore, if the clock source tracked by the network device before and after the restart of the forwarding device remains unchanged, the phase of the multiframe sent by the forwarding device before and after the restart of the forwarding device remains unchanged, and the phase of the Tx multiframe of the network device remains unchanged; if the clock source tracked by the network device before and after the restart of the forwarding device remains unchanged and the phase of the Rx multiframe of the network device remains unchanged, the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device remains unchanged, and the network device does not need to re-select the sub-time slot for the service to ensure that the delay of the service message of the service is not degraded.

[0080] In summary, according to the technical solution provided by the embodiment of the present application, the first forwarding device in network device A starts sending multiframes at a startup time at which the time difference from the reference time is an integer multiple of the multiframe period. Therefore, restarting the first forwarding device will not cause the phase of the Tx multiframe of network device A to change; if the phase of the Rx multiframe of network device A remains unchanged before and after the restart of the first forwarding device, restarting the first forwarding device will not cause the phase difference between the Rx multiframe of network device A and the Tx multiframe of network device A to change. Specifically, if the clock source tracked by network device A remains unchanged before and after the restart of the first forwarding device, restarting the first forwarding device will not cause the phase of the Tx multiframe of network device A to change; if the clock source tracked by network device A remains unchanged before and after the restart of the first forwarding device and the phase of the Rx multiframe of network device A remains unchanged, restarting the first forwarding device will not cause the phase difference between the Rx multiframe of network device A and the Tx multiframe of network device A to change. Therefore, after the first forwarding device is restarted, network device A does not need to redetermine the Tx sub-timeslot for carrying the service message and the Rx sub-timeslot for carrying the service message to ensure that the delay of the service message is not degraded. In addition, when the path delay from network device A to the next-hop device of network device A remains unchanged, for example, when the next-hop device of network device A and network device A track the same clock source and the path delay from network device A to the next-hop device remains unchanged, the restart of the first forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change. When the next-hop device and network device A track the same clock source before and after the restart of the first forwarding device and the phase of the Tx multiframe of the next-hop device remains unchanged, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, after the first forwarding device is restarted, the next-hop device does not need to redetermine the Tx sub-timeslot for carrying the service message and the Rx sub-timeslot for carrying the service message to ensure that the delay of the service message is not degraded. The technical solution provided by the embodiment of the present application is that, when all network devices in the communication network are time synchronized, the forwarding devices in the network devices in the communication network can all start sending multiframes at a start time whose time difference from the reference time is an integer multiple of the multiframe period, thereby ensuring that the phases of the Tx multiframes of the network devices in the communication network are the same; when at least some of the network devices in the communication network are time-asynchronous, since the time within the network device is unique, it can be ensured that the phases of the Tx multiframes of different forwarding devices in the network device (for example, forwarding devices in a master-slave protection relationship with each other) are the same.

[0081] In an optional embodiment, before S702, the time of network device A is synchronized with the time of the first clock source (that is, network device A tracks the first clock source). When the first forwarding device sends the multiframe according to the first indication information, if the clock source tracked by network device A changes, the first forwarding device stops sending the multiframe according to the first indication information, and sends the multiframe according to the indication information re-issued by the network control device in network device A. As an example, please refer to Figure 10 , which shows a flow chart of another phase control method provided by an embodiment of the present application. Figure 7 Based on the phase control method shown, the phase control method further includes the following steps S703 to S704.

[0082] S703. After the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds, stop sending the reframe according to the first indication information and obtain the second indication information, the second indication information is used to indicate the second start time, and the time difference between the second start time and the reference time T0 is an integer multiple of the reframe period, wherein the first forwarding device is in network device A, and before sending the reframe according to the first indication information (that is, before S702), the time of network device A is synchronized with the time of the first clock source.

[0083] In an optional embodiment, before S702, the time of all network devices in the communication network where network device A is located is synchronized with the time of the first clock source. That is, the time of all network devices in the communication network is synchronized, and all network devices in the communication network track the first clock source.

[0084] Since the time difference between the second start moment and the reference moment T0 is an integer multiple of the multi-frame period, the second start moment is an absolute moment. The second start moment is the moment when the first forwarding device starts sending multi-frames after the time of network device A is successfully synchronized with the time of the second clock source. For example, the moment when the time of network device A is successfully synchronized with the time of the second clock source is called synchronization moment G, and the second start moment is located after synchronization moment G. In an optional embodiment, the time difference between the second start moment and synchronization moment G is greater than the first duration and less than the second duration. Thus, on the one hand, sufficient time can be reserved for the network control device in network device A to generate the second indication information and send the second indication information to the first forwarding device after the time of network device A is successfully synchronized with the time of the second clock source. On the other hand, it can avoid the second start moment being too far away from the synchronization moment G, resulting in the first forwarding device being unable to send the multi-frame in time after the time of network device A is successfully synchronized with the time of the second clock source, thereby wasting time. In one embodiment, the second start moment is the moment closest to the reference moment T0 among multiple alternative moments W, the time difference between each alternative moment W and the reference moment T0 is an integer multiple of the multi-frame period, and the time difference between each alternative moment W and the synchronization moment G is greater than the first duration and less than the second duration.

[0085] In this embodiment of the present application, the second indication information includes a second start time to indicate the second start time. Optionally, the second indication information also includes a start flag or a start flag to indicate that the second start time is the time to start sending multiframes. S703 is performed by a phase control device, which can be a first forwarding device in network device A or a network control device in network device A.

[0086] In one embodiment, the phase control device is a network control device in network device A. After the phase control device determines that the time synchronization between network device A and a first clock source has failed and that the time synchronization between network device A and a second clock source has succeeded, the phase control device controls the first forwarding device to stop sending multiframes according to the first indication information, and the phase control device generates second indication information. In a specific embodiment, the phase control device controls the first forwarding device to stop sending multiframes according to the first indication information by: the phase control device generates stop indication information and sends the stop indication information to the first forwarding device, the first forwarding device determines to stop sending multiframes according to the stop indication information, and the first forwarding device stops sending multiframes. Alternatively, the phase control device controls the first forwarding device to stop sending multiframes according to the first indication information by: the phase control device sends second indication information to the first forwarding device, the first forwarding device determines that the second indication information indicates a second start time for starting to send multiframes that is different from the first start time, and the first forwarding device stops sending multiframes according to the second indication information. In a specific embodiment, the phase control device generates second indication information, including: the phase control device determines the reference time T0 and the synchronization time G (that is, the time when the time of network device A is successfully synchronized with the time of the second clock source), the phase control device determines the second start time based on the reference time T0 and the synchronization time G, and the phase control device generates the second indication information based on the second start time.

[0087] In another embodiment, the phase control device is a first forwarding device in network device A. After synchronization between the time of network device A and the first clock source fails and synchronization between the time of network device A and the second clock source succeeds, the phase control device (i.e., the first forwarding device) stops sending multiframes according to the first indication information under the control of the network control device in network device A, and the phase control device (i.e., the first forwarding device) receives the second indication information sent by the network control device. In a specific embodiment, the phase control device (i.e., the first forwarding device) stops sending multiframes according to the first indication information under the control of the network control device, including: the phase control device (i.e., the first forwarding device) receives the stop indication information sent by the network control device, and the phase control device (i.e., the first forwarding device) stops sending multiframes according to the stop indication information. Alternatively, the phase control device (i.e., the first forwarding device) receives the second indication information sent by the network control device, and the phase control device (i.e., the first forwarding device) determines that the second indication information indicates a second start time for starting to send multiframes that is different from the first start time, and therefore the first forwarding device stops sending multiframes according to the second indication information.

[0088] In an optional embodiment, after the first forwarding device receives the second indication information sent by the network control device, the first forwarding device continues to send multiframes according to the first indication information until the second start time arrives. The first forwarding device stops sending multiframes at a target time before the second start time, where the time difference between the target time and the second start time is less than the multiframe period. That is, before the target time, the first forwarding device continues to send multiframes (i.e., continues to execute S702), thereby avoiding service interruption caused by a long-term interruption of multiframes.

[0089] S704. Start sending multiframes at the second start time according to the second indication information.

[0090] S704 is performed by a phase control device, which may be a first forwarding device in network device A or a network control device in network device A. In one embodiment, the phase control device is the first forwarding device. The phase control device (i.e., the first forwarding device) determines the second start-up time based on the second indication information and begins sending multiframes at the second start-up time. In another embodiment, the phase control device is the network control device in network device A. The phase control device controls the first forwarding device to begin sending multiframes at the second start-up time based on the second indication information. In a specific embodiment, the phase control device sends the second indication information to the first forwarding device, which receives the second indication information. The first forwarding device determines the second start-up time based on the second indication information and begins sending multiframes at the second start-up time. In a specific embodiment, the first forwarding device determines the second start-up time based on the second indication information and determines whether the second start-up time has arrived based on the time of a clock source tracked by network device A (i.e., the second clock source). The first forwarding device begins sending multiframes upon determining that the second start-up time has arrived. In an embodiment of the present application, the time corresponding to the frame header of the first multiframe sent by the first forwarding device starting at the second startup time may be the second startup time, or may deviate from the second startup time. For example, if the time of the clock source tracked by network device A deviates from the absolute time, the second startup time determined to be coming by the first forwarding device deviates from the actual second startup time determined by the first forwarding device based on the second indication information, resulting in a deviation between the time corresponding to the frame header of the first multiframe sent by the first forwarding device starting at the second startup time and the second startup time indicated by the second indication information.

[0091] In the embodiment of the present application, the time corresponding to the frame header of the first multiframe sent by the first forwarding device at the second startup time is the second startup time. For example, Figure 11 FIG. 1 is a schematic diagram showing another phase control method provided by an embodiment of the present application. Figure 11As shown, after the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds, the network control device in network device A generates a stop indication message and sends the stop indication message to the first forwarding device at time t3 to notify the first forwarding device to stop sending multiframes. After the first forwarding device receives the stop indication message, the first forwarding device still continues to send multiframes. Afterwards, the network control device in network device A generates a second indication message and sends the second indication message to the first forwarding device, and the second indication message is used to indicate the second start time t2. After the first forwarding device receives the second indication message, the first forwarding device determines the second start time t2 according to the second indication message, and the first forwarding device stops sending multiframes at the target time t4 before the second start time t2 according to the stop indication message. The first forwarding device waits for the second start time t2 to arrive and starts sending multiframes. The time corresponding to the frame header of the first multiframe sent by the first forwarding device at the second start time t2 is the second start time t2. In other words, the frame header of the first multiframe sent by the first forwarding device at the second start time t2 is aligned with the second start time t2. It should be noted that, Figure 11 Taking the example of a network control device sending a stop instruction and a second instruction to a first forwarding device, in some embodiments, the network control device does not send a stop instruction to the first forwarding device, but sends the second instruction to the first forwarding device. The first forwarding device determines that the second instruction indicates a second start time different from the first start time for starting to send multiframes, and therefore stops sending multiframes at a target time t4 that is prior to the second start time t2. The first forwarding device waits for the second start time t2 to arrive before starting to send multiframes. This is not a limitation in the embodiments of the present application.

[0092] In an optional embodiment, network device A further includes a second forwarding device, and the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other. When the phase control device is a network control device in network device A, after the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds, the phase control device further controls the second forwarding device to stop sending multiframes and controls the second forwarding device to restart sending multiframes. The implementation process of the phase control device controlling the second forwarding device to stop sending multiframes is similar to the implementation process of the phase control device controlling the first forwarding device to stop sending multiframes, and will not be described in detail here. The implementation process of the phase control device controlling the second forwarding device to restart sending multiframes is described here. After the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds, the time when the second forwarding device starts sending multiframes may be the same as or different from the time when the first forwarding device starts sending multiframes. Two cases are described below.

[0093] In the first scenario, after network device A's time synchronization with the first clock source fails and network device A's time synchronization with the second clock source succeeds, the second forwarding device begins sending multiframes at the same time as the first forwarding device begins sending multiframes. For example, the second startup time is also the time when the second forwarding device begins sending multiframes after network device A's time synchronization with the first clock source fails and network device A's time synchronization with the second clock source succeeds. If the phase control device is a network control device in network device A, the phase control device further controls the second forwarding device to begin sending multiframes at the second startup time based on the second indication information.

[0094] The second scenario: After network device A's time synchronization with the first clock source fails and network device A's time synchronization with the second clock source succeeds, the time when the second forwarding device begins sending multiframes is different from the time when the first forwarding device begins sending multiframes. For example, the fourth start-up time is the time when the second forwarding device begins sending multiframes after network device A's time synchronization with the first clock source fails and network device A's time synchronization with the second clock source succeeds. The time difference between the fourth start-up time and the reference time T0 is an integer multiple of the multiframe period. If the phase control device is a network control device in network device A, the phase control device controls the second forwarding device to begin sending multiframes at the fourth start-up time. For example, the phase control device obtains fourth indication information, which indicates the fourth start-up time. The phase control device controls the second forwarding device to begin sending multiframes at the fourth start-up time based on the fourth indication information. In a specific embodiment, the phase control device determines the fourth start-up time based on the reference time T0 and the synchronization time G (i.e., the time when network device A's time synchronization with the second clock source succeeds). The phase control device generates fourth indication information based on the fourth start-up time and sends the fourth indication information to the second forwarding device. The second forwarding device receives the fourth indication information, determines a fourth start time according to the fourth indication information, and starts sending multiframes at the fourth start time.

[0095] Since the fourth start time is the time at which the second forwarding device begins sending multiframes after network device A's time synchronization with the first clock source fails and network device A's time synchronization with the second clock source succeeds, the fourth start time is located after synchronization time G. For example, the time difference between the fourth start time and synchronization time G is greater than the first duration and less than the second duration. This, on the one hand, allows the network control device in network device A sufficient time to generate and send the fourth indication information to the second forwarding device. On the other hand, it prevents the fourth start time from being too far from synchronization time G, resulting in the second forwarding device being unable to send multiframes in a timely manner after network device A's time synchronization with the second clock source succeeds. For example, the fourth start time is the time among multiple alternative time points U that is closest to the reference time point T0. The time difference between each of the multiple alternative time points U and the reference time point T0 is an integer multiple of the multiframe period. Furthermore, the time difference between each of the multiple alternative time points U and synchronization time G is greater than the first duration and less than the second duration.

[0096] Due to the time deviation between different clock sources, after the clock source tracked by network device A changes, the phase of the Tx multiframe of network device A will generally also change. After the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds, network device A can determine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message by performing time slot optimization. Since the first forwarding device stops sending multiframes according to the first indication information after the time synchronization between network device A and the first clock source fails and the time synchronization between network device A and the second clock source succeeds (that is, after the clock source tracked by network device A changes), and starts sending multiframes according to the second indication information at the second start time whose time difference from the reference time T0 is an integer multiple of the multiframe period, it can avoid the phase of the Tx multiframe of network device A changing due to the restart of the first forwarding device during the period when network device A tracks the second clock source. In the case that the phase of the Rx multiframe of network device A remains unchanged before and after the first forwarding device is restarted during the period when network device A tracks the second clock source, the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of network device A and the Tx multiframe of network device A to change. Therefore, after the first forwarding device is restarted during the period when network device A tracks the second clock source, network device A does not need to re-determine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message to ensure that the delay of the service message does not deteriorate. In addition, in the case that the next-hop device of network device A also tracks the second clock source and the path delay from network device A to the next-hop device remains unchanged, the restart of the first forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change. In the case that the phase of the Tx multiframe of the next-hop device remains unchanged before and after the restart of the first forwarding device, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, during the period when the next-hop device of network device A tracks the second clock source, after the first forwarding device is restarted, the next-hop device does not need to re-determine the Tx sub-time slot used to carry the service message and the Rx sub-time slot used to carry the service message to ensure that the delay of the service message is not degraded.

[0097] In an optional embodiment, after the time of all network devices in the communication network where network device A is located is successfully synchronized with the time of the second clock source, the phase control device in network device A executes S703 to S704. For example, after the time of all network devices in the communication network is successfully synchronized with the time of the second clock source, all network devices in the communication network begin sending multiframes at a start time whose time difference from the reference time T0 is an integer multiple of the multiframe period. This ensures that the phases of the Tx multiframes of all network devices in the communication network are the same while tracking the second clock source.

[0098] The above is an introduction to the method embodiments of the present application. The following describes the device embodiments of the present application, which are used to perform the method of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments.

[0099] The embodiment of the present application provides a phase control device, which includes at least one functional module, and the at least one functional module is used to perform the following steps: Figure 7 and Figure 10 The illustrated embodiment provides all or part of the steps of the phase control method. The at least one functional module can be implemented using software, hardware, or a combination of software and hardware, and the at least one functional module can be arbitrarily combined or divided based on the specific implementation. The phase control device can be a network device, a control board, a CPU, a forwarding board, or a forwarding chip, etc. The forwarding board includes at least one of a small-particle dummy board and a small-particle interface board. The network device can be an SPN device.

[0100] As an example, see Figure 12 , which shows a schematic diagram of a phase control device 1200 provided in an embodiment of the present application. The phase control device 1200 is Figure 7 and Figure 10 In the embodiment of the method shown, the network device A, the first forwarding device in the network device A or the network control device in the network device A. The first forwarding device may be a forwarding board or a forwarding chip. The network control device may be a control board or a CPU. The network device A may be Figure 5 or Figure 6 Any network device among network devices 1 to k-1 in the application scenario shown. Figure 12 As shown, the phase control device 1200 includes an acquisition module 1210 and a sending module 1220 .

[0101] The acquisition module 1210 is used to obtain the first indication information, which is used to indicate the first start-up time. The first start-up time is the time when the first forwarding device starts sending the multiframe after being powered on. The time difference between the first start-up time and the reference time is an integer multiple of the multiframe period; the sending module 1220 is used to start sending the multiframe at the first start-up time according to the first indication information.

[0102] In an optional embodiment, the time difference between the first startup moment and the power-on moment of the first forwarding device is greater than the first duration and less than the second duration.

[0103] In an optional embodiment, the first forwarding device includes a forwarding board or an NP chip.

[0104] In an optional embodiment, the forwarding board includes a small-particle dumb board or a small-particle interface board.

[0105] In an optional embodiment, the first forwarding device is in a network device, and before the sending module 1220 sends the multiframe according to the first indication information, the time of the network device is synchronized with the time of the first clock source. The sending module 1220 is further configured to stop sending the multiframe according to the first indication information after the time synchronization of the network device with the first clock source fails and the time synchronization of the network device with the second clock source succeeds. The acquisition module 1210 is further configured to obtain second indication information after the time synchronization of the network device with the first clock source fails and the time synchronization of the network device with the second clock source succeeds, the second indication information being used to indicate a second start time, the time difference between the second start time and the reference time being an integer multiple of the multiframe period. The sending module 1220 is further configured to start sending the multiframe at the second start time according to the second indication information. In this optional embodiment, the time difference between the second start time and the synchronization time can be greater than the first duration and less than the second duration, and the synchronization time is the time when the time of the network device is successfully synchronized with the second clock source.

[0106] In an optional embodiment, the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and the first startup moment is also the moment when the second forwarding device begins sending multiframes after being powered on. The sending module 1220 is configured to send first indication information to the first forwarding device and the second forwarding device, so that the first forwarding device and the second forwarding device begin sending multiframes at the first startup moment according to the first indication information. In this optional embodiment, the time difference between the first startup moment and the power-on moment of the second forwarding device is also greater than the first duration and less than the second duration.

[0107] In an optional embodiment, the first forwarding device and the second forwarding device are in a master-slave protection relationship with each other; the sending module 1220 is configured to send first indication information to the first forwarding device, so that the first forwarding device starts sending multiframes at the first startup time according to the first indication information; the obtaining module 1210 is further configured to obtain third indication information, where the third indication information is used to indicate a third startup time, where the third startup time is the time when the second forwarding device starts sending multiframes after power-on, and the time difference between the third startup time and the reference time is an integer multiple of the multiframe period; the sending module 1220 is further configured to send third indication information to the second forwarding device, so that the third forwarding device starts sending multiframes at the third startup time according to the third indication information. In this optional embodiment, the time difference between the third startup time and the power-on time of the second forwarding device is greater than the first duration and less than the second duration.

[0108] In an optional embodiment, the first forwarding device includes a first forwarding board in the network device or a first NP chip in the network device; the second forwarding device includes a second forwarding board in the network device or a second NP chip in the network device.

[0109] In an optional embodiment, the multiframe is an fgBU multiframe.

[0110] In an optional embodiment, the network device including the first forwarding device is an SPN device.

[0111] Among them, please refer to the following for the functional implementation of the acquisition module 1210: Figure 7 Step S701 in the method embodiment shown and Figure 10 For the relevant description of step S703 in the embodiment of the method shown, please refer to the following for the functional implementation of the sending module 1220. Figure 7 Step S702 in the method embodiment shown and Figure 10 The relevant description of step S704 in the method embodiment is shown.

[0112] In summary, the technical solution provided by the embodiment of the present application is that the first forwarding device in the network device starts sending multiframes at the start-up time when the time difference from the reference time is an integer multiple of the multiframe period. Therefore, restarting the first forwarding device will not cause the phase of the Tx multiframe of the network device to change. If the phase of the Rx multiframe of the network device remains unchanged before and after the restart of the first forwarding device, the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Specifically, if the clock source tracked by the network device remains unchanged before and after the restart of the first forwarding device, the restart of the first forwarding device will not cause the phase of the Tx multiframe of the network device to change; if the clock source tracked by the network device remains unchanged before and after the restart of the first forwarding device and the phase of the Rx multiframe of the network device remains unchanged, the restart of the first forwarding device will not cause the phase difference between the Rx multiframe of the network device and the Tx multiframe of the network device to change. Therefore, after the restart of the first forwarding device, the network device does not need to re-determine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message to ensure that the delay of the service message is not degraded. In addition, when the path delay from the network device to the next-hop device of the network device remains unchanged, for example, when the next-hop device of the network device and the network device track the same clock source and the path delay from the network device to the next-hop device remains unchanged, restarting the first forwarding device will not cause the phase of the Rx multiframe of the next-hop device to change; when the next-hop device and the network device track the same clock source before and after the restart of the first forwarding device and the phase of the Tx multiframe of the next-hop device remains unchanged, the phase difference between the Rx multiframe of the next-hop device and the Tx multiframe of the next-hop device will not change. Therefore, after the first forwarding device is restarted, the next-hop device does not need to re-determine the Tx sub-timeslot used to carry the service message and the Rx sub-timeslot used to carry the service message to ensure that the delay of the service message is not degraded.

[0113] The phase control device provided in the embodiments of the present application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The phase control method provided in the above embodiments can also be implemented using software. When the phase control method provided in the above embodiments is implemented using software, each module in the above phase control device can be a software module.

[0114] The embodiment of the present application provides a phase control device, including a memory and a processor. The memory is used to store a computer program. The processor is used to execute the computer program stored in the memory so that the phase control device performs the following steps: Figure 7 and Figure 10 The illustrated embodiment provides all or part of the steps of the phase control method. The phase control device may be a network device, a control board in the network device, or a forwarding board in the network device. The forwarding board includes at least one of a small-particle dummy board and a small-particle interface board. The network device may be an SPN device.

[0115] As an example, see Figure 13 , which shows a schematic diagram of another phase control device 1300 provided in an embodiment of the present application. The phase control device 1300 is a network device, a control board in a network device, or a forwarding board in a network device. The network device may be Figure 7 and Figure 10 The network device A in the embodiment of the method shown. The network device A may be Figure 5 or Figure 6 Any of the network devices 1 to k-1 in the application scenario shown. The phase control device 1300 can be used to perform Figure 7 and Figure 10 The embodiment of the method shown provides all or part of the steps of the phase control method. Figure 13 The phase control device 1300 includes a processor 1302 , a memory 1304 , a communication interface 1306 , and a bus 1308 . The processor 1302 , the memory 1304 , and the communication interface 1306 are communicatively connected via the bus 1308 . Figure 13The connection manner among the processor 1302 , the memory 1304 , and the communication interface 1306 shown is only an example. The processor 1302 , the memory 1304 , and the communication interface 1306 may also be connected using a connection manner other than the bus 1308 .

[0116] Memory 1304 is used to store computer program 13042, which may include instructions and data. Memory 1304 may be various types of storage media. For example, memory 1304 may be random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, registers, compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these.

[0117] Among them, the processor 1302 can be a general-purpose processor or a dedicated processor. A general-purpose processor can be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 13042) stored in a memory (e.g., memory 1304). The general-purpose processor may use data stored in the memory (e.g., memory 1304) during the execution of the above steps and / or operations. The computer program can be executed to implement, for example, the relevant functions of the aforementioned acquisition module 1210. The general-purpose processor can be a CPU. A dedicated processor is a processor specially designed to perform specific steps and / or operations. The dedicated processor can be a digital signal processor (DSP), ASIC, FPGA, NP chip, etc. The processor 1302 can also be a combination of multiple processors, such as a multi-core processor. The processor 1302 includes at least one circuit to perform all or part of the steps of the above-mentioned embodiment method.

[0118] The communication interface 1306 may include input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., for interconnecting components within the phase control apparatus 1300, as well as interfaces for interconnecting the phase control apparatus 1300 with other devices (e.g., network devices). The physical interface may be a gigabit Ethernet (GE) interface, which may be used to interconnect the phase control apparatus 1300 with other devices. The logical interface is an interface within the phase control apparatus 1300, which may be used to interconnect components within the phase control apparatus 1300. It will be readily understood that the communication interface 1306 may be used for communication between the phase control apparatus 1300 and other devices. For example, the communication interface 1306 may be used to transmit and receive multiframes between the phase control apparatus 1300 and other devices. The communication interface 1306 may implement the functions associated with the aforementioned transmitting module 1220.

[0119] The bus 1308 may be any type of communication bus for interconnecting the processor 1302, the memory 1304, and the communication interface 1306. For example, a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1308 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0120] The aforementioned components in phase control apparatus 1300 may be implemented on separate chips, or at least partially or entirely on the same chip. Whether to independently implement each component on different chips or integrate them onto one or more chips often depends on product design requirements. The embodiments of this application do not limit the specific implementation of the aforementioned components.

[0121] Figure 13 The phase control device 1300 shown is merely exemplary. During implementation, the phase control device 1300 may further include other components, which are not listed here one by one. Figure 13 The phase control apparatus 1300 shown controls the phase of a multiframe by executing all or part of the steps of the phase control method provided in the above embodiment.

[0122] The embodiment of the present application provides a phase control device, including a control board and at least one forwarding board. The control board and the at least one forwarding board are used to implement the following Figure 7 and Figure 10The illustrated embodiment provides all or part of the steps of the phase control method.

[0123] The control board is also referred to as the main control board. The forwarding board can be an interface board or a dumb board (a forwarding board that has forwarding functionality but lacks an external communication interface, where the external communication interface can be a physical interface of a network device). The at least one forwarding board can include at least one of an interface board or a dumb board. In an embodiment of the present application, the forwarding board can be a small-particle dumb board or a small-particle interface board, and thus, the at least one forwarding board includes a small-particle dumb board or a small-particle interface board. Optionally, the phase control device is a network device, which can be an SPN device.

[0124] As an example, see Figure 14 , which shows a schematic diagram of another phase control device 1400 provided in an embodiment of the present application. The phase control device 1400 is a network device or a functional component in a network device. The network device may be Figure 7 and Figure 10 The network device A in the embodiment of the method shown. The network device A may be Figure 5 or Figure 6 Any network device among the network devices 1 to k-1 in the application scenario shown. The phase control device 1400 can be used to perform Figure 7 and Figure 10 All or part of the steps of the phase control method provided by the embodiment of the method shown. Figure 14 As shown, the phase control device 1400 includes: a main control board 1410, an interface board 1430 and an interface board 1440. In the case where the phase control device 1400 includes multiple interface boards, the phase control device 1400 may also include a switching network board ( Figure 14 The switching network board is used to complete data exchange between interface boards (interface boards are also called line cards, service boards, forwarding boards, etc.).

[0125] The main control board 1410 performs functions such as system management, device maintenance, and protocol processing. The interface boards 1430 and 1440 provide various service interfaces and implement service forwarding (e.g., sending multiframes). These service interfaces include POS interfaces, GE interfaces, and asynchronous transfer mode (ATM) interfaces. The main control board 1410 primarily includes three functional units: a system management and control unit, a system clock unit, and a system maintenance unit. The main control board 1410, interface boards 1430, and interface boards 1440 are interconnected via a system bus and the system backplane. The interface board 1430 includes one or more processors 1431. Processors 1431 control and manage the interface boards 1430 and communicate with the central processing unit 1412 on the main control board 1410. The memory 1432 on the interface board 1430 stores various information necessary to execute the aforementioned phase control method. The interface board 1430 also includes one or more network interfaces 1433 for receiving and sending multiframes. The detailed implementation is not detailed here. The main control board 1410 also includes a memory 1414, which is used to store system management information, protocols, etc., which is not limited in this embodiment of the present application.

[0126] like Figure 14 As shown, this embodiment includes multiple interface boards and employs a distributed forwarding mechanism. Under this mechanism, the operations on interface board 1440 are substantially similar to those on interface board 1430. For example, interface board 1440 includes one or more network interfaces 1443 for receiving and transmitting multiframes, a memory 1442 for storing various possible information required to execute the aforementioned phase control method, and a processor 1441 for controlling and managing interface board 1440 and communicating with central processing unit 1412 on main control board 1410. For the sake of brevity, detailed description of interface board 1440 is omitted here.

[0127] Figure 14 The processor 1431 in interface board 1430 and / or the processor 1441 in interface board 1440 can be dedicated hardware or chips, such as a network processor or an application-specific integrated circuit, to implement the aforementioned functions. This implementation is commonly referred to as using dedicated hardware or chips for forwarding plane processing. In other embodiments, the processor 1431 in interface board 1430 and / or the processor 1441 in interface board 1440 can also be a general-purpose processor, such as a central processing unit (CPU).

[0128] In an embodiment of the present application, main control board 1410 may generate indication information indicating a startup time and send the indication information indicating the startup time to interface board 1430 and / or interface board 1440. Interface board 1430 and / or interface board 1440 receive the indication information sent by main control board 1410 and begin sending multiframes at the startup time indicated by the received indication information. In a specific embodiment, a central processing unit in main control board 1410 generates indication information indicating a startup time and sends the indication information indicating the startup time to processor 1431 in interface board 1430 and / or processor 1441 in interface board 1440. Processor 1431 and / or processor 1441 begin sending multiframes at the startup time indicated by the received indication information. For example, processor 1431 and / or processor 1441 includes a TDM scheduler, and the TDM scheduler begins sending multiframes at the startup time indicated by the indication information.

[0129] It should be noted that there may be one or more main control boards, including active and standby boards. There may also be one or more interface boards. The higher the data processing capabilities of a network device, the more interface boards it provides. With multiple interface boards, they can communicate with each other through one or more switching fabric boards (SFMs). Multiple SFMs can implement load balancing, redundancy, or active / standby protection. In a centralized forwarding architecture, network devices may not require SFMs; the interface boards handle service data processing for the entire system. In a distributed forwarding architecture, network devices include multiple interface boards, which can exchange data between them through SFMs, providing high-capacity data exchange and processing capabilities. Therefore, network devices with distributed architectures offer greater data access and processing capabilities than those with centralized architectures. The specific architecture to adopt depends on the network deployment scenario and is not defined here.

[0130] In an optional embodiment, the memory 1432 and / or the memory 1442 is a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these. The memory 1432 can exist independently and be connected to the processor 1431 via a communication bus, or it can be integrated with the processor 1431. The memory 1442 can exist independently and be connected to the processor 1441 via a communication bus, or it can be integrated with the processor 1441.

[0131] The memory 1432 is used to store program codes, and is controlled by the processor 1431 to execute part or all of the steps of the phase control method provided in the above embodiment. The processor 1431 is used to execute the program codes stored in the memory 1432. The program codes may include one or more software modules. The one or more software modules may be the above Figure 12 All or part of the functional modules provided in the illustrated embodiments. Memory 1442 may also be used to store program code, and the processor 1441 controls execution thereof to execute some or all of the steps of the phase control method provided in the above embodiments. Similarly, memory 1414 may also be used to store program code, and the central processing unit 1412 controls execution thereof to execute some or all of the steps of the phase control method provided in the above embodiments.

[0132] In an optional implementation, the network interface 1433 and the network interface 1443 can be a device using any transceiver type for communicating with other devices or communication networks. For example, the communication network can be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), SPN, etc., which is not limited to this embodiment of the present application.

[0133] Based on the same inventive concept, an embodiment of the present application provides a communication system. The communication system includes a plurality of network devices, the plurality of network devices are communicatively connected, and at least one of the plurality of network devices includes: Figures 12 to 14 Any of the phase control devices shown.

[0134] For example, the communication system is as follows Figure 5 or Figure 6 shown.

[0135] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed (for example, by a network device, a phase control device, a main control board, a forwarding board, a CPU, a forwarding chip, etc.), the following is achieved: Figure 7 and Figure 10 The illustrated method embodiment provides all or part of the steps of the phase control method.

[0136] Based on the same inventive concept, an embodiment of the present application provides a computer program product, which includes a program or code. When the program or code is executed (for example, by a network device, a phase control device, a main control board, a forwarding board, a CPU, a forwarding chip, etc.), the following is achieved: Figure 7 and Figure 10 The illustrated method embodiment provides all or part of the steps of the phase control method.

[0137] Based on the same inventive concept, an embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and the chip is used to implement the following when it is running: Figure 7 and Figure 10 The illustrated method embodiment provides all or part of the steps of the phase control method.

[0138] Optionally, the chip is a forwarding chip, for example, an NP chip.

[0139] It should be noted that in an embodiment of the present application, after the forwarding device in the network device is restarted, the network device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message, and can also ensure that the delay of the service message is not degraded. It can be: when the networking of the communication network to which the network device belongs remains unchanged, after the forwarding device is restarted, the network device does not need to redetermine the Tx sub-time slot for carrying the service message and the Rx sub-time slot for carrying the service message, and can also ensure that the delay of the service message is not degraded.

[0140] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk).

[0141] It should be understood that the term "at least one" in this application refers to one or more, and "a plurality of" refers to two or more. In this application, unless otherwise specified, the symbol " / " generally means or, for example, A / B can mean A or B. The term "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, for the sake of clarity of description, this application uses words such as "first", "second", and "third" to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art will understand that words such as "first", "second", and "third" do not limit the quantity and execution order.

[0142] Different types of embodiments, such as method embodiments and device embodiments, provided in the embodiments of the present application can refer to each other. The order of operations of the method embodiments can be appropriately adjusted, and the operations can be increased or decreased in response to the situation. Any technician familiar with this technical field can easily think of different methods within the technical scope disclosed in this application, and they should all be covered within the scope of protection of this application, so they will not be repeated here.

[0143] In the corresponding embodiments provided in the present application, it should be understood that the disclosed devices and the like can be implemented through other structural methods. For example, the device embodiments described above are merely illustrative. For example, the division of modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical or other forms. The modules described as separate components may or may not be physically separated, and the components described as modules may or may not be physical modules, and may be located in one place or distributed on multiple network nodes. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0144] The above description is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A phase control method, characterized in that: The method comprises: Obtain first indication information, where the first indication information is used to indicate a first startup time, where the first startup time is a time when the first forwarding device starts sending multiframes after being powered on, and a time difference between the first startup time and a reference time is an integer multiple of a multiframe period; Start sending multiframes at the first startup time according to the first indication information.

2. The method according to claim 1, characterized in that The time difference between the first startup time and the power-on time of the first forwarding device is greater than the first duration and less than the second duration.

3. The method according to claim 1 or 2, characterized in that The first forwarding device includes a forwarding board or a network processor NP chip.

4. The method according to claim 3, characterized in that The forwarding board includes a small-particle dumb board or a small-particle interface board.

5. The method according to any one of claims 1 to 4, characterized in that The first forwarding device is in a network device, and before sending the multiframe according to the first indication information, the time of the network device is synchronized with the time of the first clock source. The method further includes: After synchronization between the time of the network device and the time of the first clock source fails and synchronization between the time of the network device and the time of the second clock source succeeds, stop sending multiframes according to the first indication information and obtain second indication information, where the second indication information is used to indicate a second start time, and a time difference between the second start time and the reference time is an integer multiple of the multiframe period; Start sending multiframes at the second startup time according to the second indication information.

6. The method according to any one of claims 1 to 5, characterized in that The first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and the first startup time is also the time when the second forwarding device starts sending multiframes after being powered on; The starting to send multiframes at the first startup time according to the first indication information includes: controlling the first forwarding device and the second forwarding device to start sending multiframes at the first startup time according to the first indication information.

7. The method according to any one of claims 1 to 5, characterized in that The first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and starting to send multiframes at the first startup time according to the first indication information includes: controlling the first forwarding device to start sending multiframes at the first startup time according to the first indication information; The method also includes: obtaining third indication information, where the third indication information is used to indicate a third start-up time, where the third start-up time is the time when the second forwarding device starts sending multiframes after being powered on, and the time difference between the third start-up time and the reference time is an integer multiple of the multiframe period; and controlling the second forwarding device to start sending multiframes at the third start-up time according to the third indication information.

8. The method according to claim 6 or 7, characterized in that The first forwarding device includes a first forwarding board in the network device or a first NP chip in the network device; The second forwarding device includes a second forwarding board in the network device or a second NP chip in the network device.

9. The method according to any one of claims 1 to 8, characterized in that The multiframe is a fine-grained basic unit fgBU multiframe.

10. A phase control device, characterized in that: The phase control device comprises: an acquisition module, configured to acquire first indication information, where the first indication information is used to indicate a first startup time, where the first startup time is a time when the first forwarding device starts sending multiframes after being powered on, and a time difference between the first startup time and a reference time is an integer multiple of a multiframe period; A sending module is used to start sending multiframes at the first startup time according to the first indication information.

11. The phase control device according to claim 10, wherein: The time difference between the first startup time and the power-on time of the first forwarding device is greater than the first duration and less than the second duration.

12. The phase control device according to claim 10 or 11, characterized in that: The first forwarding device includes a forwarding board or a network processor NP chip.

13. The phase control device according to claim 12, wherein: The forwarding board includes a small-particle dumb board or a small-particle interface board.

14. The phase control device according to any one of claims 10 to 13, characterized in that: The first forwarding device is in the network device, and before the sending module sends the multiframe according to the first indication information, the time of the network device is synchronized with the time of the first clock source. The sending module is further configured to stop sending multiframes according to the first indication information after the time synchronization between the network device and the first clock source fails and the time synchronization between the network device and the second clock source succeeds; The acquisition module is further configured to acquire second indication information after synchronization between the time of the network device and the time of the first clock source fails and synchronization between the time of the network device and the time of the second clock source succeeds, where the second indication information is used to indicate a second startup time, and a time difference between the second startup time and the reference time is an integer multiple of the multiframe period; The sending module is further configured to start sending multiframes at the second start time according to the second indication information.

15. The phase control device according to any one of claims 10 to 14, characterized in that: The first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and the first startup time is also the time when the second forwarding device starts sending multiframes after being powered on; The sending module is configured to send the first indication information to the first forwarding device and the second forwarding device, so that the first forwarding device and the second forwarding device start sending multiframes at the first startup time according to the first indication information.

16. The phase control device according to any one of claims 10 to 14, characterized in that: The first forwarding device and the second forwarding device are in a master-slave protection relationship with each other, and the sending module is used to send the first indication information to the first forwarding device, so that the first forwarding device starts sending multiframes at the first startup time according to the first indication information; The acquisition module is further configured to acquire third indication information, where the third indication information is used to indicate a third start time, where the third start time is the time when the second forwarding device starts sending multiframes after being powered on, and the time difference between the third start time and the reference time is an integer multiple of the multiframe period; The sending module is further configured to send the third indication information to the second forwarding device, so that the third forwarding device starts sending multiframes at the third start time according to the third indication information.

17. The phase control device according to claim 15 or 16, characterized in that: The first forwarding device includes a first forwarding board in the network device or a first NP chip in the network device; The second forwarding device includes a second forwarding board in the network device or a second NP chip in the network device.

18. The phase control device according to any one of claims 10 to 17, characterized in that: The multiframe is a fine-grained basic unit fgBU multiframe.

19. The phase control device according to any one of claims 10 to 18, characterized in that: The network device including the first forwarding device is a packet transport network SPN device.

20. A phase control device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so that the phase control device performs the phase control method according to any one of claims 1 to 9.

21. A communication system, characterized in that: The system comprises a plurality of network devices, the plurality of network devices are communicatively connected, and at least one network device among the plurality of network devices comprises the phase control apparatus according to any one of claims 10 to 20.

22. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed, the phase control method according to any one of claims 1 to 9 is implemented.

23. A computer program product, characterized in that The computer program product includes a program or code, and when the program or code is executed, the phase control method according to any one of claims 1 to 9 is implemented.