A Smart Data Question Answering Method and System Based on Semantic Enhancement of Indicators

By employing an intelligent data question-answering method with semantic enhancement of indicators, and utilizing large language models and hybrid retrieval techniques, structured query statements are generated and intelligently optimized. This solves the semantic understanding and data security issues in existing technologies, and achieves efficient processing of complex analyses and a secure interactive experience.

CN121543748BActive Publication Date: 2026-04-21金现代信息产业股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
金现代信息产业股份有限公司
Filing Date
2026-01-22
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing intelligent data question answering technologies have shortcomings in semantic understanding, data models, performance optimization, and maintainability, making it difficult to accurately understand user intent, handle complex analysis scenarios, and ensure data security and interactive experience.

Method used

We employ an intelligent data question answering method based on indicator semantic enhancement. This method uses a large language model for information extraction and semantic understanding, combines an indicator semantic knowledge base with hybrid retrieval technology to generate structured query statements, and performs intelligent optimization and access control, supporting multi-turn interactions.

Benefits of technology

It enables a precise understanding of users' business intentions, supports complex cross-dimensional analysis, enhances the value and security of data assets, lowers the threshold for data use, and improves decision-making efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543748B_ABST
    Figure CN121543748B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent data question answering method and system based on indicator semantic enhancement, belonging to the field of intelligent data question answering technology. The method includes the following steps: obtaining data analysis requirements in natural language form; extracting information from the data analysis requirements using an indicator semantic enhancement-based large language model, and generating query statements based on the extracted information. Specifically, a knowledge retrieval enhancement layer recalls and reorders the most relevant indicators and elements in the indicator semantic knowledge base based on a hybrid retrieval method using the data analysis requirements and historical conversations; an indicator semantic injection layer generates a prompt template based on the retrieval results of the indicator semantic injection layer; semantic understanding and reasoning are performed based on the prompt template to obtain the corresponding information; compliance is verified based on the query statement, and the query results are returned. This invention aims to achieve efficient mapping between natural language and enterprise-level indicator assets, dynamic modeling, intelligent SQL generation and optimization, access control security, and multi-round intelligent interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent data question answering technology, and in particular to an intelligent data question answering method and system based on semantic enhancement of indicators. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] As enterprises deepen their digital transformation, the demand for data analysis and intelligent decision-making is growing. Currently, there are three main technical implementation paths in the field of intelligent data question answering: NL2SQL, NL2DSL2SQL, and semantic mapping. The NL2SQL solution directly converts natural language into structured query language. While simple to implement, it suffers from insufficient semantic understanding depth. The NL2DSL2SQL solution introduces an intermediate language as a conversion bridge, improving semantic understanding capabilities, but in practical applications, it is often limited by predefined rules and fixed patterns. Semantic mapping solutions perform multi-level conversion based on business semantics, theoretically enabling a better understanding of business intent, but their implementation complexity is high, and they place strict requirements on the underlying technical architecture.

[0004] In practical implementation, existing technical solutions reveal significant shortcomings at almost every stage, from semantic understanding and data modeling to performance optimization, maintainability, user experience, and compliance. These shortcomings are intertwined and amplified, ultimately forming significant obstacles to enterprises' intelligent upgrades. Firstly, at the semantic understanding level, traditional solutions generally lack deep modeling of industry context, business terminology, and implicit rules, remaining at keyword matching or shallow syntactic parsing. This results in the system failing to accurately capture the true business intent behind user queries. Even slight colloquialisms, paraphrasing, or multiple rounds of follow-up questions lead to misunderstandings, resulting in results that deviate significantly from business expectations. Secondly, at the data model level, most existing indicator platforms are designed for single-dimensional, atomic indicators. When faced with complex indicator calculations involving multiple dimensions, granularities, and time periods, lengthy SQL queries or scripts need to be manually written and concatenated. This approach cannot automatically derive dimensional drill-down and indicator derivation relationships, nor can it guarantee consistency and interpretability. In complex analysis scenarios, model scalability is almost at its limit. In terms of performance optimization, as data volume and query concurrency increase, traditional MPP, pre-aggregation, or caching solutions become inadequate for handling mixed ad-hoc, multi-dimensional, and real-time loads. Complex queries often involve multi-table joins, aggregations, and nested window functions, making it difficult to automatically optimize execution plans. This causes response times to drop from seconds to minutes or even hours, rendering real-time decision-making impossible. Furthermore, in terms of maintainability, query logic is difficult to consolidate and reuse, leading to redundant development. Interaction methods are inflexible, failing to support multi-turn dialogues and contextual understanding. A complete audit trail and access control mechanism is lacking, making it difficult to meet enterprise-level data security requirements. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide an intelligent data question-answering method and system based on indicator semantic enhancement, which aims to achieve efficient mapping between natural language and enterprise-level indicator assets, dynamic modeling, intelligent SQL generation and optimization, access control and security management, and multi-round intelligent interaction.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solution:

[0007] The first aspect of this invention provides an intelligent data question answering method based on indicator semantic enhancement, comprising the following steps:

[0008] To obtain data analysis requirements in natural language format;

[0009] A large language model with enhanced indicator semantics is used to extract information for data analysis needs and generate query statements based on the extracted information. Specifically, the knowledge retrieval enhancement layer uses hybrid retrieval based on data analysis needs and historical conversations to recall and rearrange the most relevant indicators and elements in the indicator semantic knowledge base. The indicator semantic injection layer generates prompt templates based on the retrieval results of the indicator semantic injection layer, and semantic understanding and reasoning are performed based on the prompt templates to obtain the corresponding information.

[0010] Verify compliance based on the query statement and return the query results.

[0011] Furthermore, during the hybrid retrieval process, if the corresponding standard indicator is not found in the indicator semantic knowledge base, a new indicator is dynamically generated based on data analysis needs, and the new indicator is then used for asset accumulation.

[0012] Furthermore, the specific steps for dynamically generating new indicators through data analysis needs and then accumulating these new indicators as assets are as follows:

[0013] The semantic parsing results of data analysis requirements are decomposed to determine the operation rules and constraints;

