Computer Engineering and Applications ›› 2009, Vol. 45 ›› Issue (11): 114-116.DOI: 10.3778/j.issn.1002-8331.2009.11.035

• 网络、通信、安全 • Previous Articles     Next Articles

High efficiency regular matching searching algorithm for mass information in embedding system

WANG Yan,LI Jin-yao,YOU Fu-cheng   

  1. College of Information & Mechanical Engineering,Beijing Institute of Graphic Communication,Beijing 102600,China
  • Received:2008-02-20 Revised:2008-06-02 Online:2009-04-11 Published:2009-04-11
  • Contact: WANG Yan

嵌入式系统的海量信息高效正则匹配算法

王 燕,李晋尧,游福成   

  1. 北京印刷学院 信息与机电工程学院,北京 102600
  • 通讯作者: 王 燕

Abstract: For limited by the source of software and hardware about embedded system,for the mass route’s regular matching seeking,it is existed popularly the problem of processing efficiency’s lowing among all kinds of network business.This paper’s order is to research a mass route information searching technology fitting the grammar of regular matching,which is used in real-time embedded software.The keyword of this paper’s algorithm of high efficiency regular matching searching is to decrease the route searching field of this regular searching.So it is necessary to found a fast index structure using data.Firstly,it is assure the smaller field of fitting part of regular matching abstract,then it is accurately regular matching for each router in this small field,so that it is assuring all routers according for the condition.The researching result shows that,the average searching time fasts 30 times for normal regular matching length whose length is between 10~30.Along with the improving of length of regular matching,the searching efficiency improves exponential classes.When using memory pattern recorded,the memory average is about 30% of total router memory space.So it is shown that,this paper uses mass router information as researching object,gives the data regular matching algorithm.It is idea not only in the time of index searching but also in the index information storage space.It is used in the method of mass information fast regular matching in embedding software system widely.

Key words: embedded system, mass information searching, regular matching searching

摘要: 受嵌入式系统的软硬件资源限制,目前在路由器中对于海量路由表的正则匹配查找,各大网络厂商普遍存在处理效率较低问题。目的是研究一种应用于实时嵌入式软件系统中,符合正则匹配语法的海量路由信息搜索技术。提供的高效正则匹配搜索算法的方法关键是减少正则匹配的路由搜索范围,为此需要建立一个以数字为索引的快速倒排索引结构。基于快速倒排索引结构,首先确定符合部分正则匹配摘要的路由较小范围,然后进一步对此小范围的每条路由进行精确正则匹配,以确定符合条件的所有路由。研究结果表明,对于一般正则匹配长度10~30的查找,平均查找时间快了约30倍,且随着正则匹配长度增加,查找效率呈指数级提高。当采用内存方式记录时,索引位置信息的内存平均约占总路由容量内存空间的3%。由此可见,以海量路由信息为研究对象,给出的数字正则匹配算法,不仅在索引搜索时间上而且在索引信息存储空间上都十分理想,可广泛应用于嵌入式软件系统中的海量信息快速正则匹配。

关键词: 嵌入式系统, 海量信息搜索, 正则匹配查找