Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Efficient Regular Expressions Compression Algorithm From A New Perspective  Author: Tingwen Liu, Yifu Yang, Yanbing Liu, Yong Sun, Li Guo  Publisher:

Similar presentations


Presentation on theme: "An Efficient Regular Expressions Compression Algorithm From A New Perspective  Author: Tingwen Liu, Yifu Yang, Yanbing Liu, Yong Sun, Li Guo  Publisher:"— Presentation transcript:

1 An Efficient Regular Expressions Compression Algorithm From A New Perspective  Author: Tingwen Liu, Yifu Yang, Yanbing Liu, Yong Sun, Li Guo  Publisher: INFOCOM, 2011  Presenter: Yuen-Shuo Li  Date: 2013/02/27 1

2 Background  Deep packet inspection (DPI) is widely recognized as a powerful and important technology used in network security and application-specific services.  e.g. Firewalls, traffic monitoring, packet classifier.  Currently, regular expressions are replacing exact strings to describe patterns in most popular software tools, because their expressive power, simplicity and flexibility for expressing signatures. 2

3 About DFA Deterministic Finite Automata (DFA) and Nondeterministic Finite Automata (NFA) are two classical equivalent representation of regular expressions. DFA is the preferred representation to perform deep packet inspection in high- speed network environments.  it triggers only one state transition (one corresponding memory access) for each input symbol processed  it is possible to compile multiple regular expressions into a composite DFA which can inspect the input in a single pass. 3

4 About DFA Unfortunately, the use of DFAs demand for a large memory space to store state transition tables for current sets of regular expressions. 4 Big

5 Our goal In this paper, we focus on reducing memory usage of composite DFAs by compressing transitions. 5

6 CSCA  We introduce a new method, named Cluster-based Splitting Compression Algoriithm(CSCA)

7 get a unique determinate trie-tree after traversing DFA by level, if we stipulate that we traverse the son states by the label character from small to large. 7 7

8 Cluster In the trie-tree, if state r has a transition to state s, we call r the father state of s. Conversely s is the son state of r. A states set is called a cluster if it is composed of all son states of a certain state. 8

9 We divided all the transitions and store them into three different matrixes T1, T2, T3. 9 sparse matrix

10 Combinative Row  In matrix M (M is T1 or T2), for row s, if there is a row r which  M[r, c] = X or M[s, c] = X  M[r, c] = M[s, c],  we say that row r is a combinative row of row s. 10 StateAB^ 0X34 12X4

11 If rows r and s are combinative row, we process them according to the rules as follows:  for character c,  if M[s, c] = X, reset M[s, c] = M[r, c]  if M[s, c] = M[r, c] or M[r, c] = X, keep M[s, c] unchanged 11 StateAB^ 0X34 12X4 AB^ 0234

12  find base 12 StateAB^ 0X23 13X4 AB^Base 0X012 10X13 combinative row

13  add a new index array equal, and set equal[r] = s, meaning that row r now equals with row s, and we can get the value of row r from row s equally  delete row r in matrix M. 13 StateAB^Base 0X012 10X13 StateAB^Baseequal 0X0120 30

14  The main idea of compressing matrixes T1 and T2 is: convert the matrix into an offset matrix, which can generate many combinative rows, and then merge them in order to reduce memory usage. 14 T3 is a sparse, in this paper we do not discuss how to compress it.

15  The lookup function need to decide which matrix the next state is in first, so we add two bitmaps to distinguish T1 and T2.  We can quickly get the information by adding two bitmaps to distinguish three parts. 15 T1 T3 T2

16  One advantage of our work is that it is orthogonal to many previous compression schemes.  Because our work focuses on utilizing the transition characteristic inside states and reducing memory usage by extracting the base value of each cluster, while previous schemes almost are based on the transition characteristic among states. 16

17 EXPERIMENT RESULTS Pattern sets 17

18 18 n : the row number of matrix T n1 (n2) :the row number of matrix R1(R2) R1(R2): offset matrixes base1(2): a int-type array equal1(2) : an array r: ratio of effective elements in T3

19  We extract base value for DFA matrixes of regular expression groups to get the corresponding offset-matrixes, and then we compress DFA matrixes and offset-matrixes with previous compression schemes.  The result is shown in Table V, the value in which means the ratio of effect transitions after compressing DFAs. 19

20 20


Download ppt "An Efficient Regular Expressions Compression Algorithm From A New Perspective  Author: Tingwen Liu, Yifu Yang, Yanbing Liu, Yong Sun, Li Guo  Publisher:"

Similar presentations


Ads by Google