Content search mechanism that uses a deterministic finite automata (DFA) graph, a DFA state machine, and a walker process
First Claim
1. A network services processor comprising:
- at least one processor configured to search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions describing patterns for the search; and
at least one memory operatively coupled to the at least one processor and configured to store the generated data structure, the generated data structure including at least one node having an intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and to qualify validity of the match, of the at least one pattern in the input stream, determined at the at least one node, by comparing at least one offset, of at least one character of the at least one pattern matching in the input stream, to a given range limit, wherein the generated data structure is a Deterministic Finite Automata (DFA) graph.
8 Assignments
0 Petitions
Accused Products
Abstract
An improved content search mechanism uses a graph that includes intelligent nodes avoids the overhead of post processing and improves the overall performance of a content processing application. An intelligent node is similar to a node in a DFA graph but includes a command. The command in the intelligent node allows additional state for the node to be generated and checked. This additional state allows the content search mechanism to traverse the same node with two different interpretations. By generating state for the node, the graph of nodes does not become exponential. It also allows a user function to be called upon reaching a node, which can perform any desired user tasks, including modifying the input data or position.
-
Citations
30 Claims
-
1. A network services processor comprising:
-
at least one processor configured to search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions describing patterns for the search; and at least one memory operatively coupled to the at least one processor and configured to store the generated data structure, the generated data structure including at least one node having an intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and to qualify validity of the match, of the at least one pattern in the input stream, determined at the at least one node, by comparing at least one offset, of at least one character of the at least one pattern matching in the input stream, to a given range limit, wherein the generated data structure is a Deterministic Finite Automata (DFA) graph. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method comprising:
-
parsing one or more regular expressions describing patterns for searching an input stream for at least one pattern; generating a data structure, from the one or more regular expressions parsed, to enable a search, by at least one processor, for a match of the at least one pattern in the input stream, by traversing, with characters from the input stream, the data structure generated; including at least one node having an intelligent node structure in the data structure generated, the intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and to qualify the match, of the at least one pattern in the input stream, determined at the intelligent node, by comparing at least one offset, of at least one character of the at least one pattern in the input stream, to a given range limit; and storing the data structure generated in at least one memory operatively coupled to the at least one processor, wherein the data structure generated is a Deterministic Finite Automata (DFA) graph. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A non-transitory computer-readable medium having stored thereon a sequence of instructions which, when loaded and executed by a processor, causes the processor to:
search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions including at least one pattern, the generated data structure including at least one node having an intelligent node structure including information to direct the at least one processor, based on a match result of a given character of the input stream at the at least one node, to traverse to a next node and to perform at least one task upon reaching the at least one node and to qualify validity of the match, of the at least one pattern in the input stream, determined at the at least one node, by comparing at least one offset, of at least one character of the at least one pattern matching in the input stream, to a given range limit, wherein the data structure generated is a Deterministic Finite Automata (DFA) graph.
-
24. A non-transitory computer-readable medium having stored thereon a sequence of instructions which, when loaded and executed by a processor, causes the processor to:
-
parse one or more regular expressions describing patterns for searching an input stream for at least one pattern; generate a data structure, from the one or more regular expressions parsed, to enable a search, by at least one processor, for a match of the at least one pattern in the input stream, by traversing, with characters from the input stream, the data structure generated; include at least one node having an intelligent node structure in the data structure generated, the intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and to qualify validity of the match, of the at least one pattern in the input stream, determined at the at least one node, by comparing at least one offset, of at least one character of the at least one pattern matching in the input stream, to a given range limit; and store the data structure generated in at least one memory operatively coupled to the at least one processor, wherein the data structure generated is a Deterministic Finite Automata (DFA) graph.
-
-
25. A network services processor comprising:
-
at least one processor configured to search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions describing patterns for the search; and at least one memory operatively coupled to the at least one processor and configured to store the generated data structure, the generated data structure including at least one node having an intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node by storing commands packed as a stream of instructions representing commands for interpretation by a walker process being executed by the at least one processor for the traversing, by storing commands compiled into processor-native binaries for direct execution by the at least one processor as a subroutine in the walker process, or by storing a combination thereof.
-
-
26. A network services processor comprising:
-
at least one processor configured to search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions describing patterns for the search; and at least one memory operatively coupled to the at least one processor and configured to store the generated data structure, the generated data structure including at least one node having an intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node, wherein the intelligent node structure enables storing of offsets of characters in the input stream to enable determination and reporting of a start or end offset of the at least one pattern matching in the input stream by a walker process executed by the at least one processor for the traversing.
-
-
27. A network services processor comprising:
-
at least one processor configured to search for a match of at least one pattern in an input stream by traversing a data structure generated from one or more regular expressions describing patterns for the search; and at least one memory operatively coupled to the at least one processor and configured to store the generated data structure, the generated data structure including at least one node having an intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node, wherein the intelligent node structure associates at least one command, with the at least one node, enabling the at least one processor to store a start offset, end offset, and identifier, associated with a regular expression of the one or more regular expressions, in a report data structure based on the at least one pattern matching in the input stream upon reaching the at least one node.
-
-
28. A method comprising:
-
parsing one or more regular expressions describing patterns for searching an input stream for at least one pattern; generating a data structure, from the one or more regular expressions parsed, to enable a search, by at least one processor, for a match of the at least one pattern in the input stream, by traversing, with characters from the input stream, the data structure generated; including at least one node having an intelligent node structure in the data structure generated, the intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node by storing commands packed as a stream of instructions representing commands for interpretation by a walker process being executed by the at least one processor for the traversing, by storing commands compiled into processor-native binaries for direct execution by the at least one processor as a subroutine in the walker process, or by storing a combination thereof; and storing the data structure generated in at least one memory operatively coupled to the at least one processor.
-
-
29. A method comprising:
-
parsing one or more regular expressions describing patterns for searching an input stream for at least one pattern; generating a data structure, from the one or more regular expressions parsed, to enable a search, by at least one processor, for a match of the at least one pattern in the input stream, by traversing, with characters from the input stream, the data structure generated; including at least one node having an intelligent node structure in the data structure generated, the intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and wherein the intelligent node structure enables storing of offsets of characters in the input stream to enable determination and reporting of a start or end offset of the at least one pattern matching in the input stream by a walker process executed by the at least one processor for the traversing; and storing the data structure generated in at least one memory operatively coupled to the at least one processor.
-
-
30. A method comprising:
-
parsing one or more regular expressions describing patterns for searching an input stream for at least one pattern; generating a data structure, from the one or more regular expressions parsed, to enable a search, by at least one processor, for a match of the at least one pattern in the input stream, by traversing, with characters from the input stream, the data structure generated; including at least one node having an intelligent node structure in the data structure generated, the intelligent node structure providing information on a next node to traverse and enabling the at least one processor to perform at least one task upon reaching the at least one node and wherein the intelligent node structure associates at least one command, with the at least one node, enabling the at least one processor to store a start offset, end offset, and identifier, associated with a regular expression of the one or more regular expressions, in a report data structure based on the at least one pattern matching in the input stream upon reaching the at least one node; and storing the data structure generated in at least one memory operatively coupled to the at least one processor.
-
Specification