The present invention provides a rule set partitioning based packet
classification method for Internet. The method comprising: performing
Horizontal Cut for the rule set, determining the field for partitioning a
rule layer based on a target algorithm and selecting the partition manner
of the Horizontal Cut, performing Horizontal Cut according to the
selected partition manner of the Horizontal Cut, thereby obtaining more
than one rule layers, each rule layer being a Horizontal subset,
combining the rule layers to obtain a plurality of Horizontal subsets
according to the total number of the pre-designated Horizontal subsets
and a predefined principle, wherein the total number of said combined
plurality of Horizontal subsets equals to the total number of said
pre-designated Horizontal subsets; performing Vertical Cut in each of the
Horizontal subsets; then forming a Hash table that can index the Vertical
subsets, so that it can be used in a lookup; and realizing rule storage
in each Vertical subset respectively according to the target algorithm.