System and method for generating database queries based on natural language inputs

Through the combination of conversational AI editing module and natural language question-and-answer system (such as TableQA), database queries are generated to dynamically build conversation flows, solving the problems of limited output of traditional chat robot systems and time-consuming generation processes, and achieving more flexible and efficient user interaction.

CN120179671APending Publication Date: 2025-06-20SHOPEE IP SINGAPORE PTE LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411873005.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-19
Filing Date
2024-12-18
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

When traditional chatbot systems process user natural language input, the output is limited by static conversation flow, which is less flexible and efficient, and the process of generating conversation flow is time-consuming and verbose.

Method used

By using the conversational AI editing module to configure the information required for tasks, parse this information based on the database schema, and generate database queries in combination with natural language question-and-answer systems (such as TableQA), dynamically construct conversation flows and improve the flexibility and efficiency of the chatbot system.

Benefits of technology

A more robust, flexible and efficient chat robot system is realized, which can dynamically generate conversation flows based on user input, improving the flexibility of conversation flows and the efficiency of user interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179671A_ABST
    Figure CN120179671A_ABST
Patent Text Reader

Abstract

Some embodiments relate to a method for generating one or more database queries based on natural language input data, the method comprising: using a dialog stream editor to configure or define information required to complete a task-oriented dialog; parsing the configured information based on a database schema to obtain a parsed database schema; and, using a natural language question answering system, using the parsed database schema and the natural language input data to generate the one or more database queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Aspects of the present disclosure relate to systems and methods for generating database queries based on one or more natural language inputs. The present disclosure is particularly applicable to, but not limited to, conversational interfaces such as chatbot systems, and uses such chatbot systems to automatically answer questions. Background Art

[0002] The following discussion of background art is only intended to facilitate an understanding of the present disclosure. It should be understood that this discussion does not confirm or admit that any of the materials mentioned are publicly available, known, or part of the common general knowledge of a person skilled in the art in any jurisdiction prior to the priority date of the present disclosure.

[0003] The existence of automated dialogue systems such as chatbot systems is to facilitate human users to navigate websites such as e-commerce platforms. Some automated dialogue systems may employ a combination of named entity recognition models, semantic networks (such as knowledge graphs), and fixed dialogue flows to address a user's chatbot queries.

[0004] In traditional chatbot systems, a natural language processor (NLP) may convert an input into an intent and then route that intent to a specific response in a conversational AI platform (such as a dialogue flow-based platform), which provides additional follow-up prompts or responses based on the user's intent. Commonly, the information configuration generated from such a dialogue flow platform is static, such that once the intent is determined, the chatbot flows to an appropriate static response and provides that response. In other words, traditional chatbot systems or automated dialogue systems may only be able to produce outputs from a fixed predefined set and are relatively inflexible.

[0005] In addition, current techniques for generating dialogue flows can be time-consuming and lengthy.

[0006] Therefore, there is a need to provide a more robust, flexible, and / or efficient chatbot system to improve flexibility. Summary of the Invention

[0007] Aspects of the present disclosure relate to a method and system for generating a database query based on natural language input received from a source, such as but not limited to natural language input received from a user of a chatbot system. In some embodiments, the generated database query can be used to facilitate the construction of an automated conversation flow that will facilitate chatbot conversations. In some embodiments, the automated conversation flow construction can be facilitated via a natural language question answering system such as a table-based language question-answering (TableQA) system. When retrieving results from a database in response to a user query, the TableQA system can enhance flexibility and also consider the database schema of the database for generating the response, and thus can produce an output with relatively fewer restrictions compared to a fixed conversation flow. Based on the data retrieved from the database, a response can be constructed to ask the user for more information. Repeating the described procedure can automatically form a conversation flow to achieve the goal desired by the user.

[0008] According to one aspect of the present disclosure, there is provided a method for generating a database query based on natural language input, the method comprising: using a conversational AI editing module to configure information required to complete a task (e.g., task-oriented conversation); parsing the configured information based on a database schema to obtain a parsed database schema; and using a natural language question answering system to generate one or more database queries using the parsed database schema and the natural language input data. The conversational AI editing module can be a Dialogflow editor. In some embodiments, the configuration of the information can include collecting a plurality of database tables, each of the database tables corresponding to or associated with a specific schema. TM Editor. In some embodiments, the configuration of the information can include collecting a plurality of database tables, each of the database tables corresponding to or associated with a specific schema.

