Data service apparatus and method using natural language processing algorithm
The data service system addresses the challenges of existing question answering systems by converting natural language questions into annotated meta-questions, ensuring accurate and secure query generation and processing, thereby reducing database load and user costs while minimizing security risks.
Patent Information
- Application Number
- JP2024090378
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-24
- Filing Date
- 2024-06-04
- Publication Date
- 2025-06-05
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing question answering systems struggle to provide accurate answers to natural language questions due to variations in question forms, lack of reflection of user access rights, inability to correct queries post-generation, excessive database load from repeated queries, and security risks from external network exposure.
A data service system and method using natural language processing algorithms that convert natural language questions into meta-questions with added annotations, allowing for accurate query generation, reflection of user access rights, query correction, reduced database load, and minimized security risks by utilizing a meta-question and meta-answer process.
The system provides more accurate answers to natural language questions, ensures secure and authorized access to database information, reduces database load and user costs, and minimizes security threats by optimizing query generation and processing.
Smart Images

Figure 2025085585000001_ABST
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 to perform a data service that converts a question in a natural language into a query and answers the query. [Background technology]
[0002] A typical question answering system analyzes a user's natural language question using a natural language processing algorithm, generates a response from a database based on the analysis result, and provides the response to the user. The question answering system supports queries that can generate a response from a database based on a natural language processing algorithm.
[0003] The quality of the answers provided by such question answering systems depends on the queries that are generated based on the natural language question.
[0004] A query is determined by a natural language question. That is, the natural language question posed by a user may be substantially the same question but may have various forms. However, currently, question answering systems are substantially the same but do not output the same answer to various forms of natural language questions through the same query.
[0005] This allows for a method in which a user directly creates a query. However, while creating a query is possible for an expert, it is not easy for a general user as a non-expert in practice. Although the reliability of a query created by a question answering system is higher than that of a general user, it is less reliable than a query created by an expert. Therefore, existing question answering systems may output non-identical responses to natural language questions that are essentially the same but have various forms.
[0006] When generating queries for natural language questions, question answering systems currently do not reflect the access rights to a database for each user, which means that access rights to a database must be set for each user.
[0007] Because the question answering system is responsible for generating the queries, they cannot be easily corrected after they have been generated.
[0008] Although the same or similar questions may be repeatedly asked using a question answering system, even in this case, the question answering system repeatedly queries a database through the generation of queries, which places a load on the database and, from the user's perspective, causes problems in that excessive costs are incurred due to the natural language questions.
[0009] In addition, security problems may occur due to the use of external networks for natural language processing, i.e., security problems may occur due to the exposure of the database to external networks through query generation. [Prior art documents] [Patent documents]
[0010] [Patent Document 1] Korean Patent No. 10-1987915 Summary of the Invention [Problem to be solved by the invention]
[0011] SUMMARY OF THE PRESENTLY PREFERRED EMBODIMENTS It is therefore an object of the present invention to provide a data service system and method using natural language processing algorithms that can provide answers that more accurately match 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 questions in natural language by reflecting access rights to a database unit for each user.
[0013] It is yet another object of the present invention to provide a data service system and method using natural language processing algorithms that can be corrected during the query generation process.
[0014] It is still another object of the present invention to provide a data service system and method using a natural language processing algorithm that can reduce the load on the database caused by the repetition of the same or similar questions and can reduce costs for users.
[0015] It is still another object of the present invention to provide a data service system and method using a natural language processing algorithm that can suppress exposure of a database unit to an external network and minimize the occurrence of security problems. [Means for solving the problem]
[0016] In order to achieve the above object, the present invention provides a service method for a data service device using a natural language processing algorithm, including the steps of: inputting 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 an annotation so that the natural language question can be analyzed by an NLP (natural language processing) model; transmitting the meta-question to an NLP model; receiving a meta-answer from the NLP model that can generate a query; generating a query based on the meta-answer; querying a database unit with the query to generate an answer; and providing the answer to the user terminal.
[0017] In the step of converting into a meta-question, the annotations may include at least one of sentences, phrases, words and particle ranges as hints for clarifying the natural language question.
[0018] The annotations may be generated using index terms for data stored in the database and user attribute information.
[0019] The meta-question includes the natural language question, and may include, as the annotations, user attribute information, examples of meta-answers, and explanations of creation rules for the item.
[0020] In the step 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 portion to the NLP model.
[0022] The NLP model can reference the prompt to generate the meta-answer.
[0023] In the step of generating the query, a meta command may be generated by adding a command language to the meta answer, the command language specifying a template capable of outputting an answer, and the query may be generated by the meta command.
[0024] In the step of generating the query, it may be possible to check whether a user connected to the user terminal has access authority to query the database unit with the query.
[0025] The meta command or the query includes a plurality of specific items to be queried in a database unit, and checks whether the user has access authority to the plurality of specific items. If the check result indicates that the user does not have access authority, a response restriction message can be provided to the user terminal.
[0026] In the step of providing the answer to the user terminal, the answer may be provided in a specified template.
[0027] The data service method according to the present invention may further include, prior to the step of transmitting to the NLP model, a step of storing previous natural language questions, meta questions, meta answers, and answers as cache data, and checking whether the cache data contains a question corresponding to the currently input natural language question or meta question. If it is found that there is a corresponding question as a result of the checking, the meta question for the currently input natural language question may not be transmitted to the NLP model, and if there is no corresponding question, the meta question may be transmitted to the NLP model.
[0028] The query may be in Structured Query Language (SQL).
[0029] The NLP model may include a large language model (LLM).
[0030] The present invention also provides a data service device 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 that can output an answer from the database unit to an NLP (natural language processing) model for the natural language question, and transmits a meta-question that clarifies the natural language question by adding an annotation to the natural language question to the NLP model.
[0031] The control unit may include a question processing engine that adds annotations to the natural language question to convert 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; 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 by adding a command language for specifying a template capable of outputting an answer to the meta answer, and transmit the meta command to the query processing engine via the interface unit.
[0033] The query processing engine may also generate the query according to the meta command. Effect of the Invention
[0034] According to the present invention, a natural language question input by a user is clarified into a question that an NLP model can understand, thereby providing an answer that more accurately matches the natural language question. That is, the natural language question input by the user is converted into a meta-question in which an annotation (hint) necessary for query generation is added to the natural language question before being transmitted to the NLP model, and then transmitted, thereby clarifying the natural language question input by the user and providing the user with an answer that more accurately matches the natural language question.
[0035] When generating a query based on a meta-answer to a meta-question posed to an NLP model, the present invention converts the query to match the format of the database section, thereby providing an answer that more accurately matches the database section. That is, the meta-answer and the query utilize index terms used in the data of the database section.
[0036] The present invention provides answers to questions in natural language by checking the access authority set for each user who asks a question. That is, when generating a query based on a meta-answer, the authority for each user of the natural language question is checked. This makes it possible to prevent data in the database from being exposed by unauthorized persons.
[0037] In the present invention, when converting a natural language question into a meta-question, the number of queries to the NLP model can be reduced by screening similar natural language questions or meta-questions, thereby suppressing exposure to external networks via the NLP model and preventing security issues.
[0038] The present invention can reduce the load on the database caused by the repetition of the same or similar questions by immediately providing the user with previously stored answers to questions in similar natural languages, thereby reducing costs for the user. [Brief description of the drawings]
[0039] [Figure 1] FIG. 1 is a schematic diagram illustrating a data service system using a natural language processing algorithm according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram showing the data service device of FIG. 1; [Diagram 3] 2 is a flowchart showing a data service method using a natural language processing algorithm of a data service device according to an embodiment of the present invention. [Figure 4] 2 is a flowchart showing a data service method using a natural language processing algorithm of the data service system according to an embodiment of the present invention. [Diagram 5] 4 is a diagram showing an example of a screen showing a response to a user's question in natural language according to the data service method of FIG. 3; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0040] It should be noted that in the following description, only the parts necessary for understanding the embodiments of the present invention will be described, and the description of other parts will be omitted to the extent that it does not deviate from the gist of the present invention.
[0041] The terms and words used in the following specification and claims should not be interpreted as being limited to their ordinary or dictionary meanings, but should be interpreted as meanings and concepts that correspond to the technical ideas of the present invention based on the principle that the inventor can appropriately define the concepts of terms to best describe his / her invention. Therefore, the embodiments described in this specification and the configurations shown in the drawings are merely preferred embodiments of the present invention and do not fully describe the technical ideas of the present invention, so it should be understood that there may be various equivalents and modifications that can replace them at the time of filing this application.
[0042] Hereinafter, embodiments of the present invention will be described in more detail with reference to the accompanying drawings. FIG. 1 is a schematic diagram illustrating a data service system using a natural language processing algorithm according to an embodiment of the present invention.
[0043] Referring to FIG. 1, a data service system 100 according to the present embodiment is a system that performs a data service by generating a query through a natural language processing algorithm for a natural language question, executing the generated query, and providing a calculated answer.
[0044] The data service system 100 according to the present embodiment includes a user terminal 10, a data service apparatus 20, and an NLP (natural language processing) model 30. The user terminal 10 and the data service apparatus 20 transmit and receive data via a communication network.
[0045] The user terminal 10 inputs a question in a natural language to the data service apparatus 20 and receives an answer to the question in a natural language from the data service apparatus 20. The question in a natural language can be input in the form of voice or text through an input unit provided by the user terminal 10. Here, the input unit may include a keypad, a touch screen, a microphone, etc. Such a user terminal 10 is a communication terminal capable of communicating with the data service apparatus 20, and may be, for example, a personal computing system such as a smartphone, a laptop, a desktop, a handheld PC, or a tablet PC.
[0046] The user who uses the user terminal 10 may be a general user, but in this embodiment, the user is a user who belongs to a specific group. Here, the specific group is related to the access authority to the database unit. In other words, the access authority to the database unit may be set differently depending on the specific group to which the user belongs. As a result, a user may or may not receive an answer to a question in natural language depending on the specific group to which the user belongs. For example, the specific group may be divided into a company, a department, a job rank, etc. Information on the specific group to which the user belongs may be included in the user attribute information.
[0047] The user attribute information includes personal information about the user, information about the user terminal 10, and information about a specific group to which the user belongs.
[0048] The NLP model 30 returns information required for query generation to the data service device 20 through natural language processing of a natural language question 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 required 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 generate answers that are often indistinguishable from human-generated text. LLMs are built using deep learning techniques and are trained on vast amounts of text data such as books, articles, and online content to derive answers based on user requests. The best-known LLMs include 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 the present embodiment, which will be described later, returns a meta-answer capable of generating a query through natural language processing for the meta-question input from the data service device 20. Here, the meta-answer includes programmable code capable of generating a query corresponding to the meta-question.
[0051] The NLP model 30 generates a meta-answer by referring to a prompt for the database unit 21 provided by the data service device 20 .
[0052] The data service device 20 also provides answers to questions in natural language input from the user terminal 10. Such a data service device 20 is a server that processes data by communicating with the user terminal 10 and the NLP model 30, 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 be composed of one or more servers.
[0053] The data service device 20 generates a query that can provide an answer to a natural language question. Before transmitting a natural language question input by a user to the NLP model 30, the data service device 20 clarifies the natural language question and then transmits it to the NLP model 30. This allows the data service device 20 to provide an answer that matches the natural language question to the user terminal 10. Here, the query is in Structured Query Language (SQL).
[0054] The data service device 20 provides an answer to a question in natural language as follows. That is, the data service device 20 receives a question in natural language from the user terminal 10. The data service device 20 converts the natural language question into a meta-question that adds an annotation to the natural language question 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 for the meta-question, which can generate a query. 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 a similar or identical question may be input from the user terminal 10, 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 an answer to the corresponding question stored in the cache data. That is, the data service device 20 can provide an answer to the question without a natural language processing process via the NLP model 30.
[0056] The data service device 20 checks whether a user is qualified to receive an answer to a natural language question. That is, the data service device 20 checks the access authority of the user based on the user attribute information, and provides an answer to a user who has the access authority. Of course, the data service device 20 can transmit an answer restriction message to a natural language question to a user who does not have the access authority.
[0057] When the data service device 20 generates a query based on the meta-answer, it can specify a template for the answer to be provided to the user terminal 10. For example, the template may include text, a table, a chart, a graph, etc. Charts include, but are not limited to, pie, bar, polygonal, distributed, statistical, hierarchical, etc.
[0058] Of course, if the natural language question includes an answer template item, the data service device 20 can provide an answer in the template requested by the user.
[0059] The data service apparatus 20 according to this embodiment will be specifically described below with reference to Figures 1 and 2. Figure 2 is a block diagram showing the data service apparatus 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 a question in natural language from the user terminal 10 and outputs an answer to the question in natural language. The control unit 25 also generates a query that can output an answer from the database unit 21 to the NLP model 30 for the natural language question, and adds an annotation to the natural language question to clarify the natural language question.
[0061] Here, the database unit 21 stores data that can answer user questions. The database unit 21 includes a vector DB that includes index terms for the stored data. The vector DB is provided to the NLP model 30 under the control of the control unit 25 at a prompt. The index terms may include table names and column names 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 a question in a natural language via the interface unit 23 and receive an answer to the input question in a natural language. The interface unit 23 can perform the function of a platform for the data service device 20.
[0063] The interface unit 23 can relay data exchange between a question processing engine 27 and a query processing engine 29 that constitute the control unit 25 .
[0064] The control unit 25 also performs overall control of the data service device 20. The control unit 25 includes a question processing engine 27 and a query processing engine 29. The question processing engine 27 adds annotations to natural language questions to convert them into meta-questions that clarify the natural language questions, 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 also generates queries based on the meta-answers, queries the database unit 21 with the queries to generate answers, and provides the answers to the user terminal 10 via the interface unit 23.
[0065] In this manner, the question processing engine 27 converts the natural language question into a meta-question that adds annotations to the natural language question to clarify the natural language question so that the natural language question can be more accurately analyzed by the NLP model 30.
[0066] That is, since the natural language question input by the user includes imprecise parts, various answers can be generated if the NLP model 30 performs natural language processing on the natural language question as it is. As a result, the existing data service method through question answering has limitations in providing answers that match the natural language question input by the user.
[0067] Therefore, in this embodiment, instead of inputting a natural language question directly to the NLP model 30, the question processing engine 27 converts the natural language question into a meta-question by adding an annotation to the natural language question that can clarify the natural language question, and inputs the converted meta-question into the NLP model 30.
[0068] The annotation includes at least one of a sentence, a phrase, a word, and a particle range as a hint for clarifying the natural language question. The annotation is 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, the case where a natural language question is input as "Please show me this year's sales situation" will be explained as follows: The user who inputs the natural language question is assumed to be an employee belonging to the sales department.
[0070] First, when a natural language question is directly input into the NLP model 30, “this year” can be parsed as “2023 (the relevant year)”, but since it is unclear what kind of sales “sales” refers to, an inaccurate answer will be returned.
[0071] On the other hand, the question processing engine 27 according to this embodiment adds the "sales department" to which the user belongs as an annotation for "sales," and annotates "sales" to change it to "sales amount" by referring to the index term, and can convert the natural language question into a meta-question such as "The user is an employee of the sales department. Next is a question. Please show me the sales amount status of the sales department in 2023."
[0072] In other words, a metaquestion is a natural language question that adds annotations to a natural language question entered by a user to clarify the question. Such a metaquestion includes a natural language question, and may include annotations such as user attribute information, examples of metaanswers, and explanations of creation rules for items.
[0073] In this way, the question processing engine 27 converts the natural language question entered by the user into a clarified meta-question through the process of adding annotations to the natural language question and provides it to the NLP model 30, thereby enabling the NLP model 30 to provide a meta-answer that can calculate an answer that more accurately matches the natural language question.
[0074] The question processing engine 27 can generate meta-commands by adding a command language that specifies a template that can output an answer to the meta-answer. The question processing engine 27 transmits the meta-commands to the query processing engine 29.
[0075] In this case, the template may include text, a table, a chart, a graph, etc. The meta command may be a meta Jason (JSON). The question processing engine 27 may transmit the meta command directly to the query processing engine 29, or may transmit the meta command 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 whether the cache data contains a question corresponding to the currently input natural language question or meta question. If the check shows that there is no corresponding question, the question processing engine 27 transmits a meta question for the currently input natural language question to the NLP model 30.
[0077] On the other hand, if the confirmation result shows that there is a corresponding question, the question processing engine 27 does not transmit a meta-question for the natural language question currently input to the NLP model 30 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 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, which may be in Structured Query Language (SQL).
[0079] Before querying database unit 21 with a query and generating an answer, query processing engine 29 checks whether the user connected to user terminal 10 has the access authority to query database unit 21 with the query.
[0080] Here, since the meta command or query includes a number of specific items for which the database unit 21 can be queried, it is checked whether the user has access authority to the multiple specific items. If the check shows that there is no access authority, an answer restriction message can be transmitted to the user terminal 10 via the interface unit 23. Conversely, if the check shows that there is access authority, the query processing engine 29 queries the database unit 21 with the query to generate an answer. Here, the user's access authority is set based on the user's attribute information. The specific items include index terms for which data in the database unit 21 can be queried.
[0081] In this way, by checking the access authority set for each user who asks a question and providing an answer to the question in natural language, it is possible to prevent data in the database unit 21 from being exposed by unauthorized persons.
[0082] The query processing engine 29 generates an answer based on a specified template. For example, the answer can be generated in text, a table, a chart, a graph, etc.
[0083] The answer generated by the query processing engine 29 is provided to the user terminal 10 via the interface unit 23. In addition, the query processing engine 29 can transmit the generated answer to the question processing engine 27 via the interface unit 23. The question processing engine 27 links the transmitted answer with the corresponding natural language question, meta question, and meta answer, and stores them as cache data.
[0084] In this way, as more cache data accumulates in the question processing engine 27, the number of queries to the NLP model 30 can be reduced. That is, by comparing the currently input natural language question and the meta-questions associated with it with the questions stored in the cache data and screening them, the number of questions to the NLP model 30 can be reduced. This reduces exposure to external networks via the NLP model 30 and prevents security problems from occurring. In addition, by immediately providing the user terminal 10 with previously stored answers to similar natural language questions, it is possible to prevent the load on the database unit 21 caused by the repetition of the same or similar questions, thereby reducing the user's costs.
[0085] The data service method using the natural language processing algorithm of the data service device 20 according to the present 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 the embodiment of the present invention.
[0086] First, at step S10, the data service device 20 receives a question in a natural language from the user terminal 10.
[0087] Next, in step S20, the data service apparatus 20 converts the natural language question into a meta-question that clarifies the natural language question by adding annotations to the natural language question.
[0088] Next, in step S30, the data service appliance 20 transmits the meta natural language question to the NLP model 30.
[0089] Next, in step S40, the data service appliance 20 receives meta-answers from the NLP model 30 that can generate a query.
[0090] Next, in step S50, the data service apparatus 20 generates a query based on the meta answer, i.e., the data service apparatus 20 generates a meta command based on the meta answer. The data service apparatus 20 generates a query with the meta command.
[0091] Next, in step S60, the data service device 20 queries the database unit 21 with the query and generates a response.
[0092] Also, in step S70, the data service equipment 20 provides a 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 the present embodiment will be described 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 the embodiment of the present invention.
[0094] First, in step S11, the user terminal 10 inputs a question in natural language through the interface unit 23. That is, the user terminal 10 connects to the data service apparatus 20 through the interface unit 23. The interface unit 23 may perform a login process to confirm the user of the user terminal 10. The interface unit 23 confirms the user's attribute information through the login process. Through the logged-in user terminal 10, the user inputs a question in natural language through an input unit in text or voice. The data service apparatus 20 displays the input question in natural language in text.
[0095] Next, in step S13, the interface unit 23 transmits the input question in natural language to the question processing engine 27.
[0096] Next, in step S15, the question processing engine 27 converts the natural language question into a meta-question that adds annotations to the natural language question to clarify the natural language question 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 whether there is a question corresponding to the currently input natural language question or meta-question in the cache data, that is, whether there is an identical or similar question.
[0098] If there is a corresponding question as a result of the check in step S17, the question processing engine 27 does not transmit a meta-question for the natural language question currently input to the NLP model 30 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 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 has been disclosed in which the question processing engine 27 extracts an answer from the cache data in step S19, transfers the extracted answer to the interface unit 23 in step S21, and the interface unit 23 transmits the answer to the user terminal 10 in step S23.
[0099] On the other hand, if there is no corresponding question as a result of the check in step S17, the question processing engine 27 transmits a meta-question for the currently input natural language question to the NLP model 30 in step S25.
[0100] Next, in step S27, the NLP model 30 generates a meta-answer through natural language processing for the meta-question. At this time, the NLP model 30 can generate the meta-answer by referring to a prompt provided by the question processing engine 27. In this way, the question processing engine 27 can guide the NLP model 30 to generate a meta-answer including an index term 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 performing step S11. Since the NLP model 30 generates a meta-answer for the meta-question based on the prompt, it can generate a meta-answer that is more consistent with the natural language question than if the natural language question was directly input to the NLP model 30.
[0102] Next, in step S29, the NLP model 30 forwards the meta-answer to the question processing engine 27.
[0103] Next, in step S31, the question processing engine 27 generates a meta command based on the meta answer. The question processing engine 27 can generate a meta command by adding a command language that specifies a template to the meta answer.
[0104] Next, in step S33, the question processing engine 27 transfers the meta-command to the interface unit 23.
[0105] Next, the interface unit 23 transmits the meta command to the query processing engine 29 in step S35.
[0106] Next, in step S37, the query processing engine 29 generates a query using the meta command.
[0107] Before performing a query, the query processing engine 29 checks, at step S39, the access rights of the user who entered the natural language question.
[0108] If the check result in step S39 indicates that there is no access right, then in step S41 the query processing engine 29 transfers an answer restriction message to the interface unit 23. Next, in step S43, the interface unit 23 transmits the answer restriction message to the user terminal 10.
[0109] On the other hand, if the access authority is confirmed as a result of the check in step S39, the query processing engine 29 queries the database unit 21 with the query in step S45 and generates a response in step S47. That is, the query processing engine 29 performs a query and generates a response.
[0110] Next, in step S49, the query processing engine 29 transfers the answer to the interface unit 23.
[0111] Furthermore, in stage S51, the interface unit 23 transmits the answer to the user terminal 10.
[0112] Although not shown in the figure, the interface unit 23 can transmit the answer to the question processing engine 27. The question processing engine 27 links the transmitted answer with the corresponding natural language question, meta question, and meta answer, and stores them as cache data.
[0113] The data service method according to the present embodiment will be described with reference to the screen example of Fig. 5. Here, Fig. 5 is a screen example showing a response to a user's natural language question according to the data service method of Fig. 3.
[0114] Referring to FIG. 5, a question and answer window provided by the interface unit 23 to the user terminal 10 is shown.
[0115] The user terminal 10 can input a question in natural language through a question and answer window. For example, the user can input, "Please show me how many schools in each city and province have less than 50 students." The user is a teacher in charge of Class 3 of the 6th grade at an elementary school in Seoul.
[0116] The question processing engine 27 can add annotations to the natural language question to generate meta-questions such as those in Table 1 below. As annotations, the user's attribute information (Seoul elementary school, teacher) and index terms used in the school lunch performance analysis dataset from the datasets in the database unit 21 based on the user's attribute information are utilized.
[0117] [Table 1]
[0118] The question processing engine 27 can transmit the meta-question to the NLP model 30 and receive a meta-answer such as that shown in Table 2 below. The NLP model 30 also generates a meta-answer by referring to the index terms used in the meal performance analysis dataset of the prompt.
[0119] [Table 2]
[0120] Based on the meta-answer, the question processing engine 27 can provide the query processing engine 29 with a meta-command such as that shown in Table 3 below. In the meta-command, "table" is specified as the answer template. The answer will be output in the form of a table and a graph using the template "table."
[0121] [Table 3]
[0122] Furthermore, the query processing engine 29 can generate queries such as those shown in Table 4 below based on the meta commands.
[0123] [Table 4]
[0124] Furthermore, the query processing engine 29 performs queries, generates answers including tables and graphs, and transmits them to the interface unit 23. The interface unit 23 displays the answers in a question and answer window.
[0125] On the other hand, in the screen example of FIG. 5, an example in which the meta-answer is displayed together is disclosed, but the meta-answer may not be displayed in the question and answer window displayed on the user terminal 10.
[0126] The embodiments disclosed in the specification and drawings are merely specific examples presented to aid in understanding, and are not intended to limit the scope of the present invention. It is obvious to a person having ordinary skill in the art to which the present invention pertains that other modifications based on the technical concept of the present invention can be implemented 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 service method for a data service device using a natural language processing algorithm, comprising: inputting a natural language question from a user terminal; converting the natural language question into a meta-question that disambiguates the natural language question by adding annotations to the natural language question so that a natural language processing (NLP) model can analyze it; transmitting the meta-question to an NLP model; receiving a meta-answer capable of generating a query from the NLP model; generating a query based on the meta-answers; querying a database unit with the query to generate an answer; providing the answer to the user terminal; A data service method using a natural language processing algorithm comprising:
2. In the step of converting into a meta question, 2. The method of claim 1, wherein the annotation is generated using index terms for the data stored in the database unit and user attribute information.
3. 3. The data service method using a natural language processing algorithm according to claim 2, wherein the annotation includes at least one of a sentence, a phrase, a word, and a particle range as a hint for clarifying the natural language question.
4. 4. The data service method using a natural language processing algorithm according to claim 3, wherein 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. In the step of receiving the meta response, 2. The method of claim 1, wherein the meta-answer comprises programmable code capable of generating a query corresponding to the meta-question.
6. providing the NLP model with prompts for the database portion; The data service method using a natural language processing algorithm according to claim 5 , wherein the NLP model generates the meta-answer by referring to the prompt.
7. In the step of generating the query, A data service method using a natural language processing algorithm as described in claim 5, characterized in that a meta command is generated by adding a command language to the meta answer, which specifies a template that can output an answer, and the query is generated using the meta command.
8. In the step of generating the query, 2. The data service method using a natural language processing algorithm according to claim 1, further comprising: confirming whether a user connected to said user terminal has access authority to inquire about said database unit with said query.
9. the meta command or the query includes a plurality of specific items to be queried in a database unit, and confirms whether the user has access authority to the plurality of specific items; 9. The method for data services using a natural language processing algorithm according to claim 8, wherein, if the user does not have the access right as a result of the check, a response restriction message is provided to the user terminal.
10. In the step of providing to the user terminal, The data service method using a natural language processing algorithm according to claim 7, wherein the answer is provided in the form of a designated template.
11. The method further includes, before the step of transmitting the natural language question, meta-question, meta-answer, and answer to the NLP model, storing previous natural language questions, meta-questions, meta-answers, and answers as cache data, and checking whether the cache data contains a question corresponding to the currently input natural language question or meta-question, 11. The method of claim 10, further comprising the steps of: not transmitting a meta-question for the currently input natural language question to the NLP model if there is a corresponding question as a result of the confirmation; and transmitting the meta-question to the NLP model if there is no corresponding question.
12. 2. The method of claim 1, wherein the query is in SQL (Structured Query Language).
13. The method of claim 1, wherein the NLP model includes a large language model (LLM).
14. A database section; an interface unit that inputs a question in a natural language from a user terminal and outputs an answer to the question in the natural language; A control unit that generates a query that can output an answer from the database unit to an NLP (natural language processing) model for the natural language question, and transmits a meta-question that clarifies the natural language question by adding an annotation to the natural language question to the NLP model; A data service device using a natural language processing algorithm including:
15. The control unit is a question processing engine that annotates the natural language question to convert it into a clarifying meta-question, communicates 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 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; 15. The data service device using a natural language processing algorithm according to claim 14, further comprising:
16. the question processing engine generates a meta command by adding a command language for specifying a template capable of outputting an answer to the meta answer, and transmits the meta command to the query processing engine via the interface unit; 16. The data service device using a natural language processing algorithm according to claim 15, wherein the query processing engine generates the query according to the meta command.
Citation Information
Patent Citations
Data processing method, device and equipment and computer readable storage medium
CN116821103A
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
User context-based enterprise search with multi-modal interaction
US20230027628A1
Cited By
Information processing device, information processing method, and information processing program
JP7889930B1