Finite Automata Walking for Wire-Speed Pattern Matching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current networking systems face challenges in processing and securing high-level network protocols (L4-L7) at wire-speed due to the limitations of general-purpose processors, particularly in content-aware applications like Intrusion Detection Systems that require complex pattern matching using regular expressions.
Innovation Solution
A method and apparatus that utilize finite automata, specifically non-deterministic finite automata (NFA) and deterministic finite automata (DFA), to efficiently search for regular expression patterns in input streams by configuring a security appliance with a processor and memory to walk the automaton segments of packets, optimizing processing cycles and reducing memory access through speculative processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If general purpose processors are used to process L4-L7 network protocols, then intelligent processing capability is improved, but processing speed deteriorates and cannot achieve wire-speed forwarding
Solution Approach 1:
The patent segments the pattern matching process into distinct phases: preprocessing the regular expression into a finite automaton (NFA/DFA), then executing the automaton in discrete steps by processing one input character per cycle. This segmentation allows the system to maintain intelligent processing capability while achieving high-speed wire-rate forwarding by breaking down complex pattern matching into simple, repeatable operations that can be efficiently executed on network processors.
2Reliability
If complex pattern matching is performed to detect all security breaches, then detection completeness is improved, but processing time increases and wire-speed forwarding is compromised
Solution Approach 1:
The patent applies preliminary action by preprocessing the regular expression patterns into finite automata (NFA or DFA) before the actual packet inspection occurs. This compilation phase creates optimized state transition structures that can be rapidly executed during packet processing. By performing this complex pattern analysis in advance, the system achieves both complete security breach detection and wire-speed processing during actual network traffic inspection.
3Speed
If deterministic finite automata (DFA) are used for pattern matching, then processing speed is improved, but memory consumption increases due to the size of the DFA state transition table
Solution Approach 1:
The patent applies parameter changes by allowing the system to switch between different automaton types (NFA or DFA) and by optimizing the state transition representation. The compiler can generate NFAs that use less memory but require more processing steps, or DFAs that use more memory but execute faster. This flexibility in parameter selection allows the system to adapt to different hardware constraints and performance requirements, balancing memory consumption against processing speed.
4Quantity of substance
If non-deterministic finite automata (NFA) are used for pattern matching, then memory consumption is reduced, but processing speed deteriorates due to the need to explore multiple paths
Solution Approach 1:
The patent applies continuity of useful action by implementing efficient NFA execution that maintains multiple active state paths simultaneously without redundant processing. The system processes input characters and updates all active states in each cycle, ensuring that useful computation continues along every potential matching path. This approach minimizes memory consumption while maintaining processing speed by avoiding unnecessary state transitions and efficiently managing the set of active states throughout the pattern matching process.
Data Source
AI summary
A method, and corresponding apparatus and system are provided for optimizing matching at least one regular expression pattern in an input stream by walking at least one finite automaton in a speculative manner. The speculative manner may include iteratively walking at least two nodes of a given finite automaton, of the at least one finite automaton, in parallel, with a segment, at a current offset within a payload, of a packet in the input stream, based on positively matching the segment at a given node of the at least two nodes walked in parallel, the current offset being updated to a next offset per iteration.