[0009] In some embodiments, the natural language question answering system is a table question-answering (TableQA) system.

[0010] In some embodiments, the method includes: retrieving at least one database entry from an associated database based on the one or more database queries.

[0011] In some embodiments, the at least one database entry includes a table having at least one row and at least one column.

[0012] In some embodiments, the method further includes: determining, based on the at least one database entry, whether there are multiple possible values based on the table in response to the natural language input data.

[0013] In some embodiments, in a positive determination for which there are multiple possible values in response to the natural language input data, the natural language question answering system is configured to generate clarification information in response to the natural language input data.

[0014] In some embodiments, the natural language input data includes at least one of text-based data and / or audio data.

[0015] In some embodiments, a structured query language (SQL) database schema is used to parse the natural language input data, and one or more generated database queries include SQL queries.

[0016] In some embodiments, a Resource Description Framework schema is used to parse the natural language input data, and one or more generated database queries include SPARQL queries.

[0017] In some embodiments, the conversational AI editing module includes a chatbot dialogue flow editing platform.

[0018] According to another aspect of the present disclosure, there is provided a system for generating one or more database queries based on natural language input data, the system including at least one processor configured to: configure information required to complete a task-oriented dialogue; parse the configured information based on a database schema to obtain a parsed database schema; and, use a natural language question answering system to generate the one or more database queries using the parsed database schema and the natural language input data.

[0019] In some embodiments, the natural language question answering system is a Table QA system.

[0020] In some embodiments, the at least one processor is configured to: retrieve at least one database entry from an associated database based on the one or more database queries.

[0021] In some embodiments, the at least one database entry includes a table having at least one row and at least one column.

[0022] In some embodiments, the at least one processor is configured to: determine, based on the at least one database entry, whether there are multiple possible values based on the table in response to the natural language input data.

[0023] In some embodiments, in an affirmative determination that there are multiple possible values in response to the natural language input data, the natural language question answering system is configured to generate clarification information in response to the natural language input data.

[0024] In some embodiments, the natural language input data includes at least one of text-based data and / or audio data.

[0025] In some embodiments, a structured query language (SQL) database schema is used to parse the natural language input data, and one or more generated database queries include SQL queries.

[0026] In some embodiments, a resource description framework schema is used to parse the natural language input data, and one or more generated database queries include SPARQL queries.

[0027] In some embodiments, the at least one processor includes: a chatbot dialogue flow editor module configured to define information required to complete a task-oriented dialogue; a database schema parser module configured to parse the natural language input data based on a database schema to obtain a parsed database schema; and a TableQA module configured to use a natural language question answering system to generate the one or more database queries using the parsed database schema and the natural language input data.

[0028] According to another aspect of the present disclosure, there is provided a chatbot system including: a question answering module configured to: configure information required to complete a task-oriented dialogue; parse the configured information based on a database schema to obtain a parsed database schema; use a natural language question answering system to generate the one or more database queries using the parsed database schema and the natural language input data; retrieve at least one database entry from an associated database based on the one or more database queries; and compare the at least one database entry with the information required to complete the task-oriented dialogue.

[0029] According to another aspect of the present disclosure, there is provided a computer program element comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform the foregoing method.

[0030] According to another aspect of the present disclosure, there is provided a computer-readable medium comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform the foregoing method.

[0031] It should be noted that the embodiments described in the context of the method for generating a database query based on natural language input data are equally applicable to the system, and vice versa. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be better understood with reference to the specific embodiments when considered in conjunction with the non-limiting examples and the accompanying drawings, in which:

[0033] Figure 1 is a schematic flowchart depicting a method for generating a database query based on natural language input;

[0034] Figure 2 is a schematic diagram of a system for generating a database query based on natural language input;

[0035] Figure 3A is a schematic diagram of a data connection between the system and one or more other modules of the chatbot system;

