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

计算机工程

• 人工智能及识别技术 • 上一篇    下一篇

基于非对齐双字节读机制的单模式串匹配算法

张 建 ,2,范洪博1,2,黄青松1,2,刘利军1   

  1. (1. 昆明理工大学信息工程与自动化学院,昆明 650000;2. 云南省计算机技术应用重点实验室,昆明 650000)
  • 收稿日期:2012-10-22 出版日期:2013-12-15 发布日期:2013-12-13
  • 作者简介:张 建(1987-),男,硕士研究生,主研方向:智能信息系统;范洪博,讲师、博士;黄青松,教授;刘利军,讲师、硕士
  • 基金资助:
    云南省科技厅应用基础研究基金资助面上项目(2012FB131);昆明理工大学人陪基金资助项目(KKSY201203091);云南省社会发展科技计划基金资助项目(2010CA016);科技部科技型中小企业技术创新基金资助项目(10C26215305130)

Single Pattern String Matching Algorithm Based on Unaligned 2-byte Reading Mechanism

ZHANG Jian 1,2, FAN Hong-bo 1,2, HUANG Qing-song 1,2, LIU Li-jun 1   

  1. (1. Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650000, China; 2. Yunnan Key Laboratory of Computer Technology Applications, Kunming 650000, China)
  • Received:2012-10-22 Online:2013-12-15 Published:2013-12-13

摘要: 在线精确单模式匹配问题在几乎所有涉及文本和符号处理的领域中均有广泛应用。SBNDMq是目前该领域性能最高的算法之一。通过向其引入非对齐双字节读机制,对SBNDMq算法进行改进,从而提出SBNDMq_Shortb系列算法。该系列算法拥有与SBNDMq算法一致的跳跃能力,但核心循环的内存访问次数降低为原来的50%,算法性能更高。实验结果表明,在大多匹配条件下,SBNDMq_Shortb系列算法性能优于其他已知算法。

关键词: 串匹配, 精确单模式, 算法设计, 位并行, 非对齐读, SBNDMq_Shortb算法

Abstract: Online exact single pattern string matching is widely used in almost all of fields involving text and symbol processing. SBNDMq is one of the fastest algorithms in this field. By introducing the unaligned 2-byte reading, SBNDMq is improved and a serial of algorithm named SBNDMq_Shortb is presented. The jump capability of this algorithm is same with SBNDMq, but the memory access reduces 50%. Thus, this algorithm is faster than SBNDMq. Experimental results show that SBNDMq_Shortb is faster than other well- known algorithms in many matching conditions on the platform.

Key words: string matching, exact single pattern, design of algorithms, bit-parallel, unaligned reading, SBNDMq_Shortb algorithm

中图分类号: