Data transmission method and apparatus

WO2026179174A1PCT designated stage Publication Date: 2026-09-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/126974
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-25
Filing Date
2025-10-11
Publication Date
2026-09-03

Smart Images

  • Figure CN2025126974_03092026_PF_FP_ABST
    Figure CN2025126974_03092026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a data transmission method and apparatus. The method comprises: when it is determined that a channel for transmitting service data needs to be switched, sending, by means of a first channel and a second channel, an optical signal carrying a first data frame, wherein the first data frame carries the service data, and optical wavelengths corresponding to the first channel and the second channel are different; determining that a second data frame carrying the service data carries first indication information, so as to indicate the receiving of data frames from the second channel and / or discarding of data frames from the first channel; and respectively sending, by means of the first channel and the second channel, an optical signal carrying the second data frame and an optical signal carrying a third data frame, wherein the third data frame is transmitted after the second data frame. By means of transmitting, via both the first channel and the second channel, data frames carrying the service data and carrying the first indication information in the second data frame, after receiving the second data frame, a receiving device can switch a channel for transmitting the service data, thereby avoiding a wavelength conflict and improving the reliability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Methods and apparatus for data transmission

[0001] This application claims priority to Chinese Patent Application No. 202510214491.8, filed on February 25, 2025, with the China National Intellectual Property Administration, entitled “Method and Apparatus for Data Transmission,” the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of optical communications, and more specifically, to a method and apparatus for data transmission. Background Technology

[0003] Optical networks are a type of transmission network capable of transmitting, multiplexing, routing, and monitoring service data. Optical networks are gradually evolving towards ultra-high-speed transmission technologies, with 100G and 400G optical transport network (OTN) technologies becoming the primary choice for transmission networks.

[0004] As optical network scales up, wavelength conflicts may arise when using wavelength division multiplexing (WDM) technology to transmit optical signals. For example, when multiple wavelengths are used to transmit service data between two OTN devices, data from other services may be routed through all or some of those wavelengths. Since each wavelength channel is unique and cannot be reused on the same fiber optic link, wavelength conflicts can occur. Existing solutions can resolve wavelength conflicts by changing the wavelength of the optical signal using the optical modules in the OTN device. However, this usually requires reconfiguring the optical modules, which can lead to prolonged service interruptions and negatively impact the user experience. Summary of the Invention

[0005] This application provides a method and apparatus for data transmission, which can realize flexible switching of optical wavelengths during data transmission, avoid optical wavelength conflicts, and thus improve the continuity and reliability of data transmission.

[0006] Firstly, a method for data transmission is provided. This method can be executed by a first OTN device or by a component of the first OTN device (e.g., a chip, circuit, or chip system), and this application does not limit the scope of the method. The following description uses the example of execution by a first OTN device.

[0007] The method includes: when it is determined that the channel for transmitting first service data needs to be switched, sending optical signals carrying first data frames to a second OTN device through a first channel and a second channel respectively, wherein the wavelength corresponding to the optical signal transmitted through the first channel is a first wavelength, the wavelength corresponding to the optical signal transmitted through the second channel is a second wavelength, the second channel is a spare channel, and the first data frame carries the first service data; determining that a second data frame carrying the first service data carries first indication information, the second data frame being sent after the first data frame, the first indication information indicating receiving data frames from the second channel and / or discarding data frames from the first channel; sending optical signals carrying the second data frames to the second OTN device through the first channel and the second channel respectively; sending optical signals carrying third data frames to the second OTN device through the first channel and the second channel respectively, the third data frame including data frames carrying the first service data transmitted after the second data frame, the third data frame being received through the second channel.

[0008] Based on the above scheme, when it is determined that the channel for transmitting service data needs to be switched, by sending two data frames carrying the service data and carrying the first indication information in a second data frame included in the data frame, the second OTN device can switch the channel for transmitting the data frame carrying the service data after receiving the second data frame, thereby avoiding wavelength conflicts and improving the continuity and reliability of data transmission.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the first time when the first data frame transmitted through the second channel arrives at the second OTN device is later than the second time when the first data frame transmitted through the first channel arrives at the second OTN device.

[0010] Based on the above scheme, by setting the first moment later than the second moment, the continuity of data transmission of the second OTN device during the channel switching process can be guaranteed.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the first data frame is cached in a first buffer queue and after waiting for a first duration, the second optical signal carrying the first data frame is sent to the second OTN device through the second channel.

[0012] Based on the above scheme, by caching the data frame transmitted through the second channel to the cache queue, the first moment can be later than the second moment, thereby ensuring the continuity of data transmission of the second OTN device during channel switching.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, the first duration is related to the size of the first buffer queue, and the size of the first buffer queue is related to at least one of the following: the first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, the first instruction information is carried in the overhead area of ​​the second data frame.

[0015] Based on the above scheme, by carrying the first indication information in the overhead area of ​​the data frame carrying service data, the switching process of the second OTN device can be simplified and the performance of data transmission can be improved.

[0016] Secondly, a method for data transmission is provided. This method can be executed by a second OTN device or by a component of the second OTN device (e.g., a chip, circuit, or chip system), and this application does not limit the scope of the method. The following description uses the example of execution by a second OTN device.

[0017] The method includes: receiving optical signals carrying a first data frame from a first OTN device through a first channel and a second channel, respectively. The wavelength corresponding to the optical signal transmitted through the first channel is a first wavelength, and the wavelength corresponding to the optical signal transmitted through the second channel is a second wavelength. The second channel is a spare channel, and the first data frame carries first service data. The method also includes: receiving the first data frame transmitted through the first channel and discarding the first data frame transmitted through the second channel; receiving optical signals carrying a second data frame from the first OTN device through the first channel and the second channel, respectively. The second data frame carries the first service data and carries first indication information indicating that the data frame from the second channel should be received and / or the data frame from the first channel should be discarded; receiving optical signals carrying a third data frame from the first OTN device through the first channel and the second channel, respectively. The third data frame includes a data frame carrying the first service data transmitted after the second data frame; and receiving the third data frame transmitted through the second channel according to the first indication information, and discarding the third data frame transmitted through the first channel.

[0018] Based on the above scheme, after receiving the first indication information, the second OTN device switches from receiving data frames carrying service data through the first channel to receiving data frames carrying service data through the second channel, thereby avoiding wavelength conflicts and improving the continuity and reliability of data transmission.

[0019] In conjunction with the second aspect, in some implementations of the second aspect, the first time when the first data frame transmitted through the second channel arrives at the second OTN device is later than the second time when the first data frame transmitted through the first channel arrives at the second OTN device.

