Data analysis question rewriting method and device based on data analysis intent recognition
By using data analysis intent recognition and multi-source context fusion to generate canonical questions, the problem of intent misunderstanding in general LLM in the field of data analysis is solved, and an efficient and reliable intelligent data analysis system is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SHUSHI YUNCHUANG TECH CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-06-12
AI Technical Summary
Existing general-purpose large language models struggle to accurately understand users' professional intentions in the field of data analysis, and lack the ability to integrate multi-dimensional contextual information, resulting in inaccurate data analysis results and poor user experience.
A data analysis intent recognition-based approach is adopted, which generates standardized data analysis questions through semantic analysis and multi-source contextual information fusion, and introduces a quality assessment mechanism to ensure the accuracy and reliability of the rewriting results.
It significantly improves the accuracy and reliability of data analysis, lowers the technical threshold, and enables users without a technical background to easily obtain professional-grade data analysis results. It also enables intelligent and personalized interactive processes and provides robust quality assurance.
Smart Images

Figure CN122196047A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and specifically provides a method and apparatus for rewriting data analysis problems based on data analysis intent recognition. Background Technology
[0002] With the popularization of big data technology and the rapid development of artificial intelligence, Large Language Models (LLMs) have demonstrated powerful capabilities in the field of Natural Language Processing (NLP). Users can interact with LLMs through natural language to obtain information, perform tasks, or create content. In the specific field of data analysis, users (especially business personnel without technical backgrounds) urgently need to be able to ask questions directly using natural language, such as "show a comparison of sales figures for each region last quarter" or "predict future user growth trends," thereby conveniently obtaining in-depth data analysis results and lowering the technical barriers to data querying and report generation.
[0003] However, directly applying general-purpose LLM to specialized data analysis fields faces significant challenges and limitations. First, the problem of misunderstanding user intent is particularly prominent. User questions in data analysis often contain specific analytical intents, such as "data query," "data statistics," "data comparison," "trend analysis," or "distribution analysis." Because general-purpose LLM training corpora have broad coverage but insufficient domain focus, they are prone to bias in understanding such specialized intents. For example, if a user asks "How are the sales figures?", their underlying intent might be to query total volume, calculate averages, or analyze trends. LLM may fail to accurately capture the true analytical needs behind such vague expressions, resulting in general, inaccurate, or non-expected answers.
[0004] Secondly, while some general methods for rewriting or clarifying questions exist in existing technologies, these methods typically lack deep adaptation to the characteristics of the data analysis domain. They often focus on syntactic correction or general semantic equivalence transformation, failing to intelligently adapt to the context of data analysis. This context includes, but is not limited to: dialogue history, user's historical behavioral preferences (such as commonly used data dimensions or time ranges), and metadata information of the specific dataset involved in the current query (such as database table structure, field meanings, etc.). The lack of integrated understanding of these multi-source contextual information results in rewritten questions that cannot match specific business scenarios and data environments, significantly reducing their accuracy and practicality.
[0005] Therefore, there is an urgent need in this field for a problem rewriting method and apparatus specifically designed for the data analysis domain. This method should be able to deeply understand the user's data analysis intent and fully integrate multi-dimensional contextual information, thereby accurately and formally rewriting the user's original, vague, and colloquial natural language questions into standardized questions that can be efficiently and accurately executed by LLM or data analysis engines. Ultimately, this will fundamentally improve the accuracy of human-computer interaction and user experience in data analysis scenarios.
[0006] In view of this, this invention patent is hereby proposed. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention proposes a method and apparatus for rewriting data analysis questions based on data analysis intent recognition. Specifically, the following technical solution is adopted: This invention provides a method for rewriting data analysis problems based on data analysis intent recognition, including: The problem of receiving and analyzing raw user data; Semantic analysis is performed on the original data analysis problem to identify the user's data analysis intent; Based on the original data analysis problem, multi-source contextual information is integrated to understand the user's data analysis context; Based on the data analysis intent and the data analysis context, a rewriting strategy for the original data analysis problem is generated, and the rewritten standard data analysis problem is output. The standardized data analysis question is input into a large language model for data analysis and processing, and then answered.
[0008] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the step of performing semantic analysis on the original data analysis problem to identify the user's data analysis intent includes: The original data analysis problem is semantically analyzed using an intent recognition model trained on a large-scale data analysis corpus to identify at least one data analysis intent. The data analysis intent includes data query, data statistics, data comparison, data trend analysis, or data distribution analysis.
[0009] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the step of understanding the user's data analysis context by fusing multi-source contextual information based on the original data analysis problem includes: A dynamic data analysis problem context graph is constructed for the current dialogue. This problem context graph formally represents the data analysis context by fusing the following multi-source information: Dialogue context: Extract entities, operational intentions, and time references related to the original data analysis question from the history of the current dialogue; User preference context: Based on users' historical behavior data, infer and incorporate data dimensions, analysis granularity, or common time ranges of user preferences; Data source context: Accesses and parses the metadata of the target dataset involved in the original data analysis problem. The metadata includes the data table structure, field meaning, field data type, and data update time.
[0010] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the step of generating a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context includes: The data analysis intent and the data analysis context are input into a predefined rewriting strategy classifier. This classifier, based on a rule engine and logical judgment, outputs one or more basic rewriting strategies, including: Intent clarification strategy: When the identified user intent is vague or general, this strategy is triggered to transform the intent into one or more explicit data analysis operation operators; Contextualization strategy: When the data analysis context contains available contextual information, this strategy is triggered to concretize the entities, time ranges, or data dimensions in the contextual information into the problem. Language standardization strategy: When the original data analysis problem is identified to contain colloquial, slang, or non-standard expressions, this strategy is triggered to map them to standard data analysis domain terminology. One or more of the aforementioned basic rewriting strategies are combined to form the final comprehensive rewriting strategy.
[0011] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the execution of the intent explicitation strategy includes: Based on a pre-defined industry dictionary of "data analysis operation - natural language" mapping, the identified data analysis intent is mapped to the corresponding structured operation semantic template; Furthermore, a natural language generation model is used, with the structured operation semantic template as the skeleton, and key parameters extracted from the original data analysis problem and data analysis context are filled in to generate the explicit data analysis operation operator, thereby forming the core part of the rewritten standard data analysis problem.
[0012] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition of the present invention, the step of generating a rewriting strategy for the original data analysis problem and outputting the rewritten standardized data analysis problem by executing the strategy is directly implemented through a sequence-to-sequence rewriting model, including: The rewriting model takes the original data analysis problem, the label of the data analysis intent, and the key feature vector extracted from the data analysis context as joint inputs, and directly outputs the standardized data analysis problem. The rewriting model is obtained by fine-tuning a pre-trained language model based on high-quality data analysis question-answer pairs and manually annotated rewriting sample pairs.
[0013] As an optional embodiment of the present invention, the data analysis problem rewriting method based on data analysis intent recognition of the present invention includes, before inputting the rewritten canonical data analysis problem into the large language model, performing a quality assessment on the rewritten canonical data analysis problem and calculating its quality confidence score. Determine whether the quality confidence score is lower than a preset confidence threshold; If the confidence level falls below the threshold, a fallback mechanism is triggered. The fallback mechanism's execution strategy includes at least one of the following: Abandon rewriting: Directly input the user's original data analysis question into the large language model; Hybrid questioning: The original data analysis question and the rewritten standardized data analysis question are input into the large language model together, with additional prompt words, requiring the large language model to comprehensively understand the two questions; Request clarification: Generate and return a clarification request to the user, guiding the user to restate the ambiguous or unclear points based on the identified intent and context.
[0014] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the step of performing a quality assessment on the rewritten standardized data analysis problem and calculating its quality confidence score is achieved through a multi-dimensional quality assessment model, including: Calculate the evaluation sub-scores for at least three of the following dimensions, and obtain the final quality confidence score through weighted fusion: Semantic fidelity score: Using a sentence similarity calculation model, the semantic similarity between the rewritten canonical data analysis question and the original data analysis question is calculated to assess whether the rewriting deviates from the user's original intention; Intent Coverage Score: Based on the data analysis intent, check whether the rewritten specification data analysis question contains the key operators and core parameters necessary to achieve the intent, ensuring that key analysis actions are not omitted; Grammatical fluency score: The perplexity of the rewritten canonical data analysis question is calculated using a language model, or its grammatical canonicity is detected by a grammatical error detector to assess its language quality; Contextual Integration Score: Verifies whether the rewritten canonical data analysis question correctly incorporates key contextual information extracted from the data analysis context, including user preferences and data source metadata.
[0015] As an optional embodiment of the present invention, in the data analysis problem rewriting method based on data analysis intent recognition, the calculation process of the semantic fidelity score S_faith includes: The original data analysis problem Q_original and the rewritten canonical data analysis problem Q_rewritten are converted into vectors V_original and V_rewritten, respectively, and the score is calculated using cosine similarity: S_faith = (V_original · V_rewritten) / (||V_original|| * ||V_rewritten||); The calculation process of the intent coverage score S_intent includes: Based on the identified data analysis intent I, a set K_I of key operators and core parameters necessary to achieve this intent is defined; then, the occurrence of elements in K_I in Q_rewritten is checked, and the coverage is calculated using the following formula: S_intent = |K_I ∩ K_rewritten| / |K_I|, where K_rewritten is the set of operators and parameters extracted from Q_rewritten; The calculation process for the syntax fluency score S_fluency includes: The perplexity PPL of Q_rewritten is calculated using a pre-trained language model and mapped to a fluency score using the following formula: S_fluency = exp(-α * PPL) Where α is a positive scaling factor used to adjust the fraction sensitivity; The calculation process of the context integration score S_context includes: Extract N key context entities E_C = {e_1, e_2, ...,e_N} from the data analysis context C, check their occurrence in Q_rewritten, and calculate the score: S_context = |E_C ∩ E_rewritten| / N Where E_rewritten is the set of entities extracted from Q_rewritten; The final quality confidence score S_quality is determined by the following weighted formula: S_quality = w1 * S_faith + w2 * S_intent + w3 * S_fluency + w4 * S_context Where w1, w2, w3, w4 are preset weight coefficients, and w1 + w2 + w3 + w4 = 1.
[0016] This invention also provides a data analysis problem rewriting device based on data analysis intent recognition, comprising: The input module is used to receive the user's raw data analysis questions; The intent recognition module is used to perform semantic analysis on the original data analysis question and identify the user's data analysis intent; The context understanding module is used to understand the user's data analysis context by integrating multi-source context information based on the original data analysis question; The rewriting strategy execution module is used to generate a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context, and output the rewritten standard data analysis problem. The output interface module is used to input the standardized data analysis question into the large language model for data analysis and processing and to obtain the answer.
[0017] The present invention provides a method for rewriting data analysis problems based on data analysis intent recognition, which has the following beneficial effects: (1) Significantly improved the accuracy and reliability of data analysis.
[0018] This invention discloses a method for rewriting data analysis questions based on data analysis intent recognition. By introducing a dedicated intent recognition and contextual understanding module, it can accurately capture the user's data analysis intent (such as comparison, trend, distribution, etc.) and combine it with specific context (such as historical dialogue, user preferences, and data metadata). This ensures that the generated canonical questions unambiguously reflect the user's true analysis needs, thereby guiding the large language model to provide highly relevant and accurate answers. This effectively overcomes the problems of irrelevant or vague answers caused by the intent understanding bias of general models.
[0019] (2) It has realized the intelligence and naturalness of human-computer interaction.
[0020] Users do not need to learn complex data query language beforehand or repeatedly adjust their questioning style; they only need to express their needs in a natural, conversational manner. This invention provides a data analysis question rewriting method based on data analysis intent recognition. This method translates the user's language into a machine-executable language, significantly lowering the technical barrier to data analysis. It enables business personnel without a technical background to easily obtain professional-grade data analysis results, greatly improving user experience and interaction efficiency.
[0021] (3) It enhances the system’s context perception and adaptive capabilities.
[0022] By dynamically constructing and integrating multi-source contextual information to form a "data analysis context," the system no longer understands individual questions in isolation, but possesses a certain degree of "memory" and "personalization" capabilities. It can remember dialogue history, understand user preferences, and ensure that questions are feasible within the existing data. This deep contextual integration makes the interaction process more coherent and intelligent, demonstrating a level of understanding approaching that of human experts.
[0023] (4) It provides robust quality assurance and fault tolerance mechanisms.
[0024] By introducing a quantifiable, multi-dimensional quality assessment model and verifying both the semantic consistency and technical feasibility of the rewriting results, this invention constructs a complete quality assurance system. This system can proactively identify and handle rewriting failures or low-quality outputs, and through rollback mechanisms (such as directly using the original problem or requesting user clarification), ensures that the system can provide an acceptable solution under any circumstances, thereby guaranteeing the robustness and reliability of the entire service process.
[0025] In summary, the data analysis problem rewriting method based on data analysis intent recognition of the present invention not only effectively solves the key pain points of LLM application in the field of data analysis, but also upgrades the simple "question and answer" into a complete intelligent interactive closed loop of "understanding, decision-making, verification, and optimization" through a series of innovative designs, providing key technical support for realizing an efficient, reliable, and easy-to-use intelligent data analysis system. Attached Figure Description
[0026] Figure 1 A flowchart of a data analysis problem rewriting method based on data analysis intent recognition according to an embodiment of the present invention; Figure 2 A schematic diagram of the structure of the electronic device according to an embodiment of the present invention; Figure 3 A schematic diagram of a computer-readable recording medium according to an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0028] Therefore, the following detailed description of embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely illustrates some embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0029] It should be noted that, unless otherwise specified, the embodiments and features and technical solutions in the present invention can be combined with each other.
[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0031] In the description of this invention, it should be noted that the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. These terms are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0032] See Figure 1 As shown, this embodiment provides a method for rewriting data analysis problems based on data analysis intent recognition, including: The problem of receiving and analyzing raw user data; Semantic analysis is performed on the original data analysis problem to identify the user's data analysis intent; Based on the original data analysis problem, multi-source contextual information is integrated to understand the user's data analysis context; Based on the data analysis intent and the data analysis context, a rewriting strategy for the original data analysis problem is generated, and the rewritten standard data analysis problem is output. The standardized data analysis question is input into a large language model for data analysis and processing, and then answered.
[0033] The data analysis problem rewriting method based on data analysis intent recognition in this embodiment has the following beneficial effects: (1) Significantly improved the accuracy and reliability of data analysis.
[0034] This embodiment presents a data analysis question rewriting method based on data analysis intent recognition. By introducing a dedicated intent recognition and contextual understanding module, it can accurately capture the user's data analysis intent (such as comparison, trend, distribution, etc.) and combine it with specific context (such as historical dialogue, user preferences, and data metadata). This ensures that the generated standardized question unambiguously reflects the user's true analysis needs, thereby guiding the large language model to provide highly relevant and accurate answers. This effectively overcomes the problems of irrelevant or vague answers caused by the intent understanding bias of general models.
[0035] (2) It has realized the intelligence and naturalness of human-computer interaction.
[0036] Users do not need to learn complex data query language beforehand or repeatedly adjust their questioning style; they only need to express their needs in a natural, conversational manner. This embodiment's data analysis question rewriting method based on data analysis intent recognition undertakes the translation from "user language" to "machine-executable language," significantly lowering the technical threshold for data analysis. This allows business personnel without a technical background to easily obtain professional-grade data analysis results, greatly improving user experience and interaction efficiency.
[0037] (3) It enhances the system’s context perception and adaptive capabilities.
[0038] By dynamically constructing and integrating multi-source contextual information to form a "data analysis context," the system no longer understands individual questions in isolation, but possesses a certain degree of "memory" and "personalization" capabilities. It can remember dialogue history, understand user preferences, and ensure that questions are feasible within the existing data. This deep contextual integration makes the interaction process more coherent and intelligent, demonstrating a level of understanding approaching that of human experts.
[0039] (4) It provides robust quality assurance and fault tolerance mechanisms.
[0040] By introducing a quantifiable, multi-dimensional quality assessment model and verifying both the semantic consistency and technical feasibility of the rewrite results, this embodiment constructs a complete quality assurance system. This system can proactively identify and handle rewrite failures or low-quality outputs, ensuring that an acceptable solution is provided under any circumstances through a fallback mechanism (such as directly using the original problem or requesting clarification from the user), thereby guaranteeing the robustness and reliability of the entire service process.
[0041] In summary, the data analysis question rewriting method based on data analysis intent recognition in this embodiment not only effectively solves the key pain points of LLM application in the field of data analysis, but also upgrades the simple "question and answer" into a complete intelligent interactive closed loop of "understanding, decision-making, verification, and optimization" through a series of innovative designs, providing key technical support for realizing an efficient, reliable, and easy-to-use intelligent data analysis system.
[0042] In this embodiment, the step of "performing semantic analysis on the original data analysis problem to identify the user's data analysis intent" is specifically implemented as follows: First, the system pre-builds an intent recognition model focused on the data analysis domain. The construction of this model is crucial; its training data comes from a large-scale, high-quality data analysis corpus. This corpus includes various data analysis-related question-and-answer formats, query logs, report descriptions, etc., ensuring that the model can learn the language patterns and intent features specific to this domain.
[0043] Once a user inputs their original data analysis question (e.g., "Compare the sales of product A and product B in the first half of the year"), the intent recognition model performs in-depth semantic analysis. Instead of simple keyword matching, the model understands the overall semantics of the question and categorizes it into one or more pre-defined, fine-grained data analysis intent categories.
[0044] In this embodiment, these preset intent categories include, but are not limited to: Data Query: Targeted data retrieval, such as "list all customer information".
[0045] Data statistics: This involves aggregation calculations, such as summation, average, and counting, such as "calculate total sales".
[0046] Data comparison: This involves comparing two or more entities, such as "comparing sales in Beijing and Shanghai".
[0047] Data trend analysis: Focus on the patterns of data changes over time, such as "analyzing the profit trend over the past year".
[0048] Data distribution analysis: Focus on the distribution of data across different dimensions, such as "viewing the distribution of user ages".
[0049] Through the above process, the user's vague, colloquial original question is transformed into one or more explicit, structured data analysis intent tags. The output of these tags provides a precise and actionable logical basis for the subsequent generation of rewriting strategies.
[0050] This implementation method, by introducing a domain-specific intent recognition model and a fine-grained intent classification system, brings the following prominent and highly relevant technical effects: It achieves precision and deambiguity in intent understanding. By using a model trained on a professional corpus, the system can penetrate the surface of users' colloquial expressions and accurately capture the real data analysis purpose behind them (such as resolving "how" as "statistics" or "trend analysis"). This fundamentally solves the problem of intent understanding bias caused by insufficient domain knowledge in general LLMs, laying the first cornerstone for generating accurate responses.
[0051] The process transforms user requirements into executable logical instructions. The identified intent label (such as "data comparison") is itself a high-level operational instruction. This allows the subsequent rewriting strategy generation module to be targeted effectively. For example, when the "comparison" intent is identified, the strategy mandates that the subject, dimensions, and time frame of the comparison be clearly defined in the rewritten question, ensuring that the final question submitted to the LLM is a logically complete and efficiently executable analysis task.
[0052] This provides structured input for subsequent contextual integration and strategy generation. As a form of structured metadata, intent tags can be more efficiently integrated with subsequent contextual information (such as historical comparison objects and commonly used statistical dimensions). For example, after identifying the intent of "trend analysis," the system can proactively retrieve the default time range (such as "the past year") from the context and incorporate it into the question, greatly enhancing the targeting and intelligence of the system's reasoning.
[0053] Therefore, the intent recognition scheme provided in this implementation is not an isolated text classification function, but rather the core decision-making starting point of the entire intelligent rewriting process. By transforming unstructured natural language questions into structured analytical intents, it provides a clear "direction of action" for the entire system, directly driving the accurate and collaborative work of all subsequent modules, and is the key to ultimately achieving a significant improvement in response accuracy.
[0054] In the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the step of understanding the user's data analysis context by fusing multi-source contextual information based on the original data analysis problem includes: A dynamic data analysis problem context graph is constructed for the current dialogue. This problem context graph formally represents the data analysis context by fusing the following multi-source information: Dialogue context: Extract entities, operational intentions, and time references related to the original data analysis question from the history of the current dialogue; User preference context: Based on users' historical behavior data, infer and incorporate data dimensions, analysis granularity, or common time ranges of user preferences; Data source context: Accesses and parses the metadata of the target dataset involved in the original data analysis problem. The metadata includes the data table structure, field meaning, field data type, and data update time.
[0055] In this embodiment, the core of the step of "integrating multi-source contextual information to understand the user's data analysis context" lies in dynamically constructing a structured "data analysis problem context graph." This graph, as a centralized, machine-readable contextual model, provides comprehensive and accurate background knowledge support for subsequent rewriting strategy generation. Its construction process is as follows: Conversation context extraction and integration: The system analyzes the current conversation's historical records in real time. It doesn't just passively store historical question-and-answer pairs; it actively extracts key information entities (such as product name, region, and metrics), executed operational intentions (e.g., "data statistics" performed in the previous step), and explicit or implicit time references (e.g., "last quarter"). These elements are stored as nodes and relationships in a context graph, ensuring the current question is understood within the logical coherence of the historical conversation.
[0056] User preference context reasoning and integration: The system accesses the user's historical behavior database and, by analyzing past questioning patterns and interaction records, infers the user's preferred data dimensions (e.g., preference for analysis by "region"), preferred analytical granularity (e.g., preference for viewing "monthly" summary data rather than daily data), and commonly used time ranges (e.g., default query for "last three months"). This inferred preference information is integrated into the user profile graph as nodes, enabling the system to provide personalized services and proactively adapt to user habits.
[0057] Data source context access and verification: The system proactively accesses and parses the metadata of the target database or dataset involved in the original data analysis problem. This includes, but is not limited to: the structure of the data table, the business meaning of each field, the data type of the field (such as string, number, date), and the data update time. This metadata information is constructed into a "data pattern" subgraph in the graph to ensure that the problem to be generated is technically feasible and accurate, avoiding errors such as requesting a non-existent field or performing numerical calculations on text fields.
[0058] Ultimately, this dynamically constructed problem context graph connects the dialogue flow, user profiles, and data structures, forming a three-dimensional and in-depth formal representation of the current analysis task.
[0059] This implementation method, by introducing a mechanism for dynamically constructing a problem context graph, brings the following direct and key technical effects: It achieves deep structuring and computability of contextual information. Unlike simply listing contextual information, the graph structure enables the system to "understand" the relationships between different information entities (such as "User A" often querying the "sales amount" of "Product B"), transforming background knowledge from passive storage into an active resource that can be used for programmatic reasoning, greatly improving the logic and depth of subsequent rewriting decisions.
[0060] This ensures the consistency and personalization of the rewritten results. By integrating the dialogue context, the system can understand referents and omissions (such as "its" in "compare it with product A"), guaranteeing smooth and natural multi-turn dialogues. Simultaneously, by incorporating user preference context, the system can automatically complete filter conditions and analysis dimensions that users haven't explicitly mentioned but habitually use, achieving a leap from "general answers" to "personalized customized answers," significantly improving the user experience.
[0061] This approach fundamentally prevents technical errors and enhances the feasibility of responses. By forcibly introducing the data source context, this solution pre-verifies the compatibility of fields, operations, and data models involved in the question before it is submitted to the LLM. This effectively eliminates invalid or erroneous queries caused by the LLM "illusion," ensuring that the generated analysis questions are not only semantically accurate but also technically executable, thereby significantly improving the reliability and professionalism of the entire system's output.
[0062] Therefore, the contextual graph construction scheme of this implementation is an intelligent bridge connecting "user intent" and "precise rewriting". Through deep fusion and structured representation of multi-source information, it enables the system to acquire contextual awareness and domain knowledge similar to that of human experts, and is the core engine driving the entire method to achieve intelligence, precision and reliability.
[0063] In the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the step of generating a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context includes: The data analysis intent and the data analysis context are input into a predefined rewriting strategy classifier. This classifier, based on a rule engine and logical judgment, outputs one or more basic rewriting strategies, including: Intent clarification strategy: When the identified user intent is vague or general, this strategy is triggered to transform the intent into one or more explicit data analysis operation operators; Contextualization strategy: When the data analysis context contains available contextual information, this strategy is triggered to concretize the entities, time ranges, or data dimensions in the contextual information into the problem. Language standardization strategy: When the original data analysis problem is identified to contain colloquial, slang, or non-standard expressions, this strategy is triggered to map them to standard data analysis domain terminology. One or more of the aforementioned basic rewriting strategies are combined to form the final comprehensive rewriting strategy.
[0064] In this embodiment, the core step of "generating a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context" relies on a rule engine-based, interpretable rewriting strategy classifier. This process embodies a high degree of logic and modular design, as detailed below: The input and triggering logic of the strategy classifier: The strategy classifier takes structured data analysis intent (such as "data comparison" labels) and formalized data analysis context (i.e., "problem context graph") as joint inputs. The classifier internally pre-sets a logical judgment tree based on "if-then" rules.
[0065] For example: If the intent is vague and general (such as "how is the situation?"), then the intent clarification strategy is triggered.
[0066] If there are available context nodes in the context graph that are not explicitly mentioned in the current question (such as the "quarterly" granularity of user preferences), then the context adaptation strategy is triggered.
[0067] If non-standard terms (such as the colloquial "chick") are detected in the original question, then a language normalization strategy is triggered.
[0068] Atomic execution of the basic rewrite strategy: Based on the trigger result, the system executes one or more of the following atomic rewrite operations: Intent Explicitization Strategy: The core of this strategy is to transform a labeled intent into one or more explicit data analysis operators. For example, for the intent of "data statistics," this strategy would specify it as operators such as "sum," "average," or "count," and ensure that these operators are incorporated into the rewritten question.
[0069] Context-adaptive strategy: This strategy proactively extracts specific entities, time ranges, or data dimensions from the "question context graph" and instantiates them into the question. For example, when the context includes the user preference "time range: the past month," this strategy will automatically replace "recent" in the question with "the past month."
[0070] Language standardization strategy: This strategy maintains a "colloquial-standard terminology" mapping dictionary, responsible for mapping slang and colloquial expressions in user questions to standard data analysis domain terms. For example, replacing "best-selling" with "highest sales volume".
[0071] Strategy Combination and Synthesis: The basic strategies mentioned above are not mutually exclusive but can be flexibly combined according to complex scenarios. For example, for a vague question that includes spoken language and lacks temporal context, the system may trigger all three strategies mentioned above simultaneously. The outputs of these atomic strategies are systematically integrated to ultimately form a comprehensive and enhanced rewriting strategy, guiding the generation of an optimal question that is accurate, standardized, and context-appropriate.
[0072] This implementation method introduces a mechanism that combines a rule engine-based policy classifier with atomic basic policies, resulting in the following key and directly related technical effects: This approach achieves a high degree of interpretability and controllability in the rewriting process. Compared to directly generating problems using an "end-to-end" black-box model, this solution decomposes complex rewriting tasks into a series of logically well-defined atomic operations. The triggering and execution of each strategy are traceable, which not only greatly facilitates system debugging and optimization but also empowers administrators to finely adjust rewriting behavior according to business rules, meeting the high controllability requirements of enterprise-level applications.
[0073] It offers flexibility and robustness in handling complex scenarios. Through a combination mechanism of basic strategies, this solution can elegantly handle comprehensive and multi-defect complex problems raised by users. The system can apply corresponding correction strategies to different defects in the problem (such as the simultaneous existence of "ambiguity of intent" and "lack of context"), like building blocks, thereby generating a rewritten result that is optimized in multiple dimensions, demonstrating strong scenario adaptability and robustness.
[0074] This ensures the standardization and domain-specificity of the generated questions. The language standardization and intent clarification strategies directly affect the "expression layer" and "logic layer" of the questions, forcibly elevating users' free-flowing expressions to a professional level that conforms to the standards of the data analysis domain. This ensures that the questions submitted to the large language model are clear, unambiguous, and actionable, laying a solid foundation from the source for generating high-quality, high-accuracy analytical answers.
[0075] Therefore, the innovation of the strategy generation scheme in this implementation lies not in replacing LLM, but in intelligently guiding and standardizing LLM input. It "compiles" the user's original requirements into high-quality, machine-friendly analysis instructions through an interpretable and composable rule framework, serving as the core decision-making and execution hub for the entire method to realize its value promise (improved accuracy and user experience).
[0076] In the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the execution of the intent explicitation strategy includes: Based on a pre-defined industry dictionary of "data analysis operation - natural language" mapping, the identified data analysis intent is mapped to the corresponding structured operation semantic template; Furthermore, a natural language generation model is used, with the structured operation semantic template as the skeleton, and key parameters extracted from the original data analysis problem and data analysis context are filled in to generate the explicit data analysis operation operator, thereby forming the core part of the rewritten standard data analysis problem.
[0077] In this embodiment, the execution of the "intent explicitation strategy" is the core step in achieving the precise transformation from vague intent to executable instructions. This process is implemented through an innovative method combining structured and generative approaches, with the specific steps as follows: Semantic template mapping based on industry dictionaries: The system maintains a pre-defined industry dictionary mapping "data analysis operations - natural language". This dictionary is the culmination of domain knowledge, and its core function is to map identified, tagged data analysis intentions (such as "data statistics" and "trend analysis") to corresponding, structured operational semantic templates.
[0078] For example, for the intent of "data statistics", the dictionary may have a pre-defined template [AGGREGATION_FUNCTION]([METRIC]) [GROUP_BY_CLASUE], where [AGGREGATION_FUNCTION] is a placeholder that can be specified as "summation", "average" or "counting" depending on the context.
[0079] This step ensures the technical rigor and domain expertise of the rewriting process, providing a standardized logical framework for generating canonical problems.
[0080] Key parameter imputation and natural language generation based on NLG model: After obtaining the structured operational semantic template, the system does not perform simple text replacement. Instead, it uses a natural language generation model, with the template as its framework, to perform the following operations: Key parameter population: The model extracts and disambiguates the key parameters needed from the original data analysis problem and data analysis context (problem context map). These parameters include specific metrics (such as "sales revenue"), dimensions (such as "product category"), time ranges (such as "Q1 2023"), etc., and accurately populate them into the corresponding placeholders in the template.
[0081] Fluent and natural question generation: After filling in the parameters, the NLG model is responsible for organizing the structured semantic templates and parameters into natural language sentences that conform to human language habits, are grammatically correct, and are fluent. For example, it will generate "Calculate the total sales of each product category in the first quarter of 2023", instead of rigid machine instructions.
[0082] Through the close integration of the above two steps, the system ultimately outputs the core part of the standardized data analysis problem that retains both accurate calculation logic and high readability.
[0083] This implementation method achieves the following key and directly related technical effects by adopting a hybrid approach of "industry dictionary templates + NLG parameterized generation": While ensuring operational accuracy, this method enhances the naturalness and readability of the questions. Its core advantage lies in balancing the accuracy of machine execution with the ease of human understanding. By solidifying the correct analytical logic through an industry dictionary, it fundamentally eliminates core errors such as operator misuse. Simultaneously, the use of an NLG model for expression makes the final question read like a natural and fluent professional inquiry, rather than a rigid database query code, greatly improving the human-computer interaction experience.
[0084] It achieves an intelligent fusion of domain expertise and dynamic context. The industry dictionary carries static, universal domain knowledge (i.e., "what operations should be performed"), while the parameter filling process of the NLG model dynamically incorporates the specific context of the current problem (i.e., "to whom and within what scope"). This combination of "static rules and dynamic information" enables the system to ensure the correctness of the analysis direction while flexibly adapting to the unique context of each specific problem, generating highly customized normative problems.
[0085] This provides a reliable core logical pillar for the entire rewriting system. The intent clarification strategy is the cornerstone of the entire rewriting strategy. This implementation method transforms the most ambiguous "vague intent" into the most solid and clear "problem core" in an interpretable and controllable way. This quantified and structured output provides a stable and high-quality processing foundation for other possible subsequent strategies (such as context adaptation), significantly improving the overall quality and reliability of the final problem submitted to the LLM.
[0086] This embodiment provides an industry dictionary for the field of data analysis, including: An entity thesaurus is used to store entity terms related to the data analysis field. A semantic element library is used to store the semantic elements corresponding to each entity word; A mapping relationship library is used to store the mapping relationship between entity words and their corresponding semantic elements.
[0087] This embodiment provides an industry dictionary for the field of data analysis. Its core lies in combining industry knowledge with the semantic recognition capabilities of a large language model through structured data storage, thereby achieving rapid matching and reuse of semantic elements.
[0088] The industry dictionary described in this embodiment consists of the following three interrelated libraries: Entity lexicon: Used to store core entity words extracted from corpora in the data analysis field. These entity words are frequently mentioned and focused on during the data analysis process.
[0089] Data sources may include financial reports, business reports, market analysis articles, business database table structures, and data dashboard indicator names.
[0090] Example: In the field of financial data analysis, the entity terms stored in this library include, but are not limited to: "stock", "bond", "fund", "yield", "volatility", "candlestick chart", "trading volume", and "return on equity (ROE)".
[0091] Semantic element library: Used to store the role, category, or attribute of each entity word in the context of data analysis, i.e., semantic elements. An entity word may correspond to one or more semantic elements.
[0092] Example: For the above entity words, their corresponding semantic elements might be: "Stocks" -> ["Investment Products", "Trading Targets", "Analysis Targets"]; "Return on Investment" -> ["Performance Indicators", "Risk Assessment Factors", "Comparison Dimensions"]; "Trading Volume" -> ["Market Sentiment Indicator", "Technical Analysis Parameters"].
[0093] Mapping relation library: Used to establish and store the associations between entity words and one or more semantic elements. This mapping is key to achieving fast querying.
[0094] Implementation: This library can be implemented using a key-value database, a relational database, or a graph database. For example, in a key-value database, the entity word "stock" is used as the key, and its corresponding list of semantic elements ["investment products", "trading objects", "analysis targets"] are used as the values.
[0095] The construction and workflow of the industry dictionary in this embodiment: Initialize the build.
[0096] Entity word extraction: Using rule matching, named entity recognition (NER) tools or lightweight models, the initial content of the "entity word library" is extracted in batches from massive amounts of historical industry text data.
[0097] Semantic element recognition: Traverse the initial entity lexicon, call the API of the Large Language Model (LLM), and combine the domain context of "data analysis" to perform semantic element recognition on each entity word, generating the initial "semantic element lexicon" and "mapping relation lexicon".
[0098] Runtime applications and dynamic updates.
[0099] When the system needs to perform semantic understanding on a new query (such as "calculate stock returns"): The system first extracts the entity words "stock" and "yield".
[0100] The semantic element recognition module prioritizes querying the industry dictionary. It will find the corresponding ["investment product", "trading object", "analysis target"] for "stock" and ["performance indicator", "risk assessment factor", "comparison dimension"] for "yield" in the mapping relationship library.
[0101] Based on the context of the current query (the verb "calculate"), the system selects the most appropriate "analysis target" for "stock" and the "performance indicator" for "yield" from the candidate semantic elements, thereby quickly completing the semantic element identification.
[0102] Dynamic learning: If a completely new entity or a new semantic context is encountered in subsequent processing (for example, in "stocks based on public opinion analysis", LLM identifies "stocks" as "public opinion analysis objects"), the system will automatically update this new mapping relationship "stocks" -> "public opinion analysis objects" to the industry dictionary, realizing the self-improvement and expansion of the dictionary.
[0103] The industry dictionary for data analysis provided in this embodiment, through the specific implementation methods described above, brings the following significant technical effects: It greatly improves recognition efficiency and system response speed.
[0104] By introducing an industry dictionary as a high-speed cache, the system no longer needs to call a computationally intensive and time-consuming large language model for the semantic recognition of most common entity words, but instead transforms it into an efficient memory or database query operation.
[0105] Originating from the workflow of "prioritizing industry dictionary lookup", the repetitive LLM calls are transformed into direct matching of local structured data, fundamentally solving the core problem of "repetitive computation" in the background technology, enabling the system to support the real-time data analysis needs of high concurrency and low latency.
[0106] Significantly reduces computing resource consumption and operating costs.
[0107] This significantly reduces the number of API calls to large language models in the cloud or locally, directly reducing the consumption of computing resources and related API call costs.
[0108] The higher the dictionary hit rate, the fewer LLM calls are made, and the system's operating and economic costs decrease significantly.
[0109] To achieve continuous accumulation and self-evolution of system knowledge.
[0110] This industry dictionary is not a static database, but a dynamically growing knowledge system. As the system operates, it continuously absorbs new entity words and semantic elements, expanding its coverage and enhancing its recognition capabilities.
[0111] The industry dictionary's "dynamic update mechanism" accumulates the results of each necessary LLM call into the system's own knowledge assets, enabling the system to learn and solving the deficiency of "lack of knowledge accumulation" in existing technologies. The level of intelligence continues to improve over time.
[0112] This invention constructs a structured, dynamically updatable industry dictionary, persistently encapsulates and reuses the powerful semantic understanding capabilities of large language models, and successfully transforms the semantic element recognition task from "requiring complex model calculations every time" to "requiring only simple dictionary lookups in most cases," thereby achieving groundbreaking technical results in terms of efficiency, cost, and intelligent evolution.
[0113] In the industry dictionary for data analysis described in this embodiment, the entity words in the entity thesaurus are extracted from industry text data. The semantic elements in the semantic element library are obtained by semantic element recognition of entity words through a large language model. The mapping relationships in the mapping relationship library are established by associating entity words with their corresponding semantic elements.
[0114] In the industry dictionary for data analysis described in this embodiment, the mapping relationships in the mapping relationship library are established by associating entity words with their corresponding semantic elements, including: The program calls the semantic element recognition result, associates it with the corresponding entity word, and stores it in the mapping relationship library. The mapping relationship library realizes the association between entity words and their corresponding semantic elements through one of the following methods: It is stored in key-value pairs, where entity words are keys and corresponding semantic elements are values. The data is stored in a relational database table, which contains at least an entity word field and a semantic element field, and an index is created using the entity word field. The data is stored in a graph database, where entity words and semantic elements are nodes in the graph, and the relationships between them are edges connecting the nodes. This is achieved using a hash table. Entity words are hashed, and the resulting hash value is used as an index to a storage address. The corresponding semantic elements are then stored at that address or in a storage structure associated with that address.
[0115] In the mapping relationship library described in this embodiment, one entity word corresponds to one or more semantic elements, which are used to represent the multiple meanings of the entity word in different contexts; The mapping database also stores contextual feature information of semantic elements, which is used for context matching during semantic element recognition.
[0116] This embodiment also provides a method for constructing an industry dictionary in the data analysis field, including: Extract entity words from industry text data and store them in an entity word library; The semantic elements of each entity word are identified using a large language model, and the corresponding semantic elements of each entity word are obtained and stored in a semantic element database. Establish a mapping relationship between entity words and their corresponding semantic elements, and store it in the mapping relationship library.
[0117] The industry dictionary construction method provided in this embodiment transforms raw, unstructured industry text into a well-structured knowledge base that can directly serve semantic element recognition tasks through a systematic and automated process. This construction method itself brings the following significant technical effects: It achieves the systematic and structured encapsulation of domain knowledge.
[0118] This method solidifies the deep semantic understanding capabilities of large language models for industry texts into a lightweight, efficiently queryable structured dictionary. It transforms the scattered industry knowledge implicit in the text into explicit "entity word-semantic element" mapping relationships, forming a computable and operable knowledge asset.
[0119] This effect stems directly from the systematic construction process of "entity word extraction → semantic element identification → mapping relationship establishment". This method does not simply pile up data, but rather refines and reorganizes the analysis results of LLM through orderly steps, generating a structured product with clear semantic support.
[0120] This provides a high-quality initial data foundation for an efficient semantic recognition system.
[0121] The industry dictionary constructed using this method possesses abundant prior knowledge from the outset of system deployment, achieving a "high-start-point cold start." This avoids complete reliance on LLM in the initial stage, enabling the semantic element recognition system to achieve high processing efficiency and accuracy from the very beginning.
[0122] The crucial step of "using a large language model to identify semantic elements of each entity word" ensures the accuracy and breadth of the initial dictionary content. Through batch processing of massive amounts of historical data, the dictionary covers the vast majority of common entity words and their core semantic elements in the field during initialization, providing a solid data guarantee for subsequent rapid matching.
[0123] This ensures the consistency and traceability of semantic element recognition.
[0124] The mapping relationship library established by the construction method effectively creates a standardized representation of semantic elements within this domain. All semantic recognition based on this dictionary provides a consistent understanding of the same entity word in the same context, avoiding the subtle fluctuations that may occur when directly calling LLM. Furthermore, all recognition results can be traced back to the established semantic elements in the dictionary, enhancing the reliability and interpretability of the system.
[0125] The step of "establishing and storing mapping relationships" is the process of "standardizing" and finalizing the LLM recognition results. It establishes the semantic specifications to be followed in the subsequent operation of the system, providing a unified and consistent semantic understanding benchmark for the entire recognition system.
[0126] The industry dictionary construction method provided in this embodiment does not merely generate a static vocabulary. Instead, it transforms the one-time, intensive computational results of a large language model into a persistent, dynamically evolving, and quality-controllable core data asset through an innovative process. The implementation of this method provides an indispensable prerequisite and core driving force for ultimately achieving a highly efficient, low-cost, and highly available semantic element recognition system.
[0127] This embodiment also provides a semantic element recognition system in the field of data analysis, including: Industry dictionary; The semantic element recognition module is used to extract entity words based on the input data analysis problem and search for corresponding semantic elements from the industry dictionary; The large language model module is used to identify semantic elements of the input entity words when no corresponding semantic element is found in the industry dictionary, and update the identification results to the industry dictionary.
[0128] This embodiment provides a semantic element recognition system in the field of data analysis. This system integrates a self-learning industry dictionary to construct an efficient and intelligent semantic understanding closed loop. The following section combines... Figure 1 The components and their interactions are described in detail.
[0129] (1) System components.
[0130] Industry Dictionary: As the core knowledge base of the system, its structure and implementation method are as described above, including an entity lexicon, a semantic element lexicon, and a mapping relation lexicon. It is the "brain memory" that enables the system to achieve rapid response.
[0131] Semantic element recognition module: This module is the system's working engine, responsible for executing the core recognition process. Its operation follows a typical "caching-first" strategy: Receive input: Receive data analysis questions or instructions from users, such as: "Please compare the yields of stocks and bonds." Entity extraction: First, the input text is preprocessed, and then key entity words are extracted using rules or a lightweight NER model. In this example, the extracted entity words are: "stocks", "bonds", and "yield".
[0132] Dictionary lookup and disambiguation: The extracted entity words are sequentially sent to the industry dictionary for lookup.
[0133] If a match is found: the dictionary returns a list of candidate semantic elements for each entity word. For example, "stock" returns ["investment product", "trading object", "analysis target"]. The module then performs rapid semantic disambiguation based on the context of the original input ("comparing...yields"), selecting the most relevant element (in this example, "stock" and "bond" are both identified as "analysis target", and "yield" is identified as "comparison indicator").
[0134] If no match is found: For entity words that do not exist in the dictionary, or for contexts where existing semantic elements do not match, the entity word and its context information are passed to the large language model module.
[0135] Large Language Model Module: This module is invoked in two cases: Dictionary not found: This module is called when the semantic element recognition module cannot find the answer in the dictionary.
[0136] Complex Context Analysis (Optional Enhancement): This module can be invoked to assist in disambiguation for extremely complex or ambiguous contexts, even when a dictionary hit occurs.
[0137] This module performs deep semantic analysis on the received entity words and their context, and returns the semantic elements it has identified.
[0138] Key Function – Driving System Evolution: After completing the identification, this module immediately feeds back the identification results (new entity words or new semantic element mapping relationships) to the industry dictionary, triggering the dictionary update process. For example, when processing "NFT volatility" for the first time, LLM may identify "NFT" as "digital asset," and the system will then persist the new mapping relationship "NFT" -> "digital asset" to the dictionary.
[0139] The semantic element recognition system provided in this embodiment, through the aforementioned collaborative architecture of "local dictionary priority + LLM backtracking + closed-loop self-learning," has achieved the following groundbreaking technical effects: It achieves the best balance between response speed and recognition accuracy.
[0140] The system achieves millisecond-level response for high-frequency, common queries, while maintaining extremely high semantic understanding accuracy for low-frequency, complex queries.
[0141] This effectiveness stems directly from the collaborative design of "prioritizing industry dictionary lookups" and "LLM rollback protection." The local dictionary solves over 95% of common problems, ensuring speed; LLM handles the remaining complex issues, guaranteeing the overall accuracy and robustness of the system.
[0142] This establishes a virtuous cycle between computational cost and system performance.
[0143] The longer the system runs, the richer the dictionary becomes, the lower the dependence on LLM becomes, and the overall computing cost tends to decrease, while the system performance and intelligence level continue to improve.
[0144] This is the revolutionary effect brought about by the "dynamic update mechanism". Every necessary LLM call is not a simple consumption, but an "investment" in the system itself. The results are stored in the dictionary, permanently reducing future computational overhead and forming a virtuous cycle of "getting smarter and faster the more you use it".
[0145] This endows the system with the ability to continuously evolve autonomously.
[0146] The system has transformed from a static tool into a living knowledge system capable of learning from use and adapting to business changes. It can automatically capture new industry terms and concepts, expanding its cognitive boundaries without human intervention.
[0147] The core of this effect lies in the closed-loop design of "updating the recognition results to the industry dictionary". This allows the system to no longer rely on periodic, manually-led model retraining or dictionary expansion, enabling online, real-time self-iteration and evolution.
[0148] In summary, the core technological contribution of this system embodiment lies in its innovative integration of the large language model as both a "knowledge miner" and a "problem solver" into a highly efficient recognition framework, rather than directly serving as a "laborer" for each query. In this way, the system transforms the powerful capabilities of LLM into a sustainable, scalable, and cost-controllable core competency, ultimately achieving a leapfrog improvement in efficiency, cost, and intelligence in industrial applications.
[0149] In a semantic element recognition system for data analysis in this embodiment, when the semantic element recognition module finds an entity word corresponding to multiple semantic elements in an industry dictionary, it selects the most matching semantic element from the multiple semantic elements as the recognition result based on the input context information. The semantic element recognition module selects semantic elements using one of the following methods: Calculation based on the similarity between the input text and the preset context of semantic elements; Fast classification based on a lightweight local classification model; Matching is performed based on keyword co-occurrence rules.
[0150] In a semantic element recognition system for data analysis according to this embodiment, the large language model module is used to perform semantic element recognition on the input entity words when no corresponding semantic element is found in the industry dictionary, and update the recognition result to the industry dictionary, including: When the mapping relationship between the semantic elements identified by the large language model and the current entity word does not exist in the industry dictionary, the new mapping relationship is established and stored in the mapping relationship library. When the large language model identifies a new semantic element of the current entity word, it adds the new semantic element to the semantic element set corresponding to the entity word in the semantic element library, and establishes a mapping relationship between the entity word and the new semantic element in the mapping relationship library.
[0151] This embodiment also provides a semantic element recognition method based on the semantic element recognition system in the data analysis field, including: The problem of receiving and analyzing raw user data; Based on the input raw data analysis problem, entity words are extracted, and corresponding semantic elements are searched from the industry dictionary; When no corresponding semantic element is found in the industry dictionary, the large language model module performs semantic element recognition on the extracted entity words and updates the recognition results to the industry dictionary.
[0152] The semantic element recognition method provided in this embodiment achieves the following significant technical effects by implementing the above technical solution: This represents a qualitative leap in response efficiency.
[0153] By prioritizing industry dictionary queries as a core step, the main path of semantic recognition is shifted from relying on complex computations to calling large language models to efficiently querying local structured databases. This enables the system to achieve millisecond-level semantic element recognition for common, high-frequency data analysis problems, significantly improving user experience and system throughput.
[0154] This has created a virtuous cycle between resource consumption and system performance.
[0155] This method does not completely avoid using large language models, but rather uses a strategy of "calling LLM when the dictionary misses" as a precise and efficient supplement. This not only significantly reduces computational resource consumption and API call costs, but more importantly, the closed-loop design of "updating the recognition results to the industry dictionary" ensures that every necessary resource investment is transformed into future performance assets for the system. The longer the system runs, the more complete the dictionary becomes, and the lower the dependence on LLM becomes, forming a virtuous cycle of "the more it is used, the faster it gets, and the more it is used, the more economical it becomes."
[0156] It endows the system with the ability to continuously optimize and adapt.
[0157] This method transforms the system from a static semantic recognition tool into an intelligent system capable of "learning from practice." Whether encountering new entity words or new contexts with existing entity words, the system can automatically acquire new knowledge and incorporate it into the industry dictionary through collaboration with a large language model. This dynamic update mechanism ensures that the system can proactively adapt to business development and language changes, and its recognition accuracy and coverage continuously evolve and improve over time.
[0158] Therefore, the core technical contribution of this method lies in its ingenious process design, which optimally integrates the powerful semantic understanding capabilities of large language models with the efficient query characteristics of local dictionaries. This successfully transforms the semantic recognition task from a complex computation with "high consumption and slow response" into an intelligent process with "high efficiency and low cost" as its main theme, while also possessing the ability of "continuous learning and self-optimization". This provides a solid technical foundation for natural language interaction in the field of data analysis.
[0159] In the semantic element recognition method described in this embodiment, the step of extracting entity words based on the input raw data analysis problem includes: Semantic analysis is performed on the original data analysis problem to identify the user's data analysis intent; Based on the original data analysis problem, multi-source contextual information is integrated to understand the user's data analysis context; Based on the data analysis intent and the data analysis context, a rewriting strategy for the original data analysis problem is generated, and the rewritten standard data analysis problem is output. Based on the rewritten standard data analysis problem, entity words are extracted.
[0160] In the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the step of generating a rewriting strategy for the original data analysis problem and outputting the rewritten standardized data analysis problem by executing the strategy is directly implemented through a sequence-to-sequence rewriting model, including: The rewriting model takes the original data analysis problem, the label of the data analysis intent, and the key feature vector extracted from the data analysis context as joint inputs, and directly outputs the standardized data analysis problem. The rewriting model is obtained by fine-tuning a pre-trained language model based on high-quality data analysis question-answer pairs and manually annotated rewriting sample pairs.
[0161] In this embodiment, the process of "generating rewriting strategies and outputting standardized data analysis problems" is directly completed by an end-to-end sequence-to-sequence rewriting model. This approach represents an advanced data-driven implementation path, the core of which lies in deeply adapting the pre-trained model to a specific task. The specific implementation is as follows: Multimodal joint input construction: The model's input is not just the original question text, but a joint input that incorporates information from multiple sources. This input consists of three parts: Raw data analysis problem: The user's initial natural language question.
[0162] Data analysis intent labels: structured labels (such as [COMPARISON]) output by the intent recognition module.
[0163] Key feature vectors in data analysis context: Encoded key information extracted from the "problem context graph", such as user preferences, historical dialogue entities, data field metadata, etc.
[0164] Technically, these three elements are usually combined using specific templates or separators to form a comprehensive prompt, or they are fused using a specific encoder before being input into the model, thus providing the model with panoramic decision-making information.
[0165] Domain-specific sequence-to-sequence models: The model itself is a specialized model fine-tuned from a large-scale pre-trained language model. The dataset upon which its fine-tuning training relies is not general text, but rather a carefully constructed set of high-quality question-answer pairs and manually annotated rewrite samples specific to the data analysis domain. These sample pairs clearly demonstrate the transformation process from "raw, ambiguous questions" to "standardized, professional questions," enabling the model to deeply learn and mimic the rewrite paradigms and terminology unique to the data analysis field.
[0166] End-to-end specification question generation: This model uses the aforementioned joint input as conditions to directly and autoregressively generate a complete and standardized data analysis problem. It does not require an explicit "policy classification-policy execution" intermediate step; instead, through its internal attention mechanism, it implicitly learns and applies various rewriting strategies, outputting the final result in one step.
[0167] This implementation method, by employing an end-to-end sequence-to-sequence model based on domain fine-tuning, brings the following prominent and directly related technical effects: This solution achieves end-to-end optimization and efficiency improvement of the rewritten process. By eliminating explicit logical judgments and sequential execution of multiple intermediate modules, the processing pipeline is significantly simplified. The model can complete the transformation from raw input to standardized output with a single forward computation, which not only reduces the design complexity of the system but also helps to reduce error accumulation and potentially improves response speed.
[0168] It possesses advanced generalization capabilities to capture complex mapping relationships. Compared to rule-based methods, the greatest advantage of this data-driven approach lies in its ability to learn and reproduce complex and subtle rewriting patterns present in the training data. For rewriting scenarios that rely on deep semantic understanding and where rules are difficult to exhaustively list, this model can leverage its knowledge learned from massive amounts of samples to generate more flexible, relevant, and natural canonical questions, demonstrating stronger intelligence and generalization.
[0169] This approach ensures a high degree of fit between the generated results and the domain context. By using "intent labels" and "contextual feature vectors" as mandatory inputs to the model, this scheme effectively injects domain knowledge and control signals into the generation process. This guides and constrains the model's generation direction, ensuring that its output is not only linguistically fluent but also absolutely accurate in analyzing intent and fully and reasonably utilizing context. Thus, while maintaining generation flexibility, it strictly guarantees the professional accuracy of the results.
[0170] In the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, before the rewritten canonical data analysis problem is input into the large language model, the following steps are taken: to conduct a quality assessment on the rewritten canonical data analysis problem and calculate its quality confidence score. Determine whether the quality confidence score is lower than a preset confidence threshold; If the confidence level falls below the threshold, a fallback mechanism is triggered. The fallback mechanism's execution strategy includes at least one of the following: Abandon rewriting: Directly input the user's original data analysis question into the large language model; Hybrid questioning: The original data analysis question and the rewritten standardized data analysis question are input into the large language model together, with additional prompt words, requiring the large language model to comprehensively understand the two questions; Request clarification: Generate and return a clarification request to the user, guiding the user to restate the ambiguous or unclear points based on the identified intent and context.
[0171] In this embodiment, the system introduces a key quality control step to proactively identify and handle rewriting failures or poor quality situations, thereby forming a closed-loop system with self-monitoring and corrective capabilities. The specific implementation process of this mechanism is as follows: Quality assessment and confidence quantification: Before submitting the rewritten canonical data analysis question to the large language model, the system first performs an automated quality assessment. This is typically achieved through a dedicated assessment module or model that analyzes the rewritten question and calculates a quantified quality confidence score. This score comprehensively reflects the rewritten result's performance across multiple dimensions, including semantic fidelity, intent coverage, language fluency, and contextual integration.
[0172] Threshold judgment and decision triggering: The system compares the calculated quality confidence score with a preset confidence threshold. This threshold can be dynamically adjusted according to the accuracy requirements of the business scenario. When the score is lower than this threshold, the system determines that the rewrite quality is "unreliable" and immediately triggers the subsequent rollback mechanism.
[0173] The tiered rollback mechanism is implemented as follows: The rollback mechanism is not a single operation, but a solution library containing multiple execution strategies that can be enabled on demand or in combination, specifically including: Abandoning rewriting: As the most conservative strategy, the system will completely abandon the rewritten question and instead directly input the user's original data analysis question into the large language model. This strategy is suitable for situations where the rewriting deviates significantly from the original meaning or introduces errors, ensuring the most basic information fidelity.
[0174] Hybrid questioning: As a balancing strategy, the system inputs both the original question and the rewritten question into the large language model, along with specific prompts (e.g., "The user has asked a question, and the system attempts to rewrite it in a more formal form. Please comprehensively understand the following two questions and provide the most accurate answer: Original question: [...], Rewritten question: [...]"). This allows the LLM to cross-validate, comprehensively utilizing information from both to arrive at more robust conclusions.
[0175] Clarification Request: As the most proactive strategy, the system does not submit the issue directly to the LLM. Instead, it generates a user-oriented, intelligent clarification request. Based on the identified intent and context, this request precisely points out the ambiguity (e.g., "Are you comparing 'sales' or 'profit'? Please confirm the metric you are focusing on."), guiding the user to provide more specific information and thus resolving the issue at its root.
[0176] This implementation method, by introducing quality assessment and a tiered rollback mechanism, brings the following crucial and directly related technical effects: A closed-loop system with fault tolerance and self-healing capabilities was constructed. This mechanism transforms the system from a fragile "open-loop" pipeline into one capable of self-awareness of output quality and automatic initiation of corrective processes upon detecting problems. This design upgrades the unidirectional "rewrite-respond" process into an intelligent closed loop with feedback and adjustment capabilities, significantly enhancing the robustness and practicality of the entire solution.
[0177] It maximizes the value of intelligent rewriting while ensuring reliability. By providing rollback strategies at various granularities, the system achieves an intelligent trade-off between "automation" and "accuracy." It will not completely collapse due to a single rewriting failure (with "abandon rewriting" as a fallback), nor will it mechanically output low-quality results. Instead, it can flexibly choose "mixed questioning" to attempt remediation or "request clarification" to seek the optimal solution, thus providing an acceptable or better solution in most cases.
[0178] This significantly improves user experience and system credibility. From the user's perspective, the system behaves more cautiously and intelligently. It doesn't force a potentially wrong answer but proactively asks questions when uncertain, avoiding user confusion and wasted time due to incorrect answers. This "know what you know, ask what you don't know" interactive behavior greatly enhances user trust in the system, demonstrating a high level of human-computer interaction intelligence.
[0179] In summary, the quality control and rollback mechanism of this embodiment is a key safety guarantee to ensure that the method described in this invention can move from "laboratory prototype" to "industrial application". Through post-implementation monitoring and intervention, it provides an "insurance" layer for pre-implementation intelligent processing, ensuring the final quality limit of the entire system output. This is a core design element for improving the overall maturity, reliability, and user satisfaction of the solution.
[0180] Furthermore, in the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the quality assessment of the rewritten standardized data analysis problem and the calculation of its quality confidence score are achieved through a multi-dimensional quality assessment model, including: Calculate the evaluation sub-scores for at least three of the following dimensions, and obtain the final quality confidence score through weighted fusion: Semantic fidelity score: Using a sentence similarity calculation model, the semantic similarity between the rewritten canonical data analysis question and the original data analysis question is calculated to assess whether the rewriting deviates from the user's original intention; Intent Coverage Score: Based on the data analysis intent, check whether the rewritten specification data analysis question contains the key operators and core parameters necessary to achieve the intent, ensuring that key analysis actions are not omitted; Grammatical fluency score: The perplexity of the rewritten canonical data analysis question is calculated using a language model, or its grammatical canonicity is detected by a grammatical error detector to assess its language quality; Contextual Integration Score: Verifies whether the rewritten canonical data analysis question correctly incorporates key contextual information extracted from the data analysis context, including user preferences and data source metadata.
[0181] Optionally, in the data analysis problem rewriting method based on data analysis intent recognition described in this embodiment, the calculation process of the semantic fidelity score S_faith includes: The original data analysis problem Q_original and the rewritten canonical data analysis problem Q_rewritten are converted into vectors V_original and V_rewritten, respectively, and the score is calculated using cosine similarity: S_faith = (V_original · V_rewritten) / (||V_original|| * ||V_rewritten||); The calculation process of the intent coverage score S_intent includes: Based on the identified data analysis intent I, a set K_I of key operators and core parameters necessary to achieve this intent is defined; then, the occurrence of elements in K_I in Q_rewritten is checked, and the coverage is calculated using the following formula: S_intent = |K_I ∩ K_rewritten| / |K_I|, where K_rewritten is the set of operators and parameters extracted from Q_rewritten; The calculation process for the syntax fluency score S_fluency includes: The perplexity PPL of Q_rewritten is calculated using a pre-trained language model and mapped to a fluency score using the following formula: S_fluency = exp(-α * PPL); Where α is a positive scaling factor used to adjust the fraction sensitivity; The calculation process of the context integration score S_context includes: Extract N key context entities E_C = {e_1, e_2, ...,e_N} from the data analysis context C, check their occurrence in Q_rewritten, and calculate the score: S_context = |E_C ∩ E_rewritten| / N; Where E_rewritten is the set of entities extracted from Q_rewritten; The final quality confidence score S_quality is determined by the following weighted formula: S_quality = w1 * S_faith + w2 * S_intent + w3 * S_fluency + w4 * S_context; Where w1, w2, w3, w4 are preset weight coefficients, and w1 + w2 + w3 + w4 = 1.
[0182] This embodiment also provides a data analysis problem rewriting device based on data analysis intent recognition, including: The input module is used to receive the user's raw data analysis questions; The intent recognition module is used to perform semantic analysis on the original data analysis question and identify the user's data analysis intent; The context understanding module is used to understand the user's data analysis context by integrating multi-source context information based on the original data analysis question; The rewriting strategy execution module is used to generate a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context, and output the rewritten standard data analysis problem. The output interface module is used to input the standardized data analysis question into the large language model for data analysis and processing and to obtain the answer.
[0183] Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. The electronic device includes a processor and a memory. The memory is used to store a computer-executable program. When the computer program is executed by the processor, the processor executes a data analysis problem rewriting method based on data analysis intent recognition according to an embodiment.
[0184] like Figure 2As shown, the electronic device is embodied in the form of a general-purpose computing device. There can be one or more processors working collaboratively. This invention also does not preclude distributed processing, meaning that processors can be distributed across different physical devices. The electronic device of this invention is not limited to a single entity, but can also be the sum of multiple physical devices.
[0185] The memory stores a computer-executable program, typically machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least some steps of the method.
[0186] The memory includes volatile memory, such as random access memory (RAM) and / or cache memory, and may also be non-volatile memory, such as read-only memory (ROM).
[0187] Optionally, in this embodiment, the electronic device further includes an I / O interface for exchanging data with external devices. The I / O interface can represent one or more of several bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0188] It should be understood that Figure 2 The electronic device shown is merely one example of the present invention, and the electronic device of the present invention may also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as displays, and some electronic devices also include human-computer interaction elements such as buttons and keyboards. Any electronic device capable of executing a computer-readable program in memory to implement the method of the present invention or at least some steps of the method can be considered as an electronic device covered by the present invention.
[0189] Figure 3 This is a schematic diagram of a computer-readable recording medium according to an embodiment of the present invention. Figure 3As shown, a computer-readable recording medium stores a computer-executable program. When executed, the computer-executable program implements a data analysis problem rewriting method based on data analysis intent recognition, according to an embodiment of the present invention. The computer-readable recording medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable recording medium may also be any readable medium other than a readable recording medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable recording medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0190] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0191] From the above description of the embodiments, those skilled in the art will readily understand that the present invention can be implemented by hardware capable of executing specific computer programs, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. included in the system. The present invention can also be implemented by computer software executing the methods of the present invention, for example, by control software executed by a microprocessor, electronic control unit, client, server, etc. However, it should be noted that the computer software executing the methods of the present invention is not limited to execution in one or a specific set of hardware entities; it can also be implemented in a distributed manner by unspecified hardware. For computer software, the software product can be stored on a computer-readable recording medium (such as a CD-ROM, USB flash drive, portable hard disk, etc.) or distributed across a network, as long as it enables electronic devices to execute the methods according to the present invention.
[0192] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described herein. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the specific embodiments described above. Therefore, any modifications or equivalent substitutions to the present invention, as well as all technical solutions and improvements that do not depart from the spirit and scope of the invention, are covered within the scope of the claims of the present invention.
Claims
1. A method for rewriting data analysis problems based on data analysis intent recognition, characterized in that: include: The problem of receiving and analyzing raw user data; Semantic analysis is performed on the original data analysis problem to identify the user's data analysis intent; Based on the original data analysis problem, multi-source contextual information is integrated to understand the user's data analysis context; Based on the data analysis intent and the data analysis context, a rewriting strategy for the original data analysis problem is generated, and the rewritten standard data analysis problem is output. The standardized data analysis question is input into a large language model for data analysis and processing, and then answered.
2. The data analysis problem rewriting method based on data analysis intent recognition according to claim 1, characterized in that, The semantic analysis performed on the original data analysis problem to identify the user's data analysis intent includes: The original data analysis problem is semantically analyzed using an intent recognition model trained on a large-scale data analysis corpus to identify at least one data analysis intent. The data analysis intent includes data query, data statistics, data comparison, data trend analysis, or data distribution analysis.
3. The data analysis problem rewriting method based on data analysis intent recognition according to claim 1, characterized in that, The process of understanding the user's data analysis context by integrating multi-source contextual information based on the original data analysis problem includes: A dynamic data analysis problem context graph is constructed for the current dialogue. This problem context graph formally represents the data analysis context by fusing the following multi-source information: Dialogue context: Extract entities, operational intentions, and time references related to the original data analysis question from the history of the current dialogue; User preference context: Based on users' historical behavior data, infer and incorporate data dimensions, analysis granularity, or common time ranges of user preferences; Data source context: Accesses and parses the metadata of the target dataset involved in the original data analysis problem. The metadata includes the data table structure, field meaning, field data type, and data update time.
4. The data analysis problem rewriting method based on data analysis intent recognition according to claim 1, characterized in that, The rewriting strategy for the original data analysis problem, based on the data analysis intent and the data analysis context, includes: The data analysis intent and the data analysis context are input into a predefined rewriting strategy classifier. This classifier, based on a rule engine and logical judgment, outputs one or more basic rewriting strategies, including: Intent clarification strategy: When the identified user intent is vague or general, this strategy is triggered to transform the intent into one or more explicit data analysis operation operators; Contextualization strategy: When the data analysis context contains available contextual information, this strategy is triggered to concretize the entities, time ranges, or data dimensions in the contextual information into the problem. Language standardization strategy: When the original data analysis problem is identified to contain colloquial, slang, or non-standard expressions, this strategy is triggered to map them to standard data analysis domain terminology. One or more of the aforementioned basic rewriting strategies are combined to form the final comprehensive rewriting strategy.
5. The data analysis problem rewriting method based on data analysis intent recognition according to claim 4, characterized in that, The execution of the intent explicitation strategy includes: Based on a pre-defined industry dictionary of "data analysis operations - natural language" mapping, the identified data analysis intent is mapped into the corresponding structured operation semantic template. Furthermore, a natural language generation model is used, with the structured operation semantic template as the skeleton, and key parameters extracted from the original data analysis problem and data analysis context are filled in to generate the explicit data analysis operation operator, thereby forming the core part of the rewritten standard data analysis problem.
6. The data analysis problem rewriting method based on data analysis intent recognition according to claim 1, characterized in that, The generation of a rewriting strategy for the original data analysis problem, and the output of the rewritten standardized data analysis problem by executing the strategy, are directly achieved through a sequence-to-sequence rewriting model, including: The rewriting model takes the original data analysis problem, the label of the data analysis intent, and the key feature vector extracted from the data analysis context as joint inputs, and directly outputs the standardized data analysis problem. The rewriting model is obtained by fine-tuning a pre-trained language model based on high-quality data analysis question-answer pairs and manually annotated rewriting sample pairs.
7. The data analysis problem rewriting method based on data analysis intent recognition according to claim 1, characterized in that, Before inputting the rewritten canonical data analysis problem into the large language model, the following steps are taken: to conduct a quality assessment on the rewritten canonical data analysis problem and calculate its quality confidence score. Determine whether the quality confidence score is lower than a preset confidence threshold; If the confidence level falls below the threshold, a fallback mechanism is triggered. The fallback mechanism's execution strategy includes at least one of the following: Abandon rewriting: Directly input the user's original data analysis question into the large language model; Hybrid questioning: The original data analysis question and the rewritten standardized data analysis question are input into the large language model together, with additional prompt words, requiring the large language model to comprehensively understand the two questions; Request clarification: Generate and return a clarification request to the user, guiding the user to restate the ambiguous or unclear points based on the identified intent and context.
8. The data analysis problem rewriting method based on data analysis intent recognition according to claim 7, characterized in that, The quality assessment of the rewritten, standardized data analysis problem, and the calculation of its quality confidence score, are achieved through a multi-dimensional quality assessment model, including: Calculate the evaluation sub-scores for at least three of the following dimensions, and obtain the final quality confidence score through weighted fusion: Semantic fidelity score: Using a sentence similarity calculation model, the semantic similarity between the rewritten canonical data analysis question and the original data analysis question is calculated to assess whether the rewriting deviates from the user's original intention; Intent Coverage Score: Based on the data analysis intent, check whether the rewritten specification data analysis question contains the key operators and core parameters necessary to achieve the intent, ensuring that key analysis actions are not omitted; Grammatical fluency score: The perplexity of the rewritten canonical data analysis question is calculated using a language model, or its grammatical canonicity is detected by a grammatical error detector to assess its language quality; Contextual Integration Score: Verifies whether the rewritten canonical data analysis question correctly incorporates key contextual information extracted from the data analysis context, including user preferences and data source metadata.
9. The data analysis problem rewriting method based on data analysis intent recognition according to claim 8, characterized in that, The calculation process of the semantic fidelity score S_faith includes: The original data analysis problem Q_original and the rewritten canonical data analysis problem Q_rewritten are converted into vectors V_original and V_rewritten, respectively, and the score is calculated using cosine similarity: S_faith = (V_original · V_rewritten) / (||V_original|| * ||V_rewritten||); The calculation process of the intent coverage score S_intent includes: Based on the identified data analysis intent I, a set K_I of key operators and core parameters necessary to achieve this intent is defined; then, the occurrence of elements in K_I in Q_rewritten is checked, and the coverage is calculated using the following formula: S_intent = |K_I ∩ K_rewritten| / |K_I|, where K_rewritten is the set of operators and parameters extracted from Q_rewritten; The calculation process for the syntax fluency score S_fluency includes: The perplexity PPL of Q_rewritten is calculated using a pre-trained language model and mapped to a fluency score using the following formula: S_fluency = exp(-α * PPL); Where α is a positive scaling factor used to adjust the fraction sensitivity; The calculation process of the context integration score S_context includes: Extract N key context entities E_C = {e_1, e_2, ..., e_N} from the data analysis context C, check their occurrence in Q_rewritten, and calculate the score: S_context = |E_C ∩ E_rewritten| / N; Where E_rewritten is the set of entities extracted from Q_rewritten; The final quality confidence score S_quality is determined by the following weighted formula: S_quality = w1 * S_faith + w2 * S_intent + w3 * S_fluency + w4 * S_context; Where w1, w2, w3, w4 are preset weight coefficients, and w1 + w2 + w3 + w4 = 1.
10. A data analysis problem rewriting device based on data analysis intent recognition, characterized in that, include: The input module is used to receive the user's raw data analysis questions; The intent recognition module is used to perform semantic analysis on the original data analysis question and identify the user's data analysis intent; The context understanding module is used to understand the user's data analysis context by integrating multi-source context information based on the original data analysis question; The rewriting strategy execution module is used to generate a rewriting strategy for the original data analysis problem based on the data analysis intent and the data analysis context, and output the rewritten standard data analysis problem. The output interface module is used to input the standardized data analysis question into the large language model for data analysis and processing and to obtain the answer.