A data processing method, comprising: receiving, by an encoding circuit, m data streams using m receive ports respectively, wherein m is an integer greater than 1, wherein the m receive ports are in a one-to-one correspondence with the m data streams, wherein the m data streams comprise m×m data units, wherein each data stream of the m data streams comprises m data units, wherein the m×m data units form an m-order matrix A, wherein the m×m data units are m×m elements in the matrix A, wherein m 1×m matrices in the matrix A are in a one-to-one correspondence with the m data streams, wherein m elements located in a same m×1 matrix of m m×1 matrices in the matrix A are received by the encoding circuit at a same time, and wherein among m elements located in a same 1×m matrix of the m 1×m matrices in the matrix A, an element located on a right side is received earlier than an element located on a left side; keeping, by the encoding circuit, a location of one element in each row in the matrix A unchanged and moving remaining m-1 elements to remaining m-1 rows respectively to form an m-order matrix B, wherein a column number of each element in the remaining m-1 elements in the matrix A before the element is moved equals a column number of the element in the remaining m-1 elements in the matrix B after the element is moved, and wherein the m×m elements in the matrix A are in a one-to-one correspondence with m×m elements in the matrix B; and sending, by the encoding circuit using m transmit ports, the m×m elements in the matrix B to m different levels of a pulse amplitude modulation, PAM, circuit respectively to perform modulation, wherein m 1×m matrices in the matrix B are in a one-to-one correspondence with the m different levels of the PAM circuit, wherein m elements located in a same m×1 matrix of m m×1 matrices in the matrix B are sent at a same time, wherein among m elements located in a same 1×m matrix of the m 1×m matrices in the matrix B, an element located on a right side is sent earlier than an element located on a left side, wherein the m×m elements in the matrix A are denoted by a ij, wherein the m×m elements in the matrix B are denoted by b ij, wherein i=1,..., m, wherein j=1,..., m, wherein b ij = a xj, and wherein a value of x is: x=i+k when i+k≤m; x=i+k-m when i+k>m; or x=i-k when i-k>0; and x=i-k+m when i-k≤0, wherein k is an integer greater than or equal to 0 and less than m, and wherein m elements in a same row in the matrix B correspond to different k values respectively. receiving, by an encoding circuit, m data streams using m receive ports respectively, wherein m is an integer greater than 1, wherein the m receive ports are in a one-to-one correspondence with the m data streams, wherein the m data streams comprise m×m data units, wherein each data stream of the m data streams comprises m data units, wherein the m×m data units form an m-order matrix A, wherein the m×m data units are m×m elements in the matrix A, wherein m 1×m matrices in the matrix A are in a one-to-one correspondence with the m data streams, wherein m elements located in a same m×1 matrix of m m×1 matrices in the matrix A are received by the encoding circuit at a same time, and wherein among m elements located in a same 1×m matrix of the m 1×m matrices in the matrix A, an element located on a right side is received earlier than an element located on a left side; keeping, by the encoding circuit, a location of one element in each row in the matrix A unchanged and moving remaining m-1 elements to remaining m-1 rows respectively to form an m-order matrix B, wherein a column number of each element in the remaining m-1 elements in the matrix A before the element is moved equals a column number of the element in the remaining m-1 elements in the matrix B after the element is moved, and wherein the m×m elements in the matrix A are in a one-to-one correspondence with m×m elements in the matrix B; and sending, by the encoding circuit using m transmit ports, the m×m elements in the matrix B to m different levels of a pulse amplitude modulation, PAM, circuit respectively to perform modulation, wherein m 1×m matrices in the matrix B are in a one-to-one correspondence with the m different levels of the PAM circuit, wherein m elements located in a same m×1 matrix of m m×1 matrices in the matrix B are sent at a same time, wherein among m elements located in a same 1×m matrix of the m 1×m matrices in the matrix B, an element located on a right side is sent earlier than an element located on a left side, wherein the m×m elements in the matrix A are denoted by a ij, wherein the m×m elements in the matrix B are denoted by b ij, wherein i=1,..., m, wherein j=1,..., m, wherein b ij = a xj, and wherein a value of x is: x=i+k when i+k≤m; x=i+k-m when i+k>m; or x=i-k when i-k>0; and x=i-k+m when i-k≤0, wherein k is an integer greater than or equal to 0 and less than m, and wherein m elements in a same row in the matrix B correspond to different k values respectively. x=i+k when i+k≤m; x=i+k-m when i+k>m; or x=i-k when i-k>0; and x=i-k+m when i-k≤0, wherein k is an integer greater than or equal to 0 and less than m, and wherein m elements in a same row in the matrix B correspond to different k values respectively.