IP Library Granted Patent US 11,055,353
Granted Patent B2
US 11,055,353 · App. 15/885,430 · Granted Jul 6, 2021

Typeahead and autocomplete for natural language queries

Inventors: Vlad Eroshin (San Francisco, CA); Dylan Thom (San Francisco, CA); Ryoji Osawa (San Francisco, CA); Dai Duong Doan (Alameda, CA)
Assignee: salesforce.com, inc.
G06F16/90328G06F16/243G06F40/186G06F40/205G06F40/279
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,055,353
App. No.
15/885,430
Granted
Jul 6, 2021
Kind
B2
Abstract

Embodiments are described for enabling a user to query a database using natural language and receive results without requiring the user to manipulate or know details of the database contents. The user is guided in the creation of the natural language query by suggested predetermined queries from a template. Natural language is parsed using the template. The approach allows a user's query words to be completed automatically from the template as the user inputs the words. The approach further allows the next suggested parts of the query to be automatically typed from the template ahead of the user's cursor. Other features provide feedback to the user for invalid or irrelevant queries that cannot be parsed, including suggesting complete predetermined queries from the template. The approach helps the user focus the query on exactly what the user seeks to learn from the database without complex, process-intensive parsing.

Claims (48)

1. A method, comprising:

determining, by a computing device, a template associated with a database, wherein the template defines a set of predetermined natural language queries using a lookup tree, and the template maps each predetermined natural language query in the set of predetermined natural language queries to a respective Analytics Query Language (AQL) query;

after the determining, receiving, by the computing device, a natural language query (NLQ) input configured to query the database;

identifying, by the computing device, a query part in the NLQ input;

matching, by the computing device, the query part in the NLQ input to a metadata placeholder node in a path in the lookup tree of the template, wherein the path corresponds to a predetermined natural language query in the set of predetermined natural language queries;

sorting, by the computing device, an order of the metadata placeholder node in the path in the lookup tree of the template by a predetermined sorting part of the template;

filtering, by the computing device, the metadata placeholder node in the path in the lookup tree of the template by a predetermined filtering part of the template;

updating, by the computing device, the query part in the NLQ input to be metadata in the metadata placeholder node corresponding to the predetermined natural language query based on the matching; and

providing, by the computing device, a suggested next query part for the NLQ input from the predetermined natural language query based on the matching.

2. The method of claim 1 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises traversing the path in the lookup tree, wherein the path comprises a plurality of query parts in the predetermined natural language query.

3. The method of claim 1 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a measure of the database, wherein the identifying is performed by traversing a list of measures in the template.

4. The method of claim 1 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a dimension of the database, wherein the identifying is performed by traversing a list of dimensions in the template.

5. The method of claim 1 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as an aggregation of a measure of the database, wherein the identifying is performed by traversing a list of aggregations of measures in the template.

6. The method of claim 1 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a grouping of a dimension of the database, wherein the identifying is performed by traversing a list of groupings of dimensions in the template.

7. A system, comprising:

a memory; and

at least one processor coupled to the memory, wherein the at least one processor is configured to:

determine a template associated with a database, wherein the template defines a set of predetermined natural language queries using a lookup tree, and the template maps each predetermined natural language query in the set of predetermined natural language queries to a respective Analytics Query Language (AQL) query;

after the determination of the template, receive a natural language query (NLQ) input configured to query the database;

identify a query part in the NLQ input;

match the query part in the NLQ input to a metadata placeholder node in a path in the lookup tree of the template, wherein the path corresponds to a predetermined natural language query in the set of predetermined natural language queries;

sort an order of the metadata placeholder node in the path in the lookup tree of the template by a predetermined sorting part of the template;

filter the metadata placeholder node in the path in the lookup tree of the template by a predetermined filtering part of the template;

update the query part in the NLQ input to be metadata in the metadata placeholder node corresponding to the predetermined natural language query based on the matching; and