[0014] Based on data analysis needs, locate reusable basic indicators and analysis dimensions in the large language model, and perform dimension and granularity alignment, hierarchical alignment and missing dimension completion operations.

[0015] Based on reusable basic indicators and analytical dimensions, formulas and query plans are synthesized according to calculation rules and constraints, and recorded in the indicator semantic knowledge base.

[0016] Furthermore, the specific steps for generating a query statement based on the extracted information are as follows:

[0017] The extracted information is semantically mapped according to standardized indicators and dimensions;

[0018] Establish a structured index semantic model based on the semantic mapping results;

[0019] SQL query statements are automatically generated based on the semantic model of the indicators and metadata features.

[0020] Furthermore, the specific steps for automatically generating SQL query statements based on the indicator semantic model and metadata features are as follows:

[0021] A directed acyclic graph is constructed for each standard indicator based on direct data sources and dependencies between indicators;

[0022] Based on the dynamic adjustment of multidimensional indicators, the shortest dependency path from the original data to the target indicator is calculated by applying an improved Dixtra algorithm on a directed acyclic graph.

[0023] Furthermore, users engage in multiple rounds of question-and-answer interactions based on the returned query results, and the large language model optimizes and updates its parameters based on a self-learning mechanism during the interaction process.

[0024] A second aspect of the present invention provides an intelligent data question-answering system based on indicator semantic enhancement, comprising:

[0025] The data acquisition module is configured to acquire data analysis requirements in natural language form;

[0026] The semantic understanding module is configured to extract information from data analysis needs using a large language model with enhanced indicator semantics, and generate query statements based on the extracted information. Specifically, the knowledge retrieval enhancement layer recalls and reorders the most relevant indicators and elements in the indicator semantic knowledge base based on data analysis needs and historical conversations using a hybrid retrieval method. The indicator semantic injection layer generates prompt templates based on the retrieval results of the indicator semantic injection layer, and performs semantic understanding reasoning based on the prompt templates to obtain the corresponding information.

[0027] The statement query module is configured to validate the compliance of the query statement and return the query results.

[0028] A third aspect of the present invention provides a computer-readable storage medium storing a computer program adapted for loading by a processor and executing steps in the intelligent data question-answering method based on indicator semantic enhancement as described in the first aspect of the present invention.

[0029] A fourth aspect of the present invention provides a computer device comprising:

[0030] A processor, adapted to execute computer programs;

[0031] A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the intelligent data question-answering method based on indicator semantic enhancement as described in the first aspect of the present invention.

[0032] A fifth aspect of the present invention provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the intelligent data question-answering method based on indicator semantic enhancement as described in the first aspect of the present invention.

[0033] The above one or more technical solutions have the following beneficial effects:

[0034] This invention discloses an intelligent data question-answering method and system based on indicator semantic enhancement, aiming to provide a more complete and reliable intelligent data question-answering solution to help enterprises better utilize data assets, improve decision-making efficiency, and drive business innovation. This method ensures the system can accurately understand the user's business intent through semantic mapping between unstructured natural language queries and indicator semantic models. It utilizes real-time dimensional analysis and dynamic combination calculation of non-pre-built indicators, while systematically accumulating temporary query requests into standardized and reusable enterprise indicator assets. Furthermore, based on the metadata characteristics of the indicator semantic model, it avoids performance bottlenecks caused by multi-table join operations through intelligent optimization strategies of the SQL assembly engine. Finally, based on a multi-dimensional permission control system, it achieves precise matching between query results and user data permissions, ensuring the security of data access.

[0035] In terms of semantic understanding, this invention effectively solves the problem of semantic ambiguity by accurately mapping the indicator semantic model to natural language. It supports the accurate understanding of complex business indicators and compound computational logic, achieving precise alignment between business semantics and data language, and avoiding the "data illusion" problem. Regarding query capabilities, the system supports real-time dimensional analysis and dynamic combination calculation of indicators not pre-built, capable of handling complex analysis scenarios across dimensions and levels. It also achieves automatic conversion of temporary queries into standardized indicators, significantly enhancing the value of data assets.

[0036] In terms of performance, this invention effectively avoids the performance bottleneck caused by multi-table joins through intelligent optimization strategies, maintaining high query efficiency even in complex query scenarios and supporting real-time analysis and processing of large-scale data. Regarding the user experience, the system provides a natural language interface, supports multi-turn coherent questioning and contextual understanding, and features intelligent guidance and result recommendation functions, significantly lowering the barrier to data use and enhancing the user experience.

[0037] In terms of security, this invention establishes a comprehensive multi-dimensional access control system, achieving precise matching between query results and user permissions, supporting a complete audit trail mechanism, and effectively meeting enterprise-level compliance requirements. Regarding analytical capabilities, the system supports intelligent data result interpretation and multi-dimensional attribution analysis, possessing proactive thinking and in-depth analysis capabilities, enabling deep insights into abnormal data fluctuations and providing more in-depth data support for enterprise decision-making.

[0038] In terms of maintainability, the query logic of this invention is reusable and can be easily stored, and the analysis process is "white-boxed," supporting understanding, adjustment, and intervention, facilitating continuous system optimization and upgrades. Regarding application value, this invention significantly improves data analysis efficiency, shortens decision-making cycles, lowers the threshold for data use, expands the scope of data application, and provides more reliable data support for enterprise business decisions.

[0039] This invention's method, while ensuring architectural flexibility, guarantees the accuracy and credibility of data insights, providing reliable support for decision-making. It also supports user-friendly interactive guidance and follow-up questioning based on results, enabling multi-round, coherent questioning and enhancing the user experience. The large language model constructed in this invention possesses proactive thinking and deep analysis capabilities, supporting intelligent data result interpretation, multi-dimensional attribution, and factor attribution analysis to achieve in-depth data insights. Furthermore, the intelligent optimization strategy of the SQL assembly engine ensures the intelligent questioning process is "white-boxed," making data definitions clear and unambiguous, and the analysis process understandable, adjustable, and interventionable, thereby improving the credibility of decisions.

