This application discloses a
data processing method and a
data processing apparatus. First
data processing is performed on a plurality of first data streams obtained through first FEC encoding, to obtain m second data streams. Second FEC encoding has been performed for each of the second data streams, and each codeword obtained through the second FEC encoding includes N bits, where N=K+S, K represents a quantity of information bits, and S represents a quantity of parity bits. Second data
processing is separately performed on the m second data streams to obtain m third data streams. Each of the third data streams includes at least one bit sequence, each bit sequence includes P+W bits, the P bits in each bit sequence are from the second
data stream, and the W bits in each bit sequence are an added alignment marker, where P=N×b. Third data
processing is performed on the m third data streams to obtain Y modulated symbol streams, where modulation has been performed for each of the modulated symbol streams, and a value of a
baud rate of each of the modulated symbol streams is an integer multiple of a value of an
Ethernet common reference
clock frequency.