# US 2021/0240706 A1 · Query processing using hybrid inverted index of predicates

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0240706 A1
- Document ID: US20210240706A1
- Status: Published application
- Kind: A1
- Application number: 16/777,412
- Filed: 2020-01-30
- Published: 2021-08-05
- Earliest claimed: 2020-01-30
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Sandeep Nawathe
- Web page: https://patentgrep.com/patent/US20210240706A1

## CPC

- G06F 16/2228: {Indexing structures}
- G06F 16/24534: {Query rewriting; Transformation}
- G06F 16/2264: {Multidimensional index structures}
- G06F 16/243: {Natural language query formulation}
- G06F 16/245: Query processing
- G06F 40/205: Parsing
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A query processing system generates and employs a hybrid inverted index of predicates for predicate statement evaluation. The query processing system converts a collection of predicate statements to two parts, a matrix and a set of reduced predicate statements. The query processing system then generates a hybrid inverted index that maps values for variables to predicates from the matrix and the reduced predicate statements that evaluate to true for corresponding values. When querying data, the query processing system performs a lookup on the hybrid inverted index to identify predicates from the matrix and reduced predicate statements that evaluate to true for values of variables for the data. The query processing system identifies predicate statements that evaluate to true by evaluating the matrix and reduced predicate statements using treating predicates identified from the hybrid inverted index as true.

## Claims

### Claim 1

One or more computer storage media storing computer-useable instructions that, when used by a computing device, cause the computing device to perform operations, the operations comprising:
applying one or more transforms to predicates statements to generate a matrix and a set of reduced predicates statements, the matrix including conjunctive predicates or disjunctive predicates from the predicate statements, the set of reduced predicates generated by removing the conjunctive predicates or disjunctive predicates from the predicate statements added to the matrix; and
generating a hybrid inverted index that includes a mapping of predicate values for variables to predicates from the matrix and the set of reduced predicate statements; and
storing the hybrid inverted index, matrix, and set of reduced predicate statements, for use in evaluating the predicate statements for querying data.

### Claim 2 (depends on 1)

The one or more computer storage media of claim 1, wherein the operations further comprise:
converting one or more of the predicate statements to conjunctive normal form or disjunctive normal form.

### Claim 3 (depends on 1)

The one or more computer storage media of claim 1, wherein applying the one or more transforms to the predicate statements comprises:
for each of at least a portion of the predicate statements, extracting one or more conjunctive predicates or one or more disjunctive predicates from the predicate statement to provide a reduced predicate statement for the predicate statement; and
generating the matrix by, for each of the at least a portion of the predicate statements, including the one or more conjunctive predicates or the one or more disjunctive predicates extracted from the predicate statement in a row of the matrix corresponding with the predicate statement, wherein the matrix comprises a table in which each row corresponds with a predicate statement from the predicate statements and each column corresponds with a variable from a plurality of variables included in the predicate statements.

### Claim 4 (depends on 1)

The one or more computer storage media of claim 1, wherein applying the one or more transforms to the predicate statements comprises:
identifying a first predicate statement that includes multiple disjunctions for a first variable; and
consolidating the multiple disjunctions as a single predicate and removing the multiple disjunctions from the first predicate statement.

### Claim 5 (depends on 1)

The one or more computer storage media of claim 1, wherein applying the one or more transforms to the predicate statements comprises:
identifying a first predicate statement that includes multiple predicates for a first variable that include an inequality operator; and
consolidating the multiple predicates as a single predicate with an inequality operator.

### Claim 6 (depends on 1)

The one or more computer storage media of claim 1, wherein applying the one or more transforms to the predicate statements comprises:
identifying a first predicate statement that does not have a conjunctive predicate for a first variable; and
augmenting the first predicate statement with a conjunctive predicate for the first variable that includes an equality operator and a phantom value.

### Claim 7 (depends on 1)

The one or more computer storage media of claim 1, wherein generating the matrix comprises:
adding, for each predicate statement, a true value to the matrix for any variable not having a conjunctive predicate or a disjunctive predicate in the predicate statement.

### Claim 8 (depends on 1)

The one or more computer storage media of claim 1, wherein generating the hybrid inverted index comprises:
sorting predicates from the matrix and the set of reduced predicate statements by variable;
for each variable:
identifying a range of values for the variable based on predicates containing the variable;
augmenting the range of values for the variable by introducing one or more additional values; and
generating the hybrid inverted index using the augmented range of values for each variable and mapping each predicate from the matrix and the set of reduced predicate statements to one or more values in the augmented range of values for each variable.

