Data transmission method, source device, sink device and storage medium

By statistically analyzing and encoding packet gap information in the OTN network, the problem of transparent transmission of Ethernet service flows under the speed reduction of the OTN interface was solved, and rate matching and transparent transmission of Ethernet service flows were achieved.

CN117201969BActive Publication Date: 2026-01-02ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210608522.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2026-01-02
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

Existing technologies cannot achieve transparent mapping of Ethernet service flows through the OTN interface, especially when the OTN interface is slowed down, making it difficult for the OTN network to support the effective transmission of Ethernet service flows.

Method used

By statistically analyzing and deleting the inter-packet gap information between adjacent service data packets, inter-packet gap quantity information is formed. Then, the service data packets are encoded using the first encoding method, and the extended information code block is used to carry the inter-packet gap quantity information to form the first encoded data. This achieves compression of the Ethernet service flow, making its rate match the OTN interface rate.

Benefits of technology

This technology enables the transparent transmission of Ethernet service flows through the OTN network, reduces the Ethernet service flow rate to match the OTN interface rate, and fills a gap in related technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201969B_ABST
    Figure CN117201969B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method, a source end device, a sink end device and a storage medium. The data transmission method of the source end device comprises the following steps: counting and deleting packet gap information between adjacent service data packets, forming packet gap quantity information according to a counting result, encoding the service data packets in a first encoding mode, and extending a first information code block used for carrying the packet gap quantity information to form first encoding data, so that the Ethernet service stream data is compressed, the Ethernet service stream rate is reduced, the Ethernet service stream rate is matched with the OTN interface rate, and the purpose of transmitting the Ethernet service stream through the OTN network is achieved, and the technical blank in the related method is made up.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a data transmission method, a source device, a sink device and a storage medium. BACKGROUND

[0002] Optical transport network (OTN) is a type of network, which refers to a transport network that realizes transmission, multiplexing, routing selection and monitoring of service signals in the optical domain and guarantees performance indicators and survivability.

[0003] With the increase of transmission bandwidth / rate and the development of service IP, the main customers of OTN network tend to be Ethernet service flow. Before the speed reduction of OTN interface, the related technology cannot realize the transparent mapping of Ethernet service flow through the OTN interface. SUMMARY

[0004] Embodiments of the present application provide a data transmission method, a source device, a sink device and a storage medium, which can realize the transparent mapping of Ethernet service flow through the OTN interface.

[0005] In a first aspect, embodiments of the present application provide a data transmission method applied to a source device of an OTN network, and the method comprises:

[0006] Obtaining an Ethernet data flow;

[0007] Obtaining a plurality of service data packets according to the Ethernet data flow;

[0008] Counting and deleting inter-packet gap information between adjacent service data packets, and forming inter-packet gap quantity information according to the counting result;

[0009] Encoding the service data packets in a first encoding mode, and extending a first information code block for carrying the inter-packet gap quantity information to form first encoded data;

[0010] Mapping the first encoded data to an OTN data flow;

[0011] Transmitting the OTN data flow.

[0012] In a second aspect, embodiments of the present application also provide a data transmission method applied to a sink device of an OTN network, and the method comprises:

[0013] Obtaining an OTN data flow;

[0014] Analyzing the OTN data flow to obtain first encoded data, wherein the first encoded data comprises a service data code block and a first information code block, and the first information code block is used for carrying inter-packet gap quantity information between adjacent service data packets;

[0015] decode the first encoded data according to the first decoding manner and the first extension strategy to obtain a plurality of service data code blocks and the first information code block, and obtain a plurality of service data packets and the number of packet gaps between adjacent service data packets;

[0016] obtain an Ethernet data stream according to the number of packet gaps between the service data packets and the adjacent service data packets.

[0017] In a third aspect, embodiments of the present application further provide a data transmission method applied to an OTN network, wherein the OTN network comprises a source device and a sink device connected to each other, and the method comprises:

[0018] the source device performs the data transmission method of the first aspect to send an OTN data stream;

[0019] correspondingly,

[0020] the sink device performs the data transmission method of the second aspect to receive and analyze the OTN data stream.

[0021] In a fourth aspect, embodiments of the present application further provide a source device, comprising a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor, wherein the first processor executes the computer program to implement the data transmission method of the first aspect.

[0022] In a fifth aspect, embodiments of the present application further provide a sink device, comprising a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, wherein the second processor executes the computer program to implement:

[0023] the data transmission method of the first aspect.

[0024] In a sixth aspect, embodiments of the present application further provide a computer readable storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute:

[0025] the data transmission method of the first aspect;

[0026] or,

[0027] the data transmission method of the second aspect.

[0028] In the embodiment of the present application, the source device counts and deletes the inter-packet gap information between adjacent service data packets, forms the inter-packet gap number information according to the counting result, encodes the service data packets in a first encoding mode, and extends the first information code block for carrying the inter-packet gap number information to form the first encoding data, thereby realizing compression of the Ethernet service stream data, reducing the Ethernet service stream rate, matching the Ethernet service stream rate with the OTN interface rate, and achieving the purpose of transmitting the Ethernet service stream through the OTN network, thereby making up the technical blank in the related method. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 is a schematic diagram of an implementation environment for performing a data transmission method provided by an embodiment of the present application;

[0030] Figure 2 is a flowchart of a data transmission method for a source device provided by an embodiment of the present application;

[0031] Figure 3 is a schematic diagram of S code block, extended I code block and standard I code block structures provided by an embodiment of the present application;

[0032] Figure 4 is a flowchart of a data transmission method for a source device provided by an embodiment of the present application;

[0033] Figure 5 is a flowchart of a data transmission method for a source device provided by another embodiment of the present application;

[0034] Figure 6 is a specific processing and mapping flowchart of a source device provided by an embodiment of the present application;

[0035] Figure 7 is a schematic diagram of a first encoding data structure provided by an embodiment of the present application;

[0036] Figure 8 is a specific processing and mapping flowchart of a source device provided by another embodiment of the present application;

[0037] Figure 9 is a schematic diagram of a first encoding data structure provided by another embodiment of the present application;

[0038] Figure 10 is a flowchart of a data transmission method applied to a sink device provided by another embodiment of the present application;

[0039] Figure 11 is a flowchart of a data transmission method applied to an OTN network provided by an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purposes, technical methods and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0041] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0042] Optical transport network (OTN) is a type of network, which refers to a transport network that realizes the transmission, multiplexing, routing selection, monitoring of service signals in the optical domain, and guarantees the performance indicators and survivability.

[0043] With the increase of transmission bandwidth / rate and the development of service IP, the main customers of OTN tend to be Ethernet service flow. Related technologies cannot realize the transparent mapping of Ethernet service flow through the OTN interface under the premise of reducing the speed of the OTN interface.

[0044] For example, with the increase of transmission bandwidth or rate, technologies such as B100G OTN (Beyond 100G OTN, OTN with a speed higher than 100G), B400G OTN (Beyond 400G OTN, OTN with a speed higher than 400G), etc. are widely discussed. At this time, the difficulty and cost of supporting full-rate OTN by the optical module industry will increase exponentially, and therefore, OTN supports a reduced-speed OTN interface to reuse Ethernet modules. Further, with the development of service IP, the main customers of OTN will tend to be Ethernet service flow. At this time, under the premise of reducing the speed of the interface, how to realize the transparent mapping of Ethernet service flow through the OTN interface becomes a problem to be solved.

[0045] Based on this, the embodiments of the present application provide a data transmission method, a source device, a sink device and a storage medium. The source device counts and deletes inter-packet gap information between adjacent service data packets, forms inter-packet gap quantity information according to the counting result, encodes the service data packets in a first encoding mode, and extends a first information code block for carrying the inter-packet gap quantity information to form first encoded data, thereby realizing compression of Ethernet service flow data, reducing the Ethernet service flow rate, matching the Ethernet service flow rate with the OTN interface rate, and further achieving the purpose of transparent transmission of Ethernet service flow through the OTN network, which makes up for the technical gap in related methods.

[0046] The embodiments of the present application are further described below with reference to the accompanying drawings.

[0047] As Figure 1 shown, Figure 1 is a schematic diagram of an implementation environment for performing a data transmission method according to an embodiment of the present application.

