北京邮电大学学报

  • EI核心期刊

北京邮电大学学报 ›› 2007, Vol. 30 ›› Issue (6): 69-72.doi: 10.13190/jbupt.200706.69.weijzh

• 论文 • 上一篇    下一篇

用于检测过滤的多模式匹配

魏景芝,辛阳,杨义先,钮心忻   

  1. (北京邮电大学 网络与交换技术国家重点实验室信息安全中心,北京 100876
  • 收稿日期:2007-01-26 修回日期:2007-03-30 出版日期:2007-12-31 发布日期:2007-12-31
  • 通讯作者: 魏景芝

Multiple Patterns Matching for Filtering and Detection

WEI Jing-zhi, XIN Yang, YANG Yi-xian, NIU Xin-xin   

  1. (Information Security Center,State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China)
  • Received:2007-01-26 Revised:2007-03-30 Online:2007-12-31 Published:2007-12-31
  • Contact: WEI Jing-zhi

摘要:

针对目前匹配速率过慢的问题,在有限自动机的多模式匹配算法的基础上,结合Boyer-Moore(BM)算法和改进的quick search(QS)算法的优点,提出了一个快速的多模式字符串匹配算法。一般情况下该算法能充分利用匹配过程中本次匹配不成功的信息和已经匹配成功的信息,尽可能多地跳过待查文本串中的字符,所以不需要匹配目标文本串的每个字符就能一次性实现对文本的快速搜索。实验证明,在模式串较长和较短的情况下,算法都有很好的匹配性能,能有效改善关键字检测过滤系统的性能。

关键词: 多模式匹配, 有限自动机, 关键字检测过滤, 字符串

Abstract:

For the weakness of low string matching speed, a fast algorithm to perform multiple pattern matching in a string, based on finite state automaton combined with Boyer-Moore(BM) algorithm and an improved quick search(QS) algorithm, was presented. In general, the algorithm described does not need to test each character in the string. By making full use of the results of matching successes and failures, the algorithm can often bypass inspection of as many characters as possible and get all matching locations after one quick search. Experimental results demonstrate that the proposed algorithm has achieved excellent performance in the cases of both short patterns and long patterns and effectively improved the performance of keyword detection and filtering.

Key words: multiple pattern match, finite state automaton, keywords detection and filtering, string

中图分类号: