一种快速的多模式字符串匹配算法  被引量:29

A Fast Algorithm for Matching Multiple Patterns

在线阅读下载全文

作  者:许一震[1] 王永成[1] 沈洲[1] 

机构地区:[1]上海交通大学计算机科学与工程系,上海200030

出  处:《上海交通大学学报》2002年第4期516-520,共5页Journal of Shanghai Jiaotong University

基  金:国家"8 6 3"计划资助项目 ( 86 3-30 6 -ZD0 3-0 4-1)

摘  要:以基于有限自动机的多模式匹配算法 (DFSA)为基础 ,结合 Boyer- Moore(BM)和 QuickSearch (QS)快速单模式匹配算法的优点 ,提出了一种快速的多模式字符串匹配算法 .在一般情况下 ,该算法不需要匹配目标文本串中的每个字符 ,能充分利用匹配过程中本次匹配不成功的信息和已经匹配成功的信息 ,跳过尽可能多的字符 .实验表明 ,模式串较短时 ,本算法所需时间为 DFSA算法的 1 /2~ 1 /3 ;模式串较长时 ,其所需时间为 DFSA算法的 1 /3~ 1A fast algorithm to perform multiple patterns match in a string was described. The proposed match algorithm is based on the concept of deterministic finite state automata (DFSA), combining the advantages of Boyer Moore's algorithm and Quick Search algorithm, the two fast algorithms for single pattern matching. In general, it does not need inspect each character of the string. It skips as many characters as possible by making full use of the succeeded match information and failure information during the matching. The proposed algorithm achieves excellent performance in the cases of both short patterns and long patterns. The actual experiments show that in the case of short patterns the time it takes to search a string is 1/2~1/3 of the time DFSA method takes, and in the case of long patterns the time is only 1/3~1/5 of the time by DFSA method.

关 键 词:字符串 算法 有限自动机 多模式匹配 信息处理 

分 类 号:TP391.1[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象