[0020] In conjunction with the second aspect, in some implementations of the second aspect, the time interval between the first moment and the second moment is a first duration, which is related to the size of the first buffer queue. The size of the first buffer queue is related to at least one of the following: the first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

[0021] In conjunction with the second aspect, in some implementations of the second aspect, the received data frames from the first OTN device are buffered in a second buffer queue and sent after a second duration.

[0022] Based on the above scheme, by caching the received data frames from the first OTN device into a second buffer queue and sending them after a second duration, it can be ensured that the optical transceiver of the second OTN device is not idle, thus ensuring the reliability of data transmission.

[0023] In conjunction with the second aspect, in some implementations of the second aspect, the second duration is related to the size of the second buffer queue, the size of the second buffer queue being related to at least one of the following: a switching duration, which is the duration for the second OTN device to switch channels for receiving data frames; or the size of a first buffer queue, which is used to buffer data frames sent by the first OTN device to the second OTN device through the second channel.

[0024] In conjunction with the second aspect, in some implementations of the second aspect, the first instruction information is carried in the overhead area of ​​the second data frame.

[0025] Thirdly, a data transmission apparatus is provided, comprising a transceiver unit and a processing unit. The transceiver unit is configured to, upon determining that a channel for transmitting first service data needs to be switched, respectively transmit optical signals carrying a first data frame to a second OTN device via a first channel and a second channel. The first data frame carries the first service data. The wavelength corresponding to the optical signal transmitted via the first channel is a first wavelength, and the wavelength corresponding to the optical signal transmitted via the second channel is a second wavelength. The second channel is a backup channel. The processing unit is configured to determine that a second data frame carrying the first service data carries first indication information. The second data frame is transmitted after the first data frame. The first indication information indicates receiving a data frame from the second channel and / or discarding a data frame from the first channel. The transceiver unit is further configured to: transmit optical signals carrying the second data frame to the second OTN device via the first channel and the second channel; and transmit optical signals carrying a third data frame to the second OTN device via the first channel and the second channel. The third data frame includes a data frame carrying the first service data transmitted after the second data frame, and the third data frame is transmitted via the second channel.

[0026] In conjunction with the third aspect, in some implementations of the third aspect, the first time the first data frame transmitted through the second channel arrives at the second OTN device is later than the second time the first data frame transmitted through the first channel arrives at the second OTN device.

[0027] In conjunction with the third aspect, in some implementations of the third aspect, the transceiver unit is used to buffer the first data frame into a first buffer queue and wait for a first duration before sending the second optical signal carrying the first data frame to the second OTN device through the second channel.

[0028] In conjunction with the third aspect, in some implementations of the third aspect, the first duration is related to the size of the first buffer queue, and the size of the first buffer queue is related to at least one of the following: the first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

[0029] In conjunction with the third aspect, in some implementations of the third aspect, the first indication information is carried in the overhead area of ​​the second data frame.

[0030] Fourthly, a data transmission apparatus is provided, comprising a transceiver unit and a processing unit. The transceiver unit is configured to: receive optical signals carrying first data frames from a first OTN device via a first channel and a second channel, respectively; wherein the wavelength corresponding to the optical signal transmitted via the first channel is a first wavelength, and the wavelength corresponding to the optical signal transmitted via the second channel is a second wavelength, the second channel being a backup channel; and wherein the first data frame carries first service data; receive the first data frame transmitted via the first channel, and discard the first data frame transmitted via the second channel; and receive optical signals from the first OTN device via the first channel and the second channel, respectively. The OTN device carries an optical signal carrying a second data frame, which carries the first service data and a first indication information indicating that a data frame from the second channel is received and / or a data frame from the first channel is discarded. The device also receives an optical signal carrying a third data frame from the first OTN device via both the first and second channels. The third data frame includes a data frame carrying the first service data transmitted after the second data frame. The device receives the third data frame transmitted via the second channel and discards the third data frame transmitted via the first channel according to the first indication information.

[0031] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the first time the first data frame transmitted through the second channel arrives at the second OTN device is later than the second time the first data frame transmitted through the first channel arrives at the second OTN device.

[0032] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the time interval between the first moment and the second moment is a first duration, which is related to the size of the first buffer queue. The size of the first buffer queue is related to at least one of the following: the first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

[0033] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the transceiver unit is also used to buffer the received data frames from the first OTN device into a second buffer queue and send them after a second duration.

[0034] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second duration is related to the size of the second buffer queue, the size of the second buffer queue being related to at least one of the following: a switching duration, which is the duration for the second OTN device to switch channels for receiving data frames; or, the size of a first buffer queue, which is used to buffer data frames sent by the first OTN device to the second OTN device through the second channel.

[0035] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the first indication information is carried in the overhead area of ​​the second data frame.

[0036] Fifthly, a communication device is provided, comprising: a processor configured to be coupled to a memory, and, after reading instructions from the memory, to execute the method as described in any of the preceding aspects according to the instructions. The communication device may be an OTN device as described in the first or second aspect, or an apparatus comprising such an OTN device.

[0037] In conjunction with the fifth aspect, in one possible implementation, the communication device further includes a memory for storing necessary program instructions and data.

[0038] In conjunction with the fifth aspect, in one possible implementation, the communication device is a chip or a chip system. Optionally, when the communication device is a chip system, it can be composed of chips or may include chips and other discrete components.

[0039] A sixth aspect provides a communication device, comprising: a processor and an interface circuit; the interface circuit being configured to receive a computer program or instructions and transmit them to the processor; the processor being configured to execute the computer program or instructions to cause the communication device to perform the methods described in the first or second aspect above.

[0040] In conjunction with the sixth aspect above, in one possible implementation, the communication device is a chip or a chip system. Optionally, when the billing device is a chip system, it can be composed of chips or may include chips and other discrete components.

[0041] A seventh aspect provides a communication system comprising a first OTN device and a second OTN device as described in the first and second aspects above. The first OTN device is configured to perform the method described in the first aspect, and the second OTN device is configured to perform the method described in the second aspect.

[0042] Eighthly, a computer program product is provided, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the preceding aspects.

[0043] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium, wherein the first storage medium can be packaged together with the processor or packaged separately from the processor. This application embodiment does not specifically limit this.

[0044] Ninthly, a computer-readable medium is provided that stores program code, which, when run on a computer, causes the computer to perform the methods described in the preceding aspects.

[0045] In a tenth aspect, a chip system is provided, including a memory and a processor, the memory for storing a computer program and the processor for calling and running the computer program from the memory, such that a communication device equipped with the chip system performs the methods of any of the first to second aspects and their possible implementations described above.

[0046] The chip system may include an input chip or interface for transmitting information or data, and an output chip or interface for receiving information or data.

