BF模式匹配算法的改进  被引量:5

Improvement of BF Pattern Matching Algorithm

在线阅读下载全文

作  者:巫喜红[1] 文张斌 Wu Xihong 1,Wen Zhangbin 2(1.School of Computing, Jiaying University, Meizhou 514015, China;2.Guangdong Ji Tong Information Development Co.,LTD., Guangzhou 510000, Chin)

机构地区:[1]嘉应学院计算机学院,广东梅州514015 [2]广东暨通信息发展有限公司,广东广州510000

出  处:《计算机测量与控制》2018年第5期173-176,共4页Computer Measurement &Control

基  金:2013年广东省科技计划项目(2013B040500010);2014年度广东省科技前沿与关键技术创新专项(2014B010117002);2016年广东省重点平台及科研项目(2016KTSCX129);2016年嘉应学院自然科学重点项目(2016KJZ04)

摘  要:文章分析经典的BF算法及其改进方法,根据字符串匹配的特点对BF算法提出了新的改进算法I_BF算法;I_BF算法根据模式串的首字符与匹配窗口之间的距离来确定右移距离,从而进行快速地匹配,匹配方式是从左往右进行;为了测试I_BF算法的性能,在相同条件下,从匹配字符个数、匹配次数、所花时间三方面对I_BF算法进行实验;结果表明,由于I_BF算法能够很大程序地跳过坏字符,减少匹配次数和字符比较个数,节约匹配时间,从而有效地提高匹配速度。In this paper,the classical BF algorithm and its improved method are analyzed.According to the characteristics of string matching,a new improved algorithm I_BF algorithm for BF algorithm is proposed.The I_BF algorithm determines the right distance according to the first character of the pattern string and the distance between the matching windows,so it fasts matching.The matching way of I_BF algorithm is from left to right.In order to test the performance of the I_BF algorithm,the I_BF algorithm is tested under the same conditions from three aspects:the number of characters,the number of matches and the time spent.The experimental results show the I_BF algorithm is more quickly and more efficient because it reduces greatly the number of matching and character comparison for maximizing to skip the bad characters.

关 键 词:BF算法 I_BF算法 首字符 模式匹配 改进 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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