[0036] Figure 3B illustrates examples of final and intermediate responses from the user in the form of requests for more information;

[0037] Figure 4 is a schematic diagram of a table retrieval module configured to collect or retrieve one or more tables before parsing the database schema;

[0038] Figure 5 and Figure 6 is a schematic diagram illustrating a large language model pipeline in the form of TableQA nodes according to some embodiments. DETAILED DESCRIPTION

[0039] The following detailed description refers to the accompanying drawings which illustrate, by way of example, specific details and embodiments in which the present disclosure may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present disclosure. Without departing from the scope of the present disclosure, other embodiments may be utilized and structural and logical changes may be made. The various embodiments are not necessarily mutually exclusive, as some embodiments may be combined with one or more other embodiments to form new embodiments.

[0040] Embodiments described in the context of one of a device or a method are equally applicable to other devices or methods. Similarly, embodiments described in the context of a device are equally applicable to a method, and vice versa.

[0041] Features described in the context of an embodiment may correspondingly apply to the same or similar features in other embodiments. Features described in the context of an embodiment may correspondingly apply to other embodiments even if not explicitly described in these other embodiments. In addition, additions and / or combinations and / or alternatives described for a feature in the context of an embodiment may correspondingly apply to the same or similar features in other embodiments.

[0042] In the context of various embodiments, the articles "a / an" and "the" used with respect to a feature or element include references to one or more of the feature or element.

[0043] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0044] As used herein, the term "chatbot" generally refers to a computer program or computer-executable instructions that simulate an intelligent conversation interface that enables an interactive chat session with a human user by auditory or text methods. A chatbot may include one or more virtual agents for conducting intelligent conversations through an online platform for various practical purposes such as customer service and information delivery. A chatbot may include a stand-alone application or may be integrated with various websites as a platform / tool for providing assistance to users. In some embodiments, a chatbot may provide a conversational experience for interacting with a user. For example, a user may enter a question, and the chatbot will attempt to interpret the question and then provide an answer. To maximize the relevance and / or accuracy of the answer, the chatbot may need to be trained on different types of inputs received from the user in order to modify the chatbot's response, which will enhance the customer experience when interacting with the chatbot. In some embodiments, the training of a chatbot may include artificial intelligence such as machine learning algorithms or methods, and such training may also include supervised learning, unsupervised learning, and / or hybrid learning methods. In some embodiments, the machine learning algorithms may include deep learning algorithms.

[0045] As used herein, the term "processor(s)" includes one or more electrical circuits (e.g., processing circuits) capable of processing data. A processor may include analog circuits or components, digital circuits or components, or hybrid circuits or components. According to alternative embodiments, any other kind of implementation of the corresponding functions, which will be described in more detail below, may also be understood as "circuit". A digital circuit may be understood as any kind of logical implementation entity, which may be a dedicated circuit system or a processor that executes software or firmware stored in a memory.

[0046] As used herein, the term "data" may be understood to include any suitable analog or digital form of information, e.g., provided as a file, a part of a file, a collection of files, a signal or stream, a part of a signal or stream, a collection of signals or streams, etc. However, the term "data" is not limited to the above examples and may take some forms and represent any information as understood in the art.

[0047] As used herein, the term "obtain" means that a processor actively obtains an input or passively receives an input from one or more sensors or data sources. The term "obtain" may also refer to a processor that receives or obtains an input from a communication interface (e.g., a user interface). The processor may also receive or obtain an input via a memory, a register, and / or an analog-to-digital port.

[0048] As used herein, the term "intent predict" includes various forms of prediction, including using one or more artificial-intelligence-based prediction modules for optimizing one or more goals. The one or more goals may include click-through rate prediction, resolution prediction, and category prediction.

[0049] As used herein, the term "conversational AI" generally refers to any platform that can be used to simulate human conversations and may include natural language processing (NLP) and generative artificial intelligence. An exemplary conversational AI platform may be a dialogue flow platform of a chatbot system, such as Dialogflow TM , which is a natural language understanding platform that can be used to facilitate the design of a conversational user interface and integrate the conversational user interface into various chatbot systems. The facilitation of the design and integration may be achieved by a dialogue flow editor such as Dialogflow TM Editor.

