Method and system for rectifying data warehouse number extraction intention based on human-computer multi-round collaborative interaction
By employing a multi-turn human-computer collaborative interaction method, the problems of incomplete intent and low interaction efficiency in enterprise data analysis have been solved. This method enables refined management and structured querying of natural language requests, thereby improving data analysis efficiency and interaction efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGBEI UNIV
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-31
AI Technical Summary
In enterprise data analysis scenarios, existing technologies for natural language query solutions suffer from problems such as incomplete intent, low interaction efficiency, and large result bias. In particular, in data warehouse queries, there is a lack of structured intent modeling, a lack of priority strategies for generating clarification questions, and a failure to incorporate metadata, permissions, and rules for error correction.
A multi-round human-computer collaborative interaction method is adopted. Through semantic parsing, ambiguity detection and clarification priority calculation, clarification questions are generated and multiple rounds of interaction are carried out. The intent is corrected by combining the ambiguity rule base, metadata and user permissions, and finally the structured query intent is output.
It enables refined management of natural language requests, improves the efficiency of intent confirmation, reduces interaction rounds, enhances data analysis efficiency, and reduces cross-departmental communication costs.
Smart Images

Figure CN122491259A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of human-computer interaction, natural language understanding, data warehouse query and intelligent data analysis, specifically to a data warehouse intention correction method and system based on multi-turn human-computer collaborative interaction. Background Technology
[0002] In enterprise data analytics scenarios, business personnel often use natural language to express data requests. However, these requests typically suffer from incomplete expression, inconsistent terminology, vague timeframes, unclear organizational scope, and ambiguous aggregation granularity. For example, the expression "Please check the recent loan status of our high-quality customers" can be interpreted as "recently" in the last 7 days, the last 30 days, this month, or this quarter; "high-quality customers" may correspond to different definitions such as high-net-worth customers, customers with AUM exceeding the threshold, or star-rated customers; and "loan status" can be mapped to different indicators such as loan balance, new loan amount, number of loan accounts, or delinquency rate.
[0003] Existing natural language query solutions typically generate SQL or report logic directly from a single input, which is prone to outputting incorrect results when the intent is incomplete or ambiguity remains. While some conversational systems possess the ability to ask follow-up questions, they suffer from the following shortcomings: Lacking the ability to model structured intents for data warehouse extraction scenarios, it is impossible to finely break down and manage query requirements; The lack of a prioritization strategy for generating clarification questions leads to excessive interaction rounds and a poor user experience. The failure to incorporate data warehouse metadata, user permissions, and business rules for error correction resulted in inaccurate clarification of issues and inaccurate final query results. Lacking a closed-loop self-optimization mechanism, it is unable to learn from historical interactions and improve its subsequent intent recognition and correction capabilities. Summary of the Invention
[0004] The purpose of this invention is to provide a data warehouse data retrieval intent correction method and system based on human-machine multi-turn collaborative interaction, so as to solve the problems of ambiguous expression, incomplete intent, low efficiency of interaction clarification and large deviation of results in natural language data retrieval requests in the prior art mentioned above.
[0005] To this end, the present invention provides a data warehouse data extraction intent correction method and system based on human-machine multi-turn collaborative interaction, including the following steps: S1, receiving a natural language data extraction request input by the user, and performing semantic parsing on the data extraction request. The semantic parsing process includes word segmentation, part-of-speech tagging and named entity recognition of the natural language request, extracting key business entities and relationships; mapping the extracted information to a preset slot structure to generate an initial intent framework.
[0006] S2. Based on the preset ambiguity rule base, data warehouse metadata, business terminology dictionary and user permission information, perform integrity detection, conflict detection and ambiguity detection on the initial intent framework to identify missing slots, conflicting slots and ambiguous slots. S3. Calculate the clarification priority based on the degree of missing slots, ambiguity, execution risk, and information gain of each slot. Select the slots to be followed up and generate corresponding clarification questions. The clarification priority is determined based on one or more of the following factors: the impact of missing slots on query execution, the impact of slot ambiguity on result deviation, the reduction in the number of candidate explanations after slot completion, and the degree of matching between the slots and the user's historical preferences. When generating clarification questions, a multiple-choice format is preferred, providing clear candidate options for the user to choose from, in order to improve interaction efficiency.
[0007] S4. Engage with the user in multiple rounds, receiving their answers to clarifying questions. Integrate these answers with the historical dialogue context to update the initial intent framework. The historical dialogue context includes one or more of the following: questions from previous rounds, user answers, confirmed slots, user role information, and historical query records. When updating the intent framework, populate the corresponding slots with the user's answers and update the slot status to confirmed. Simultaneously, adjust the status of other slots based on the user's answers; for example, once the user confirms the time range, it may eliminate ambiguity regarding certain metrics.
[0008] S5. When the updated intent framework still has conflicts or multiple candidate interpretations, generate a list of candidate interpretations or a natural language confirmation summary. The confirmation summary is used to provide feedback on the current intent framework to the user in natural language form, so that the user can confirm it again before final execution. The user confirms the intention to complete the intent correction. S6. When the updated intent framework meets the preset integrity threshold and all conflicts have been eliminated, a structured data extraction intent is output. The structured data extraction intent is used to drive the downstream query execution module. The integrity threshold can be configured according to business needs. By analyzing historical interaction data, the ambiguity rule base can be optimized, the clarification priority calculation parameters can be adjusted, and the business terminology dictionary can be improved, thereby continuously improving the system's intent recognition and correction capabilities.
[0009] S7 records the multi-round interaction process, slot correction results, and the final structured data extraction intent, which are used to build a data extraction sample library and optimize subsequent interaction strategies.
[0010] Preferably, in step S1, the initial intent framework includes at least one or more of the following: metrics, objects, dimensions, time ranges, organizational ranges, filtering conditions, statistical granularity, and sorting methods. The status of each slot includes at least one of the following: confirmed, pending confirmation, missing, and conflicting.
[0011] Preferably, in step S2, the ambiguity detection includes: Identifying fuzzy expressions based on time words, scope words, and business adjectives; Based on data warehouse metadata, check the compatibility between fields, metrics, and dimensions; Determine whether the organization scope has exceeded the user's permission scope; Multiple candidate semantics are matched based on historical data extraction templates.
[0012] Preferably, in step S4, the historical dialogue context includes one or more of the following: questions from previous rounds, user answers, confirmed slots, user role information, and historical query records.
[0013] Preferably, in step 5, a candidate definition list or natural language confirmation summary is generated to provide the current intent framework to the user in natural language form for the user to confirm again before final execution.
[0014] Preferably, the structured data extraction is intended to be output in any of the following forms: JSON object, domain-specific language, or intermediate semantic representation.
[0015] Preferably, it also includes setting a maximum interaction round threshold. When the threshold is reached but ambiguity cannot be eliminated, manual assistance is triggered or a standardized candidate template is returned for the user to choose from.
[0016] A data warehouse data extraction intent correction system based on multi-turn human-machine collaborative interaction, including The request receiving module is used to receive natural language data extraction requests input by the user; The intent parsing module is used to perform semantic parsing on the natural language data retrieval request and generate an initial intent framework; The ambiguity detection module is used to identify missing slots, conflicting slots, and ambiguous slots based on the ambiguity rule base, data warehouse metadata, business terminology dictionary, and user permission information. The question generation module is used to generate clarification questions based on clarification priority. The dialogue state management module is used to maintain the historical dialogue context and update the slot state in the intent framework during multi-turn interactions. The confirmation and correction module is used to generate a list of candidate interpretations or a confirmation summary when there are multiple candidate interpretations, and to complete the intent correction. The results output module is used to output a structured data extraction intent after the intent framework meets the integrity threshold and the conflict is eliminated. The self-optimization module is used to record the multi-round interaction process, slot correction results and final structured data extraction intentions, build a data extraction sample library and optimize subsequent interaction strategies.
[0017] Preferably, the dialogue state management module includes a context maintenance submodule, a slot state update submodule, and a round control submodule; The round control submodule has a preset maximum interaction round threshold of 5 rounds. When the threshold is reached and the ambiguity is still not resolved, the manual assistance interface is automatically triggered or the standardized candidate template list is returned.
[0018] Preferably, the self-optimization module includes a sample storage submodule, a rule optimization submodule, and a priority adjustment submodule; The sample storage submodule is used to store multi-round interaction logs, slot correction records, and final structured intents; The rule optimization submodule is used to dynamically update the ambiguous rule base and business terminology dictionary based on historical samples; The priority adjustment submodule is used to iteratively optimize the weighting coefficient of the clarification priority based on user interaction feedback.
[0019] The data warehouse intention correction method and system based on multi-turn human-machine collaborative interaction proposed in this invention have the following advantages: This invention can transform natural language data retrieval requests into a structured intent framework containing multiple key slots, which facilitates refined management and analysis of query requirements and lays the foundation for subsequent ambiguity detection and correction. By combining ambiguity rule base, data warehouse metadata, business terminology dictionary and user permission information for joint detection, it can comprehensively identify missing, conflict and ambiguity issues in the intent framework and avoid omissions caused by single-dimensional detection. Clarification priorities can be dynamically calculated based on slot importance, ambiguity, and information gain, prioritizing the clarification of issues most impactful on query results. This reduces interaction rounds while improving intent confirmation efficiency. The dialogue state management module maintains historical dialogue context, enabling the understanding of continuous user questions and corrections, achieving natural and smooth multi-turn interactions, and progressively refining user intent. In practical applications at commercial banks and other financial institutions, this significantly shortens traditional manual scheduling, improves data analysis efficiency, and reduces cross-departmental communication costs. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is an overall flowchart of the correction method of the present invention; Figure 2 This is a schematic diagram of the overall framework of the correction system of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described in this specification are merely for explaining the invention and are not intended to limit the invention.
[0023] Example: Please see Figure 1-2 This invention provides a data warehouse data extraction intent correction method based on multi-turn human-machine collaborative interaction. The system receives natural language text input by the user and forwards it to the intent parsing module via the gRPC protocol. The system calls the Qwen2.5-7B-Instruct model to perform word segmentation, part-of-speech tagging, and named entity recognition to extract key business entities, including information such as extraction, list, loan, and branch business department. The extracted entities are mapped to a preset 8-dimensional structured intent framework, and the status of each slot is automatically labeled (confirmed / pending confirmation / missing / ambiguous), generating an initial intent framework.
[0024] The ambiguity detection module loads a pre-defined ambiguity rule base, data warehouse metadata, a business terminology dictionary, and user permission information, and performs triple checks on the initial intent framework. Completeness detection identifies missing slots based on time range, statistical granularity, object, and dimension; conflict detection detects logical conflicts between slots; and ambiguity detection matches ambiguities in the "Commercial Bank Credit Business Terminology Dictionary."
[0025] For problematic slots, a clarification priority score is calculated based on a preset weighted coefficient, and the slots are sorted by final priority according to filter criteria > time range > object > statistical granularity. Clarification questions in multiple-choice format are generated first for the highest priority filter criteria slots.
[0026] The system then engages in multiple rounds of dialogue with the user, gradually completing and confirming all slots. The system updates the intent framework: changing the statistical granularity of the slot values to single-item details, and changing the status to "confirmed." The system integrates all confirmed slot information into a natural language confirmation summary, providing final confirmation to the user. An example of the natural language confirmation summary is: "Executing the following query for you: Retrieving a detailed list of all types of non-performing loans (substandard / doubtful / loss) from the Taiyuan Branch Business Department for the third quarter of 2024 (July 1st - September 30th), including fields such as customer name, loan contract number, loan amount, five-level classification, and overdue days. Confirm execution?" The user replies: "Confirm," and the system completes the intent correction, updating the intent framework status to "confirmed."
[0027] The system generates a structured data extraction intent in standard JSON format, which is passed to the downstream Qwen2.5-Coder-14B generation module via an internal API for subsequent database schema connection and SQL code generation.
[0028] The self-optimization module stores the complete log of this interaction in the data extraction sample library, including the original natural language request, the initial intent framework, the clarification questions and user answers for each round, the slot correction record, and the final structured data extraction intent.
[0029] If a user provides vague responses such as "all" or "anything is fine" to clarify questions, the system automatically selects the most commonly used default option (e.g., for problematic loans, defaults to non-performing loans) and clearly marks the default value in the confirmation summary, reminding the user to correct it. If the intent confidence level is still below 90% after 5 rounds of interaction, the system automatically triggers a manual assistance interface, pushing the current intent framework and interaction logs to the bank's data support team for manual confirmation of the request; simultaneously, it returns to the user: "Your request is quite complex and has been transferred to the data support team for processing. A response is expected within one hour." If the system detects that a user's query exceeds their permissions (e.g., a branch account manager querying bank-wide data), it immediately terminates the interaction and returns: "Sorry, you do not have permission to query data within this range. Please contact your department administrator to apply for permissions."
[0030] This invention can transform natural language data retrieval requests into a structured intent framework containing multiple key slots, facilitating refined management and analysis of query requirements. This lays the foundation for subsequent ambiguity detection and correction. In practical applications in financial institutions such as commercial banks, it can shorten traditional manual scheduling, significantly improve data analysis efficiency, and reduce cross-departmental communication costs.
[0031] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for rectifying an intention of a data warehouse query based on multi-round human-computer collaborative interaction, characterized in that: Includes the following steps: S1. Receive the user's natural language data extraction request, perform semantic parsing on the data extraction request, and generate an initial intent framework; S2. Based on the preset ambiguity rule base, data warehouse metadata, business terminology dictionary and user permission information, perform integrity detection, conflict detection and ambiguity detection on the initial intent framework to identify missing slots, conflicting slots and ambiguous slots. S3. Calculate the clarification priority based on the degree of missing information, ambiguity, execution risk, and information gain of each slot, select the slots to be questioned, and generate the corresponding clarification questions; S4. Engage with the user in multiple rounds, receive the user's answers to clarifying questions, and integrate the user's answers with the historical dialogue context to update the initial intent framework; S5. When the updated intent framework still has conflicts or multiple candidate interpretations, generate a list of candidate interpretations or a natural language confirmation summary for user confirmation to complete intent correction. S6. When the updated intent framework meets the preset integrity threshold and all conflicts have been eliminated, a structured data extraction intent is output, which is used to drive the downstream query execution module. S7 records the multi-round interaction process, slot correction results, and the final structured data extraction intent, which are used to build a data extraction sample library and optimize subsequent interaction strategies.
2. The method for intent rectification of data warehouse query based on human-computer multi-round collaborative interaction according to claim 1, characterized in that: In step S1, the initial intent framework includes at least one or more of the following: metrics, objects, dimensions, time range, organizational range, filtering conditions, statistical granularity, and sorting methods.
3. The method of claim 1, wherein the method is based on human-computer multi-round collaborative interaction. In step S2, ambiguity detection includes: Identifying fuzzy expressions based on time words, scope words, and business adjectives; Based on data warehouse metadata, check the compatibility between fields, metrics, and dimensions; Determine whether the organization scope has exceeded the user's permission scope; Multiple candidate semantics are matched based on historical data extraction templates.
4. The method of claim 1, wherein the method is based on human-computer multi-round collaborative interaction. In step S4, the historical dialogue context includes one or more of the following: questions asked in previous rounds, user answers, confirmed slots, user role information, and historical query records.
5. The method for intent rectification of data warehouse query based on human-computer multi-round collaborative interaction according to claim 1, characterized in that: In step 5, a candidate paraphrase list or natural language confirmation summary is generated to provide the current intent framework to the user in natural language form for the user to confirm again before final execution.
6. The method for intent rectification of data warehouse query based on human-computer multi-round collaborative interaction according to claim 1, characterized in that: The structured data extraction intent is to be output in any of the following forms: JSON object, domain-specific language, or intermediate semantic representation.
7. The method of claim 1, wherein the method is based on human-computer multi-round collaborative interaction. It also includes setting a maximum interaction round threshold. If the ambiguity cannot be eliminated after reaching the threshold, it will trigger manual assistance or return a standardized candidate template for the user to choose from.
8. The data warehouse intention correction system based on multi-turn human-machine collaborative interaction according to any one of claims 1-7, characterized in that: include The request receiving module is used to receive natural language data extraction requests input by the user; The intent parsing module is used to perform semantic parsing on the natural language data retrieval request and generate an initial intent framework; The ambiguity detection module is used to identify missing slots, conflicting slots, and ambiguous slots based on the ambiguity rule base, data warehouse metadata, business terminology dictionary, and user permission information. The question generation module is used to generate clarification questions based on clarification priority. The dialogue state management module is used to maintain the historical dialogue context and update the slot state in the intent framework during multi-turn interactions. The confirmation and correction module is used to generate a list of candidate interpretations or a confirmation summary when there are multiple candidate interpretations, and to complete the intent correction. The results output module is used to output a structured data extraction intent after the intent framework meets the integrity threshold and the conflict is eliminated. The self-optimization module is used to record the multi-round interaction process, slot correction results and final structured data extraction intentions, build a data extraction sample library and optimize subsequent interaction strategies.
9. The data warehouse intention correction system based on multi-turn human-machine collaborative interaction according to claim 8, characterized in that: The dialogue state management module includes a context maintenance submodule, a slot state update submodule, and a round control submodule. The round control submodule has a preset maximum interaction round threshold of 5 rounds. When the threshold is reached and the ambiguity is still not resolved, the manual assistance interface is automatically triggered or the standardized candidate template list is returned.
10. The data warehouse intention correction system based on multi-turn human-machine collaborative interaction according to claim 8, characterized in that: The self-optimization module includes a sample storage submodule, a rule optimization submodule, and a priority adjustment submodule; The sample storage submodule is used to store multi-round interaction logs, slot correction records, and final structured intents; The rule optimization submodule is used to dynamically update the ambiguous rule base and business terminology dictionary based on historical samples; The priority adjustment submodule is used to iteratively optimize the weighting coefficient of the clarification priority based on user interaction feedback.