[0048] In Figure 1 the example, the implementation environment includes but is not limited to a source device 110 and a sink device 120, wherein the sink device 120 and the source device 110 can perform optical signal transmission, reception and related interaction, etc.

[0049] It can be understood that the relative positions, quantities, etc. of the sink device 120 and the source device 110 can be set accordingly in specific application scenarios, for example, the source device 110 can transmit optical signals outwardly, and the sink device 120 can receive the optical signals transmitted by the source device 110. It can be understood that if there are multiple sink devices 120 and different sink devices 120 are set in the above manner, the optical signals transmitted by the source device 110 can be received at different spatial positions, and it is worth noting that the spatial positions can be different geographical conditions.

[0050] In Figure 2 the example, the implementation environment can further include but is not limited to a second receiving end 130, wherein the sink device 120 and the second receiving end 130 can perform wireless signal transmission, reception and related interaction, etc.

[0051] It can be understood that the quantity of the second receiving end 130 is not limited and can be one or more, which can be set according to the actual application scenario needs of those skilled in the art, that is, the sink device 120 can interact with one second receiving end 130 or interact with multiple second receiving ends 130 respectively, which does not affect the functional application of the sink device 120.

[0052] The source device 110, as a transmitting device of an OTN network, is in communication connection with a source Ethernet network 210 and can receive data streams from the Ethernet network. The source device 110 has at least the following functions: determining a first network coding mode for source data packets according to preconfigured first network coding parameters, coding the source data packets according to the first network coding mode to obtain first coded data, encapsulating the first coded data to form an OTN data stream, and transmitting the OTN data stream to the sink device 120.

[0053] The destination device 120, as a receiving device of the OTN network, is communicatively connected to the destination Ethernet network 220. It has at least the functions of receiving the OTN data stream sent by the source device 110 and processing the OTN data stream. The OTN data stream is obtained by the source device 110 encoding and processing the source data packet according to the first network encoding method for the source data packet. The first network encoding method is determined by the source device 110 according to the pre-configured first network encoding parameters.

[0054] It is understandable that the aforementioned functions of the source device 110 or the destination device 120 can be applied to different application scenarios, and there are no restrictions here.

[0055] Those skilled in the art will understand that this implementation environment can be applied to 5G, 6G communication network systems and subsequent evolved mobile communication network systems, and this embodiment does not specifically limit it.

[0056] It will be understood by those skilled in the art that Figure 1 , Figure 2 The implementation environment shown does not constitute a limitation on the embodiments of this application, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0057] Based on the above implementation environment, various embodiments of the data transmission method of this application are presented below.

[0058] It is understood that the embodiments of this application can be applied to short-distance OTN interface reuse Ethernet module scenarios as well as long-distance OTN Ethernet module reuse scenarios, and this application does not limit them. The embodiments of this application can be applied to OTN networks of various rates, such as B100G, B200G, or B400G, and this application does not limit them. The OTN network can be a FlexO (Flexible OTN) network or other OTN networks, and this application does not limit them. The following description uses a FlexO network as an example of an OTN network.

[0059] like Figure 3 As shown, Figure 3 This is a flowchart of a data transmission method provided in one embodiment of this application.

[0060] It is understood that the entity executing the data transmission method in this embodiment may be, but is not limited to, [a specific entity]. Figure 1The source device 110 in the illustrated embodiment, or a person skilled in the art can select and set a corresponding execution subject according to the actual application scenario, and the present embodiment is not limited. In order to more conveniently describe the application scenario and principle of the present application, the source device is taken as the execution subject of the data transmission method in the following related embodiments, but it should not be understood as a limitation of the embodiments of the present application.

[0061] The data transmission method can include but is not limited to steps S1100 to S1600:

[0062] Step S1100, obtaining an Ethernet data stream.

[0063] Step S1200, obtaining a plurality of service data packets according to the Ethernet data stream;

[0064] Step S1300, counting and deleting the inter-packet gap information between adjacent service data packets, and forming inter-packet gap quantity information according to the counting result;

[0065] Step S1400, encoding the service data packets according to a first encoding mode, and expanding a first information code block for carrying the inter-packet gap quantity information to form first encoded data;

[0066] Step S1500, mapping the first encoded data to an OTN data stream;

[0067] Step S1600, transmitting the OTN data stream.

[0068] It can be understood that the Ethernet data stream can be a data stream from the sink end Ethernet network 210. In step S1200, the Ethernet data stream can be parsed to obtain service data packets.

[0069] For example, the Ethernet data stream can be a PCS (Physical Coding Sublayer) data stream, and correspondingly, the source device receives the data link layer Ethernet data stream from the sink end Ethernet network 210 through the execution of step S1100, and parses the PCS data stream to obtain service data packets, i.e. MAC data packets, through the execution of step S1200.

[0070] The following describes an example of mapping Ethernet service flow (Ethernet data flow) to FlexO network. The Ethernet service flow is mapped to FlexO network, such as B100G OTN, and generally 64B / 66B encoding or 256B / 257B transcoding is performed on large-particle Ethernet service flow, such as N-way 100G or 1-way N*100G Ethernet service flow, and then multi-level OPU (Optical Channel Payload Unit) mapping is performed in bit stream mode, such as first mapping to OPU4 or OPUflex, then mapping to OPUC, and finally mapping to FlexO interface. In the entire mapping path, because of the OAM and mapping multiplexing overheads of OPU, OPUC and FlexO, the FlexO interface rate is about 5% higher than the Ethernet rate.

[0071] Therefore, in some alternative embodiments, the Ethernet service flow can be directly mapped and multiplexed into the payload of the OTN data flow to reduce the mapping multiplexing overhead. For example, when the rate is B400G, the FlexO interface rate needs to be reduced by about 5%, the physical interface rate of FlexO is ensured to be consistent with the data link layer rate of the source Ethernet network, and when N-way 100G Ethernet or 1-way N*100G Ethernet is carried, the multi-level OPU mapping can be removed, that is, the Ethernet service flow is directly mapped and multiplexed into the payload of the FlexO data flow.

[0072] In some alternative embodiments, as much as possible bytes can be used to carry Ethernet MAC data during encoding to further reduce the mapping multiplexing overhead. For example, when 64B / 66B encoding is performed on Ethernet service flow, such as N-way 100G or 1-way N*100G Ethernet service flow, the Preamble in the S code block can be used to carry Ethernet MAC data. Specifically, in the path of directly mapping Ethernet service flow to FlexO, the maximum payload rate of FlexO data flow is 100.1953125G, and if the Ethernet service flow is directly mapped, the PCS rate needs to be at least 100.2930G, which cannot meet the demand. The support condition of pure MAC data packet rate of MAC data packet from 64 bytes to 9600 bytes is analyzed, the rate of 64-byte MAC data packet after standard 64b encoding expansion can reach 105G, which has already exceeded the payload rate of FlexO data flow without considering specific transcoding. Considering that the Preamble in the S code block is used to carry Ethernet MAC data, the rate of 9591-byte MAC data packet after standard 64b encoding expansion is maximized to 99.8855G, and the rate is 100.178181G after 1024B / 1027B transcoding.

[0073] In some alternative embodiments, it can be considered that no IPG (InterPacket Gap) is delivered when encoding the MAC data packet, but only the specific IPG transmission quantity (inter-packet gap quantity information) is delivered, so as to further reduce the mapping multiplexing overhead. Meanwhile, it can be considered from the above analysis that the specific IPG transmission quantity is delivered, and since the sink device can parse the Ethernet data stream into MAC data packets, it can be considered that the 64B / 66B encoding function is reused to complete the related IPG carrying and rate adaptation functions.

[0074] It can be understood that, by carrying the saved IPG quantity information when encoding the Ethernet data stream at the source device, the embodiments of the present application realize the compression processing of the Ethernet data stream, so that the sink device 120 recovers the lost IPG information of the Ethernet service stream MAC transparent transmission, so as to achieve the purpose of the Ethernet service stream PCS transparent transmission. In some alternative embodiments, the Ethernet service stream can be directly mapped and multiplexed into the payload of the OTN data stream, so as to reduce the mapping multiplexing overhead; and / or, in some alternative embodiments, it can be considered that as many bytes as possible are used to carry the Ethernet MAC data when encoding, so as to further reduce the mapping multiplexing overhead.