[0050] As used herein, the term "module" refers to, forms part of, or includes the following: application specific integrated circuit (ASIC); electrical / electronic circuit; combinational logic circuit; field programmable gate array (FPGA); processor (shared, dedicated, or group) that executes code; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system on a chip. The term "module" may include memory (shared, dedicated, or group) that stores code executed by the processor.

[0051] As used herein, the term "natural language question answering system" broadly includes large language models (LLMs), such as but not limited to table question answering systems and their SQL database query language, and knowledge graph question answering systems and their SPARQL query language.

[0052] As used herein, the term "Table Question Answering (TableQA)" algorithm broadly refers to any algorithm for providing answers to user questions obtained from one or more database tables. TableQA methods may include algorithms based on semantic parsing, which may be further classified into weakly supervised table semantic parsing, fully supervised table parsing, and include non-semantic parsing-based methods, such as generative methods, extractive methods, match-based methods, and retriever-reader-based methods.

[0053] As used herein, the term "database schema" broadly refers to the structure of a database described in a formal language. This structure may be supported by a database management system such as a relational database management system (RDBMS). The term "schema" refers to data organization in the form of a blueprint of how a database might be constructed. For example, data in a relational database may be divided into database tables. In some embodiments, the database schema may include a set of formulas (sentences) imposed on the database. In a relational database, the database schema may define one or more of the following: tables, fields, relationships, views, indexes, packages, programs, functions, queues, triggers, types, sequences, materialized views, synonyms, database links, directories, XML schemas, and other elements. In other words, the database schema is the structure of the database that defines the objects in the database.

[0054] Hereinafter, various embodiments will be described in detail.

[0055] According to one aspect of the present disclosure and with reference to Figure 1, a method 100 for generating one or more database queries based on one or more natural language input data is provided. The method includes the following steps:

[0056] Step S102: Use a conversational AI editing platform to configure the information required to complete the task;

[0057] Step S104: Parse the configured information based on the database schema to obtain the parsed database schema; and

[0058] Step S106: Use a natural language question answering system to generate one or more database queries using the parsed database schema and the natural language input data.

[0059] In some embodiments, method 100 may further include the following steps:

[0060] Step S108: Execute one or more database queries to obtain or retrieve at least one database entry.

[0061] Step S110: Compare at least one database entry with the configured information required to complete the task.

[0062] Step S112: Determine the differences based on the comparison of at least one database entry with the configured information.

[0063] Step S114: Send a notification to the user to provide additional natural language input data (e.g., in the case where the difference exceeds a threshold).

[0064] It should be understood that steps S106 to S114 can be repeated for other natural language input data until the task is completed, or until there is no other natural language input data from the user. In other words, method 100 can be iteratively executed until the user obtains the target response / reply, or until the user terminates the human-machine conversation session.

[0065] In some embodiments, step S102 may include collecting multiple database tables from one or more databases. The collected database tables can be stored in a configuration information database.

[0066] In some embodiments, the step of generating database queries may include retrieving one or more tables from the configuration information database based on the natural language data input and the parsed configuration information.

[0067] In some embodiments, the notification can be sent as a machine-generated or chatbot-generated natural language output to prompt the user of the chatbot system for more user input. The machine-generated or chatbot-generated natural language output can be based on synthetic results obtained from the database.

[0068] In some embodiments, method 100 may be implemented as software instructions that can be executed by at least one processor. The software instructions can be stored in a memory that is accessible by at least one processor. In some embodiments, the at least one processor, the memory, and the software instructions may form part of software as a service (SaaS).

[0069] In some embodiments, method 100 may be implemented in a chatbot system of an e-commerce platform.

[0070] Figure 2 An embodiment of a system 200 for generating one or more database queries based on natural language input is shown. System 200 may be a chatbot system or may form part of a chatbot system. System 200 may include a processor 201. Processor 201 may be a server computer or a part thereof. The server computer may be a single server or may include multiple distributed servers. In some embodiments, the server computer may be a remote server, such as a cloud server.

