A data processing method and apparatus
By directly identifying and adding check fields in the optical transport network, the problem of high processing complexity in the prior art is solved, the data processing flow of 257-bit code block stream in OTN technology is simplified, and the processing efficiency is improved.
Patent Information
- Application Number
- CN202510626028.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2026-11-17
AI Technical Summary
In optical transport networks, existing technologies, when handling OTN technology with more than 1T bits per second for 100GE and above service bearers, require restoring 257-bit code blocks to 66-bit code blocks for MAC frame error checking, which increases processing complexity.
By directly identifying the start and end positions of the Media Access Control (MAC) frame encoding in the 257-bit code block stream at the transmitting end device and adding a check field, the 257-bit code block stream can be checked directly, avoiding the step of converting the 257-bit code block stream to a 66-bit code block stream before checking.
It reduces processing complexity, simplifies data processing procedures, and improves processing efficiency.
Smart Images

Figure CN123123762A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical communication technology, and in particular to a data processing method and apparatus. Background Technology
[0002] The primary service carried by current optical transport networks is Ethernet. When carrying Ethernet services through an optical transport network (OTN), the transmitting device needs to encode the MAC frames in the Ethernet into multiple 66-bit (B) code blocks, and then map these multiple 66-bit code blocks into OTN data frames.
[0003] Fine-grained OTN (fgOTN) is designed for Sub-1G services. To prevent the receiver from receiving erroneous MAC frames, it integrates a frame check sequence (FCS) mechanism into the 66-bit code block encoding scheme. OTN technology exceeding 1T bits per second (B1T) is designed for 100GE and above services and uses a 257-bit code block encoding scheme. When medium access control (MAC) frames need to be checked, the 257-bit code block must be restored to a 66-bit code block to complete the MAC frame error check before re-encoding the 257-bit code block, increasing processing complexity. Summary of the Invention
[0004] This application provides a data processing method and apparatus to reduce processing complexity.
[0005] Firstly, this application provides a data processing method. This method can be executed by a transmitting device. Unless otherwise specified, "transmitting device" in this application can refer to the transmitting device itself (e.g., an OTN device), a component within the transmitting device (e.g., a communication module, processor, circuit, chip, or chip system), or a logic module or software capable of implementing all or part of the functions of the transmitting device; this application does not limit this. The method includes: the transmitting device acquiring a 257-bit code block stream; each 257-bit code block in the 257-bit code block stream is encoded from four 66-bit code blocks, the types of which include control code blocks and data code blocks. The transmitting device determines the start and end positions of the Medium Access Control (MAC) frame encoding in the 257-bit code block stream based on the types of the 66-bit code blocks encoded in the 257-bit code block stream. The transmitting device adds a check field to either the first or second 257-bit code block according to the end position; the check field is used to check the bit stream from the start position to the end position; the first 257-bit code block is the 257-bit code block where the end position is located, or the second 257-bit code block is the 257-bit code block following the first 257-bit code block where the end position is located.
[0006] It should be noted that for a bitstream encoded as a MAC frame, the start position is identified first, followed by the end position. Furthermore, the bitstream involved in the verification includes both the start and end positions.
[0007] In this embodiment, the verification process is performed directly on the 257B code block stream, without having to convert the 257B code block stream to a 66B code block stream for verification and then further convert the 66B code block stream to a 257B code block stream, thereby reducing complexity.
[0008] In one possible implementation, the control code block is a start code block, an end code block, or a free code block. In this embodiment, only the control code block needs to be identified, eliminating the need to further identify whether it belongs to a start code block, an end code block, or a free code block, thus further reducing processing complexity.
[0009] In one possible implementation, the transmitting device determines the starting position of the Medium Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code blocks encoded in the 257-bit code block stream. This includes: the transmitting device identifying three consecutive 66-bit code blocks in the 257-bit code block stream as a first control code block, a second control code block, and a first data code block, and determining that the starting position is located in a third 257-bit code block, where the third 257-bit code block is the 257-bit code block containing the first data code block.
[0010] In the above implementation, when the code block pattern of three consecutive 66B code blocks is identified as CCD, where C represents the control code block and D represents the data code block, the starting position is identified, making the process simple and effective.
[0011] In one possible implementation, the transmitting device determines the end position of the Medium Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream. This includes: the transmitting device identifying three consecutive bit blocks in the 257-bit code block stream as a second data code block, a third control code block, and a fourth control code block, and determining that the first 257-bit code block where the end position is located is the 257-bit code block containing the third control code block.
[0012] In the above implementation, when the code block pattern of three consecutive 66B code blocks is identified as DCC, where C represents the control code block and D represents the data code block, the end position is identified, making the process simple and effective.
[0013] In one possible implementation, the first two 66-bit blocks of the third 257-bit code block are, in turn, the second control code block and the first data code block, and the last 66-bit block of the preceding 257-bit code block of the third 257-bit code block is the first control code block; or, the first three 66-bit blocks of the third 257-bit code block are, in turn, the first control code block, the second control code block, and the first data code block; or, the last three 66-bit blocks of the third 257-bit code block are, in turn, the first control code block, the second control code block, and the first data code block; or, the last two 66-bit blocks of the preceding 257-bit code block of the third 257-bit code block are, in turn, the first control code block and the second control code block, and the first 66-bit block of the third 257-bit code block is the first data code block.
[0014] The above methods provide several ways to identify the 257B code block where the starting position is located by using a CCD to identify the code block pattern of three consecutive 66B code blocks.
[0015] In one possible implementation, the first two 66-bit blocks in the third 257-bit code block are, sequentially, the second control code block and the first data code block, and the starting position is the 66th bit of the third 257-bit code block; or...
[0016] The first three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, and the starting position is the 130th bit of the third 257-bit code block; or...
[0017] The last three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, with the starting position being the 194th bit of the third 257-bit code block; or...
[0018] The last two 66-bit code blocks in the third 257-bit code block are the first control code block and the second control code block, respectively. The starting position is the first bit of the third 257-bit code block or the starting position is the second bit of the third 257-bit code block.
[0019] Using the above method, after identifying the code block pattern of three consecutive 66B code blocks as CCD, the starting bit of the data code block in the three 66B code blocks is determined as the starting position.
[0020] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the last 66-bit block of the preceding 257-bit code block of the first 257-bit code block is the second data code block; or, the first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, the last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, the last two 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block and the third control code block, and the first 66-bit block of the second 257-bit code block is the fourth control code block.
[0021] The above methods provide several ways to identify the pattern of three consecutive 66B code blocks as DCC to determine the 257B code block where the end position is located.
[0022] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are the third control code block and the fourth control code block, respectively, and the ending position is the 65th bit of the first 257-bit code block; or, the first three 66-bit blocks of the first 257-bit code block are the second data code block, the third control code block, and the fourth control code block, respectively, and the ending position is the 129th bit of the first 257-bit code block; or, the last three 66-bit blocks of the first 257-bit code block are the second data code block, the third control code block, and the fourth control code block, respectively, and the ending position is the 193rd bit of the first 257-bit code block; or, the last two 66-bit blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit block of the second 257-bit code block is the fourth control code block, and the ending position is the last bit of the first 257-bit code block.
[0023] Using the above method, after identifying the code block pattern of three consecutive 66B code blocks as DCC, the end bit of the first C code block in the three 66B code blocks is determined as the end position.
[0024] In one possible implementation, the transmitting device identifies three consecutive bit blocks in the 257-bit code block stream as the second data code block, the third control code block, and the fourth control code block, and determines that the check field is added to the fourth control code block.
[0025] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, sequentially, the third control code block and the fourth control code block, and the starting bit of the check field is the 98th bit of the first 257-bit code block; or,
[0026] The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 162nd bit of the first 257-bit code block; or,
[0027] The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 226th bit of the first 257-bit code block; or,
[0028] The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 34th bit of the second 257-bit code block.
[0029] Using the above method, after identifying the pattern of three consecutive 66B code blocks as DCC, the second C code block among these three 66B code blocks is determined as the insertion position for the check field. Taking CRC32 checksum as an example, in the above implementation, the check field is inserted into the last 32 bits of the second C code block among the three 66B code blocks.
[0030] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, sequentially, the third control code block and the fourth control code block, and the starting bit of the check field is the 74th bit of the first 257-bit code block; or...
[0031] The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 138th bit of the first 257-bit code block; or,
[0032] The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 202nd bit of the first 257-bit code block; or,
[0033] The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 10th bit of the second 257-bit code block.
[0034] Using the above method, after identifying the pattern of three consecutive 66B code blocks as DCC, the second C code block among these three 66B code blocks is determined as the insertion position for the check field. Taking CRC32 check as an example, in the above implementation, the check field is inserted 32 bits after the control block type field of the second C code block among the three 66B code blocks, and immediately adjacent to that control block type field.
[0035] In one possible implementation, the interval from the start position to the end position comprises N 257-bit code blocks, where N is a positive integer; the check field is generated based on a bit sequence; the bit sequence includes all bits in the bit stream except for the first bit of each of the N 257-bit code blocks. In the above implementation, excluding bits 0 from each of the 257B code blocks in the bit stream when calculating the check field reduces the computational load.
[0036] In one possible implementation, the method further includes: the transmitting device mapping a 257-bit code block stream with the check field added to it to a data frame; and transmitting the data frame. The data frame is an OTN frame, a ZR frame, or an MTN frame, etc.
[0037] In one possible implementation, mapping the 257-bit code block stream with the added check field to a data frame includes: encoding the 257-bit code block stream with the added check field into a 513-bit code block stream; mapping the 513-bit code block stream to a data frame; and sending the data frame.
[0038] Secondly, embodiments of this application provide a data processing method, which can be executed by a receiving device. Unless otherwise specified, "receiving device" in this application can refer to the transmitting device itself (e.g., an OTN device), a component within the receiving device (e.g., a communication module, processor, circuit, chip, or chip system), or a logic module or software capable of implementing all or part of the functions of the receiving device. This application does not limit the definition in this regard. The method includes: the receiving device receiving a data frame; the receiving device demapping the data frame to obtain a 257-bit code block stream; each 257-bit code block in the 257-bit code block stream is encoded from four 66-bit code blocks, the types of which include control code blocks and data code blocks; the receiving device determining the start and end positions of the Medium Access Control (MAC) frame encoding in the 257-bit code block stream based on the types of the 66-bit code blocks encoded in the 257-bit code block stream; and the receiving device generating a first check field, which is used to check the bit stream from the start position to the end position. The receiving device parses the second check field from either the first or second 257-bit block of the 257-bit code stream based on the end position. The first 257-bit block is the 257-bit block containing the end position, or the second 257-bit block is the 257-bit block following the first 257-bit block containing the end position. The bit stream from the start position to the end position is checked based on the first and second check fields.
[0039] The beneficial effects of the second aspect can be found in the relevant description of the first aspect, and will not be repeated here.
[0040] In one possible implementation, the method further includes: when the verification fails, the receiving device replaces the last 257-bit data code block in the bit stream with a 257-bit error code block, wherein the 257-bit error code block is encoded by four 66-bit error code blocks.
[0041] In one possible implementation, the method further includes: when the verification fails, the receiving device replaces the last data code block in the bit stream with an error code block.
[0042] In one possible implementation, the receiving device determines the starting position of the MAC frame encoded in the 257-bit code block stream based on the type of the 66-bit code blocks encoded in the 257-bit code block stream. This includes: the receiving device identifying three consecutive 66-bit code blocks in the 257-bit code block stream as a first control code block, a second control code block, and a first data code block, and determining that the starting position is located in a third 257-bit code block, where the third 257-bit code block is the 257-bit code block containing the first data code block.
[0043] In one possible implementation, the receiving device determines the end position of the Medium Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream. This includes: the receiving device identifying three consecutive bit blocks in the 257-bit code block stream as a second data code block, a third control code block, and a fourth control code block, and determining that the first 257-bit code block where the end position is located is the 257-bit code block containing the third control code block.
[0044] In one possible implementation, the first two 66-bit blocks of the third 257-bit code block are, in turn, the second control code block and the first data code block, and the last 66-bit block of the preceding 257-bit code block of the third 257-bit code block is the first control code block; or, the first three 66-bit blocks of the third 257-bit code block are, in turn, the first control code block, the second control code block, and the first data code block; or, the last three 66-bit blocks of the third 257-bit code block are, in turn, the first control code block, the second control code block, and the first data code block; or, the last two 66-bit blocks of the preceding 257-bit code block of the third 257-bit code block are, in turn, the first control code block and the second control code block, and the first 66-bit block of the third 257-bit code block is the first data code block.
[0045] In one possible implementation, the first two 66-bit blocks of the third 257-bit code block are, in sequence, the second control code block and the first data code block, with the starting position being the 66th bit of the third 257-bit code block; or, the first three 66-bit blocks of the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, with the starting position being the 130th bit of the third 257-bit code block; or, the last three 66-bit blocks of the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, with the starting position being the 194th bit of the third 257-bit code block; or, the last two 66-bit blocks of the third 257-bit code block are, in sequence, the first control code block and the second control code block, with the starting position being the first bit of the third 257-bit code block or the starting position being the second bit of the third 257-bit code block.
[0046] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the last 66-bit block of the preceding 257-bit code block of the first 257-bit code block is the second data code block; or, the first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, the last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, the last two 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block and the third control code block, and the first 66-bit block of the second 257-bit code block is the fourth control code block.
[0047] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are the third control code block and the fourth control code block, respectively, and the ending position is the 65th bit of the first 257-bit code block; or, the first three 66-bit blocks of the first 257-bit code block are the second data code block, the third control code block, and the fourth control code block, respectively, and the ending position is the 129th bit of the first 257-bit code block; or, the last three 66-bit blocks of the first 257-bit code block are the second data code block, the third control code block, and the fourth control code block, respectively, and the ending position is the 193rd bit of the first 257-bit code block; or, the last two 66-bit blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit block of the second 257-bit code block is the fourth control code block, and the ending position is the last bit of the first 257-bit code block.
[0048] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 98th bit of the first 257-bit code block; or, the first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 162nd bit of the first 257-bit code block; or, the last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 226th bit of the first 257-bit code block; or, the last two 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block and the third control code block, and the first 66-bit block of the second 257-bit code block is the fourth control code block, and the starting bit of the check field is the 34th bit of the second 257-bit code block.
[0049] In one possible implementation, the first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 74th bit of the first 257-bit code block; or, the first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 138th bit of the first 257-bit code block; or, the last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 202nd bit of the first 257-bit code block; or, the last two 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block and the third control code block, and the first 66-bit block of the second 257-bit code block is the fourth control code block, and the starting bit of the check field is the 10th bit of the second 257-bit code block.
[0050] In one possible implementation, the interval from the start position to the end position includes N 257-bit code blocks, where N is a positive integer; the first check field is generated based on a bit sequence; the bit sequence includes bits in the bit stream other than the first bit of each of the N 257-bit code blocks.
[0051] In one possible implementation, the control code block is a start S code block, an end T code block, or an idle I code block.
[0052] Thirdly, embodiments of this application provide an optical communication device. This device is used to execute the method provided in the first aspect, or to execute the method provided in the second aspect. Specifically, the device may include units and / or modules for executing the method provided in the first aspect or any of the above-described implementations of the first aspect; alternatively, the device may include units and / or modules for executing the method provided in the second aspect or any of the above-described implementations of the second aspect, such as a processing module and a transceiver module.
[0053] In one implementation, the optical communication device may include units and / or modules for performing the method provided in the first aspect or any of the above implementations of the first aspect, serving as a transmitting end device. The transceiver module may be a transceiver, or an input / output interface. The processing module may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.
[0054] Alternatively, the optical communication device may be a chip, chip system, or circuit in the transmitting end equipment. The transceiver module may be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip, chip system, or circuit. The processing module may be at least one processor, processing circuit, or logic circuit.
[0055] In another implementation, the optical communication device may include units and / or modules for performing the methods provided in the second aspect or any of the above implementations of the second aspect, serving as a receiving device. The transceiver module may be a transceiver, or an input / output interface. The processing module may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.
[0056] Alternatively, the optical communication device may be a chip, chip system, or circuit in the receiving end equipment. The transceiver module may be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip, chip system, or circuit. The processing module may be at least one processor, processing circuit, or logic circuit.
[0057] Fourthly, a processor is provided for executing the methods provided in the above aspects.
[0058] Unless otherwise specified, or if it does not contradict its actual function or internal logic in the relevant description, the transmission and acquisition / reception operations involved in the processor can be understood as processor output and reception, input and other operations, or as transmission and reception operations performed by radio frequency circuits and antennas. This application does not limit them in this regard.
[0059] Fifthly, an optical module is provided, comprising a signal processor and an optical transmitting component. The signal processor is used to execute the method provided in the first aspect or any of the above-described implementations of the first aspect. The optical transmitting component is used to convert data frames into optical signals and transmit the optical signals.
[0060] Sixthly, an optical module is provided, comprising a signal processor and an optical receiving component. The optical receiving component is used to receive optical signals and convert the optical signals into data frames; the signal processor is used to execute the method provided in the second aspect or any of the above-described implementations of the second aspect.
[0061] In a seventh aspect, embodiments of this application provide a network device comprising: a processor and an input / output interface, for executing the method provided in any implementation of the first or second aspect described above, wherein the input / output interface is used to transmit and receive OTN signals, and the processor is used to process the OTN signals.
[0062] Eighthly, a computer-readable storage medium is provided. This computer-readable storage medium stores program code for execution by a device, the program code including methods for performing any implementation of the first or second aspect described above.
[0063] A ninth aspect provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform the method provided by any implementation of the first or second aspect described above.
[0064] In a tenth aspect, a chip is provided. The chip includes a processor and a communication interface, wherein the processor reads instructions stored in a memory through the communication interface and executes the method provided in any implementation of the first or second aspect described above.
[0065] Optionally, as one implementation, the chip also includes a memory storing computer programs or instructions, and a processor for executing the computer programs or instructions stored in the memory. When the computer programs or instructions are executed, the processor is used to perform the method provided by any of the implementations of the first or second aspect described above.
[0066] The beneficial effects of the second to tenth aspects mentioned above can be found in the description of the beneficial effects in the first or second aspects, and will not be repeated here.
[0067] Based on the implementations provided in the above aspects, this application can be further combined to provide more implementations. Attached Figure Description
[0068] Figure 1 This is a schematic diagram of an OTN optical network system applicable to the embodiments of this application;
[0069] Figure 2 This is a schematic diagram of the hardware structure of an OTN device applicable to the embodiments of this application;
[0070] Figure 3 This is a schematic diagram of the hardware structure of an optical module applicable to an embodiment of this application;
[0071] Figure 4 This is a schematic diagram of the structure of the 66B code block applicable to the embodiments of this application;
[0072] Figure 5 A schematic diagram illustrating the MAC frame encoding as a 66B code block stream provided in this application;
[0073] Figure 6 This is a schematic diagram of data transmission provided in an embodiment of this application;
[0074] Figure 7This is a schematic diagram of the structure of the MAC frame provided in this application;
[0075] Figure 8 A schematic diagram of the 257B code block structure provided in the embodiments of this application;
[0076] Figure 9 This is a schematic flowchart of the data processing method provided in the embodiments of this application;
[0077] Figure 10A This is a schematic diagram of the starting position identification provided in an embodiment of this application;
[0078] Figure 10B This is a schematic diagram of the starting position identification provided in an embodiment of this application;
[0079] Figure 11 This is a schematic diagram of the end position identification provided in an embodiment of this application;
[0080] Figure 12 This is a schematic diagram showing the insertion position of the verification field provided in an embodiment of this application;
[0081] Figure 13 This is a schematic diagram of the starting position for inserting the identification verification code, provided in an embodiment of this application.
[0082] Figure 14A This is a schematic diagram of the insertion position of the verification field provided in Example 2-1 of the embodiments of this application;
[0083] Figure 14B This is a schematic diagram illustrating the insertion position of the verification field provided in Example 2-2 of this application embodiment;
[0084] Figure 14C This is a schematic diagram illustrating the insertion position of the verification field provided in Examples 2-3 of the embodiments of this application;
[0085] Figure 14D This is a schematic diagram illustrating the insertion position of the verification field provided in Examples 2-4 of the embodiments of this application;
[0086] Figure 15 This is a schematic diagram of the starting position for inserting the identification verification code, provided in an embodiment of this application.
[0087] Figure 16A This is a schematic diagram of the insertion position of the verification field provided in Example 3-1 of the embodiments of this application;
[0088] Figure 16B This is a schematic diagram of the insertion position of the verification field provided in Example 3-2 of the embodiments of this application;
[0089] Figure 16C This is a schematic diagram of the insertion position of the verification field provided in Example 3-3 of the embodiments of this application;
[0090] Figure 16D This is a schematic diagram illustrating the insertion position of the verification field provided in Examples 3-4 of the embodiments of this application;
[0091] Figure 16E This is a schematic diagram illustrating the verification generation range and insertion position in an embodiment of this application;
[0092] Figure 17 This is a schematic flowchart of the data processing method provided in the embodiments of this application;
[0093] Figure 18 A schematic diagram illustrating the replacement of a data code block with an error code block provided in an embodiment of this application;
[0094] Figure 19 A schematic diagram illustrating the replacement of a data code block with an error code block provided in an embodiment of this application;
[0095] Figure 20 A schematic block diagram of an optical communication device 1000 provided for an embodiment of this application;
[0096] Figure 21 This is a schematic diagram of the structure of an optical communication device 2000 provided in an embodiment of this application;
[0097] Figure 22 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0098] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0099] In the description of this application, unless otherwise stated, "multiple" refers to two or more. Additionally, " / " indicates that the related objects are in an "or" relationship; for example, A / B can represent A or B. "And / or" in this application merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. It should also be noted that, unless specifically stated, the specific description of some technical features in one embodiment can also be used to explain the corresponding technical features mentioned in other embodiments.
[0100] This application applies to optical networks such as optical transport networks or metropolitan area transport networks. Optical transport networks include OTN or flexible Ethernet. Taking OTN as an example, an OTN is typically composed of multiple OTN devices connected by optical fibers, and can be configured into different topologies such as linear, ring, and mesh according to specific needs. Figure 1 The diagram shown is a structural schematic of the OTN provided in this application. Figure 1 As shown, OTN 100 includes eight interconnected OTN devices 101, also known as devices AH. 102 indicates an optical fiber used to connect two devices; 103 indicates a customer service interface used to receive or transmit customer service data. Figure 1 As shown, OTN 100 is used to transmit service data for customer devices 1-3. Customer devices 1-3 can be Ethernet devices, and the service data can be Ethernet service data. The customer devices are connected to the OTN device through customer service interfaces. For example, Figure 1 In the middle, customer equipment 1-3 are connected to OTN equipment A, H and F respectively.
[0101] Depending on the specific needs, an OTN device may possess different functions. Generally speaking, OTN devices are categorized into optical layer devices, electrical layer devices, and hybrid optoelectronic devices. Optical layer devices refer to those capable of processing optical layer signals, such as optical amplifiers and optical add-drop multiplexers. Optical amplifiers amplify optical signals to support longer transmission distances while maintaining specific optical signal performance. Optical add-drop multiplexers perform spatial transformations on optical signals, allowing them to be output from different output ports (sometimes referred to as directions). Electrical layer devices refer to those capable of processing electrical layer signals, such as devices capable of processing OTN signals. Hybrid optoelectronic devices refer to devices capable of processing both optical and electrical layer signals. It should be noted that, depending on specific integration requirements, an OTN device can integrate multiple different functions. The technical solutions provided in this application are applicable to OTN devices with different forms and integration levels that include electrical layer functions.
[0102] Figure 2 This is a schematic diagram of the hardware structure of an OTN device applicable to an embodiment of this application. Specifically, the OTN device may include one or more of a tributary board, a line board, and a cross-connect board, and may also include one or more of a system control board, a power supply, a fan, and auxiliary boards.
[0103] The circuit board can also be an optical layer processing board. Depending on specific needs, the type and number of boards included in each device may differ. For example, an OTN device acting as a core node may not have tributary boards. An OTN device acting as an edge node may have multiple tributary boards. Power supply boards are used to power the OTN device and may include primary and backup power supplies. Fan boards are used for heat dissipation. Auxiliary boards provide auxiliary functions such as external alarms or access to external clocks. Tributary boards, cross-connect boards, and circuit boards are primarily used to process OTN electrical layer signals (also known as OTN frames). Tributary boards are used to receive and transmit various client signals (also known as client services). Client signals can include constant bit rate (CBR) signals (e.g., synchronous digital hierarchy (SDH) signals) and packet signals (e.g., Ethernet signals). Furthermore, tributary boards can include client-side optical modules and signal processors. The client-side optical modules are used to receive and / or transmit client signals. The signal processors are used to perform mapping and demapping processing of client signals to OTN frames. The signal processor can be located inside or outside the customer-side optical module. If the signal processor is a combination of multiple chips, one (or some) of the chips can be inside the customer-side optical module, while the others are outside. The cross-connect board is used to implement the switching of OTN frames, for example, to perform the switching of one or more types of OTN frames. The line board mainly implements the processing of line-side OTN frames. Specifically, the line board can include a line-side optical module and a signal processor. The line-side optical module, which can be called an optical transceiver, is used to receive and / or transmit optical signals carrying OTN frames. The signal processor is used to implement multiplexing and demultiplexing, or mapping and demapping processing of line-side OTN frames. The signal processor can be located inside or outside the line-side optical module. If the signal processor is a combination of multiple chips, one (or some) of the chips can be inside the line-side optical module, while the others are outside. The customer-side optical module or the line-side optical module can also be collectively referred to as an optical module or an optical transceiver. The signal processors in either the customer-side or line-side optical modules can be optical digital signal processors (oDSPs) or framers, or a combination of framers and oDSPs. System control boards are used for system control. Specifically, system control boards can collect information from different boards or send control commands to the corresponding boards.
[0104] It should be noted that, unless otherwise specified, a specific component (such as a tributary board) may be one or more, and this application does not impose any restrictions. This application also does not impose any restrictions on the type of boards included in the device, or on the functional design and number of the boards. It should also be noted that, in a specific implementation, the two boards mentioned above may also be designed as a single board. Furthermore, network devices may also include backup power supplies, fans for device cooling, auxiliary boards for providing external alarms or accessing external clocks, etc.
[0105] Figure 3 This is a schematic diagram of the hardware structure of an optical module applicable to an embodiment of this application. Figure 3 As shown, an optical module may include a signal processor, an optical transmitting component, and an optical receiving component. As mentioned above, the signal processor may include a framer or an oDSP, or a combination of a framer and an oDSP. An optical module can be a unidirectional optical module, meaning it includes either an optical transmitting component or an optical receiving component. An optical module can also be a bidirectional optical module, meaning it includes both an optical transmitting component and an optical receiving component.
[0106] Framer, also known as a service chip or physical layer (PHY) chip, is primarily used to perform OTN electrical layer encapsulation / decapsulation (or mapping / demapping). Framers encapsulate client signals into OTN frames or decapsulate OTN frames to obtain client signals. For example, a framer can encapsulate client signals into FlexO channel layer frames, or encapsulate FlexO channel layer frames into FlexO segment layer frames, etc. Decapsulation is the reverse process of encapsulation.
[0107] The oDSP is used for digital signal processing of OTN frames generated by the framer, or for digital signal processing of electrical signals obtained from the optical receiving component. The oDSP performs one or more processing operations, including forward error correction (FEC), clock recovery, equalization, sequence detection, and signal decision. FEC is an error control method that involves pre-encoding the signal according to a specific algorithm before it enters the transmission channel, adding redundant data with the signal's inherent characteristics, and then decoding the received signal at the receiving end according to a corresponding algorithm to identify and correct errors generated during transmission.
[0108] Optical transmitting module (TOSA): Also known as a transmitter optical subassembly, it converts electrical signals into optical signals. A TOSA may include a light source, a driver chip, and a modulator. The light source can be a semiconductor laser (also known as a laser diode (LD) or a light emitting diode (LED). The driver chip processes the electrical signals generated by the oDSP and drives the light source to emit modulated optical signals. The modulated optical signals are transmitted to the fiber optic line via an optical fiber interface.
[0109] Optical receiver assembly (ROSA), also known as a receiver optical subassembly, is used to convert optical signals into electrical signals. ROSA may include photodetectors, amplifiers, etc. The photodetector can be an avalanche photodiode (APD) or a PIN photodiode. The amplifier may include a preamplifier and a post-amplifier. After the optical signal enters from the fiber optic interface, it is converted into an electrical signal by the photodetector, and then amplified by the amplifier to output an amplified electrical signal.
[0110] It should be noted that the client signal involved in the embodiments of this application can refer to the service carried by the optical transport network or metropolitan area transport network, such as Ethernet service, packet service, or wireless backhaul service. The client signal can also be referred to as client-side signal, client signal, service signal, service data, client data, or client service data, etc.
[0111] The above Figures 1 to 3 The examples provided are for illustrative purposes only and do not preclude other structural schemes.
[0112] It should be noted that the data frame structure used by the optical transmission equipment in this application embodiment can be an OTN frame. OTN frames are used to carry various service data and provide rich management and monitoring functions. An OTN frame can be an optical data unit frame (ODUk), ODUn, ODUflex, or an optical transport unit frame (OTUk), OTUn, or a flexible OTN (FlexO) frame, etc. The difference between an ODU frame and an OTU frame is that an OTU frame includes both the ODU frame and OTU overhead. k represents different rate levels. For example, k=1 represents 2.5Gbps, and k=4 represents 100Gbps. Cn represents a variable rate, specifically a positive integer multiple of 100Gbps. Unless otherwise specified, an ODU frame refers to any one of ODUk, ODUn, or ODUflex, and an OTU frame refers to any one of OTUk, OTUn, or FlexO. It should also be noted that with the development of optical transport network technology, new types of OTN frames may be defined, which also apply to this application. Furthermore, the method disclosed in this application can also be applied to other optical transport network frames such as FlexE frames, metro transport network (MTN) frames, and zero dispersion shifted range (ZR) frames.
[0113] The embodiments of this application can be applied to BIT OTN scenarios. The data received by the OTN device from the customer equipment can be a 257-bit code block stream. A 257-bit code block stream is a code block stream composed of multiple 257-bit code blocks. A 257-bit code block can also be called a 257B code block, a 257B encoded block, or a 257-bit code block.
[0114] A 257B code block consists of four 66B code blocks. In other words, a 257B code block is obtained by encoding (or converting or transcoding) four 66B code blocks. The encoding and conversion methods follow the methods defined in IEEE 802.3 or other custom encoding and conversion methods. The 66B code block type can include 66B data code blocks and 66B control code blocks. A 66B data code block can be simply referred to as a data (D) code block, and a 66B control code block can be simply referred to as a control (C) code block. The first two bits of the 66B code block represent the synchronization (SYNC) field, mainly used for data alignment at the receiving end and synchronization of the received data bit stream. The synchronization header has two types: "01" and "10". "01" indicates that the 66B code block is a 66B data code block, and the following 64 bits carry the service data. The "10" indicates that the 66b code block is a 66b control code block. The 64 bits following the synchronization header include mixed data consisting of data and control information. Within the 66b control code block, the first 8 bits immediately following the synchronization header are the type field, and the following 56 bits include 64 bits of control information corresponding to the service data, or a mixture of control information and data. The 66b code block stream is encoded from Media Access Control (MAC) frames. Control code blocks are used to transmit MAC frame start or end identifiers, or padding indications, and other control information. A 66b control code block can be a start (S) block, an end (T) block, or an idle (I) block, etc.
[0115] The 257B code block mentioned in this embodiment includes four 66B code blocks, which are code blocks resulting from encoding 66B code blocks. The number of bits in the encoded 66B code block is reduced to less than 66B. For example, for a 66B data code block, after encoding to a 257B code block, 2 bits of the synchronization header are removed. As another example, the first control code block encoded in the 257B code block, in addition to removing 2 bits of the synchronization header, also removes 4 bits from the control block type field. The second, third, or fourth control code block encoded in the 257B code block will remove 2 bits of the synchronization header; see [link to relevant documentation] for details. Figure 8 As shown.
[0116] Figure 4 This is a schematic diagram of the 66B code block. See also... Figure 4As shown, the data code block includes a SYNC field and a d field. The d field is used to carry data. The control code block also includes a Control Block Type (CBT) field (or field) and a c field. The CBT is 8 bits in size. The CBT value can be 0x1E, 0x78, 0x4B, 0x87, 0x99, 0xAA, 0xB4, 0xCC, 0xD2, 0xE1, or 0xFF, etc. The c field is 56 bits in size. The c field is used to carry control encoding, including control information corresponding to the service data, or a mixture of control information and data. The S code block is used to carry the content of the preamble field in the MAC frame. Multiple data code blocks are used to carry the content of the remaining fields in the MAC frame. The T code block is used to indicate the end of a MAC frame and can be used to carry bytes 0 to 7 of the MAC frame.
[0117] Refer to Table 1, which describes the bit format of the 66B data block and the 66B control block. In Table 1, T0 occupies 7 bits, T1 occupies 6 bits, T2 occupies 5 bits, T3 occupies 4 bits, T4 occupies 3 bits, T5 occupies 2 bits, T6 occupies 1 bit, and T7 occupies no bits.
[0118] Table 1
[0119]
[0120] Figure 5 This is a schematic diagram illustrating the MAC frame encoding as a 66B code block stream provided in this application. See also... Figure 5 As shown, a MAC frame is encoded as a 66B code block stream. For ease of description, this 66B code block stream encoding a MAC frame is referred to as the first 66B code block stream. The first 66B code block stream includes one S code block, multiple D code blocks, and one T code block. That is, the first 66B code block stream begins with an S code block and ends with a T code block.
[0121] OTN technology with speeds exceeding 1T bits per second (B1T) targets 100G Ethernet (Gbit / s Ethernet, GE) and higher services, such as 100GE, 200GE, 400GE, 800GE, and 1.6TE. In B1T OTN service transport technology, a 257-bit code block encoding scheme is used. How to verify the encoded data stream of these 257-bit code blocks is worth investigating. If a cyclic redundancy check (CRC) checksum, such as CRC32, is generated for the 474 consecutive 257-bit code blocks mapped to the OTN frame payload layer, then 121818 (474*257) bits of data need to be buffered at the receiving end, increasing implementation cost and latency. In the B1T OTN standard, the channel layer payload area contains 2555 257-bit code blocks, resulting in an even larger buffered data volume, further increasing cost and latency. If the frame check sequence (FCS) mechanism is incorporated into the 66B code block encoding scheme adopted for Sub1G services, although the additional buffering cost can be avoided, the 257B code block needs to be restored to the 66B code block to complete the error check of the MAC frame before the 257B code block is re-encoded, which increases the processing complexity.
[0122] This application provides a data processing scheme that eliminates the need to restore the 257B code block to the 66B code block, and instead performs error checking directly based on the 257B encoding, thereby reducing processing complexity.
[0123] Figure 6 This is a data transmission diagram provided in an embodiment of this application. After receiving the 257B code block stream of B100GE service data, the transmitting device adds a check field to the 257B code block stream, or performs error checking processing on the 257B code block. Figure 6 Taking CRC32 as an example, the 257B code block stream with the added check field is then mapped to an OTN frame. After receiving the OTN frame, the receiving device performs error checking, or CRC32 check, to obtain the 257B code block stream. B100GE service data is then obtained from the 257B code block stream.
[0124] The applicant discovered through research that a MAC frame (or data packet) is encoded as a 66B code block stream, for example, the first 66B code block stream. The packet header in the first 66B code block stream is an S code block, and the packet tail is a T code block. The preceding 66B code block in the first 66B code block stream is either an I code block or a T code block. The 66B code block following the end of the first 66B code block stream, i.e., the end of a MAC frame encoding, is either an I code block or an S code block. 66B encoding includes two main categories: data code blocks (i.e., D code blocks) and control code blocks (i.e., C code blocks). It can be understood that I code blocks, S code blocks, or T code blocks other than data code blocks all belong to control code blocks. Based on this, a MAC frame can also be represented using the format CCDDD…DDCC, that is, a sequence of CDDD…DDC code blocks contained within the first and last C code blocks, for example... Figure 7 The MAC frame shown.
[0125] Figure 8 This is a schematic diagram of the 257B code block structure provided in an embodiment of this application.
[0126] In one possible example, a 257B code block can comprise four 66B data code blocks. Or, it can be said to be encoded from four 66B data code blocks. See also Figure 8 As shown in (a), when four 66B code blocks are encoded into 257B code blocks, the 2-bit synchronization field of the four 66B code blocks is deleted, and a 1-bit code block type indicator is added to form a 257B code block. Figure 8 The numbers in square brackets represent the number of bits; 01 indicates a 2-bit synchronization header for a 66B data block. Figure 8 In this context, DB (data block), abbreviated as d, represents the valid data of a 66B data block.
[0127] In another possible example, a 257B code block may include one 66B control code block and three 66B data code blocks, see [link to relevant documentation]. Figure 8 As shown in (b). To ensure the receiving end can identify whether the four 66B code blocks are 66B control code blocks or 66B data code blocks, a 66B code block type indicator needs to be added to form a 257B code block. This 66B code block type indicator occupies 4 bits. That is, bits 1 to 4 in the 257B code block identify the type of the four 66B code blocks, or in other words, bits 1 to 4 in the 257B code block identify whether the four 66B code blocks are 66B control code blocks or 66B data code blocks. Each of the four 66B code blocks occupies 1 bit. Figure 8 In this example, 1 represents a 66B data block and 0 represents a 66B control block. When four 66B blocks are encoded into a 257B block, the 2-bit synchronization field of those four 66B blocks is removed. See also... Figure 8As shown in (b), when four 66B code blocks are encoded into one 257B code block, the last four bits of the 8-bit control block type field of the first 66B control code block are deleted. The type fields of the remaining 66B control code blocks are not deleted or changed, and the transmission is carried out in a completely transparent manner.
[0128] In another possible example, a 257B code block may include one 66B control code block and three 66B data code blocks, see [link to relevant documentation]. Figure 8 As shown in (c). Figure 8 (c) and Figure 8 The difference in (b) is the location of the 66B control code block.
[0129] In another possible example, a 257B code block may include four 66B control code blocks. See also Figure 8 As shown in (d), when four 66B code blocks are encoded into one 257B code block, the last four bits of the 8-bit control block type field of the first 66b control code block are deleted. The type fields of the remaining 66b control code blocks are not deleted or changed, and the transmission is carried out transparently.
[0130] When a 66-bit code block is encoded as a 257-bit code block, the packet header or trailer (a specific combination of 66-bit blocks) can be located anywhere in the 257-bit code block stream. Examples include SDDD, ISDD, TISD, or DTIS. D represents a data code block, S represents the start code block, T represents the end code block, and I represents a free code block. S, T, and I are all control code blocks; therefore, in a 257-bit code block stream, the packet header and trailer can be defined by a specific combination order of 66-bit code blocks (or a code block pattern).
[0131] This application embodiment determines the type and position of 66B code blocks by parsing the types of 66B code blocks in a 257B stream. Based on this, after acquiring the 257B code block stream, this application embodiment determines the packet header and trailer by identifying the type of the 66B code blocks encoded (or mapped) in each 257B code block of the 257B code block stream, and then generates and inserts a check field. Alternatively, by identifying the type of the 66B code blocks encoded (or mapped) in each 257B code block of the 257B code block stream, the start and end positions of the check field generation are determined. The generated check field is then added to the 257B code block stream.
[0132] Figure 9 This is a schematic flowchart of a data processing method provided in an embodiment of this application. The data processing method can be applied to optical modules, electrical chips, or transmitting devices. For example, the transmitting device can be an OTN device, an MTN device, or a ZR device, etc. The following description uses the application of the data processing method to a transmitting device as an example. Figure 9As shown, the data processing method includes the following steps.
[0133] S101, the transmitting device acquires the 257B code block stream.
[0134] For example, the transmitting device can receive a 257B code block stream from the client device. Each 257B code block in the 257B code block stream is encoded from four 66B code blocks. The types of 66B code blocks include control code blocks and data code blocks.
[0135] For example, the transmitting device can parse the first 5 bits of the 257B code block. The 0th bit (or bit 0) of the 257B code block indicates whether the 257B code block includes a 66B control code block. Bit 0 = 1 indicates that the 257B code block is a 257B data code block, that is, the 257B code block is encoded from four 66B data code blocks. Bit 0 = 0 indicates that the 257B code block is a 257B control code block, that is, at least one of the four 66B code blocks encoding the 257B code block is a 66B control code block. Further parsing bits 1-4 can determine the types of the four 66B code blocks encoded in the 257B code block.
[0136] S102, the transmitting device determines the start and end positions of the MAC frame encoding in the 257B code block stream based on the type of the 66B code blocks included in the 257B code block stream. Alternatively, it can be described as: the transmitting device can determine the packet header and trailer of the data packets in the 257B code block stream based on the type of the 66B code blocks included in the 257B code block stream.
[0137] For example, embodiments of this application can calculate a checksum for each MAC frame's encoded data. The start and end positions for calculating the checksum can then be determined based on the type of the 66B code blocks included in the 257B code block stream. The checksum can be referred to as a check field. It should be noted that the range of the MAC encoding includes both the start and end positions, or the calculation range of the checksum for a MAC encoding information includes both the start and end positions.
[0138] according to Figure 7 As shown, a MAC frame can also be represented using the DDD...DDC method, which is a sequence of CDDD...DDC code blocks contained within two C code blocks at the beginning and end. Identifying the type of the 66B code blocks in a 257B code block stream allows us to determine the start and end positions of each MAC frame encoding within the 257B code block stream, i.e., to calculate the start and end positions of the checksum. It should be understood that for a 257B code block stream, the start position of the MAC frame encoding is identified first. After identifying the start position, the end position of the MAC frame encoding is then identified. This process continues until the start and end positions of the next MAC frame encoding are identified, and so on.
[0139] In one possible implementation, for example, the 66B code block combination sequence (or code block pattern) corresponding to the packet header is CCD. Based on this, if three consecutive 66B code blocks in the 257B code block stream are identified as control code block (C code block), control code block (C code block), and data code block (D code block) in sequence, then the packet header of the data packet is identified. Alternatively, it can be described as follows: if three consecutive 66B code blocks in the 257B code block stream are identified as control code block (C code block), control code block (C code block), and data code block (D code block) in sequence, then the starting position is determined to be within the 257B code block containing the data code block. It can also be described as follows: if the code block pattern of three consecutive 66B code blocks in the 257B code block stream is identified as CCD, then the starting position is determined to be within the 257B code block containing the D code block. For ease of description, the first control code block in the three consecutive 66B code blocks is called the first control code block, the second control code block is called the second control code block, and the data code block is called the first data code block. For ease of description, the 257B code block containing the first data code block is referred to as the third 257B code block. For example, the starting position is the starting bit of the encoding of the first data code block in the third 257B code block.
[0140] Example 1: The first two 66B blocks of the third 257B code block are, in sequence, the second control code block and the first data code block, and the last 66B block of the preceding 257B code block is the first control code block. For ease of description, let's take the preceding 257B code block as the fourth 257B code block. Then the code block pattern of the fourth 257B code block and the eight consecutive 66B code blocks in the third 257B code block is XXXC CDXX. C represents the control code block, D represents the data code block, and X represents any code block, such as a data code block.
[0141] In one possible implementation, in the case of Example 1, the starting position of the MAC frame encoding (or the calculation of the checksum) could be the starting bit of the first data block in the third 257B code block, i.e., the 66th bit of the third 257B code block, or bit 65 of the third 257B code block. This is assuming the 257B code block is encoded starting from bit 0.
[0142] Example 2: The first three 66B code blocks in the third 257B code block are the first control code block, the second control code block, and the first data code block, respectively.
[0143] In this Example 2, the block pattern of the third 257B block is CCDX.
[0144] In one possible implementation, in the case of Example 2, the starting position of the MAC frame encoding can be the starting bit of the first data block in the third 257B code block, that is, the 130th bit of the third 257B code block, or bit 129 of the third 257B code block.
[0145] Example 3: The last three 66B code blocks in the third 257B code block are the first control code block, the second control code block, and the first data code block, respectively.
[0146] In this example 3, the block pattern of the third 257B block is XCCD.
[0147] In one possible implementation, in the case of Example 3, the starting position of the MAC frame encoding can be the starting bit of the first data block in the third 257B code block, that is, the 194th bit of the third 257B code block, or bit 193 of the third 257B code block.
[0148] Example 4: In the 257B block preceding the third 257B block, the last two 66B blocks are the first control block and the second control block, respectively, and the first 66B block of the third 257B block is the first data block.
[0149] For ease of description, let's take the example of referring to the 257B block preceding the third 257B block as the fourth 257B block. In this example 4, the block pattern of the fourth 257B block and the eight consecutive 66B blocks in the third 257B block is XXCC DXXX.
[0150] In one possible implementation, as in Example 4, the starting position of the MAC frame encoding could be the start bit of the first data block in the third 257B code block. In another possible implementation, bit 0 of the 257B code block can be checked, so the starting position of the MAC frame encoding could be the first bit of the third 257B code block, or bit 0 of the third 257B code block. In yet another possible implementation, bit 0 of the 257B code block can be left unchecked, so the starting position of the MAC frame encoding could be the second bit of the third 257B code block, or bit 1 of the third 257B code block.
[0151] In some implementation scenarios, the code block patterns of each 257B code block in the 257B code block stream are identified. If the code block pattern of the current 257B code block satisfies the conditions of Example 1 or Example 4 above, and it is determined that the previous 257B code block also satisfies the conditions of Example 1 or Example 4, then the current 257B code block can be determined as the 257B code block with the starting position. Furthermore, the bit position of the starting position in the 257B code block can be determined, i.e., the checksum calculation starts from the current 257B code block. If the code block pattern of the current 257B code block satisfies the conditions of Example 2 or Example 3 above, then the current 257B code block can be determined as the 257B code block with the starting position. Furthermore, the bit position of the starting position in the 257B code block can be determined. For example, see... Figure 10A or Figure 10B As shown. In Figure 10B In the case shown, bit 0 of the 257B code block can be excluded from the checksum, or in other words, bit 0 of the 257B code block is excluded when generating the checksum. Figure 10A In the case shown, bit 0 of the 257B code block is used for verification, or in other words, bit 0 of the 257B code block is not excluded when generating the checksum.
[0152] In one possible implementation, for example, the 66B code block combination sequence (or code block pattern) corresponding to the packet tail is DCC. Based on this,
[0153] If three consecutive 66B blocks in a 257B code block stream are identified as data, control, and data blocks in sequence, then the end of the data packet is detected. Alternatively, if three consecutive 66B blocks in a 257B code block stream are identified as control (C block), control (C block), and data (D block), then the end position is determined to be located in the 257B code block containing the first control block. It can also be described as follows: if the code block pattern of three consecutive 66B blocks in a 257B code block stream is DCC, then the end position is determined to be located in the 257B code block containing the first C block. For ease of distinction, the first control block in the three consecutive 66B blocks is called the third control block, the second control block is called the fourth control block, and the data block is called the second data block. For ease of description, the 257B code block containing the third control block is called the first 257B code block. For example, the end position is the last bit encoded by the third control code block in the first 257B code block.
[0154] It should be noted that determining the end position of a MAC address is done after determining the start position of that MAC address.
[0155] Example 1-1:
[0156] The first two 66B blocks of the first 257B code block are the third and fourth control code blocks, respectively, and the last 66B block of the 257B code block preceding the first 257B code block is the second data code block. For ease of description, the 257B code block preceding the first 257B code block is referred to as the fifth 257B code block. The code block pattern of the fifth 257B code block and the eight consecutive 66B code blocks in the first 257B code block is XXXD CCXX.
[0157] In one possible implementation, in the case of Example 1-1, the end position of the MAC frame encoding (or the calculation of the checksum) could be the end bit of the first control block in the first 257B code block, i.e., the 65th bit of the first 257B code block, or bit 64 of the first 257B code block. This is assuming the 257B code block is encoded starting from bit 0.
[0158] Example 1-2:
[0159] The first three 66B blocks of the first 257B code block are, in sequence, the second data code block, the third control code block, and the fourth control code block. Alternatively, the code block pattern of four consecutive 66B blocks in the first 257B code block is DCCX.
[0160] In one possible implementation, in the case of Example 1-2, the end position of the MAC frame encoding (or the calculation of the checksum) can be the end bit of the first control block in the first 257B code block, that is, the 129th bit of the first 257B code block, or bit 128 of the first 257B code block.
[0161] Example 1-3:
[0162] The last three 66B blocks of the first 257B code block are, in sequence, the second data code block, the third control code block, and the fourth control code block. Alternatively, the code block pattern of the four consecutive 66B blocks in the first 257B code block is XDCC.
[0163] In one possible implementation, in the case of Examples 1-3, the end position of the MAC frame encoding (or the calculation of the checksum) can be the end bit of the first control block in the first 257B code block, that is, the 193rd bit of the first 257B code block, or bit 192 of the first 257B code block.
[0164] Examples 1-4:
[0165] The last two 66B blocks of the first 257B code block are, in sequence, the second data code block and the third control code block, and the first 66B code block of the second 257B code block is the fourth control code block. The second 257B code block is the 257B code block following the first 257B code block. Alternatively, the code block pattern of eight consecutive 66B code blocks in the first and second 257B code blocks is XXDC CXXX.
[0166] In one possible implementation, in the case of Examples 1-4, the end position of the MAC frame encoding (or the calculation of the checksum) can be the end bit of the last control block in the first 257B code block, that is, the last bit (the 257th bit) of the first 257B code block, or bit 256 of the first 257B code block.
[0167] In some implementation scenarios, the block patterns of each 257B block in the 257B block stream are identified. If the block pattern of the current 257B block satisfies the condition in Example 1-1 above, and it is determined that the previous 257B block also satisfies the condition in Example 1, then the current 257B block can be determined as the 257B block containing the end position. Furthermore, the bit position of the end position in the 257B block can be determined, that is, the calculation of the checksum of the MAC frame's encoded bits ends after bit 64 of the current 257B block. If the block pattern of the current 257B block satisfies the condition in Example 1-2 above, then the current 257B block can be determined as the 257B block containing the end position. Furthermore, the bit position of the end position in the current 257B block can be determined, that is, the calculation of the checksum of the MAC frame's encoded bits ends after bit 128 of the current 257B block. If the pattern of the current 257B code block satisfies the conditions in Examples 1-3 above, then it can be determined that the current 257B code block is the 257B code block where the end position is located. Furthermore, it can be determined that the end position is at the bit position of the current 257B code block, that is, the calculation of the checksum of the MAC frame's encoded bits ends after bit 192 of the current 257B code block. Similarly, it can be determined that the end position is at the bit position of the current 257B code block, that is, the calculation of the checksum of the MAC frame's encoded bits ends after bit 128 of the current 257B code block. If the patterns of the current 257B code block and the next 257B code block satisfy the conditions in Examples 1-4 above, then it can be determined that the current 257B code block is the 257B code block where the end position is located. Furthermore, it can be determined that the end position is at the bit position of the current 257B code block, that is, the calculation of the checksum of the MAC frame's encoded bits ends after the current 257B code block ends. For example, see... Figure 11 As shown. In Figure 11In the case shown, bit 0 of the 257B code block may or may not participate in the check.
[0168] S103, the transmitting device adds a check field to either the first or second 257B code block based on the end position. The check field is used to verify the bit stream from the start position to the end position. The bit stream from the start position to the end position includes both the start and end positions. The first 257B code block is the 257B code block containing the end position, or the second 257B code block is the 257B code block following the first 257B code block containing the end position. S103 can also be described as the transmitting device adding a check field to the end of the packet.
[0169] In one possible implementation, if three consecutive 66B blocks in a 257B code block stream are identified as a data block, a control block, and a control block in sequence, then the check field is determined to be added to the 257B code block containing the second control block. For example, the check field can be added to the second control block, see [reference needed]. Figure 12 As shown. It can also be described as follows: if the pattern of three consecutive 66B code blocks in a 257B code block stream is identified as DCC, then the check field is added to the second C code block. For ease of distinction, the first control code block in the three consecutive 66B code blocks is called the third control code block, the second control code block is called the fourth control code block, and the data code block is called the second data code block. The check field is added to the fourth control code block.
[0170] In one possible implementation, the check field can occupy the last 32 bits of the fourth control code block.
[0171] Example 2-1:
[0172] If the first 257B code block containing the end position satisfies the conditions of Example 1-1, that is, the first two 66B code blocks of the first 257B code block are the third and fourth control code blocks respectively, and the last 66B code block of the 257B code block preceding the first 257B code block is the second data code block, then the starting bit of the check field is the 98th bit of the first 257B code block, or bit 97.
[0173] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 13As shown, if the code block patterns of the current 257B code block and the previous 257B code block satisfy the conditions in Example 1-1 above, then it can be determined that the current 257B code block is the 257B code block where the end position is located. Furthermore, it can be determined that the end position is at bit position 64 of the current 257B code block, and the calculated check field can be added to bit 97 of the first 257B code block. See also, as an example... Figure 14A As shown.
[0174] Example 2-2:
[0175] If the first 257B code block containing the end position satisfies the conditions of Example 1-2, that is, the first three 66B code blocks of the first 257B code block are the second data code block, the third control code block, and the fourth control code block in sequence, then the starting bit of the check field is the 162nd bit of the current 257B code block, or bit 161.
[0176] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 13 As shown, if the current 257B code block satisfies the conditions in Example 1-2 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Therefore, it can be determined that the end position is at bit position 128 of the current 257B code block, and the calculated check field can be added to bit 161 of the current 257B code block. See also... Figure 14B As shown.
[0177] Example 2-3:
[0178] If the first 257B code block where the end position is located satisfies the conditions of Example 1-3, that is, the last three 66B code blocks of the first 257B code block are the second data code block, the third control code block and the fourth control code block in sequence, the starting bit of the check field is the 226th bit of the first 257B code block, or bit 225.
[0179] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 13 As shown, if the current 257B code block satisfies the conditions in Examples 1-3 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Furthermore, it can be determined that the end position is at bit position 192 of the current 257B code block, and the calculated check field can be added to bit 225 of the current 257B code block. See also, as an example... Figure 14C As shown.
[0180] Example 2-4:
[0181] If the first 257B code block where the end position is located satisfies the conditions of Example 1-4, that is, the last two 66B code blocks of the first 257B code block are the second data code block and the third control code block in sequence, and the first 66B code block of the second 257B code block is the fourth control code block, and the starting bit of the check field is the 34th bit of the second 257B code block, or bit 33.
[0182] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 13 As shown, if the current 257B code block satisfies the conditions in Examples 1-4 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Therefore, the end position can be determined to be bit position 256 of the current 257B code block, and the calculated check field can be added to bit 33 of the next code block of the current 257B code block. See also, as an example... Figure 14D As shown.
[0183] In Examples 2-1 to 2-4 above, in one possible implementation scenario, when calculating the check field, bits 0 in the 257B code blocks may not participate in the check field calculation. That is, the check field can be generated based on the bits in the bit stream from the start position to the end position, excluding bits 0 in each of the 257B code blocks. For example, if the bit stream from the start position to the end position includes N 257-bit code blocks, then when calculating the check field, the check field is generated from the bit sequence consisting of the bits in this bit stream excluding bits 0 in each of the N 257-bit code blocks. In another possible implementation scenario, bits 0 in the 257B code blocks can also participate in the check field calculation; that is, the check field can be generated based on the bit stream from the start position to the end position.
[0184] In another possible implementation, the check field can occupy the 32 bits following and immediately adjacent to the control block type field in the fourth control block. Specifically, it could be bits 10 to 41 of the fourth control block.
[0185] Example 3-1:
[0186] If the first 257B code block containing the end position satisfies the conditions of Example 1-1, that is, the first two 66B code blocks of the first 257B code block are the third and fourth control code blocks respectively, and the last 66B code block of the 257B code block preceding the first 257B code block is the second data code block, then the starting bit of the check field is the 74th bit of the first 257B code block, or bit 73.
[0187] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 15 As shown, if the code block patterns of the current 257B code block and the previous 257B code block satisfy the conditions in Example 1-1 above, then it can be determined that the current 257B code block is the 257B code block where the end position is located. Furthermore, it can be determined that the end position is at bit position 64 of the current 257B code block, and the calculated check field can be added to bit 73 of the first 257B code block. See also, as an example... Figure 16A As shown.
[0188] Example 3-2:
[0189] If the first 257B code block containing the end position satisfies the conditions of Example 1-2, that is, the first three 66B code blocks of the first 257B code block are the second data code block, the third control code block, and the fourth control code block in sequence, then the starting bit of the check field is the 138th bit of the current 257B code block, or bit 137.
[0190] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 15 As shown, if the current 257B code block satisfies the conditions in Example 1-2 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Therefore, it can be determined that the end position is at bit position 128 of the current 257B code block, and the calculated check field can be added to bit 137 of the current 257B code block. See also... Figure 16B As shown.
[0191] Example 3-3:
[0192] If the first 257B code block where the end position is located satisfies the conditions of Example 1-3, that is, the last three 66B code blocks of the first 257B code block are the second data code block, the third control code block and the fourth control code block in sequence, and the starting bit of the check field is the 202nd bit of the first 257B code block, or bit 201.
[0193] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 15 As shown, if the current 257B code block satisfies the conditions in Examples 1-3 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Therefore, it can be determined that the end position is at bit position 192 of the current 257B code block, and the calculated check field can be added to bit 201 of the current 257B code block. See also [example description missing] for further details. Figure 16C As shown.
[0194] Example 3-4:
[0195] If the first 257B code block where the end position is located satisfies the conditions of Example 1-4, that is, the last two 66B code blocks of the first 257B code block are the second data code block and the third control code block in sequence, and the first 66B code block of the second 257B code block is the fourth control code block, and the starting bit of the check field is the 10th bit of the second 257B code block, or bit 9.
[0196] In some implementation scenarios, the code block patterns of individual 257B code blocks in a 257B code block stream are identified. See also... Figure 15 As shown, if the current 257B code block satisfies the conditions in Examples 1-4 above, it can be determined that the current 257B code block is the 257B code block where the end position is located. Therefore, the end position can be determined to be bit position 256 of the current 257B code block, and the calculated check field can be added to bit 9 of the next code block of the current 257B code block. See also, as an example... Figure 16D As shown.
[0197] In one possible implementation scenario of Examples 3-1 to 3-4 above, when calculating the check field, bits 0 in the 257B code blocks may not participate in the calculation. That is, the check field can be generated based on the bits in the bit stream from the start position to the end position, excluding bits 0 in each 257B code block. For example, if the bit stream from the start position to the end position includes N 257-bit code blocks, then when calculating the check field, the check field is generated from the bit sequence consisting of the bits in this bit stream excluding bits 0 in each of the N 257-bit code blocks. Figure 16D As shown, when calculating the check field, bits 0 of the 257-bit code block between the start and end positions can be excluded. In another possible implementation scenario, bits 0 in the 257B code block can also participate in the calculation of the check field, that is, the check field can be generated based on the bit stream from the start to the end position.
[0198] Figure 16E This is a schematic diagram of the verification generation range and insertion position provided in the embodiments of this application. Figure 16E The text uses a specific example to illustrate the packet header or trailer, the error flag check range, and the insertion position of the checksum (or check code, check field). Figure 16E For example, the checksum is inserted into bits 10 to 41 of the second control block at the end of the packet.
[0199] In some implementation scenarios, the method may further include the following steps S104-S105.
[0200] S104, the sending device maps the 257-bit code block stream with the added check field to the data frame.
[0201] In one possible example, a 257-bit code block stream with a check field added can be directly mapped into a data frame.
[0202] In another possible example, the 257B bit code block stream with the added check field can be encoded into a 513B code block stream, and then the 513B code block stream can be mapped into a data frame.
[0203] S105, the sending device sends a data frame.
[0204] Figure 17 This is a schematic flowchart of a data processing method provided in an embodiment of this application. The data processing method can be applied to optical modules, electrical chips, or receiving devices. For example, the receiving device can be an OTN device, an MTN device, or a ZR device, etc. The following description uses the application of the data processing method to a receiving device as an example. Figure 9 As shown, the data processing method includes the following steps.
[0205] S201, Receive data frame.
[0206] S202, demap from the data frame to obtain a 257-bit code block stream; each 257-bit code block in the 257-bit code block stream is encoded by four 66-bit code blocks, and the types of 66-bit code blocks include control code blocks and data code blocks.
[0207] S203, determine the start and end positions of the Media Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream. For specific implementation details, please refer to the aforementioned embodiments; they will not be repeated here.
[0208] S204, Generate a first check field. The first check field is used to verify the bit stream from the start position to the end position. The specific generation method can be found in the previous embodiment, and will not be repeated here.
[0209] S205, parse the second check field from the 257-bit code block stream according to the end position. For specific implementation details, please refer to the aforementioned embodiments, which will not be repeated here.
[0210] S206, The bit stream from the start position to the end position is checked according to the first check field and the second check field.
[0211] In one possible implementation, when a check fails, the last 66B data block in the bitstream before the said end position is replaced with a 66B error (E) block.
[0212] For example, see Figure 18 and Figure 19 As shown. Figure 19 This is just one example.
[0213] In another possible implementation, upon verification failure, the last 257B data block in the bitstream prior to the stated end position is replaced with a 257B error (E) block. The 257B error block is encoded from four 66B error blocks.
[0214] Figure 20 This is a schematic block diagram of an optical communication device 1000 provided for an embodiment of this application. Figure 20 As shown, the optical communication device 1000 can be set in Figure 1 In the OTN device 101 shown, or the device 1000 may also be provided in Figure 2 The OTN device shown, or the device 1000 installed in an MTN device or a ZR device, includes a transceiver module 1001, which can be used to implement corresponding transceiver functions. The transceiver module 1001 can also be referred to as a transceiver unit.
[0215] The device 1000 also includes a processing module 1002 (or processing unit), which can be used to implement corresponding processing functions.
[0216] Optionally, the device 1000 further includes a storage unit, which can be used to store instructions and / or data. The processing module 1002 can read the instructions and / or data in the storage unit so that the device can perform the operation of the relevant devices in the foregoing method embodiments.
[0217] The device 1000 can be used to perform the actions performed by the transmitting or receiving devices in the above method embodiments. In this case, the device 1000 can be a component of the transmitting or receiving devices. The transceiver module 1001 is used to perform the transceiver-related operations of the transmitting or receiving devices in the above method embodiments, and the processing module 1002 is used to perform the processing-related operations of the transmitting or receiving devices in the above method embodiments.
[0218] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0219] Figure 21 This is a schematic diagram of the structure of an optical communication device provided in an embodiment of this application. Figure 21 As shown, the optical communication device 2000 includes a processor 2001 and an optical transceiver 2002. This device can be used in both transmitting and receiving devices. Figure 21 The apparatus shown may include Figure 1Any of the OTN devices shown, or Figure 21 The apparatus shown may also include Figure 2 The OTN device shown, or the device 1000 includes an MTN device or a ZR device.
[0220] When applied to a transmitting device, the processor 2001 is used to implement... Figure 9 In the method shown, S101-S104, the optical transceiver 2002 is used to implement... Figure 9 S105 in the method shown. When applied to a receiving device, the processor 2001 is used to implement... Figure 17 In the method shown, S202-S206, the optical transceiver 2002 is used to implement... Figure 17 S201 in the method shown. In the implementation process, each step of the processing flow can be completed by the transmitting or receiving device through the integrated logic circuits in the hardware of the processor 2001 or by instructions in the form of software.
[0221] In this application embodiment, the processor 2001 can be a general-purpose processor, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this application embodiment. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software units within the processor.
[0222] Furthermore, the device 2000 may include one or more processors 2001.
[0223] Optionally, the device 2000 may further include a memory 2003, wherein the program code executed by the processor 2001 to implement the above methods can be stored in the memory 2003. The device 2000 may include one or more memories 2003.
[0224] Specifically, the memory 2003 can be coupled to the processor 2001. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. Alternatively, the processor 2001 can operate in conjunction with the memory 2003. The memory 2003 can be non-volatile memory, such as a hard disk drive (HDD), or it can be volatile memory, such as random-access memory (RAM). The memory 2003 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited to these. It should be noted that... Figure 21 The device described above can also be used to perform the method steps involved in the variations of the embodiments shown in the foregoing figures, which will not be repeated here.
[0225] Figure 22 This is a schematic diagram of a chip system provided in an embodiment of this application. For example... Figure 22 As shown, the chip system 3000 (or processing system) includes logic circuitry 3010 and input / output interface 3020.
[0226] The logic circuit 3010 can be a processing circuit in the chip system 3000. The logic circuit 3010 can be coupled to a memory unit, calling instructions from the memory unit, enabling the chip system 3000 to implement the methods and functions of the embodiments of this application. The input / output interface 3020 can be an input / output circuit in the chip system 3000, outputting processed information from the chip system 3000, or inputting data or signaling information to be processed into the chip system 3000 for processing.
[0227] Optionally, the logic circuit 3010 may be implemented by one or more processors, including the one or more processors or the processing portion of the one or more processors.
[0228] Optionally, the input / output interface 3020 may include transceiver circuitry, a transceiver, input / output circuitry, or a communication interface.
[0229] As one approach, the chip system 3000 is used to implement the operations performed by the transmitting or receiving device in the various method embodiments described above.
[0230] Specifically, the logic circuit 3010 is used to implement the processing-related operations performed by the transmitting device or the receiving device in the above method embodiments; the input / output interface 3020 is used to implement the sending and / or receiving-related operations performed by the transmitting device or the receiving device in the above method embodiments.
[0231] Based on the above embodiments, this application also provides an optical module, which includes a signal processor and an optical emitting component. Exemplarily, the signal processor is used to implement... Figure 9 The method shown includes steps S101-S104. For example, the signal processor determines the start and end positions of the Medium Access Control (MAC) frame encoding in the 257-bit code block stream based on the type of the 66-bit code blocks encoded from the 257-bit code block stream; it adds a check field to the first or second 257-bit code block based on the end position, and then maps the 257-bit code block stream with the check field added to the data frame. The optical transmission component is used to implement... Figure 9 S105 in the method shown refers to transmitting a data frame. Alternatively, the optical module includes a signal processor and an optical receiver component. The optical receiver component is used to implement... Figure 17 In step S201 of the method shown, a data frame is received. The signal processor is used to implement... Figure 17 S202-S206 of the method shown. For example, a 257-bit code block stream is obtained by demapping from a data frame; each 257-bit code block in the 257-bit code block stream is encoded from four 66-bit code blocks; the start and end positions of the Medium Access Control (MAC) frame encoding in the 257-bit code block stream are determined according to the type of the 66-bit code blocks encoded in the 257-bit code block stream; a first check field is generated; a second check field is parsed from the first or second 257-bit code block of the 257-bit code block stream according to the end position; and the bit stream from the start position to the end position is checked according to the first and second check fields.
[0232] Based on the above embodiments, this application also provides a computer-readable storage medium. This storage medium stores a software program, which, when read and executed by one or more processors, can implement the methods provided in any one or more of the above embodiments. The computer-readable storage medium may include various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory, random access memory, magnetic disk, or optical disk.
[0233] Based on the above embodiments, this application provides a computer program product containing instructions. When this computer program product is run on a computer or processor, it can implement the methods provided in any one or more of the above embodiments.
[0234] Based on the above embodiments, this application also provides a chip. The chip includes a processor for implementing the functions involved in any one or more of the above embodiments, such as acquiring or processing the OTN signal involved in the above methods. Optionally, the chip further includes a memory for storing necessary program instructions and data executed by the processor. The chip can be composed of a single chip or may include chips and other discrete devices.
[0235] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
[0236] It should be understood that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0237] It should also be understood that the memory mentioned in the embodiments of this application can be volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM can include a variety of forms, such as: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0238] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0239] Those skilled in the art will recognize that the units and steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application; such implementations should not be considered beyond the scope of protection of this application.
[0240] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of apparatus or units may be electrical, mechanical, or other forms.
[0241] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs). For example, the aforementioned available media can include, but are not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0242] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A data processing method, characterized in that, include: Obtain a 257-bit code block stream; each 257-bit code block in the 257-bit code block stream is encoded by four 66-bit code blocks, and the types of the 66-bit code blocks include control code blocks and data code blocks; The start and end positions of the Media Access Control (MAC) frame encoding in the 257-bit code block stream are determined based on the type of the 66-bit code block encoded in the 257-bit code block stream. A check field is added to the first 257-bit code block or the second 257-bit code block according to the end position; the check field is used to check the bit stream from the start position to the end position; the first 257-bit code block is the 257-bit code block where the end position is located, or the second 257-bit code block is the 257-bit code block after the first 257-bit code block where the end position is located.
2. The method as described in claim 1, characterized in that, Determining the starting position of the Media Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream includes: The three consecutive 66B-bit code blocks in the 257-bit code block stream are identified as the first control code block, the second control code block, and the first data code block, respectively. The starting position is determined to be located in the third 257-bit code block, which is the 257-bit code block where the first data code block is located.
3. The method as described in claim 1 or 2, characterized in that, Determining the end position of the Media Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream includes: The three consecutive bit blocks in the 257-bit code block stream are identified as the second data code block, the third control code block, and the fourth control code block, respectively. The first 257-bit code block where the end position is located is determined to be the 257-bit code block where the third control code block is located.
4. The method as described in claim 2, characterized in that: In the third 257-bit code block, the first two 66-bit code blocks are the second control code block and the first data code block, respectively, and the last 66-bit code block of the preceding 257-bit code block of the third 257-bit code block is the first control code block; or, The first three 66-bit code blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block; or... The last three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block; or... The last two 66-bit blocks in the preceding 257-bit block of the third 257-bit code block are the first control code block and the second control code block, respectively, and the first 66-bit block of the third 257-bit code block is the first data code block.
5. The method as described in claim 3, characterized in that: The first two 66-bit blocks in the third 257-bit code block are the second control code block and the first data code block, respectively, and the starting position is the 66th bit of the third 257-bit code block; or... The first three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, and the starting position is the 130th bit of the third 257-bit code block; or... The last three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, with the starting position being the 194th bit of the third 257-bit code block; or... The last two 66-bit code blocks in the third 257-bit code block are the first control code block and the second control code block, respectively. The starting position is the first bit of the third 257-bit code block or the starting position is the second bit of the third 257-bit code block.
6. The method as described in claim 3, characterized in that, The first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the last 66-bit block of the preceding 257-bit code block is the second data code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or... The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block.
7. The method as described in claim 6, characterized in that: The first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the end position is the 65th bit of the first 257-bit code block; or... The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the end position is the 129th bit of the first 257-bit code block; or... The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the end position is the 193rd bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The end position is the last bit of the first 257-bit code block.
8. The method as described in claim 6 or 7, characterized in that: The first two 66-bit code blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 98th bit of the first 257-bit code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 162nd bit of the first 257-bit code block; or, The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 226th bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 34th bit of the second 257-bit code block.
9. The method as described in claim 6 or 7, characterized in that: The first two 66-bit code blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 74th bit of the first 257-bit code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 138th bit of the first 257-bit code block; or, The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 202nd bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 10th bit of the second 257-bit code block.
10. The method as described in claim 9, characterized in that, The range from the starting position to the ending position includes N 257-bit code blocks, where N is a positive integer; the check field is generated based on a bit sequence; the bit sequence includes bits in the bit stream other than the first bit of each of the N 257-bit code blocks.
11. The method according to any one of claims 1-10, characterized in that, The control code block is a start S code block, an end T code block, or an idle I code block.
12. The method according to any one of claims 1-11, characterized in that, The method further includes: Map the 257-bit code block stream with the added check field to the data frame; Send the data frame.
13. The method as described in claim 12, characterized in that, Mapping the 257-bit code block stream with the added check field to a data frame includes: The 257-bit code block stream with the added check field is encoded into a 513-bit code block stream; Map the 513-bit code block stream to a data frame; Send the data frame.
14. A data processing method, characterized in that, include: Receive data frames; The data frame is demapped to obtain a 257-bit code block stream; Each 257-bit code block in the 257-bit code block stream is encoded by four 66-bit code blocks, and the types of the 66-bit code blocks include control code blocks and data code blocks; The start and end positions of the Media Access Control (MAC) frame encoding in the 257-bit code block stream are determined based on the type of the 66-bit code block encoded in the 257-bit code block stream. Generate a first verification field, which is used to verify the bit stream from the start position to the end position; The second check field is parsed from either the first or second 257-bit code block of the 257-bit code block stream based on the end position; the first 257-bit code block is the 257-bit code block where the end position is located, or the second 257-bit code block is the 257-bit code block following the first 257-bit code block where the end position is located. The bit stream from the start position to the end position is verified based on the first verification field and the second verification field.
15. The method as described in claim 14, characterized in that, The method further includes: When the verification fails, the last 257-bit data block in the bit stream is replaced with a 257-bit error block, which is encoded by four 66-bit error blocks.
16. The method as described in claim 14 or 15, characterized in that, Determining the starting position of the MAC frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream includes: The three consecutive 66B-bit code blocks in the 257-bit code block stream are identified as the first control code block, the second control code block, and the first data code block, respectively. The starting position is determined to be located in the third 257-bit code block, which is the 257-bit code block where the first data code block is located.
17. The method as described in claim 14 or 15, characterized in that, Determining the end position of the Media Access Control (MAC) frame encoded in the 257-bit code block stream based on the type of the 66-bit code block encoded in the 257-bit code block stream includes: The three consecutive bit blocks in the 257-bit code block stream are identified as the second data code block, the third control code block, and the fourth control code block, respectively. The first 257-bit code block where the end position is located is determined to be the 257-bit code block where the third control code block is located.
18. The method as described in claim 16, characterized in that: In the third 257-bit code block, the first two 66-bit code blocks are the second control code block and the first data code block, respectively, and the last 66-bit code block of the preceding 257-bit code block of the third 257-bit code block is the first control code block; or, The first three 66-bit code blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block; or... The last three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block; or... The last two 66-bit blocks in the preceding 257-bit block of the third 257-bit code block are the first control code block and the second control code block, respectively, and the first 66-bit block of the third 257-bit code block is the first data code block.
19. The method as described in claim 18, characterized in that: The first two 66-bit blocks in the third 257-bit code block are the second control code block and the first data code block, respectively, and the starting position is the 66th bit of the third 257-bit code block; or... The first three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, and the starting position is the 130th bit of the third 257-bit code block; or... The last three 66-bit blocks in the third 257-bit code block are, in sequence, the first control code block, the second control code block, and the first data code block, with the starting position being the 194th bit of the third 257-bit code block; or... The last two 66-bit code blocks in the third 257-bit code block are the first control code block and the second control code block, respectively. The starting position is the first bit of the third 257-bit code block or the starting position is the second bit of the third 257-bit code block.
20. The method as described in claim 17, characterized in that, The first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the last 66-bit block of the preceding 257-bit code block is the second data code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or... The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block.
21. The method as described in claim 20, characterized in that: The first two 66-bit blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the end position is the 65th bit of the first 257-bit code block; or... The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the end position is the 129th bit of the first 257-bit code block; or... The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the end position is the 193rd bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The end position is the last bit of the first 257-bit code block.
22. The method as described in claim 20 or 21, characterized in that: The first two 66-bit code blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 98th bit of the first 257-bit code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 162nd bit of the first 257-bit code block; or, The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 226th bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 34th bit of the second 257-bit code block.
23. The method as described in claim 20 or 21, characterized in that: The first two 66-bit code blocks of the first 257-bit code block are, in sequence, the third control code block and the fourth control code block, and the starting bit of the check field is the 74th bit of the first 257-bit code block; or, The first three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 138th bit of the first 257-bit code block; or, The last three 66-bit blocks of the first 257-bit code block are, in sequence, the second data code block, the third control code block, and the fourth control code block, and the starting bit of the check field is the 202nd bit of the first 257-bit code block; or, The last two 66-bit code blocks of the first 257-bit code block are the second data code block and the third control code block, respectively, and the first 66-bit code block of the second 257-bit code block is the fourth control code block. The starting bit of the check field is the 10th bit of the second 257-bit code block.
24. The method as described in claim 23, characterized in that, The sequence from the starting position to the ending position includes N 257-bit code blocks, where N is a positive integer; the first check field is generated based on a bit sequence; the bit sequence includes bits in the bit stream other than the first bit of each of the N 257-bit code blocks.
25. The method according to any one of claims 14-24, characterized in that, The control code block is a start S code block, an end T code block, or an idle I code block.
26. An optical communication device, characterized in that, include: A processor and a transceiver, the processor being configured to control the transmission and reception of signals and to perform the method as described in any one of claims 1-13, or to perform the method as described in any one of claims 14-25.
27. The optical communication device as claimed in claim 26, characterized in that, The optical communication device is an OTN device, a zero-error-range ZR device, a metropolitan area transmission network (MTN) device, an optical chip, or an optical module.
