Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Finite automaton generating method of regular expression with wildcards

A finite automaton and expression technology, applied in the field of network intrusion detection, can solve the problems of consuming large compilation time, unable to support wildcards well, and long compilation time, so as to reduce the consumption of pre-compilation time and improve the efficiency of compilation. Efficiency, the effect of improving processing efficiency

Active Publication Date: 2015-03-11
FUZHOU BOKE WANGAN INFORMATION TECH CO LTD
View PDF2 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, NFA is called a non-deterministic finite state automaton, and DFA is called a deterministic finite automaton. NFA uses a backtracking mechanism, so it can support more wildcards, etc., but due to the backtracking mechanism, the efficiency is not high.
DFA adopts the state transfer method, which is very efficient and very suitable for intrusion detection methods with high performance requirements. However, DFA also has a defect that it cannot support wildcards well.
When DFA compiles regular expressions containing wildcards, the compilation time is very long, a large number of states will be generated, the host memory will be exhausted, and a large amount of compilation time will be consumed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Finite automaton generating method of regular expression with wildcards
  • Finite automaton generating method of regular expression with wildcards
  • Finite automaton generating method of regular expression with wildcards

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The technical solution of the present invention will be specifically described below in conjunction with the accompanying drawings.

[0027] The invention provides a method for generating a finite automaton with a wildcard regular expression, which is characterized in that it is implemented according to the following steps:

[0028] S1: Generate an abstract syntax tree T according to the regular expression with wildcards, and number each node of the abstract syntax tree T;

[0029] S2: Calculate the nullable (n) of each node and three position sets of each node according to the abstract syntax tree T generated in step S1, the position set corresponds to the set of node numbers in the syntax tree, wherein, nullable(n) indicates whether the subexpression represented by node n can be empty; the three position sets are respectively expressed as: firstpos(n), lastpos(n) and followpos(p), and firstpos(n) indicates the subexpression represented by node n The position set of t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a finite automaton generating method of a regular expression with wildcards. The finite automaton generating method is characterized in that the finite automaton generating method is realized in the following steps of S1 generating an abstract syntax tree according to the regular expression with the wildcards, and numbering each node of the abstract syntax tree; S2 calculating nullable (n) of each node and a three-position set of each node according to the abstract syntax tree; S3 using firstpos (n0) of a root node of the abstract syntax tree as a first state to be stored into a state set; traversing the state set, if a new state is generated in a traversing process, the new state is added in the state set, and a conversion relation is recorded; when each state is traversed, a following state of each character in the state is calculated and stored in the state set according to conditions. By using the finite automaton generating method of the regular expression with the wildcards, the compiling efficiency is effectively improved, and the memory consumption is reduced.

Description

technical field [0001] The invention relates to the technical field of network intrusion detection, in particular to a method for generating finite automata with wildcard regular expressions. Background technique [0002] Now that network intrusions are becoming more and more complex, the vulnerabilities in the network application layer have become the key attack targets of hackers. When using the vulnerabilities in the network application layer to attack, the attacker's data is hidden in the normal data channel. The state detection method allows normal channels to pass through, and it is difficult to detect such application layer attacks. Therefore, for application layer attack detection, it is generally necessary to check the data content in the network path to see if it has attack characteristics. Due to the high flexibility of regular expressions, in content-based detection methods, most attack rules are expressed by regular expressions. [0003] Wildcards are a very wi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44G06F21/55
Inventor 王琦刘坤朋张木连张冬青
Owner FUZHOU BOKE WANGAN INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products