[0075] In some alternative embodiments, the first encoding mode is a 64B / 66B encoding mode.

[0076] The inter-packet gap quantity information includes front inter-packet gap quantity information and rear inter-packet gap quantity information, wherein the front inter-packet gap quantity information is used to represent the total number of inter-packet gaps between the current service data packet and the previous service data packet, and the rear inter-packet gap quantity information is used to represent the total number of inter-packet gaps between the current service data packet and the next service data packet.

[0077] The first information code block includes an S code block and / or a newly added extension I code block.

[0078] Step S1400, encoding the service data packet according to the first encoding mode, and extending the first information code block for carrying the inter-packet gap quantity information, including:

[0079] Step S1410, encoding the current service data packet by the 64B / 66B encoding mode to generate an S code block, a data code block and a T code block.

[0080] Step S1420, extending at least one extension byte in the S code block and / or the newly added extension I code block, the extension byte being used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information.

[0081] It can be understood that the embodiments of the present application can carry the inter-packet gap number information in the S code block when encoding the Ethernet data stream by the 64B / 66B encoding mode, can add the extended I code block to carry the inter-packet gap number information, and can also carry the inter-packet gap number information in the S code block and the extended I code block added at the same time, and the embodiments of the present application do not limit this.

[0082] For example, referring to Figure 3 , the extended S code block and the added extended I code block are both control code blocks. The first byte of the S code block is taken as a code block type byte, and the type of the code block type byte is S; the 2nd to M1+1th bytes of the S code block are all taken as first extension bytes K1, wherein the first extension bytes K1 are used to carry the front inter-packet gap number information (IPG number), and M1 is the number of the first extension bytes K1; the remaining bytes of the S code block are taken as data bytes D, which are used to carry the data information of the service data packet. For example, as shown in Figure 3 , M1 is the number of the first extension bytes K1, which is 1, then the 2nd byte of the S code block is taken as the first extension byte K1, and the remaining 6 bytes of the S code block are taken as the data bytes D, which are used to carry the data information of the service data packet.

[0083] The added extended I code block includes: at least one type byte, the type byte is used to identify the code block type; at least one extension identification byte, the extension identification byte is used to identify that the code block is the extended I code block; M2 second extension bytes K2; at least one I control byte; wherein the I control byte is used to represent the IPG information, that is, the number of the I control byte in the extended I code block represents the number of the IPG information carried. For example, as shown in Figure 3 , the first byte of the added extended I code block is the type byte, the type of the type byte is 0x1e, which is used to identify that the code block type is the I code block; the second byte of the added extended I code block is the extension identification byte, the value of the extension identification byte is 0x2a, which is used to identify that the code block is the code block used to carry the inter-packet gap number information (IPG number); M2 is 1, that is, it includes 1 second extension byte K2, the third byte of the added extended I code block is the second extension byte K2, which is used to carry the inter-packet gap number information (IPG number); the remaining 5 bytes of the added extended I code block are all I control bytes. That is, compared with the ordinary I code block, the added extended I code block increases the extension identification byte and the second extension byte K2.

[0084] In some alternative embodiments, the T code block includes:

[0085] one code block type byte, the type of the code block type byte is T;

[0086] a plurality of data bytes and / or a plurality of I control bytes; the sum of the number of inter-packet gaps corresponding to the I control bytes and the number of post-packet gaps information is equal to the total number of inter-packet gaps between the current service data packet and the next service data packet.

[0087] It can be understood that, in addition to the code block type byte, the subsequent bytes of the T code block are used to carry service data packet data first, and the remaining bytes carry I control bytes. Therefore, according to the amount of service data packet data carried, the T code block can contain one code block type byte and seven data bytes, or one code block type byte and seven I control bytes, or one code block type byte, a plurality of (one or more) data bytes, and a plurality of (one or more) I control bytes.

[0088] The I control byte is used to represent the IPG information, that is, the number of I control bytes in the T code block represents the number of IPG information carried. Therefore, the total number of inter-packet gaps between the current service data packet and the next service data packet is equal to the sum of the number of I control bytes carried by the T code block of the current service data packet and the number of post-packet gap information.

[0089] For example, the T code block of the current service data packet can contain one information 1 code block type byte, two data bytes D, and five I control bytes; the newly added extended I code block of the current service data packet carries 245 post-packet gap information, and the extended I code block carries five I control bytes; the S code block of the next service data packet carries 245 post-packet gap information, and the total number of inter-packet gaps between the current service data packet and the next service data packet is 5+245+245+5=500.

[0090] In some alternative embodiments, the first information code block includes an S code block; the extension byte includes a first extension byte K1 in the S code block;

[0091] At least one extension byte is extended in the S code block and / or the newly added extended I code block, and the extension byte is used to carry the pre-packet gap number information and / or the post-packet gap number information, including:

[0092] The first byte of the S code block is used as a code block type byte, and the type of the code block type byte is S;

[0093] The 2nd to M1+1th bytes of the S code block are all used as first extension bytes K1, wherein the first extension byte K1 is used to carry the pre-packet gap number information, and M1 is the number of the first extension byte K1;

[0094] The remaining bytes of the S code block are used as data bytes to carry data information of the service data packet.

[0095] In some alternative embodiments, the first encoded data can only extend the S code block, without adding the extended I code block. The S code block of the current service data packet carries the number of the preceding packet gap information. This case is generally applicable to the case where the number of packet gaps is small.

[0096] For example, the T code block of the preceding service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes; the S code block of the current service data packet carries the number of the preceding packet gap information of 20, and the total number of packet gaps between the preceding service data packet and the current service data packet is 5+20=25.

[0097] In some alternative embodiments, the first information code block includes the S code block; the extension byte includes the first extension byte K1 in the S code block;

[0098] Step S1420, extending at least one extension byte in the S code block and / or the added extended I code block, the extension byte being used to carry the number of the preceding packet gap information and / or the number of the following packet gap information, comprising:

[0099] Step S1421, accumulating and counting the number of the following packet gap information between the current service data packet and the next service data packet;

[0100] Step S1422, when the number of the packet gap information is less than or equal to the first preset threshold, carrying the number of the following packet gap information by the first extension byte K1 in the S code block of the next service data packet.

[0101] In some alternative embodiments, the first encoded data can extend the S code block, and set the first preset threshold, when less than or equal to the first preset threshold, carrying the number of the following packet gap information by the first extension byte K1 in the S code block of the next service data packet.

[0102] For example, the T code block of the preceding service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes; the S code block of the current service data packet carries the number of the preceding packet gap information of 20, and the total number of packet gaps between the preceding service data packet and the current service data packet is 5+20=25.

[0103] In some alternative embodiments, the first information code block includes the S code block and an extended I code block; the extension byte includes the first extension byte K1 in the S code block and the second extension byte K2 in the extended I code block;

[0104] Step S1420, extending at least one extension byte in the S code block and / or the added extended I code block, the extension byte being used to carry the number of the preceding packet gap information and / or the number of the following packet gap information, comprising:

[0105] Step S1423, accumulate the packet gap number information between the current service data packet and the next service data packet;

[0106] Step S1424, when the packet gap number information is greater than the first preset threshold, add an extended I code block, and the extended I code block includes at least one second extension byte K2, which is used to carry part of the packet gap number information;

[0107] Step S1425, the remaining number of packet gap number information is carried by the first extension byte K1 in the S code block of the next service data packet.

[0108] In some alternative embodiments, the first encoding data can extend the S code block, and set the first preset threshold. When the accumulated packet gap number information is greater than the first preset threshold, an extended I code block is added, and the extended I code block includes at least one second extension byte K2, which is used to carry part of the packet gap number information, and the remaining number of packet gap number information is carried by the first extension byte K1 in the S code block of the next service data packet.

[0109] For example, the T code block of the current service data packet can include 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes; the extended I code block newly added after the current service data packet carries 245 packet gap number information, and the extended I code block carries 5 I control bytes; the S code block of the next service data packet carries 245 packet gap number information, and the total number of packet gaps between the current service data packet and the next service data packet is 5+245+245+5=500.