[0047] Eleventhly, an optical module is provided, comprising: a signal processor and an optical transmitting component, wherein the signal processor executes the method provided in the first aspect or its implementation thereof; and the optical transmitting component is used to convert data frames into optical signals and transmit the optical signals.

[0048] The beneficial effects of the third to eleventh aspects mentioned above can be referred to in the description of the beneficial effects in the first and second aspects, and will not be repeated here. Attached Figure Description

[0049] Figure 1 is a schematic diagram of the application scenarios applicable to this application.

[0050] Figure 2 is a structural schematic diagram of an OTN device applicable to this application.

[0051] Figure 3 is a schematic diagram of the process of OTN equipment processing optical signals.

[0052] Figure 4 is a schematic diagram of an optical signal transmission scenario.

[0053] Figure 5 is a schematic diagram of lossless transmission of OTN services.

[0054] Figure 6 is a schematic flowchart of a data transmission method 600 provided in this application.

[0055] Figure 7 is a schematic diagram of data transmission between devices provided in this application.

[0056] Figure 8 is a schematic block diagram of a data transmission device 800 provided in this application.

[0057] Figure 9 is a schematic diagram of the structure of a data transmission device 900 provided in this application.

[0058] Figure 10 is a schematic diagram of a chip system 1000 provided in this application. Detailed Implementation

[0059] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0060] The embodiments of this application are applicable to optical networks, such as OTNs. An OTN is typically composed of multiple optical switch network (OSN) devices connected by optical fibers, and can be configured into different topologies such as linear, ring, and mesh according to specific needs.