[0040] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of the intelligent data question answering method based on semantic enhancement of indicators in Embodiment 1 of the present invention;

[0043] Figure 2 This is a schematic diagram of the indicator asset accumulation process in Embodiment 1 of the present invention;

[0044] Figure 3 This is a DAG diagram of bloodline links in Embodiment 1 of the present invention. Detailed Implementation

[0045] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0046] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0048] Terminology Explanation:

[0049] Metric semantic model: A structured descriptive model that defines the standardized calculation logic, data sources, and relationships of metrics from a business perspective.

[0050] Large Language Model (LLM): A deep learning model trained on massive amounts of text data that can understand and generate human language and perform tasks such as question answering and writing.

[0051] Natural Language Processing (NLP) is a technology that enables computers to understand and generate human language, encompassing fields such as semantic analysis and machine translation.

[0052] Vectorization (Embedding) is a technique that converts text, images, and other data into numerical vectors, enabling computers to process semantic information through mathematical operations.

[0053] Retrieval-Augmented Generation (RAG) combines real-time retrieval of external knowledge bases with generative models to address factual errors and information lag in large models, thereby improving the accuracy of generated content.

[0054] Intent Recognition (IR) is a technology that converts natural language into predefined intent labels (such as "check the weather" or "order food") and is a core module of dialogue systems.

[0055] Example 1:

[0056] Embodiment 1 of this invention provides an intelligent data question-answering method based on semantic enhancement of indicators. Taking enterprise indicator assets as the core, it uses vectorization technology to uniformly store and efficiently retrieve terms, questions, and indicators. Users input their analysis needs through natural language, and the system automatically completes the entire process, including intent recognition, semantic parsing, indicator mapping, SQL generation and optimization, permission verification, query execution, and result feedback. It supports multi-turn interaction, intelligent follow-up questions, and result interpretation, greatly improving the accuracy, flexibility, performance, and security of data question answering.

[0057] like Figure 1As shown, the specific steps include:

[0058] S1: Obtain data analysis requirements in natural language form.

[0059] In this embodiment, natural language refers to the everyday expressions people use in communication, asking questions in spoken or written language without needing to learn specific grammar. Examples include: "What were today's sales figures?", "Which region had the best performance last month?", and "Compare user growth this year with last year."

[0060] Data analysis needs can be categorized into: indicator query needs (e.g., what is today's sales revenue), detail query needs (e.g., query today's sales flow), scope query needs (e.g., explain the meaning of customer traffic), attribution analysis needs (e.g., why is today's sales revenue lower than yesterday's), and report generation needs (e.g., please generate a monthly business analysis report for me).

[0061] S2: Use a large language model with enhanced semantics to extract information for data analysis needs and generate query statements based on the extracted information.

[0062] In one specific implementation, this embodiment employs a semantically enhanced large language model structure to ensure that user needs are accurately understood and efficiently processed. Through a multi-layered semantic processing flow, the natural language questions input by users are transformed into structured semantic representations, identifying key information such as query intent (e.g., query, attribution, year-on-year comparison, anomaly detection), analysis dimensions, indicator definitions, time range, and filtering conditions. Specifically, this embodiment designs an indicator semantic injection layer and a knowledge retrieval enhancement layer based on the large language model. The knowledge retrieval enhancement layer, based on the preprocessed data analysis requirements and historical conversations, uses a hybrid retrieval algorithm combining sparse BM25 and dense vector algorithms to recall and rearrange the most relevant indicators and elements in the indicator semantic knowledge base, outputting structured grounding including definition, applicable granularity, available dimensions, data source, quality status, and sample SQL. The determination of the most relevant metrics requires a comprehensive consideration of factors such as semantic similarity, key phrase matching, intent operator preconditions (e.g., the time dimension required for year-on-year / month-on-month comparisons), dimensional compatibility, business context consistency, and data availability and quality. First, broad coverage and recall are conducted, followed by a fusion of scoring and consistency verification. Finally, the injection model with the highest score is selected. The metric semantic injection layer inputs the above Grounding injection model using a prompt template, limiting it to "only using injected metrics and evidence information," and outputs standardized intent results according to a fixed schema (e.g., metric_id, dims, filters, time_range, grain, ops, source, confidence), ensuring consistency, interpretability, and feasibility for implementation.

[0063] During inference, the large language model can simultaneously reference both the user's original input and enterprise metric knowledge, achieving deep semantic understanding within the business context. This structure not only enhances the model's ability to understand enterprise-specific terms and complex metric logic but also dynamically adapts to the updating and expansion of enterprise knowledge.

[0064] The specific steps are as follows:

[0065] S21: Preprocess the data analysis requirements.

[0066] First, the user-input natural language data analysis requirements undergo text preprocessing, including word segmentation, noise reduction, named entity recognition (NER), and synonym normalization. Unlike traditional methods, this embodiment introduces entity recognition and synonym normalization mechanisms based on an indicator semantic knowledge base during the preprocessing stage. Specifically, the system maintains its own enterprise-owned indicator semantic knowledge base, covering historical questions, business terms, example questions, indicator definitions, and dimensional definitions, all stored in vectorized form. During text preprocessing, the system not only relies on general NLP models but also uses knowledge base retrieval to perform high-confidence identification and standardization of business entities, indicator names, and dimensions in the user input, significantly improving the accuracy and business adaptability of subsequent semantic analysis.

[0067] S22: Utilize the knowledge retrieval enhancement layer to recall and rearrange the most relevant indicators and elements in the indicator semantic knowledge base based on data analysis needs and historical conversations using hybrid retrieval.

[0068] Specifically, the knowledge retrieval enhancement layer consists of four sub-modules: query understanding, hybrid retrieval, fusion and ranking, and consistency verification. Based on the principles of retrieval enhancement generation, it achieves accurate indicator matching within the indicator semantic knowledge base. The input to the knowledge retrieval enhancement layer comes from three parts: the user's current data analysis needs, historical sessions, and organizational context. The output is structured retrieval results (Grounding), including Top-K indicator candidates and their evidence: definition, applicable granularity, available dimensions, data source, quality status, example question and sample SQL, along with candidate scores and confidence levels. Hybrid retrieval is used to retrieve the most relevant indicators, dimensions, and historical question formats from the indicator semantic knowledge base, and corresponding information such as definitions, dimensions, and sample SQL is obtained through the structured entries of the indicator semantic knowledge base. These retrieval results are then injected into the input of the large language model as "prompt templates."