[0110] In some alternative embodiments, the first information code block includes the S code block and N extended I code blocks, N is a positive integer greater than or equal to 2; the extension byte includes the first extension byte K1 in the S code block and the second extension byte K2 in the extended I code block;

[0111] Step S1420, extend at least one extension byte in the S code block and / or the newly added extended I code block, and the extension byte is used to carry the front packet gap number information and / or the rear packet gap number information, including:

[0112] Step S1426, accumulate the packet gap number information between the current service data packet and the next service data packet;

[0113] Step S1427, when the packet gap number information is greater than the first preset threshold, add a first extended I code block, and the first extended I code block includes at least one second extension byte K2, which is used to carry the first number of packet gap number information;

[0114] Step S1428, judging whether the remaining number of packet gap number information is greater than the first preset threshold, if yes, adding a second extension I code block, the second extension I code block including at least one second extension byte K2, for carrying the second number of packet gap number information in the remaining number of packet gap number information;

[0115] Similarly, adding an Nth extension I code block until the remaining number of packet gap number information is less than or equal to the first preset threshold;

[0116] Step S1429, carrying the remaining number of packet gap number information by the first extension byte K1 in the S code block of the next service data packet.

[0117] In some alternative embodiments, the first encoding data can extend the S code block, and set the first preset threshold, when the packet gap number information is greater than the first preset threshold, adding a first extension I code block, the first extension I code block including at least one second extension byte K2, for carrying the first number of packet gap number information; judging whether the remaining number of packet gap number information is greater than the first preset threshold, if yes, adding a second extension I code block, the second extension I code block including at least one second extension byte K2, for carrying the second number of packet gap number information in the remaining number of packet gap number information; similarly, adding an Nth extension I code block until the remaining number of packet gap number information is less than or equal to the first preset threshold; carrying the remaining number of packet gap number information by the first extension byte K1 in the S code block of the next service data packet. This case is generally used in the case of large packet gap number information.

[0118] For example, the T code block of the current service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes. The first extension I code block added after the current service data packet carries 245 post-packet gap number information, and the extension I code block carries 5 I control bytes; the second extension I code block added after the current service data packet carries 245 post-packet gap number information, and the extension I code block carries 5 I control bytes; the nineteenth extension I code block added after the current service data packet carries 245 post-packet gap number information, and the extension I code block carries 5 I control bytes; the S code block of the next service data packet carries 245 post-packet gap number information, then the total number of packet gaps between the current service data packet and the next service data packet is 5+(245+5)*19+245=5000.

[0119] In some alternative embodiments, the added extension I code block includes:

[0120] At least one type byte, the type byte being used to identify the code block type;

[0121] At least one extended identifier byte, which is used to identify the code block as an extended I code block;

[0122] M2 second extended bytes K2;

[0123] At least one I control byte.

[0124] It is understandable that the newly added extended I code block may include: at least one type byte, used to identify the code block type; at least one extended identifier byte, used to identify the code block as an extended I code block; M2 second extended bytes K2; and at least one I control byte; wherein, the I control byte is used to characterize IPG information, that is, the number of I control bytes in the extended I code block characterizes the amount of IPG information carried. For example, as Figure 3 As shown, the first byte of the newly added extended I code block is a type byte, with a type of 0x1e, used to identify that the code block type is an I code block; the second byte of the newly added extended I code block is an extension identifier byte, with a value of 0x2a, used to identify that the code block is used to carry inter-packet gap (IPG) quantity information; M2 has a value of 1, meaning it includes one second extension byte K2; the third byte of the newly added extended I code block is the second extension byte K2, used to carry inter-packet gap (IPG) quantity information; the remaining 5 bytes of the newly added extended I code block are all I control bytes. In other words, compared to a regular I code block, the newly added extended I code block adds an extension identifier byte and a second extension byte K2.

[0125] In some alternative implementations, the number of first extended bytes K1 is less than or equal to 2; the number of second extended bytes K2 is less than or equal to 2.

[0126] In some alternative implementations, the first preset threshold is set according to the number of the first extended bytes K1.

[0127] The number of the first extended byte K1 and the second extended byte K2 can be set as needed. For example, it can be determined based on the number of packet gaps or based on a first preset threshold. For example, if a byte contains 8 bits, then its maximum carrying capacity is 255. Therefore, it can be set to 1 byte as needed, and the first preset threshold cannot be set to more than 255.

[0128] In some alternative implementations, the Ethernet data stream is a PCS data stream;

[0129] Step S1200: Based on the Ethernet data stream, obtain multiple service data packets, including:

[0130] Step S1210: Parse the PCS data stream;

[0131] Step S1220, obtaining the parsed plurality of MAC data packets, and taking the MAC data packets as service data packets.

[0132] In some alternative embodiments, step S1500, mapping the first encoded data to the OTN data stream, comprises:

[0133] Step S1510, adding an I code block after the first encoded data to adapt to the rate of the OTN data stream.

[0134] In some alternative embodiments, step S1500, mapping the first encoded data to the OTN data stream, further comprises:

[0135] Step S1520, performing 1024B / 1027B transcoding on the first encoded data after rate adaptation;

[0136] Step S1530, mapping the transcoded data to the OTN data stream.

[0137] In some alternative embodiments, the OTN data stream is a FlexO data stream.

[0138] For example, three types of 64B / 66B code blocks are used in the embodiments of the present application, including a redefined extended S code block, a newly added extended I code block, and a standard I code block, as shown in the following table. Figure 3 In the extended S code block, IPG information and service data D of the service data packet are mainly carried, the first extension byte K1 occupies M1 bytes, and M1 is maximally 2, the service data D of the service data packet is the 7th to M1th byte, for example, the service data D of the service data packet can occupy 5 or 6 bytes. In the extended I code block, a type byte, an extension identification byte, a second extension byte K2, and an I control byte are included. The extension identification byte is used to distinguish the standard 64B / 66B I code block used for rate adaptation, the second extension byte K2 occupies M2 bytes, which can be consistent with the number of bytes occupied by the first extension byte K1 in the extended S code block, i.e., M2=M1, and the remaining I control byte carries the actual number.

[0139] Referring to Figure 4For the encoding mapping process of the source device in the example, the Ethernet interface service can be parsed into MAC frames (MAC data packets), and the accumulated statistics can be parsed into MAC data packets to delete the related IPG information (inter-packet gap information) and convert the IPG information into inter-packet gap quantity information (IPG quantity), which is carried to the sink device through the extended S code block or the extended I code block. After the MAC data packet is encoded through 64B / 66B, the rate adaptation is performed through the standard I code block of 64B / 66B, and then the 1024B / 1027B conversion is performed, and then the mapping is performed to the payload of the FlexO data stream to complete the mapping processing. The sink device performs related IPG rate and bit recovery to meet the demand of the traditional OTN network for transparent transmission of Ethernet service.

[0140] Specifically, the IPG information deleted by the accumulated statistics is parsed into MAC, and in order to adapt to the characteristics of the Ethernet service stream, the MAC traffic can reach 0, the IPG information can be set with a threshold value AThresh (a first preset threshold value), and the AThresh value can be flexibly set according to the actual inter-packet gap quantity information (IPG quantity) occupying the number of bytes. According to whether the statistical inter-packet gap quantity information exceeds AThresh, two scenarios are distinguished, as shown in the following table. Figure 5 Specifically, the IPG information deleted by the accumulated statistics is parsed into MAC, and in order to adapt to the characteristics of the Ethernet service stream, the MAC traffic can reach 0, the IPG information can be set with a threshold value AThresh (a first preset threshold value), and the AThresh value can be flexibly set according to the actual inter-packet gap quantity information (IPG quantity) occupying the number of bytes. According to whether the statistical inter-packet gap quantity information exceeds AThresh, two scenarios are distinguished, as shown in the following table.

[0141] The following two examples further illustrate the processing flow of the embodiments of the application.

[0142] Example 1

[0143] In the example, the 200G FlexO network short-distance interface is consistent with the Ethernet interface rate, 200G Ethernet service flow is mapped to the FlexO interface, and the PCS transparent transmission of the Ethernet service flow is realized. The service data packet length of the Ethernet is 128 bytes, and MAC#N is used to represent the Nth MAC data packet, for example, MAC#1 represents the first MAC data packet, MAC#2 represents the second MAC data packet MAC#2, and the like. There are 500 IPG information between MAC#1 and MAC#2, 5000 IPG information between MAC#2 and MAC#3, and 25 IPG information between MAC#3 and MAC#4, and the threshold value AThresh is set to 250.