### Claim 9 (depends on 8)

The one or more computer storage media of claim 8, wherein augmenting the range of values for a non-metric variable comprises:
adding a special value for the non-metric variable to handle data containing a value for the non-metric variable that is outside the range of values for the non-metric variable.

### Claim 10 (depends on 8)

The one or more computer storage media of claim 8, wherein augmenting the range of values for a metric variable comprises:
adding a special value for the metric variable to handle equality and inequality operators to handle data containing a value for the metric variable that is outside the range of predicate values for the metric variable.

### Claim 11 (depends on 8)

The one or more computer storage media of claim 8, wherein augmenting the range of values for a metric variable comprises:
adding a special value for the metric variable to handle < and <= operators.

### Claim 12 (depends on 8)

The one or more computer storage media of claim 8, wherein augmenting the range of values for a metric variable comprises:
adding a special value for the metric variable to handle > and >= operators.

### Claim 13 (depends on 1)

The one or more computer storage media of claim 1, wherein the operations further comprise:
receiving input data;
evaluating the predicate statements for the input data using the hybrid inverted index, the matrix, and, the reduced predicate statements.

### Claim 14 (depends on 13)

The one or more computer storage media of claim 13, wherein evaluating the predicate statements for the input data comprises:
identifying a value for each of one or more variables based on the input data;
performing a lookup in the hybrid inverted index to identify predicates from the matrix and the set of reduced predicate statements indexed for each value;
identifying one or more candidate predicate statements that can be satisfied for the input data using the matrix by treating each predicate from the matrix identified from the hybrid inverted index as true; and
evaluating the reduced predicate statement for each of the one or more candidate predicate statements by treating each predicate from the reduced predicate statements identified from the hybrid inverted index as true.

### Claim 15 (depends on 14)

The one or more computer storage media of claim 14, wherein identifying the value for each of one or more variables based on the input data comprises:
generating a variable assignment with values assigned to variables from the input data; and
augmenting the variable assignment with one or more additional values for variables.

### Claim 16

A computerized method comprising:
receiving data with a value for each of one or more variables;
performing a lookup on a hybrid inverted index to identify predicates mapped to the value for each of the one or more variable, the predicates from a matrix and a set of reduced predicate statements generated from a set of predicate statements;
identifying one or more candidate predicate statements that can be satisfied for the input data using the matrix by treating each predicate from the matrix identified from the hybrid inverted index as true; and
evaluating the reduced predicate statement for each of the one or more candidate predicate statements by treating each predicate from the reduced predicate statements identified from the hybrid inverted index as true.

### Claim 17 (depends on 16)

The computerized method of claim 16, wherein the method further comprises:
augmenting the value for each of the one or more variables with one or more additional values for variables; and
wherein the lookup on the hybrid inverted index also identifies predicates mapped to the one more additional values for variables.

### Claim 18 (depends on 16)

The computerized method of claim 16, wherein the lookup on the hybrid inverted index comprises a first lookup to identify predicates from the matrix and a second lookup to identify predicates from the set of reduced predicate statements.

### Claim 19 (depends on 16)

The computerized method of claim 16, wherein the method further comprises generating the matrix and the set of reduced predicate statements by:
for each of at least a portion of the predicate statements, extracting one or more conjunctive predicates or one or more disjunctive predicates from the predicate statement to provide a reduced predicate statement for the predicate statement; and
generating the matrix by, for each of the at least a portion of the predicate statements, including the one or more conjunctive predicates or the one or more disjunctive predicates extracted from the predicate statement in a row of the matrix corresponding with the predicate statement, wherein the matrix comprises a table in which each row corresponds with a predicate statement from the predicate statements and each column corresponds with a variable from a plurality of variables included in the predicate statements.

### Claim 20

A computer system comprising:
means for applying one or more transforms to a collection of predicate statements to generate a matrix and a set of reduced predicate statements; and
means for generating a hybrid inverted index mapping predicate values for variables to predicates from the matrix and the set of reduced predicate statements that evaluate to true given the corresponding predicate values; and
means for evaluating the collection of predicate statements for input data using the hybrid inverted index, the matrix, and the set of reduced predicate statements.