[0069] The determination of the most relevant indicators requires a comprehensive consideration of factors such as semantic similarity, key phrase matching, intent operator preconditions (such as the time dimension required for year-on-year / month-on-month comparison), dimensional compatibility, business context consistency, and data availability and quality. First, broad coverage is achieved through recall, then scoring and consistency verification are integrated, and finally, the injection model with the highest score is selected.

[0070] The data processing principle involves hybrid retrieval combined with semantic reordering and business consistency verification. Hybrid retrieval utilizes sparse retrieval (BM25) and dense retrieval (vector similarity) in parallel across multiple perspectives such as name / alias / definition / example question indexes for recall. After merging, a preliminary ranking is achieved through fusion scoring. Then, a cross-encoder performs semantic satisfiability reordering and diversity control (MMR redundancy removal). Finally, business consistency filtering is performed based on topic domain / permissions, time granularity, required dimensions, Join Key integrity, data quality, and availability, producing Grounding that can be directly used for inference. The final comprehensive scoring and ranking outputs the most relevant Top-K metrics. This process balances retrieval coverage, semantic understanding, and business constraints to ensure that the final metrics are both relevant and usable. The specific steps are as follows:

[0071] 1. Perform a hybrid search that combines sparse and dense searches in parallel.

[0072] Sparse retrieval (BM25). An inverted index is built on fields such as the name, alias, definition, and example question of the indicator. Candidates are recalled based on keyword matching to obtain the Top-100 candidates and BM25 scores.

[0073] Dense retrieval (vector similarity). The indicator information and user query are encoded into vectors, and semantically similar candidates are recalled through vector similarity (such as cosine similarity) to obtain the Top-100 candidates and vector similarity scores.

[0074] The results of the two searches are then merged. The two sets of search results are merged and duplicates are removed, retaining two scores for each candidate.

[0075] 2. Perform fusion scoring on the merged search results.

[0076] Normalize the two scores, then weight them together:

[0077] Fusion score = α × BM25 score + β × vector similarity score.

[0078] Here, α and β are weights, set to 0.4 and 0.6 in this embodiment, but can be adjusted according to the scenario. The top 50 scores are sorted by fusion score and proceed to the next stage.

[0079] 3. Perform semantic rearrangement on the fusion scores.

[0080] Fine-grained ranking is performed using a cross-encoder. A BERT-like model is used to interactively model the "user query + candidate metrics" to obtain a semantic satisfiability score, which more accurately assesses relevance.

[0081] Then, diversity control (MMR) is performed. Diversity is increased on top of correlation to avoid results that are too similar.

[0082] MMR score = λ × semantic score - (1-λ) × maximum similarity with the selected results. λ controls the balance between relevance and diversity (e.g., 0.7). Sort by MMR score, and retain the Top-20 for consistency verification.

[0083] 4. Perform business consistency verification.

[0084] Perform multi-dimensional verification on each candidate.

[0085] Specific dimensions include:

[0086] (1) Subject domain / permissions. Check whether the user has permission to access the subject domain to which the metric belongs.

[0087] (2) Time granularity. Check whether the indicator supports the time dimension required for the query (such as year-on-year / month-on-month comparison).

[0088] (3) Required dimensions. Check whether the metrics support the dimensions in the query, and whether any required dimensions are missing.

[0089] (4) Join Key Integrity. Check whether the Join Key is complete in multi-table join scenarios.

[0090] (5) Data quality and availability. Check whether the data quality status is normal and whether the data update date meets the query time range.

[0091] Each verification result is weighted and scored to obtain a consistency score.

[0092] 5. Sort the consistency scores and output the final scores.

[0093] The semantic score, consistency score, and fusion score are combined according to their weights to achieve a comprehensive score:

[0094] Final score = γ × semantic score + δ × consistency score + ε × fusion score.

[0095] Wherein, γ, δ, and ε are the weights of the corresponding items, and the weights can be adjusted according to business needs, such as γ=0.5, δ=0.3, and ε=0.2.

[0096] Sort by final score and output Top-K (e.g., Top-5) metrics as grounding. Each metric includes: metric name, definition, applicable granularity, available dimensions, data source, quality status, example question, sample SQL, candidate score, and confidence level.

[0097] It should be noted that, for example Figure 2 As shown, in actual operation, the system automatically retrieves and matches the most relevant standard indicators based on the semantic parsing results. If a user's query involves unbuilt combined or derived indicators, it dynamically parses dimensions and automatically combines calculation logic based on metadata and indicator dependencies to generate new indicator assets in real time. For example, when a user submits a temporary analysis request for "the ratio of sales revenue to order volume in East China in 2023," the system can automatically identify the two basic indicators, "sales revenue" and "order volume," and generate a calculation formula for the new indicator "sales revenue / order volume" based on the intent. It also uses "region" and "time" as analysis dimensions to ultimately form a structured indicator definition. The newly generated indicators can not only be used for the current query but are also automatically stored in the indicator semantic knowledge base for easy reuse and management, thereby achieving continuous accumulation and standardization of enterprise data assets.

[0098] Specifically, during the hybrid retrieval process, if a corresponding standard indicator is found in the indicator semantic knowledge base, the most relevant indicators and elements are recalled and rearranged in the indicator semantic knowledge base. If no corresponding standard indicator is found in the indicator semantic knowledge base, new indicators are dynamically generated based on data analysis needs, and these new indicators are then used for asset accumulation.

[0099] The specific steps for dynamically generating new indicators based on data analysis needs and then accumulating these new indicators as assets are as follows:

[0100] (1) Decompose the semantic parsing results of the data analysis requirements and determine the operation rules and constraints.

