Method of a data range search with plural pre-set rules
First Claim
1. A search method implemented with a computer for finding a rule from a plurality of rules each having an associated range of data, said data having n bits and said method comprising the steps of:
- (a) dividing said n bits into a plurality of sub-keys each having at least one bit, and constructing a rule mapping table having a rule column for each rule of said plurality of rules, each rule column being formed by generating a first output table for a first sub-key, and an upper output table and a lower output table for each remaining sub-key according to the associated range of data of a corresponding rule; and
(b) dividing an input data into a plurality of input sub-keys for searching through said rule mapping table and determining rules that are satisfied with said input data, the first output table and upper and lower output tables in each rule column being addressed by said plurality of input sub-keys to determine if said input data satisfies a corresponding rule.
1 Assignment
0 Petitions
Accused Products
Abstract
A search method for a range search with a plurality of pre-set rules constructs a rule mapping table by dividing data associated with the rules into a plurality of sub-keys and generating output tables for each sub-key. A rule column is formed for a rule by following through each sub-key based on the associated range of data. A first output table for the first sub-key and upper and lower output tables are generated for each remaining sub-key. All the rule columns are arranged in parallel to form the rule mapping table. The method of search is accomplished by dividing an input data into a plurality of sub-keys and each sub-key is used to search through the rule mapping table for determining a rule that is satisfied with the input data. If multiple rules are satisfied, a priority encoder selects a highest priority rule as the search result.
38 Citations
13 Claims
-
1. A search method implemented with a computer for finding a rule from a plurality of rules each having an associated range of data, said data having n bits and said method comprising the steps of:
-
(a) dividing said n bits into a plurality of sub-keys each having at least one bit, and constructing a rule mapping table having a rule column for each rule of said plurality of rules, each rule column being formed by generating a first output table for a first sub-key, and an upper output table and a lower output table for each remaining sub-key according to the associated range of data of a corresponding rule; and
(b) dividing an input data into a plurality of input sub-keys for searching through said rule mapping table and determining rules that are satisfied with said input data, the first output table and upper and lower output tables in each rule column being addressed by said plurality of input sub-keys to determine if said input data satisfies a corresponding rule. - View Dependent Claims (2, 3)
-
-
4. A search method implemented with a computer for finding a rule from a plurality of rules each having an associated range of data, said data having n bits and said method comprising the steps of:
-
(a) dividing said n bits into a plurality of sub-keys each having at least one bit, and constructing a rule mapping table having a rule column for each rule of said plurality of rules, each rule column being formed by generating a first output table for a first sub-key, and an upper output table and a lower output table for each remaining sub-key according to the associated range of data of a corresponding rule; and
(b) dividing an input data into a plurality of input sub-keys for searching through said rule mapping table and determining rules that are satisfied with said input data, the first output table and upper and lower output tables in each rule column being addressed by said plurality of input sub-keys to determine if said input data satisfies a corresponding rule;
wherein in step (a) a rule column for a given rule is generated according to the steps of;
(a1) determining a start value and an end value from the range of data associated with said given rule and representing said start and end values as Start and End respectively;
(a2) filling each entry in a first output table of a first sub-key according to a first sub-key rule based on a smallest possible first key data Key_1_min, a largest possible first key data Key_1_max, Start and End;
(a3) filling each entry in an upper output table of a kth sub-key according to a kth sub-key upper table rule based on a smallest possible kth sub-key data Key_k_min, a largest possible kth sub-key data Key_k_max, Start and End;
(a4) filling each entry in a lower output table of a kth sub-key according to a kth sub-key lower table rule based on a smallest possible kth sub-key data Key_k_min, a largest possible kth sub-key data Key_k_max, Start and End;
(a5) repeating step (a3) and (a4) for all remaining sub-keys; and
(a6) arranging all output tables generated in steps (a2), (a3) and (a4) from top to bottom in the order of a first output table of a first sub-key, an upper output table of a second sub-key, a lower output table of a second sub-key, an upper output table of a third sub-key, a lower output table of a third sub-key, and so forth for all sub-keys to form a rule column for the given rule. - View Dependent Claims (5, 6, 7)
-
-
8. A search method implemented with a computer for finding a rule from a plurality of rules each having an associated range of data, said data having n bits and said method comprising the steps of:
-
(a) dividing said n bits into a plurality of sub-keys each having at least one bit, and constructing a rule mapping table having a rule column for each rule of said plurality of rules, each rule column being formed by generating a first output table for a first sub-key, and an upper output table and a lower output table for each remaining sub-key according to the associated range of data of a corresponding rule; and
(b) dividing an input data into a plurality of input sub-keys for searching through said rule mapping table and determining rules that are satisfied with said input data, the first output table and upper and lower output tables in each rule column being addressed by said plurality of input sub-keys to determine if said input data satisfies a corresponding rule;
wherein said step (b) comprises the steps of;
(b1) reading and dividing an n-bit input data into K sub-keys having m1, m2, m3, . . . , mK bits respectively from high order bit to low order bit, wherein n, m1, m2, m3, . . . , mK are positive numbers;
(b2) using a first sub-key as an address for searching in the first output table of a first level of each rule to output a search result;
(b3) using a kth sub-key as an address for searching in the upper and lower output tables of a kth level in each rule to output search results, wherein k=2; and
(b4) repeating step (b3) for k=3, 4, . . . , K;
wherein the search results of steps (b2), (b3) and (b4) are used to determine if said input data satisfies each rule being searched. - View Dependent Claims (9, 10, 11, 12, 13)
-
Specification