# US 2022/0092066 A1 · Method and system for query federation based on natural language processing

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

- Number: US 2022/0092066 A1
- Document ID: US20220092066A1
- Status: Published application
- Kind: A1
- Application number: 17/207,362
- Filed: 2021-03-19
- Published: 2022-03-24
- Earliest claimed: 2020-09-21
- Assignees: Larsen & Toubro Infotech Ltd
- Applicants: Larsen & Toubro Infotech Ltd
- Inventors: Aida Teja; Venkateswarlu Thiriveedhi; Sandeep Acharya; Pradeepta Mishra; Ashish Rishi; Satyakam Mohanty
- Web page: https://patentgrep.com/patent/US20220092066A1

## CPC

- G06F 16/24522: {Translation of natural language queries to structured queries}
- G06F 16/2433: {Query languages}
- G06F 16/2471: {Distributed queries}
- G06F 16/256: {in federated or virtual databases}
- G06F 40/205: Parsing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for generating a database query from a natural language using a query engine selector module for identifying appropriate database query format, a query engine builder module to generate appropriate database query using an intermediate query language 2 (IQL2) as input, and a data retriever module for fetching data from single or multiple data sources.

## Claims

### Claim 1

A method for query federation based on natural language, the method comprising: receiving a natural language query from a user;
converting the natural language query into an intermediate query language 2 (IQL2);
parsing the generated IQL2;
identifying one or more database query format based on a type of one or more data source using a selector component of a query engine selector module; and
generating one or more database query using a composer component of a query engine builder module.

### Claim 2

A method of data retrieval using one or more generated database query, the method comprising:
retrieving data from one or more data sources using a data retriever module,
wherein the data retriever module further comprises a query executor component and data transformation component.

### Claim 3 (depends on 2)

The method of claim 2, wherein a directed acyclic graph provides steps and operations performed by the query executor component and the data transformation component.

### Claim 4 (depends on 1)

The method of claim 1, wherein the one or more database query format is identified basis the one or more type of data source, wherein the one or more database query format includes but not limited to, SQL query type 1, SQL query type 2, non-SQL elasticsearch query.

### Claim 5 (depends on 1)

The method of claim 1, wherein the one or more database query is generated using the IQL2.

### Claim 6 (depends on 1)

The method of claim 1, wherein the IQL2 is generated using an intermediate query language 1(IQL1), wherein the IQL1 is generated by parsing the natural language query provided by the user.

### Claim 7 (depends on 1)

The method of claim 1, wherein the query engine selector module comprises the selector component for selecting one or more appropriate query engine framework for generating one or more database query basis one or more type of data source, wherein the one or more type of data source includes but not limited to, SQL data source, non-SQL data source.

### Claim 8 (depends on 1)

The method of claim 1, wherein the query engine builder module comprises the composer component for generating one or more the database query.

### Claim 9

A system for query federation based on natural language, the system comprising:
a user interface to receive a natural language query from a user;
an intermediate query generator module to convert the natural language query into an intermediate query language 2 (IQL2);
a parser to analyze, extract, and structure data from the generated IQL2;
a query engine selector module comprising a selector component to identify one or more database query formats based on one or more types of a data source; and
a query engine builder module comprising a composer component to generate one or more database queries.

### Claim 10 (depends on 9)

The system of claim 9, wherein the one or more database query formats is identified on the basis of the one or more types of the data source, wherein the one or more database query formats includes but is not limited to SQL query type 1, SQL query type 2, or a non-SQL elasticsearch query.

### Claim 11 (depends on 9)

The system of claim 9, wherein the database query is generated using the IQL2.

### Claim 12 (depends on 9)

The system of claim 9, wherein the intermediate query generator module generates the IQL2 using intermediate query language 1 (IQL1), wherein IQL1 is generated by parsing the natural language query.

### Claim 13 (depends on 9)

The system of claim 9, wherein the query engine selector module comprises the selector component for selecting one or more query engine frameworks for generating one or more database queries on the basis of the one or more types of the data source, wherein the type of the data source includes but is not limited to, a SQL data source or a non-SQL data source.

### Claim 14 (depends on 9)

The system of claim 9, wherein the query engine builder module comprises a composer component for generating the one or more database queries.

### Claim 15

A system for data retrieval using one or more generated database queries, the system comprising:
a data retriever module for retrieving data from one or more data sources;
a query executor component of the data retriever module; and
a data transformation component of the data retriever module.

### Claim 16 (depends on 15)

The system of claim 15, further comprising a directed acyclic graph to provide steps and operations to be performed by the query executor component and the data transformation component.
