A method for packet classification, including: cyclically splitting an initial rule set to generate a plurality of rule subsets; and performing tree building for each of the rule subsets to obtain a plurality of decision trees for packet classification, wherein there is a one-to-one correspondence between the decision trees and the rule subsets, wherein, cyclically splitting the initial rule set includes: selecting a target rule set from a rule set group, wherein the rule set group includes the initial rule set before the cyclic splitting and will include the plurality of rule subsets after the cyclic splitting, the target rule set is a rule set having a highest global average overlap rate in the rule set group, the global average overlap rate being an average of average overlap rates in all dimensions of the target rule; splitting the target rule set according to a split point to obtain two rule subsets having different global average overlap rates, and adding the two rule subsets into the rule set group to replace the target rule set, and continuing to select a new target rule set from the rule set group, until the number of rule sets in the rule set group reaches a preset number; wherein performing the tree building for each of the rule subsets, includes: cutting the rule subset using a fast tree building algorithm, until each of subsets obtained by the cutting has one cut section in any dimension, wherein, the fast tree building algorithm includes: selecting a dimension having the greatest number of cut point values as a cut dimension; selecting a cut point value in the middle of all the cut point values in the cut dimension as a target cut point value; and cutting the rule subset to obtain two subsets according to the cut dimension and the target cut point value. cyclically splitting an initial rule set to generate a plurality of rule subsets; and performing tree building for each of the rule subsets to obtain a plurality of decision trees for packet classification, wherein there is a one-to-one correspondence between the decision trees and the rule subsets, wherein, cyclically splitting the initial rule set includes: selecting a target rule set from a rule set group, wherein the rule set group includes the initial rule set before the cyclic splitting and will include the plurality of rule subsets after the cyclic splitting, the target rule set is a rule set having a highest global average overlap rate in the rule set group, the global average overlap rate being an average of average overlap rates in all dimensions of the target rule; splitting the target rule set according to a split point to obtain two rule subsets having different global average overlap rates, and adding the two rule subsets into the rule set group to replace the target rule set, and continuing to select a new target rule set from the rule set group, until the number of rule sets in the rule set group reaches a preset number; selecting a target rule set from a rule set group, wherein the rule set group includes the initial rule set before the cyclic splitting and will include the plurality of rule subsets after the cyclic splitting, the target rule set is a rule set having a highest global average overlap rate in the rule set group, the global average overlap rate being an average of average overlap rates in all dimensions of the target rule; splitting the target rule set according to a split point to obtain two rule subsets having different global average overlap rates, and adding the two rule subsets into the rule set group to replace the target rule set, and continuing to select a new target rule set from the rule set group, until the number of rule sets in the rule set group reaches a preset number; wherein performing the tree building for each of the rule subsets, includes: cutting the rule subset using a fast tree building algorithm, until each of subsets obtained by the cutting has one cut section in any dimension, wherein, the fast tree building algorithm includes: selecting a dimension having the greatest number of cut point values as a cut dimension; selecting a cut point value in the middle of all the cut point values in the cut dimension as a target cut point value; and cutting the rule subset to obtain two subsets according to the cut dimension and the target cut point value. selecting a dimension having the greatest number of cut point values as a cut dimension; selecting a cut point value in the middle of all the cut point values in the cut dimension as a target cut point value; and cutting the rule subset to obtain two subsets according to the cut dimension and the target cut point value.