CPC H04L 1/004 (2013.01) [H04J 3/1664 (2013.01)] | 17 Claims |
1. A data processing method, comprising:
compressing a to-be-transmitted data stream to obtain a compressed data stream;
determining a size of a first payload area based on the compressed data stream, wherein the first payload area is used to carry a forward error correction (FEC) code;
generating a data frame based on the compressed data stream, wherein the data frame comprises an overhead area and a payload area, the payload area comprises the first payload area and a second payload area, and the second payload area carries the compressed data stream;
performing an FEC processing to generate the FEC code to be stored in the first payload area; and
sending the data frame that carries the FEC code;
wherein the obtaining of the size of the first payload area of the compressed data stream comprises:
obtaining a compression ratio of the compressed data stream, wherein the compression ratio is a ratio of a data volume of the compressed data stream to a data volume of the to-be-transmitted data stream; and
determining the size of the first payload area based on the compression ratio.
|