[0061] Figure 1 is a schematic diagram of the application scenario to which this application is applicable. As shown in Figure 1, this application can be applied to a communication system 100 that includes an OTN and multiple client devices (client devices #1 to #6 as shown in Figure 1). The OTN includes multiple interconnected OTN devices (OTN devices #1 to #4 as shown in Figure 1).

[0062] It should be understood that Figure 1 only shows the OTN devices used to connect customer equipment. In practical applications, OTN may include more devices, which are not shown in Figure 1. Furthermore, the specific connection relationships between OTN devices are not shown in Figure 1. The connection methods between OTN devices can be found in current related technologies, and are not limited thereto.

[0063] It should also be understood that OTN devices in an OTN network can be connected via optical fiber. Depending on specific needs, OTN networks can be configured in different topologies such as linear, ring, and mesh.

[0064] The customer equipment can also be referred to as customer premises equipment (CPE). This application does not limit the specific form of the customer equipment. For example, the customer equipment can be a terminal that communicates with OTN equipment. The terminal can also be referred to as terminal equipment, access terminal, user unit, user station, mobile station, mobile device, wireless communication equipment, user agent, or user device. The customer equipment can also be equipment that needs to transmit business data.

[0065] Depending on the specific needs, an OTN device may possess different functions. Generally speaking, OTN devices can be categorized into optical layer devices, electrical layer devices, and hybrid optoelectronic devices. Optical layer devices refer to those capable of processing optical layer signals, such as optical amplifiers (OA) and optical add-drop multiplexers (OADMs). OAs, also known as optical line amplifiers (OLAs), are primarily used to amplify optical signals to support longer transmission distances while maintaining specific optical signal performance. OADMs are used to spatially transform optical signals, allowing them to be output from different output ports (sometimes referred to as directions). Electrical layer devices refer to those capable of processing electrical layer signals, such as devices capable of processing OTN signals. Hybrid optoelectronic devices refer to devices capable of processing both optical and electrical layer signals. It should be understood that, depending on specific integration requirements, an OTN device can integrate multiple different functions. The technical solutions provided in this application are applicable to OTN devices with different forms and integration levels that include electrical layer functions.

[0066] Figure 2 is a structural schematic diagram of an OTN device. As shown in Figure 2, an OTN device may include one or more of a tributary board, a line board, and a cross-connect board. An OTN device may also include one or more of a system control board, a power supply, a fan, and auxiliary boards.

[0067] Among them, tributary boards, cross-connect boards, and circuit boards are mainly used to process the electrical layer signals of OTN (also known as OTN frames).

[0068] Tributary boards can be used to receive and transmit various client signals (also known as client services). Client signals can include constant bit rate (CBR) signals (e.g., synchronous digital hierarchy (SDH) signals) and packet signals (e.g., Ethernet signals). Tributary boards can include client-side optical modules and signal processors. The client-side optical modules can be used to receive and / or transmit client signals; the signal processors can be used to perform mapping and demapping processing of client signals to OTN frames. The signal processor can be located inside or outside the client-side optical module. If the signal processor is a combination of multiple chips, one (or some) of the chips can be inside the client-side optical module, while the others can be outside.

[0069] Cross-connect boards are mainly used to implement the switching of OTN frames, such as completing the switching of one or more types of OTN frames.

[0070] The circuit board is primarily used for processing OTN frames on the line side. The circuit board may include a line-side optical module and a signal processor. The line-side optical module, also known as an optical transceiver, is mainly used to receive and / or transmit optical signals carrying OTN frames. The signal processor can be used to perform multiplexing and demultiplexing, or mapping and demapping, of the OTN frames on the line side. The signal processor can be located inside or outside the line-side optical module. If the signal processor is a combination of multiple chips, one (or some) of the chips may be inside the line-side optical module, while the others may be outside. The customer-side optical module or the line-side optical module can also be collectively referred to as an optical module or an optical transceiver. The signal processor in the customer-side optical module or the line-side optical module can be an optical digital signal processor (oDSP) or a framer, or a combination of a framer and an oDSP.

[0071] System control boards can be used for system control. They can collect information from different boards or send control commands to the corresponding boards; power supply boards are used to power OTN devices, and power supplies can include primary and backup power supplies; fan boards are mainly used for cooling the devices; auxiliary boards are mainly used to provide external alarms or connect to external clocks, etc.

[0072] It should be understood that the type and number of boards included in each device may vary depending on specific needs. For example, an OTN device acting as a core node may not have tributary boards, while an OTN device acting as an edge node may have multiple tributary boards.

[0073] Each device may contain one or more specific components (such as tributary boards), and this application makes no restrictions on this. This application also makes no restrictions on the type of boards included in the device, or on the functional design and number of those boards. In a specific implementation, the two boards mentioned above may also be designed as a single board. Furthermore, OTN devices may also include backup power supplies, fans for device cooling, auxiliary boards for providing external alarms or connecting to external clocks, etc.

[0074] It should be understood that the structure of the OTN device shown in Figure 2 is only an example. This application does not limit the structure of the OTN device. It can be an existing OTN device or an OTN device developed in the future.

[0075] It should be understood that the method provided in this application can be applied to optical transport networks, such as the communication system shown in Figure 1. However, the embodiments of this application do not limit the scenarios in which the method can be applied. For example, it is also applicable to other communication systems that include devices capable of performing the corresponding functions (such as OTN devices or other communication devices).

[0076] In this application, when transmitting service data of a client equipment in an OTN, the service data can be encapsulated in an OTN frame for transmission. This OTN frame can be an optical data unit (ODU) k, ODU n, ODUflex, or an optical transport unit (OTU) k, OTUC n, or a flexible OTN (FlexO) frame, etc. It should be understood that as OTN technology develops, new types of OTN frames may be defined, which will also apply to this application.

[0077] The customer signals involved in this application can refer to services carried by optical transport networks or metropolitan area transport networks, such as Ethernet services, packet services, or wireless backhaul services. Customer signals can also be referred to as customer-side signals, client signals, service signals, service data, customer data, or customer service data, etc.

[0078] Wavelength division multiplexing (WDM) technology allows the simultaneous transmission of multiple optical signals of different wavelengths within the same optical fiber. Each wavelength can carry an independent data stream, and the transmission between wavelengths is independent of each other, thereby improving the transmission capacity and efficiency of the optical fiber. Specifically, at the transmitting end, optical signals of different wavelengths are combined (multiplexed), and these signals are coupled onto the same optical fiber in the cable line using a multiplexer (e.g., a wavelength selective switch (WSS) or a multiplexer (MUX)). At the receiving end, these combined signals of different wavelengths are separated (demultiplexed) using a demultiplexer (e.g., a WSS or a demultiplexer (DeMUX)), and then transmitted separately to different terminal devices for further processing to recover the original signal.

[0079] Figure 3 illustrates the process of OTN equipment processing multiplexed optical signals. In Figure 3, the original data stream is an electrical signal carrying the service data to be transmitted. After processing by the OTN framing chip, the original data stream generates OTN frames according to the OTN frame format, which are still electrical signals. The OTN frames are then input into the OTN optical module, where they undergo electro-optical conversion to form an optical signal output with a specific wavelength. As an example, the electro-optical conversion can be performed by an optical transponder unit (OTU), that is, the OTU converts the electrical signal into an optical signal. The OTN optical module can include multiple OTUs to output optical signals of different wavelengths, for example, optical signals with wavelengths of λ1 or λ3. The single-channel optical signals of different wavelengths output by the OTUs are combined into a single multi-channel optical signal in a wavelength division multiplexer, thus completing the multiplexing of different wavelengths. Subsequently, the multiplexed optical signal can be amplified by an optical fiber amplifier and then transmitted through the interface board of the facilities interface unit (FIU) into the optical fiber. In addition, for the transmission of uplink business data, the OTN optical module can demultiplex the combined optical signal to obtain single optical signals of different wavelengths. For example, the combined optical signal of λ2 and λ4 can be demultiplexed to obtain an optical signal with wavelength λ2 and an optical signal with wavelength λ4. The optical signal is then converted into an electrical signal and sent to the OTN framing chip for processing.

[0080] As optical network scales up, wavelength conflicts may occur when using WDM technology to transmit optical signals. For example, when multiple wavelengths (such as wavelength #1) are used to transmit service data between two OTN devices, data from other services may be scheduled to be transmitted through these two OTN devices. If this other service data is carried by wavelength #1, a wavelength conflict occurs, meaning wavelength #1 is already occupied by other services and cannot be used directly. Figure 4 illustrates a scenario of optical signal transmission. As shown in Figure 4, the original routing path for service data #1 is NE1→NE5→NE4, and the wavelengths carrying service data #1 include wavelength #30. Now, the routing path for service data #1 is reconfigured according to the link status to NE1→NE2→NE3→NE4. However, wavelengths #1 to #30 of the current NE1→NE2→NE3→NE4 link are already used to carry other service data, resulting in a wavelength conflict. In existing solutions, wavelength conflict can be resolved by changing the wavelength of the optical signal through the optical module in the OTN device. However, this solution usually requires reconfiguring the optical module, which may result in a long service interruption and affect the user's service experience.

[0081] In addition, in the existing scheme, in order to improve the continuity and reliability of business data transmission, the data stream of the same OTN service can be transmitted through the main link and backup link (corresponding to two wavelengths) between OTN devices. As long as either link (wavelength) is normal, the lossless transmission of OTN services can be guaranteed.

[0082] Figure 5 illustrates a lossless transmission method for OTN services. As shown in Figure 5, NE1 and NE2 network elements are connected via two links (wavelengths). When transmitting service data, the NE1 side first adds a number (e.g., 0 to 2) to each data packet of the service data in the overhead of the OTN frame. n (where n is the number of bits used for numbering), and then each data packet is copied and sent to both links (wavelengths); NE2 receives data packets from both links and sorts them by number, selecting the correct packet to dequeue according to its sequence number. Therefore, receiving a normal data packet on either link (wavelength) on the NE2 side guarantees lossless transmission of service data. For example, NE1 sends packets numbered 1, 2, 3, and 4 in sequence, and NE2 receives data packets from both the primary and backup links and buffers them; NE2 sorts the buffered data packets and dequeues them in sequence; when a data packet on the primary link is lost, NE2 can receive the corresponding numbered data packet from the backup link, ensuring that the transmission of service data is not damaged, as shown in Figure 5. When the data packet numbered 3 on the primary link is lost, NE2 selects and receives the data packet numbered 3 from the backup link.

[0083] In the above schemes, to ensure lossless transmission of service data, high demands are placed on the processing capabilities of OTN equipment, which is not conducive to expansion in large-scale optical networks. For example, the receiving end needs to receive data packets from both the primary and backup links simultaneously, which requires twice the backplane bandwidth at the receiving end. For high-capacity OTN equipment, backplane bandwidth may become a bottleneck. In addition, the receiving end needs to buffer data packets from both the primary and backup links, requiring a large buffer. Furthermore, the receiving end needs to sort the data packets from the primary and backup links, which is complex and requires consideration of abnormal scenarios such as number reversal, data packet number loss, and aging.

[0084] In view of this, this application provides a method and apparatus for data transmission, which can avoid wavelength conflicts by sending service messages between devices. This method can improve the continuity and reliability of service data transmission. Furthermore, this method is easy to implement, reduces the requirements for device processing capabilities, and facilitates solution expansion.

[0085] Figure 6 is a schematic flowchart of a data transmission method 600 provided in this application. This method can be executed by a first OTN device, or by an internal component (such as a chip or chip system) of the first OTN device. The following description uses the execution by the first OTN device as an example. The method includes the following steps.

[0086] S610, if it is determined that the channel for transmitting the first service data needs to be switched, the first OTN device sends an optical signal carrying the first data frame to the second OTN device through the first channel and the second channel respectively. Correspondingly, the second OTN device receives the optical signal carrying the first data frame through the first channel and the second channel.

[0087] For example, the optical signal sent by the first OTN device to the second OTN device through the first channel is the first optical signal, which carries the first data frame; the optical signal sent by the first OTN device to the second OTN device through the second channel is the second optical signal, which carries the first data frame. That is, when it is determined that the channel for transmitting the first service data needs to be switched, the first OTN device transmits data frames carrying the first service data through both the first and second channels.

[0088] The first data frame carries the first service data.

[0089] In this application, the data frame may be an OTN frame. For example, an OTN frame may be any one of ODUk, ODUCN, or ODUflex. The service data may be a packet (PKT) service, which may also be referred to as an OTN service, Ethernet service, packet service, or Internet Protocol (IP) service, without limitation.

[0090] In this configuration, neither the first channel nor the second channel is occupied; that is, one of the first and second channels is not used to transmit other service data. For example, the second channel is not used to transmit other service data and can be understood as a backup channel for the first channel. The other channel can be configured to transmit other service data, or in other words, the other channel can be the channel that transmits the first service data before the channel for which the first service data is to be switched is determined. For example, the channel that transmits the first service data before the switch is the first channel, which can be understood as the primary channel.

[0091] The first channel and the second channel correspond to different wavelengths. For example, the first channel corresponds to a first wavelength and the second channel corresponds to a second wavelength. In other words, the wavelengths of the optical signals transmitted by the first channel and the second channel are different. For example, the first channel transmits an optical signal with a wavelength of the first wavelength and the second channel transmits an optical signal with a wavelength of the second wavelength.

[0092] It should be understood that in this application, "channel" refers to the transmission path corresponding to each independent wavelength. "Channel" can also be called "wavelength channel", "optical channel", "optical carrier", "link" or "optical path", etc.

[0093] In one possible implementation, the first OTN device can process the raw data stream of the first service data through an OTN framing chip, generate an OTN frame according to the OTN frame format, and then input the OTN frame into an optical module. Inside the optical module, the OTN frame undergoes electro-optical conversion to form an optical signal with the first wavelength and the second wavelength, which is then transmitted through the first channel and the second channel respectively.

[0094] The method further includes: the second OTN device discarding the first data frame transmitted through the second channel. Alternatively, the second device discards the first data frame carried by the second optical signal. That is, after the second OTN device receives data frames carrying the first service data from the first OTN device through both the primary channel and the backup channel, it by default discards the data frames transmitted through the backup channel. Optionally, the second OTN device receives and forwards the first data frame transmitted through the first channel.

[0095] It should be understood that in this application, the information on the primary and backup channels can be configured in the first and second OTN devices, or determined through negotiation between the first and second OTN devices. This will not be elaborated upon further; existing processes for configuring primary and backup channels can be referenced. That is, assuming the second channel is a backup channel, the second OTN device is aware that the second channel is a backup channel.

[0096] Optionally, prior to S610, the method further includes: the first OTN device determining that it is necessary to switch the channel for transmitting the first service data.

[0097] For example, in a wavelength conflict scenario, it is determined that the channel for transmitting the first service data needs to be switched. For instance, if the first service data is being transmitted through the first channel, and that first channel is configured to transmit other service data, then a wavelength conflict is determined, and it is necessary to switch the channel for transmitting the first service data, that is, to switch the wavelength of the optical signal transmitting the first service data.

[0098] S620, determine that the first indication information is carried by the second data frame carrying the first service data.

[0099] The second data frame includes data frames transmitted after the first data frame, and the second data frame carries the first service data.

[0100] For example, the second data frame may be a data frame transmitted after the first data frame; for instance, the second data frame may be any data frame transmitted after the first data frame; or, for another example, the second data frame may be the first data frame transmitted after the first data frame; or, for yet another example, the second data frame may be a specific data frame transmitted after the first data frame. Alternatively, the second data frame may include multiple data frames, or all data frames, transmitted after the first data frame that carry the first service data.

[0101] The first indication information indicates receiving data frames from the second channel and / or discarding data frames from the first channel. The determination by the first OTN device to carry the first indication information through the second data frame can also be understood as the first OTN device setting the first indication information in the second data frame, or the first OTN device enabling the first indication information in the second data frame, or the first OTN device setting the value of the first indication information to represent "receiving data frames from the second channel or discarding data frames from the first channel". This application does not limit the specific form in which the first OTN device determines to carry the first indication information through the second data frame.

[0102] Optionally, if the second data frame includes multiple or all data frames carrying the first service data transmitted after the first data frame, the first OTN device may determine that one of the data frames in the second data frame carries the first indication information. This application does not limit the specific data frame to this single data frame; for example, it could be the first data frame among the multiple or all data frames or another specific data frame.

[0103] As an example, the first indication information can be carried in the overhead area of ​​the second data frame. For example, the first indication information is 1 bit in the overhead area of ​​the second data frame. When the value of the 1 bit is "1" or "0", it indicates that the data frame from the second channel is received or the data frame from the first channel is discarded. Correspondingly, when the value of the 1 bit is "0" or "1", it indicates that the first indication information is not enabled.

[0104] Optionally, the first indication information is carried in the data frame transmitted by the first OTN device. That is, the first indication information can be carried in the data frame transmitting the first service data, for example, in the first data frame and the second data frame. In this case, the first OTN device determines that carrying the first indication information in the second data frame carrying the first service data means that the first OTN device enables the first indication information in the second data frame and does not enable the first indication information in other data frames (such as the first data frame) transmitting the first service data. In other words, the first OTN device sets the value of the first indication information carried in the second data frame to a value indicating whether to receive the data frame from the second channel or discard the data frame from the first channel, for example, a value of "1", and sets the first indication information in other data frames (such as the first data frame) transmitting the first service data to a default value, for example, a value of "0".

[0105] S630, the first OTN device transmits optical signals carrying the second data frame to the second OTN device through the first channel and the second channel respectively. Correspondingly, the second OTN device receives optical signals carrying the second data frame through the first channel and the second channel respectively.

[0106] That is, the first OTN device transmits a first data frame and a second data frame carrying the first service data through the first channel and the second channel, the second data frame is transmitted after the first data frame, and the second data frame carries the first indication information.

[0107] S640, the first OTN device transmits optical signals carrying the third data frame to the second OTN device through the first channel and the second channel, respectively. Correspondingly, the second OTN device receives optical signals carrying the third data frame through the first channel and the second channel, respectively.

[0108] The third data frame includes a data frame carrying the first service data that is transmitted after the second data frame.

[0109] The method further includes: the second OTN device determining, through the first indication information, whether to receive the third data frame (or the second data frame and the third data frame) through the second channel; or, the second OTN device determining, based on the first indication information, to receive the third data frame (or the second data frame and the third data frame) through the second channel, and discarding the third data frame (or the second data frame and the third data frame) transmitted through the first channel.

[0110] It should be understood that this application does not limit the method of receiving the second data frame. That is, when the second data frame carries the first indication information, the second OTN device can receive the second data frame from the first channel and discard the second data frame from the second channel; or, the second OTN device can receive the second data frame from the second channel and discard the second data frame from the first channel according to the first indication information.

[0111] In other words, before receiving the first indication information, the second OTN device forwards the data frame carrying the first service data from the first channel and discards the data frames carrying the first service data transmitted through the second channel; after receiving the first indication information, the second OTN device discards the data frame carrying the first service data from the first channel according to the first indication information, thereby completing the wavelength switching of the optical signal transmitting the first service data.

[0112] Optionally, when data frames (such as a first data frame, a second data frame, or a third data frame) carrying the first service data are transmitted through the first channel and the second channel, the arrival time of the data frame transmitted through the second channel is later than the arrival time of the data frame transmitted through the first channel. The arrival time can refer to the time when the data frame arrives at the second OTN device, that is, the time when the second OTN device receives the data frame or the optical signal carrying the data frame.

[0113] In one possible implementation, a buffer is set in the first OTN device, for example, a first buffer queue, which can be used to buffer data frames transmitted through the second channel. Taking the first OTN device transmitting two first data frames as an example, for the first data frame transmitted through the first channel, the first OTN device can directly transmit the first optical signal through the first channel after converting the first data frame into the first optical signal; for the first data frame transmitted through the second channel, the first OTN device buffers the first data frame in the first buffer queue and transmits the first data frame through the second channel after waiting for a first duration, so that the arrival time of the first data frame transmitted through the second channel is later than the arrival time of the first data frame transmitted through the first channel.

[0114] For example, the first duration is related to the length (or size) of the first buffer queue. The length of the first buffer queue is related to the first wavelength, the second wavelength, and the link bandwidth corresponding to the first and second channels, or in other words, to the delay difference between the first and second channels and the link bandwidth. The first duration can also be understood as the time interval between the arrival time of the data frame transmitted through the second channel and the arrival time of the data frame transmitted through the first channel.

[0115] It should be understood that setting a buffer to ensure that the arrival time of data frames transmitted through the second channel is later than that of data frames transmitted through the first channel is merely an example and does not constitute a limitation of this application. For example, it can also be achieved by setting the transmission rate of data frames. Furthermore, the above-described setting of a buffer queue is only one example of setting a buffer, and this application is not limited to this; setting a buffer can also take other forms.

[0116] Furthermore, there are no restrictions on the location of the cache. For example, the cache can be set on the branch board of the first OTN device, which transmits data through the second channel.

[0117] Optionally, a buffer, such as a second buffer queue, is set in the second OTN device. The second buffer queue is used to buffer the data frames (such as the first data frame) received by the second OTN device. That is, when there is a time difference between the data frame (such as the third data frame) received by the second channel and the data frame received by the first channel, setting the buffer can ensure that the second OTN device continues to forward data frames during the channel switching process, thus preventing the optical transceiver of the second OTN device from being idle.

[0118] The size of the second buffer queue is related to the second duration and the size of the first buffer queue. The second duration is the switching duration, which is the wavelength duration during which the second OTN device switches from receiving data frames carrying the first service data from the first channel to receiving data frames carrying the first service data from the second channel.

[0119] Based on the above scheme, when it is determined that the channel for transmitting service data needs to be switched, by sending two data frames carrying the service data and carrying the first indication information in a second data frame included in the data frame, the second OTN device can switch the channel for transmitting the data frame carrying the service data after receiving the second information, thereby avoiding wavelength conflicts and improving the continuity and reliability of data transmission.

[0120] Figure 7 is a schematic diagram of a device-to-device data transmission method 700 provided in this application. As shown in Figure 7, the devices for data transmission include NE1 and NE2, where NE1 is an example of a first OTN device and NE2 is an example of a second OTN device.

[0121] As shown in Figure 7, before switching wavelengths, NE1 transmits ODU frames carrying service data (an example of the first data frame) via N2 and N5. N2 and N5 correspond to two optical channels in the same fiber, namely the primary channel (an example of the first channel) and the backup channel (an example of the second channel). Correspondingly, NE2 receives ODU frames carrying service data via N3 and N6, with N3 and N6 corresponding to the primary channel (first) and the backup channel, respectively. The NE2 line card discards service data from the backup link by default. Optionally, to ensure that the ODU frames transmitted through the backup channel are later than those transmitted through the primary channel, a buffer is set at N5. For details on this buffer, please refer to the relevant description of the first buffer queue.

[0122] When a wavelength switch is determined to be required, NE1 transmits ODU frame #2 (an example of the second data frame) carrying service data via N2 and N5. ODU frame #2 carries a switch point (an example of the first indication information), as shown in Figure 7. The switch point can be carried in the overhead (OH) region of the ODU frame. Correspondingly, NE2 receives ODU frame #2 via N3 and N6. After confirming receipt of the switch point, NE2 subsequently receives service data from the backup link via N6 and discards service data from the primary link. Optionally, to ensure that NE2's N4 is not idle, a buffer is set at N4. For details on this buffer, please refer to the relevant description of the second buffer queue.

[0123] In this context, N2 and N5 of NE1, and N3 and N6 of NE2, can be tributary boards or line boards of an OTN device, as detailed in the description of tributary boards or line boards in the OTN device structure. NE1 and NE2 may also include cross-connect boards, such as XC1 and XC2 as shown in Figure 7. NE1 and NE2 also include other tributary boards or line boards for receiving or transmitting service data, such as N1 in NE1 for receiving service data transmitted to NE2, and N4 in NE2 for forwarding the service data received from NE1.

[0124] The methods provided by the embodiments of this application have been described in detail above with reference to Figures 1 to 7. The apparatus provided by the embodiments of this application will be described in detail below with reference to Figures 8 and 10. It should be understood that the descriptions of the apparatus embodiments correspond to the descriptions of the method embodiments; therefore, any content not described in detail can be referred to the method embodiments above, and for the sake of brevity, will not be repeated here.

[0125] It should be understood that the step numbers in the flowcharts described in the above embodiments are merely examples of the execution flow and do not constitute a restriction on the order of step execution. There is no strict execution order between steps in this application embodiment that have no temporal dependency. Furthermore, not all steps shown in the flowcharts are mandatory; some steps can be added or deleted based on actual needs.

[0126] It should also be understood that, in the above-described method embodiments, the methods and operations implemented by the device (such as the first OTN device or the second OTN device) can also be implemented by components of the device (such as chips or circuits), without limitation.

[0127] The data transmission method described in Figure 6 above is mainly presented from the perspective of the interaction between the transmitting device (such as the first OTN device) and the receiving device (such as the second OTN device). It is understood that, in order to achieve the above functions, the transmitting and receiving devices include corresponding hardware structures and / or software modules for performing each function.

[0128] It is understood that, in order to achieve the functions in the above embodiments, the transmitting and receiving devices include hardware structures and / or software modules corresponding to perform each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0129] Figure 8 is a schematic block diagram of a data transmission apparatus 800 provided in an embodiment of this application. For example, the apparatus can be a transmitting device (such as a first OTN device) or a receiving device (such as a second OTN device), or it can be a module (such as a chip) applied to a transmitting device. Specifically, the apparatus 800 includes a transceiver module 801, which can be used to implement corresponding transceiver functions. The transceiver module 801 can also be called a transceiver unit, or it can also be called a communication interface or communication unit. The apparatus 800 also includes a processing module 802, which can be used to implement corresponding processing functions.

[0130] Optionally, the device 800 further includes a storage unit, which can be used to store instructions and / or data. The processing unit 802 can read the instructions and / or data in the storage unit so that the device 800 can perform the operation of the transmitting device in the foregoing method embodiments.

[0131] The device 800 can be used to perform the actions performed by the transmitting or receiving device in the above method embodiment 600. In this case, the device 800 can be a component of the transmitting or receiving device. The transceiver module 801 is used to perform the transceiver-related operations of the transmitting or receiving device in the above method embodiment, and the processing module 802 is used to perform the processing-related operations of the transmitting or receiving device in the above method 600.

[0132] In one possible design, device 800 can be used to perform the operations of the transmitting device (such as the first OTN device) shown in Figure 6 or 7 above. For example:

[0133] The transceiver module 801 is used to send optical signals carrying the first data frame to the second OTN device through the first channel and the second channel respectively when it is determined that the channel for transmitting the first service data needs to be switched. The first data frame carries the first service data, and the first channel and the second channel have different optical wavelengths.

[0134] Processing module 802 is configured to determine that a second data frame carrying the first service data carries first indication information, the second data frame being sent after the first data frame, and the first indication information indicating that a data frame from the second channel is received and / or a data frame from the first channel is discarded.

[0135] The transceiver module 801 is further configured to transmit optical signals carrying the second data frame to the second OTN device through the first channel and the second channel respectively; and to transmit optical signals carrying a third data frame to the second OTN device through the first channel and the second channel respectively, wherein the third data frame includes a data frame carrying the first service data transmitted after the second data frame.

[0136] In another possible design, device 800 can be used to perform the operations of the receiving device (such as the second OTN device) shown in Figure 6 or 7 above. For example:

[0137] The transceiver module 801 is configured to receive optical signals carrying a first data frame from a first OTN device via a first channel and a second channel, respectively, wherein the first channel and the second channel correspond to different optical wavelengths, and the first data frame carries first service data; receive the first data frame transmitted via the first channel, and discard the first data frame transmitted via the second channel; receive optical signals carrying a second data frame from the first OTN device via the first channel and the second channel, respectively, wherein the second data frame carries the first service data and carries first indication information, the first indication information indicating to receive data frames from the second channel and / or discard data frames from the first channel; receive optical signals carrying a third data frame from the first OTN device via the first channel and the second channel, respectively, wherein the third data frame includes data frames carrying the first service data transmitted after the second data frame; and receive the third data frame transmitted via the second channel according to the first indication information, and discard the third data frame transmitted via the first channel.

[0138] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0139] In addition, the transceiver module 801 and the processing module 802 in the device 800 can also implement other operations or functions of the transmitting device in the above method, which will not be described in detail here.

