Data processing method and related device
Patent Information
- Application Number
- MYPI2025005480
- Authority / Receiving Office
- MY · MY
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-10
- Filing Date
- 2024-02-29
- Publication Date
- 2024-09-10
AI Technical Summary
In the optical transport network, the 2-bit overhead error in the 66-bit coding block causes the receiving device to misjudge the code block type, which in turn leads to incorrect decoding of the MAC frame, reducing the reliability of communication.
By introducing the first check field into the 66-bit code block stream, the sending device maps it to the payload area of the data frame, allowing the receiving device to identify whether bit errors occur in the code block stream without decoding, thereby improving the verification efficiency. and data transmission reliability.
It improves the reliability and verification efficiency of data transmission, reduces the verification requirements of MAC frames by intermediate nodes, and reduces transmission delay and resource consumption.
Smart Images

Figure PI2025005480_DRAWING_001 
Figure PI2025005480_DRAWING_002 
Figure PI2025005480_DRAWING_003
Abstract
Description
Data processing method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 10, 2023, application number CN202310259787.2, and application name “Data Processing Methods and Related Equipment,” the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of optical communications, and in particular to a data processing method and related equipment. Background Art
[0003] The 66-bit code block in Ethernet services consists of a 64-bit payload and a 2-bit overhead. When Ethernet services are carried over an optical transport network (OTN), the transmitting device must encode the Ethernet MAC frame into multiple 66-bit code blocks and then map these 66-bit code blocks into OTN frames. The receiving device extracts the 66-bit code blocks from the OTN frame and decodes them into MAC frames. However, the 2-bit overhead in the 66-bit code block indicates the code block type of the 66-bit code block. The code block type of a 66-bit code block can be either a data code block or a control code block. If an error occurs in the 2-bit overhead in the 66-bit code block, the receiving device will misjudge the code block type. The receiving device will then receive an incorrect MAC frame based on the misjudged 66-bit code block.
[0004] Summary of the Invention
[0005] The present application provides a data processing method and related equipment. Through the first check field, a receiving device can identify whether a 66-bit code block stream has a bit error, thereby improving the reliability of communication.
[0006] In a first aspect, the present application provides a data processing method. The data processing method can be applied to an optical module, an electronic chip, or a transmitting device. The transmitting device can be an optical transport network (OTN) device or a metropolitan transport network (MTN) device, etc. The following description uses the data processing method applied to a transmitting device as an example. The data processing method includes the following steps: the transmitting device obtains a 66-bit code block stream of a MAC frame. The MAC frame includes a frame check sequence (FCS) field. The transmitting device obtains a first check field based on target data. The first check field is used to verify the target data. The target data is a MAC frame or a 66-bit code block stream. A code block in the 66-bit code block stream is used to carry the obtained first check field. Alternatively, the last 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field. The transmitting device maps the 66-bit code block stream into the payload area of a data frame. The data frame can be an OTN frame, a flexible Ethernet (FlexE) frame, or an MTN frame. The transmitting device transmits the data frame.
[0007] In an optional embodiment of the first aspect, the target data is a 66-bit code block stream. The transmitting device obtaining a 66-bit code block stream of a MAC frame includes: the transmitting device obtaining a MAC frame and encoding the MAC frame into a first 66-bit code block stream. Alternatively, the transmitting device receives the first 66-bit code block stream from another device. The data processing method further includes: the transmitting device obtaining a second 66-bit code block stream based on the first 66-bit code block stream and the first check field, or the transmitting device adding the first check field to the next 66-bit code block in the first 66-bit code block stream. The transmitting device mapping the 66-bit code block stream to the payload area of the data frame includes: the transmitting device mapping the second 66-bit code block stream to the payload area of the data frame, or the transmitting device mapping the first 66-bit code block stream and the next 66-bit code block to the payload area of the data frame. By checking the 66-bit code block stream, the receiving device can identify whether the 66-bit code block stream has errors without decoding the 66-bit code block stream. Therefore, embodiments of the present application can improve verification efficiency. In another optional embodiment of the first aspect, the target data is a MAC frame. The transmitting device obtaining a 66-bit code block stream of a MAC frame includes: the transmitting device obtaining a MAC frame and encoding the MAC frame into a 66-bit code block stream. In a communication system, one or more intermediate nodes may be located between the receiving device and the transmitting device. The intermediate nodes directly forward the 66-bit code block stream without decoding the 66-bit code block stream. Therefore, when the target data is a MAC frame, the intermediate nodes do not need to verify the MAC frame, thereby reducing the transmission delay of the 66-bit code block stream.
[0008] In an optional embodiment of the first aspect, the subsequent 66-bit code block is an S control code block. The original S control code block is used to carry the content of the preamble field in the MAC frame. The content of the preamble field is fixed. Therefore, by having the S control code block carry the first check field, the impact on the subsequent MAC frame can be reduced. Therefore, the present application can improve the reliability of transmitted data. In another optional embodiment of the first aspect, the subsequent 66-bit code block is an I control code block. When there is a long interval between two MAC frames, the transmitting device can insert an I control code block between the two 66-bit code block streams. The two 66-bit code block streams correspond to the two MAC frames in a one-to-one manner. The original I control code block is used to fill in useless data. When the first check field is located in the S control code block of the second 66-bit code block stream, the receiving device needs to receive one or more I control code blocks before receiving the S control code block, thereby reducing check efficiency. Therefore, by having the I control code block carry the first check field, check efficiency can be improved. In yet another optional embodiment of the first aspect, the subsequent 66-bit code block is a custom control code block. By carrying the first check field in the custom control code block, the impact on the next 66-bit code block stream can be reduced. Therefore, the present application can improve the reliability of transmitted data.
[0009] In an optional manner of the first aspect, the value of the control block type field of the custom control coding block is 0x00. 0x00 is a hexadecimal representation. Hexadecimal 0x00 can be converted to binary 0000 0000. When the control block type field is 0x00, it can be at least 2 bits different from the control block type fields of other control coding blocks. Therefore, even if an error occurs in 1 bit of the control block type field, it will not cause the receiving device to identify the custom control coding block as another control coding block. Therefore, the present application can improve the reliability of transmitting the first check field.
[0010] In an optional embodiment of the first aspect, an S control code block in the 66-bit code block stream is used to carry a first checksum field. Carrying the first checksum field in the 66-bit code block stream can improve the checksum efficiency of the receiving device. Furthermore, the original S control code block is used to carry the contents of the preamble field in the MAC frame. Therefore, carrying the first checksum field in the S control code block can reduce the impact on the MAC frame.
[0011] In an optional embodiment of the first aspect, the first check field includes a first subfield and a second subfield. The first subfield is used to check the length of the 66-bit code block stream. The second subfield is used to check the content of the 66-bit code block stream. The length check and content check can improve the accuracy of identifying bit errors. Therefore, the present application can improve the reliability of transmitted data.
[0012] In an optional embodiment of the first aspect, the first subfield is used to indicate the number of 66-bit code blocks included in the 66-bit code block stream. By indicating the number of 66-bit code blocks, the size of the first subfield can be reduced. Therefore, the present application can save transmission resources.
[0013] In an optional embodiment of the first aspect, the size of the first subfield is 2 bytes. The maximum length of a MAC frame is 9600 bytes. In this case, the number of 66-bit code blocks in the 66-bit code block stream is approximately 1200. Therefore, by controlling the size of the first subfield to 2 bytes, transmission resources can be saved.
[0014] In an optional embodiment of the first aspect, the size of the second subfield is 4 bytes. In order to improve the reliability of content verification, the size of the second subfield can be larger than the size of the first subfield. In addition, the available space size of a control coding block is 7 bytes. By limiting the size of the second subfield to 4 bytes, the first subfield and the second subfield can be transmitted in one control coding block. When the size of the second subfield is greater than 7 bytes, the sending device needs to use at least two control coding blocks to carry the first subfield and the second subfield. Therefore, the embodiment of the present application can reduce the number of control coding blocks, thereby improving transmission efficiency.
[0015] In an optional embodiment of the first aspect, the 66-bit code block stream further includes a second check field, or the subsequent 66-bit code block further includes a second check field. The second check field is used to check the first check field. By adding the second check field, the reliability of the transmitted first check field can be improved. Therefore, the present application can improve the reliability of transmitted data.
[0016] In an optional embodiment of the first aspect, the size of the second check field is 1 byte. The available space size of a control code block is 7 bytes. When the first check field is less than or equal to 6 bytes, the first check field and the second check field can be transmitted through a control code block. Therefore, the embodiment of the present application can reduce the number of control code blocks, thereby improving transmission efficiency.
[0017] In an optional manner of the first aspect, the transmitting device maps the second 66-bit code block stream to a service frame, and maps the service frame to the payload area of the data frame. By first mapping the second 66-bit code block stream to the service frame, and then mapping the service frame to the data frame, the minimum granularity of the service can be reduced, thereby increasing the number of services carried. In another optional manner of the first aspect, the transmitting device maps the first 66-bit code block stream and the subsequent 66-bit code block to the service frame, and then maps the service frame to the data frame.
[0018] The second aspect of the present application provides a data processing method. The data processing method can be applied to an optical module, an electronic chip or a receiving device. The receiving device can be an OTN device or an MTN device, etc. The following description takes the application of the data processing method to a receiving device as an example. The data processing method includes the following steps: the receiving device obtains a data frame. The receiving device extracts a 66-bit code block stream from the payload area of the data frame. The code block in the 66-bit code block stream is used to carry the obtained first check field. Or, the next 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field. The receiving device checks the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream through the first check field. The MAC frame includes an FCS field.
[0019] In an optional manner of the second aspect, the receiving device verifies the MAC frame corresponding to the 66-bit code block stream using the first check field. The data processing method further includes the following steps: the receiving device decodes the 66-bit code block stream into a MAC frame. In another optional manner of the second aspect, the receiving device verifies the 66-bit code block stream using the first check field.
[0020] In an optional embodiment of the second aspect, the S control code block in the 66-bit code block stream includes a first check field. The data processing method further includes the following steps: the receiving device replaces the first check field with the content of the preamble field in the MAC frame to obtain a modified 66-bit code block stream. The receiving device sends the modified 66-bit code block stream to other devices. The other devices may not support the check function of the first check field. By restoring the 66-bit code block stream, the impact of the first check field on the MAC frame restoration by other devices can be reduced. Therefore, the present application can improve the reliability of MAC frame restoration. In another optional embodiment of the second aspect, the last 66-bit code block in the 66-bit code block stream includes the first check field. The data processing method further includes the following steps: the receiving device modifies the last 66-bit code block. After modifying the last 66-bit code block, the receiving device can send the last 66-bit code block to the other devices. The other devices may not support the check function of the first check field. By restoring the last 66-bit code block, the impact of the first check field on the other devices can be reduced, thereby improving communication reliability. In another optional embodiment of the second aspect, the next 66-bit code block is an S control code. The receiving device replaces the first check field with the contents of the preamble field in the MAC frame. By restoring the next 66-bit code block, the impact of the first check field on other devices restoring the next MAC frame can be reduced. Therefore, the present application can improve the reliability of restoring the next MAC frame. In another optional embodiment of the second aspect, the next 66-bit code block is an I control code block. The receiving device modifies the contents of the first check field to 0. In another optional embodiment of the second aspect, the next 66-bit code block is a custom control code block. The receiving device deletes the custom control code block. Other devices may not recognize the custom control code block. Furthermore, the check function of the custom control code block may conflict with certain functions of other devices, thereby affecting the operation of other devices. Therefore, the present application can improve the reliability of communication.
[0021] In an optional embodiment of the second aspect, the data processing method further includes the following steps: if the 66-bit code block stream fails the check of the first check field, the receiving device modifies the synchronization field of the T control coding block in the 66-bit code block stream to 11 or 00. In subsequent processing, the receiving device can identify the 66-bit code block stream as an erroneous code block stream based on the content of the synchronization field, and thereby discard the 66-bit code block stream. Therefore, the present application can improve the reliability of communication.
[0022] In an optional manner of the second aspect, the 66-bit code block stream further includes a second check field, or the subsequent 66-bit code block further includes a second check field. The data processing method further includes the following steps: the receiving device checks the first check field using the second check field.
[0023] A third aspect of the present application provides a sending device. The sending device includes an acquisition module, a processing module, a mapping module, and a sending module. The acquisition module is configured to acquire a 66-bit code block stream of a MAC frame. The processing module is configured to obtain a first check field based on target data. The first check field is used to check the target data. The target data is a MAC frame or a 66-bit code block stream. A code block in the 66-bit code block stream is used to carry the obtained first check field. Alternatively, the next 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field. The mapping module is configured to map the 66-bit code block stream to the payload area of a data frame. The data frame may be an OTN frame, a FlexE frame, or an MTN frame. The sending module is configured to send the data frame. In an optional embodiment of the third aspect, the modules in the sending device may be configured to execute the method described in any of the optional embodiments of the first aspect. For example, the mapping module is configured to map the 66-bit code block stream to a service frame, and map the service frame to the payload area of the data frame. In another example, the acquisition module is configured to receive the 66-bit code block stream from another device.
[0024] A fourth aspect of the present application provides a receiving device. The receiving device includes a receiving module, an extraction module, and a verification module. The receiving module is used to receive a data frame. The extraction module is used to extract a 66-bit code block stream from the payload area of the data frame. The 66-bit code block stream includes a first check field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first check field. The verification module is used to verify a MAC frame or a 66-bit code block stream corresponding to the 66-bit code block stream using the first check field. The MAC frame includes an FCS field.
[0025] In an optional manner of the fourth aspect, a module in the sending device can be configured to execute the method described in any optional manner of the second aspect. For example, the verification module is further configured to verify the first check field using the second check field. In another example, the sending device further includes a modification module and a sending module. The modification module is configured to modify the next 66-bit code block. After modifying the next 66-bit code block, the sending module is configured to send the next 66-bit code block to another device.
[0026] A fifth aspect of the present application provides a sending device. The sending device includes a processor and a transceiver. The processor is configured to execute the method described in the first aspect or any optional embodiment of the first aspect to obtain a data frame. The transceiver is configured to send the data frame.
[0027] A sixth aspect of the present application provides a receiving device. The receiving device includes a processor and a transceiver. The transceiver is configured to receive a data frame. The processor is configured to execute the method described in the second aspect or any optional embodiment of the second aspect.
[0028] The seventh aspect of the present application provides a communication system. The communication system includes a sending device and a receiving device. The sending device is used to obtain a 66-bit code block stream of a MAC frame. The MAC frame includes an FCS field. The sending device is used to obtain a first check field based on target data. The target data is a MAC frame or a 66-bit code block stream. The code block in the 66-bit code block stream is used to carry the obtained first check field. Or, the next 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field. The sending device is used to map the 66-bit code block stream to the payload area of the data frame. The sending device sends a data frame to the receiving device. The receiving device is used to receive the data frame. The receiving device is used to extract the 66-bit code block stream from the payload area of the data frame. The receiving device is used to check the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream through the first check field.
[0029] In an optional embodiment of the seventh aspect, the sending device is also used to execute the method described in the aforementioned first aspect or any optional embodiment of the first aspect, and / or the receiving device is also used to execute the method described in the aforementioned second aspect or any optional embodiment of the second aspect.
[0030] In an eighth aspect, the present application provides a data frame. The data frame includes a payload area and an overhead area. The payload area includes a 66-bit code block stream. The 66-bit code block stream includes a first check field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first check field. The first check field is used to check the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream. The MAC frame includes an FCS field.
[0031] In an optional manner of the eighth aspect, the data frame is an optical service unit (OSU) frame, an OTN frame, a FlexE frame, or an MTN frame.
[0032] It should be understood that there are related contents in the aforementioned different aspects. Therefore, the description of the optional manner of any aspect may be used as the content of the optional manner of other aspects, and will not be repeated here.
[0033] A ninth aspect of the present application provides a computer storage medium. The computer storage medium stores instructions that, when executed on a computer, cause the computer to execute the method according to the first aspect or any one of the embodiments of the first aspect; or cause the computer to execute the method according to the second aspect or any one of the embodiments of the second aspect.
[0034] In a tenth aspect, the present application provides a computer program product. When the computer program product is executed on a computer, the computer is caused to perform the method according to the first aspect or any one of the embodiments of the first aspect; or the computer is caused to perform the method according to the second aspect or any one of the embodiments of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a schematic diagram of the structure of OTN;
[0036] Figure 2 is a schematic diagram of the structure of OTN equipment;
[0037] FIG3 is a schematic diagram of the structure of a data coding block and a control coding block;
[0038] FIG4 is a first flow chart of a data processing method provided in an embodiment of the present application;
[0039] FIG5 is a schematic diagram of a MAC frame encoded as a 66-bit code block stream;
[0040] FIG6 is a schematic diagram of the structure of a MAC frame;
[0041] FIG7 is a first schematic diagram of a MAC frame encoded as a 66-bit code block stream according to an embodiment of the present application;
[0042] FIG8 is a second schematic diagram of a MAC frame encoded as a 66-bit code block stream according to an embodiment of the present application;
[0043] FIG9 is a third schematic diagram of a MAC frame encoded as a 66-bit code block stream provided by an embodiment of the present application;
[0044] FIG10 is a fourth schematic diagram of a MAC frame encoded as a 66-bit code block stream provided by an embodiment of the present application;
[0045] FIG11 is a schematic diagram of the structure of a MAC frame provided in an embodiment of the present application;
[0046] FIG12a is a first structural diagram of the c field provided in an embodiment of the present application;
[0047] FIG12b is a second schematic diagram of the structure of the c field provided in an embodiment of the present application;
[0048] FIG12c is a third structural diagram of the c field provided in an embodiment of the present application;
[0049] FIG12d is a fourth structural diagram of the c field provided in an embodiment of the present application;
[0050] FIG13 is a schematic diagram of directly mapping a 66-bit code block stream to an OTN frame according to an embodiment of the present application;
[0051] FIG14 is a schematic diagram of indirect mapping of a 66-bit code block stream frame to an OTN frame according to an embodiment of the present application;
[0052] FIG15 is a second flow chart of the data processing method provided in an embodiment of the present application;
[0053] FIG16 is a third flow chart of the data processing method provided in an embodiment of the present application;
[0054] FIG17 is a fourth flow chart of the data processing method provided in an embodiment of the present application;
[0055] FIG18 is a schematic diagram of the structure of a sending device provided in an embodiment of the present application;
[0056] FIG19 is a schematic structural diagram of a receiving device provided in an embodiment of the present application;
[0057] FIG20 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0058] Figure 21 is a structural diagram of the communication system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] First, some terms in this application are explained to facilitate understanding by those skilled in the art.
[0060] 1) Multiple refers to two or more. "And / or" describes the relationship between related objects, and three types of relationships are possible. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Furthermore, in the description of this application, terms such as "first," "second," and "target" are used solely for descriptive purposes and should not be construed to indicate or imply relative importance or order.
[0061] 2) Mapping A to B mentioned in this application refers to encapsulating A into B. For example, mapping an optical service unit (OSU) frame into an optical transport network (OTN) frame refers to encapsulating an OSU frame or an OSU signal into an OTN frame.
[0062] 3) Unless otherwise specified, the detailed description of certain technical features in one embodiment can also be used to explain the corresponding technical features mentioned in other embodiments. For example, the function of the first check field 1 in one embodiment can also be applied to the first check field 1 mentioned in other embodiments. In addition, this application uses the same or similar figure numbers to represent components or method steps with the same or similar functions in different embodiments.
[0063] The embodiments of the present application are applicable to optical networks such as optical transport networks or metropolitan area transport networks. Optical transport networks include OTNs or flexible Ethernet (FlexE). In the subsequent description of this application, OTN will be used as an example. An OTN is typically composed of multiple OTN devices connected by optical fibers, and can be composed of different topology types such as linear, ring, and mesh according to specific needs. Figure 1 is a schematic diagram of the OTN structure provided by this application. As shown in Figure 1, OTN 100 is composed of eight OTN devices 101, namely OTN devices AH. Among them, 102 indicates an optical fiber used to connect two devices. 103 indicates a customer service interface used to receive or send customer service data. As shown in Figure 1, OTN 100 is used to transmit service data for customer devices 1-3. Customer devices are connected to OTN devices through customer service interfaces. For example, in Figure 1, customer devices 1-3 are connected to OTN devices A, H, and F, respectively.
[0064] Depending on actual needs, an OTN device may have different functions. Generally speaking, OTN devices are divided into optical layer devices, electrical layer devices, and optoelectronic hybrid devices. Optical layer devices refer to devices that can process optical layer signals, such as optical amplifiers and optical add-drop multiplexers (OADMs). Optical amplifiers are used to amplify optical signals to support transmission over longer distances while ensuring the specific performance of optical signals. OADMs are used to spatially transform optical signals so that they can be output from different output ports (sometimes also called directions). Electrical layer devices refer to devices that can process electrical layer signals, such as devices that can process OTN signals. Optoelectronic hybrid devices refer to devices that have the ability to process optical layer signals and electrical layer signals. It should be noted that, depending on specific integration needs, an OTN device can integrate multiple different functions. The technical solution provided in this application is applicable to OTN devices of different forms and integration levels that include electrical layer functions.
[0065] It should be noted that the data frame structure used by the optical transmission equipment in the embodiments of the present application may be an OTN frame. The OTN frame is used to carry various service data and provide rich management and monitoring functions. The OTN frame may be an optical data unit frame (ODUk), ODUCn, ODUflex, or an optical channel transport unit k (OTUk), OTUCn, or a flexible OTN (FlexO) frame, etc. The difference between an ODU frame and an OTU frame is that an OTU frame includes an ODU frame and an 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 rate that is a positive integer multiple of 100Gbps. Unless otherwise specified, an ODU frame refers to any one of ODUk, ODUCn, or ODUflex, and an OTU frame refers to any one of OTUk, OTUCn, 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 are also applicable to the present application. In addition, the method disclosed in this application can also be applied to other optical transport network frames such as FlexE frames.
[0066] Figure 2 is a schematic diagram of the structure of the OTN device provided in this application. OTN device 200 can be any of the OTN devices A and H in Figure 1. As shown in Figure 2, OTN device 200 includes a tributary board 201, a cross-connect board 202, a circuit board 203, an optical layer processing board (not shown), and a system control and communication board 204.
[0067] The tributary board 201, cross-connect board 202, and line board 203 are used to process electrical layer signals. The tributary board 201 is used to receive and transmit various customer services, such as SDH services, packet services, Ethernet services, and / or fronthaul services. Furthermore, the tributary board 201 can be divided into a customer-side optical transceiver module and a signal processor. The customer-side optical transceiver module, also known as an optical transceiver, is used to receive and / or transmit service data. The signal processor is used to map and demap service data into data frames. The cross-connect board 202 is used to switch data frames, completing the exchange of one or more types of data frames. The line board 203 primarily processes line-side data frames. Specifically, the line board 203 can be divided into a line-side optical module and a signal processor. The line-side optical module, also known as an optical transceiver, is used to receive and / or transmit data frames. The signal processor is used to multiplex and demultiplex, or map and demap, line-side data frames. The system control and communication board 204 is used to implement system control. Specifically, information can be collected from different boards, or control instructions can be sent to the corresponding board. It should be noted that, unless otherwise specified, the specific components (such as signal processors) can be one or more, and this application does not impose any restrictions. It should also be noted that this application does not impose any restrictions on the types of boards included in the device, as well as the functional design and quantity of the boards. It should be noted that, in a specific implementation, the above two boards may also be designed as one board. In addition, the network equipment may also include a backup power supply, a fan for heat dissipation, etc.
[0068] It should be understood that Figure 2 is only one example of the OTN equipment provided herein. Depending on specific needs, the type and number of boards included in an OTN device may vary. For example, an OTN device serving as a core node may not have a tributary board 201. Another example is an OTN device serving as an edge node that may have multiple tributary boards 201 or no optical cross-connect board 202. Furthermore, an OTN device that only supports electrical layer functions may not have an optical layer processing board.
[0069] In Figure 1, the data received by the OTN equipment from the customer equipment can be a 66-bit code block stream or a MAC frame. A 66-bit code block stream is composed of multiple 66-bit code blocks. A 66-bit code block is also called a 64B / 66B code block or a 66-bit code block. A 66-bit code block includes 2 bits of overhead and a 64-bit payload. 66-bit code blocks can be data code blocks or control code blocks. Data code blocks carry data. Control code blocks convey control information such as the media access control (MAC) address frame start or end markers or padding indicators.
[0070] Figure 3 is a schematic diagram of the structure of the data coding block and control coding block provided by this application. As shown in Figure 3, the data coding block 301 and the control coding block 302 include a synchronization (SYNC) field. The size of the SYNC field is 2 bits. The data carried by the SYNC field is used to indicate the code block type of the 66-bit coding block. For example, 01 indicates that the code block type of the 66-bit coding block is a data coding block. 10 indicates that the code block type of the 66-bit coding block is a control coding block. The data coding block 301 also includes a d field. The size of the d field is 64 bits. The d field is used to carry data. The control coding block 302 also includes a control block type (CBT) field and a c field. The size of the CBT field is 8 bits. The value of the CBT field can be 0x1E, 0x78, 0x4B, 0x87, or 0x99, etc. The size of the c field is 56 bits. The c field is used to carry control codes.
[0071] When an OTN device receives MAC frames from a client device, it encodes the MAC frames into a 66-bit code block stream. After receiving the 66-bit code block stream, the OTN device maps the 66-bit code block stream into the payload area of the OTN frame and transmits the OTN frame to another OTN device. The other OTN device extracts the 66-bit code blocks from the OTN frame and decodes the multiple 66-bit code blocks into a MAC frame. However, the SYNC field in the 66-bit code block indicates the code block type of the 66-bit code block. If the SYNC field contains an error, the other OTN device will misjudge the code block type, resulting in an incorrect MAC frame based on the misjudged 66-bit code block. If the incorrect MAC frame passes the frame check sequence (FCS) check, the receiving device will be unable to determine whether the MAC frame is incorrect, thereby reducing communication reliability.
[0072] To this end, this application provides a data processing method. Figure 4 is a first flow chart of the data processing method provided in an embodiment of this application. The data processing method can be applied to an optical module, an electronic chip, or a transmitting device. The transmitting device can be an OTN device or an MTN device, for example. The following description uses the data processing method applied to a transmitting device as an example. As shown in Figure 4, the data processing method includes the following steps.
[0073] In step 401, a sending device obtains a 66-bit code block stream of a MAC frame.
[0074] A transmitting device can receive a 66-bit code block stream or a MAC frame from a client device. When the data received by the transmitting device from the client device is a MAC frame, the transmitting device needs to encode the MAC frame into a 66-bit code block stream. Alternatively, the transmitting device can generate a MAC frame based on the data to be transmitted and encode the MAC frame into a 66-bit code block stream. Figure 5 shows a first schematic diagram of encoding a MAC frame into a 66-bit code block stream. As shown in Figure 5, the transmitting device encodes a MAC frame into a 66-bit code block stream 501. 66-bit code block stream 501 includes one S control code block, multiple data code blocks, and one T control code block. The SYNC field in the data code block is 01. The SYNC field in the S control code block and the T control code block is 10. The CBT field in the S control code block is 0x78. The CBT field in the T control code block can be 0x87, 0x99, 0xAA, 0xB4, 0xCC, 0xD2, 0xE1, or 0xFF.
[0075] It should be understood that in subsequent examples, for the convenience of description, the S control coding block may be referred to as an S1 control coding block or an S2 control coding block, etc. Similarly, the T control coding block may be referred to as a T1 control coding block or a T2 control coding block, etc. The data coding block may also be referred to as a D1 data coding block or a D2 data coding block, etc.
[0076] There is a correspondence between the 66-bit code block stream 501 and the data in the MAC frame. For example, Figure 6 is a schematic diagram of the structure of a MAC frame. As shown in Figure 6, the MAC frame 601 includes a preamble field, a start frame delimiter (SFD) field, a destination address (DA) field, a source address (SA) field, a type field, a data field, and a frame check sequence (FCS) field. The S control coding block is used to carry the content of the preamble field in the MAC frame. Multiple data coding blocks are used to carry the content of the remaining fields in the MAC frame. The T control coding block is used to mark the end of a MAC frame and can be used to carry the content of bytes 0 to 7 in the MAC frame.
[0077] In actual applications, the transmitting device can continuously encode multiple MAC frames into 66-bit code block streams. Figure 7 is a first schematic diagram of MAC frame encoding into 66-bit code block streams provided in an embodiment of the present application. As shown in Figure 7, the transmitting device encodes MAC frame 1 and MAC frame 2 into a 66-bit code block stream 701. Specifically, the 66-bit code block stream 701 includes a first 66-bit code block stream and a third 66-bit code block stream. The transmitting device encodes MAC frame 1 into a first 66-bit code block stream. The first 66-bit code block stream includes an S1 control code block, multiple D1 data code blocks, and a T1 control code block. The transmitting device encodes MAC frame 2 into a third 66-bit code block stream. The third 66-bit code block stream includes an S2 control code block, multiple D2 data code blocks, and a T2 control code block.
[0078] When there is a long interval between two MAC frames, the transmitting device can insert an I control coding block between the first 66-bit code block stream and the third 66-bit code block stream. The SYNC value in the I control coding block is 10, and the CBT value is 0x1E. The I control coding block can be called an I1 control coding block or an I2 control coding block, etc. Figure 8 is a second schematic diagram of the MAC frame encoding provided by an embodiment of the present application as a 66-bit code block stream. As shown in Figure 8, the transmitting device encodes MAC frame 1 and MAC frame 2 into a 66-bit code block stream 801. Based on Figure 7, the 66-bit code block stream 801 also includes one or more I1 control coding blocks. The I1 control coding block is located between the first 66-bit code block stream and the third 66-bit code block stream.
[0079] In an embodiment of the present application, the sending device may insert a custom control coding block after each T control coding block. The custom control coding block may be called a Z1 control coding block or a Z2 control coding block, etc. The SYNC field in the custom control coding block is 10. In order to distinguish other control coding blocks from the custom control coding block, the content of the CBT field in the custom control coding block is not 0x1E, 0x78, 0x4B, 0x87, 0x99, 0xAA, 0xB4, 0xCC, 0xD2, 0xE1 or 0xFF. In addition, in order to increase the difference between the CBT field in the custom control coding block and other control coding blocks, the CBT field of the custom control coding block may be 0x00.
[0080] Figure 9 is a third schematic diagram illustrating encoding a MAC frame into a 66-bit code block stream according to an embodiment of the present application. As shown in Figure 9 , the transmitting device encodes MAC frame 1 and MAC frame 2 into a 66-bit code block stream 901. Based on Figure 7 , 66-bit code block stream 901 also includes one Z1 control code block and one Z2 control code block. The Z1 control code block is located after the T1 control code block. The Z2 control code block is located after the T2 control code block.
[0081] Figure 10 is a fourth schematic diagram illustrating an embodiment of the present application in which MAC frames are encoded into a 66-bit code block stream. As shown in Figure 10 , the transmitting device encodes MAC frames 1 and 2 into a 66-bit code block stream 1001. Based on Figure 8 , 66-bit code block stream 1001 also includes one Z1 control code block and one Z2 control code block. The Z1 control code block is located between the T1 control code block and the I1 control code block.
[0082] It should be understood that in the aforementioned Figures 5, 7, and 10, the embodiments of the present application are described using only one or two MAC frames as examples. In actual applications, the transmitting device may encode more MAC frames into 66-bit code block streams. For example, in Figure 7, the transmitting device also encodes MAC frame 3 into 66-bit code block stream 701. In this case, 66-bit code block stream 701 also includes a fourth 66-bit code block stream. The fourth 66-bit code block stream includes an S3 control code block, multiple D3 data code blocks, and a T3 control code block. One or more I2 control code blocks may or may not exist between the fourth 66-bit code block stream and the third 66-bit code block stream.
[0083] It should be understood that in the examples of Figures 5-10 above, the transmitting device encodes the MAC frame into a 66-bit code block stream. When the transmitting device receives a 66-bit code block stream from the client device, the 66-bit code block stream can be encoded by the client device according to the above method.
[0084] In step 402, the sending device obtains a first check field based on the target data. The first check field is used to check the target data. The target data is a MAC frame or a 66-bit code block stream. The code block in the 66-bit code block stream is used to carry the obtained first check field, or the next 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field.
[0085] When the target data is a MAC frame, the transmitting device obtains a first check field based on the MAC frame. For example, the transmitting device performs a cyclic redundancy check (CRC) on the MAC frame to obtain a CRC field. The transmitting device uses the CRC field as the first check field. If the transmitting device receives a 66-bit code block stream from the client device, the transmitting device first decodes the 66-bit code block stream into a MAC frame. Decoding is the inverse process of encoding. Therefore, for a description of decoding, reference may be made to the description in any of Figures 5-10 above. After obtaining the MAC frame through decoding, the transmitting device obtains the first check field based on the MAC frame. After obtaining the first check field, the transmitting device then encodes the MAC frame into a 66-bit code block stream. Therefore, in this embodiment of the present application, there is no strict timing constraint between step 402 and step 401. For example, the transmitting device may first obtain the first check field and then encode the MAC frame into a 66-bit code block stream.
[0086] When the target data is a MAC frame, the transmitting device can replace the preamble field of the MAC frame with the obtained first check field to obtain a new MAC frame. Figure 11 is a schematic diagram of the structure of the MAC frame provided by an embodiment of the present application. As shown in Figure 11, based on Figure 6, the transmitting device replaces the preamble field in Figure 6 with the first check field. After obtaining the new MAC frame 1101, the transmitting device encodes the new MAC frame into a 66-bit code block stream according to the encoding method described in the aforementioned step 401. At this time, the first check field will be encoded into the S control coding block in the 66-bit code block stream. Alternatively, the transmitting device first encodes the MAC frame into a 66-bit code block stream according to the description in step 401. The transmitting device fills the first check field into the 66-bit code block stream or the next 66-bit code block in the 66-bit code block stream.
[0087] When the target data is a 66-bit code block stream, the sending device obtains a first check field based on the 66-bit code block stream. For example, the sending device obtains the number of 66-bit code blocks in the first 66-bit code block stream. The sending device uses the number of the first 66-bit code blocks as the first check field. If the sending device receives a MAC frame from the client device, the sending device first encodes the MAC frame into a 66-bit code block stream. For a description of encoding, please refer to the description in any of the aforementioned Figures 5 to 10. After obtaining the first 66-bit code block stream through encoding, the sending device obtains a first check field based on the first 66-bit code block stream. The sending device fills the first check field into the first 66-bit code block stream to obtain a second 66-bit code block stream. Or the sending device adds the first check field to the next 66-bit code block in the first 66-bit code block stream.
[0088] The 66-bit code block stream, the second 66-bit code block stream, or the subsequent 66-bit code block in the 66-bit code block stream is used to carry the obtained first check field. When a code block in the 66-bit code block stream or the second 66-bit code block stream is used to carry the obtained first check field, the S control code block in the 66-bit code block stream or the second 66-bit code block stream includes the first check field. For example, in Figure 7, the S1 control code block includes a first check field 1 corresponding to MAC frame 1. First check field 1 is used to verify MAC frame 1 or the first 66-bit code block stream. The S2 control code block includes a first check field 2 corresponding to MAC frame 2. First check field 2 is used to verify MAC frame 2 or the third 66-bit code block stream.
[0089] When the last 66-bit code block of the 66-bit code block stream is used to carry the obtained first check field, the last 66-bit code block can be an S control code and / or an I control code block. In this case, the last 66-bit code block can be an S control code or an I control code block. The last 66-bit code block can also be an S control code or an I control code block.
[0090] When the next 66-bit code block is an S control code block, the first check field representing the current MAC frame is located in the S control code block corresponding to the next MAC frame. For example, in Figure 8 , the S2 control code block includes the first check field 1 corresponding to MAC frame 1. In Figure 8 , the transmitting device can also be configured to encode MAC frame 3 into a fourth 66-bit code block stream. The fourth 66-bit code block stream includes an S3 control code block, multiple D3 data code blocks, and a T3 control code block. The S3 control code block includes the first check field 2 corresponding to MAC frame 2. Similarly, the first check field 3 corresponding to MAC frame 3 can be located in the S4 control code block corresponding to MAC frame 4.
[0091] When the next 66-bit code block is an I control code block, the first check field representing the current MAC frame is located in the I control code block between the two MAC frames. The two MAC frames include the current MAC frame and the next MAC frame. To this end, when the I control code block is not included between the 66-bit code block streams corresponding to the two MAC frames, the transmitting device inserts an I control code block between the 66-bit code block streams during the encoding process. For example, in Figure 7, the transmitting device inserts an I1 control code block between the first 66-bit code block stream and the third 66-bit code block stream. The I1 control code block includes a first check field 1. In Figure 7, when the I control code block is not included between the fourth 66-bit code block stream and the third 66-bit code block stream, the transmitting device also inserts an I2 control code block between the fourth 66-bit code block stream and the third 66-bit code block stream. The I2 control code block includes a first check field 2.
[0092] When the next 66-bit code block is an S control code block and an I control code block, the first check field representing the current MAC frame is located in the I control code block between the two 66-bit code block streams corresponding to the two MAC frames, or in the S control code corresponding to the next MAC frame. Specifically, when the I control code block is not included between the two 66-bit code block streams corresponding to the two MAC frames, the first check field of the current MAC frame is located in the S control code corresponding to the next MAC frame. When the I control code block is included between the two 66-bit code block streams corresponding to the two MAC frames, the first check field of the current MAC frame is located in the I control code block between the two 66-bit code block streams corresponding to the two MAC frames. For example, in Figure 7, there is no I control code block between the first and third 66-bit code block streams. In this case, the S2 control code block includes a first check field of 1. When an I2 control code block is included between the fourth and third 66-bit code block streams, the I2 control code block includes a first check field of 2.
[0093] When the next 66-bit code block in a 66-bit code block stream includes a first check field, the next 66-bit code block can be a custom control code block. In this case, the first check field of the current MAC frame is located in the custom control code block between the two 66-bit code block streams corresponding to the two MAC frames. For example, in Figure 10, the Z1 control code block includes a first check field of 1. The Z2 control code block includes a first check field of 2.
[0094] It should be understood that the "following 66-bit code block" does not necessarily refer to the first 66-bit code block after the 66-bit code block stream. For example, in Figure 8, three I1 control code blocks are included between the first 66-bit code block stream and the third 66-bit code block stream. The first check field 1 is located in the second I1 control code block of the three I1 control code blocks. In this case, the following 66-bit code block in the first 66-bit code block stream refers to the second I1 control code block of the three I1 control code blocks.
[0095] In practical applications, when the distance between the control code block carrying the first check field 1 and the first 66-bit code block stream is closer, the receiving device can more quickly check the first 66-bit code block stream or MAC frame 1, thereby improving the check efficiency. Therefore, to improve the check efficiency, the first 66-bit code block after the 66-bit code block stream can include the first check field.
[0096] It should be understood that "the next 66-bit code block" does not necessarily refer to a single 66-bit code block. For example, in Figure 8 , three I1 control code blocks are included between the first and third 66-bit code block streams. The first check field 1 is located in the first and second of the three I1 control code blocks. In this case, the next 66-bit code block in the first 66-bit code block stream refers to the first two of the three I1 control code blocks. As described above, the first check field 1 corresponding to MAC frame 1 can be located in the S1 control code block, S2 control code block, I1 control code block, or Z1 control code block. The first check field 1 corresponding to MAC frame 1 can also be located in the S2 control code block and the I1 control code block. In this embodiment of the present application, the first check field 1 can be located in the c field of the aforementioned control code blocks. The size of the first check field 1 is less than or equal to the size of the c field. Figure 12a is a first schematic diagram of the c field structure provided in this embodiment of the present application. As shown in Figure 12a, the size of the c field 1201 is 7 bytes. The size of the first checksum field is 2 bytes. The c field 1201 also includes a 5-byte reserved for future international standardization (RES) field.
[0097] In actual applications, the sending device can also obtain a second check field based on the first check field. The second check field is used to check the first check field. The 66-bit code block stream also includes a second check field, or the subsequent 66-bit code block also includes a second check field. The second check field can also be located in the c field in the above-mentioned control coding block. Figure 12b is a second structural diagram of the c field provided in an embodiment of the present application. As shown in Figure 12b, the size of the c field 1202 is 7 bytes. The size of the first check field is 2 bytes. The size of the second check field is 1 byte. The c field 1202 also includes a 4-byte RES field.
[0098] In practical applications, the first check field may include a first subfield and a second subfield. The first subfield is used to check the length of the MAC frame or 66-bit code block stream, that is, the first subfield is used for length verification. The second subfield is used to check the content of the MAC frame or 66-bit code block stream, that is, the second subfield is used for content verification. Figure 12c is a third structural schematic diagram of the c field provided in an embodiment of the present application. As shown in Figure 12c, the size of the c field 1203 is 7 bytes. The size of the first check field is equal to the size of the c field 1203. The first check field includes a first subfield and a second subfield. The size of the first subfield is 2 bytes. The size of the second subfield is 5 bytes.
[0099] Figure 12d is a fourth schematic diagram of the structure of the C field provided in an embodiment of the present application. As shown in Figure 12d, the size of the C field 1204 is 7 bytes. The first check field includes a first subfield and a second subfield. The size of the first subfield is 2 bytes. The size of the second subfield is 4 bytes. The C field 1204 or the first check field also includes a second check field, the size of which is 1 byte.
[0100] In step 403, the sending device maps the 66-bit code block stream to the payload area of the data frame.
[0101] The transmitting device can directly map the 66-bit code block stream into the payload area of the data frame, or it can first map the 66-bit code block stream into a service frame and then map the service frame into the data frame. The data frame can be an OTN frame, a FlexE frame, or an MTN frame. The service frame can be an OSU frame or other data frame with an OSU-like frame structure. In the embodiments of this application, the data frame is an OTN frame and the service frame is an OSU frame.
[0102] When the target data is a MAC frame, the transmitting device maps the 66-bit code block stream to the payload area of the data frame. The 66-bit code block stream includes a first checksum field, or the last 66-bit code block in the 66-bit code block stream includes the first checksum field. When the target data is a first 66-bit code block stream, the transmitting device maps the second 66-bit code block stream to the payload area of the data frame, or maps the first 66-bit code block stream and the last 66-bit code block to the payload area of the data frame. When the transmitting device maps the second 66-bit code block stream to the payload area of the data frame, the second 66-bit code block stream includes the first checksum field. When the transmitting device maps the first 66-bit code block stream and the last 66-bit code block to the payload area of the data frame, the last 66-bit code block includes the first checksum field. Figure 13 is a schematic diagram of directly mapping a 66-bit code block stream to an OTN frame, as provided in an embodiment of the present application. As shown in Figure 13, the transmitting device maps 66-bit code block stream 1301 to OTN frame 1302. For a description of 66-bit code block stream 1301, please refer to the descriptions in any of Figures 5, 7, 12d, and 1303. An OTN frame 1302 is a schematic diagram of an optical transport network frame. OTN frame 1302 has a structure of four rows and multiple columns. OTN frame 1302 includes an overhead area, a payload area, and a forward error correction (FEC) area. It should be understood that OTN frame 1302 is merely an example. Other variations of OTN frames are also applicable to this application. For example, an OTN frame that does not include an FEC area. Another example is a frame structure with different numbers of rows and columns than OTN frame 1302.
[0103] Figure 14 is a schematic diagram of the indirect mapping of a 66-bit code block stream frame into an OTN frame, as provided in an embodiment of the present application. As shown in Figure 14 , the transmitting device first maps the 66-bit code block stream 1301 into the payload area of one or more OSU frames 1401. OSU frames 1401 include an overhead area and a payload area. The overhead area of OSU frames 1401 carries overhead information, which includes one or more overhead fields. The payload area of OSU frames 1401 carries service data, such as a 66-bit code block stream. It should be understood that the OSU frame structure shown in Figure 14 is merely an example. In other implementations, an OSU frame may also include a data structure comprising overhead subframes and payload subframes. This is not a limitation of this disclosure. After mapping the 66-bit code block stream 1301 into the payload area of one or more OSU frames 1401, the transmitting device maps one or more OSU frames 1401 into an OTN frame 1302. For a description of OTN frame 1302, please refer to the description of Figure 13 .
[0104] In step 404, the sending device sends a data frame.
[0105] The sending device converts the electrical signals of the data frame into optical signals. The sending device is connected to the receiving device via optical fiber. The sending device transmits the optical signals of the data frame to the receiving device via optical fiber. The receiving device can be another OTN device or MTN device, for example.
[0106] As shown in Figure 4, multiple D1 data coding blocks are used to carry the contents of the remaining fields in MAC frame 1. In practical applications, the S1 control coding block and multiple D1 data coding blocks can be used to carry the contents of the remaining fields in MAC frame 1. The remaining fields may include the DA field, SA field, type field, data field, and FCS field. Furthermore, part of the space in the S1 control coding block can be used to carry the first check field 1, while another part of the space in the S1 control coding block and multiple D1 data coding blocks can be used to carry the contents of the remaining fields.
[0107] It should be understood that using the S1 control coding block to carry the first check field 1 is only an example provided in the embodiment of the present application. In actual applications, the sending device can also use the D1 data coding block or the T1 control coding block to carry the first check field 1.
[0108] As shown in Figure 4, the target data can be a 66-bit code block stream or a MAC frame. Figure 15 is a second flow chart of the data processing method provided in an embodiment of the present application. As shown in Figure 15, when the target data is a 66-bit code block stream, the data processing method includes the following steps.
[0109] In step 1501, a sending device obtains a first 66-bit code block stream of a MAC frame.
[0110] In step 1502, the sending device obtains a first check field according to the first 66-bit code block stream, where the first check field is used to check the first 66-bit code block stream.
[0111] In step 1503, the sending device obtains a second 66-bit code block stream according to the first 66-bit code block stream and the first check field, or adds the first check field to the next 66-bit code block in the first 66-bit code block stream.
[0112] In step 1504, the transmitting device maps the second 66-bit code block stream to the payload area of the data frame, or maps the first 66-bit code block stream and the subsequent 66-bit code block to the payload area of the data frame.
[0113] In step 1505, the sending device sends a data frame.
[0114] Figure 16 is a third flow chart of the data processing method provided in an embodiment of the present application. As shown in Figure 16, when the target data is a MAC frame, the data processing method includes the following steps.
[0115] In step 1601, the sending device obtains a MAC frame.
[0116] The transmitting device may receive a MAC frame from a client device. Alternatively, the transmitting device may receive a 66-bit code block stream from the client device. The transmitting device may decode the 66-bit code block stream into a MAC frame. Alternatively, the transmitting device may generate a MAC frame based on the data to be transmitted. The MAC frame includes an FCS field.
[0117] In step 1602, the sending device obtains a first check field according to the MAC frame, where the first check field is used to check the MAC frame.
[0118] The first checksum field is not the FCS field. The FCS sequence field is used to check the DA field, SA field, type field, and DA field. The first checksum field and the FCS field can have different check objects. For example, the first checksum field is used to check the DA field, SA field, type field, DA field, and FCS field.
[0119] In step 1603, the transmitting device encodes the MAC frame into a 66-bit code block stream, where the 66-bit code block stream includes the first check field, or the next 66-bit code block of the 66-bit code block stream includes the first check field.
[0120] In step 1604, the transmitting device maps the 66-bit code block stream to the payload area of the data frame.
[0121] In step 1605, the sending device sends a data frame.
[0122] It should be understood that the description of FIG. 15 or FIG. 16 shares similarities with the description of FIG. 4 . Therefore, the description of FIG. 15 or FIG. 16 may refer to the description of FIG. 4 . For example, the description of step 1501 may refer to the description of step 401. Another example is the description of step 1503 may refer to the description of step 403. Similarly, the description of FIG. 15 or FIG. 16 may refer to the description of FIG. 4 . For example, the first checksum field is not the FCS field.
[0123] As can be seen from the descriptions of Figures 4, 15, and 16 above, the transmitting device is configured to transmit data frames to the receiving device. Therefore, the receiving device can receive the data frames and verify the MAC frame or 66-bit code block stream based on the first checksum field in the data frames. Figure 17 is a fourth flow chart of the data processing method provided in an embodiment of the present application. As shown in Figure 17, the data processing method includes the following steps.
[0124] In step 1701, the receiving device obtains a data frame.
[0125] The receiving device can be an OTN device or an MTN device. It is connected to the transmitting device via an optical fiber. The receiving device receives the optical signal of the data frame from the transmitting device via the optical fiber and converts the optical signal of the data frame into an electrical signal of the data frame.
[0126] In step 1702, the receiving device extracts a 66-bit code block stream from the payload area of the data frame, where the 66-bit code block stream includes the first check field, or the next 66-bit code block in the 66-bit code block stream includes the first check field.
[0127] Extraction is the inverse of mapping. The receiving device extracts the 66-bit code block stream from the payload area of the data frame. Specifically, the receiving device extracts the service frame from the payload area of the data frame, and then extracts the 66-bit code block stream from the payload area of the service frame. Alternatively, the receiving device extracts the 66-bit code block stream directly from the payload area of the data frame.
[0128] In step 1703, the receiving device checks the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream through the first check field.
[0129] As shown in the description of FIG. 4 , the target data can be a 66-bit code block stream or a MAC frame. When the target data is a 66-bit code block stream, the receiving device verifies the 66-bit code block stream based on the first check field. When the target data is a MAC frame, the receiving device decodes the 66-bit code block stream into a MAC frame and then verifies the MAC frame based on the first check field.
[0130] If the 66-bit code block stream fails to pass the check of the first check field, the receiving device may modify the SYNC field of the T control code block in the 66-bit code block stream to 11 or 00. For example, for the 66-bit code block stream 701 in Figure 7. If the first 66-bit code block stream fails to pass the check of the first check field 1, the receiving device modifies the SYNC field of the T1 control code block to 11 or 00. Similarly, if the third 66-bit code block stream fails to pass the check of the first check field 2, the receiving device modifies the SYNC field of the T2 control code block to 11 or 00. According to the description of Figure 3 above, the correct SYNC field in the T control code block is 10. In subsequent processing, the receiving device can identify the 66-bit code block stream as an erroneous code block stream based on the erroneous content in the SYNC field, thereby discarding the 66-bit code block stream.
[0131] The receiving device may also transmit data frames to other devices. Before transmitting the data frames to other devices, the receiving device may modify the 66-bit code block stream or the next subsequent 66-bit code block in the 66-bit code block stream. Specifically, when the first checksum field is located in the 66-bit code block stream, the receiving device modifies the 66-bit code block stream. When the first checksum field is located in the next subsequent 66-bit code block in the 66-bit code block stream, the receiving device modifies the next subsequent 66-bit code block in the 66-bit code block stream. These are described separately below.
[0132] When the first check field is located in an S control code block in a 66-bit code block stream, the receiving device replaces the first check field with the contents of the preamble field in the MAC frame, thereby obtaining a modified 66-bit code block stream. For example, in Figure 7, the S1 control code block includes a first check field of 1. The receiving device replaces the first check field of 1 with the preamble field.
[0133] When the next 66-bit code block is an S control code block, the receiving device replaces the first check field with the content of the preamble field in the MAC frame. For example, in Figure 7, the S2 control code block includes a first check field of 1. The receiving device replaces the first check field 1 with the preamble field. When the next 66-bit code block is an I control code block, the receiving device modifies the content in the first check field to 0. For example, in Figure 8, the I1 control code block includes a first check field of 1. The receiving device modifies the content in the first check field 1 to 0. When the next 66-bit code block is a custom control code block, the receiving device deletes the custom control code block. For example, in Figure 10, the Z1 control code block includes a first check field of 1. The Z2 control code block includes a first check field of 2. The receiving device deletes the Z1 control code block and the Z2 control code block.
[0134] After the above modifications, the receiving device can obtain the modified 66-bit code block stream or the next 66-bit code block after the modification. The receiving device maps the modified 66-bit code block stream or the next 66-bit code block after the modification to the payload area of the data frame and transmits the data frame to other devices. For a description of how the receiving device maps the modified 66-bit code block stream to the data frame, refer to the description of how the transmitting device maps the 66-bit code block stream to the data frame in FIG. 4 . For example, the receiving device first maps the modified 66-bit code block stream to the payload area of the service frame, and then maps the service frame to the payload area of the data frame.
[0135] It should be understood that the description of Figure 17 is similar to the description of Figures 4, 15, or 16 described above. Therefore, the description of Figure 17 can refer to the description of Figures 4, 15, or 16 described above. For example, the 66-bit code block stream or the last 66-bit code block of the 66-bit code block stream includes a second check field. The receiving device checks the first check field based on the second check field. For another example, the first check field includes a first subfield and a second subfield. The first subfield is used to check the length of the 66-bit code block stream. The second subfield is used to check the content of the 66-bit code block stream. For another example, the first check field is not the FCS field.
[0136] The data processing method provided in this application is described above, and the sending device, receiving device, sending equipment and receiving equipment provided in this application are described below.
[0137] Figure 18 is a schematic diagram of the structure of a sending device provided in an embodiment of the present application. As shown in Figure 18, sending device 1800 includes an acquisition module 1801, a processing module 1802, a mapping module 1803, and a sending module 1804. Acquisition module 1801 is used to obtain a 66-bit code block stream of a MAC frame. Processing module 1802 is used to obtain a first check field based on target data. The first check field is used to verify the target data. The target data is a MAC frame or a 66-bit code block stream. The 66-bit code block stream includes the first check field. Alternatively, the last 66-bit code block in the 66-bit code block stream includes the first check field. Mapping module 1803 is used to map the 66-bit code block stream to the payload area of a data frame. The data frame can be an OTN frame, a Flexible Ethernet (FlexE) frame, or an MTN frame. Sending module 1804 is used to send the data frame.
[0138] It should be understood that the description of transmitting apparatus 1800 shares similarities with the description of the data processing method described in Figures 4, 15, or 16 above. Therefore, the description of transmitting apparatus 1800 may refer to the description of Figures 4, 15, or 16 above. For example, mapping module 1803 is configured to map a 66-bit code block stream to a service frame and map a service frame to the payload area of a data frame. For another example, acquisition module 1801 is configured to receive a 66-bit code block stream from another device. For another example, the first checksum field is not an FCS field.
[0139] FIG19 is a schematic diagram of the structure of a receiving device provided in an embodiment of the present application. As shown in FIG19 , receiving device 1900 includes a receiving module 1901, an extraction module 1902, and a verification module 1903. Receiving module 1901 is used to receive a data frame. Extraction module 1902 is used to extract a 66-bit code block stream from the payload area of the data frame. The 66-bit code block stream includes a first check field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first check field. Verification module 1903 is used to verify the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream using the first check field.
[0140] It should be understood that the description of receiving device 1900 shares similarities with the description of the data processing method in Figures 4, 15, 16, or 17. Therefore, the description of receiving device 1900 may refer to the description of Figures 4, 15, 16, or 17. For example, the check module 1903 is further configured to check the first check field using the second check field. In another example, the sending device further includes a modification module and a sending module. The modification module is configured to modify the next 66-bit code block. After modifying the next 66-bit code block, the sending module is configured to send the next 66-bit code block to another device. In another example, the first check field is not an FCS field.
[0141] Figure 20 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device can be a transmitting device or a receiving device. As shown in Figure 20, the communication device 2000 includes a processor 2001 and a transceiver 2002. The processor 2001 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 2001 can further include a hardware chip or other general-purpose processor. The above-mentioned hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The transceiver 2002 can be an optical transceiver.
[0142] When the communication device 2000 is a transmitting device, the processor 2001 is configured to obtain a 66-bit code block stream of a MAC frame. The processor 2001 is configured to obtain a first check field based on target data. The first check field is used to verify the target data. The target data is a MAC frame or a 66-bit code block stream. The 66-bit code block stream includes the first check field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first check field. The mapping module 1803 is configured to map the 66-bit code block stream to the payload area of a data frame. The transceiver 2002 is configured to transmit the data frame.
[0143] When communication device 2000 is a receiving device, transceiver 2002 is configured to receive a data frame. Processor 2001 is configured to extract a 66-bit code block stream from the payload area of the data frame. The 66-bit code block stream includes a first checksum field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first checksum field. Processor 2001 is configured to verify the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream using the first checksum field.
[0144] In other embodiments, the communication device 2000 may further include a memory 2003. The memory 2003 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), or a flash memory. The volatile memory may be a random access memory (RAM). The memory 2003 may be used for MAC frames or 66-bit code block streams.
[0145] It should be understood that the description of communication device 2000 shares similarities with the description of the data processing method described in Figures 4, 15, 16, or 17. Therefore, the description of communication device 2000 may refer to the description of Figures 4, 15, 16, or 17. For example, a 66-bit code block stream or a subsequent 66-bit code block in a 66-bit code block stream includes a second checksum field. For another example, a first checksum field includes a first subfield and a second subfield. For another example, the first checksum field is not an FCS field.
[0146] The present application also provides a communication system. Figure 21 is a structural diagram of the communication system provided by an embodiment of the present application. As shown in Figure 21, the communication system 2100 includes a sending device 2101 and a receiving device 2102. The sending device 2101 is used to obtain a 66-bit code block stream of a MAC frame. The MAC frame includes an FCS field. The sending device 2101 is used to obtain a first check field based on target data. The target data is a MAC frame or a 66-bit code block stream. The 66-bit code block stream includes a first check field. Or, the next 66-bit code block of the 66-bit code block stream includes a first check field. The sending device 2101 is used to map the 66-bit code block stream to the payload area of the data frame. The sending device 2101 sends a data frame to the receiving device 2102. The receiving device 2102 is used to: receive the data frame, extract the 66-bit code block stream from the payload area of the data frame, and check the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream through the first check field.
[0147] It should be understood that the description of transmitting device 2101 shares similarities with the description of the data processing method in Figures 4, 15, or 16 above. Therefore, the description of transmitting device 2101 can refer to the description of Figures 4, 15, or 16 above. Similarly, the description of receiving device 2102 shares similarities with the description of the data processing method in Figure 17 above. Therefore, the description of receiving device 2102 can refer to the description of Figure 17 above.
[0148] An embodiment of the present application also provides a data frame. The data frame includes a payload area and an overhead area. The payload area includes a 66-bit code block stream. The 66-bit code block stream includes a first checksum field. Alternatively, the next 66-bit code block in the 66-bit code block stream includes the first checksum field. The first checksum field is used to check the MAC frame or 66-bit code block stream corresponding to the 66-bit code block stream.
[0149] It should be understood that the description of the data frame is similar to the description of the data frame in Figures 4, 15, or 16. Therefore, the description of the data frame can refer to the description in Figures 4, 15, or 16. For example, the MAC frame includes an FCS field. The first checksum field is not the FCS field. For another example, the data frame is an OSU frame, an OTN frame, a FlexE frame, or an MTN frame.
[0150] The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: Get the first 66-bit code block stream of a medium access control MAC frame; Obtain a first check field according to the first 66-bit code block stream, where the first check field is used to check the first 66-bit code block stream; Adding the first check field to a subsequent 66-bit code block of the first 66-bit code block stream; Mapping the latter 66-bit code block to the payload area of the data frame; The data frame is sent.
2. The data processing method according to claim 1, characterized in that: The latter 66-bit code block is an S control coding block, an I control coding block or a custom control coding block.
3. The data processing method according to claim 2, characterized in that: The control block type field of the custom control coding block takes a value of 0x00.
4. The data processing method according to claim 1, characterized in that: The S control coding block in the second 66-bit code block stream is used to carry the first check field.
5. The data processing method according to any one of claims 1 to 4, characterized in that: The first check field includes a first subfield and a second subfield, wherein: The first subfield is used to check the length of the 66-bit code block stream; The second subfield is used to verify the content of the 66-bit code block stream.
6. The data processing method according to claim 5, characterized in that: The first subfield is used to indicate the number of 66-bit code blocks included in the 66-bit code block stream.
7. The data processing method according to claim 5 or 6, characterized in that: The size of the first subfield is 2 bytes.
8. The data processing method according to any one of claims 5 to 7, characterized in that: The size of the second subfield is 4 bytes.
9. The data processing method according to any one of claims 1 to 8, characterized in that: The latter 66-bit code block also includes the second check field, and the second check field is used to check the first check field.
10. The data processing method according to claim 9, characterized in that: The size of the second check field is 1 byte.
11. The data processing method according to any one of claims 1 to 10, characterized in that: Mapping the second 66-bit code block stream to the payload area of the data frame includes: mapping the second 66-bit code block stream to a service frame, and mapping the service frame to the payload area of the data frame.
12. A data processing method, characterized in that: include: Get a medium access control MAC frame; Obtain a first check field according to the MAC frame, where the first check field is used to check the MAC frame, and the MAC frame includes a frame check sequence FCS field; Encoding the MAC frame into a 66-bit code block stream, wherein a subsequent 66-bit code block of the 66-bit code block stream includes a first check field; Mapping the 66-bit code block stream to a payload area of a data frame; The data frame is sent.
13. A data processing method, characterized in that: include: Receive data frame; Extracting a 66-bit code block stream from the payload area of the data frame, wherein a subsequent 66-bit code block of the 66-bit code block stream includes a first check field; The 66-bit code block stream is checked by using the first check field.
14. The data processing method according to claim 13, characterized in that: The 66-bit code block stream includes a first check field including: the S control code block in the 66-bit code block stream includes the first check field; The method further comprises: Replacing the first check field with the content of the preamble field in the medium access control MAC frame to obtain a modified 66-bit code block stream; The modified 66-bit code block stream is output.
15. The data processing method according to claim 14, characterized in that: The next 66-bit code block of the 66-bit code block stream includes the first check field, and the method further includes: The latter 66-bit code block is modified.
16. The data processing method according to claim 15, characterized in that: The latter 66-bit code block is an S control code block; The modifying of the latter 66-bit code block includes: replacing the first check field with the content of the preamble field in the MAC frame.
17. The data processing method according to claim 15, characterized in that: The latter 66-bit code block is a 1 control code block; The modifying of the latter 66-bit code block includes: modifying the content in the first check field to 0.
18. The data processing method according to claim 15, characterized in that: The latter 66-bit code block is a custom control code block; The modifying of the latter 66-bit code block includes: deleting the custom control code block.
19. The data processing method according to any one of claims 13 to 18, characterized in that: The method further comprises: If the 66-bit code block stream fails to pass the check of the first check field, the synchronization field of the T control coding block in the 66-bit code block stream is modified to 11 or 00.
20. The data processing method according to any one of claims 13 to 19, characterized in that: The latter 66-bit code block also includes the second check field, and the method further includes: The first check field is checked by using the second check field.
21. A sending device, characterized in that: The device comprises an acquisition module, a processing module, a mapping module and a sending module, wherein the modules in the sending device are used to execute the method described in any one of claims 1 to 12.
22. A receiving device, characterized in that: The receiving device comprises a receiving module, an extracting module and a checking module, wherein the modules in the receiving device are used to execute the method described in any one of claims 13 to 20.
23. A sending device, characterized in that: A processor and a transceiver, wherein: The processor is used to execute the method described in any one of claims 1 to 12 to obtain a data frame; The transceiver is used to send the data frame.
24. A receiving device, characterized in that: Includes a processor and a transceiver, wherein: The transceiver is used to receive data frames; The processor is configured to execute the method of any one of claims 13 to 20.
25. A communication system, characterized in that: The invention comprises the transmitting device as claimed in claim 23 and the receiving device as claimed in claim 24.
