IP Library Granted Patent US 11,615,089
Granted Patent B1
US 11,615,089 · App. 16/781,940 · Granted Mar 28, 2023

System, method, and computer program for converting a natural language query to a structured database query

Inventors: Venkatraman Naganathan (San Jose, CA); Koti R. Nandyala (Fremont, CA)
Assignee: Apttus Corporation
G06F16/24542G06F16/243G06F16/24537
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,615,089
App. No.
16/781,940
Granted
Mar 28, 2023
Kind
B1
Abstract

The present disclosure describes a system, method, and computer program for converting a natural language query to a structured database query. In response to receiving a natural language query for a database, an NLU model is applied to the query to identify an intent and entities associated with the query. The intent is mapped to a database object, and candidate query fields and operands are identified from the entities. The candidate query fields and operands are evaluated to identify any subject fields, conditional expressions, record count limit, and ordering/sorting criteria for the query. This including matching certain query fields and operands based on query parameters, operand types, and locations of operands relative to query fields. A query plan is created based on the evaluation of the candidate query fields and operands, and a database query is generated from the query plan.

Claims (53)

1. A method, performed by a computer system, for creating a database query from a user's natural language query, the method comprising:

receiving a user's natural language query via a natural language interface to the system;

applying a natural language model to the user's query to identify an intent and a plurality of entities associated with the user's query, wherein the entities are tagged with an entity type and associated with a normalized value;

identifying a database object corresponding to the identified intent;

identifying candidate query fields and operands for the query based on the entities and associated type tags;

creating a query plan for the query by evaluating the candidate query fields and operands to identify subject fields, conditional parameters, any record count limit, and any explicit or implicit ordering criteria for the query, wherein evaluating the candidate query fields and operands comprises:

obtaining query parameters,

determining if any of the candidate query fields are subject fields,

matching the candidate query fields that are not subject fields to operands based on the query parameters, entity tags associated with the operands, and locations of the operands relative to candidate query fields,

matching any operand not matched with a candidate query field to a default query field specified in the query parameters, and

adding the matched candidate queries and operands to the query plan as conditional parameters for the query,

wherein, in response to identifying implicit ordering criteria based on time, the computer system adapts ordering criteria based on the user's query to ensure results that have immediate time significance are placed ahead of less-immediate results; and

creating, based on the query plan, a database query, wherein the database query is in a database query language.

2. The method of claim 1 , further comprising adding a record count limit and an ordering criteria to the query plan.

3. The method of claim 1 , wherein the system identifies any queryable field located between an interrogative or a lookup action entity and an entity corresponding to the database object as a subject field.

4. The method of claim 1 , wherein prior to determining if any of the candidate query fields are subject fields, the system preprocesses the candidate query fields and operands.

5. The method of claim 4 , wherein preprocessing the operands and candidate query fields comprises removing any redundant, trivial, and subsumed query fields and operands from the candidate query fields and operands.

6. A non-transitory computer-readable medium comprising a computer program, that, when executed by a computer system, enables the computer system to perform the following method for creating a database query from a user's natural language query, the method comprising:

receiving a user's natural language query via a natural language interface to the system;

applying a natural language model to the user's query to identify an intent and a plurality of entities associated with the user's query, wherein the entities are tagged with an entity type and associated with a normalized value;

identifying a database object corresponding to the identified intent;

identifying candidate query fields and operands for the query based on the entities and associated type tags;

creating a query plan for the query by evaluating the candidate query fields and operands to identify subject fields, conditional parameters, any record count limit, and any explicit or implicit ordering criteria for the query, wherein evaluating the candidate query fields and operands comprises:

obtaining query parameters,

determining if any of the candidate query fields are subject fields,

matching the candidate query fields that are not subject fields to operands based on the query parameters, entity tags associated with the operands, and locations of the operands relative to candidate query fields,

matching any operand not matched with a candidate query field to a default query field specified in the query parameters, and

adding the matched candidate queries and operands to the query plan as conditional parameters for the query,

wherein, in response to identifying implicit ordering criteria based on time, the computer system adapts ordering criteria based on the user's query to ensure results that have immediate time significance are placed ahead of less-immediate results; and

