计算机技术与发展
計算機技術與髮展
계산궤기술여발전
Computer Technology and Development
2015年
9期
123-128
,共6页
正则表达式%子集法%确定型有限自动机%并行%优化
正則錶達式%子集法%確定型有限自動機%併行%優化
정칙표체식%자집법%학정형유한자동궤%병행%우화
regular expression%subset construction algorithm%DFA%parallel%optimization
正则表达式匹配在网络安全领域具有重要地位。传统的正则表达式匹配引擎通常采用NFA和DFA,由于具有匹配性能高的特点,DFA成为深度报文检测( DPI)的首选。但是DFA的生成首先需要由正则表达式转换成NFA,再由NFA转换成DFA,这个过程称为正则表达式的编译,且是一个计算非常密集的行为。针对构建DFA过程中耗时过多的问题,在Michela Becchi实现的编译过程的基础上,提出了一种基于多核平台的多线程并行化执行的方案,来降低构建DFA消耗的时间。同时针对所使用正则表达式中不能识别尾锚的不足,增加尾锚处理流程,提高正则表达式匹配的准确性。实验结果表明,经并行优化,构建DFA过程的加速比达到2.3及以上,且添加的尾锚处理流程经验证是正确的。
正則錶達式匹配在網絡安全領域具有重要地位。傳統的正則錶達式匹配引擎通常採用NFA和DFA,由于具有匹配性能高的特點,DFA成為深度報文檢測( DPI)的首選。但是DFA的生成首先需要由正則錶達式轉換成NFA,再由NFA轉換成DFA,這箇過程稱為正則錶達式的編譯,且是一箇計算非常密集的行為。針對構建DFA過程中耗時過多的問題,在Michela Becchi實現的編譯過程的基礎上,提齣瞭一種基于多覈平檯的多線程併行化執行的方案,來降低構建DFA消耗的時間。同時針對所使用正則錶達式中不能識彆尾錨的不足,增加尾錨處理流程,提高正則錶達式匹配的準確性。實驗結果錶明,經併行優化,構建DFA過程的加速比達到2.3及以上,且添加的尾錨處理流程經驗證是正確的。
정칙표체식필배재망락안전영역구유중요지위。전통적정칙표체식필배인경통상채용NFA화DFA,유우구유필배성능고적특점,DFA성위심도보문검측( DPI)적수선。단시DFA적생성수선수요유정칙표체식전환성NFA,재유NFA전환성DFA,저개과정칭위정칙표체식적편역,차시일개계산비상밀집적행위。침대구건DFA과정중모시과다적문제,재Michela Becchi실현적편역과정적기출상,제출료일충기우다핵평태적다선정병행화집행적방안,래강저구건DFA소모적시간。동시침대소사용정칙표체식중불능식별미묘적불족,증가미묘처리류정,제고정칙표체식필배적준학성。실험결과표명,경병행우화,구건DFA과정적가속비체도2.3급이상,차첨가적미묘처리류정경험증시정학적。
Regular expression matching plays an important role in network security domain. Traditionally,NFA and DFA could be used in regular expression matching. As DFA has the characteristic of high throughput,it becomes the preferred option of Deep Packet Inspection ( DPI) . However,DFA construction needs a compilation,which first converts regular expressions into NFA,and NFA is then used to con-struct DFA. The compilation process is a computation-intensive behavior. In this paper,the most time-consuming process of the construc-tion of DFA is researched. Based on the previous works of Michela Becchi,propose a multi-thread parallel strategy to reduce time-cost in the compilation process on the multi-core platform. In addition,the function of tail anchor is added and the accuracy is proved,so that the regular expression matching engine can deal with tail anchor. The experimental results show that the compiling process can be accelerated by 2. 3 times with parallel optimization.