[0101] Specifically, when the semantic knowledge base of indicators cannot directly satisfy the query intent, the system enters the "dynamic generation of combined / derived indicators" process. First, the semantic parsing results are decomposed to clarify the required operation rules (ratio, addition, subtraction, multiplication, division, year-on-year / month-on-month, cumulative / window, etc.) and constraints.

[0102] (2) Based on the data analysis requirements, locate the reusable basic indicators and analysis dimensions in the large language model, and perform dimension and granularity alignment, hierarchical alignment and missing dimension completion operations.

[0103] Specifically, the next step is to identify reusable basic metrics and analytical dimensions, read their definitions, applicable granularity, units / calibers, lineage, and JoinKey, and build dependencies. Then, dimensional and granularity alignment (roll-up / drill-down / resampling), hierarchical alignment, and missing dimension completion are performed, and units / currencies and calibers are standardized (including tax / deduplication, etc.). Incompatible cases are downgraded or clarifications are triggered according to rules, thereby achieving automatic creation of combined metrics for subsequent use in the metric semantic model.

[0104] (3) Based on reusable basic indicators and analysis dimensions, synthesize formulas and query plans according to operation rules and constraints, and record them in the indicator semantic knowledge base.

[0105] Specifically, based on this, formulas and query plans (SQL / DSL) are synthesized, automatically completing denominator zeroing, window boundaries, and alignment rules, and performing syntax / permission / cost and executability checks, selecting equivalent or better plans when necessary. After successful checks, new metric assets are registered in real time, generating a unique code (e.g., metricCode), standard name and definition, formula and applicable dimensions / granularity, source and lineage, permissions, and version information; for temporary needs, they are managed according to session / task-level lifecycles and support subsequent solidification. Finally, a structured binding result is returned for downstream execution and result interpretation.

[0106] S23: Utilize the indicator semantic injection layer to generate a prompt template based on the retrieval results of the indicator semantic injection layer, and perform semantic understanding and reasoning based on the prompt template to obtain the corresponding information.

[0107] Specifically, the semantic injection layer consists of three sub-modules: prompt construction, controlled generation, and structured alignment. The input is the grounding (indicators / dimensions, etc.) output from the knowledge retrieval enhancement layer. The output is the injected prompt (containing system rules, context summaries, few-shot examples, and grounding fragments) and the model's standardized parsing results.

[0108] The data processing principle is controlled prompt injection combined with evidence binding and format constraints: retrieved evidence is injected with explicit prompt blocks, the model is limited to "only using the caliber / source / dimension in the grounding", and output is required according to a fixed schema. At the same time, evidence references and confidence levels are attached to key selections. If necessary, the top-ranked alternatives are returned for clarification or automatic selection to ensure consistency, interpretability and feasibility.

[0109] S24: Generate a query statement based on the extracted information.

[0110] S241: Perform semantic mapping on the extracted information according to standardized indicators and dimensions.

[0111] Specifically, in terms of indicator mapping strategy, this embodiment dynamically adjusts the mapping rules according to the analysis type. For example, attribution analysis prioritizes dimensions and factors with strong dependencies on the target indicator, automatically generating multidimensional groupings and attribution paths; month-on-month and year-on-year analysis automatically generates time windows and mapping relationships between comparative indicators; anomaly detection prioritizes associating historical data and statistical feature indicators. All these dynamic adjustments are driven by the system's built-in "analysis type-parsing strategy mapping table," combined with the contextual reasoning capabilities of the large language model and the business rules of the indicator semantic knowledge base, to achieve highly adaptive semantic parsing and indicator mapping.

[0112] S242: Establish a structured index semantic model based on the semantic mapping results.

[0113] Specifically, the system first unifies the modeling of various business indicators, dimensions, definitions, and calculation logic for enterprises, forming a structured indicator semantic model. Each indicator asset includes metadata such as name, definition, calculation formula, applicable dimensions, data source, permission attributes, and dependencies. Through this standardized modeling, the system can efficiently support the management and traceability of complex business indicators.

[0114] S243 automatically generates SQL query statements based on the indicator semantic model and metadata features.

[0115] In one specific implementation, the core task of this step is to automatically transform the structured query intent, after semantic mapping and dynamic modeling of indicators, into high-performance, interpretable SQL statements through an SQL assembly engine, and to intelligently optimize for complex business scenarios. Based on the indicator semantic model, and combined with metadata features, table structure, field relationships, data partitioning, and other information, the system dynamically selects the optimal query path to ensure query efficiency and result accuracy even in multi-table, multi-dimensional, and complex analysis scenarios.

[0116] The specific steps are as follows:

[0117] S2431: Construct a directed acyclic graph for each standard indicator based on direct data sources and dependencies between indicators.

[0118] Specifically, in the implementation process, the definition of the indicator asset is first parsed to obtain the indicator calculation formula and lineage relationship. Based on the lineage link, a recursive tracing is performed to automatically identify all basic indicators and their dependent underlying data tables and fields. For each indicator, the system not only extracts its direct data source but also constructs a directed acyclic graph (DAG) based on the dependencies between indicators, such as... Figure 3 As shown, nodes represent data tables or intermediate results, such as... Figure 3The table contains original data table A, original data table B, intermediate indicator X, intermediate indicator Y, and target indicator Z. Edges represent dependencies, such as... Figure 3 The numbers 1-3 in the text.

[0119] S2432: Based on the dynamic adjustment of multidimensional indicators, the shortest dependency path from the original data to the target indicator is calculated by applying an improved Dixtra algorithm on a directed acyclic graph.

[0120] Specifically, by applying an improved Dijkstra algorithm to a directed acyclic graph, the shortest dependency path from the original data to the target metric can be automatically calculated. The determination of the shortest path considers not only the length of the dependency links but also a comprehensive evaluation of the execution cost of each path, including metadata characteristics such as the number of rows in the data table, the number of fields, index coverage, and data partitioning. The system assigns a weight to each edge, dynamically adjusted by multiple dimensions such as data volume, estimated I / O, and historical query time, ultimately selecting the dependency path with the lowest total cost as the basis for SQL generation.