[0144] The specific processing and mapping flow of the source device is as shown in Figure 6 The first encoded data obtained by encoding is as shown in Figure 7 First, the Ethernet service flow is parsed into MAC data packets from 257b or 66b, and the 128-byte MAC data packet is encoded into an extended S code block + 15 data blocks D + 1 T code blocks. The number of IPGs deleted between packets is counted, and is carried to the sink device through the extended I code block and the extended S code block. In the example, there are continuously occurring extended I code blocks, single extended I code blocks, and no extended I code blocks are sent, and the specific processing process is shown in Figure 6After the T code block of MAC#1 is parsed, the number of IPGs deleted between the two MAC data packets is accumulated, and the number of IPGs in MAC#1 and MAC#2 is accumulated to 251, that is, exceeds the threshold value AThresh, at this time, MAC#2 has not been received, and the first extension I code block is inserted (the first extension I code block, wherein the number of IPGs carried by the second extension byte K2 is 245). After the first extension I code block is inserted, the number of IPGs is re-accumulated, and when the number of IPGs is 249, MAC#2 arrives, and the number of IPGs is carried by the extension S code block when the MAC#2 packet header is encoded to 64B / 66B (the number of IPGs carried by the first extension byte K1 is 245). After the T code block of MAC#2 is parsed, the number of IPGs is re-accumulated, and when the number of IPGs is 251, which exceeds the threshold value AThresh, the extension I code block is inserted, and the number of IPGs is re-accumulated, and finally 19 extension I code blocks are inserted, wherein the number of IPGs carried by the second extension byte K2 of each extension I code block is 245; when the number of IPGs is 249, MAC#3 arrives, and the number of IPGs is carried by the extension S code block of MAC#3 to 64b (the number of IPGs carried by the first extension byte K1 is 245). After the T code block of MAC#3 is parsed, the number of IPGs is re-accumulated, and when the number of IPGs is 25, MAC#4 arrives, and the number of IPGs is 25, which is carried by the extension S code block of MAC#4 (the number of IPGs carried by the first extension byte K1 is 20), and the specific encoding case is shown in Figure 7 .

[0145] Example Two

[0146] In Example Two, the 400G FlexO short-distance interface is consistent with the Ethernet interface rate, 400G Ethernet service flow is mapped to the FlexO interface, and the PCS of the Ethernet service flow is transparently transmitted. The length of the Ethernet service data packet is 9600 bytes, and MAC#N is used to represent the Nth MAC data packet, for example, MAC#1 represents the first MAC data packet, MAC#2 represents the second MAC data packet, and so on. The threshold value of the number of IPGs AThresh is 50. There are 10 IPGs between MAC#1 and MAC#2, and 14 IPGs between MAC#2 and MAC#3.

[0147] The specific processing and mapping process of the source device is shown in Figure 8 The first encoded data obtained by encoding is shown in Figure 9The Ethernet data stream is parsed from 257b or 66b into MAC data packets, and a 9600-byte MAC data packet is encoded into an extended S code block + 1199 data blocks D + 1 T code blocks. The number of IPGs deleted between packets is counted and carried to the sink device through an extended I code block or an extended S code block. In this example, no IPG information is carried through the extended I code block, and the IPG information is carried to the sink device through the first extension byte K1 in the extended S code block. For details, see Figure 8 After the T code block of MAC#1 is parsed, the number of IPGs deleted between two MAC data packets is accumulated, and when the number of IPGs in MAC#1 and MAC#2 is accumulated to 10, MAC#2 is reached. The number of IPGs is carried through the extended S code block when 64B / 66B is encoded in the header of MAC#2. After the T code block of MAC#2 is parsed, the number of IPGs is accumulated again, and when the number of IPGs is counted to 14, MAC#3 is reached. The number is carried through the first extension byte K1 in the extended S code block of MAC#3 to 64B. For details, see Figure 9 .

[0148] In the embodiments of the present application, the source device counts and deletes the inter-packet gap information between adjacent service data packets, forms inter-packet gap number information according to the counting result, encodes the service data packets in a first encoding mode, and extends a first information code block for carrying the inter-packet gap number information to form first encoded data, thereby realizing compression of the Ethernet service stream data, reducing the Ethernet service stream rate, matching the Ethernet service stream rate with the OTN interface rate, and further achieving the purpose of transmitting the Ethernet service stream through the OTN network, thereby filling the technical gap in the related art.

[0149] In addition, the embodiments of the present application also provide a data transmission method applied to a sink device of an OTN network.

[0150] It can be understood that the execution subject of the data transmission method in the present example can be, but is not limited to, the sink device 120 in the embodiment shown in Figure 1 The execution subject of the data transmission method in the present example can be, but is not limited to, the sink device 120 in the embodiment shown in

[0151] As shown in Figure 10 , the data transmission method comprises:

[0152] Step S2100, obtaining an OTN data stream;

[0153] In step S2200, the OTN data stream is parsed to obtain first encoded data, wherein the first encoded data comprises service data code blocks and first information code blocks, and the first information code blocks are used to carry inter-packet gap quantity information between adjacent service data packets.

[0154] In step S2300, the first encoded data is decoded according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and the first information code blocks, and a plurality of service data packets and the inter-packet gap quantity information between adjacent service data packets.

[0155] In step S2400, the Ethernet data stream is obtained according to the inter-packet gap quantity information between the service data packets and adjacent service data packets.

[0156] It can be understood that the sink device 120 is a receiving device of the OTN network, and is in communication connection with the sink Ethernet network 220, and at least has the functions of receiving the OTN data stream sent by the source device 110 and processing the OTN data stream, wherein the OTN data stream is obtained by the source device 110 according to a first network coding mode for source data packets, and the first network coding mode is determined by the source device 110 according to a preconfigured first network coding parameter. The first extension strategy is an encoding extension strategy adopted by the source device, for example, the IPG quantity information saved by the extension S code block and / or the extension I code block is used to carry the IPG quantity information. The OTN data stream can be obtained by the source device by executing the foregoing steps S1100 to S1500, and the sink device can decode and parse the original Ethernet data stream according to the encoding mode of the source device, so as to realize the transparent transmission of the Ethernet data stream in the OTN network. The related description can be referred to the corresponding description in the foregoing description, and will not be repeated here.

[0157] In some alternative embodiments, the first decoding mode is a 64B / 66B decoding mode.

[0158] The inter-packet gap quantity information comprises front inter-packet gap quantity information and rear inter-packet gap quantity information, wherein the front inter-packet gap quantity information is used to represent the total number of inter-packet gaps between the current service data packet and the previous service data packet, and the rear inter-packet gap quantity information is used to represent the total number of inter-packet gaps between the current service data packet and the next service data packet.

[0159] The first information code blocks comprise S code blocks and / or newly added extension I code blocks.

[0160] In step S2300, the first encoded data is decoded according to the first decoding mode and the first extension strategy to obtain the inter-packet gap quantity information between adjacent service data packets, comprising:

[0161] Step S2310, decoding the first encoded data by using the 64B / 66B encoding mode to obtain S code blocks, data code blocks and T code blocks corresponding to each service data packet;

[0162] Step S2320, parsing at least one extension byte in the S code block and / or the newly added extension I code block according to the first extension strategy to obtain the inter-packet gap quantity information between adjacent service data packets, wherein the extension byte is used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information.

[0163] It can be understood that the embodiments of the present application can decode the first encoded data by using the 64B / 66B decoding mode, carry the inter-packet gap quantity information in the S code block, newly add the extension I code block to carry the inter-packet gap quantity information, or carry the inter-packet gap quantity information in the S code block and the newly added extension I code block at the same time, and the embodiments of the present application do not limit this.

