The present invention relates to a data
packet classification method based on multiple decision trees, and belongs to the field of communication technology. The present invention divides a rule set input by a user into multiple sub-
rule sets according to the dimensional wildcard number; merges the sub-
rule sets according to the sub-rule set merging method when creating multiple decision trees; creates decision trees respectively according to the merged
rule sets; if a
decision tree fails to be created, the created
decision tree is released, and then a new rule set is combined using a secondary or alternative solution; after multiple decision trees are successfully created, the sum of the RAM occupied by each tree is calculated, and the comparison is made to see whether it exceeds a threshold; if it exceeds, the created
decision tree is released, and then a new rule set is combined using a secondary or alternative solution; otherwise, the information of multiple decision trees is sent to FPGA, and the
processing of multiple trees ends. The present invention adopts a multiple-tree method, and the decision tree creation time is greatly reduced, the number of rule replications can be effectively reduced, the corresponding logic resources can be reduced, and the
processing delay can be reduced.