[0121] Furthermore, for data analysis requirements involving multiple tables, this embodiment will perform primary and foreign key relationship analysis on all involved tables. To optimize the join order, a dynamic programming-based join order optimization algorithm is adopted to enumerate and estimate the cost of all possible table join orders. First, based on information such as table cardinality, filter selectivity, and index availability, the size of the intermediate result set and I / O cost under each join order are estimated. Then, a bottom-up dynamic programming method is used to gradually merge table joins, recording the optimal cost and join order at each step, and finally selecting the globally optimal JOIN order. For large data volume or wide table scenarios, optimization strategies such as partition pruning, materialized views, and semi-joins will also be given priority, and the SQL generation strategy will be dynamically adjusted to achieve the optimal execution plan for the query.

[0122] Furthermore, the SQL assembly engine supports visual representation and white-box explanation of query logic, facilitating user understanding and intervention in the query process and improving the system's interpretability and maintainability. For complex multidimensional analysis and attribution analysis tasks, it can automatically decompose query tasks, execute them step by step, and aggregate the results, ensuring the flexibility and accuracy of the analysis. All generated SQL statements support integration with the permission and security module, automatically embedding data permission filtering conditions to ensure the compliance and security of data access.

[0123] Through the aforementioned mechanism, this embodiment can automatically generate efficient and interpretable SQL statements based on the indicator semantic model and user query intent. Combined with various intelligent optimization strategies, it significantly improves query performance and system maintainability in complex analysis scenarios. The design of the SQL assembly and intelligent optimization module effectively solves the problems of traditional NL2SQL solutions in areas such as multi-table joins, performance bottlenecks, and query interpretability, providing solid technical support for enterprise-level intelligent data question-answering systems.