[0164] For example, referring to Figure 3 , the extended S code block and the newly added extension I code block are both control code blocks. The first byte of the S code block is taken as a code block type byte, and the type of the code block type byte is S. The 2nd to M1+1th bytes of the S code block are all taken as first extension bytes K1, wherein the first extension byte K1 is used to carry the front inter-packet gap quantity information (IPG quantity), and M1 is the quantity of the first extension byte K1. The remaining bytes of the S code block are taken as data bytes D, which are used to carry the data information of the service data packet. For example, as shown in Figure 3 , M1 is the quantity of the first extension byte K1, which is 1, so the 2nd byte of the S code block is taken as the first extension byte K1, and the remaining 6 bytes of the S code block are taken as the data bytes D, which are used to carry the data information of the service data packet.

[0165] The newly added extension I code block includes: at least one type byte, the type byte is used to identify the code block type; at least one extension identification byte, the extension identification byte is used to identify that the code block is the extension I code block; M2 second extension bytes K2; at least one I control byte; wherein the I control byte is used to represent the IPG information, that is, the quantity of the I control byte in the extension I code block represents the quantity of the carried IPG information. For example, as shown in Figure 3As shown, the first byte of the newly added extended I code block is a type byte, the type of the type byte is 0x1e, which is used to identify that the type of the code block is I code block; the second byte of the newly added extended I code block is an extension identification byte, the value of the extension identification byte is 0x2a, which is used to identify that the code block is a code block for carrying inter-packet gap number information (IPG number); the value of M2 is 1, that is, one second extension byte K2 is included, the third byte of the newly added extended I code block is the second extension byte K2, which is used to carry inter-packet gap number information (IPG number); the remaining 5 bytes of the newly added extended I code block are all I control bytes. That is, compared with the ordinary I code block, the newly added extended I code block increases the extension identification byte and the second extension byte K2.

[0166] In some alternative embodiments, the T code block comprises:

[0167] one code block type byte, the type of the code block type byte is T;

[0168] a plurality of data bytes and / or a plurality of I control bytes; the sum of the inter-packet gap number corresponding to the I control byte and the post-inter-packet gap number information is equal to the total number of inter-packet gaps between the current service data packet and the next service data packet.

[0169] It can be understood that, in addition to the code block type byte, the subsequent bytes of the T code block are first used to carry service data packet data, and the remaining bytes carry I control bytes. Therefore, according to the amount of service data packet data carried, the T code block can contain one code block type byte and seven data bytes, or one code block type byte and seven I control bytes, or one code block type byte, a plurality of (one or more) data bytes, and a plurality of (one or more) I control bytes.

[0170] Among them, the I control byte is used to represent the IPG information, that is, the number of I control bytes in the T code block represents the number of IPG information carried. Therefore, the total number of inter-packet gaps between the current service data packet and the next service data packet is equal to the sum of the number of I control bytes carried by the T code block of the current service data packet and the post-inter-packet gap number information.

[0171] For example, the T code block of the current service data packet can contain one information 1 code block type byte, two data bytes D, and five I control bytes; the newly added extended I code block of the current service data packet carries 245 post-inter-packet gap number information, and the extended I code block carries five I control bytes; the S code block of the next service data packet carries 245 post-inter-packet gap number information, then the total number of inter-packet gaps between the current service data packet and the next service data packet is 5+245+245+5=500.

[0172] In some alternative embodiments, the first information code block comprises an S code block; and the extension bytes comprise first extension bytes K1 in the S code block.

[0173] At step S2320, the first encoded data is decoded according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and the first information code block, and to obtain a plurality of service data packets and the number of packet gaps between adjacent service data packets, including:

[0174] At step S2321, the code block type byte is parsed, and the type of the code block type byte is S to identify the first byte of the S code block.

[0175] At step S2322, the second to (M1+1)th bytes of the S code block are all identified as the first extension bytes K1, wherein the first extension bytes K1 are used to carry the number of front packet gaps, and M1 is the number of the first extension bytes K1.

[0176] At step S2323, the remaining bytes of the S code block are parsed as data bytes, which are used to carry the data information of the service data packet.

[0177] In some alternative embodiments, the first information code block comprises an S code block; and the extension bytes comprise first extension bytes K1 in the S code block.

[0178] At step S2300, the first encoded data is decoded according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and the first information code block, and to obtain a plurality of service data packets and the number of packet gaps between adjacent service data packets, including:

[0179] At step S2324, the number of I control bytes of the T code block corresponding to the current service data packet is parsed to obtain the corresponding first number of packet gaps.

[0180] At step S2325, the first extension bytes K1 in the S code block of the next service data packet are parsed to obtain the number of rear packet gaps.

[0181] At step S2326, the total number of packet gaps between the current service data packet and the next service data packet is obtained according to the number of rear packet gaps and the first number of packet gaps.

[0182] In some alternative embodiments, the first encoded data can only extend the S code block without adding an extension I code block. The S code block of the current service data packet carries the number of front packet gaps. This case is generally applicable to the case where the number of packet gaps is small.

[0183] For example, the T code block of the previous service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes; the S code block of the current service data packet carries 20 inter-packet gap quantity information, and the total number of inter-packet gaps between the previous service data packet and the current service data packet is 5+20=25.

[0184] In some alternative embodiments, the first information code block includes an S code block and an extended I code block; the extension bytes include a first extension byte K1 in the S code block and a second extension byte K2 in the extended I code block;

[0185] Step S2320, decoding the first encoded data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and the first information code block, and obtaining a plurality of service data packets and inter-packet gap quantity information between adjacent service data packets, including:

[0186] Step S2327, parsing the number of I control bytes of the T code block corresponding to the current service data packet to obtain corresponding second inter-packet gap quantity information;

[0187] Step S2328, parsing at least one second extension byte K2 in the extended I code block to obtain corresponding third inter-packet gap quantity information;

[0188] Step S2329, parsing the first extension byte K1 in the S code block of the next service data packet to obtain fourth inter-packet gap quantity information;

[0189] Step S2330, obtaining the total number of inter-packet gaps between the current service data packet and the next service data packet according to the second inter-packet gap quantity information, the third inter-packet gap quantity information and the fourth inter-packet gap quantity information.

[0190] For example, the T code block of the previous service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes; the S code block of the current service data packet carries 20 inter-packet gap quantity information, and the total number of inter-packet gaps between the previous service data packet and the current service data packet is 5+20=25.

[0191] In some alternative embodiments, the first information code block includes an S code block and N extended I code blocks, N being a positive integer greater than or equal to 2; the extension bytes include a first extension byte K1 in the S code block and a second extension byte K2 in the extended I code block;

[0192] Step S2320, decoding the first encoded data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and the first information code block, and obtain a plurality of service data packets and the number of packet gaps between adjacent service data packets, including:

[0193] Step S2331, parsing the number of I control bytes of the T code block corresponding to the current service data packet to obtain corresponding fifth packet gap number information;

[0194] Step S2332, parsing at least one second extension byte K2 in the N extension I code blocks to obtain corresponding sixth packet gap number information;

[0195] Step S2333, parsing the first extension byte K1 in the S code block of the next service data packet to obtain seventh packet gap number information;

[0196] Step S2334, obtaining the total number of packet gaps between the current service data packet and the next service data packet according to the fifth packet gap number information, the sixth packet gap number information and the seventh packet gap number information.

[0197] For example, the T code block of the current service data packet can contain 1 information 1 code block type byte, 2 data bytes D and 5 I control bytes. The first extension I code block newly added after the current service data packet carries 245 rear packet gap number information, and the extension I code block carries 5 I control bytes; the second extension I code block newly added after the current service data packet carries 245 rear packet gap number information, and the extension I code block carries 5 I control bytes; the nineteenth extension I code block newly added after the current service data packet carries 245 rear packet gap number information, and the extension I code block carries 5 I control bytes; the S code block of the next service data packet carries 245 rear packet gap number information, and the total number of packet gaps between the current service data packet and the next service data packet is 5+(245+5)*19+245=5000.

[0198] In some alternative embodiments, the newly added extension I code block includes:

[0199] At least one type byte, the type byte being used to identify the code block type;

[0200] At least one extension identification byte, the extension identification byte being used to identify that the code block is an extension I code block;

[0201] M2 second extension bytes K2;

[0202] At least one I control byte.

