The invention belongs to the field of computer networks, and discloses a
dynamic data packet classification method and
system based on a dictionary tree and a multilevel
decision tree, and the method comprises the steps: S1, constructing the dictionary tree for IP prefixes of all rules in a preprocessing stage of data
packet classification; s2, obtaining prefix huge
change points based on the dictionary tree; s3, dividing rule subsets based on the prefix huge
change points to obtain accurate rule subsets and complex rule subsets; s4, constructing a main
decision tree for the accurate rule subset; inputting the complex rule subset into Box for
processing; and S5, constructing a shadow tree or a shadow Box copy of the rule modification operation, and performing pointer replacement through a CAS atomic instruction. According to the method, structural layering, behavior driving and field decoupling are taken as a core design concept, rule pre-division, path structure optimization, update behavior
perception and an efficient matching mechanism are comprehensively integrated, and the problems of rule replication redundancy, low path efficiency, dynamic update response
lag and the like in data
packet classification are solved in a breakthrough manner.