计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (29): 96-98.

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

Sunday字符串匹配算法的效率改进

徐 珊1,袁小坊1,王 东1,谢高岗2   

  1. 1.湖南大学 计算机与通信学院,长沙 410082
    2.中国科学院 计算技术研究所 网络技术研究中心,北京 100080
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-10-11 发布日期:2011-10-11

Approach to improve efficiency of famous Sunday string matching algorithm

XU Shan1,YUAN Xiaofang1,WANG Dong1,XIE Gaogang2   

  1. 1.School of Computer and Communication,Hunan University,Changsha 410082,China
    2.Institute of Computing Technology,Chinese Academy of Sciences,Beijing 100080,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-10-11 Published:2011-10-11

摘要: 字符串匹配算法一直是网络监测与审计方面的研究热点。介绍了几种经典的字符串匹配算法,提出了一种基于Sunday算法的改进算法RoSunday算法,该算法主要是在匹配开始前通过一个条件判断语句减少了无意义的匹配次数,提高了算法的执行速度。分析了改进后算法的性能,通过实验结果进一步证明了该算法的有效性。

关键词: Sunday, 模式匹配, 字符串, 算法

Abstract: String matching algorithm is a very important issue in network monitor and audit area.Several classical string matching algorithms are discussed,and a new algorithm named RoSunday based on Sunday algorithm is proposed.RoSunday algorithm adds a conditional statement before the starting of comparing to reduce the times of attempts and enhance the matching speed.The performance of this improved algorithm is analyzed.The experimental results prove the effectiveness of it.

Key words: Sunday, pattern matching, character string, algorithm