摘要
针对模式匹配中的单模式匹配算法,分析了其中性能较高的QS算法及其改进算法BMH2C算法的,结合QS算法和BMH2C算法,提出了一种改进的QS算法—基于一次判断双字符比较的模式匹配算法(SJDC算法),增大了匹配失败时的右移量,提高了匹配速度。本文最后对此算法利用不同的模式串进行了实验仿真,仿真结果表明,此算法有效地减少了模式串移动的次数,提高了模式匹配性能。
This paper studied the single pattern matching algorithm,and analyzed the QS algorithm and BMH2 C algorithm which has higher performance. The paper also proposed an improved QS algorithm——the Pattern matching algorithm based on single judgment and double character comparison( SJDC algorithm). The new algorithm increased the right shift distance when the matching failed. This algorithm also improved the matching speed. Finally,this algorithm is simulated by using different mode strings. Simulation results show that the proposed algorithm effectively reduced the movements number in the proceed of pattern matching,improved the speed of pattern matching.
出处
《科技通报》
2018年第4期240-242,261,共4页
Bulletin of Science and Technology