Apparatus for providing data services and method therefor
The apparatus and method adapt execution plans and queries to system changes, addressing inconsistent responses and costs in question-answering systems by optimizing performance and reducing load through environmental monitoring and meta-query usage.
Patent Information
- Application Number
- JP2025513447
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-11-07
- Filing Date
- 2024-11-20
- Publication Date
- 2026-01-21
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing question-answering systems provide inconsistent responses to similar natural language questions, are difficult for non-experts to create queries, expose databases to external networks, and incur excessive costs due to repeated querying, lacking user access privilege management.
An apparatus and method that includes environmental change detection, analysis, and code update modules to adapt execution plans and queries in response to system changes, optimizing performance and reducing load by using similar questions and meta-queries.
Improves system stability, reduces processing load, and shortens response times while enabling continuous learning and automatic updates without downtime.
Smart Images

Figure 2026502032000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a data service providing technology, and more particularly to an apparatus and method for providing a data service using similar questions and updating the code in response to changes in the environment. [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 results, and provides it to the user. The question-answering system supports queries that can generate a response from a database using a natural language processing algorithm. The quality of the response provided by such a question-answering system depends on the query generated based on the natural language question. The query is determined by the natural language question. That is, natural language questions posed by users are essentially the same but come in various forms. However, currently, question-answering systems do not output the same response to substantially the same natural language question through the same query for various forms of natural language questions. Therefore, a method of allowing users to directly create queries can be considered. However, while query creation may be possible for experts, it is practically difficult for general users as non-experts. While the reliability of queries generated by question-answering systems is higher than that of general users, it is less reliable than queries created by experts. Therefore, existing question-answering systems may output inconsistent responses to substantially the same natural language questions but come in various forms. Currently, question-answering systems do not reflect the access privileges to a database for each user when generating a query for a natural language question. That is, access privileges to a database must be set for each user. Because the question-answering system is responsible for generating the query, it is difficult to correct the query after it is generated. Although the same or similar questions may be repeatedly asked through the question-answering system, the question-answering system repeatedly queries the database through query generation, which places a load on the database and incurs excessive costs for users due to natural language questions. Furthermore, security issues may arise due to the use of an external network for natural language processing. That is, security issues may arise due to the database being exposed to an external network when queries are generated. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Korean Patent Publication No. 2009-0067825 (Published June 25, 2009) Summary of the Invention [Problem to be solved by the invention]
[0004] SUMMARY OF THE INVENTION It is an object of the present invention to provide an apparatus and method for updating code in response to environmental changes.
[0005] Another object of the present invention is to provide an apparatus and method for providing a data service using similar queries. [Means for solving the problem]
[0006] The method for updating code of the present invention includes the steps of: an environmental change detection module accessing a database via a network and monitoring changes in the environment of a system that executes a query; an environmental change analysis module evaluating changes in performance of the system in response to the changes in the system environment through the monitoring; an execution plan reconfiguration module reconfiguring an execution plan so that the numerical value of the performance change is restored to within the predetermined range when the evaluation determines that the numerical value of the change in performance of the system has changed beyond a predetermined range; and a code update module updating code for retrieving the data via a query in accordance with the reconfigured execution plan.
[0007] The execution plan includes a number of processing steps required to execute the query, the commands used in each of the processing steps, the amount of data to be processed in each of the processing steps, and the time and amount of resources required for each of the processing steps.
[0008] The step of reconstructing the execution plan includes the steps of: the execution plan reconstructing module modifying one or more of a plurality of processing steps required for query execution; the execution plan reconstructing module simulating the query using the modified processing steps to derive the amount of data to be processed in each of the plurality of processing steps, the time required for each of the plurality of processing steps, and the amount of resources; the execution plan reconstructing module determining whether a numerical value of performance change can be restored within a predetermined range based on the derived amount of data to be processed in each of the plurality of processing steps, the time required for each of the plurality of processing steps, and the amount of resources; and if the determination results in the numerical value of performance change being restored within the predetermined range, the execution plan reconstructing module reconstructing the existing execution plan with an execution plan including the modified processing steps.
[0009] The step of modifying the processing steps is characterized in that the execution plan restructuring module modifies at least one of a processing order and branching of a plurality of processing steps required for the query execution.
[0010] In the step of reconstructing the execution plan, if there is a change in any one of a database structure and a network setting, the execution plan reconstruction module reconstructs the execution plan by changing a plurality of processing steps required for the query execution and a command used in each of the plurality of processing steps according to the changed database structure and the changed network setting.
[0011] The method further includes a step of an optimization module monitoring a data processing speed and a network response time, and a step of the optimization module optimizing the code if the monitoring determines that the data processing speed decreases below a predetermined critical speed or the network response time increases to or exceeds a predetermined critical time.
[0012] The apparatus for updating code of the present invention includes an environmental change detection module that accesses a database via a network and monitors changes in the environment of a system that executes queries; an environmental change analysis module that evaluates changes in the performance of the system in response to changes in the system's environment through the monitoring; an execution plan reconfiguration module that, when it is determined as a result of the evaluation that the numerical value of the change in performance of the system has changed beyond a predetermined range, reconfigures an execution plan so that the numerical value of the change in performance is restored to within the predetermined range; and a code update module that updates the code for searching the data via a query to match the reconfigured execution plan.
[0013] The execution plan includes a number of processing steps required to execute the query, the commands used in each of the processing steps, the amount of data to be processed in each of the processing steps, and the time and amount of resources required for each of the processing steps.
[0014] The execution plan reconfiguration module modifies one or more of the multiple processing steps required for query execution, performs a simulation on the query using the modified processing steps, derives the amount of data to be processed in each of the multiple processing steps, the amount of time and resources required for each of the multiple processing steps, determines whether the performance change values are restored within a predetermined range based on the derived amount of data to be processed in each of the multiple processing steps, the amount of time and resources required for each of the multiple processing steps, and if the performance change values are restored within the predetermined range as a result of the determination, reconfigures the existing execution plan with an execution plan using the modified processing steps.
[0015] The execution plan restructuring module is characterized by modifying at least one of the processing order and branching of a plurality of processing steps required for the query execution.
[0016] The execution plan reconstructing module, when there is a change in either a database structure or a network setting, reconstructs the execution plan by changing a plurality of processing steps required for the query execution and a command used in each of the plurality of processing steps according to the changed database structure or the changed network setting.
[0017] The method further includes an optimization module that monitors data processing speed and network response time, and performs optimization on the code if the data processing speed decreases below a predetermined critical speed or the network response time increases above a predetermined critical time.
[0018] The method for providing a data service to achieve the above purpose includes a step of receiving a user question written in natural language from a user device by an interface unit; a step of a question processing unit searching for a similar question having a similarity to the user question equal to or greater than a predetermined value from among a plurality of questions stored in a database; a step of, if a similar question having a similarity equal to or greater than a predetermined value is found as a result of the search, a step of a query processing unit generating a response corresponding to the user question using the searched similar question; and a step of the query processing unit transmitting the generated response to the user device via the interface unit.
[0019] The step of searching for questions includes a step in which the question processing unit maps the user question to a predetermined vector space and generates an embedding vector, and a step in which the question processing unit detects, from among the plurality of questions stored in the database, a question whose distance in the vector space to each embedding vector of the plurality of questions stored in the database is less than a predetermined value as the similar question.
[0020] The step of searching for a question includes the steps of: extracting keywords corresponding to column names of a database included in the user question by the question processor; generating key-value data corresponding to the user question by performing key-value mapping by the question processor based on the keywords; and comparing key-value data of a plurality of questions stored in the database with the key-value data of the user question by the question processor, and detecting, as the similar question, a question having key-value data whose similarity with the key-value data of the user question is equal to or greater than a predetermined value.
[0021] The method further includes, before the step of searching for similar questions, a step in which the question processor searches a word dictionary that stores words to be replaced with words used in the database; and, if a word that can be replaced with a word used in the database is found among the words included in the user question through the search, the question processor replaces the word with the word used in the database.
[0022] The step of generating the response includes a step of the query processing unit generating a query using a query of the similar question, a step of the query processing unit executing a query against the database using an execution plan of the similar question and receiving a response corresponding to the user question from the database, and a step of the query processing unit transmitting the response to the user device via the interface unit.
[0023] The method further includes, when the search result does not find a similar question having a similarity greater than or equal to a predetermined value, the question processor adding an annotation to the user question to convert it into a metaquestion; the question processor deriving an adaptive metaquestion from the metaquestion through a natural language processing model; the question processor adding a template to the adaptive metaquestion to generate a metacommand; the query processor generating a query based on the metacommand; the query processor generating an execution plan corresponding to the generated query for the database, executing the query according to the generated execution plan, and receiving a response corresponding to the user question from the database; the query processor mapping and storing the user question, the query corresponding to the user question, and the execution plan corresponding to the query; and the query processor transmitting the response to the user device via the interface unit.
[0024] The device for providing a data service to achieve the above purpose includes an interface unit that receives a user question in natural language from a user device; a question processing unit that searches for a similar question from a plurality of questions stored in a database that has a similarity to the user question that is greater than or equal to a predetermined value; and a query processing unit that, if a similar question having a similarity greater than or equal to a predetermined value is found as a result of the search, generates a response corresponding to the user question using the searched similar question and transmits the generated response to the user device via the interface unit. [Effects of the Invention]
[0025] According to the present invention, by detecting environmental changes in real time and automatically updating the execution plan and code accordingly, system stability is improved, work efficiency is increased, and adaptability to various environments is possible. Furthermore, the present invention enables continuous system learning and improvement, and automatic code updates can be performed without downtime.
[0026] Furthermore, according to the present invention, by generating a query using an existing question and providing a response via the generated query, the process load can be reduced and the response time can be shortened. [Brief explanation of the drawings]
[0027] [Figure 1] FIG. 1 is a diagram illustrating the configuration of a system for updating code in response to changes in the environment according to an embodiment of the present invention. [Figure 2] FIG. 2 is a diagram illustrating the configuration of a device for updating code in response to changes in the environment according to an embodiment of the present invention. [Figure 3] FIG. 3 is a diagram illustrating a detailed configuration of an apparatus for providing a data service according to an embodiment of the present invention. [Figure 4] FIG. 4 is a flowchart illustrating a method for updating code in response to environmental changes according to an embodiment of the present invention. [Figure 5] FIG. 5 is a flowchart illustrating a method for reconstructing an execution plan according to an embodiment of the present invention. [Figure 6] FIG. 6 is an exemplary diagram of a hardware system for implementing an apparatus for updating code according to environmental changes according to an embodiment of the present invention. [Figure 7] FIG. 7 is a diagram illustrating the configuration of a system for providing data services according to an embodiment of the present invention. [Figure 8] FIG. 8 is a diagram illustrating the configuration of a device for providing a data service according to an embodiment of the present invention. [Figure 9] FIG. 9 is a flowchart illustrating a method for providing a data service using similar questions according to an embodiment of the present invention. [Figure 10] FIG. 10 is a flowchart illustrating a method for searching for similar questions according to an embodiment of the present invention. [Figure 11]FIG. 11 is a flowchart illustrating a method for searching for similar questions according to another embodiment of the present invention. [Figure 12] FIG. 12 is a flowchart illustrating a method for providing a response according to one embodiment of the present invention. [Figure 13] FIG. 13 is a flowchart illustrating a method for providing a response according to another embodiment of the present invention. [Figure 14] FIG. 14 is a diagram illustrating an example of a hardware system for implementing an apparatus for providing a data service using similar queries according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0028] Please note that in the following description, only the parts necessary for understanding the embodiments of the present invention will be described, and descriptions of other parts will be omitted to the extent that they do not deviate from the gist of the present invention.
[0029] The terms and words used in the following specification and claims should not be interpreted limitedly to their ordinary or dictionary meanings, but should be interpreted along the meanings and concepts that correspond to the technical idea of the present invention, in accordance with the principle that the inventor can appropriately define the concept of the term to best describe his / her invention. Therefore, it should be understood that the embodiment described in this specification and the configurations shown in the drawings are merely the most preferred embodiment 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 replace them at the time of filing this application.
[0030] Hereinafter, embodiments of the present invention will be described in more detail with reference to the accompanying drawings.
[0031] [Apparatus and method for updating code in response to environmental changes] First, a system and apparatus for updating code in response to environmental changes according to an embodiment of the present invention will be described. Fig. 1 is a diagram illustrating the configuration of a system for updating code in response to environmental changes according to an embodiment of the present invention. Fig. 2 is a diagram illustrating the configuration of an apparatus for updating code in response to environmental changes according to an embodiment of the present invention. Fig. 3 is a diagram illustrating the detailed configuration of an apparatus for providing data services according to an embodiment of the present invention.
[0032] Referring to FIG. 1, a data service system 10 according to this embodiment is a system that provides 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 response.
[0033] The data service system 10 includes a user device 100 , a service server 200 and a model server 300 .
[0034] The model server 300 is a server on which a natural language processing (NLP) model is executed. In the embodiment of the present invention, the model server 300 is illustrated as a device separate from the service server 200. However, the natural language processing model NLP can operate in the service server 200, and in such a case, the model server 300 can operate as a component of the service server 200.
[0035] The user device 100, the service server 200, and the model server 300 can transmit and receive data via a communication network.
[0036] The user device 100 inputs a natural language question to the service server 200 and receives a response to the natural language question from the service server 200. The natural language question may be input in the form of voice or text via an input unit provided by the user device 100. Here, the input unit may include a keypad, a touch screen, a microphone, etc. The user device 100 is a communication terminal capable of communicating with the service server 200, and may be, for example, a personal computing system such as a smartphone, a laptop, a desktop, a handheld PC, or a tablet PC.
[0037] A user of the user device 100 may be a general user, but in this embodiment, the user may belong to a specific group. Here, the specific group is related to access authority to the database DB. That is, access authority to the database DB may be set differently depending on the specific group to which the user belongs. As a result, a response to a natural language question may or may not be received depending on the specific group to which the user belongs. For example, the specific group may be categorized as a company, a department, a job rank, etc. Information about the specific group to which the user belongs may be included in user attribute information. Here, the user attribute information includes personal information of the user, information about the user device 100, and information about the specific group to which the user belongs.
[0038] The natural language processing model NLP returns information necessary for query generation to the service server 200 through natural language processing of natural language questions input from the service server 200. Such a natural language processing model NLP may include a large language model (LLM) capable of inferring relationships between words within a huge amount of text data.
[0039] Natural language processing (NLP) models analyze and extract meaningful information from text to return information needed to generate queries. Here, LLM refers to an artificial intelligence model that can process massive amounts of natural language data and generate responses that are often indistinguishable from human-generated text. LLMs are built using deep learning techniques and trained through massive amounts of text data, such as books, articles, and online content, to return an output corresponding to the input. Examples of such LLMs include OpenAI's GPT (Generative Pre-trained Transformer) series and Google's BERT (Bidirectional Encoder Representations from Transformers) model.
[0040] The natural language processing model NLP according to an embodiment of the present invention returns an adaptive meta-question so that a query can be generated through natural language processing of the meta-question input from the service server 200. Here, the adaptive meta-question may include programmable code capable of generating a query in response to the meta-question. The natural language processing model NLP can generate a meta-response by referring to a prompt for a database DB provided by the service server 200.
[0041] The service server 200 is a server that communicates with the user device 100 and the natural language processing model NLP and processes 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 service server 200 may be configured with one or more servers. The service server 200 basically provides a response to a user question in natural language received from the user device 100. This will be described in more detail as follows.
[0042] When the service server 200 receives a user's question written in natural language, it adds annotations to the natural language question to convert it into a metaquestion that clarifies the natural language question so that the natural language processing model NLP can analyze it. The service server 200 then transmits the metaquestion to the natural language processing model NLP. The service server 200 receives an adaptive metaquestion from the natural language processing model NLP for the metaquestion. The service server 200 generates a metacommand from the adaptive metaquestion and generates a query based on the generated metacommand. The service server 200 then executes the query, queries the database DB, and obtains a response from the database DB. The service server 200 can then provide the obtained response to the user device 100. Since similar or identical questions may be input from the user device 100, the service server 200 stores previous user questions, metaquestions, meta-responses, and responses as cache data. If the cache data contains a question corresponding to the current natural language question or metaquestion, the service server 200 can provide the user device 100 with a response to the corresponding question stored in the cache data. That is, the service server 200 can respond to questions without natural language processing through the natural language processing model NLP.
[0043] The service server 200 can check whether the user is entitled to receive the service of the present invention, i.e., whether the user is entitled to receive a response corresponding to the user question. The service server 200 can check the user's access authority based on the user attribute information and provide a response to a user who has access authority.
[0044] The service server 200 can specify a template for the response to be provided to the user device 100. For example, the template may include text, a table, a chart, a graph, etc. Charts may include, but are not limited to, pie, bar, linear, distribution, statistical, and hierarchical charts.
[0045] Referring to FIG. 2, the service server 200 includes a database DB, an interface unit 210 and a control unit 220.
[0046] The database DB stores data that can respond to user questions. The database DB includes a vector DB containing index terms for the stored data. The vector DB is provided to the natural language processing model NLP through a prompt under the control of the control unit 220. The index terms may include table names and column names of the data. The database DB may store previously received user questions, queries corresponding to the user questions, and execution plans corresponding to the queries. The database DB may store embedding vectors generated by mapping previously received user questions to a predetermined vector space. The database DB may also store key-value data of previously received user questions.
[0047] The interface unit 210 provides an environment in which the user device 100 can connect to the service server 200. The user device 100 can input a natural language question through the interface unit 210 and receive a response to the input natural language question. That is, the interface unit 210 receives a natural language question from the user device 100 and returns a response to the natural language question to the user device 100. The interface unit 210 can perform the function of a platform for the service server 200.
[0048] The control unit 220 basically receives a user's natural language question via the interface unit 210 and converts the natural language question into a metaquestion that clarifies the natural language question by adding annotations to the natural language question so that the natural language processing model NLP can analyze it. The control unit 220 then transmits the metaquestion to the natural language processing model NLP. This allows the control unit 220 to receive an adaptive metaquestion from the natural language processing model NLP in response to the metaquestion. The control unit 220 then generates a metacommand from the adaptive metaquestion.
[0049] The control unit 220 can search for similar questions from among the multiple questions stored in the database DB that have a similarity to the user question that is equal to or greater than a predetermined value, and check whether or not there is a similar question that has a similarity that is equal to or greater than the predetermined value.
[0050] The control unit 220 basically receives a meta command from the control unit 220, generates a query based on the meta command, executes the query on the database DB, receives a response corresponding to the query, and transmits the received response to the user device 100 via the interface unit 210.
[0051] In addition, when the control unit 220 detects a similar question, it can execute a query to the database DB using the similar question without using a meta command, receive a response corresponding to the query, and transmit the received response to the user device 100 via the interface unit 210.
[0052] Referring to FIG. 3, the control unit 220 includes an environment change detection module 221 , an environment change analysis module 222 , an execution plan reconstruction module 223 , a code update module 224 , and an optimization module 225 .
[0053] The environmental change detection module 221 monitors changes in the system environment. Here, the system is a data service system 10 that accesses a database DB via a network and provides a service to retrieve data through queries. The system environment includes the network, the database DB, and input and output patterns to and from the data service system 10.
[0054] The environmental change analysis module 222 evaluates changes in the system performance in response to changes in the system environment by monitoring the environmental change detection module 221 .
[0055] The environmental change analysis module 222 can determine whether the numerical value of the change in system performance has changed beyond a predetermined range. If the result of this determination is that the numerical value of the change in system performance has changed beyond the predetermined range, this can be notified to the execution plan reconstruction module 223.
[0056] The execution plan reconfiguration module 223 reconfigures the execution plan so that the numerical value of the change in system performance is restored to within the predetermined range when the evaluation by the environment change analysis module 222 indicates that the numerical value of the change in system performance has changed beyond the predetermined range. Here, the execution plan includes a plurality of processing steps (STEPs) required for query execution, a command used in each of the plurality of processing steps, the amount of data processed in each of the plurality of processing steps, and the amount of time and resources required for each of the plurality of processing steps.
[0057] According to one embodiment, the execution plan restructuring module 223 can modify one or more of the processing steps required to execute a query and reconstruct the execution plan.
[0058] This embodiment will be described in more detail as follows. First, the execution plan reconfiguration module 223 modifies one or more of the processing steps required for query execution. In this case, the execution plan reconfiguration module 223 may modify at least one of the processing order and branching of the processing steps required for query execution. The execution plan reconfiguration module 223 then performs a simulation of the query using the modified processing steps, and derives the amount of data processed in each of the processing steps, the required time for each of the processing steps, and the amount of resources for each of the processing steps through the query simulation using the modified processing steps. Then, the execution plan reconfiguration module 223 determines whether the performance change value is restored within a predetermined range based on the derived amount of data processed in each of the processing steps, the required time for each of the processing steps, and the amount of resources for each of the processing steps. If the performance change value is restored within the predetermined range, the execution plan reconfiguration module 223 may reconfigure the existing execution plan with an execution plan including the modified processing steps. On the other hand, if the performance change value is not restored to within the predetermined range, the execution plan reconstructing module 223 corrects at least one of the processing orders and branches other than the previously corrected processing orders and branches, and then repeats the above-described procedure.
[0059] In addition, according to another embodiment, when there is a change in either the database structure or the network settings, the execution plan reconfiguration module 223 can reconfigure the execution plan by changing the multiple processing steps required for query execution and the command words used in each of the multiple processing steps based on the changed database structure or the changed network settings.
[0060] The code update module 224 updates the code for executing the query to match the modified execution plan as described above.
[0061] The optimization module 225 optimizes code for accessing a database via a network and executing queries. To this end, the optimization module 225 can monitor data processing speeds and network response times. Through such monitoring, the optimization module 225 can determine whether the data processing speed has decreased below a predetermined critical speed or whether the network response time has increased beyond a predetermined critical time. If the determination results in either a decrease in the data processing speed below the predetermined critical speed or an increase in the network response time beyond the predetermined critical time, the optimization module 225 optimizes the code for accessing a database via a network and executing queries.
[0062] Next, a method for updating code in response to environmental changes according to an embodiment of the present invention will be described. Figure 4 is a flowchart illustrating a method for updating code in response to environmental changes according to an embodiment of the present invention.
[0063] The environmental change detection module 221 monitors changes in the system environment in step S110. Here, the system is a data service system 10 that accesses a database DB via a network and provides a service to search for data through a query. The system environment includes the network, the database DB, and input and output patterns to and from the data service system 10.
[0064] Through monitoring by the environmental change detection module 221, the environmental change analysis module 222 evaluates the change in the system performance according to the change in the system environment in step S120.
[0065] The environment change analysis module 222 determines whether the change in the system performance exceeds a predetermined range in step S130.
[0066] If the result of the determination is that the numerical value of the change in system performance is greater than or equal to the predetermined range, proceed to step S140; if the result of the determination is that the numerical value of the change in system performance is within the predetermined range, repeat steps S110 to S130.
[0067] If the evaluation reveals that the numerical value of the change in system performance exceeds a predetermined range, the execution plan reconfiguration module 223 reconfigures the execution plan in step S140 so that the numerical value of the change in system performance is restored to within the predetermined range.
[0068] Here, the execution plan includes multiple processing steps (STEPs) required to execute the query, the command words used in each of the multiple processing steps, the amount of data to be processed in each of the multiple processing steps, and the time and amount of resources required for each of the multiple processing steps.
[0069] According to one embodiment of step S140, the execution plan restructuring module 223 can modify one or more of the processing steps required for query execution and reconstruct the execution plan.
[0070] According to another embodiment of step S140, if there is a change in either the database structure or the network settings, the execution plan reconfiguration module 223 can reconfigure the execution plan by changing the multiple processing steps required for query execution and the commands used in each of the multiple processing steps according to the changed database structure or the changed network settings.
[0071] Next, the code update module 224 updates the code for processing data in the database DB via the query in accordance with the changed execution plan in step S150.
[0072] The optimization module 225 may monitor data processing speed and network response time in step S160.
[0073] Then, in step S170, the optimization module 225 determines whether the data processing speed decreases below a predetermined critical speed or the network response time increases above a predetermined critical time.
[0074] If the determination result indicates that the data processing speed decreases below a predetermined critical speed or the network response time increases above a predetermined critical time, the optimization module 225 proceeds to step S180; otherwise, it returns to step S110.
[0075] In step S180, the optimization module 225 performs optimization on the code for accessing the database via the network and executing a query.
[0076] Next, an embodiment of the above-mentioned step S140 will be described in more detail. Figure 5 is a flowchart illustrating a method for reconstructing an execution plan according to an embodiment of the present invention.
[0077] 5, the execution plan reconfiguration module 223 modifies one or more of a plurality of processing steps required for query execution in step S210. In this case, the execution plan reconfiguration module 223 may modify at least one of the processing order and branching of the plurality of processing steps required for query execution.
[0078] Then, the execution plan reconstruction module 223 performs a simulation for the query using the modified processing steps in step S220.
[0079] Next, in step S230, the execution plan reconstruction module 223 derives the amount of data to be processed in each of the multiple processing steps, the required time and amount of resources for each of the multiple processing steps by simulating the query using the modified processing steps.
[0080] Next, in step S240, the execution plan reconstruction module 223 determines whether the performance change values are restored within a predetermined range based on the amount of data processed in each of the derived processing steps, the required time for each of the processing steps, and the amount of resources.
[0081] If the performance change value is restored to within the predetermined range as a result of the determination in step S240, the execution plan reconfiguration module 223 reconfigures the existing execution plan with an execution plan according to the modified processing steps in step S250.
[0082] If it is determined in step S240 that the performance change value is not restored within the predetermined range, the execution plan reconstructing module 223 repeats steps S210 to S240.
[0083] FIG. 6 is an exemplary diagram of a hardware system for implementing an apparatus for updating code according to environmental changes according to an embodiment of the present invention.
[0084] As shown in FIG. 6, a hardware system 2000 according to an embodiment of the present invention may include a processor unit 2100, a memory interface unit 2200, and a peripheral device interface unit 2300.
[0085] Each of these components in the hardware system 2000 may be a discrete component or may be integrated into one or more integrated circuits, and each of these components may be coupled together by a bus system (not shown).
[0086] Here, a bus system is an abstraction that represents any one or more discrete physical buses, communication lines / interfaces, and / or multi-drop or point-to-point links linked by appropriate bridges, adapters, and / or controllers.
[0087] The processor unit 2100 communicates with the memory unit 2210 via the memory interface unit 2200 to execute various software modules stored in the memory unit 2210 in order to perform various functions in the hardware system.
[0088] 2 may be stored in the form of software modules, and an operating system (OS) may also be stored in the memory unit 2210. The components including the environmental change detection module 221, the environmental change analysis module 222, the execution plan reconfiguration module 223, the code update module 224, and the optimization module 225 may be loaded into the processor unit 2100 and executed.
[0089] Each of the components including the environmental change detection module 221, the environmental change analysis module 222, the execution plan reconstruction module 223, the code update module 224, and the optimization module 225 described above may be embodied in the form of a software module or a hardware module executed by a processor, or may be embodied in a form in which the software module and the hardware module are combined.
[0090] In this manner, the software modules, hardware modules, or a combination of software modules and hardware modules executed by a processor may be embodied in an actual hardware system (e.g., a computer system).
[0091] In the case of an operating system (e.g., an embedded operating system such as I-OS, Android®, Darwin, RTXC, LINUX®, UNIX®, OS X, WINDOWS®, or VxWorks), it includes various procedures, command sets, software components, and / or drivers that control and manage common system tasks (e.g., memory management, storage control, power management, etc.) and facilitates communication between various hardware and software modules.
[0092] For reference, the memory unit 2210 may include a memory hierarchy including, but not limited to, cache, main memory, and secondary memory, and in such a memory hierarchy, may be implemented through any combination of, for example, RAM (e.g., SRAM, DRAM, DDRAM), ROM, FLASH, magnetic and / or optical storage devices (e.g., disk drives, magnetic tapes, compact disks (CDs), and digital video discs (DVDs)).
[0093] The peripheral device interface unit 2300 serves to enable communication between the processor unit 2100 and peripheral devices.
[0094] Here, in the case of a peripheral device, it provides different functions to the hardware system 2000, and in one embodiment of the present invention, for example, may include a communication unit 2310.
[0095] Here, the communication unit 2310 serves to provide communication functions with other devices, and for this purpose may include, but is not limited to, known circuits for performing this function, such as an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a codec (CODEC) chipset, and memory.
[0096] Examples of communication protocols supported by the communication unit 2310 include wireless LAN (WLAN), DLNA (Digital Living Network Alliance), Wibro (Wireless Broadband), Wimax (World Interoperability for Microwave Access), GSM (Global System for Mobile communication), CDMA (Code Division Multi Access), CDMA2000 (Code Division Multi Access 2000), EV-DO (Enhanced Voice-Data Optimized or Enhanced Voice-Data Only), WCDMA (Wideband CDMA), HSDPA (High Speed Downlink Packet Access), HSUPA (High Speed Uplink Packet Access), IEEE 802.16, LTE (Long Term Evolution), LTE-A (Long Term Evolution-Advanced), 5G communication system, and wireless mobile broadband communication service (Wireless Mobile Broadband). These may include Wireless Multimedia Services (WMBS), Bluetooth (registered trademark), Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra-Wideband (UWB), ZigBee (registered trademark), Near Field Communication (NFC), Ultra Sound Communication (USC), Visible Light Communication (VLC), Wi-Fi, Wi-Fi Direct, and the like.In addition, examples of wired communication networks include wired local area networks (LANs), wired wide area networks (WANs), power line communications (PLCs), USB communications, Ethernet, serial communications, optical / coaxial cables, etc., and are not limited to these, but may include any protocol that can provide a communication environment with other devices.
[0097] In the hardware system 2000 according to one embodiment of the present invention, each component stored in the memory unit 2210 in the form of a software module interfaces with the communication unit 2310 via the memory interface unit 2200 and the peripheral device interface unit 2300 in the form of an instruction executed by the processor unit 2100.
[0098] As explained above, while this specification contains details of numerous specific embodiments, these should not be construed as limiting the scope of any invention or claimable therein, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features described herein in the context of a separate embodiment may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable subcombination. Furthermore, while features may operate in a particular combination and may be initially described as being so claimed, one or more features from a claimed combination may, in some cases, be excluded from that combination, or the claimed combination may be modified into a subcombination or a variation of that subcombination.
[0099] Similarly, although acts are depicted in the figures in a particular order, this should not be understood as requiring that such acts be performed in the particular order or sequential order shown to achieve desirable results, or that all of the depicted acts be performed. In certain cases, multitasking and parallel processing may be advantageous. Also, the separation of various system components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged in multiple software products.
[0100] Specific embodiments of the subject matter described herein have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. By way of example, the processes illustrated in the accompanying figures do not necessarily require the particular illustrated order or sequential order to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous.
[0101] The written description sets forth the best mode of the invention and provides examples to explain the invention and to enable one skilled in the art to make and use the invention. The specification so written is not intended to limit the invention to the specific terms set forth. Thus, although the invention has been described in detail with reference to the foregoing examples, those skilled in the art may make modifications, changes, and variations thereto without departing from the scope of the invention.
[0102] Therefore, the scope of the invention should be defined not by the illustrated embodiments, but by the claims that follow.
[0103] [Apparatus and method for providing data services using similar queries] A system and an apparatus for providing a data service according to an embodiment of the present invention will be described. Fig. 7 is a diagram for explaining the configuration of a system for providing a data service according to an embodiment of the present invention. Fig. 8 is a diagram for explaining the configuration of an apparatus for providing a data service according to an embodiment of the present invention.
[0104] Referring to FIG. 7, the data service system 10 according to this embodiment is a system that provides 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 response.
[0105] The data service system 10 includes a user device 100 , a service server 200 and a model server 300 .
[0106] The model server 300 is a server on which a natural language processing (NLP) model is executed. In the embodiment of the present invention, the model server 300 is illustrated as a device separate from the service server 200. However, the natural language processing model NLP can operate on the service server 200. In such a case, the model server 300 can operate as a component of the service server 200.
[0107] The user device 100, the service server 200, and the model server 300 can transmit and receive data via a communication network.
[0108] The user device 100 inputs a natural language question to the service server 200 and receives a response to the natural language question from the service server 200. The natural language question may be input in the form of voice or text via an input unit provided by the user device 100. Here, the input unit may include a keypad, a touch screen, a microphone, etc. The user device 100 is a communication terminal capable of communicating with the service server 200, and may be, for example, a personal computing system such as a smartphone, a laptop, a desktop, a handheld PC, or a tablet PC.
[0109] A user of the user device 100 may be a general user, but in this embodiment, the user may belong to a specific group. Here, the specific group is related to access authority to the database DB. That is, access authority to the database DB may be set differently depending on the specific group to which the user belongs. As a result, a response to a natural language question may or may not be received depending on the specific group to which the user belongs. For example, the specific group may be categorized as a company, a department, a job rank, etc. Information about the specific group to which the user belongs may be included in user attribute information. Here, the user attribute information includes personal information of the user, information about the user device 100, and information about the specific group to which the user belongs.
[0110] The natural language processing model (NLP) processes natural language questions input from the service server 200 and returns information necessary for query generation to the service server 200. Such a natural language processing model (NLP) may include a large language model (LLM) capable of inferring relationships between words within massive amounts of text data. The natural language processing model (NLP) analyzes and extracts meaningful information from text to return information necessary for query generation. Here, an LLM refers to an artificial intelligence model that can process massive amounts of natural language data and generate responses that are often indistinguishable from human-generated text. An LLM is built using deep learning technology and trains on massive amounts of text data, such as books, articles, and online content, to return an output corresponding to the input. Examples of such an LLM include OpenAI's Generative Pre-trained Transformer (GPT) series and Google's Bidirectional Encoder Representations from Transformers (BERT) model.
[0111] The natural language processing model NLP according to an embodiment of the present invention returns an adaptive meta-question so that a query can be generated through natural language processing of the meta-question input from the service server 200. Here, the adaptive meta-question may include programmable code capable of generating a query in response to the meta-question. The natural language processing model NLP can generate a meta-response by referring to a prompt for a database DB provided by the service server 200.
[0112] The service server 200 is a server that communicates with the user device 100 and the natural language processing model NLP and processes 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 service server 200 may be configured with one or more servers. The service server 200 basically provides a response to a user question in natural language received from the user device 100. This will be described in more detail as follows.
[0113] When the service server 200 receives a user's question written in natural language, it adds annotations to the natural language question and converts it into a metaquestion that clarifies the natural language question so that the natural language processing model NLP can analyze it. The service server 200 then transmits the metaquestion to the natural language processing model NLP. The service server 200 receives an adaptive metaquestion from the natural language processing model NLP for the metaquestion. The service server 200 generates a metacommand from the adaptive metaquestion and generates a query based on the generated metacommand. The service server 200 then executes the query, queries the database DB, and obtains a response from the database DB. The service server 200 can then provide the obtained response to the user device 100. Since similar or identical questions may be input from the user device 100, the service server 200 stores previous user questions, metaquestions, meta-responses, and responses as cache data. If the cache data contains a question corresponding to the current natural language question or metaquestion, the service server 200 can provide the user device 100 with a response to the corresponding question stored in the cache data. That is, the service server 200 can respond to questions without natural language processing through the natural language processing model NLP.
[0114] The service server 200 can check whether the user is entitled to receive the service of the present invention, i.e., whether the user is entitled to receive a response corresponding to the user question. The service server 200 can check the user's access authority based on the user attribute information and provide a response to a user who has access authority.
[0115] The service server 200 can specify a template for the response to be provided to the user device 100. For example, the template may include text, a table, a chart, a graph, etc. Charts may include, but are not limited to, pie, bar, linear, distribution, statistical, and hierarchical charts.
[0116] Referring to FIG. 8, the service server 200 includes a database DB, an interface unit 210, a question processing unit 220, and a query processing unit 230.
[0117] The database DB stores data that can respond to user questions. The database DB includes a vector DB containing index terms for the stored data. The vector DB is provided to the natural language processing model NLP through a prompt under the control of the control unit 220. The index terms may include table names and column names of the data. The database DB may store previously received user questions, queries corresponding to the user questions, and execution plans corresponding to the queries. The database DB may store embedding vectors generated by mapping previously received user questions to a predetermined vector space. The database DB may also store key-value data of previously received user questions.
[0118] The interface unit 210 provides an environment in which the user device 100 can connect to the service server 200. The user device 100 can input a natural language question through the interface unit 210 and receive a response to the input natural language question. That is, the interface unit 210 receives a natural language question from the user device 100 and returns a response to the natural language question to the user device 100. The interface unit 210 can perform the function of a platform for the service server 200.
[0119] The question processing unit 220 basically receives a user's natural language question via the interface unit 210, and converts the natural language question into a metaquestion that clarifies the natural language question by adding annotations to the natural language question so that the natural language processing model NLP can analyze it. The question processing unit 220 then transmits the metaquestion to the natural language processing model NLP. This allows the question processing unit 220 to receive an adaptive metaquestion from the natural language processing model NLP in response to the metaquestion. The question processing unit 220 then generates a metacommand from the adaptive metaquestion.
[0120] The question processing unit 220 can search for similar questions from among the multiple questions stored in the database DB that have a similarity to the user question that is equal to or greater than a predetermined value, and check whether or not there is a similar question that has a similarity that is equal to or greater than the predetermined value.
[0121] The query processing unit 230 basically receives meta commands from the question processing unit 220, generates a query based on the meta commands, executes the query on the database DB, receives a response corresponding to the query, and transmits the received response to the user device 100 via the interface unit 210.
[0122] In addition, when the question processing unit 220 detects a similar question, the query processing unit 230 can execute a query to the database DB using the similar question without using a meta command, receive a response corresponding to the query, and transmit the received response to the user device 100 via the interface unit 210.
[0123] Next, a method for providing a data service using similar questions according to an embodiment of the present invention will be described. Fig. 9 is a flowchart illustrating a method for providing a data service using similar questions according to an embodiment of the present invention.
[0124] 9, in step S110, the interface unit 210 may receive a user question in natural language from the user device 100. For example, the user may be "S Company, Electrical Business Department, Business Manager," and the user question may be "Please tell me how much you sold this year."
[0125] The database DB may store previously received user questions, queries corresponding to the user questions, and execution plans corresponding to the queries. The database DB may store embedding vectors generated by mapping previously received user questions to a predetermined vector space. The database DB may also store key-value data of previously received user questions.
[0126] Accordingly, in step S120, the question processor 220 searches for similar questions from among a plurality of questions stored in the database DB, the similarity of which to the user question is equal to or greater than a predetermined value. In this case, according to one embodiment, the question processor 220 may perform at least one of a first procedure for deriving similar questions using embedding vectors and a second procedure for deriving similar questions using key-value data. According to another embodiment, the question processor 220 may sequentially perform the first procedure for deriving similar questions using embedding vectors and the second procedure for deriving similar questions using key-value data. Alternatively, the question processor 220 may derive similar questions by performing the first procedure for deriving similar questions using embedding vectors and the second procedure for deriving similar questions using key-value data in parallel. The first and second procedures will be described in more detail below.
[0127] Next, in step S130, the question processor 220 checks whether or not there is a similar question with a similarity greater than or equal to a predetermined value as a result of the search.
[0128] If, as a result of the check in step S130, there is a similar question whose similarity is equal to or greater than a predetermined value, the query processing unit 230 generates a response corresponding to the user question using the similar question in step S140 and transmits the generated response to the user device 100 via the interface unit 210.
[0129] On the other hand, if the result of the check in step S130 indicates that there is no similar question with a similarity greater than or equal to a predetermined value, the query processing unit 230 generates a query using the natural language processing model NLP in step S150, executes the generated query to generate a response corresponding to the user question, and transmits the generated response to the user device 100 via the interface unit 210.
[0130] A method for searching for similar questions according to an embodiment of the present invention will be described below. Fig. 10 is a flowchart illustrating the method for searching for similar questions according to an embodiment of the present invention. Fig. 10 provides a detailed description of the first procedure of step S120.
[0131] 10, the question processor 220 may refer to a word dictionary. The word dictionary stores words to be replaced with words used in the database DB. In step S210, the question processor 220 searches the word dictionary and, if a word that can be replaced with a word used in the database DB is found among the words included in the user's question, the question processor 220 may replace the word with the word used in the database DB.
[0132] Next, the question processor 220 maps the user question into a predetermined vector space and generates an embedding vector in step S220.
[0133] Next, in step S230, the question processing unit 220 can detect, as similar questions, questions among the plurality of questions stored in the database DB whose distance from the embedding vector of each of the plurality of questions stored in the database in the vector space is less than a predetermined value.
[0134] Regardless of whether a similar question is detected or not, the question processing unit 220 can map the user question and the embedding vector corresponding to the user question generated previously (S220) and store them in the database DB.
[0135] Next, a method for searching for similar questions according to another embodiment of the present invention will be described. Figure 11 is a flowchart illustrating a method for searching for similar questions according to another embodiment of the present invention. Figure 11 is a detailed description of the second procedure of step S120.
[0136] 11, the question processor 220 may refer to a word dictionary. The word dictionary stores words to be replaced with words used in the database DB. If the question processor 220 searches the word dictionary and finds a word that can be replaced with a word used in the database DB among the words included in the user's question in step S310, the question processor 220 may replace the word with the word used in the database DB.
[0137] Next, the question processor 220 extracts keywords corresponding to column names of the database DB included in the user question in step S320.
[0138] First, the question processor 220 performs key-value mapping based on keywords in step S330 to generate key-value data corresponding to the user question, where a key is mapped to meta information and a value indicates a word corresponding to the key in the user question.
[0139] Next, in step S340, the question processing unit 220 compares the key-value data of multiple questions stored in the database DB with the key-value data of the user question, and detects questions having key-value data whose similarity to the key-value data of the user question is equal to or greater than a predetermined value as similar questions.
[0140] Regardless of whether a similar question is detected or not, the question processing unit 220 can map the user question and the key-value data of the user question generated previously (S330) and store the mapped data in the database DB.
[0141] Next, a method for providing a response according to an embodiment of the present invention will be described. Figure 12 is a flowchart illustrating the method for providing a response according to an embodiment of the present invention. Figure 12 is a detailed description of step S140, which illustrates a case where a similar question is detected.
[0142] Referring to FIG. 12, the query processor 230 generates a query using a query of a similar question already stored in the database DB in step S410.
[0143] Next, the query processing unit 230 executes a query using the execution plan of the similar query on the database DB in step S420, thereby receiving a response corresponding to the user query from the database DB.
[0144] Next, the query processor 230 transmits a response corresponding to the user question to the user device 100 via the interface unit 210 in step S430.
[0145] Next, a method for providing a response according to another embodiment of the present invention will be described. Figure 13 is a flowchart illustrating the method for providing a response according to another embodiment of the present invention. Figure 13 is a detailed description of step S150, which illustrates a case where a similar question is not detected.
[0146] The question processor 220 adds annotations to the user's question and converts it into a meta-question in step S510. The annotations are hints for clarifying the natural language question, and may include at least one of a sentence, a syntax, a word, and a particle range. The annotations may be generated based on natural language processing of the natural language question itself, reflecting index terms for data stored in the database (DB) and user attribute information. Here, the user attribute information may include personal information of the user, information about the user device 100, and information about a specific group to which the user belongs.
[0147] For example, the user attribute information may be "S Company, Electricity Business Division, Business Manager," and the user question may be "Please tell me how much you sold this year." Then, the question processing unit 220 can change "Please tell me how much you sold this year" into a meta question such as "What will be the sales of the Electricity Business Division in 2023?"
[0148] As another example, if a user inputs a question such as "Can you show me the sales situation for this year?", it is assumed that the user who input the natural language question is an employee of the sales department. In this case, if the user inputs the question directly into the natural language processing model NLP, "this year" can be analyzed as "2023 (the relevant fiscal year)," but since it is unclear what kind of sales "sales" refers to, an inaccurate response will be returned. On the other hand, according to this embodiment, "sales," to which the user belongs, is added as an annotation, and "sales" is annotated to be changed to "sales amount" by referring to the index term, and the natural language question can be converted into a meta-question such as "The user is an employee of the sales department. Next, here is a question. Can you show me the sales situation for the sales department for 2023?"
[0149] Next, the question processor 220 derives an adapted metaquestion from the metaquestion via the natural language processing model NLP in step S520. In other words, when the question processor 220 transmits the metaquestion to the natural language processing model NLP, the natural language processing model NLP performs an operation on the metaquestion according to what it has learned and outputs an adapted metaquestion, and the question processor 220 can receive the adapted metaquestion output by the natural language processing model NLP.
[0150] As an example, when the meta-question is "What were the sales of the electric power division in 2023?", the natural language processing model NLP can derive an adaptive meta-question such as "What were the sales of S Company's electric power division from January 1, 2023 to today?"
[0151] The question processor 220 may generate a meta command by adding a command specifying a template to the adaptive meta question in operation S530. Here, the template is a template that can output a response corresponding to the meta question. Such a template may include text, a table, a chart, a graph, etc.
[0152] For example, from an adaptive meta question such as "What are the sales of S Company's Electrical Division from January 1, 2023 to today?", a query such as "Please create the sales of S Company's Electrical Division from January 1, 2023 to today using Table A and Template B." can be generated.
[0153] Next, the query processor 230 generates a query based on the meta command in step S540.
[0154] Next, in step S550, the query processing unit 230 generates an execution plan corresponding to the query generated for the database DB, executes the query according to the generated execution plan, and receives a response corresponding to the user's question from the database DB.
[0155] Next, the query processor 230 maps the user question, a query corresponding to the user question, and an execution plan corresponding to the query, and stores the mapping results in the database DB in step S560.
[0156] Next, the query processor 230 transmits the response to the user device 100 via the interface unit 210 in step S570.
[0157] FIG. 14 is a diagram illustrating an example of a hardware system for implementing an apparatus for providing a data service using similar queries according to an embodiment of the present invention.
[0158] As shown in FIG. 14, a hardware system 2000 according to an embodiment of the present invention may include a processor unit 2100, a memory interface unit 2200, and a peripheral device interface unit 2300.
[0159] Each of these components in hardware system 2000 may be discrete components or integrated into one or more integrated circuits, and each of these components may be coupled together by a bus system (not shown).
[0160] Here, a bus system is an abstraction that represents any one or more discrete physical buses, communication lines / interfaces, and / or multi-drop or point-to-point links linked by appropriate bridges, adapters, and / or controllers.
[0161] The processor unit 2100 communicates with the memory unit 2210 via the memory interface unit 2200 to execute various software modules stored in the memory unit 2210 in order to perform various functions in the hardware system.
[0162] Here, the memory unit 2210 may store components including the interface unit 210, the question processing unit 220, and the query processing unit 230 in the form of software modules, and may further store an operating system (OS). The components including the interface unit 210, the question processing unit 220, and the query processing unit 230 may be loaded into the processor unit 2100 and executed.
[0163] Each component including the interface unit 210, the question processing unit 220, and the query processing unit 230 described above may be implemented in the form of a software module executed by a processor or a hardware module, or may be implemented in the form of a combination of a software module and a hardware module.
[0164] In this manner, the software modules, hardware modules, or a combination of software modules and hardware modules executed by a processor may be embodied in an actual hardware system (e.g., a computer system).
[0165] In the case of an operating system (e.g., an embedded operating system such as I-OS, Android®, Darwin, RTXC, LINUX®, UNIX®, OS X, WINDOWS®, or VxWorks), it includes various procedures, command sets, software components, and / or drivers that control and manage common system tasks (e.g., memory management, storage control, power management, etc.) and facilitates communication between various hardware and software modules.
[0166] For reference, the memory unit 2210 may include a memory hierarchy including, but not limited to, a cache, a main memory, and a secondary memory, and in such a memory hierarchy, the memory hierarchy may be implemented through any combination of, for example, RAM (e.g., SRAM, DRAM, DDRAM), ROM, FLASH, magnetic and / or optical storage devices (e.g., disk drives, magnetic tapes, compact disks (CDs), and digital video discs (DVDs)).
[0167] The peripheral device interface unit 2300 serves to enable communication between the processor unit 2100 and peripheral devices.
[0168] Here, in the case of a peripheral device, it provides different functions to the hardware system 2000, and in one embodiment of the present invention, for example, may include a communication unit 2310.
[0169] Here, the communication unit 2310 serves to provide communication functions with other devices, and for this purpose may include, but is not limited to, known circuits for performing this function, such as an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a codec (CODEC) chipset, and memory.
[0170] Examples of communication protocols supported by the communication unit 2310 include wireless LAN (WLAN), DLNA (Digital Living Network Alliance), Wibro (Wireless Broadband), Wimax (World Interoperability for Microwave Access), GSM (Global System for Mobile communication), CDMA (Code Division Multi Access), CDMA2000 (Code Division Multi Access 2000), EV-DO (Enhanced Voice-Data Optimized or Enhanced Voice-Data Only), WCDMA (Wideband CDMA), HSDPA (High Speed Downlink Packet Access), HSUPA (High Speed Uplink Packet Access), IEEE 802.16, LTE (Long Term Evolution), LTE-A (Long Term Evolution-Advanced), 5G communication system, and wireless mobile broadband communication service (Wireless Mobile Broadband). These may include Wireless Multimedia Services (WMBS), Bluetooth (registered trademark), Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra-Wideband (UWB), ZigBee (registered trademark), Near Field Communication (NFC), Ultra Sound Communication (USC), Visible Light Communication (VLC), Wi-Fi, Wi-Fi Direct, and the like.In addition, examples of wired communication networks include wired local area networks (LANs), wired wide area networks (WANs), power line communications (PLCs), USB communications, Ethernet, serial communications, optical / coaxial cables, etc., and are not limited to these, but may include any protocol that can provide a communication environment with other devices.
[0171] In the hardware system 2000 according to one embodiment of the present invention, each component stored in the memory unit 2210 in the form of a software module interfaces with the communication unit 2310 via the memory interface unit 2200 and the peripheral device interface unit 2300 in the form of an instruction executed by the processor unit 2100.
[0172] As explained above, while this specification contains details of numerous specific embodiments, these should not be construed as limiting the scope of any invention or claimable therein, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features described herein in the context of a separate embodiment may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable subcombination. Furthermore, while features may operate in a particular combination and may be initially described as being so claimed, one or more features from a claimed combination may, in some cases, be excluded from that combination, or the claimed combination may be modified into a subcombination or a variation of that subcombination.
[0173] Similarly, although acts are depicted in the figures in a particular order, this should not be understood as requiring that such acts be performed in the particular order or sequential order shown to achieve desirable results, or that all of the depicted acts be performed. In certain cases, multitasking and parallel processing may be advantageous. Also, the separation of various system components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged in multiple software products.
[0174] Specific embodiments of the subject matter described herein have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. By way of example, the processes illustrated in the accompanying figures do not necessarily require the particular illustrated order or sequential order to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous.
[0175] The written description sets forth the best mode of the invention and provides examples to explain the invention and to enable one skilled in the art to make and use the invention. The specification so written is not intended to limit the invention to the specific terms set forth. Thus, although the invention has been described in detail with reference to the foregoing examples, those skilled in the art may make modifications, changes, and variations thereto without departing from the scope of the invention.
[0176] Therefore, the scope of the invention should be defined not by the illustrated embodiments, but by the claims that follow. [Explanation of symbols]
[0177] 10 Data Service System 100 User Device 200 Service Server 210 Interface section 220 Control unit, question processing unit 221 Environmental Change Detection Module 222 Environmental Change Analysis Module 223 Execution Plan Reconstruction Module 224 Code Update Module 225 Optimization Module 230 Query Processing Unit 300 Model Server
Claims
1. 1. A method for providing a data service, comprising: receiving a user question in natural language from a user device by an interface unit; a step of searching a plurality of questions stored in a database by a question processing unit for a similar question having a similarity to the user question equal to or greater than a predetermined value; If a similar question with a similarity score equal to or greater than a predetermined value is found as a result of the search, a query processing unit generating a response corresponding to the user question using the searched similar questions; the query processing unit transmitting the generated response to the user device via the interface unit.
2. The step of retrieving the query comprises: the query processor mapping the user query to a predetermined vector space to generate an embedding vector; and detecting, as the similar question, a question among the plurality of questions stored in the database, the question whose distance to each embedding vector of the plurality of questions stored in the database in the vector space is less than a predetermined value.
3. The step of retrieving the query comprises: extracting keywords corresponding to column names of a database included in the user's query by the query processing unit; The query processing unit performs key-value mapping based on the keywords to generate key-value data corresponding to the user query; the question processing unit comparing key-value data of the plurality of questions stored in the database with key-value data of the user question, and detecting, as the similar question, a question having key-value data whose similarity with the key-value data of the user question is equal to or greater than a predetermined value.
4. before the step of searching for similar questions, the query processor searching the database for a word dictionary storing words to be substituted for words used; 2. The method of claim 1, further comprising: if, through the search, there is a word included in the user's question that can be replaced with a word used in the database, the question processing unit replaces the word with the word used in the database.
5. generating the response comprises: generating a query using the similar question by the query processing unit; the query processing unit executing a query against the database using the execution plan for the similar query and receiving a response corresponding to the user's query from the database; and a step in which the query processing unit transmits the response to the user device via the interface unit.
6. If the search does not find any similar questions with a similarity score equal to or greater than a predetermined value, the question processor converting the user question into a meta-question by adding annotations to the user question; deriving adaptive meta-questions from the meta-questions via a natural language processing model by the question processor; the question processor adding templates to the adaptive meta-questions to generate meta-instructions; generating a query based on the meta command by the query processing unit; the query processing unit generating an execution plan corresponding to the generated query for the database, executing the query according to the generated execution plan, and receiving a response corresponding to the user's question from the database; the query processing unit mapping and storing the user question, a query corresponding to the user question, and an execution plan corresponding to the query; The method of claim 1 , further comprising: the query processing unit transmitting the response to the user device via the interface unit.
7. 1. An apparatus for providing a data service, comprising: an interface unit that receives a user question in natural language from a user device; a question processing unit that searches for similar questions that have a similarity to the user question of a predetermined value or more from among a plurality of questions stored in a database; If a similar question with a similarity score equal to or greater than a predetermined value is found as a result of the search, generating a response corresponding to the user question using the searched similar questions; a query processing unit that transmits the generated response to the user device via the interface unit.
Citation Information
Patent Citations
Document Processing and Response Generation System
JP2023532669A
Stirring apparatus having descending guiding function of material
KR1020200095942A
A microneedle and the manufacturing method of the same
KR1020210019971A
Charging terminal for detached battery
KR1020230139403A
Selectivity-based optimized-query-plan caching
US20110029508A1