[0071] Processor 201 may include an input and / or output interface 202, a conversational AI editing platform 203, a database schema parser module 204, a TableQA module 205, and a database query engine module 206. In some embodiments, processor 201 may include a response writer module 207. In some embodiments, processor 201 may include one or more databases 208 for retrieving database entries in response to SQL queries.

[0072] The I / O interface 202 may include various hardware and / or software for obtaining or receiving natural language data 251 from one or more user devices 250. In some embodiments, the I / O interface 202 may include a wired or wireless communication interface for obtaining or receiving natural language data from one or more sources. In some embodiments, the I / O interface module 202 may be configured to receive natural language input data from a user via the user device 250. The natural language input data may be in the form of at least one of text data, audio data, video data, and multimedia data. In some embodiments, non-text data may be converted into text data.

[0073] The conversational AI editing module 203 may be configured to define the information required to complete a task (e.g., a task-oriented conversation of a chatbot module / system) based on the natural language input data 251. In some embodiments, the conversational AI editing module 203 includes a dialogue flow editor. A user, such as a chatbot operator, may customize and configure the information required to complete a task-oriented conversation in the dialogue flow editor.

[0074] In some embodiments, the configured information may be converted into a suitable form (e.g., structured data), which can be used to compare with database entries retrieved from a database based on one or more database queries. In some embodiments, the configuration step may include one or more sub-steps of defining a framework for interaction between a user and a chatbot.

[0075] The database schema parser module 204 may be configured to parse the configured information based on a database schema to obtain a parsed database schema. In some embodiments, the database schema may be a Structured Query Language (SQL) database schema. The parsing may include collecting information from multiple different database tables from an SQL database and generating a format that can be used by the next component. In some embodiments, the database schema parser module 204 may be arranged to communicate data with the table retrieval module. The table retrieval module may be configured to collect or retrieve tables required by the next component from an SQL database. The table retrieval module may be configured to receive inputs from a configuration information database and natural language input data.

[0076] The natural language question answering module 205 may be configured to use a natural language question answering system to generate one or more database queries using the parsed database schema output from the database schema parser module 204 and natural language input data. In some embodiments, the natural language question answering system may be based on a Table Question Answering (TableQA) system. In a TableQA system, an SQL query may be generated based on one or more keywords related to the natural language input data, such keywords may include keywords related to location (e.g., restaurant, park, residence, hotel, or any geographical location defined by a coordinate system), time (e.g., 2 p.m., 8 a.m., from 9 a.m. on Tuesday to 12 noon on Saturday), activity (e.g., hotel accommodation, overseas travel, attending a concert), etc.

[0077] The database query engine module 206 may be configured to execute the generated one or more database queries, which may be further configured to retrieve corresponding responses from at least one table of a database, and the database may be an SQL database.

[0078] The response writer module 207 can be configured to compare the results retrieved from the database or associated entries with the configuration in the dialog flow editor. The results or entries can then be used as feedback to the response writer module 207, which is configured to determine the next action to take along the dialog flow and, where applicable, prompt the user to provide more necessary information if necessary through a chatbot response (which can be in natural language). In some embodiments, the response writer module 207 can be configured to provide a prompt or notification in the form of a machine-generated natural language response to the user's natural language input data.

[0079] In some embodiments, the response writer module 207 can be configured to determine a difference, and based on that difference, the response writer module 207 can then be configured to revise or suggest a revision of the information required to complete a task-oriented conversation based on that difference.

[0080] In some embodiments, the TableQA module 205 can use a structured query language (SQL) database schema to parse natural language input data. The one or more database queries generated thereby can thus include one or more SQL queries.

[0081] In some embodiments, the database query engine module 206 can be configured to analyze the structure of the one or more SQL queries generated, the one or more SQL queries generated including one or more SQL statements. For example, the one or more SQL statements can be broken down into their elements, such as tables, columns, joins, filters, subqueries, etc. The SQL queries can be broken down based on SQL syntax, identifying each query component in the query components, and then creating an abstract syntax tree (AST) in a hierarchical format.

[0082] In some embodiments, the database schema parser module 204 can include an online SQL parser. The online SQL parser can follow a software as a service (SaaS) model.

