A flexible-Ethernet data processing method, comprising: acquiring a to-be-switched first client service flow, wherein the first client service flow is a service flow suitable for transmission on a flexible Ethernet; if an initial service flow meets a flexible Ethernet transmission condition, determining that the initial service flow is the to-be-switched first client service flow, wherein a source of the initial service flow is used to determine whether the initial service flow meets the flexible Ethernet transmission condition; performing first rate adaptation from a source clock domain to a target clock domain on the first client service flow, to obtain a second client service flow that matches the target clock domain, wherein the target clock domain comprises a switching circuit clock domain; performing serial-to-parallel conversion on the second client service flow in the target clock domain, to obtain a parallel client slot flow; performing space division switching on the parallel client slot flow, and outputting a parallel client slot flow obtained after the space division switching; wherein the slots in the client slot flow each correspond to a slot flow identifier, determining the slot flow identifiers respectively corresponding to the parallel slots in client slot flow obtained after the space division switching, and sorting, according to the corresponding slot flow identifiers, the parallel slots in the client slot flow obtained after the space division switching; performing , based on to a result of the sorting, parallel-to-serial conversion on the parallel client slot flow obtained after the space division switching, to restore, to the second client service flow, the parallel client slot flow obtained after the space division switching; and performing second rate adaptation on the second client service flow from the switching circuit clock domain to a destination clock domain and sending the second client service flow that has undergone the second rate adaptation. acquiring a to-be-switched first client service flow, wherein the first client service flow is a service flow suitable for transmission on a flexible Ethernet; if an initial service flow meets a flexible Ethernet transmission condition, determining that the initial service flow is the to-be-switched first client service flow, wherein a source of the initial service flow is used to determine whether the initial service flow meets the flexible Ethernet transmission condition; performing first rate adaptation from a source clock domain to a target clock domain on the first client service flow, to obtain a second client service flow that matches the target clock domain, wherein the target clock domain comprises a switching circuit clock domain; performing serial-to-parallel conversion on the second client service flow in the target clock domain, to obtain a parallel client slot flow; performing space division switching on the parallel client slot flow, and outputting a parallel client slot flow obtained after the space division switching; wherein the slots in the client slot flow each correspond to a slot flow identifier, determining the slot flow identifiers respectively corresponding to the parallel slots in client slot flow obtained after the space division switching, and sorting, according to the corresponding slot flow identifiers, the parallel slots in the client slot flow obtained after the space division switching; performing , based on to a result of the sorting, parallel-to-serial conversion on the parallel client slot flow obtained after the space division switching, to restore, to the second client service flow, the parallel client slot flow obtained after the space division switching; and performing second rate adaptation on the second client service flow from the switching circuit clock domain to a destination clock domain and sending the second client service flow that has undergone the second rate adaptation. <EOS>