# US 2022/0292085 A1 · Systems and methods for advanced query generation

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

- Number: US 2022/0292085 A1
- Document ID: US20220292085A1
- Status: Published application
- Kind: A1
- Application number: 17/193,901
- Filed: 2021-03-05
- Published: 2022-09-15
- Earliest claimed: 2021-03-05
- Assignees: Comcast Cable Communications, LLC
- Applicants: Comcast Cable Communications, LLC
- Inventors: Muneem Shahriar; Hanwen Ye
- Web page: https://patentgrep.com/patent/US20220292085A1

## CPC

- G06F 16/243: {Natural language query formulation}
- G06F 16/24522: {Translation of natural language queries to structured queries}
- G06F 16/24564: {Applying rules; Deductive queries}
- G06F 16/3329: Natural language query formulation
- G06N 5/04: Inference or reasoning models
- G06N 20/00: Machine learning
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Systems and methods for determining a query for a data store are described. A natural language text may be analyzed using heuristic processing and one or more machine learning models. Query parameters may be determined from the heuristic processing and machine learning and combined to form a query in a query language. In the heuristic processing, parsing rules may be used to remove conditional terms to generate a base question. The base question may be input to the one or more machine learning model to generate a base query which may be combined with query parameters related to the conditional terms.

## Claims

### Claim 1

A method comprising:
determining, based on one or more text parsing rules and by removing one or more conditional terms from a natural language text associated with a request, a base question;
determining, based on the base question and at least one of a plurality of machine learning models associated with a data store, a base query comprising one or more query parameters;
determining, based on the base query and data indicative of the one or more conditional terms, a query in a language associated with the data store; and
sending, based on the request, the query.

### Claim 2 (depends on 1)

The method of claim 1, further comprising determining one or more additional query parameters corresponding to the one or more conditional terms, wherein determining the query comprises combining the one or more additional query parameters with the one or more query parameters.

### Claim 3 (depends on 1)

The method of claim 1, wherein one or more of the base question or the one or more conditional terms are determined based on the natural language text without applying machine learning to the natural language text.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining the base query comprises causing the base question to be input to the one or more machine learning models, receiving the one or more query parameters as output from the one or more machine learning models, and determining the query by combining the one or more query parameters.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining the base question comprises determining, by applying a heuristic search to the natural language text, the one or more conditional terms.

### Claim 6 (depends on 1)

The method of claim 1, wherein the language comprises a structured query language for accessing the data store.

### Claim 7 (depends on 1)

The method of claim 1, wherein the plurality of machine learning models are configured to determine, for the request, one or more of: columns of the data store, mathematical functions to apply to values of the data store, conditions to evaluate on the data store, columns to group results from the data store, ordering of results for values in a column of the data store, or a limit of a number or results from the data store.

### Claim 8

A method comprising:
receiving audio data associated with requesting data from a data store;
determining, based on the audio data, data indicative of a natural language text;
determining, based on a search of the data indicative of the natural language text, a base question and a first set of query parameters;
determining, based on inputting the base question into a plurality of machine learning models, a second set of query parameters;
determining, based on the first set of query parameters and the second set of query parameters, a query in a language associated with the data store; and
causing, based on the query, the requested data to be retrieved from the data store.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining the first set of query parameters comprises determining, without using machine learning to identify query parameters, the first set of query parameters.

### Claim 10 (depends on 8)

The method of claim 8, wherein each of the plurality of machine learning models is associated with determining one or more of a specific type of query clause, a specific function of a query clause, or a specific query parameter of a query clause.

### Claim 11 (depends on 8)

The method of claim 8, wherein determining the base question and the first set of query parameters comprises applying, to the data indicative of the natural language text, one or more text parsing rules associating one or more words with corresponding types of query parameters.

### Claim 12 (depends on 8)

The method of claim 8, wherein determining the query in the language associated with the data store comprises one or more of: adding the second set of query parameters to the first set of query parameters, or prioritizing the first set of query parameters in resolving conflicts between the first set of query parameters and the second set of query parameters.

### Claim 13 (depends on 8)

The method of claim 8, wherein the base question comprises a remaining portion of the data indicative of the natural text language after removing words associated with the first set of query modifiers, and wherein determining the query comprises translating at least one of the base question, the first set of query parameters, or the second set of query parameters to the language associated with the data store.

### Claim 14 (depends on 8)

The method of claim 8, further comprising determining, based on a filter model and the natural language text, whether a request indicated in the data indicative of the natural language text is outside or within a scope of the data store, wherein the filter model comprises a machine learning model trained based on a plurality of questions indicated as within the scope of the data store and a plurality of questions indicated as outside of the scope of the data store.

### Claim 15

A method comprising:
causing, based on values in a data store, training of a plurality of machine learning models to determine query information for the data store;
determining, based on identifying conditional terms associated with data indicative of a request from a user, a base question and first data for generating a query for the data store;
determining, based on the base question and the plurality of machine learning models, second data for generating the query; and
causing, based on generating the query using the first data and the second data, the query to be sent to the data store.

### Claim 16 (depends on 15)

The method of claim 15, wherein each of the plurality of machine learning models is associated with determining one or more of a specific type of query clause, a specific function of a query clause, or a specific query parameter of a query clause.

### Claim 17 (depends on 15)

The method of claim 15, wherein determining the base question and the first data comprises determining, based on one or more text parsing rules associating one or more words with corresponding types of query parameters, the base question and the first data.

### Claim 18 (depends on 15)

The method of claim 15, further comprising determining a training data set by adding data from the data store to one or more templates associating natural language text with corresponding queries in the language of the data store, wherein causing the training comprises causing, based on the training data set, the training.

### Claim 19 (depends on 15)

The method of claim 15, wherein the plurality of machine learning models are configured to determine, for the request, one or more of: columns of the data store, mathematical functions to apply to values of the data store, conditions to evaluate on the data store, columns to group results from the data store, ordering of results for values in a column of the data store, or a limit of a number or results from the data store.

### Claim 20 (depends on 15)

The method of claim 15, further comprising determining, based on a filter model and the data indicative of the request, whether the request is outside or within a scope of the data store, wherein the filter model comprises a machine learning model trained based on a plurality of questions indicated as within the scope of the data store and a plurality of questions indicated as outside of the scope of the data store.