provide a suggested next query part for the NLQ input from the predetermined natural language query based on the matching.

8. The system of claim 7 , wherein to match the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template, the at least one processor is configured to traverse the path in the lookup tree, wherein the path comprises a plurality of query parts in the predetermined natural language query.

9. The system of claim 7 , wherein to match the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template, the at least one processor is configured to identify the query part in the NLQ input as a measure of the database, wherein the identifying is performed by traversing a list of measures in the template.

10. The system of claim 7 , wherein to match the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template, the at least one processor is configured to identify the query part in the NLQ input as a dimension of the database, wherein the identifying is performed by traversing a list of dimensions in the template.

11. The system of claim 7 , wherein to match the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template, the at least one processor is configured to identify the query part in the NLQ input as an aggregation of a measure of the database, wherein the identifying is performed by traversing a list of aggregations of measures in the template.

12. The system of claim 7 , wherein to match the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template, the at least one processor is configured to identify the query part in the NLQ input as a grouping of a dimension of the database, wherein the identifying is performed by traversing a list of groupings of dimensions in the template.

13. A non-transitory computer-readable medium having instructions stored thereon that, when executed by a computing device, cause the computing device to perform operations comprising:

determining a template associated with a database, wherein the template defines a set of predetermined natural language queries using a lookup tree, and the template maps each predetermined natural language query in the set of predetermined natural language queries to a respective Analytics Query Language (AQL) query;

after the determining, receiving a natural language query (NLQ) input configured to query a database;

identifying a query part in the NLQ input;

matching the query part in the NLQ input to a metadata placeholder node in a path in the lookup tree of the template, wherein the path corresponds to a predetermined natural language query in the set of predetermined natural language queries;

sorting an order of the metadata placeholder node in the path in the lookup tree of the template by a predetermined sorting part of the template;

filtering the metadata placeholder node in the path in the lookup tree of the template by a predetermined filtering part of the template;

updating the query part in the NLQ input to be metadata in the metadata placeholder node corresponding to the predetermined natural language query based on the matching; and

providing a suggested next query part for the NLQ input from the predetermined natural language query based on the matching.

14. The non-transitory computer-readable medium of claim 13 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises traversing the path in the lookup tree, wherein the path comprises a plurality of query parts in the predetermined natural language query.

15. The non-transitory computer-readable medium of claim 13 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a measure of the database, wherein the identifying is performed by traversing a list of measures in the template.

16. The non-transitory computer-readable medium of claim 13 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a dimension of the database, wherein the identifying is performed by traversing a list of dimensions in the template.

17. The non-transitory computer-readable medium of claim 13 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as an aggregation of a measure of the database, wherein the identifying is performed by traversing a list of aggregations of measures in the template.

18. The non-transitory computer-readable medium of claim 13 , wherein the matching the query part in the NLQ input to the metadata placeholder node in the path in the lookup tree of the template comprises identifying the query part in the NLQ input as a grouping of a dimension of the database, wherein the identifying is performed by traversing a list of groupings of dimensions in the template.

19. The method of claim 1 , wherein the query part in the NLQ input occurs in a first position in the NLQ input and the query part in the predetermined natural language query occurs in a second position in the predetermined natural language query, wherein the first position is less than the second position.

20. The method of claim 1 , further comprising:

executing, by the computing device, the AQL query on the database based on the matching.

21. The method of claim 1 , wherein the updating the query part in the NLQ input to be metadata in the metadata placeholder node corresponding to the predetermined natural language query comprises updating the query part in the NLQ input to be metadata in the metadata placeholder node based on the query part in the NLQ input being a measure or a filter criterion.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0318 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 6, 2018
From: EROSHIN, VLAD; THOM, DYLAN; OSAWA, RYOJI; DOAN, DAI DUONG
To: SALESFORCE.COM, INC.
Reel/Frame 044842/0158 →
Continuity (1)
Related Publication 20190236217A1 · Aug 1, 2019