计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (32): 108-111.

• 网络、通信、安全 • 上一篇    下一篇

对BM模式匹配算法的一种改进

王文鹏,黄 俊   

  1. 中国计量学院 信息工程学院,杭州 310018
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-11-11 发布日期:2011-11-11

Improved algorithm of BM for pattern matching

WANG Wenpeng,HUANG Jun   

  1. College of Information Engineering,China Jiliang University,Hangzhou 310018,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-11-11 Published:2011-11-11

摘要: 模式匹配在入侵检测系统中有着广泛的应用。在对BM以及相关算法分析的基础上,提出了一种基于BM算法的改进算法。该算法同时运用BMH和BMHS算法的思想对模式进行移动,并利用了模式串末字符与首字符的组合性,缩短了比较过程,有效地减少了匹配过程中的字符比较次数。实验证明,该算法具有高的匹配效率。

关键词: BM算法, 入侵检测, 网络安全, 模式匹配

Abstract: Pattern matching is used in intrusion detection system widely.On the base of analyzing BM algorithm and other algorithms,an improved algorithm of BM is presented.The algorithm uses the BMH algorithm and BMHS algorithm at one time and makes use of combination of the first character and last character of pattern to make the pattern shift.It decreases the time and times of character comparison in the matching process.Experimental data shows the improved algorithm can enhance the matching speed effectively.

Key words: BM algorithm, intrusion detection, network security, pattern matching