[0203] It can be understood that the newly added extended I code block can include: at least one type byte, the type byte is used to identify the code block type; at least one extension identification byte, the extension identification byte is used to identify that the code block is an extended I code block; M2 second extension bytes K2; at least one I control byte; wherein, the I control byte is used to represent the IPG information, that is, the number of I control bytes in the extended I code block represents the number of IPG information carried. For example, as shown in Figure 3 the first byte of the newly added extended I code block is a type byte, the type of the type byte is 0x1e, which is used to identify that the code block type is an I code block; the second byte of the newly added extended I code block is an extension identification byte, the value of the extension identification byte is 0x2a, which is used to identify that the code block is a code block for carrying inter-packet gap number information (IPG number); the value of M2 is 1, that is, it includes one second extension byte K2, the third byte of the newly added extended I code block is the second extension byte K2, which is used to carry the inter-packet gap number information (IPG number); the remaining 5 bytes of the newly added extended I code block are all I control bytes. That is, compared with the ordinary I code block, the newly added extended I code block increases the extension identification byte and the second extension byte K2.

[0204] The number of first extension bytes K1 and second extension bytes K2 can be set as needed, for example, it can be determined according to the inter-packet gap number information, or it can be determined according to the first preset threshold. For example, one byte contains 8 bits, and the maximum number it carries is 255, so the first preset threshold cannot be set to exceed 255.

[0205] In some alternative embodiments, the number of first extension bytes K1 is less than or equal to 2; the number of second extension bytes K2 is less than or equal to 2.

[0206] In some alternative embodiments, the Ethernet data stream is a PCS data stream, and the service data packet is a MAC data packet.

[0207] Step S2400, obtaining an Ethernet data stream according to the inter-packet gap number information between the service data packet and the adjacent service data packet, including:

[0208] Step S2410, performing PCS encapsulation according to the inter-packet gap number information between the MAC data packet and the adjacent MAC data packet to obtain a PCS data stream.

[0209] In some alternative embodiments, the OTN data stream is a FlexO data stream.

[0210] The sink device of the embodiment of the application analyzes the OTN data stream of the source device according to the encoding and mapping mode of the source device, so as to achieve the purpose of transparent transmission of the Ethernet service stream through the OTN network, and make up the technical blank in the related method.

[0211] In addition, with reference to Figure 11 , the embodiment of the application further provides a data transmission method applied to an OTN network, the OTN network comprising a source device and a sink device connected with each other, the data transmission method comprising:

[0212] In step S3100, the source device performs the data transmission method as mentioned above to send the OTN data stream.

[0213] Correspondingly,

[0214] In step S3200, the sink device performs the data transmission method as mentioned above to receive and analyze the OTN data stream.

[0215] It can be understood that the related description of step S3100 can refer to the data transmission method performed by the source device as mentioned above, such as referring to steps S1100 to S1500 as mentioned above; correspondingly, the related description of step S3200 can refer to the data transmission method performed by the sink device as mentioned above, such as referring to steps S2100 to S2400 as mentioned above; and the description is not repeated here.

[0216] In addition, the embodiment of the application further provides a source device comprising a first memory, a first processor and a computer program stored in the first memory and executable on the first processor, and the first processor implements the data transmission method as mentioned above when executing the computer program. The related description can refer to the data transmission method performed by the source device as mentioned above, such as referring to steps S1100 to S1500 as mentioned above; and the description is not repeated here.

[0217] In addition, the embodiment of the application further provides a sink device comprising a second memory, a second processor and a computer program stored in the second memory and executable on the second processor, and the second processor implements the data transmission method as mentioned above when executing the computer program. The related description can refer to the data transmission method performed by the sink device as mentioned above, such as referring to steps S2100 to S2400 as mentioned above; and the description is not repeated here.

[0218] In addition, the embodiment of the application further provides a computer readable storage medium storing computer executable instructions, and the computer executable instructions are used to execute the data transmission method of any of the embodiments.

[0219] As will be appreciated by one of ordinary skill in the art, all or some steps, systems of the above-disclosed methods can be implemented as software, firmware, hardware, or suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as will be appreciated by one skilled in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as carrier waves or other transport mechanisms, and includes any information delivery media.

Claims

1. A data transmission method applied to a source device of an OTN network, the method comprising: obtaining an Ethernet data stream; obtaining a plurality of service data packets from the Ethernet data stream; counting and deleting inter-packet gap information between adjacent service data packets, and forming inter-packet gap quantity information according to a counting result; encoding the service data packets in a first encoding mode, and extending a first information code block for carrying the inter-packet gap quantity information to form first encoded data, the first encoding mode being a 64B / 66B encoding mode, and the first information code block including an S code block and / or an added extended I code block, at least one extended byte being extended in the S code block and / or the added extended I code block; mapping the first encoded data to an OTN data stream; and transmitting the OTN data stream. 2.The method of claim 1, wherein: the inter-packet gap quantity information includes front inter-packet gap quantity information and rear inter-packet gap quantity information, the front inter-packet gap quantity information being used to represent a total number of inter-packet gaps between a current service data packet and a previous service data packet, and the rear inter-packet gap quantity information being used to represent a total number of inter-packet gaps between the current service data packet and a next service data packet; the encoding the service data packets in the first encoding mode and extending the first information code block for carrying the inter-packet gap quantity information includes encoding the current service data packet in a 64B / 66B encoding mode to generate an S code block, a data code block and a T code block; and the extended byte is used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information; the T code block includes: one code block type byte, the code block type byte being of a T type; a plurality of data bytes and / or a plurality of I control bytes, a sum of inter-packet gap quantities corresponding to the I control bytes and the rear inter-packet gap quantity information being equal to the total number of inter-packet gaps between the current service data packet and the next service data packet; the first information code block includes the S code block; and the extended byte includes a first extended byte in the S code block; the extending at least one extended byte in the S code block and / or the added extended I code block, the extended byte being used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information, includes: taking a first byte of the S code block as a code block type byte, the code block type byte being of an S type; taking 2nd to M1+1th bytes of the S code block as the first extended byte, the first extended byte being used to carry the front inter-packet gap quantity information, and M1 being a number of the first extended byte; and taking remaining bytes of the S code block as data bytes, the data bytes being used to carry data information of the service data packet; the first information code block includes the S code block; and the extended byte includes a first extended byte in the S code block; and the extending at least one extended byte in the S code block and / or the added extended I code block, the extended byte being used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information, includes: accumulating and counting the rear inter-packet gap quantity information between the current service data packet and the next service data packet. ​ ​ ​ ​ ​ ​ ​ ​ ​ 3. The method of claim 2, wherein, ​ ​ 4. The method according to claim 2 or 3, characterized in that, ​ ​ ​ ​ 5. The method of claim 2, wherein, ​ ​ When the packet gap number information is less than or equal to a first preset threshold, the packet gap number information of the next packet is carried by a first extension byte in an S code block of the next service data packet.

6. The method of claim 2, wherein, The first information code block comprises an S code block and an extension I code block; the extension byte comprises a first extension byte in the S code block and a second extension byte in the extension I code block; The step of extending at least one extension byte in the S code block and / or the newly added extension I code block, the extension byte being used to carry the front packet gap number information and / or the rear packet gap number information, comprises the following steps: accumulating and counting the packet gap number information between the current service data packet and the next service data packet; When the packet gap number information is greater than the first preset threshold, a first extension I code block is newly added, the first extension I code block comprising at least one second extension byte, which is used to carry the first number of packet gap number information; The remaining number of packet gap number information is carried by a first extension byte in an S code block of the next service data packet.

7. The method of claim 2, wherein, The first information code block comprises an S code block and N extension I code blocks, N being a positive integer greater than or equal to 2; the extension byte comprises a first extension byte in the S code block and a second extension byte in the extension I code block; The step of extending at least one extension byte in the S code block and / or the newly added extension I code block, the extension byte being used to carry the front packet gap number information and / or the rear packet gap number information, comprises the following steps: accumulating and counting the packet gap number information between the current service data packet and the next service data packet; When the packet gap number information is greater than the first preset threshold, a first extension I code block is newly added, the first extension I code block comprising at least one second extension byte, which is used to carry the first number of packet gap number information; It is judged whether the remaining number of packet gap number information is greater than the first preset threshold, and if so, a second extension I code block is newly added, the second extension I code block comprising at least one second extension byte, which is used to carry the second number of packet gap number information in the remaining number of packet gap number information; In this way, an Nth extension I code block is newly added until the remaining number of packet gap number information is less than or equal to the first preset threshold; The remaining number of packet gap number information is carried by a first extension byte in an S code block of the next service data packet.

