A method for processing data of multiple rates performed by a system comprising a data processing apparatus, a first electrical-to-optical conversion component and a second electrical-to-optical conversion component, wherein the method comprises: receiving, by a data processing apparatus, first data and second data, wherein a transmission rate of the first data is a first rate, a transmission rate of the second data is a second rate, and the first rate is different from the second rate (S 201, S 301, S 205, S 306); obtaining, by the data processing apparatus, N1 pieces of third data and N2 pieces of fourth data according to the first rate and the first data, wherein N1 is an integer greater than or equal to 1, and N2 is an integer greater than or equal to 1 (S 202, S 302); obtaining, by the data processing apparatus, M1 pieces of fifth data and M2 pieces of sixth data according to the second rate and the second data, wherein M1 is an integer greater than or equal to 1, and M2 is an integer greater than or equal to 1 (S 206, S 307); obtaining, by the data processing apparatus, seventh data by modulating the N1 pieces of third data and the N2 pieces of fourth data with a first modulation scheme, wherein the seventh data is serially transmitted data, and a transmission rate of the seventh data is the first rate (S 203, S 304); obtaining, by the data processing apparatus, eighth data by modulating the M1 pieces of fifth data and the M2 pieces of sixth data with a second modulation scheme, wherein the eighth data is serially transmitted data, and a transmission rate of the eighth data is the second rate (S 207, S 309); outputting, by the data processing apparatus, the seventh data to the first electrical-to-optical conversion component (S 204, S 305); and outputting, by the data processing apparatus, the eighth data to the second electrical-to optical conversion component (S 208, S 310). receiving, by a data processing apparatus, first data and second data, wherein a transmission rate of the first data is a first rate, a transmission rate of the second data is a second rate, and the first rate is different from the second rate (S 201, S 301, S 205, S 306); obtaining, by the data processing apparatus, N1 pieces of third data and N2 pieces of fourth data according to the first rate and the first data, wherein N1 is an integer greater than or equal to 1, and N2 is an integer greater than or equal to 1 (S 202, S 302); obtaining, by the data processing apparatus, M1 pieces of fifth data and M2 pieces of sixth data according to the second rate and the second data, wherein M1 is an integer greater than or equal to 1, and M2 is an integer greater than or equal to 1 (S 206, S 307); obtaining, by the data processing apparatus, seventh data by modulating the N1 pieces of third data and the N2 pieces of fourth data with a first modulation scheme, wherein the seventh data is serially transmitted data, and a transmission rate of the seventh data is the first rate (S 203, S 304); obtaining, by the data processing apparatus, eighth data by modulating the M1 pieces of fifth data and the M2 pieces of sixth data with a second modulation scheme, wherein the eighth data is serially transmitted data, and a transmission rate of the eighth data is the second rate (S 207, S 309); outputting, by the data processing apparatus, the seventh data to the first electrical-to-optical conversion component (S 204, S 305); and outputting, by the data processing apparatus, the eighth data to the second electrical-to optical conversion component (S 208, S 310). <EOS>