creating, based on the query plan, a database query, wherein the database query is in a database query language.

7. The non-transitory computer-readable medium of claim 6 , further comprising adding a record count limit and an ordering criteria to the query plan.

8. The non-transitory computer-readable medium of claim 6 , wherein the system identifies any queryable field located between an interrogative or a lookup action entity and an entity corresponding to the database object as a subject field.

9. The non-transitory computer-readable medium of claim 6 , wherein prior to determining if any of the candidate query fields are subject fields, the system preprocesses the candidate query fields and operands.

10. The non-transitory computer-readable medium of claim 9 , wherein preprocessing the operands and query fields comprises removing any redundant, trivial, and subsumed query fields and operands from the candidate query fields and operands.

11. A computer system for creating a database query from a user's natural language query, the system comprising:

one or more processors;

one or more memory units coupled to the one or more processors, wherein the one or more memory units store instructions that, when executed by the one or more processors, cause the system to perform the operations of:

receiving a user's natural language query via a natural language interface to the system;

applying a natural language model to the user's query to identify an intent and a plurality of entities associated with the user's query, wherein the entities are tagged with an entity type and associated with a normalized value;

identifying a database object corresponding to the identified intent;

identifying candidate query fields and operands for the query based on the entities and associated type tags;

creating a query plan for the query by evaluating the candidate query fields and operands to identify subject fields, conditional parameters, any record count limit, and any explicit or implicit ordering criteria for the query, wherein evaluating the candidate query fields and operands comprises:

obtaining query parameters,

determining if any of the candidate query fields are subject fields,

matching the candidate query fields that are not subject fields to operands based on the query parameters, entity tags associated with the operands, and locations of the operands relative to candidate query fields,

matching any operand not matched with a candidate query field to a default query field specified in the query parameters, and

adding the matched candidate queries and operands to the query plan as conditional parameters for the query,

wherein, in response to identifying implicit ordering criteria based on time, the computer system adapts ordering criteria based on the user's query to ensure results that have immediate time significance are placed ahead of less-immediate results; and

creating, based on the query plan, a database query, wherein the database query is in a database query language.

12. The system of claim 11 , further comprising adding a record count limit and ordering criteria to the query plan.

13. The system of claim 11 , wherein the system identifies any queryable field located between an interrogative or a lookup action entity and an entity corresponding to the database object as a subject field.

14. The system of claim 11 , wherein prior to determining if any of the candidate query fields are subject fields, the system preprocesses the query fields and operands.

15. The system of claim 14 , wherein preprocessing the operands and query fields comprises removing any redundant, trivial, and subsumed query fields and operands from the candidate query fields and operands.

Assignments (6)
CHANGE OF NAME Recorded Oct 29, 2024
From: APTTUS CORPORATION
To: CONGA CORPORATION
Reel/Frame 069274/0036 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 31, 2021
From: NANDYALA, KOTI R.
To: APTTUS CORPORATION
Reel/Frame 057971/0964 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS RECORDED AT REEL 052996, FRAME 0878 Recorded May 6, 2021
From: DEUTSCHE BANK TRUST COMPANY AMERICAS, AS ADMINISTRATIVE AGENT
To: APTTUS CORPORATION; APPEXTREMES, LLC; APTTEX CORPORATION
Reel/Frame 056172/0654 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded May 6, 2021
From: APTTUS CORPORATION; APPEXTREMES, LLC; APPTEX CORPORATION; OCTIV, INC.; ORCHESTRATE, LLC
To: DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENT
Reel/Frame 056172/0792 →
SECURITY INTEREST Recorded May 7, 2020
From: APPEXTREMES, LLC; APTTEX CORPORATION; APTTUS CORPORATION
To: DEUTSCHE BANK TRUST COMPANY AMERICAS, AS ADMINISTRATIVE AGENT
Reel/Frame 052996/0878 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 24, 2020
From: NAGANATHAN, VENKATRAMAN
To: APTTUS CORPORATION
Reel/Frame 051902/0511 →