[0124] It is important to note that this embodiment dynamically switches and adjusts the semantic parsing process for different intents. Taking attribution analysis as an example, after the system identifies trigger words such as "attribution / reason for fluctuation / influencing factors" in the intent, it automatically inserts a "factor extraction" sub-process during the semantic parsing stage. This sub-process focuses on the target indicator, combines the retrieved definitions, applicable dimensions, and historical question types, and uses a large language model and indicator semantic knowledge base to jointly identify potential influencing factors (region, product, channel, demographic, version, etc.) related to the target indicator. These factors are then used as candidate analysis dimensions to complete the structured semantics, and are optimized based on observability and executability: on the one hand, constraints are verified based on dimension support, granularity matching, permissions, and data availability; on the other hand, noise reduction and ranking are performed by referring to historical success cases, organizational preferences, and the feasibility of sample SQL. Subsequently, the validated factors are used as candidate analysis dimensions to complete the structured semantics (e.g., adding an ordered priority list to dims[] and adding necessary constraints to filters[]. For example, for month-on-month and year-on-year analysis, this embodiment automatically identifies the time field and generates comparison intervals such as "current period - previous period" or "this year - last year" according to business rules. At the same time, the indicator definition of the comparison type is automatically completed in the indicator mapping stage (e.g., "sales revenue - last year's same period"). If an existing attribution template or decomposition formula for the indicator is retrieved (e.g., channel-based / region-based attribution), it is directly applied or semi-automatically fine-tuned in the "indicator mapping" stage. Finally, the results with explanation are output in the generation and execution stage, including the contribution ratio of key factors, the attribution explanation of the overall change, and the corresponding evidence (sample SQL / source table / quality label), thereby achieving an attribution loop that is "explainable, traceable, and reproducible".

[0125] S3: Verify the compliance of the query statement and return the query results.

[0126] In one specific implementation, this embodiment employs a multi-dimensional, fine-grained permission management mechanism to dynamically validate user query requests, achieving precise matching between query results and user data permissions, thus preventing unauthorized data access and sensitive information leakage. During implementation, this embodiment assigns a unique identifier to each user and establishes a flexible permission model by combining multi-dimensional information such as roles, organizational structure, data hierarchy, and business domains. Access permission tags can be configured for each indicator asset, data table, and field, and permission filtering conditions are automatically embedded during the SQL assembly stage, ensuring that users can only access the data they are authorized to view. For queries involving sensitive data, this embodiment also supports security strategies such as dynamic anonymization and result obfuscation, further enhancing data protection capabilities.

[0127] Furthermore, this embodiment performs full audit tracking of all query operations, recording key information such as query content, execution time, user, and result range, facilitating subsequent compliance checks and risk tracing. The audit logs support integration with enterprise security platforms, enabling real-time alerts for abnormal behavior and automated risk handling. This end-to-end access control and compliance management mechanism meets the compliance requirements of high-security industries such as finance, healthcare, and government, providing a solid guarantee for the secure circulation and intelligent application of enterprise data assets.

[0128] This embodiment effectively solves the problems of crude permission management, high data security risks, and insufficient compliance in traditional data question-and-answer systems, and greatly improves the security and credibility of the system.

[0129] In addition, it includes a query execution and result feedback mechanism. Specifically, it is responsible for submitting the SQL statements, after permission verification and optimization, to the underlying data engine for efficient execution, and for providing multi-dimensional intelligent interpretation, attribution analysis, and natural language feedback on the query results, greatly enhancing the user's data insight capabilities and interactive experience. During implementation, it supports integration with various data sources, including relational databases, distributed data warehouses, and big data platforms, and can automatically select the optimal data engine and execution path based on the metadata of the indicator assets.

[0130] During query execution, the system dynamically monitors the SQL execution status and resource consumption. For scenarios involving large datasets and complex analyses, it supports optimization strategies such as task splitting, asynchronous execution, and result caching to ensure high availability and fast response times. Upon receiving query results, it not only provides structured data tables but also utilizes a large language model with enhanced semantic metrics for intelligent interpretation and multi-dimensional attribution analysis. For example, it can automatically identify abnormal data fluctuations, trend changes, and key driving factors, generating analysis reports in natural language to help users quickly understand the business implications behind the data. For multi-round follow-up questions and contextual analysis, it automatically links historical query results, achieving a continuous and coherent intelligent question-and-answer experience. It also supports multi-dimensional visualization of results, intelligent recommendations, and interactive guidance, allowing users to conduct further detailed analysis, attribution follow-up questions, or reuse results, greatly enhancing the depth and flexibility of data analysis. All query results and analysis processes are traceable and explainable, facilitating data governance and decision review for enterprises.

[0131] Finally, users can engage in multiple rounds of question-and-answer interactions based on the returned query results. During the interaction process, the large language model optimizes and updates its parameters based on a self-learning mechanism.

[0132] In this embodiment, the multi-turn interaction and intelligent guidance module not only supports continuous, context-sensitive multi-turn intelligent question answering, but also innovatively introduces a "measurable asset-driven multi-turn follow-up questioning path planning mechanism" and a "historical conversation intelligent backtracking" algorithm, greatly improving the depth, flexibility, and intelligence level of data analysis. Unlike existing multi-turn question answering systems that mostly involve simple context splicing and lack business semantic understanding and proactive guidance, this embodiment can dynamically plan the most valuable follow-up questioning path based on measurable assets and business scenarios, and achieve intelligent completion and proactive analysis.

[0133] Specifically, after each round of question-and-answer, the system automatically analyzes the current query results and the user's historical interaction intent. Combining the indicator lineage, dependency paths, and business priorities in the indicator asset library, it dynamically generates a "follow-up question recommendation tree." This recommendation tree uses the current analysis target as the root node and expands hierarchically to include all possible subdivisions, attribution factors, and derived indicators. By weighting and scoring multi-dimensional characteristics such as indicator asset dependencies, historical usage frequency, and business relevance, it prioritizes recommending the most valuable and business-insightful follow-up question dimensions. For example, when a user queries "changes in sales revenue in 2023," the system automatically recommends high-value follow-up question paths such as "by region," "by product attribution," and "year-on-year comparison." Users can select these paths with a single click or ask follow-up questions using natural language, and the system automatically completes any omitted information and generates a structured query.

[0134] The intelligent backtracking algorithm for historical conversations can automatically retrieve and backtrack relevant questions and analysis paths in historical conversations based on the user's current follow-up questions. It can intelligently determine whether the user's intent is related to historical analysis and proactively prompt the user to cite or reuse historical analysis results when necessary.

[0135] Through the aforementioned innovative mechanism, this embodiment not only achieves continuity and contextual relevance in multi-turn intelligent interactions, but also significantly enhances the business adaptability and user experience of the data question-answering system through proactive analysis and intelligent guidance driven by indicator assets. This overcomes the technical bottlenecks of existing multi-turn question-answering systems in terms of business understanding and intelligent recommendation.

[0136] The specific steps for parameter optimization and updating based on the self-learning mechanism are as follows:

[0137] The model self-learning mechanism in this embodiment fully utilizes the few-shot learning paradigm to achieve continuous adaptation and intelligent evolution in practical applications. When users find that the system's question-and-answer results have comprehension biases, incorrect indicator mappings, or analysis paths that do not meet expectations, they can directly correct the system output through the interactive interface and supplement it with exemplary natural language questions and their expected structured parsing results. The system will automatically archive the correction examples provided by the user into the "Example Question Library" and dynamically expand the prompt of the large language model or fine-tune the model parameters based on the few-shot mechanism.

[0138] Specifically, when processing similar questions subsequently, the system prioritizes retrieving user examples most similar to the current input. These examples are then injected into the large language model as few-shot contextual hints, guiding the model to perform semantic parsing and metric mapping in the manner expected by the user. For high-frequency correction scenarios, the system also supports periodic incremental fine-tuning of the model, continuously optimizing its understanding and output accuracy within the specific business context of the enterprise. This mechanism not only significantly improves the model's adaptability to enterprise-specific terminology, complex business logic, and personalized needs, but also enables efficient collaboration and knowledge co-construction between users and the system. Through user correction and a few-shot example-driven self-optimization mechanism, the system can continuously accumulate enterprise knowledge and user preferences, achieving continuous improvement in question-answering quality and dynamic evolution of business adaptability, greatly enhancing the usability, maintainability, and innovativeness of the intelligent data question-answering system.

[0139] Furthermore, this embodiment maintains conversation history and context state in multi-turn dialogue scenarios, supporting a continuous and coherent intelligent question-answering experience. Each round of dialogue not only references the current input but also combines historical query goals, analysis paths, and generated indicator assets to achieve context-aware intent recognition and semantic completion. The entire process not only integrates cutting-edge technologies such as natural language processing, deep learning, and vector retrieval but also achieves continuous self-evolution and innovative breakthroughs in semantic understanding, dynamic modeling, and asset accumulation for enterprise-level intelligent data question-answering systems through the deep fusion of indicator semantic models and large language models.

[0140] To better illustrate the superiority of the method in this embodiment, suppose a user inputs "the ratio of sales revenue to order volume in East China in 2023 and its changing trend" through the system interface. The system first performs text preprocessing and semantic parsing on the input, identifying the two basic indicators "sales revenue" and "order volume" and the analytical intent of "ratio". Combining the dimensions of "region" and "time", the system automatically retrieves the indicator asset library and dynamically generates a new indicator, "sales revenue / order volume". Subsequently, based on the indicator model and metadata characteristics, the system automatically generates efficient SQL, embeds user permission filtering conditions, and submits it to the underlying data engine for execution. After the query results are returned, the system combines the large language model and the indicator semantic model to automatically generate a natural language analysis report, pointing out the changing trend of the ratio, key driving factors, and abnormal fluctuations, and proactively recommends that the user perform attribution analysis or segmentation analysis. Based on the current results, the user can further ask "Which cities saw the most significant decline in the ratio?", and the system automatically references historical results, segmenting to the city dimension, completing multiple rounds of intelligent question answering and in-depth data insights.

[0141] As can be seen from the above application scenarios and embodiments, this invention not only greatly lowers the threshold for data analysis and enhances the data self-service capabilities of business personnel, but also significantly improves the utilization efficiency of enterprise data assets and decision-making level through an intelligent and automated closed-loop process. The system's high adaptability, high security, and high intelligence enable it to be rapidly implemented and continuously innovated in various industries and complex business scenarios, possessing extremely high industrial application value and promising prospects for promotion.

[0142] Example 2:

[0143] Embodiment 2 of the present invention provides an intelligent data question answering system based on indicator semantic enhancement, comprising:

[0144] The data acquisition module is configured to acquire data analysis requirements in natural language form;

[0145] The semantic understanding module is configured to extract information from data analysis needs using a large language model with enhanced indicator semantics, and generate query statements based on the extracted information. Specifically, the knowledge retrieval enhancement layer recalls and reorders the most relevant indicators and elements in the indicator semantic knowledge base based on data analysis needs and historical conversations using a hybrid retrieval method. The indicator semantic injection layer generates prompt templates based on the retrieval results of the indicator semantic injection layer, and performs semantic understanding reasoning based on the prompt templates to obtain the corresponding information.

[0146] The statement query module is configured to validate the compliance of the query statement and return the query results.

[0147] Example 3:

[0148] Embodiment 3 of the present invention provides a computer-readable storage medium storing a computer program adapted for loading by a processor and executing the steps of the intelligent data question answering method based on indicator semantic enhancement as described in Embodiment 1 of the present invention.

[0149] Example 4:

[0150] Embodiment 4 of the present invention provides a computer device, the device comprising:

[0151] A processor, adapted to execute computer programs;

[0152] A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps of the intelligent data question answering method based on indicator semantic enhancement as described in Embodiment 1 of the present invention.

[0153] Example 5:

[0154] Embodiment 5 of the present invention provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the intelligent data question-answering method based on indicator semantic enhancement as described in Embodiment 1 of the present invention.

[0155] The steps and methods involved in Examples 2, 3, 4 and 5 above correspond to those in Example 1. For specific implementation methods, please refer to the relevant description section of Example 1.

[0156] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0157] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc.

