Patent attributes
Radix trees and other trees use memory inefficiently when storing key-value associations with ‘or’ conditions. Their function can be optimized by using multiple key field trees, each corresponding to a key field, which is typically a character (or group thereof) in a string input key. The tree for the final key field has nodes with the output values, and these are annotated to identify, for each output value, the valid key field values from prior key fields. To execute a lookup, each key field tree is traversed to find a matching key field value. The final key field tree is traversed to reach one or more output values; then the previously determined key field values are compared against the valid key field values to determine if there is a match for a particular output value. The matched and valid key field values can be expressed in encoded form.