A data flow processing method executed by a controller, wherein the method comprises: determining a destination switch for service migration when a flow table capacity of a source switch is greater than a specified threshold; when the flow table capacity of the source switch is greater than the specified threshold generating an equivalent flow entry that is equivalent to each initial flow entry of at least two initial flow entries stored in the source switch, and delivering each generated equivalent flow entry to the destination switch, wherein an equivalent flow entry that is equivalent to an initial flow entry is used by the destination switch to process a data packet that matches the initial flow entry and that is forwarded by the source switch, and a data packet processing result corresponding to the equivalent flow entry is the same as a data packet processing result corresponding to the initial flow entry; and when the flow table capacity of the source switch is greater than the specified threshold generating an aggregated flow entry by aggregating the at least two initial flow entries, and delivering the aggregated flow entry to the source switch, wherein the aggregated flow entry is used by the source switch to match, to the aggregated flow entry, a data packet that matches each initial flow entry of the at least two initial flow entries, and forward, to the destination switch, the data packet that match the aggregated flow entry, wherein the generating an aggregated flow entry by aggregating the at least two initial flow entries is specifically: generating, according to a specified match field, the aggregated flow entry by aggregating at least two initial flow entries that have a same match field. determining a destination switch for service migration when a flow table capacity of a source switch is greater than a specified threshold; when the flow table capacity of the source switch is greater than the specified threshold generating an equivalent flow entry that is equivalent to each initial flow entry of at least two initial flow entries stored in the source switch, and delivering each generated equivalent flow entry to the destination switch, wherein an equivalent flow entry that is equivalent to an initial flow entry is used by the destination switch to process a data packet that matches the initial flow entry and that is forwarded by the source switch, and a data packet processing result corresponding to the equivalent flow entry is the same as a data packet processing result corresponding to the initial flow entry; and when the flow table capacity of the source switch is greater than the specified threshold generating an aggregated flow entry by aggregating the at least two initial flow entries, and delivering the aggregated flow entry to the source switch, wherein the aggregated flow entry is used by the source switch to match, to the aggregated flow entry, a data packet that matches each initial flow entry of the at least two initial flow entries, and forward, to the destination switch, the data packet that match the aggregated flow entry, wherein the generating an aggregated flow entry by aggregating the at least two initial flow entries is specifically: generating, according to a specified match field, the aggregated flow entry by aggregating at least two initial flow entries that have a same match field. generating, according to a specified match field, the aggregated flow entry by aggregating at least two initial flow entries that have a same match field.