[0140] Optionally, device 800 may be a device including a transmitting device or a receiving device, or a component configured in the transmitting device or receiving device, such as a chip of the transmitting device. In this case, transceiver module 801 and transmitting module 803 may be interface circuits, pins, etc. Specifically, the interface circuit may include input circuits and output circuits, wherein transceiver module 801 may include input circuits and output circuits, and processing module 802 may include processing circuits.

[0141] Figure 9 is a schematic structural diagram of a data transmission apparatus 900 provided in an embodiment of this application. The apparatus 900 includes a processor 901 and a transceiver 902. The transceiver 902 is used for information exchange via a transmission medium. Optionally, the transceiver 903 can be an interface, a bus, a circuit, or a device capable of implementing transmission and reception functions. Optionally, the device in the transceiver 902 used for implementing the receiving function can be considered a receiving module, and the device in the transceiver 902 used for implementing the transmitting function can be considered a transmitting module; that is, the transceiver 902 includes a receiver and a transmitter.

[0142] The transceiver 902 may also be called a transceiver unit, transceiver module, or transceiver circuit. The receiver may also be called a receiver unit, receiver module, or receiver circuit. The transmitter 902 may also be called a transmitter, transmitter module, or transmitter circuit.

[0143] For example, in one embodiment, processor 901 is configured for other operations or functions of the transmitting device's chip. Transceiver 902 is used to enable the exchange of information between device 900 and receiving device.