[0158] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An intelligent data question answering method based on semantic enhancement of indicators, characterized in that, Includes the following steps: To obtain data analysis requirements in natural language format; This paper utilizes a semantically enhanced large language model to extract information from data analysis needs and generates query statements based on the extracted information. Specifically, a knowledge retrieval enhancement layer recalls and reorders the most relevant indicators and elements in the indicator semantic knowledge base based on data analysis needs and historical conversations using a hybrid retrieval method. An indicator semantic injection layer generates prompt templates based on the retrieval results, and semantic understanding and reasoning are performed based on these prompt templates to obtain the corresponding information. During the hybrid retrieval process, if no corresponding standard indicator is found in the indicator semantic knowledge base, new indicators are dynamically generated based on data analysis needs, and these new indicators are then asset-based. The specific steps are as follows: The semantic parsing results of data analysis requirements are decomposed to determine the operation rules and constraints; Based on data analysis needs, locate reusable basic indicators and analysis dimensions in the large language model, and perform dimension and granularity alignment, hierarchical alignment and missing dimension completion operations. Based on reusable basic indicators and analytical dimensions, formulas and query plans are synthesized according to calculation rules and constraints, and recorded in the indicator semantic knowledge base; The specific steps for generating a query statement based on the extracted information are as follows: The extracted information is semantically mapped according to standardized indicators and dimensions; Establish a structured index semantic model based on the semantic mapping results; The SQL query statement is automatically generated based on the indicator semantic model and metadata features. The specific steps are as follows: A directed acyclic graph is constructed for each standard indicator based on direct data sources and dependencies between indicators; Based on the dynamic adjustment of multidimensional indicators, the shortest dependency path from the original data to the target indicator is calculated by applying an improved Dixtra algorithm on a directed acyclic graph. Verify compliance based on the query statement and return the query results.

2. The intelligent data question answering method based on semantic enhancement of indicators as described in claim 1, characterized in that, Users engage in multiple rounds of question-and-answer interactions based on the returned query results. During the interaction process, the large language model optimizes and updates its parameters based on a self-learning mechanism.

3. An intelligent data question-answering system based on semantic enhancement of indicators, characterized in that, include: The data acquisition module is configured to acquire data analysis requirements in natural language form; The semantic understanding module is configured to extract information from data analysis needs using a large language model enhanced with indicator semantics, and generate query statements based on the extracted information. Specifically, a knowledge retrieval enhancement layer uses a hybrid retrieval method based on data analysis needs and historical conversations to recall and reorder the most relevant indicators and elements in the indicator semantic knowledge base. An indicator semantic injection layer generates prompt templates based on the retrieval results, and semantic understanding reasoning is performed based on these prompt templates to obtain the corresponding information. During the hybrid retrieval process, if no corresponding standard indicator is found in the indicator semantic knowledge base, new indicators are dynamically generated based on data analysis needs, and these new indicators are then stored as assets. The specific steps are as follows: The semantic parsing results of data analysis requirements are decomposed to determine the operation rules and constraints; Based on data analysis needs, locate reusable basic indicators and analysis dimensions in the large language model, and perform dimension and granularity alignment, hierarchical alignment and missing dimension completion operations. Based on reusable basic indicators and analytical dimensions, formulas and query plans are synthesized according to calculation rules and constraints, and recorded in the indicator semantic knowledge base; The specific steps for generating a query statement based on the extracted information are as follows: The extracted information is semantically mapped according to standardized indicators and dimensions; Establish a structured index semantic model based on the semantic mapping results; The SQL query statement is automatically generated based on the indicator semantic model and metadata features. The specific steps are as follows: A directed acyclic graph is constructed for each standard indicator based on direct data sources and dependencies between indicators; Based on the dynamic adjustment of multidimensional indicators, the shortest dependency path from the original data to the target indicator is calculated by applying an improved Dixtra algorithm on a directed acyclic graph. The statement query module is configured to validate the compliance of the query statement and return the query results.

4. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the intelligent data question answering method based on semantic enhancement of indicators as described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-2.

6. A computer device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the intelligent data question answering method based on indicator semantic enhancement as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Dynamic knowledge retrieval enhancement method based on large language model

    CN120407570A

  • Semantic Analysis-Based Query Result Retrieval for Natural Language Procedural Queries

    US20190392066A1