8. The method according to claim 6 or 7, characterized in that, The newly added extension I code block comprises: at least one type byte, the type byte being used to identify the code block type; At least one extension identification byte, the extension identification byte being used to identify that the code block is an extension I code block; M2 second extension bytes; At least one I control byte.

9. The method according to claim 6 or 7, characterized in that, The number of first extension bytes is less than or equal to 2; The number of second extension bytes is less than or equal to 2.

10. The method according to any one of claims 5 to 7, wherein the first preset threshold is set according to the number of first extension bytes.

11. The method according to any one of claims 1, 2, 3, 5, 6, 7, characterized in that, The Ethernet data stream is a PCS data stream; The step of obtaining a plurality of service data packets according to the Ethernet data stream comprises the following step: analyzing the PCS data stream; The analyzed plurality of MAC data packets are obtained, and the MAC data packets are taken as the service data packets.

12. The method according to any one of claims 1, 2, 3, 5, 6, 7, characterized in that, The mapping of the first encoded data to the OTN data stream comprises adding an I code block after the first encoded data to adapt to a rate of the OTN data stream.

13. The method of claim 12, wherein, The mapping of the first encoded data to the OTN data stream further comprises performing 1024B / 1027B transcoding on the first encoded data after rate adaptation. The transcoded data is mapped to the OTN data stream.

14. A data transmission method applied to a sink device of an OTN network, the method comprising: An OTN data stream is acquired. The OTN data stream is parsed to obtain first encoded data, wherein the first encoded data comprises service data code blocks and first information code blocks, and the first information code blocks are used to carry inter-packet gap quantity information between adjacent service data packets. The first encoded data is decoded according to a first decoding mode and a first extension strategy to obtain a plurality of service data code blocks and first information code blocks, and to obtain a plurality of service data packets and inter-packet gap quantity information between adjacent service data packets, the first decoding mode is a 64B / 66B decoding mode, the first information code blocks comprise S code blocks and / or newly added extension I code blocks, at least one extension byte in the S code blocks and / or the newly added extension I code blocks is parsed according to the first extension strategy to obtain the inter-packet gap quantity information between adjacent service data packets. An Ethernet data stream is obtained according to the service data packets and the inter-packet gap quantity information between adjacent service data packets.

15. The method of claim 14, wherein The inter-packet gap quantity information comprises front inter-packet gap quantity information and rear inter-packet gap quantity information, wherein the front inter-packet gap quantity information is used to represent a total number of inter-packet gaps between a current service data packet and a previous service data packet, and the rear inter-packet gap quantity information is used to represent a total number of inter-packet gaps between the current service data packet and a next service data packet. The decoding of the first encoded data according to the first decoding mode and the first extension strategy to obtain the inter-packet gap quantity information between adjacent service data packets comprises decoding the first encoded data by using the 64B / 66B decoding mode to obtain S code blocks, data code blocks and T code blocks corresponding to each service data packet. The extension byte is used to carry the front inter-packet gap quantity information and / or the rear inter-packet gap quantity information.

16. The method of claim 15, wherein, The T code block comprises one code block type byte, the type of the code block type byte is T. A plurality of data bytes and / or a plurality of I control bytes, and a sum of inter-packet gap quantities corresponding to the I control bytes and the rear inter-packet gap quantity information is equal to a total number of inter-packet gaps between the current service data packet and the next service data packet.

17. The method according to claim 15 or 16, characterized in that, The first information code blocks comprise S code blocks, and the extension byte comprises a first extension byte in the S code blocks. The decoding of the first encoded data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and first information code blocks, and to obtain a plurality of service data packets and inter-packet gap quantity information between adjacent service data packets comprises parsing a code block type byte, the type of the code block type byte is S to identify a first byte of the S code blocks. The second to M1+1th bytes of the S code block are all identified as the first extension bytes, wherein the first extension bytes are used to carry the front packet gap number information, and M1 is the number of the first extension bytes; The remaining bytes of the S code block are parsed as data bytes, which are used to carry data information of the service data packet.

18. The method of claim 15, wherein, The first information code block comprises an S code block; and the extension bytes comprise first extension bytes in the S code block. The decoding of the first encoding data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and a first information code block, and a plurality of service data packets and packet gap number information between adjacent service data packets comprises: parsing the number of I control bytes of a T code block corresponding to a current service data packet to obtain corresponding first packet gap number information; The first extension bytes in the S code block of a next service data packet are parsed to obtain the next packet gap number information; The total number of packet gaps between the current service data packet and the next service data packet is obtained according to the next packet gap number information and the first packet gap number information.

19. The method of claim 15, wherein, The first information code block comprises an S code block and an extension I code block; and the extension bytes comprise first extension bytes in the S code block and second extension bytes in the extension I code block. The decoding of the first encoding data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and a first information code block, and a plurality of service data packets and packet gap number information between adjacent service data packets comprises: parsing the number of I control bytes of a T code block corresponding to a current service data packet to obtain corresponding second packet gap number information; At least one second extension byte in the extension I code block is parsed to obtain corresponding third packet gap number information; The first extension bytes in the S code block of a next service data packet are parsed to obtain fourth packet gap number information; The total number of packet gaps between the current service data packet and the next service data packet is obtained according to the second packet gap number information, the third packet gap number information and the fourth packet gap number information.

20. The method of claim 15, wherein, The first information code block comprises an S code block and N extension I code blocks, and N is a positive integer greater than or equal to 2; and the extension bytes comprise first extension bytes in the S code block and second extension bytes in the extension I code blocks. The decoding of the first encoding data according to the first decoding mode and the first extension strategy to obtain a plurality of service data code blocks and a first information code block, and a plurality of service data packets and packet gap number information between adjacent service data packets comprises: parsing the number of I control bytes of a T code block corresponding to a current service data packet to obtain corresponding fifth packet gap number information; At least one second extension byte in the N extension I code blocks is parsed to obtain corresponding sixth packet gap number information; The first extension bytes in the S code block of a next service data packet are parsed to obtain seventh packet gap number information; The total number of packet gaps between the current service data packet and the next service data packet is obtained according to the fifth packet gap number information, the sixth packet gap number information and the seventh packet gap number information.

21. The method of claim 19 or 20, wherein, The added extension I code block comprises: at least one type byte, the type byte is used for identifying code block type; At least one extension identification byte, the extension identification byte is used for identifying that the code block is an extension I code block; M2 second extension bytes; At least one I control byte.

22. The method of claim 19 or 20, wherein, The number of first extension bytes is less than or equal to 2; The number of second extension bytes is less than or equal to 2.

23. The method of any one of claims 14, 15, 16, 18, 19, 20, wherein, The Ethernet data stream is a PCS data stream, and the service data packet is a MAC data packet; The Ethernet data stream is obtained according to the packet gap number information between the service data packet and the adjacent service data packet, comprising: the PCS encapsulation is performed according to the packet gap number information between the MAC data packet and the adjacent MAC data packet, so as to obtain the PCS data stream.

24. A data transmission method applied to an OTN network, the OTN network comprising a source device and a sink device connected to each other in communication, the method comprising: The source device performs the data transmission method of any one of claims 1 to 13 to send the OTN data stream; Correspondingly, the sink device performs the data transmission method of any one of claims 14 to 23 to receive and analyze the OTN data stream.

25. A source device comprising: A first memory, a first processor, and a computer program stored on the first memory and executable on the first processor, wherein the first processor executes the computer program to implement the data transmission method of any one of claims 1 to 13.

26. A sink device comprising: A second memory, a second processor, and a computer program stored on the second memory and executable on the processor, wherein the processor executes the computer program to implement the data transmission method of any one of claims 14 to 23.

27. A computer readable storage medium storing computer executable instructions for performing: the data transmission method of any one of claims 1 to 13; Or, The data transmission method of any one of claims 14 to 23.

Citation Information

Patent Citations

  • Data transmission method from high speed Ethernet to optical transmission network and related interface and equipment

    CN101039245A

  • Business clock transparent transmission method and system in optical transport network

    CN101707506A