[0144] In another embodiment, processor 901 is configured to receive other operations or functions of the chip in the receiving device. Transceiver 902 is used to implement the interaction of information between device 900 and the transmitting device.

[0145] Apparatus 900 may further include memory 903 for storing computer programs or instructions and / or data. Memory 903 is coupled to processor 901, which executes the computer programs or instructions and / or data stored in memory 903, causing one of methods 300 to 900 in the above method embodiments to be executed. The coupling in the embodiments of this application is an indirect coupling or communication connection between devices, units, or modules, which may be electrical, mechanical, or other forms, for information exchange between devices, units, or modules. Processor 901 may operate in conjunction with memory 903.

[0146] Optionally, the device 900 may include one or more processors 901 and one or more memories 903.

[0147] Alternatively, the memory 903 may be integrated with the processor 901, or it may be set separately.

[0148] This application embodiment does not limit the specific connection medium between the processor 901, transceiver 902, and memory 903. In Figure 9, the processor 901, transceiver 902, and memory 903 are connected via a bus 904, indicated by thick lines. The connection methods between other components are merely illustrative and not intended to be limiting. The bus can be categorized as an address bus, data bus, control bus, etc.

[0149] It should be understood that, for ease of representation, only one thick line is used in Figure 9, but this does not mean that there is only one bus or one type of bus.

