作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (17): 42-44. doi: 10.3969/j.issn.1000-3428.2010.17.015

• 软件技术与数据库 • 上一篇    下一篇

基于有序二叉树的快速多模式字符串匹配算法

周 燕1,侯整风1,何 玲2   

  1. (1. 合肥工业大学计算机与信息学院,合肥 230009;2. 深圳金山信息安全技术有限公司,深圳 518057)
  • 出版日期:2010-09-05 发布日期:2010-09-02
  • 作者简介:周 燕(1985-),女,硕士研究生,主研方向:模式匹配,信息安全,计算机网络;侯整风,教授;何 玲,高级工程师
  • 基金资助:
    安徽省自然科学基金资助项目(090412051);广东省教育部产学研结合基金资助项目(2008B090500240)

Fast Multi-pattern String Matching Algorithm Based on Sequential Binary Tree

ZHOU Yan1, HOU Zheng-feng1, HE Ling2   

  1. (1. School of Computer and Information, Hefei University of Technology, Hefei 230009; 2. Shenzhen Kingsoft Information Security Technology Co., Ltd., Shenzhen 518057)
  • Online:2010-09-05 Published:2010-09-02

摘要: 将有序二叉树和QS算法相结合,提出一种快速多模式字符串匹配算法,实现在多模式匹配过程中不匹配字符的连续跳跃。为提高匹配速度,利用已匹配的字符串信息进行跳跃式的比较,避免文本扫描指针的回溯。实验结果表明,与SMA算法相比,该算法在预处理阶段构造速度和匹配速度更快,在模式串较长的情况下,性能更优越。

关键词: 有序二叉树, 多模式匹配, QS算法

Abstract: This paper combines sequential binary tree with Quick Search(QS) algorithm to propose a fast multi-pattern string matching algorithm, which achieves better performance by shifting unmatched characters continuously in the process of multi-pattern matching. It uses jump comparison with unmatched strings to enhance the speed and decrease character matching operations. Experimental results demonstrate that the algorithm constructs more quickly in preprocessing process and its search speed is higher than SMA algorithm. It achieves better performance in the cases of longer string patterns.

Key words: sequential binary tree, multi-pattern matching, Quick Search(QS) algorithm

中图分类号: