A Novel Rule Matching Algorithm Based on Improved Twig Pattern
Yongwei Wang, Yunan Liu, Rongcai Zhao, Cheng Si, Shuai Liu · 2013
Current twig pattern matching algorithms are based on the preorder traversal, which leads to numerous redundant nodes. In this paper, a new rule matching algorithm based on the post-order-traversal twig pattern is proposed. In the new algorithm, Post-order traversal to the request tree is used which can promptly suspend the matching of redundant nodes. Analysis and experiments show that the new algorithm effectively reduces the scale of the output, decreases the elapsed time of matching, avoids lots of redundant paths and nodes and increases the efficiency of the rules matching.