[0083] It should be understood that the system 200 of the present disclosure can be configured to use SQL queries to generate a structured intermediate representation of the user's intent. The user's intent can then be compared with the configuration in the dialog flow editor (i.e., the configured information). Based on that difference, the system can then automatically continue the dialog flow to complete the final task. The automation can be partially implemented by the response writer module 207.

[0084] Figure 3AAn embodiment of system 200 applied to chatbot system 300 is shown. The chatbot system may include a front end 302 for a user to interact with and access the chatbot system 300. The front end 302 may be connected to a back end 304. The back end 304 may be configured to send data to system 200 and receive data from system 200. The back end 304 may include a conversational AI editing platform, such as a Dialogflow editor.

[0085] In an exemplary operation, system 200 may interface with back end 304 to send a request for comparison data 321 of response writer module 207 to the Dialogflow editor. The back end 304 may reply using configured information 322 (table information) to determine any differences from the retrieved database reply. The response writer module 207 may then send additional data including response 323 based on the information 322 configured by the back end 304. The back end 304 may be configured to send a notification 324 in the form of a natural language sentence to the front end 302 to prompt the user to provide more information. In some embodiments, as Figure 3B shown, response 323 may be the final result / response 323A that replies to a query generated by the user via the front end 302. The result 323A may be the answer to the user's query, which may be a follow-up to one or more responses 323 in the form of clarification information 323B to prompt the user to provide more information.

[0086] In some embodiments, one or more TableQA nodes may be used to create a table listing values associated with a question and answer system. Such an arrangement may make it relatively easy to examine the data values or export the data values in a readable form.

[0087] Figure 4 An example of a database schema is shown, in the form of a transaction or order schema associated with transaction or order data of a specific user account. The order schema includes a table having a name data field 402, a description data field 404, a column data field 406, and an Is_col_clarify field 408. The column data field 406 of the table may include order_number:clarify_col, order_creation:normal_col, order_status:clarify_col, delivery_date:normal_col, and product_Id:clarify_col.

[0088] In some embodiments, the information required to complete a task using the configuration of the conversational AI editing module and based on natural language input data will involve parsing the configured information based on a database schema to obtain a parsed database schema. A conversation flow including multiple nodes (hereinafter referred to as TableQA nodes) can be configured on a task flow editor (conversational AI platform). The created TableQA nodes for constructing a TableQA conversation flow to obtain structural knowledge may only involve one conversation flow required for all the collected tables, such that a simple conversation flow on a conversation flow editor such as a text flow editor and other conversation flows for each table or attribute will be automatically generated based on TableQA and user queries.

[0089] Figure 5 An example of a pipeline or logic flow of a large language model (LLM) in the form of a TableQA node used in some embodiments of the present disclosure is shown. As part of database query generation, a table retrieval module 502 can be used to collect the configured information from an SQL database 504, and the configured information has been configured and parsed based on a query received from a user (i.e., natural language input data) 506. The retrieved table 508 can be temporarily stored in a cache and used by a natural language question answering system to generate an SQL query 510 and natural language input data 506 using the TableQA node structure as described. Based on the generated SQL query 510, if a clarification column 512 is not in the "where" field 408 of the table, the clarification column can be added.

[0090] Next, the TableQA node can be further configured to retrieve at least one database entry 514 from the retrieved table based on the query 510. The retrieved entry 514 can be a table entry of a specific pattern.

[0091] Process elements 514 to 520 describe an iterative process for determining the output result of natural language input data (i.e., the query). Broadly speaking, the table entries are parsed to determine whether multiple results are possible, because such multiple results may indicate that the natural language input data is not specific enough for the TableQA node to generate a definite answer. This can be based on determining whether there is more than one row or more than one column in the retrieved table entries. In the case of an affirmative determination that multiple possible results exist, an intermediate response in the form of a request for more information is generated by the TableQA node to prompt the user to reduce the multiple results to a final result (i.e., the ultimate result).

