Data service device and method using a natural language processing algorithm
The data service system clarifies natural language questions into meta-questions, verifies user access, and caches answers to enhance accuracy and security in question answering systems.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2026-03-26
AI Technical Summary
Existing question answering systems provide non-identical responses for substantially similar natural language questions, lack user-specific database access permissions, are difficult to correct after query generation, cause database load and cost through repeated queries, and expose databases to security risks via external networks.
A data service system and method that converts natural language questions into meta-questions with added annotations, uses an NLP model to generate queries, verifies user access rights, and stores cached answers to reduce database load and security exposure.
Provides accurate answers to natural language questions, ensures user-specific access control, reduces database load, and minimizes security risks by clarifying queries and caching similar questions.
Smart Images

Figure 0007836358000005 
Figure 0007836358000006 
Figure 0007836358000007
Abstract
Description
Technical Field
[0001] The present invention relates to a data service system and method, and more particularly, to a data service system and method using a natural language processing algorithm that performs a data service for converting a natural language question into a query and answering it.
Background Art
[0002] A general question answering system analyzes a user's natural language question with a natural language processing algorithm, generates a response from a database based on the analysis result, and provides it to the user. The question answering system supports a query that can generate a response from a database based on a natural language processing algorithm.
[0003] The quality of the response provided by such a question answering system depends on the query generated based on the natural language question.
[0004] The query is determined by the natural language question. That is, the natural language questions by the user are substantially the same question but in various forms. By the way, the current situation is that the question answering system does not output the same response through the same query for natural language questions that are substantially the same but in various forms.
[0005] Thus, a scheme for the user to directly create a query can be considered. However, although query creation is possible for experts, it is not realistically easy for general users as non-experts. The reliability of the query generated by the question answering system is higher than that of general users, but it is inferior in reliability compared to the query created by experts. Therefore, existing question answering systems can output non-identical responses for natural language questions that are substantially the same but in various forms.
[0006] Currently, question-answering systems do not reflect user-specific database access permissions when generating queries for natural language questions. In other words, it is necessary to set user-specific access permissions for the database.
[0007] Since the question-answering system is responsible for generating queries, it is not easy to correct them after they have been generated.
[0008] While the same or similar questions can be asked repeatedly using a question-answering system, this also results in repeated database queries through query generation, which places a load on the database. From the user's perspective, this can lead to excessive costs associated with natural language questions.
[0009] Furthermore, security issues can arise from the use of external networks for natural language processing. Specifically, security issues can occur due to the exposure of the database to external networks through query generation. [Prior art documents] [Patent Documents]
[0010] [Patent Document 1] Korean Registered Patent Publication No. 10-1987915 [Overview of the project] [Problems that the invention aims to solve]
[0011] Therefore, an object of the present invention is to provide a data service system and method using a natural language processing algorithm that can provide answers that more accurately correspond to natural language questions.
[0012] Another object of the present invention is to provide a data service system and method using a natural language processing algorithm that can provide answers to natural language questions while reflecting user-specific access rights to the database.
[0013] Another object of the present invention is to provide a data service system and method using a natural language processing algorithm that can be corrected during the query generation process.
[0014] Another object of the present invention is to provide a data service system and method using a natural language processing algorithm that can suppress the load on the database unit caused by the repetition of the same or similar questions and reduce user costs.
[0015] Another object of the present invention is to provide a data service system and method using a natural language processing algorithm that can suppress the exposure of the database section to external networks and minimize the occurrence of security problems. [Means for solving the problem]
[0016] To achieve the above objectives, the present invention provides a data service method for a data service device using a natural language processing algorithm, comprising the steps of: receiving a natural language question from a user terminal; converting the natural language question into a meta-question that clarifies the natural language question by adding annotations to the natural language question so that it can be analyzed by an NLP (natural language processing) model; transmitting the meta-question to the NLP model; receiving a meta-answer from the NLP model that can generate a query; generating a query based on the meta-answer; querying the database unit with the query to generate an answer; and providing the answer to the user terminal.
[0017] In the step of converting to the meta-question, the annotation may include at least one of the following as a hint to clarify the natural language question: a sentence, phrase, word, or particle.
[0018] The annotation can be generated using index terms for the data stored in the database unit and the user's attribute information.
[0019] The meta-question includes the natural language question and may include the user's attribute information, examples of meta-answers, and explanations of creation rules for items as the annotation.
[0020] In the stage of receiving the meta-answer, the meta-answer may include programmable code capable of generating a query corresponding to the meta-question.
[0021] The data service method according to the present invention may further include providing a prompt for the database unit to the NLP model.
[0022] The NLP model can generate the meta-answer by referring to the prompt.
[0023] In the stage of generating the query, a meta-command adding a command language for specifying a template capable of outputting an answer to the meta-answer is generated, and the query can be generated by the meta-command.
[0024] In the stage of generating the query, it can be confirmed whether a user connected to the user terminal has the access right to query the database unit with the query.
[0025] The meta-command or the query includes a plurality of specific items for querying the database unit, and it is confirmed whether the user has the access right to the plurality of specific items. As a result of the confirmation, if there is no access right, a response restriction message can be provided to the user terminal.
[0026] In the stage of providing to the user terminal, the answer can be provided in a specified template.
[0027] The data service method according to the present invention may further include, before the stage of transmitting to the NLP model, storing previous natural language questions, meta-questions, meta-answers, and answers as cache data, and checking whether there is a question corresponding to the currently input natural language question or meta-question in the cache data. As a result of the check, if there is a corresponding question, the meta-question for the currently input natural language question is not transmitted to the NLP model, and if there is no corresponding question, the stage of transmitting to the NLP model can be performed.
[0028] The query may be SQL (Structured Query Language).
[0029] The NLP model may include an LLM (large language model).
[0030] The present invention also provides a data service apparatus using a natural language processing algorithm, including a database unit, an interface unit that receives a natural language question from a user terminal and outputs an answer to the natural language question, and a control unit that generates a query for which the database unit can output an answer to the NLP (natural language processing) model for the natural language question, and transmits a meta-question that adds an annotation to the natural language question to clarify the natural language question to the NLP model.
[0031] The control unit may include a question processing engine that converts the natural language question into a meta-question that adds an annotation to clarify the natural language question, transmits the meta-question to the NLP model, and receives a meta-answer that can generate a query from the NLP model, and a query processing engine that generates a query based on the meta-answer, queries the database unit with the query to generate an answer, and provides the answer to the user terminal via the interface unit.
[0032] The question processing engine can generate a meta-command that adds a command language to the meta-answer that specifies a template for outputting an answer, and can transmit the meta-command to the query processing engine via the interface unit.
[0033] Furthermore, the query processing engine can generate the query using the meta-command. [Effects of the Invention]
[0034] According to the present invention, by clarifying the natural language question input by the user into a question that the NLP model can understand, it is possible to provide an answer that more accurately corresponds to the natural language question. In other words, by converting the user's natural language question into a meta-question, to which annotations (hints) necessary for query generation are added, before transmitting it to the NLP model, the natural language question input by the user can be clarified, and the user can be provided with an answer that more accurately corresponds to the natural language question.
[0035] The present invention provides a more accurate response to the database section by generating queries based on meta-answers to meta-questions posed to an NLP model, and by converting the meta-answers to match the format of the database section before generating the queries. In other words, the meta-answers and queries utilize the index terms used in the data of the database section.
[0036] This invention verifies the access permissions set for each user making a query and provides answers to natural language queries. In other words, when generating queries based on meta-answers, it verifies the user-specific permissions for the natural language query. This prevents unauthorized users from exposing data in the database.
[0037] This invention reduces the number of questions asked to an NLP model when converting natural language questions into meta-questions by screening for similar natural language questions or meta-questions. This suppresses external network exposure through the NLP model and reduces the occurrence of security issues.
[0038] This invention reduces the load on the database caused by repeated identical or similar questions by immediately providing users with previously stored answers to similar natural language questions, thereby saving users costs. [Brief explanation of the drawing]
[0039] [Figure 1] This is a schematic diagram showing a data service system using a natural language processing algorithm according to an embodiment of the present invention. [Figure 2] This is a block diagram of the data service device shown in Figure 1. [Figure 3] This flowchart illustrates a data service method using a natural language processing algorithm for a data service device according to an embodiment of the present invention. [Figure 4] This flowchart illustrates a data service method using a natural language processing algorithm for a data service system according to an embodiment of the present invention. [Figure 5] Figure 3 is an example screen showing the response to a user's natural language question using the data service method. [Modes for carrying out the invention]
[0040] It should be noted that the following description will only explain the parts necessary to understand the embodiments of the present invention, and descriptions of other parts will be omitted to the extent that they do not depart from the spirit of the invention.
[0041] The terms and words used in this specification and claims, as described below, should not be interpreted as being limited to their ordinary or dictionary meanings, but rather as meanings and concepts consistent with the technical idea of the present invention, based on the principle that inventors may appropriately define the concepts of terms in order to best describe their invention. Accordingly, it should be understood that the embodiments and configurations shown in the drawings described herein are merely preferred embodiments of the present invention and do not represent the entire technical idea of the present invention, and that there may be various equivalents and modifications that can substitute for them at the time of filing.
[0042] Embodiments of the present invention will be described in more detail below with reference to the attached drawings. Figure 1 is a schematic diagram showing a data service system using a natural language processing algorithm according to an embodiment of the present invention.
[0043] Referring to Figure 1, the data service system 100 according to this embodiment is a data service system that generates queries via a natural language processing algorithm in response to natural language questions and provides answers calculated by performing the generated queries.
[0044] The data service system 100 according to this embodiment includes a user terminal 10, a data service device 20, and an NLP (natural language processing) model 30. The user terminal 10 and the data service device 20 send and receive data via a communication network.
[0045] The user terminal 10 inputs natural language questions to the data service device 20 and receives answers to those questions from the data service device 20. The natural language questions can be input in voice or text format via an input device provided by the user terminal 10. This input device may include a keypad, touchscreen, microphone, etc. Such a user terminal 10 is a communication terminal capable of communicating with the data service device 20, and can be a personal computing system such as a smartphone, laptop, desktop, handheld PC, or tablet PC.
[0046] A user using user terminal 10 may be a general user, but in this embodiment, it is a user belonging to a specific group. Here, the specific group is related to the access rights to the database section. That is, the access rights to the database section may be set differently depending on the specific group to which the user belongs. As a result, depending on the specific group to which the user belongs, they may or may not receive answers to natural language questions. For example, the specific group may be divided into companies, departments, job ranks, etc. Information about the specific group to which the user belongs may be included in the user attribute information.
[0047] User attribute information includes the user's personal information, information about the user's device 10, and information about the specific group to which the user belongs.
[0048] The NLP model 30 returns information necessary for query generation to the data service device 20 through natural language processing of natural language questions input from the data service device 20. Such an NLP model 30 includes a large language model (LLM) capable of inferring relationships between words in a huge amount of text data. The NLP model 30 returns information necessary for query generation by analyzing and extracting meaningful information from the text.
[0049] Here, LLM refers to an artificial intelligence system that can process vast amounts of natural language data and produce answers that are often indistinguishable from human-generated text. LLMs are built using deep learning techniques, are trained on massive amounts of text data such as books, articles, and online content, and can derive answers that meet user requests. The best-known LLMs are OpenAI's GPT (Generative Pre-trained Transformer) series and Google's BERT (Bidirectional Encoder Representations from Transformers) model. Such models are used in a variety of applications, including language translation, content generation, and chatbots.
[0050] The NLP model 30 according to this embodiment, as will be described later, returns a meta-response that can generate a query via natural language processing in response to a meta-question input from the data service device 20. Here, the meta-response includes programmable code that can generate a query corresponding to the meta-question.
[0051] The NLP model 30 generates meta-responses by referring to prompts provided by the data service device 20 to the database unit 21.
[0052] Furthermore, the data service device 20 provides answers to natural language questions entered from the user terminal 10. Such a data service device 20 is a server that communicates with the user terminal 10 and the NLP model 30 to process data, and may include, for example, an application server, a computing server, a database server, a file server, a proxy server, and a web server. The data service device 20 may consist of one or more servers.
[0053] The data service device 20 generates queries that can provide answers to natural language questions. Before transmitting the natural language question input by the user to the NLP model 30, the data service device 20 clarifies the natural language question before transmitting it to the NLP model 30. This allows the data service device 20 to provide the user terminal 10 with an answer that corresponds to the natural language question. Here, the query is SQL (Structured Query Language).
[0054] The data service device 20 provides answers to natural language questions as follows: The data service device 20 receives a natural language question from the user terminal 10. The data service device 20 converts the natural language question into a meta-question by adding annotations to clarify the natural language question so that the NLP model 30 can analyze it. The data service device 20 transmits the meta-question to the NLP model 30. The data service device 20 receives a meta-answer from the NLP model 30 that allows it to generate a query in response to the meta-question. The data service device 20 generates a query based on the meta-answer. The data service device 20 queries the database unit 21 with the query to generate an answer. The data service device 20 also provides the answer to the user terminal 10.
[0055] Since the user terminal 10 may input similar or identical questions, the data service device 20 stores previous natural language questions, meta-questions, meta-answers, and answers as cache data. If the cache data contains a question corresponding to the current natural language question or meta-question, the data service device 20 can provide the user terminal 10 with the answer to the corresponding question stored in the cache data. In other words, the data service device 20 can answer questions without a natural language processing process via the NLP model 30.
[0056] The data service device 20 verifies whether the user is entitled to receive an answer to a natural language question. That is, the data service device 20 checks the user's access rights based on user attribute information and provides answers to users who have access rights. Of course, the data service device 20 can also send a message restricting answers to natural language questions to users who do not have access rights.
[0057] When the data service device 20 generates a query based on meta-responses, it can specify a template for the responses to be provided to the user terminal 10. For example, the template may include text, tables, charts, graphs, etc. Charts may include, but are not limited to, pie charts, bar charts, polylinear charts, distributed charts, statistical charts, hierarchical charts, etc.
[0058] Of course, if the natural language question includes template items for the answer, the data service device 20 can provide the answer using the template requested by the user.
[0059] The data service device 20 according to this embodiment will be described in detail below with reference to Figures 1 and 2. Here, Figure 2 is a block diagram of the data service device 20 of Figure 1.
[0060] The data service device 20 includes a database unit 21, an interface unit 23, and a control unit 25. The interface unit 23 receives natural language questions from the user terminal 10 and outputs answers to those natural language questions. The control unit 25 generates queries for the NLP model 30 that can output answers from the database unit 21 to the natural language questions, and adds annotations to the natural language questions to clarify them.
[0061] Here, the database unit 21 stores data that can answer user questions. The database unit 21 includes a vector DB containing index terms for the stored data. The vector DB is provided to the NLP model 30 by the control unit 25 at prompts. The index terms may include the table name and column name of the data.
[0062] The interface unit 23 provides an environment in which the user terminal 10 can connect to the data service device 20. The user terminal 10 can input natural language questions via the interface unit 23 and be provided with answers to the input natural language questions. The interface unit 23 can perform platform functions of the data service device 20.
[0063] The interface unit 23 can relay data exchange between the question processing engine 27 and the query processing engine 29, which constitute the control unit 25.
[0064] Furthermore, the control unit 25 performs overall control of the data service device 20. This control unit 25 includes a question processing engine 27 and a query processing engine 29. The question processing engine 27 converts natural language questions into meta-questions that clarify them by adding annotations, transmits the meta-questions to the NLP model 30, and receives meta-answers from the NLP model 30 that can generate queries. The query processing engine 29 generates queries based on the meta-answers, queries the database unit 21 with the queries to generate answers, and provides these answers to the user terminal 10 via the interface unit 23.
[0065] In this way, the question processing engine 27 adds annotations to natural language questions and transforms them into meta-questions that clarify the natural language questions, so that the NLP model 30 can analyze the natural language questions more accurately.
[0066] In other words, since the natural language questions entered by users contain inaccuracies, if the NLP model 30 were to process the natural language questions directly, it could generate a variety of answers. As a result, existing data service methods that rely on question answering have limitations in providing answers that accurately reflect the natural language questions entered by users.
[0067] Therefore, in this embodiment, instead of directly inputting a natural language question into the NLP model 30, the question processing engine 27 converts the natural language question into a meta-question by adding annotations that clarify the natural language question, and then inputs the converted meta-question into the NLP model 30.
[0068] Annotations include at least one of the following as hints to clarify the natural language question: for example, a sentence, phrase, word, or particle range. Annotations are generated based on natural language processing of the natural language question itself, reflecting index terms for the data stored in the database unit 21 and user attribute information.
[0069] For example, let's consider a case where a natural language question is entered as "Please show me this year's sales figures." The user who entered the natural language question is an employee belonging to the sales department.
[0070] First, if natural language questions are input directly into the NLP model 30, "this year" can be analyzed as "2023 (the relevant fiscal year)," but "sales" is unclear in terms of what kind of sales it refers to, so it will return an inaccurate answer.
[0071] On the other hand, the question processing engine 27 according to this embodiment can add the "sales department" to which the user belongs as a note regarding "sales," and add a note that changes "sales" to "sales amount" by referring to an index term, thereby converting the natural language question into a meta-question such as "The user is an employee belonging to the sales department. Here is the question: Please show me the sales amount status of the sales department in 2023."
[0072] In other words, a meta-question can be described as a natural language question that adds annotations to a natural language question entered by a user to clarify the question's content. Such a meta-question may include a natural language question and may also include user attribute information, examples of meta-answers, and explanations of the rules for creating the item as annotations.
[0073] In this way, the question processing engine 27 converts the natural language question entered by the user into a more clarified meta-question through the process of adding annotations to the natural language question, and provides it to the NLP model 30. As a result, the NLP model 30 can provide a meta-answer that more accurately corresponds to the natural language question.
[0074] The question processing engine 27 can generate metacommands that add a command language to the meta-response, specifying a template for outputting an answer. The question processing engine 27 then transmits the metacommands to the query processing engine 29.
[0075] In this case, the template may include text, tables, charts, graphs, etc. Meta commands can be meta-Jason (JSON). The question processing engine 27 can transmit meta commands directly to the query processing engine 29, or it can transmit them to the query processing engine 29 via the interface unit 23.
[0076] The question processing engine 27 can store previous natural language questions, meta-questions, meta-answers, and answers as cache data. Before transmitting a meta-question for the currently input natural language question to the NLP model 30, the question processing engine 27 checks if there is a question in the cache data that corresponds to the currently input natural language question or meta-question. If no corresponding question is found, the question processing engine 27 transmits the meta-question for the currently input natural language question to the NLP model 30.
[0077] Conversely, if the verification results in a corresponding question, the question processing engine 27 does not transmit a meta-question for the currently input natural language question to the NLP model 30. The question processing engine 27 can transmit a meta-answer corresponding to the currently input natural language question from the cache data to the query processing engine 29, or it can provide an answer corresponding to the currently input natural language question from the cache data to the user terminal 10 via the interface unit 23.
[0078] The query processing engine 29 generates queries using meta-commands. Queries can be in SQL (Structured Query Language).
[0079] Before querying the database unit 21 with the query and generating a response, the query processing engine 29 checks whether the user connected to the user terminal 10 has the necessary access rights to query the database unit 21 with the query.
[0080] Here, since the meta-command or query includes multiple specific items that can query the database unit 21, it is checked whether the user has access rights to these multiple specific items. If the user does not have access rights as a result of the check, a response restriction message can be transmitted to the user terminal 10 via the interface unit 23. Conversely, if the user does have access rights as a result of the check, the query processing engine 29 queries the database unit 21 with the query and generates a response. Here, the user's access rights are set based on the user's attribute information. The specific items include index terms that can query the data in the database unit 21.
[0081] By checking the access permissions set for each user asking the question and providing answers to the questions in natural language, it is possible to prevent unauthorized persons from exposing the data in the database section 21.
[0082] The query processing engine 29 generates responses based on a specified template. For example, responses can be generated as text, tables, charts, graphs, etc.
[0083] The response generated by the query processing engine 29 is provided to the user terminal 10 via the interface unit 23. The query processing engine 29 can also transmit the generated response to the question processing engine 27 via the interface unit 23. The question processing engine 27 concatenates the transmitted response with the corresponding natural language question, meta-question, and meta-answer and stores it as cache data.
[0084] In this way, the more cached data accumulates in the question processing engine 27, the fewer queries can be made to the NLP model 30. That is, by comparing the currently input natural language question and the resulting meta-question with questions stored in the cache data, the number of questions made to the NLP model 30 can be reduced. This reduces exposure to external networks via the NLP model 30 and suppresses the occurrence of security problems. In addition, by immediately providing the user terminal 10 with previously stored answers to similar natural language questions, the load on the database unit 21 due to repeated identical or similar questions can be suppressed, and user costs can be reduced.
[0085] The data service method using the natural language processing algorithm of the data service device 20 according to this embodiment will be described below with reference to Figures 1 to 3. Here, Figure 3 is a flowchart showing the data service method using the natural language processing algorithm of the data service device 20 according to an embodiment of the present invention.
[0086] First, in step S10, the data service device 20 receives a natural language question from the user terminal 10.
[0087] Next, in step S20, the data service device 20 converts the natural language question into a meta-question that clarifies the natural language question by adding annotations to it.
[0088] Next, in stage S30, the data service device 20 transmits the metanatural language question to the NLP model 30.
[0089] Next, in stage S40, the data service device 20 receives a meta-response from the NLP model 30 that can generate a query.
[0090] Next, in stage S50, the data service device 20 generates a query based on the meta-response. That is, the data service device 20 generates a meta-command based on the meta-response. The data service device 20 generates a query using the meta-command.
[0091] Next, in step S60, the data service device 20 queries the database unit 21 with a query and generates a response.
[0092] Furthermore, at stage S70, the data service device 20 provides the response to the user terminal 10.
[0093] The data service method using the natural language processing algorithm of the data service system 100 according to this embodiment will be described below with reference to Figures 1, 2, and 4. Here, Figure 4 is a flowchart showing the data service method using the natural language processing algorithm of the data service system 100 according to an embodiment of the present invention.
[0094] First, in step S11, the user terminal 10 inputs a natural language question via the interface unit 23. That is, the user terminal 10 connects to the data service device 20 via the interface unit 23. The interface unit 23 can perform a login process to verify the user of the user terminal 10. The interface unit 23 verifies the user's attribute information through the login process. Through the logged-in user terminal 10, the user inputs a natural language question via the input unit in text or voice. The data service device 20 displays the input natural language question as text.
[0095] Next, in step S13, the interface unit 23 transmits the input natural language question to the question processing engine 27.
[0096] Next, in stage S15, the question processing engine 27 converts the natural language question into a meta-question. That is, the question processing engine 27 converts the natural language question into a meta-question that adds annotations to the natural language question to clarify it, so that the NLP model 30 can analyze the natural language question more accurately.
[0097] Next, in step S17, the question processing engine 27 checks if there is a question in the cache data that corresponds to the currently entered natural language question or meta-question, i.e., an identical or similar question.
[0098] If, as a result of the verification at stage S17, there is a corresponding question, the question processing engine 27 does not transmit a meta-question for the currently input natural language question to the NLP model 30. The question processing engine 27 can transmit a meta-answer corresponding to the currently input natural language question from the cache data to the query processing engine 29, or it can provide an answer corresponding to the currently input natural language question from the cache data to the user terminal 10 via the interface unit 23. In this embodiment, an example is disclosed in which the question processing engine 27 extracts an answer from the cache data at stage S19, transfers the extracted answer to the interface unit 23 at stage S21, and the interface unit 23 transmits the answer to the user terminal 10 at stage S23.
[0099] Conversely, if the confirmation at stage S17 reveals no corresponding question, at stage S25, the question processing engine 27 communicates a meta-question regarding the currently input natural language question to the NLP model 30.
[0100] Next, in stage S27, the NLP model 30 generates meta-answers through natural language processing of meta-questions. At this time, the NLP model 30 can generate meta-answers by referring to prompts provided by the question processing engine 27. This allows the question processing engine 27 to guide the NLP model 30 to generate meta-answers that include index terms used in the data of the database unit 21.
[0101] Here, the prompt can be provided from the question processing engine 27 to the NLP model 30 before the S11 stage is performed. Since the NLP model 30 generates meta-answers based on the prompt for the meta-questions, it can generate meta-answers that better conform to the natural language questions compared to when the natural language questions are input directly to the NLP model 30.
[0102] Next, in stage S29, the NLP model 30 forwards the meta-response to the question processing engine 27.
[0103] Next, in stage S31, the question processing engine 27 generates metacommands based on the metaresponses. The question processing engine 27 can generate metacommands by adding a command language that specifies a template to the metaresponses.
[0104] Next, in stage S33, the question processing engine 27 transfers the meta-command to the interface unit 23.
[0105] Next, in step S35, the interface unit 23 transmits the meta command to the query processing engine 29.
[0106] Next, in step S37, the query processing engine 29 generates a query using meta commands.
[0107] Before executing the query, the query processing engine 29 checks the access permissions of the user who entered the natural language question at the S39 stage.
[0108] If the verification at stage S39 indicates that access rights are not granted, at stage S41 the query processing engine 29 forwards a response restriction message to the interface unit 23. Next, at stage S43 the interface unit 23 transmits the response restriction message to the user terminal 10.
[0109] Conversely, if the verification at stage S39 confirms that access rights are granted, at stage S45 the query processing engine 29 queries the database unit 21 and generates a response at stage S47. In other words, the query processing engine 29 performs a query and generates a response.
[0110] Next, in step S49, the query processing engine 29 transfers the response to the interface unit 23.
[0111] Furthermore, at stage S51, the interface unit 23 transmits the response to the user terminal 10.
[0112] Although not shown in the diagram, the interface unit 23 can transmit the answer to the question processing engine 27. The question processing engine 27 concatenates the transmitted answer with the corresponding natural language question, meta-question, and meta-answer and stores it as cache data.
[0113] The data service method according to this embodiment will be explained below with reference to the example screen diagram in Figure 5. Here, Figure 5 is an example screen diagram showing the response to a user's natural language question using the data service method in Figure 3.
[0114] Referring to Figure 5, the interface unit 23 shows the question and answer window provided to the user terminal 10.
[0115] User terminal 10 can input natural language questions through a question-and-answer window. For example, the user can input, "Please show me some schools in each city district with fewer than 50 students." The user is the homeroom teacher for class 3, 6th grade, Seoul Elementary School.
[0116] The question processing engine 27 can generate meta-questions like those shown in Table 1 below by adding annotations to natural language questions. The annotations utilize user attribute information (Seoul Elementary School, teacher) and index terms used in the school lunch performance analysis dataset from the database unit 21, based on the user attribute information.
[0117] [Table 1]
[0118] The question processing engine 27 can transmit meta-questions to the NLP model 30 and receive meta-answers as shown in Table 2 below. The NLP model 30 also generates meta-answers by referring to the index terms used in the prompt's school lunch performance analysis dataset.
[0119] [Table 2]
[0120] The question processing engine 27 can provide the query processing engine 29 with meta-commands like those shown in Table 3 below, based on the meta-responses. The meta-command specifies "table" as the response template. The "table" template will output the responses in both table and graph formats.
[0121] [Table 3]
[0122] Furthermore, the query processing engine 29 can generate queries like those shown in Table 4 based on meta commands.
[0123] [Table 4]
[0124] Furthermore, the query processing engine 29 performs queries to generate answers including tables and graphs, and transmits them to the interface unit 23. The interface unit 23 displays these answers in the question answer window.
[0125] On the other hand, while Figure 5 shows an example where meta-answers are displayed together, the question answer window displayed on the user terminal 10 may not display meta-answers.
[0126] The embodiments disclosed herein and in the drawings are merely examples to aid understanding and are not intended to limit the scope of the invention. It will be obvious to those ordinary skill in the art to which the invention pertains that other modifications based on the technical idea of the invention are also possible, in addition to the embodiments disclosed herein. [Explanation of Symbols]
[0127] 10: User terminal 20: Data service equipment 21: Database Department 23: Interface section 25: Control Unit 27: Question Processing Engine 29: Query processing engine 30: NLP Model 100: Data Service System
Claims
1. A method for providing services to a data service device using a natural language processing algorithm, The stage where the user inputs a natural language question from their terminal, The process includes: a step of adding annotations to the natural language question to transform it into a meta-question that clarifies the natural language question so that it can be analyzed by an NLP (natural language processing) model; The step of transmitting the aforementioned meta-questions to the NLP model, The process involves receiving a meta-response that can generate a query from the aforementioned NLP model, The steps include generating queries based on the aforementioned meta-responses, The steps include: querying the database section with the aforementioned query to generate a response; The step of providing the aforementioned answer to the user terminal, Includes, Before the step of inputting the aforementioned natural language question, the NLP model is provided with a prompt containing a vector that includes a search term for the data stored in the database section. A data service method using a natural language processing algorithm, characterized in that the NLP model generates the meta-response by referring to the prompt.
2. In the step of converting to the aforementioned meta-question, The data service method using the natural language processing algorithm according to claim 1, characterized in that the annotation is generated using index terms for data stored in the database unit and user attribute information.
3. The data service method using the natural language processing algorithm according to claim 2, characterized in that the annotation includes at least one of a sentence, phrase, word, and particle range as a hint to clarify the natural language question.
4. The data service method using the natural language processing algorithm according to claim 3, characterized in that the meta-question includes the natural language question and the annotations include user attribute information, examples of meta-answers, and explanations of creation rules for the items.
5. At the stage of receiving the aforementioned meta-response, The data service method using a natural language processing algorithm according to claim 1, characterized in that the meta-response includes programmable code capable of generating queries corresponding to the meta-questions.
6. In the step of generating the aforementioned query, A data service method using a natural language processing algorithm according to claim 5, characterized in that a meta-command is generated by adding a command language that specifies a template on which an answer can be output to the meta-answer, and the query is generated using the meta-command.
7. In the step of generating the aforementioned query, The system checks whether the user connected to the user terminal has the necessary access rights to query the database section using the query. A data service method using a natural language processing algorithm according to claim 6, characterized in that the step of generating the answer is performed when the aforementioned access rights are available.
8. The meta-command or query includes a plurality of specific items to be queried in the database section, and checks whether the user has access rights to the plurality of specific items. The data service method using a natural language processing algorithm according to claim 7, characterized in that if the user terminal does not have access rights as a result of the verification, a response restriction message is provided to the user terminal.
9. In the step of providing it to the user terminal, A data service method using a natural language processing algorithm according to claim 6, characterized in that the aforementioned response is provided in a specified template.
10. Prior to the stage of transmitting to the NLP model, the process further includes storing previous natural language questions, meta-questions, meta-answers, and answers as cache data, and checking whether there is a question in the cache data that corresponds to the currently entered natural language question or meta-question. If, upon verification, a corresponding question exists, the NLP model is not informed of the meta-question for the currently input natural language question. Instead, the query is generated based on the meta-answer corresponding to the corresponding question stored in the cache data, or the answer corresponding to the corresponding question stored in the cache data is provided to the user terminal. A data service method using a natural language processing algorithm according to claim 9, characterized in that if there is no corresponding question, the step of transmitting the meta-question to the NLP model is performed.
11. The data service method using the natural language processing algorithm according to claim 1, characterized in that the query is SQL (Structured Query Language).
12. The data service method using the natural language processing algorithm according to claim 1, characterized in that the NLP model includes an LLM (large language model).
13. Database Department, An interface unit that takes a natural language question as input from a user terminal and outputs an answer to the natural language question, Annotations are added to the aforementioned natural language question to transform it into a meta-question that clarifies the aforementioned natural language question. The aforementioned meta-questions are transmitted to an NLP (Natural Language Processing) model. The NLP model receives a meta-response that can generate a query. Based on the aforementioned meta-responses, a query is generated. The aforementioned query queries the database to generate a response, A control unit that provides the aforementioned answer to the user terminal, Includes, The control unit, before inputting the natural language question, provides the NLP model with a prompt containing a vector that includes a search term for data stored in the database unit. The NLP model is a data service device using a natural language processing algorithm, characterized in that it generates the meta-response by referring to the prompt.
14. The control unit, A question processing engine that adds annotations to the aforementioned natural language question to transform it into a meta-question that clarifies the natural language question, transmits the meta-question to the NLP model, and receives a meta-answer from the NLP model that can generate a query. A query processing engine that generates a query based on the aforementioned meta-response, queries the database unit with the query to generate a response, and provides the response to the user terminal via the interface unit, A data service device using a natural language processing algorithm according to claim 13, characterized in that it includes the above.
15. The question processing engine generates a metacommand that adds a command language to the metaresponse that specifies a template for outputting an answer, and transmits the metacommand to the query processing engine via the interface unit. The data service device using the natural language processing algorithm according to claim 14, characterized in that the query processing engine generates the query using the meta command.
Citation Information
Patent Citations
Data processing method, device and equipment and computer readable storage medium
CN116821103A
System for generating template used to generate query to knowledge base from natural language question and question answering system including the same
KR101987915B1
Method and system for user experience personalization in data management systems using machine learning
US11269665B1
Artificial intelligence geospatial search
US11809508B1
System and method for a cognitive conversation service
US20220358295A1