[0150] Figure 10 is a schematic diagram of a chip system 1000 provided in an embodiment of this application. The chip system 1000 (or may also be called a processing system) includes logic circuits 1010 and input / output interface 1020.

[0151] The logic circuit 1010 can be a processing circuit in the chip system 1000. The logic circuit 1010 can be coupled to a memory unit, calling instructions from the memory unit, enabling the chip system 1000 to implement the methods and functions of the embodiments of this application. The input / output interface 1020 can be an input / output circuit in the chip system 1000, outputting processed information from the chip system 1000, or inputting data or signaling information to be processed into the chip system 1000 for processing.

[0152] Optionally, the logic circuit 1010 may be implemented by one or more processors, including the one or more processors or the processing portion of the one or more processors.

[0153] Optionally, the input / output interface 1020 may include transceiver circuitry, a transceiver, input / output circuitry, or a communication interface.

[0154] As one approach, the chip system 1000 is used to implement the operations performed by the transmitting device (such as the first OTN device) or the receiving device (such as the first OTN device) in the various method embodiments described above.

[0155] Specifically, the logic circuit 1010 is used to implement the processing-related operations performed by the first OTN device or the second OTN device in the above method embodiment; the input / output interface 1020 is used to implement the sending and / or receiving-related operations performed by the first OTN device or the second OTN device in the above method embodiment.