[0092] Reference Figure 5, based on the retrieved Table 514, the TableQA node determines whether the result can be associated with more than one row 516 (i.e., in the case of multiple rows). In the case of an affirmative determination (i.e., "yes"), this indicates that the query may not be specific enough for Table QA to return a final answer 323A (see Figure 3B ). In this case, TableQA prompts the chatbot interface to collect additional information from the user 518. The request for additional information 518 may include displaying clarification information 323B to the user (see Figure 3B ) to take further action. One or more data associated with the parsed clarification information 323B can be integrated into the SQL database. Then, TableQA can loop back to query from the retrieved Table 514, and the process continues until a final result / answer 323A is obtained.

[0093] Figure 6 Illustrates an example of the backend TableQA node generated when a query 506 from a user is received from the chatbot front end 302 (also see Figure 3). Figure 6 Can be associated with various elements or processes as Figure 5 depicted and so marked.

[0094] In Figure 6 , a query 506 in the form of natural language input text entered by the user of the chatbot is received: "Can I know the order status of product K5521?".

[0095] Then, the backend TableQA node receives the query and retrieves the relevant table associated with "order mode".

[0096] The TableQA node parses the query to generate a database query (510) based on the SQL syntax "select order_status from orders where product_id = K5521".

[0097] As Figure 6 illustrated, the retrieved sub-table 514 includes more than one row 516 (in this case, two rows 516). This may mean that the user has multiple orders associated with product K5521. One row indicates "order_status: Shipped" associated with order_number 123456, while the other row indicates "order_status: Delivered" associated with order_number 567890.

[0098] Based on decision box 516, clarification needs to be obtained from the user. To generate a natural language text response (i.e., clarification information 323B), specific values of a column that requires clarification from the chatbot user can be obtained. In this case, the multiple lines are due to the inability to determine the order number. Therefore, the "order_number" parameter is obtained and used to generate a natural language text in the form of "Please inform me of the order_number" for clarification.

[0099] When receiving an answer in the form of another natural language input data 518 from the user (such as "123456"), the response is parsed and integrated 520 to form another SQL query "Select order_status for orders where product_id = "K5521" and order_number = "123456".

[0100] As described above, the generated SQL query, i.e., the order_status 522 in the form of "shipped", can be generated as the natural language output to the user.

[0101] Although this example depicts two rows and two columns, it is understood that multiple rows associated with more than two columns can be generated. In this case, the TableQA node can be configured to generate other clarifications based on multiple columns.

[0102] The systems and methods of the present disclosure dynamically update the dialogue flow editor based on real-time processing of user natural language input data. The NLP input can be converted into a database query instead of using static responses, and the query provides a formatted dynamic response instead of a static response. The interface connection to the dialogue flow editor allows the user to adjust the dialogue flow not only based on the intent and entities from the user query but also according to the data reported from the database. In some embodiments, when the chatbot receives a natural language input from the user, the input is translated into a database query. In some embodiments, the database query engine executes the database query to retrieve data from the database. In some embodiments, the chatbot response writer compares the data retrieved from the database with the process configuration generated by the dialogue flow editor to determine the user's response, such that the result is not only displayed but used as input to determine other dialogue flow paths.

[0103] Although various embodiments have been described with reference to TableQA as an example of a question-answering system, it is contemplated that other question-answering systems can be used without departing from the scope of the present disclosure. In some embodiments, the form of the question-answering system can be a knowledge graph question-answering system with a database in Resource Description Framework format, which can be queried using the SPARQL query language.

[0104] It should be understood that the data such as the foregoing natural language input data, one or more database queries, etc. may include real-time data and offline data.

[0105] The methods described herein may be executed, and various processing or computing units, devices, and computing entities described herein may be implemented by one or more circuits. In one embodiment, a "circuit" may be understood as any kind of logical implementation entity, which may be hardware, software, firmware, or any combination thereof. Thus, in one embodiment, a "circuit" may be a hardwired logic circuit or a programmable logic circuit, such as a programmable processor, e.g., a microprocessor. A "circuit" may also be software implemented or executed by a processor, e.g., any kind of computer program, e.g., a computer program using virtual machine code. According to alternative embodiments, any other kind of implementation of the corresponding functions described herein may also be understood as a "circuit".

[0106] Although the present disclosure has been particularly shown and described with reference to specific embodiments, those skilled in the art should understand that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Thus, the scope of the present invention is indicated by the appended claims, and all changes within the meaning and equivalent scope of the claims are intended to be included.

