Exploring efficient grouping algorithms in regular expression matching.

BACKGROUND:Regular expression matching (REM) is widely employed as the major tool for deep packet inspection (DPI) applications. For automatic processing, the regular expression patterns need to be converted to a deterministic finite automata (DFA). However, with the ever-increasing scale and comple...

Full description

Bibliographic Details
Main Authors: Chengcheng Xu, Jinshu Su, Shuhui Chen
Format: Article
Language:English
Published: Public Library of Science (PLoS) 2018-01-01
Series:PLoS ONE
Online Access:http://europepmc.org/articles/PMC6200238?pdf=render
_version_ 1828158063728656384
author Chengcheng Xu
Jinshu Su
Shuhui Chen
author_facet Chengcheng Xu
Jinshu Su
Shuhui Chen
author_sort Chengcheng Xu
collection DOAJ
description BACKGROUND:Regular expression matching (REM) is widely employed as the major tool for deep packet inspection (DPI) applications. For automatic processing, the regular expression patterns need to be converted to a deterministic finite automata (DFA). However, with the ever-increasing scale and complexity of pattern sets, state explosion problem has brought a great challenge to the DFA based regular expression matching. Rule grouping is a direct method to solve the state explosion problem. The original rule set is divided into multiple disjoint groups, and each group is compiled to a separate DFA, thus to significantly restrain the severe state explosion problem when compiling all the rules to a single DFA. OBJECTIVE:For practical implementation, the total number of DFA states should be as few as possible, thus the data structures of these DFAs can be deployed on fast on-chip memories for rapid access. In addition, to support fast pattern update in some applications, the time cost for grouping should be as small as possible. In this study, we aimed to propose an efficient grouping method, which generates as few states as possible with as little time overhead as possible. METHODS:When compiling multiple patterns into a single DFA, the number of DFA states is usually greater than the total number of states when compiling each pattern to a separate DFA. This is mainly caused by the semantic overlaps among different rules. By quantifying the interaction values for each pair of rules, the rule grouping problem can be reduced to the maximum k-cut graph partitioning problem. Then, we propose a heuristic algorithm called the one-step greedy (OSG) algorithm to solve this NP-hard problem. What's more, a subroutine named the heuristic initialization (HI) algorithm is devised to further optimize the grouping algorithms. RESULTS:We employed three practical rule sets for the experimental evaluation. Results show that the OSG algorithm outperforms the state-of-the-art grouping solutions regarding both the total number of DFA states and time cost for grouping. The HI subroutine also demonstrates its significant optimization effect on the grouping algorithms. CONCLUSIONS:The DFA state explosion problem has became the most challenging issue in the regular expression matching applications. Rule grouping is a practical direction by dividing the original rule sets into multiple disjoint groups. In this paper, we investigate the current grouping solutions, and propose a compact and efficient grouping algorithm. Experiments conducted on practical rule sets demonstrate the superiority of our proposal.
first_indexed 2024-04-11T23:38:11Z
format Article
id doaj.art-8d59d6eb45db48df900823122142411e
institution Directory Open Access Journal
issn 1932-6203
language English
last_indexed 2024-04-11T23:38:11Z
publishDate 2018-01-01
publisher Public Library of Science (PLoS)
record_format Article
series PLoS ONE
spelling doaj.art-8d59d6eb45db48df900823122142411e2022-12-22T03:56:53ZengPublic Library of Science (PLoS)PLoS ONE1932-62032018-01-011310e020606810.1371/journal.pone.0206068Exploring efficient grouping algorithms in regular expression matching.Chengcheng XuJinshu SuShuhui ChenBACKGROUND:Regular expression matching (REM) is widely employed as the major tool for deep packet inspection (DPI) applications. For automatic processing, the regular expression patterns need to be converted to a deterministic finite automata (DFA). However, with the ever-increasing scale and complexity of pattern sets, state explosion problem has brought a great challenge to the DFA based regular expression matching. Rule grouping is a direct method to solve the state explosion problem. The original rule set is divided into multiple disjoint groups, and each group is compiled to a separate DFA, thus to significantly restrain the severe state explosion problem when compiling all the rules to a single DFA. OBJECTIVE:For practical implementation, the total number of DFA states should be as few as possible, thus the data structures of these DFAs can be deployed on fast on-chip memories for rapid access. In addition, to support fast pattern update in some applications, the time cost for grouping should be as small as possible. In this study, we aimed to propose an efficient grouping method, which generates as few states as possible with as little time overhead as possible. METHODS:When compiling multiple patterns into a single DFA, the number of DFA states is usually greater than the total number of states when compiling each pattern to a separate DFA. This is mainly caused by the semantic overlaps among different rules. By quantifying the interaction values for each pair of rules, the rule grouping problem can be reduced to the maximum k-cut graph partitioning problem. Then, we propose a heuristic algorithm called the one-step greedy (OSG) algorithm to solve this NP-hard problem. What's more, a subroutine named the heuristic initialization (HI) algorithm is devised to further optimize the grouping algorithms. RESULTS:We employed three practical rule sets for the experimental evaluation. Results show that the OSG algorithm outperforms the state-of-the-art grouping solutions regarding both the total number of DFA states and time cost for grouping. The HI subroutine also demonstrates its significant optimization effect on the grouping algorithms. CONCLUSIONS:The DFA state explosion problem has became the most challenging issue in the regular expression matching applications. Rule grouping is a practical direction by dividing the original rule sets into multiple disjoint groups. In this paper, we investigate the current grouping solutions, and propose a compact and efficient grouping algorithm. Experiments conducted on practical rule sets demonstrate the superiority of our proposal.http://europepmc.org/articles/PMC6200238?pdf=render
spellingShingle Chengcheng Xu
Jinshu Su
Shuhui Chen
Exploring efficient grouping algorithms in regular expression matching.
PLoS ONE
title Exploring efficient grouping algorithms in regular expression matching.
title_full Exploring efficient grouping algorithms in regular expression matching.
title_fullStr Exploring efficient grouping algorithms in regular expression matching.
title_full_unstemmed Exploring efficient grouping algorithms in regular expression matching.
title_short Exploring efficient grouping algorithms in regular expression matching.
title_sort exploring efficient grouping algorithms in regular expression matching
url http://europepmc.org/articles/PMC6200238?pdf=render
work_keys_str_mv AT chengchengxu exploringefficientgroupingalgorithmsinregularexpressionmatching
AT jinshusu exploringefficientgroupingalgorithmsinregularexpressionmatching
AT shuhuichen exploringefficientgroupingalgorithmsinregularexpressionmatching