[0156] This application also provides a computer-readable storage medium storing computer instructions for implementing the methods executed by the first OTN device or the second OTN device in the above-described method embodiments.

[0157] For example, when the computer program is executed by a computer, it enables the computer to implement the methods performed by the first OTN device or the second OTN device in the various embodiments of the above methods.

[0158] This application also provides a computer program product comprising instructions that, when executed by a computer, implement the methods performed by the first OTN device or the second OTN device in the above-described method embodiments.

[0159] This application also provides a communication system, which includes a first OTN device and / or a second OTN device in the embodiments described above.

[0160] The explanations and beneficial effects of the relevant contents in any of the devices provided above can be found in the corresponding method embodiments provided above, and will not be repeated here.

[0161] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of apparatus or units may be electrical, mechanical, or other forms.

[0162] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs). For example, the aforementioned available media include, but are not limited to, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code.

[0163] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for data transmission, characterized in that, The method, applied to OTN (Optical Transmission Network) equipment in a first optical transport network, includes: When it is determined that the channel for transmitting the first service data needs to be switched, optical signals carrying the first data frame are sent to the second OTN device through the first channel and the second channel respectively. The wavelength corresponding to the optical signal transmitted through the first channel is the first wavelength, and the wavelength corresponding to the optical signal transmitted through the second channel is the second wavelength. The second channel is a backup channel, and the first data frame carries the first service data. It is determined that a second data frame carrying the first service data carries first indication information, the second data frame is sent after the first data frame, and the first indication information instructs the second OTN device to receive data frames from the second channel and / or discard data frames from the first channel. Optical signals carrying the second data frame are sent to the second OTN device through the first channel and the second channel, respectively. The second OTN device sends optical signals carrying a third data frame to the first OTN device through the first channel and the second channel respectively. The third data frame includes a data frame carrying the first service data transmitted after the second data frame. The second OTN device receives the third data frame through the second channel.

2. The method according to claim 1, characterized in that, The arrival time of the first data frame transmitted through the second channel at the second OTN device is later than the arrival time of the first data frame transmitted through the first channel at the second OTN device.

3. The method according to claim 2, characterized in that, The step of sending the optical signal carrying the first data frame to the second OTN device through the second channel includes: After the first data frame is buffered in the first buffer queue and waits for a first duration, the optical signal carrying the first data frame is sent to the second OTN device through the second channel.

4. The method according to claim 3, characterized in that, The first duration is related to the size of the first cache queue, and the size of the first cache queue is related to at least one of the following: The first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

5. The method according to any one of claims 1 to 4, characterized in that, The first indication information is carried in the overhead area of ​​the second data frame.

6. A method for data transmission, characterized in that, The method, applied to a second optical transport network (OTN) device, includes: The optical signal carrying the first data frame is received from the first OTN device through the first channel and the second channel respectively. The wavelength corresponding to the optical signal transmitted through the first channel is the first wavelength, and the wavelength corresponding to the optical signal transmitted through the second channel is the second wavelength. The second channel is a backup channel. The first data frame carries the first service data. Receive the first data frame transmitted through the first channel, and discard the first data frame transmitted through the second channel; Optical signals carrying second data frames are received from the first OTN device through the first channel and the second channel, respectively. The second data frame carries the first service data and carries first indication information. The first indication information indicates that data frames from the second channel are received and / or data frames from the first channel are discarded. The optical signal carrying the third data frame is received from the first OTN device through the first channel and the second channel respectively. The third data frame includes a data frame carrying the first service data transmitted after the second data frame. The third data frame transmitted through the second channel is received according to the first indication information, and the third data frame transmitted through the first channel is discarded.

7. The method according to claim 6, characterized in that, The arrival time of the first data frame transmitted through the second channel at the second OTN device is later than the arrival time of the first data frame transmitted through the first channel at the second OTN device.

8. The method according to claim 7, characterized in that, The time interval between the first time point and the second time point is a first duration, which is related to the size of the first cache queue. The size of the first cache queue is related to at least one of the following: The first wavelength, the second wavelength, the transmission delay difference between the first channel and the second channel, and the link bandwidth corresponding to the first channel and the second channel.

9. The method according to any one of claims 6 to 8, characterized in that, The method further includes: The received data frames from the first OTN device are buffered in a second buffer queue and sent after a second duration.

10. The method according to claim 9, characterized in that, The second duration is related to the size of the second cache queue, and the size of the second cache queue is related to at least one of the following: The switching duration is the duration for which the second OTN device switches the channel for receiving data frames; or, The size of the first buffer queue, the first buffer queue being used to buffer data frames sent by the first OTN device to the second OTN device through the second channel.

11. The method according to any one of claims 6 to 10, characterized in that, The first indication information is carried in the overhead area of ​​the second data frame.

12. A data transmission apparatus, characterized in that, include: A module or unit for performing the method as described in any one of claims 1 to 11.

13. A chip, characterized in that, include: A processor and a communication interface, the communication interface being used to receive data frames and transmit the data frames to the processor or other communication devices other than the communication device including the chip, the processor being used to perform the method as described in any one of claims 1 to 11.

14. A system, characterized in that, include: A first optical transport network (OTN) device and a second optical transport network (OTN) device, wherein the first OTN device is used to perform the method as described in any one of claims 1 to 5, and the second OTN device is used to perform the method as described in any one of claims 6 to 11.