Claims

1. A method for generating one or more database queries based on natural language input data, the method comprising: Use the conversational AI editing module to configure the information needed to complete the task; parsing the configured information based on the database schema to obtain a parsed database schema; as well as The one or more database queries are generated using a natural language question answering system using the parsed database schema and the natural language input data.

2. The method according to claim 1, wherein the natural language question answering system is a table question answering (TableQA) system or a knowledge graph question answering system.

3. The method according to claim 1 or 2, further comprising: At least one database entry is retrieved from an associated database based on the one or more database queries. 4 . The method of claim 3 , wherein the at least one database entry comprises a table having at least one row and at least one column.

5. The method according to any one of claims 1 to 4, further comprising: Based on the at least one database entry, a determination is made as to whether a plurality of possible values ​​exist based on the table in response to the natural language input data.

6. The method of claim 5, wherein upon a positive determination that there are multiple possible values ​​in response to the natural language input data, the natural language question answering system is configured to generate clarification information in response to the natural language input data.

7. The method according to any one of claims 1 to 6, wherein the natural language input data comprises at least one of text-based data and / or audio data.

8. The method of any one of claims 1 to 7, wherein the natural language input data is parsed using a Structured Query Language (SQL) database schema, and the one or more database queries generated comprise SQL queries.

9. A method according to any one of claims 1 to 7, wherein the natural language input data is parsed using a Resource Description Framework schema and the one or more database queries generated comprise SPARQL queries.

10. The method according to any one of claims 1 to 9, wherein the conversational AI editing module comprises a chatbot dialogue flow editing platform.

11. A system for generating one or more database queries based on natural language input data, the system comprising at least one processor, the at least one processor being configured to: Configure the information needed to complete task-oriented conversations; parsing the configured information based on the database schema to obtain a parsed database schema; and Using a natural language question answering system, the one or more database queries are generated using the parsed database schema and the natural language input data.

12. The system according to claim 11, wherein the natural language question answering system is a table question answering (Table QA) system or a knowledge graph question answering system.

13. The system of claim 11 or 12, wherein the at least one processor is configured to retrieve at least one database entry from an associated database based on the one or more database queries.

14. The system of claim 13, wherein the at least one database entry comprises a table having at least one row and at least one column.

15. The system of any one of claims 11 to 14, the at least one processor being configured to determine, based on the at least one database entry, whether there are multiple possible values ​​based on the table in response to the natural language input data.

16. The system of claim 15, wherein upon a positive determination that there are a plurality of possible values ​​in response to the natural language input data, the natural language question answering system is configured to generate clarification information in response to the natural language input data.

17. The system of any one of claims 11 to 16, wherein the natural language input data comprises at least one of text-based data and / or audio data.

18. The system of any one of claims 11 to 17, wherein the natural language input data is parsed using a Structured Query Language (SQL) database schema, and the one or more database queries generated comprise SQL queries.

19. The system of any one of claims 11 to 17, wherein the natural language input data is parsed using a Resource Description Framework schema and the one or more database queries generated comprise SPARQL queries.

20. The system of any one of claims 11 to 19, wherein the at least one processor comprises: a chatbot dialogue flow editor module, the chatbot dialogue flow editor module being configured to define information required to complete a task-oriented dialogue based on the natural language input data; a database schema parser module, the database schema parser module being configured to parse the natural language input data based on a database schema to obtain a parsed database schema; as well as A TableQA module, wherein the TableQA module is configured to use a natural language question answering system to generate the one or more database queries using the parsed database schema and the natural language input data.

21. A chat robot system, comprising: A question-answering module, wherein the question-answering module is configured to: Configure the information needed to complete task-oriented conversations; parsing the configured information based on the database schema to obtain a parsed database schema; using a natural language question answering system, generating the one or more database queries using the parsed database schema and the natural language input data; retrieving at least one database entry from an associated database based on the one or more database queries; and The at least one database entry is compared to the information required to complete the task-oriented dialog.

22. A computer program element comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 10.

23. A computer readable medium comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Interaction method, interaction system, electronic equipment, storage medium and program product

    CN121455375A