摘要 |
Methods and devices for creating, compressing and searching a binary tree are provided by the present disclosure, which relates to the field of traffic classification. Binary tree compression includes: determining a number of a compression layer or a number of an intermediate node, compressing a binary tree according to the number of the compression layer or the number of the intermediate node to form at least one compression node, and creating a bitmap of the compression node. Therefore, the depth of the decision tree is reduced, the search speed is increased, rule expansion is avoided, and rule replication is reduced. |