Methods and apparatus for detecting patterns in a data stream
First Claim
Patent Images
1. A method comprising:
- generating a prefix trie for a set of patterns;
generating a suffix trie for the set of patterns;
establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie;
detecting a prefix from a pattern of the set of patterns at an end of a data packet, the prefix corresponding to a node of the prefix trie; and
in response to detecting the prefix, storing data in association with a node of the suffix trie;
wherein;
the node of the suffix trie in association with which the data is stored corresponds to the node of the prefix trie which corresponds to the detected prefix; and
the stored data is indicative of a flow with which the data packet is associated.
1 Assignment
0 Petitions
Accused Products
Abstract
In some embodiments, a method includes generating a prefix trie for a set of patterns, generating a suffix trie for the set of patterns, and establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie. In some embodiments, a method includes adding a suffix to a suffix tree, so that the suffix (which is at least a portion of a pattern) is represented in the tree by a path that begins at a first node and ends at a second node, and associating with at least the first node and the second node a pattern identifier that identifies the pattern.
44 Citations
18 Claims
-
1. A method comprising:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a prefix from a pattern of the set of patterns at an end of a data packet, the prefix corresponding to a node of the prefix trie; and in response to detecting the prefix, storing data in association with a node of the suffix trie; wherein; the node of the suffix trie in association with which the data is stored corresponds to the node of the prefix trie which corresponds to the detected prefix; and the stored data is indicative of a flow with which the data packet is associated. - View Dependent Claims (2, 5)
-
-
3. A method comprising:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; and in response to detecting the suffix, storing data in association with a node of the prefix trie; wherein; the node of the prefix trie in association with which the data is stored corresponds to the node of the suffix trie which corresponds to the detected suffix; and the stored data is indicative of a flow with which the data packet is associated. - View Dependent Claims (4)
-
-
6. A method comprising:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; in response to detecting the suffix, determining whether data indicative of a flow with which the data packet is associated is stored in association with the node to which the suffix corresponds; and in response to the data indicative of the flow with which the data packet is associated being found stored in association with the node to which the suffix corresponds, indicating that the pattern is detected in the flow with which the data packet is associated.
-
-
7. An apparatus comprising:
-
a processor; and a memory in communication with the processor; the processor operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a prefix from a pattern of the set of patterns at an end of a data packet, the prefix corresponding to a node of the prefix trie; and store data, in response to detecting the prefix, in association with a node of the suffix trie; wherein; the node of the suffix trie in association with which the data is stored corresponds to the node of the prefix trie which corresponds to the detected prefix; and the stored data is indicative of a flow with which the data packet is associated. - View Dependent Claims (9)
-
-
8. An apparatus comprising:
-
a processor; and a memory in communication with the processor; the processor operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; and store data, in response to detecting the suffix, in association with a node of the prefix trie; wherein; the node of the prefix trie in association with which the data is stored corresponds to the node of the suffix trie which corresponds to the detected suffix; and the stored data is indicative of a flow with which the data packet is associated.
-
-
10. An apparatus comprising:
-
a processor; and a memory in communication with the processor; the processor operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; determine, in response to detecting the suffix, whether data indicative of a flow with which the data packet is associated is stored in association with the node to which the suffix corresponds; and indicate, in response to the data indicative of the flow with which the data packet is associated being found stored in association with the node to which the suffix corresponds, that the pattern is detected in the flow with which the data packet is associated.
-
-
11. A storage medium having stored thereon instructions that when executed by a machine result in the following:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a prefix from a pattern of the set of patterns at an end of a data packet, the prefix corresponding to a node of the prefix trie; and in response to detecting the prefix, storing data in association with a node of the suffix trie;
wherein;the node of the suffix trie in association with which the data is stored corresponds to the node of the prefix trie which corresponds to the detected prefix; and the stored data is indicative of a flow with which the data packet is associated. - View Dependent Claims (13)
-
-
12. A storage medium having stored thereon instructions that when executed by a machine result in the following:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; and in response to detecting the suffix, storing data in association with a node of the prefix trie;
wherein;the node of the prefix trie in association with which the data is stored corresponds to the node of the suffix trie which corresponds to the detected suffix; and the stored data is indicative of a flow with which the data packet is associated.
-
-
14. A storage medium having stored thereon instructions that when executed by a machine result in the following:
-
generating a prefix trie for a set of patterns; generating a suffix trie for the set of patterns; establishing respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detecting a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; in response to detecting the suffix, determining whether data indicative of a flow with which the data packet is associated is stored in association with the node to which the suffix corresponds; and in response to the data indicative of the flow with which the data packet is associated being found stored in association with the node to which the suffix corresponds, indicating that the pattern is detected in the flow with which the data packet is associated.
-
-
15. A system comprising:
-
a fabric interface chip; and a network processor coupled to the fabric interface chip; wherein the network processor includes; a processing unit; and a memory in communication with the processing unit; the processing unit operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a prefix from a pattern of the set of patterns at an end of a data packet, the prefix corresponding to a node of the prefix trie; and store data, in response to detecting the prefix, in association with a node of the suffix trie; wherein; the node of the suffix the in association with which the data is stored corresponds to the node of the prefix trie which corresponds to the detected prefix; and the stored data is indicative of a flow with which the data packet is associated. - View Dependent Claims (17)
-
-
16. A system comprising:
-
a fabric interface chip; and a network processor coupled to the fabric interface chip; wherein the network processor includes; a processing unit; and a memory in communication with the processing unit; the processing unit operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; and store data, in response to detecting the suffix, in association with a node of the prefix trie; wherein; the node of the prefix trie in association with which the data is stored corresponds to the node of the suffix trie which corresponds to the detected suffix; and the stored data is indicative of a flow with which the data packet is associated.
-
-
18. A system comprising:
-
a fabric interface chip; and a network processor coupled to the fabric interface chip; wherein the network processor includes; a processing unit; and a memory in communication with the processing unit; the processing unit operative to; generate a prefix trie for a set of patterns; generate a suffix trie for the set of patterns; establish respective links between nodes of the prefix trie and respective corresponding nodes of the suffix trie; detect a suffix from a pattern of the set of patterns at a beginning of a data packet, the suffix corresponding to a node of the suffix trie; determine, in response to detecting the suffix, whether data indicative of a flow with which the data packet is associated is stored in association with the node to which the suffix corresponds; and indicate, in response to the data indicative of the flow with which the data packet is associated being found stored in association with the node to which the suffix corresponds, that the pattern is detected in the flow with which the data packet is associated.
-
Specification